From 9159ad533f0322159e4e588d7b98f30425e50060 Mon Sep 17 00:00:00 2001 From: vx-clutch Date: Thu, 24 Jul 2025 22:44:55 -0400 Subject: [PATCH] save --- yait/format.h | 4 ++-- yait/main.c | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/yait/format.h b/yait/format.h index e76fc5d..077f177 100644 --- a/yait/format.h +++ b/yait/format.h @@ -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) */ diff --git a/yait/main.c b/yait/main.c index dbceda4..e1ac42d 100644 --- a/yait/main.c +++ b/yait/main.c @@ -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; }