+
+/* Parses the command line specified by ARGC and ARGV as received by
+ main(). Returns true if normal execution should proceed,
+ false if the command-line indicates that PSPP should exit. */
+static bool
+parse_command_line (int *argc, char ***argv)
+{
+ static struct option long_options[] =
+ {
+ {"help", no_argument, NULL, 'h'},
+ {"version", no_argument, NULL, 'V'},
+ {0, 0, 0, 0},
+ };
+
+ int c;
+
+ for (;;)
+ {
+ c = getopt_long (*argc, *argv, "hV", long_options, NULL);
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case 'h':
+ puts("Usage: ./psppire\nMust be run from the directory containing psppire.glade");
+ return false;
+ case 'V':
+ puts (version);
+ puts (legal);
+ return false;
+ default:
+ assert (0);
+ }
+ }
+
+ return true;
+}