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