This commit is contained in:
2025-07-24 22:44:55 -04:00
parent 444b22d2d5
commit 9159ad533f
2 changed files with 8 additions and 7 deletions

View File

@@ -12,7 +12,7 @@ typedef enum
BSD3, /* BSD 3-Clause License */
GPLv3, /* GNU General Public License v3 */
MIT, /* MIT License */
UNlicense, /* Unlicense */
UNlICENSE, /* Unlicense */
} license_t;
/* Library type enumeration - using bit flags for multiple selection */
@@ -42,7 +42,7 @@ typedef struct
/* Project configuration structure */
typedef struct
{
license_t licence; /* License type for the project */
license_t license; /* License type for the project */
char *project; /* Project name */
char *name; /* Author/creator name */
lib_flags_t libraries; /* Selected libraries (bit field) */

View File

@@ -201,7 +201,7 @@ sanitize (format_t *fmt)
fmt->project = DEFAULT_PROJECT_NAME;
if (!fmt->name)
fmt->name = DEFAULT_USER_NAME;
if (fmt->license != BSD3 && fmt->licence != GPLv3 && fmt->licence != MIT)
if (fmt->license != BSD3 && fmt->license != GPLv3 && fmt->license != MIT)
fmt->license = DEFAULT_LICENSE;
fmt->flag.git = fmt->flag.git ? true : DEFAULT_GIT_INIT;
fmt->flag.clang_format
@@ -212,9 +212,9 @@ sanitize (format_t *fmt)
}
int
create_license_and_set_license_line (format_t fmt, char **licence_line_buffer)
create_license_and_set_license_line (format_t fmt, char **license_line_buffer)
{
if (fmt.license == UNLICENCE)
if (fmt.license == UNlICENSE)
return 0;
reset_path;
@@ -230,6 +230,7 @@ create_license_and_set_license_line (format_t fmt, char **licence_line_buffer)
switch (fmt.license)
{
case BSD3:
*license_line_buffer = "Bsd";
TODO ();
break;
case GPLv3:
@@ -239,9 +240,9 @@ create_license_and_set_license_line (format_t fmt, char **licence_line_buffer)
TODO ();
break;
// TODO: Replace fallthrough with unreachable macro for performace.
case UNlicense:
case UNlICENSE:
default:
printfn ("bad logic in create_license_and_set_licence_line()");
printfn ("bad logic in create_license_and_set_license_line()");
return 1;
}