Changeset a8b8d03 in git
- Timestamp:
- Sep 26, 2011, 6:54:56 PM (12 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 69ad7eed9ae02d904a01c114ac5b581e8cd9483e
- Parents:
- e28fc4dcf9961f7516bf9990207b4289f8c9a627
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-09-26 18:54:56+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:34+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/feOptGen.cc
re28fc4 ra8b8d03 17 17 18 18 #include "fehelp.h" 19 20 // Define here which cmd-line options are recognized21 struct fe_option feOptSpec[] =22 {23 //24 // Has to be of the form25 // {name, has_arg, val,26 // arg_name, help, type, value, set}27 // where:28 //29 // name is the name of the long option.30 //31 // has_arg32 // is: no_argument (or 0) if the option does not take33 // an argument, required_argument (or 1) if the option34 // requires an argument, or optional_argument (or 2)35 // if the option takes an optional argument.36 //37 // val is the value to return, or to load into the38 // variable pointed to by flag.39 // NEEDS TO BE LONG_OPTION_RETURN, for long option40 // short option char, for short option41 //42 // arg_name if set, uses this value as name for argument in43 // display of help44 //45 // help one-line description of option46 //47 // type one of feOptUntyped (value is never set),48 // feOptBool, feOptInt, feOptString49 //50 // value (default) value of option51 //52 // set only relevant for feOptString:53 // 1: if value different from default value54 // 0: otherwise55 //56 // The order in which options are specified is the order in which57 // their help is printed on -h58 //59 // Options whose hel starts with an "//" are considered undocumented,60 // i.e., their help is not printed on -h61 //62 #if defined(ESINGULAR) || defined(TSINGULAR)63 #ifdef ESINGULAR64 // options only relevant for ESINGULAR65 {"emacs", required_argument, LONG_OPTION_RETURN,66 "EMACS", "Use EMACS as emacs program to run Singular", feOptString, 0, 0},67 68 {"emacs-dir", required_argument, LONG_OPTION_RETURN,69 "DIR", "Use DIR as directory to look for emacs lisp files", feOptString, 0, 0},70 71 {"emacs-load", required_argument, LONG_OPTION_RETURN,72 "FILE", "Load FILE on emacs start-up, instead of default", feOptString, 0, 0},73 #else74 {"xterm", required_argument, LONG_OPTION_RETURN,75 "XTERM", "Use XTERM as terminal program to run Singular", feOptString, 0, 0},76 #endif77 78 {"singular", required_argument, LONG_OPTION_RETURN,79 "PROG", "Start PROG as Singular program within emacs", feOptString, 0, 0},80 81 {"no-call", no_argument, LONG_OPTION_RETURN,82 0, "Do not start program. Print call to stdout", feOptBool, 0, 0},83 #endif84 85 {"batch", no_argument, 'b',86 0, "Run in batch mode", feOptBool, 0, 0},87 88 {"execute", required_argument, 'c',89 "STRING", "Execute STRING on start-up", feOptString, 0, 0},90 91 {"sdb", no_argument, 'd',92 0, "Enable source code debugger (experimental)", feOptBool, 0, 0},93 94 {"echo", optional_argument, 'e',95 "VAL", "Set value of variable `echo' to (integer) VAL", feOptInt, 0, 0},96 97 {"help", no_argument, 'h',98 0, "Print help message and exit", feOptUntyped, 0, 0},99 100 {"quiet", no_argument, 'q',101 0, "Do not print start-up banner and lib load messages", feOptBool, 0, 0},102 {"sort", no_argument, 's',103 0, "// Sort NTL results", feOptBool, 0, 0},104 105 {"random", required_argument, 'r',106 "SEED", "Seed random generator with (integer) SEED", feOptInt, 0, 0},107 108 {"no-tty", no_argument, 't',109 0, "Do not redefine the terminal characteristics", feOptBool, 0, 0},110 111 {"user-option", required_argument, 'u',112 "STRING", "Return STRING on `system(\"--user-option\")'", feOptString, 0, 0},113 114 {"version", no_argument, 'v',115 0, "Print extended version and configuration info", feOptUntyped, 0, 0},116 117 118 {"allow-net", no_argument, LONG_OPTION_RETURN,119 0, "Allow to fetch (html) help pages from the net", feOptBool, 0, 0},120 121 {"browser", required_argument, LONG_OPTION_RETURN,122 "BROWSER", "Display help in BROWSER (see help.cnf)", feOptString, 0, 0},123 124 #ifndef ESINGULAR125 {"emacs", no_argument, LONG_OPTION_RETURN,126 0, "Set defaults for running within emacs", feOptBool, 0, 0},127 #endif128 129 {"no-stdlib", no_argument, LONG_OPTION_RETURN,130 0, "Do not load `standard.lib' on start-up", feOptBool, 0, 0},131 132 {"no-rc", no_argument, LONG_OPTION_RETURN,133 0, "Do not execute `.singularrc' file(s) on start-up", feOptBool, 0, 0},134 135 {"no-warn", no_argument, LONG_OPTION_RETURN,136 0, "Do not display warning messages", feOptBool, 0, 0},137 138 {"no-out", no_argument, LONG_OPTION_RETURN,139 0, "Suppress all output", feOptBool, 0, 0},140 141 {"min-time", required_argument, LONG_OPTION_RETURN,142 "SECS", "Do not display times smaller than SECS (in seconds)", feOptString, (void*) "0.5", 0},143 144 {"MPport", required_argument, LONG_OPTION_RETURN,145 "PORT", "Use PORT number for conections", feOptString, 0, 0},146 147 {"MPhost", required_argument, LONG_OPTION_RETURN,148 "HOST", "Use HOST for connections", feOptString, 0, 0},149 150 {"link", required_argument, LONG_OPTION_RETURN,151 "LINK", "Use LINK for connections", feOptString, 0, 0},152 153 #ifdef HAVE_MPSR154 {"MPrsh", required_argument, LONG_OPTION_RETURN,155 "RSH", "Use RSH for MP connections", feOptString, 0, 0},156 #endif157 158 {"ticks-per-sec", required_argument, LONG_OPTION_RETURN,159 "TICKS", "Sets unit of timer to TICKS per second", feOptInt, (void*)1, 0},160 161 // undocumented options162 #ifdef HAVE_MPSR163 {"MPtransp", required_argument, LONG_OPTION_RETURN,164 "TRANSP", "// Use TRANSP for MP connections", feOptString, 0, 0},165 166 {"MPmode", required_argument, LONG_OPTION_RETURN,167 "MODE", "// Use MODE for MP connections", feOptString, 0, 0},168 #endif169 170 // terminator -- do NOT remove171 { 0, 0, 0, 0, 0, feOptInt, 0, 0}172 };173 19 174 20 const char SHORT_OPTS_STRING[] = "bdhqstvxec:r:u:";
Note: See TracChangeset
for help on using the changeset viewer.