Fix table function assertions to respect offsets.
[pspp] / src / cmdline.c
index cd29b9903de3c0b12230da62b1f4264221fb9c0d..fd4e6c450dc7ab82410b57a0897238f683e5a32f 100644 (file)
@@ -18,6 +18,7 @@
    02111-1307, USA. */
 
 #include <config.h>
+#include "cmdline.h"
 #include <assert.h>
 #include <ctype.h>
 #include <stdio.h>
@@ -40,6 +41,8 @@ static void usage (void);
 
 char *subst_vars (char *);
 
+static int testing_mode=0;
+
 /* Parses the command line specified by ARGC and ARGV as received by
    main(). */
 void
@@ -63,7 +66,7 @@ parse_command_line (int argc, char **argv)
     {"pipe", no_argument, NULL, 'p'},
     {"recon", no_argument, NULL, 'n'},
     {"safer", no_argument, NULL, 's'},
-    {"testing-mode", no_argument, &set_testing_mode, 1},
+    {"testing-mode", no_argument, &testing_mode, 1},
     {"verbose", no_argument, NULL, 'v'},
     {"version", no_argument, NULL, 'V'},
     {0, 0, 0, 0},
@@ -108,7 +111,8 @@ parse_command_line (int argc, char **argv)
          config_path = optarg;
          break;
        case 'f':
-         printf (_("-f not yet implemented\n"));
+         printf(_("%s is not yet implemented."), "-f");
+          putchar('\n');
          break;
        case 'h':
          usage ();
@@ -126,7 +130,8 @@ parse_command_line (int argc, char **argv)
          outp_list_classes ();
          err_hcf (1);
        case 'n':
-         printf (_("-n not yet implemented\n"));
+         printf (_("%s is not yet implemented."),"-n");
+          putchar('\n');
          break;
        case 'o':
          if (!cleared_device_defaults)
@@ -137,13 +142,14 @@ parse_command_line (int argc, char **argv)
          outp_configure_add (optarg);
          break;
        case 'p':
-         printf (_("-p not yet implemented\n"));
+         printf (_("%s is not yet implemented."),"-p");
+          putchar('\n');
          break;
        case 'r':
          no_statrc = 1;
          break;
        case 's':
-         set_safer = 1;
+         make_safe();
          break;
        case 'v':
          err_verbosity++;
@@ -168,11 +174,13 @@ parse_command_line (int argc, char **argv)
        }
     }
 
-  if (set_testing_mode)
+
+  if (testing_mode)
     {
       /* FIXME: Later this option should do some other things, too. */
-      set_viewwidth = 9999;
+      force_long_view();
     }
+    
 
   for (i = optind; i < argc; i++)
     {
@@ -242,8 +250,7 @@ N_("PSPP, a program for statistical analysis of sample data.\n"
 "\n");
 
 /* Message that describes PSPP command-line syntax, continued. */
-static const char post_syntax_message[] = 
-N_("\nReport bugs to <bug-gnu-pspp@gnu.org>.\n");
+static const char post_syntax_message[] = N_("\nReport bugs to <%s>.\n");
 
 /* Writes a syntax description to stdout and terminates. */
 static void
@@ -251,7 +258,7 @@ usage (void)
 {
   printf (gettext (pre_syntax_message), pgmname);
   outp_list_classes ();
-  printf (gettext (post_syntax_message));
+  printf (gettext (post_syntax_message),PACKAGE_BUGREPORT);
 
   err_hcf (1);
 }