feOptTab.h
Go to the documentation of this file.
1 #ifndef FE_OPT_TAB_H
2 #define FE_OPT_TAB_H
3 
4 #define LONG_OPTION_RETURN 13
5 
6 // Define here which cmd-line options are recognized
7 #ifndef FE_OPT_STRUCTURE
9 #else
10 VAR 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
55  "EMACS", "Use EMACS as emacs program to run Singular", feOptString, 0, 0},
56 
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
64  "XTERM", "Use XTERM as terminal program to run Singular", feOptString, 0, 0},
65 #endif
66 
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 (requires --link/--MPhost/--MPport)", 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  {"profile", no_argument, 'p',
90  0, "Collect profiling data in smon.out", feOptBool, 0, 0},
91  {"quiet", no_argument, 'q',
92  0, "Do not print start-up banner and lib load messages", feOptBool, 0, 0},
93  {"sort", no_argument, 's',
94  0, "// Sort NTL results", feOptBool, 0, 0},
95 
96  {"random", required_argument, 'r',
97  "SEED", "Seed random generator with (integer) SEED", feOptInt, 0, 0},
98 
99  {"no-tty", no_argument, 't',
100  0, "Do not redefine the terminal characteristics", feOptBool, 0, 0},
101 
102  {"user-option", required_argument, 'u',
103  "STRING", "Return STRING on `system(\"--user-option\")'", feOptString, 0, 0},
104 
105  {"version", no_argument, 'v',
106  0, "Print extended version and configuration info", feOptUntyped, 0, 0},
107 
108 
109  {"allow-net", no_argument, LONG_OPTION_RETURN,
110  0, "Allow one to fetch (html) help pages from the net", feOptBool, 0, 0},
111 
113  "BROWSER", "Display help in BROWSER (see help.cnf)", feOptString, 0, 0},
114 
116  "CHAR", "Automatic answer for CTRL-C prompt", feOptString, 0, 0},
117 #ifndef ESINGULAR
118  {"emacs", no_argument, LONG_OPTION_RETURN,
119  0, "Set defaults for running within emacs", feOptBool, 0, 0},
120 #endif
121 
122  {"no-stdlib", no_argument, LONG_OPTION_RETURN,
123  0, "Do not load `standard.lib' on start-up", feOptBool, 0, 0},
124 
125  {"no-rc", no_argument, LONG_OPTION_RETURN,
126  0, "Do not execute `.singularrc' file(s) on start-up", feOptBool, 0, 0},
127 
128  {"no-warn", no_argument, LONG_OPTION_RETURN,
129  0, "Do not display warning messages", feOptBool, 0, 0},
130 
131  {"no-out", no_argument, LONG_OPTION_RETURN,
132  0, "Suppress all output", feOptBool, 0, 0},
133 
134  {"no-shell", no_argument, LONG_OPTION_RETURN,
135  0, "Restricted mode: prohibit shell escape commands and links", feOptBool, 0, 0},
136 
138  "SECS", "Do not display times smaller than SECS (in seconds)", feOptString, (void*) "0.5", 0},
139 
141  "#CPUs", "maximal number of CPUs to use", feOptInt, (void*)2, 0},
142 
144  "#threads", "maximal number of CPUs to use for threads", feOptInt, (void*)2, 0},
145 
146 
148  "PORT", "Use PORT number for connections", feOptString, 0, 0},
149 
151  "HOST", "Use HOST for connections", feOptString, 0, 0},
152 
154  "LINK", "Use LINK for connections", feOptString, 0, 0},
155 
156  {"ticks-per-sec", required_argument, LONG_OPTION_RETURN,
157  "TICKS", "Sets unit of timer to TICKS per second", feOptInt, (void*)1, 0},
158 
159  {"dump-versiontuple", no_argument, LONG_OPTION_RETURN,
160  0, "//Display the version-tuple and exit", feOptUntyped, 0, 0},
161 
162 // terminator -- do NOT remove
163  { 0, 0, 0, 0, 0, feOptInt, 0, 0}
164 };
165 
166 #endif
167 #endif
#define optional_argument
Definition: fegetopt.h:101
#define EXTERN_VAR
Definition: globaldefs.h:6
#define VAR
Definition: globaldefs.h:5
#define no_argument
Definition: fegetopt.h:99
#define required_argument
Definition: fegetopt.h:100
EXTERN_VAR struct fe_option feOptSpec[]
Definition: feOptTab.h:8
#define LONG_OPTION_RETURN
Definition: feOptTab.h:4