-
-
-/* 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 gboolean
-parse_command_line (int *argc, char ***argv, gchar **filename,
- gboolean *show_splash, GError **err)
-{
-
- static struct option long_options[] =
- {
- {"help", no_argument, NULL, 'h'},
- {"version", no_argument, NULL, 'V'},
- {"no-splash", no_argument, NULL, 'q'},
- {0, 0, 0, 0},
- };
-
- int c;
-
- for (;;)
- {
- c = getopt_long (*argc, *argv, "hVq", long_options, NULL);
- if (c == -1)
- break;
-
- switch (c)
- {
- case 'h':
- g_print ("Usage: psppire {|--help|--version|--no-splash}\n");
- return FALSE;
- case 'V':
- g_print (version);
- g_print ("\n");
- g_print (legal);
- return FALSE;
- case 'q':
- *show_splash = FALSE;
- break;
- default:
- return FALSE;
- }
- }
-
- if ( optind < *argc)
- {
- *filename = (*argv)[optind];
- }
-
- return TRUE;
-}