commit 9b363ff8a0a12476d34b11c9a4bd2acc9ba9d568
parent c3f828e14d1ede27ed548de21f1f25174ecdc0d3
Author: vx_clutch <[email protected]>
Date: Mon, 29 Sep 2025 08:31:41 -0400
Update main.c
Diffstat:
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -48,10 +48,9 @@ int main(int argc, char **argv)
.project = "Project",
};
- parse_standard_options(argc, argv, print_help, emit_version);
+ parse_standard_options(argc, argv, print_help, print_version);
while ((optc = getopt_long(argc, argv, "a:l:E", longopts, NULL)) != -1)
-
switch (optc) {
case 'l':
if (!strcmp(optarg, "list")) {
@@ -107,4 +106,18 @@ Generates an optionated C project.\n",
--author=NAME Set the program author (default git username|system username)\n\
--licence=LICENCE Set the program licence (default BSD)\n",
stdout);
+ exit(exit_status);
+}
+
+/* Print version and copyright information. */
+
+static void print_version()
+{
+ printf("%s %s %d\n", prog_name, VERSION, COMMIT);
+
+ printf("Copyright (C) %d GCK.\n", YEAR);
+
+ puts("This is free software: you are free to change and redistribute it.");
+ puts("There is NO WARRNTY, to the extent permitted by law.");
+ exit(exit_status);
}