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'}, |
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}, |
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 |
{ |
{ |
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; |
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++; |
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); |
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; |