if (file_sep != 0)
sep[0] = file_sep;
outfilephbase = g_strconcat (fullfilebase, sep, "private.h", NULL);
- outfileph = g_strconcat (outfilephbase, no_touch ? "#gob#" : "", NULL);
+ outfileph = g_strconcat (outfilephbase, no_touch_headers ? "#gob#" : "", NULL);
} else {
outfilephbase = NULL;
outfileph = NULL;
}
-
+
if ( ! no_write) {
out = fopen (outfile, "w");
if (out == NULL) {
print_header_postfixes();
}
+static void print_version(void)
+{
+ printf("%s (%s) %s\n", PACKAGE_NAME, PACKAGE_TARNAME, PACKAGE_VERSION);
+ putchar('\n');
+ puts("Copyright (C) 2013 George (Jiri) Lebl et al.");
+ puts("Copyright (C) 2020 Nick Bowler");
+ puts("License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl.html>.");
+ puts("This is free software: you are free to change and redistribute it.");
+ puts("There is NO WARRANTY, to the extent permitted by law.");
+
+}
+
static void print_usage(FILE *f)
{
fprintf(f, "Usage: %s [options] file.gob\n", g_get_prgname());
print_help();
exit(0);
} else if(strcmp(argv[i], "--version")==0) {
- fprintf(stderr, "Gob version %s\n", VERSION);
+ print_version();
exit(0);
} else if(strcmp(argv[i], "--exit-on-warn")==0) {
exit_on_warn = TRUE;
if (outph)
fclose (outph);
- if (! no_write) {
+ if (!no_write) {
if (no_touch) {
- compare_and_move (outfilebase);
+ compare_and_move(outfilebase);
+ }
+ if (no_touch_headers) {
+ compare_and_move(outfilehbase);
if (outfilephbase)
- compare_and_move (outfilephbase);
+ compare_and_move(outfilephbase);
}
- if (no_touch_headers)
- compare_and_move (outfilehbase);
}
-
+
return 0;
}