This commit is contained in:
2025-07-24 22:00:11 -04:00
parent d6845e89d0
commit 444b22d2d5
2 changed files with 12 additions and 12 deletions

View File

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

View File

@@ -126,7 +126,7 @@ main (int argc, char **argv)
conf.flag.git = DEFAULT_GIT_INIT;
conf.flag.clang_format = DEFAULT_CLANG_FORMAT;
conf.licence = DEFAULT_LICENSE;
conf.license = DEFAULT_LICENSE;
err = create_project (conf);
if (!err)
@@ -201,8 +201,8 @@ sanitize (format_t *fmt)
fmt->project = DEFAULT_PROJECT_NAME;
if (!fmt->name)
fmt->name = DEFAULT_USER_NAME;
if (fmt->licence != BSD3 && fmt->licence != GPLv3 && fmt->licence != MIT)
fmt->licence = DEFAULT_LICENSE;
if (fmt->license != BSD3 && fmt->licence != GPLv3 && fmt->licence != MIT)
fmt->license = DEFAULT_LICENSE;
fmt->flag.git = fmt->flag.git ? true : DEFAULT_GIT_INIT;
fmt->flag.clang_format
= fmt->flag.clang_format ? true : DEFAULT_CLANG_FORMAT;
@@ -212,13 +212,13 @@ sanitize (format_t *fmt)
}
int
create_license_and_set_license_line (format_t fmt, char **license_line_buffer)
create_license_and_set_license_line (format_t fmt, char **licence_line_buffer)
{
if (fmt.licence == UNLICENCE)
if (fmt.license == UNLICENCE)
return 0;
reset_path;
/* TODO: Run better checks on licence_line_buffer to ensure we have enough space.
/* TODO: Run better checks on license_line_buffer to ensure we have enough space.
This could be done through a multitude of ways; that is for you to figure out. */
assert (license_line_buffer != NULL);
@@ -227,7 +227,7 @@ create_license_and_set_license_line (format_t fmt, char **license_line_buffer)
printfn ("Not impl"); \
assert (1 == 2)
switch (fmt.licence)
switch (fmt.license)
{
case BSD3:
TODO ();
@@ -239,9 +239,9 @@ create_license_and_set_license_line (format_t fmt, char **license_line_buffer)
TODO ();
break;
// TODO: Replace fallthrough with unreachable macro for performace.
case UNLICENCE:
case UNlicense:
default:
printfn ("bad logic in create_licence_and_set_licence_line()");
printfn ("bad logic in create_license_and_set_licence_line()");
return 1;
}