save
This commit is contained in:
@@ -12,7 +12,7 @@ typedef enum
|
|||||||
BSD3, /* BSD 3-Clause License */
|
BSD3, /* BSD 3-Clause License */
|
||||||
GPLv3, /* GNU General Public License v3 */
|
GPLv3, /* GNU General Public License v3 */
|
||||||
MIT, /* MIT License */
|
MIT, /* MIT License */
|
||||||
UNlicense, /* Unlicense */
|
UNlICENSE, /* Unlicense */
|
||||||
} license_t;
|
} license_t;
|
||||||
|
|
||||||
/* Library type enumeration - using bit flags for multiple selection */
|
/* Library type enumeration - using bit flags for multiple selection */
|
||||||
@@ -42,7 +42,7 @@ typedef struct
|
|||||||
/* Project configuration structure */
|
/* Project configuration structure */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
license_t licence; /* License type for the project */
|
license_t license; /* License type for the project */
|
||||||
char *project; /* Project name */
|
char *project; /* Project name */
|
||||||
char *name; /* Author/creator name */
|
char *name; /* Author/creator name */
|
||||||
lib_flags_t libraries; /* Selected libraries (bit field) */
|
lib_flags_t libraries; /* Selected libraries (bit field) */
|
||||||
|
|||||||
11
yait/main.c
11
yait/main.c
@@ -201,7 +201,7 @@ sanitize (format_t *fmt)
|
|||||||
fmt->project = DEFAULT_PROJECT_NAME;
|
fmt->project = DEFAULT_PROJECT_NAME;
|
||||||
if (!fmt->name)
|
if (!fmt->name)
|
||||||
fmt->name = DEFAULT_USER_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->license = DEFAULT_LICENSE;
|
||||||
fmt->flag.git = fmt->flag.git ? true : DEFAULT_GIT_INIT;
|
fmt->flag.git = fmt->flag.git ? true : DEFAULT_GIT_INIT;
|
||||||
fmt->flag.clang_format
|
fmt->flag.clang_format
|
||||||
@@ -212,9 +212,9 @@ sanitize (format_t *fmt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
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;
|
return 0;
|
||||||
|
|
||||||
reset_path;
|
reset_path;
|
||||||
@@ -230,6 +230,7 @@ create_license_and_set_license_line (format_t fmt, char **licence_line_buffer)
|
|||||||
switch (fmt.license)
|
switch (fmt.license)
|
||||||
{
|
{
|
||||||
case BSD3:
|
case BSD3:
|
||||||
|
*license_line_buffer = "Bsd";
|
||||||
TODO ();
|
TODO ();
|
||||||
break;
|
break;
|
||||||
case GPLv3:
|
case GPLv3:
|
||||||
@@ -239,9 +240,9 @@ create_license_and_set_license_line (format_t fmt, char **licence_line_buffer)
|
|||||||
TODO ();
|
TODO ();
|
||||||
break;
|
break;
|
||||||
// TODO: Replace fallthrough with unreachable macro for performace.
|
// TODO: Replace fallthrough with unreachable macro for performace.
|
||||||
case UNlicense:
|
case UNlICENSE:
|
||||||
default:
|
default:
|
||||||
printfn ("bad logic in create_license_and_set_licence_line()");
|
printfn ("bad logic in create_license_and_set_license_line()");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user