/[pspp]/pspp/src/cmdline.c
ViewVC logotype

Diff of /pspp/src/cmdline.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by blp, Sun Jul 31 21:42:46 2005 UTC revision 1.14 by blp, Sun Dec 11 02:48:45 2005 UTC
# Line 52  char *subst_vars (char *); Line 52  char *subst_vars (char *);
52  void  void
53  parse_command_line (int argc, char **argv)  parse_command_line (int argc, char **argv)
54  {  {
   static int testing_mode = 0;  
55    static struct option long_options[] =    static struct option long_options[] =
56    {    {
57      {"algorithm", required_argument, NULL, 'a'},      {"algorithm", required_argument, NULL, 'a'},
# Line 73  parse_command_line (int argc, char **arg Line 72  parse_command_line (int argc, char **arg
72      {"recon", no_argument, NULL, 'n'},      {"recon", no_argument, NULL, 'n'},
73      {"safer", no_argument, NULL, 's'},      {"safer", no_argument, NULL, 's'},
74      {"syntax", required_argument, NULL, 'x'},      {"syntax", required_argument, NULL, 'x'},
75      {"testing-mode", no_argument, &testing_mode, 1},      {"testing-mode", no_argument, NULL, 'T'},
76      {"verbose", no_argument, NULL, 'v'},      {"verbose", no_argument, NULL, 'v'},
77      {"version", no_argument, NULL, 'V'},      {"version", no_argument, NULL, 'V'},
78      {0, 0, 0, 0},      {0, 0, 0, 0},
# Line 81  parse_command_line (int argc, char **arg Line 80  parse_command_line (int argc, char **arg
80    
81    int c, i;    int c, i;
82    
83    int cleared_device_defaults = 0;    bool cleared_device_defaults = false;
84    int no_statrc = 0;    bool no_statrc = false;
85    
86    for (;;)    for (;;)
87      {      {
# Line 168  parse_command_line (int argc, char **arg Line 167  parse_command_line (int argc, char **arg
167            if (!cleared_device_defaults)            if (!cleared_device_defaults)
168              {              {
169                outp_configure_clear ();                outp_configure_clear ();
170                cleared_device_defaults = 1;                cleared_device_defaults = true;
171              }              }
172            outp_configure_add (optarg);            outp_configure_add (optarg);
173            break;            break;
# Line 177  parse_command_line (int argc, char **arg Line 176  parse_command_line (int argc, char **arg
176            putchar('\n');            putchar('\n');
177            break;            break;
178          case 'r':          case 'r':
179            no_statrc = 1;            no_statrc = true;
180            break;            break;
181          case 's':          case 's':
182            make_safe();            set_safer_mode ();
183            break;            break;
184          case 'v':          case 'v':
185            err_verbosity++;            err_verbosity++;
# Line 189  parse_command_line (int argc, char **arg Line 188  parse_command_line (int argc, char **arg
188            puts (version);            puts (version);
189            puts (legal);            puts (legal);
190            err_hcf (1);            err_hcf (1);
191            case 'T':
192              force_long_view ();
193              set_testing_mode (true);
194              break;
195          case '?':          case '?':
196            usage ();            usage ();
197            assert (0);            assert (0);
# Line 199  parse_command_line (int argc, char **arg Line 202  parse_command_line (int argc, char **arg
202          }          }
203      }      }
204    
   
   if (testing_mode)  
     {  
       /* FIXME: Later this option should do some other things, too. */  
       force_long_view();  
       test_mode = 1;  
     }  
       
   
205    for (i = optind; i < argc; i++)    for (i = optind; i < argc; i++)
206      {      {
207        int separate = 1;        int separate = 1;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26