1 | /**************************************** |
---|
2 | * Computer Algebra System SINGULAR * |
---|
3 | ****************************************/ |
---|
4 | /* $Id: feOpt.cc,v 1.5 1999-09-22 15:42:12 Singular Exp $ */ |
---|
5 | /* |
---|
6 | * ABSTRACT: Implementation of option buisness |
---|
7 | */ |
---|
8 | |
---|
9 | #include "mod2.h" |
---|
10 | #include "feOpt.h" |
---|
11 | |
---|
12 | // Define here which cmd-line options are recognized |
---|
13 | struct fe_option feOptSpec[] = |
---|
14 | { |
---|
15 | // |
---|
16 | // Has to be of the form |
---|
17 | // {name, has_arg, val, |
---|
18 | // arg_name, help, type, value, set} |
---|
19 | // where: |
---|
20 | // |
---|
21 | // name is the name of the long option. |
---|
22 | // |
---|
23 | // has_arg |
---|
24 | // is: no_argument (or 0) if the option does not take |
---|
25 | // an argument, required_argument (or 1) if the option |
---|
26 | // requires an argument, or optional_argument (or 2) |
---|
27 | // if the option takes an optional argument. |
---|
28 | // |
---|
29 | // val is the value to return, or to load into the |
---|
30 | // variable pointed to by flag. |
---|
31 | // NEEDS TO BE LONG_OPTION_RETURN, for long option |
---|
32 | // short option char, for short option |
---|
33 | // |
---|
34 | // arg_name if set, uses this value as name for argument in |
---|
35 | // display of help |
---|
36 | // |
---|
37 | // help one-line description of option |
---|
38 | // |
---|
39 | // type one of feOptUntyped (value is never set), |
---|
40 | // feOptBool, feOptInt, feOptString |
---|
41 | // |
---|
42 | // value (default) value of option |
---|
43 | // |
---|
44 | // set only relevant for feOptString: |
---|
45 | // 1: if value different from default value |
---|
46 | // 0: otherwise |
---|
47 | // |
---|
48 | // The order in which options are specified is the order in which |
---|
49 | // their help is printed on -h |
---|
50 | // |
---|
51 | // Options whose hel starts with an "//" are considered undocumented, |
---|
52 | // i.e., their help is not printed on -h |
---|
53 | // |
---|
54 | #ifdef ESINGULAR |
---|
55 | // options only relevant for ESINGULAR |
---|
56 | {"emacs", required_argument, LONG_OPTION_RETURN, |
---|
57 | "EMACS", "Use EMACS as emacs program to run Singular", feOptString, 0, 0}, |
---|
58 | |
---|
59 | {"emacs-dir", required_argument, LONG_OPTION_RETURN, |
---|
60 | "DIR", "Use DIR as directory to look for emacs lisp files", feOptString, 0, 0}, |
---|
61 | |
---|
62 | {"emacs-load", required_argument, LONG_OPTION_RETURN, |
---|
63 | "FILE", "Load FILE on emacs start-up, instead of default", feOptString, 0, 0}, |
---|
64 | |
---|
65 | {"singular", required_argument, LONG_OPTION_RETURN, |
---|
66 | "PROG", "Start PROG as Singular program within emacs", feOptString, 0, 0}, |
---|
67 | |
---|
68 | {"no-emacs-call", no_argument, LONG_OPTION_RETURN, |
---|
69 | 0, "Do not start emacs. Print emacs-call to stdout", feOptBool, 0, 0}, |
---|
70 | #endif |
---|
71 | |
---|
72 | #ifdef HAVE_MPSR |
---|
73 | {"batch", no_argument, 'b', |
---|
74 | 0, "Run in MP batch mode", feOptBool, 0, 0}, |
---|
75 | #endif |
---|
76 | |
---|
77 | {"execute", required_argument, 'c', |
---|
78 | "STRING", "Execute STRING on start-up", feOptString, 0, 0}, |
---|
79 | |
---|
80 | {"sdb", no_argument, 'd', |
---|
81 | 0, "Enable source code debugger (experimental)", feOptBool, 0, 0}, |
---|
82 | |
---|
83 | {"echo", optional_argument, 'e', |
---|
84 | "VAL", "Set value of variable `echo' to (integer) VAL", feOptInt, 0, 0}, |
---|
85 | |
---|
86 | {"help", no_argument, 'h', |
---|
87 | 0, "Print help message and exit", feOptUntyped, 0, 0}, |
---|
88 | |
---|
89 | {"quiet", no_argument, 'q', |
---|
90 | 0, "Do not print start-up banner and lib load messages", feOptBool, 0, 0}, |
---|
91 | |
---|
92 | {"random", required_argument, 'r', |
---|
93 | "SEED", "Seed random generator with integer (integer) SEED", feOptInt, 0, 0}, |
---|
94 | |
---|
95 | {"no-tty", no_argument, 't', |
---|
96 | 0, "Do not redefine the terminal characteristics", feOptBool, 0, 0}, |
---|
97 | |
---|
98 | {"user-option", required_argument, 'u', |
---|
99 | "STRING", "Return STRING on `system(\"--user-option\")'", feOptString, 0, 0}, |
---|
100 | |
---|
101 | {"version", no_argument, 'v', |
---|
102 | 0, "Print extended version and configuration info", feOptUntyped, 0, 0}, |
---|
103 | |
---|
104 | #ifdef HAVE_TCL |
---|
105 | {"tclmode", no_argument, 'x', |
---|
106 | 0, "Run in TCL mode, i.e., with TCL user interface", feOptBool, 0, 0}, |
---|
107 | #endif |
---|
108 | |
---|
109 | {"allow-net", no_argument, LONG_OPTION_RETURN, |
---|
110 | 0, "Allow to fetch (html) help pages from the net", feOptBool, 0, 0}, |
---|
111 | |
---|
112 | {"browser", required_argument, LONG_OPTION_RETURN, |
---|
113 | "BROWSER", "Display help in BROWSER ([x,tk]info, netscape)", feOptString, 0, 0}, |
---|
114 | |
---|
115 | #ifndef ESINGULAR |
---|
116 | {"emacs", no_argument, LONG_OPTION_RETURN, |
---|
117 | 0, "Set defaults for running within emacs", feOptBool, 0, 0}, |
---|
118 | #endif |
---|
119 | |
---|
120 | {"no-stdlib", no_argument, LONG_OPTION_RETURN, |
---|
121 | 0, "Do not load `standard.lib' on start-up", feOptBool, 0, 0}, |
---|
122 | |
---|
123 | {"no-rc", no_argument, LONG_OPTION_RETURN, |
---|
124 | 0, "Do not execute `.singularrc' file(s) on start-up", feOptBool, 0, 0}, |
---|
125 | |
---|
126 | {"no-warn", no_argument, LONG_OPTION_RETURN, |
---|
127 | 0, "Do not display warning messages", feOptBool, 0, 0}, |
---|
128 | |
---|
129 | {"no-out", no_argument, LONG_OPTION_RETURN, |
---|
130 | 0, "Suppress all output", feOptBool, 0, 0}, |
---|
131 | |
---|
132 | {"min-time", required_argument, LONG_OPTION_RETURN, |
---|
133 | "SECS", "Do not display times smaller than SECS (in seconds)", feOptString, "0.5", 0}, |
---|
134 | |
---|
135 | #ifdef HAVE_MPSR |
---|
136 | {"MPport", required_argument, LONG_OPTION_RETURN, |
---|
137 | "PORT", "Use PORT number for MP conections", feOptString, 0, 0}, |
---|
138 | |
---|
139 | {"MPhost", required_argument, LONG_OPTION_RETURN, |
---|
140 | "HOST", "Use HOST for MP connections", feOptString, 0, 0}, |
---|
141 | #endif |
---|
142 | |
---|
143 | {"ticks-per-sec", required_argument, LONG_OPTION_RETURN, |
---|
144 | "TICKS", "Sets unit of timer to TICKS per second", feOptInt, (void*)1, 0}, |
---|
145 | |
---|
146 | // undocumented options |
---|
147 | #ifdef HAVE_MPSR |
---|
148 | {"MPtransp", required_argument, LONG_OPTION_RETURN, |
---|
149 | "TRANSP", "// Use TRANSP for MP connections", feOptString, 0, 0}, |
---|
150 | |
---|
151 | {"MPmode", required_argument, LONG_OPTION_RETURN, |
---|
152 | "MODE", "// Use MODE for MP connections", feOptString, 0, 0}, |
---|
153 | #endif |
---|
154 | |
---|
155 | // terminator -- do NOT remove |
---|
156 | { 0, 0, 0, 0, 0, feOptInt, 0, 0} |
---|
157 | }; |
---|
158 | |
---|
159 | const char SHORT_OPTS_STRING[] = "bdhqtvxec:r:u:"; |
---|
160 | |
---|
161 | ////////////////////////////////////////////////////////////// |
---|
162 | // |
---|
163 | // Generation of feOptIndex |
---|
164 | // |
---|
165 | #ifdef GENERATE_OPTION_INDEX |
---|
166 | |
---|
167 | #include <stdio.h> |
---|
168 | main() |
---|
169 | { |
---|
170 | FILE* fd; |
---|
171 | #ifdef ESINGULAR |
---|
172 | fd = fopen("feOptES.inc", "w"); |
---|
173 | #else |
---|
174 | fd = fopen("feOpt.inc", "w"); |
---|
175 | #endif |
---|
176 | |
---|
177 | if (fd == NULL) exit(1); |
---|
178 | |
---|
179 | int i = 0; |
---|
180 | |
---|
181 | fputs("typedef enum\n{\n", fd); |
---|
182 | |
---|
183 | while (feOptSpec[i].name != NULL) |
---|
184 | { |
---|
185 | const char* name = feOptSpec[i].name; |
---|
186 | fputs("FE_OPT_", fd); |
---|
187 | while (*name != 0) |
---|
188 | { |
---|
189 | if (*name == '-') |
---|
190 | { |
---|
191 | putc('_', fd); |
---|
192 | } |
---|
193 | else if (*name >= 97 && *name <= 122) |
---|
194 | { |
---|
195 | putc(*name - 32, fd); |
---|
196 | } |
---|
197 | else |
---|
198 | { |
---|
199 | putc(*name, fd); |
---|
200 | } |
---|
201 | name++; |
---|
202 | } |
---|
203 | if (i == 0) |
---|
204 | { |
---|
205 | fputs("=0", fd); |
---|
206 | } |
---|
207 | i++; |
---|
208 | fputs(",\n ", fd); |
---|
209 | } |
---|
210 | |
---|
211 | fprintf(fd, "FE_OPT_UNDEF\n} feOptIndex;\n"); |
---|
212 | fclose(fd); |
---|
213 | exit(0); |
---|
214 | } |
---|
215 | |
---|
216 | #else // ! GENERATE_OPTION_INDEX |
---|
217 | |
---|
218 | /////////////////////////////////////////////////////////////// |
---|
219 | // |
---|
220 | // Getting Values |
---|
221 | // |
---|
222 | |
---|
223 | feOptIndex feGetOptIndex(const char* name) |
---|
224 | { |
---|
225 | int opt = 0; |
---|
226 | |
---|
227 | while (opt != (int) FE_OPT_UNDEF) |
---|
228 | { |
---|
229 | if (strcmp(feOptSpec[opt].name, name) == 0) |
---|
230 | return (feOptIndex) opt; |
---|
231 | opt = opt + 1; |
---|
232 | } |
---|
233 | return FE_OPT_UNDEF; |
---|
234 | } |
---|
235 | |
---|
236 | feOptIndex feGetOptIndex(int optc) |
---|
237 | { |
---|
238 | int opt = 0; |
---|
239 | |
---|
240 | if (optc == LONG_OPTION_RETURN) return FE_OPT_UNDEF; |
---|
241 | |
---|
242 | while (opt != (int) FE_OPT_UNDEF) |
---|
243 | { |
---|
244 | if (feOptSpec[opt].val == optc) |
---|
245 | return (feOptIndex) opt; |
---|
246 | opt = opt + 1; |
---|
247 | } |
---|
248 | return FE_OPT_UNDEF; |
---|
249 | } |
---|
250 | |
---|
251 | /////////////////////////////////////////////////////////////// |
---|
252 | // |
---|
253 | // Setting Values |
---|
254 | // |
---|
255 | static void feOptHelp(const char* name); |
---|
256 | // |
---|
257 | // Return: NULL -- everything ok |
---|
258 | // "error-string" on error |
---|
259 | #ifndef ESINGULAR |
---|
260 | #include "mmemory.h" |
---|
261 | #include "febase.h" |
---|
262 | #include "ipshell.h" |
---|
263 | #include "tok.h" |
---|
264 | #include "sdb.h" |
---|
265 | #include "cntrlc.h" |
---|
266 | #include "timer.h" |
---|
267 | |
---|
268 | #ifdef HAVE_FACTORY |
---|
269 | #define SI_DONT_HAVE_GLOBAL_VARS |
---|
270 | #include <factory.h> |
---|
271 | #endif |
---|
272 | #include <errno.h> |
---|
273 | |
---|
274 | static char* feOptAction(feOptIndex opt); |
---|
275 | char* feSetOptValue(feOptIndex opt, char* optarg) |
---|
276 | { |
---|
277 | if (opt == FE_OPT_UNDEF) return "option undefined"; |
---|
278 | |
---|
279 | if (feOptSpec[opt].type != feOptUntyped) |
---|
280 | { |
---|
281 | if (feOptSpec[opt].type != feOptString) |
---|
282 | { |
---|
283 | if (optarg != NULL) |
---|
284 | { |
---|
285 | errno = 0; |
---|
286 | feOptSpec[opt].value = (void*) strtol(optarg, NULL, 10); |
---|
287 | if (errno) return "invalid integer argument"; |
---|
288 | } |
---|
289 | else |
---|
290 | { |
---|
291 | feOptSpec[opt].value = (void*) 0; |
---|
292 | } |
---|
293 | } |
---|
294 | else |
---|
295 | { |
---|
296 | assume(feOptSpec[opt].type == feOptString); |
---|
297 | if (feOptSpec[opt].set && feOptSpec[opt].value != NULL) |
---|
298 | FreeL(feOptSpec[opt].value); |
---|
299 | if (optarg != NULL) |
---|
300 | feOptSpec[opt].value = mstrdup(optarg); |
---|
301 | else |
---|
302 | feOptSpec[opt].value = NULL; |
---|
303 | feOptSpec[opt].set = 1; |
---|
304 | } |
---|
305 | } |
---|
306 | return feOptAction(opt); |
---|
307 | } |
---|
308 | |
---|
309 | char* feSetOptValue(feOptIndex opt, int optarg) |
---|
310 | { |
---|
311 | if (opt == FE_OPT_UNDEF) return "option undefined"; |
---|
312 | |
---|
313 | if (feOptSpec[opt].type != feOptUntyped) |
---|
314 | { |
---|
315 | if (feOptSpec[opt].type == feOptString) |
---|
316 | return "option value needs to be an integer"; |
---|
317 | |
---|
318 | feOptSpec[opt].value = (void*) optarg; |
---|
319 | } |
---|
320 | return feOptAction(opt); |
---|
321 | } |
---|
322 | |
---|
323 | static char* feOptAction(feOptIndex opt) |
---|
324 | { |
---|
325 | // do some special actions |
---|
326 | switch(opt) |
---|
327 | { |
---|
328 | #ifdef HAVE_MPSR |
---|
329 | case FE_OPT_BATCH: |
---|
330 | if (feOptSpec[FE_OPT_BATCH].value) |
---|
331 | fe_fgets_stdin=fe_fgets_dummy; |
---|
332 | return NULL; |
---|
333 | #endif |
---|
334 | |
---|
335 | case FE_OPT_HELP: |
---|
336 | feOptHelp(feArgv0); |
---|
337 | return NULL; |
---|
338 | |
---|
339 | case FE_OPT_QUIET: |
---|
340 | if (feOptSpec[FE_OPT_QUIET].value) |
---|
341 | verbose &= ~(Sy_bit(0)|Sy_bit(V_LOAD_LIB)); |
---|
342 | else |
---|
343 | verbose |= Sy_bit(V_LOAD_LIB)|Sy_bit(0); |
---|
344 | return NULL; |
---|
345 | |
---|
346 | case FE_OPT_NO_TTY: |
---|
347 | #if defined(HAVE_FEREAD) || defined(HAVE_READLINE) |
---|
348 | if (feOptSpec[FE_OPT_NO_TTY].value) |
---|
349 | fe_fgets_stdin=fe_fgets; |
---|
350 | #endif |
---|
351 | return NULL; |
---|
352 | |
---|
353 | case FE_OPT_SDB: |
---|
354 | if (feOptSpec[FE_OPT_SDB].value) |
---|
355 | sdb_flags = 1; |
---|
356 | else |
---|
357 | sdb_flags = 0; |
---|
358 | return NULL; |
---|
359 | |
---|
360 | case FE_OPT_VERSION: |
---|
361 | printf("Singular for %s version %s (%lu) %s %s\n", |
---|
362 | S_UNAME, S_VERSION1, |
---|
363 | feVersionId,__DATE__,__TIME__); |
---|
364 | printf("with\n"); |
---|
365 | printf(versionString()); |
---|
366 | printf("\n\n"); |
---|
367 | return NULL; |
---|
368 | |
---|
369 | #ifdef HAVE_TCL |
---|
370 | case FE_OPT_TCLMODE: |
---|
371 | if (feOptSpec[FE_OPT_TCLMODE].value) |
---|
372 | { |
---|
373 | tclmode = TRUE; |
---|
374 | fe_fgets_stdin=fe_fgets_tcl; |
---|
375 | verbose|=Sy_bit(V_SHOW_MEM); |
---|
376 | } |
---|
377 | return NULL; |
---|
378 | #endif |
---|
379 | |
---|
380 | case FE_OPT_ECHO: |
---|
381 | si_echo = (int) feOptSpec[FE_OPT_ECHO].value; |
---|
382 | if (si_echo < 0 || si_echo > 9) |
---|
383 | return "argument of option is not in valid range 0..9"; |
---|
384 | return NULL; |
---|
385 | |
---|
386 | case FE_OPT_RANDOM: |
---|
387 | siRandomStart = (unsigned int) feOptSpec[FE_OPT_RANDOM].value; |
---|
388 | #ifdef buildin_rand |
---|
389 | siSeed=siRandomStart; |
---|
390 | #else |
---|
391 | srand((unsigned int)siRandomStart); |
---|
392 | #endif |
---|
393 | #ifdef HAVE_FACTORY |
---|
394 | factoryseed(siRandomStart); |
---|
395 | #endif |
---|
396 | return NULL; |
---|
397 | |
---|
398 | case FE_OPT_EMACS: |
---|
399 | if (feOptSpec[FE_OPT_EMACS].value) |
---|
400 | { |
---|
401 | // print EmacsDir and InfoFile so that Emacs |
---|
402 | // mode can pcik it up |
---|
403 | Warn("EmacsDir: %s", (feResource('e' /*"EmacsDir"*/) != NULL ? |
---|
404 | feResource('e' /*"EmacsDir"*/) : "")); |
---|
405 | Warn("InfoFile: %s", (feResource('i' /*"InfoFile"*/) != NULL ? |
---|
406 | feResource('i' /*"InfoFile"*/) : "")); |
---|
407 | } |
---|
408 | return NULL; |
---|
409 | |
---|
410 | case FE_OPT_NO_WARN: |
---|
411 | if (feOptSpec[FE_OPT_NO_WARN].value) |
---|
412 | feWarn = FALSE; |
---|
413 | else |
---|
414 | feWarn = TRUE; |
---|
415 | return NULL; |
---|
416 | |
---|
417 | case FE_OPT_NO_OUT: |
---|
418 | if (feOptSpec[FE_OPT_NO_OUT].value) |
---|
419 | feOut = FALSE; |
---|
420 | else |
---|
421 | feOut = TRUE; |
---|
422 | return NULL; |
---|
423 | |
---|
424 | case FE_OPT_MIN_TIME: |
---|
425 | { |
---|
426 | double mintime = atof((char*) feOptSpec[FE_OPT_MIN_TIME].value); |
---|
427 | if (mintime <= 0) return "invalid float argument"; |
---|
428 | SetMinDisplayTime(mintime); |
---|
429 | return NULL; |
---|
430 | } |
---|
431 | |
---|
432 | case FE_OPT_BROWSER: |
---|
433 | feHelpBrowser((char*) feOptSpec[FE_OPT_BROWSER].value, 1); |
---|
434 | |
---|
435 | case FE_OPT_TICKS_PER_SEC: |
---|
436 | { |
---|
437 | int ticks = (int) feOptSpec[FE_OPT_TICKS_PER_SEC].value; |
---|
438 | if (ticks <= 0) |
---|
439 | return "integer argument must be larger than 0"; |
---|
440 | SetTimerResolution(ticks); |
---|
441 | return NULL; |
---|
442 | } |
---|
443 | |
---|
444 | default: |
---|
445 | return NULL; |
---|
446 | } |
---|
447 | } |
---|
448 | |
---|
449 | // Prints usage message |
---|
450 | void fePrintOptValues() |
---|
451 | { |
---|
452 | int i = 0; |
---|
453 | |
---|
454 | while (feOptSpec[i].name != 0) |
---|
455 | { |
---|
456 | if (feOptSpec[i].help != NULL && feOptSpec[i].type != feOptUntyped |
---|
457 | #ifndef NDEBUG |
---|
458 | && *(feOptSpec[i].help) != '/' |
---|
459 | #endif |
---|
460 | ) |
---|
461 | { |
---|
462 | if (feOptSpec[i].type == feOptString) |
---|
463 | { |
---|
464 | if (feOptSpec[i].value == NULL) |
---|
465 | { |
---|
466 | Print("// --%-15s\n", feOptSpec[i].name); |
---|
467 | } |
---|
468 | else |
---|
469 | { |
---|
470 | Print("// --%-15s \"%s\"\n", feOptSpec[i].name, (char*) feOptSpec[i].value); |
---|
471 | } |
---|
472 | } |
---|
473 | else |
---|
474 | { |
---|
475 | Print("// --%-15s %d\n", feOptSpec[i].name, feOptSpec[i].value); |
---|
476 | } |
---|
477 | } |
---|
478 | i++; |
---|
479 | } |
---|
480 | } |
---|
481 | |
---|
482 | #endif // ! ESingular |
---|
483 | |
---|
484 | // Prints help message |
---|
485 | static void feOptHelp(const char* name) |
---|
486 | { |
---|
487 | int i = 0; |
---|
488 | char tmp[20]; |
---|
489 | #ifdef ESINGULAR |
---|
490 | printf("ESingular: A Program that starts-up Singular within emacs, for\n"); |
---|
491 | #endif |
---|
492 | printf("Singular version %s -- a CAS for polynomial computations. Usage:\n", S_VERSION1); |
---|
493 | printf(" %s [options] [file1 [file2 ...]]\n", name); |
---|
494 | printf("Options:\n"); |
---|
495 | |
---|
496 | while (feOptSpec[i].name != 0) |
---|
497 | { |
---|
498 | if (feOptSpec[i].help != NULL |
---|
499 | #ifdef NDEBUG |
---|
500 | && *(feOptSpec[i].help) != '/' |
---|
501 | #endif |
---|
502 | ) |
---|
503 | { |
---|
504 | if (feOptSpec[i].has_arg > 0) |
---|
505 | { |
---|
506 | if (feOptSpec[i].has_arg > 1) |
---|
507 | sprintf(tmp, "%s[=%s]", feOptSpec[i].name, feOptSpec[i].arg_name); |
---|
508 | else |
---|
509 | sprintf(tmp, "%s=%s", feOptSpec[i].name, feOptSpec[i].arg_name); |
---|
510 | |
---|
511 | printf(" %c%c --%-19s %s\n", |
---|
512 | (feOptSpec[i].val != 0 ? '-' : ' '), |
---|
513 | (feOptSpec[i].val != 0 ? feOptSpec[i].val : ' '), |
---|
514 | tmp, |
---|
515 | feOptSpec[i].help); |
---|
516 | } |
---|
517 | else |
---|
518 | { |
---|
519 | printf(" %c%c --%-19s %s\n", |
---|
520 | (feOptSpec[i].val != 0 ? '-' : ' '), |
---|
521 | (feOptSpec[i].val != 0 ? feOptSpec[i].val : ' '), |
---|
522 | feOptSpec[i].name, |
---|
523 | feOptSpec[i].help); |
---|
524 | } |
---|
525 | } |
---|
526 | i++; |
---|
527 | } |
---|
528 | |
---|
529 | printf("\nFor more information, type `help;' from within Singular or visit\n"); |
---|
530 | printf("http://www.mathematik.uni-kl.de/~zca/Singular or consult the\n"); |
---|
531 | printf("Singular manual (available as on-line info or printed manual).\n"); |
---|
532 | } |
---|
533 | |
---|
534 | |
---|
535 | |
---|
536 | #endif // GENERATE_OPTION_INDEX |
---|