yait

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit a977f0afbe40c61b0ea4c468d73fb587a1caee9e
parent adedeb5b631aecebeeddc4fda4fb6566a6dad265
Author: vx-clutch <[email protected]>
Date:   Wed,  5 Nov 2025 09:36:35 -0500

fixes

Diffstat:
Msrc/yait.c | 21+++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/yait.c b/src/yait.c @@ -26,6 +26,10 @@ #include "version.h" #include <template.h> +#ifndef GOOD +#define GOOD 0 +#endif + typedef enum { MIT, GPL, BSD, UNL } license_t; static const struct option longopts[] = { @@ -96,11 +100,12 @@ int main(int argc, char **argv) { int optc; int lose = 0; - char *m = str_dup("Does a thing"), *package; - bool shell = false; - bool flat = false; + char *m = str_dup("[DESCRIPTION]"), /* description flag */ + *package; + bool S = false; /* shell flag */ + bool f = false; /* flat flag */ char *author = get_name(); - exit_status = EXIT_SUCCESS; + exit_status = GOOD; int year = get_year(); license_t license = BSD; char *license_str = "BSD-3-Clause"; @@ -148,10 +153,10 @@ int main(int argc, char **argv) } break; case 'S': - shell = true; + S = true; break; case 'f': - flat = true; + f = true; break; default: lose = 1; @@ -171,7 +176,7 @@ int main(int argc, char **argv) package = str_dup(argv[optind]); - if (shell) + if (S) return write_shell(package, license_str, year, author, m); char *project_dir; @@ -199,7 +204,7 @@ int main(int argc, char **argv) fs_write("README", templ_README, author, package, package, m, year, package, author, package); - if (flat) + if (f) exit_status = generate_flat(package, author, year, license_str, m); // else