64{
66
69
70#ifdef PSINGULAR
71 global_argv0 = argv[0];
72#endif
75 #ifdef HAVE_NTL
76 #if NTL_MAJOR_VERSION>=10
77 #ifdef NTL_THREAD_BOOST
79 #endif
80 #endif
81 #endif
82
83
84 int optc, option_index;
85 const char* errormsg;
88 != EOF)
89 {
90 if (optc == '?' || optc == 0)
91 {
92 fprintf(stderr,
"Use '%s --help' for a complete list of options\n",
feArgv0);
93 exit(1);
94 }
95
98
100
105 else
107
108 if (errormsg)
109 {
111 fprintf(stderr, "Error: Option '--%s' %s\n",
113 else
114 fprintf(stderr, "Error: Option '--%s=%s' %s\n",
116 fprintf(stderr,
"Use '%s --help' for a complete list of options\n",
feArgv0);
117 exit(1);
118 }
119 if (optc == 'h') exit(0);
120 switch(option_index)
121 {
122 case FE_OPT_DUMP_VERSIONTUPLE:
123 exit(0);
124 break;
125 default: ;
126 }
127 }
128
129
130
132 {
133 (printf)(
134" SINGULAR /"
136" Development"
137#endif
138"\n"
139" A Computer Algebra System for Polynomial Computations / version %s\n"
140" 0<\n"
141" by: W. Decker, G.-M. Greuel, G. Pfister, H. Schoenemann \\ %s\n"
142"FB Mathematik der Universitaet, D-67653 Kaiserslautern \\\n"
143, VERSION, VERSION_DATE);
145 {
146 WarnS(
"running in restricted mode:"
147 " shell invocation and links are disallowed");
149 }
150 }
151 else
152 {
155 dup2(1,2);
156
157
158
159 }
161 {
162 int pid=getpid();
164 sprintf(
buf,
"%s.%d",(
char*)
feOptSpec[FE_OPT_LOG].value,pid);
166 }
167
168#ifdef SINGULAR_PYOBJECT_SETUP_H
170#endif
171#ifdef SI_COUNTEDREF_AUTOLOAD
173#endif
175
176
177
178
179
181
182
183
185 {
189 {
191 {
192 Warn(
"Can not open %s", argv[
i]);
193 }
194 else
195 {
198 }
200 }
201 }
202 else
203 {
205 }
206
207
210
211
212
214 {
219
221 {
224 fclose(rc);
226 }
227 }
228
229
231 {
233 char *linkname=(
char*)
feOptValue(FE_OPT_LINK);
234 if((linkname!=
NULL)&&(strcmp(linkname,
"ssi")==0))
235 {
237
238
239 }
240 else
241 {
242 Print(
"** missing arguments: -b requires --link/--MPhost/--MPport\n");
243 return 1;
244 }
245 }
249 return 0;
250}
static const int SW_USE_NTL_SORT
set to 1 to sort factors in a factorization
VAR jmp_buf si_start_jmpbuf
VAR BOOLEAN singular_in_batchmode
void init_signals()
init signal handlers and error handling for libraries: NTL, factory
#define MAKE_DISTRIBUTION
FILE * feFopen(const char *path, const char *mode, char *where, short useWerror, short path_only)
#define LONG_OPTION_RETURN
const char SHORT_OPTS_STRING[]
feOptIndex feGetOptIndex(const char *name)
const char * feSetOptValue(feOptIndex opt, char *optarg)
static void * feOptValue(feOptIndex opt)
EXTERN_VAR struct fe_option feOptSpec[]
int fe_getopt_long(int argc, char *const *argv, const char *options, const struct fe_option *long_options, int *opt_index)
#define optional_argument
char * fe_fgets_dummy(const char *, char *, int)
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
void newBuffer(char *s, feBufferTypes t, procinfo *pi, int lineno)
BOOLEAN newFile(char *fname)
Voice * feInitStdin(Voice *pp)
#define omInitGetBackTrace()
void pyobject_setup()
initialize blackbox support for pyobject; functionilty os autoloaded on demand
int status int void * buf
int ssiBatch(const char *host, const char *port)
int name
New type name for int.
EXTERN_VAR FILE * File_Log
EXTERN_VAR BOOLEAN FE_OPT_NO_SHELL_FLAG
#define omInitRet_2_Info(argv0)