[79c035] | 1 | #ifndef FE_OPT_TAB_H |
---|
| 2 | #define FE_OPT_TAB_H |
---|
[e28fc4] | 3 | |
---|
| 4 | #define LONG_OPTION_RETURN 13 |
---|
| 5 | |
---|
[79c035] | 6 | // Define here which cmd-line options are recognized |
---|
[e28fc4] | 7 | #ifndef FE_OPT_STRUCTURE |
---|
| 8 | extern struct fe_option feOptSpec[]; |
---|
| 9 | #else |
---|
[79c035] | 10 | struct fe_option feOptSpec[] = |
---|
| 11 | { |
---|
| 12 | // |
---|
| 13 | // Has to be of the form |
---|
| 14 | // {name, has_arg, val, |
---|
| 15 | // arg_name, help, type, value, set} |
---|
| 16 | // where: |
---|
| 17 | // |
---|
| 18 | // name is the name of the long option. |
---|
| 19 | // |
---|
| 20 | // has_arg |
---|
| 21 | // is: no_argument (or 0) if the option does not take |
---|
| 22 | // an argument, required_argument (or 1) if the option |
---|
| 23 | // requires an argument, or optional_argument (or 2) |
---|
| 24 | // if the option takes an optional argument. |
---|
| 25 | // |
---|
| 26 | // val is the value to return, or to load into the |
---|
| 27 | // variable pointed to by flag. |
---|
| 28 | // NEEDS TO BE LONG_OPTION_RETURN, for long option |
---|
| 29 | // short option char, for short option |
---|
| 30 | // |
---|
| 31 | // arg_name if set, uses this value as name for argument in |
---|
| 32 | // display of help |
---|
| 33 | // |
---|
| 34 | // help one-line description of option |
---|
| 35 | // |
---|
| 36 | // type one of feOptUntyped (value is never set), |
---|
| 37 | // feOptBool, feOptInt, feOptString |
---|
| 38 | // |
---|
| 39 | // value (default) value of option |
---|
| 40 | // |
---|
| 41 | // set only relevant for feOptString: |
---|
| 42 | // 1: if value different from default value |
---|
| 43 | // 0: otherwise |
---|
| 44 | // |
---|
| 45 | // The order in which options are specified is the order in which |
---|
| 46 | // their help is printed on -h |
---|
| 47 | // |
---|
| 48 | // Options whose hel starts with an "//" are considered undocumented, |
---|
| 49 | // i.e., their help is not printed on -h |
---|
| 50 | // |
---|
| 51 | #if defined(ESINGULAR) || defined(TSINGULAR) |
---|
| 52 | #ifdef ESINGULAR |
---|
| 53 | // options only relevant for ESINGULAR |
---|
| 54 | {"emacs", required_argument, LONG_OPTION_RETURN, |
---|
| 55 | "EMACS", "Use EMACS as emacs program to run Singular", feOptString, 0, 0}, |
---|
| 56 | |
---|
| 57 | {"emacs-dir", required_argument, LONG_OPTION_RETURN, |
---|
| 58 | "DIR", "Use DIR as directory to look for emacs lisp files", feOptString, 0, 0}, |
---|
| 59 | |
---|
| 60 | {"emacs-load", required_argument, LONG_OPTION_RETURN, |
---|
| 61 | "FILE", "Load FILE on emacs start-up, instead of default", feOptString, 0, 0}, |
---|
| 62 | #else |
---|
| 63 | {"xterm", required_argument, LONG_OPTION_RETURN, |
---|
| 64 | "XTERM", "Use XTERM as terminal program to run Singular", feOptString, 0, 0}, |
---|
| 65 | #endif |
---|
| 66 | |
---|
| 67 | {"singular", required_argument, LONG_OPTION_RETURN, |
---|
| 68 | "PROG", "Start PROG as Singular program within emacs", feOptString, 0, 0}, |
---|
| 69 | |
---|
| 70 | {"no-call", no_argument, LONG_OPTION_RETURN, |
---|
| 71 | 0, "Do not start program. Print call to stdout", feOptBool, 0, 0}, |
---|
| 72 | #endif |
---|
| 73 | |
---|
| 74 | {"batch", no_argument, 'b', |
---|
| 75 | 0, "Run in batch mode", feOptBool, 0, 0}, |
---|
| 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 | {"sort", no_argument, 's', |
---|
| 92 | 0, "// Sort NTL results", feOptBool, 0, 0}, |
---|
| 93 | |
---|
| 94 | {"random", required_argument, 'r', |
---|
| 95 | "SEED", "Seed random generator with (integer) SEED", feOptInt, 0, 0}, |
---|
| 96 | |
---|
| 97 | {"no-tty", no_argument, 't', |
---|
| 98 | 0, "Do not redefine the terminal characteristics", feOptBool, 0, 0}, |
---|
| 99 | |
---|
| 100 | {"user-option", required_argument, 'u', |
---|
| 101 | "STRING", "Return STRING on `system(\"--user-option\")'", feOptString, 0, 0}, |
---|
| 102 | |
---|
| 103 | {"version", no_argument, 'v', |
---|
| 104 | 0, "Print extended version and configuration info", feOptUntyped, 0, 0}, |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | {"allow-net", no_argument, LONG_OPTION_RETURN, |
---|
| 108 | 0, "Allow to fetch (html) help pages from the net", feOptBool, 0, 0}, |
---|
| 109 | |
---|
| 110 | {"browser", required_argument, LONG_OPTION_RETURN, |
---|
| 111 | "BROWSER", "Display help in BROWSER (see help.cnf)", feOptString, 0, 0}, |
---|
| 112 | |
---|
| 113 | #ifndef ESINGULAR |
---|
| 114 | {"emacs", no_argument, LONG_OPTION_RETURN, |
---|
| 115 | 0, "Set defaults for running within emacs", feOptBool, 0, 0}, |
---|
| 116 | #endif |
---|
| 117 | |
---|
| 118 | {"no-stdlib", no_argument, LONG_OPTION_RETURN, |
---|
| 119 | 0, "Do not load `standard.lib' on start-up", feOptBool, 0, 0}, |
---|
| 120 | |
---|
| 121 | {"no-rc", no_argument, LONG_OPTION_RETURN, |
---|
| 122 | 0, "Do not execute `.singularrc' file(s) on start-up", feOptBool, 0, 0}, |
---|
| 123 | |
---|
| 124 | {"no-warn", no_argument, LONG_OPTION_RETURN, |
---|
| 125 | 0, "Do not display warning messages", feOptBool, 0, 0}, |
---|
| 126 | |
---|
| 127 | {"no-out", no_argument, LONG_OPTION_RETURN, |
---|
| 128 | 0, "Suppress all output", feOptBool, 0, 0}, |
---|
| 129 | |
---|
| 130 | {"min-time", required_argument, LONG_OPTION_RETURN, |
---|
| 131 | "SECS", "Do not display times smaller than SECS (in seconds)", feOptString, (void*) "0.5", 0}, |
---|
| 132 | |
---|
| 133 | {"MPport", required_argument, LONG_OPTION_RETURN, |
---|
| 134 | "PORT", "Use PORT number for conections", feOptString, 0, 0}, |
---|
| 135 | |
---|
| 136 | {"MPhost", required_argument, LONG_OPTION_RETURN, |
---|
| 137 | "HOST", "Use HOST for connections", feOptString, 0, 0}, |
---|
| 138 | |
---|
| 139 | {"link", required_argument, LONG_OPTION_RETURN, |
---|
| 140 | "LINK", "Use LINK for connections", feOptString, 0, 0}, |
---|
| 141 | |
---|
| 142 | {"ticks-per-sec", required_argument, LONG_OPTION_RETURN, |
---|
| 143 | "TICKS", "Sets unit of timer to TICKS per second", feOptInt, (void*)1, 0}, |
---|
| 144 | |
---|
| 145 | // terminator -- do NOT remove |
---|
| 146 | { 0, 0, 0, 0, 0, feOptInt, 0, 0} |
---|
| 147 | }; |
---|
| 148 | |
---|
| 149 | #endif |
---|
[e28fc4] | 150 | #endif |
---|