source: git/Singular/feOptTab.h @ 79c035

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