13 #include "factory/factory.h" 15 #define FE_OPT_STRUCTURE 18 #if !defined(GENERATE_OPTION_INDEX) && !defined(ESINGULAR) && !defined(TSINGULAR) 32 #ifdef GENERATE_OPTION_INDEX 41 fd = fopen(
"feOptES.xx",
"w");
42 #elif defined(TSINGULAR) 43 fd = fopen(
"feOptTS.xx",
"w");
45 fd = fopen(
"feOpt.xx",
"w");
48 if (fd ==
NULL) exit(1);
52 fputs(
"typedef enum\n{\n", fd);
64 else if (*name >= 97 && *name <= 122)
82 fprintf(fd,
"FE_OPT_UNDEF\n} feOptIndex;\n");
85 rename(
"feOptES.xx",
"feOptES.inc");
86 #elif defined(TSINGULAR) 87 rename(
"feOptTS.xx",
"feOptTS.inc");
89 rename(
"feOpt.xx",
"feOpt.inc");
94 #else // ! GENERATE_OPTION_INDEX 107 if (strcmp(
feOptSpec[opt].name, name) == 0)
136 #if !defined(ESINGULAR) && !defined(TSINGULAR) 162 if (errno)
return "invalid integer argument";
191 return "option value needs to be an integer";
247 if (si_echo < 0 || si_echo > 9)
248 return "argument of option is not in valid range 0..9";
284 case FE_OPT_MIN_TIME:
287 if (mintime <= 0)
return "invalid float argument";
295 case FE_OPT_TICKS_PER_SEC:
297 int ticks = (int) ((
long)(
feOptSpec[FE_OPT_TICKS_PER_SEC].
value));
299 return "integer argument must be larger than 0";
304 case FE_OPT_DUMP_VERSIONTUPLE:
348 #endif // ! ESingular 355 #if defined(ESINGULAR) 356 printf(
"ESingular starts up Singular within emacs;\n");
357 #elif defined(TSINGULAR) 358 printf(
"TSingular starts up Singular within a terminal window;\n");
360 printf(
"Singular is a Computer Algebra System (CAS) for Polynomial Computations.\n");
361 printf(
"Usage: %s [options] [file1 [file2 ...]]\n", name);
362 printf(
"Options:\n");
379 printf(
" %c%c --%-20s %s\n",
387 printf(
" %c%c --%-20s %s\n",
397 printf(
"\nFor more information, type `help;' from within Singular or visit\n");
398 printf(
"http://www.singular.uni-kl.de or consult the\n");
399 printf(
"Singular manual (available as on-line info or html manual).\n");
407 #endif // GENERATE_OPTION_INDEX
const char * feHelpBrowser(char *which, int warn)
const CanonicalForm int s
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
void factoryseed(int s)
random seed initializer
int main(int argc, char *argv[])
static char * feResource(feResourceConfig config, int warn)
char * fe_fgets(const char *pr, char *s, int size)
char * fe_fgets_dummy(const char *, char *, int)
const char * feSetOptValue(feOptIndex opt, char *optarg)
static const char * feOptAction(feOptIndex opt)
void feOptDumpVersionTuple(void)
void SetTimerResolution(int res)
struct fe_option feOptSpec[]
char name(const Variable &v)
void SetMinDisplayTime(double mtime)
#define LONG_OPTION_RETURN
void feOptHelp(const char *name)
feOptIndex feGetOptIndex(const char *name)
const char SHORT_OPTS_STRING[]