8 static const char *progname = "cdecl99";
9 static const char sopts[] = "VH";
10 static const struct option lopts[] = {
11 { "version", 0, NULL, 'V' },
12 { "help", 0, NULL, 'H' },
16 static void print_version(void)
19 puts("Copyright (C) 2011 Nick Bowler.");
20 puts("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.");
21 puts("This is free software: you are free to change and redistribute it.");
22 puts("There is NO WARRANTY, to the extent permitted by law.");
25 static void print_usage(FILE *f)
27 fprintf(f, "Usage: %s [options]\n", progname);
30 static void print_help(void)
33 puts("Detailed help coming soon.");
41 for (char *line; (line = readline("> ")); free(line)) {
42 decl = cdecl_parse_decl(line);
49 int main(int argc, char **argv)
56 while ((opt = getopt_long(argc, argv, sopts, lopts, NULL)) != -1) {