Changeset dfc60c8 in git


Ignore:
Timestamp:
Sep 26, 2011, 4:49:02 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
e40a0d3ac707fea544d24cf1fc803801d888c70b
Parents:
d9900011c7982ae7ff57a8e17f3071a283577ad5
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-09-26 16:49:02+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:33+01:00
Message:
split feOpt.* to feOptGen.* (to produce feOpt*.inc) and feOpt.* (for Singulars main)
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/feOpt.cc

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

    rd990001 rdfc60c8  
    1616/* specifies format of options */
    1717extern struct fe_option feOptSpec[];
    18 
    19 #ifndef GENERATE_OPTION_INDEX
    2018
    2119/* provides feOptIndex enum type for fast accesses to feOptSpec */
     
    8785#endif /* __cplusplus */
    8886
    89 #endif /* ! GENERATE_OPTION_INDEX */
    90 
    9187#endif /*  FEOPTS_H */
  • libpolys/coeffs/coeffs.h

    rd990001 rdfc60c8  
    4141  n_CF
    4242};
     43
     44extern unsigned short fftable[];
    4345
    4446struct snumber;
Note: See TracChangeset for help on using the changeset viewer.