1 | /* -*-c++-*- */ |
---|
2 | /******************************************************************* |
---|
3 | * Computer Algebra System SINGULAR |
---|
4 | * |
---|
5 | * mod2.h: Main configuration file for Singular |
---|
6 | * DO NOT EDIT! |
---|
7 | * |
---|
8 | * Version: $Id: mod2.h.in,v 1.84 2000-08-14 12:56:39 obachman Exp $ |
---|
9 | *******************************************************************/ |
---|
10 | #ifndef MOD2_H |
---|
11 | #define MOD2_H |
---|
12 | |
---|
13 | /******************************************************************* |
---|
14 | * Defines which are set by configure |
---|
15 | ******************************************************************/ |
---|
16 | /* Define to use dynamic linking */ |
---|
17 | #undef HAVE_DL |
---|
18 | /* Define to use readline lib for fancy display */ |
---|
19 | #undef HAVE_READLINE |
---|
20 | /* Define if you want to use dld's */ |
---|
21 | #undef HAVE_DLD |
---|
22 | /* Define to have dbm links */ |
---|
23 | #undef HAVE_DBM |
---|
24 | /* Define to have smallgmp */ |
---|
25 | #undef HAVE_SMALLGMP |
---|
26 | /* Define to have MP links */ |
---|
27 | #undef HAVE_MPSR |
---|
28 | /* Define to have factory functionality added */ |
---|
29 | #undef HAVE_FACTORY |
---|
30 | /* Define to have libfac functionality added */ |
---|
31 | #undef HAVE_LIBFAC_P |
---|
32 | /* Define if you have stdc headers */ |
---|
33 | #undef STDC_HEADERS |
---|
34 | /* Define if you have asm/sigcontext.h */ |
---|
35 | #undef HAVE_ASM_SIGCONTEXT_H |
---|
36 | /* Define if you have sys/file.h */ |
---|
37 | #undef HAVE_SYS_FILE_H |
---|
38 | /* Define if you have sys/stat.h */ |
---|
39 | #undef HAVE_SYS_STAT_H |
---|
40 | /* Define if you have sys/param.h */ |
---|
41 | #undef HAVE_SYS_PARAM_H |
---|
42 | /* Define if you have sys/file.h */ |
---|
43 | #undef HAVE_SYS_TYPES_H |
---|
44 | /* Define if you have sys/ioctl.h */ |
---|
45 | #undef HAVE_SYS_IOCTL_H |
---|
46 | /* Define if you have sys/time.h */ |
---|
47 | #undef HAVE_SYS_TIME_H |
---|
48 | /* Define if you have sys/times.h */ |
---|
49 | #undef HAVE_SYS_TIMES_H |
---|
50 | /* io header: */ |
---|
51 | /* Define if you have termcap.h */ |
---|
52 | #undef HAVE_TERMCAP_H |
---|
53 | /* Define if you have termios.h */ |
---|
54 | #undef HAVE_TERMIOS_H |
---|
55 | /* Define if you have term.h */ |
---|
56 | #undef HAVE_TERM_H |
---|
57 | /* Define if you have readline/history.h */ |
---|
58 | #undef HAVE_READLINE_HISTORY_H |
---|
59 | /* Define if readline/readline.h is ok */ |
---|
60 | #undef READLINE_READLINE_H_OK |
---|
61 | /* Define if time.h and sys/time.h can be included at the same time */ |
---|
62 | #undef TIME_WITH_SYS_TIME |
---|
63 | /* Define if you have alloca.h */ |
---|
64 | #undef HAVE_ALLOCA_H |
---|
65 | /* Define if you have pwd.h */ |
---|
66 | #undef HAVE_PWD_H |
---|
67 | /* Define if you have unistd.h */ |
---|
68 | #undef HAVE_UNISTD_H |
---|
69 | /* define if you have malloc.h */ |
---|
70 | #undef HAVE_MALLOC_H |
---|
71 | /* define if you have pwd.h*/ |
---|
72 | #undef HAVE_PWD_H |
---|
73 | /* Define if you have alloca */ |
---|
74 | #undef HAVE_ALLOCA |
---|
75 | /* Define if you have getpagesize */ |
---|
76 | #undef GETPAGESIZE |
---|
77 | /* Define if you have vprintf */ |
---|
78 | #undef HAVE_VPRINTF |
---|
79 | /* Define if you have gettimeofday */ |
---|
80 | #undef HAVE_GETTIMEOFDAY |
---|
81 | /* Define if you have atexit */ |
---|
82 | #undef HAVE_ATEXIT |
---|
83 | /* Define if you have bcopy, bzero and bcmp |
---|
84 | Linux needs that define! */ |
---|
85 | #undef HAVE_BCOPY |
---|
86 | /* Define if sprintf does not return number of printed chars */ |
---|
87 | #undef BSD_SPRINTF |
---|
88 | /* define if you have explicit C++ constructors */ |
---|
89 | #undef HAVE_EXPLICIT_CONSTR |
---|
90 | /* Define if you have the getcwd function. */ |
---|
91 | #undef HAVE_GETCWD |
---|
92 | /* Define if you have the getwd function. */ |
---|
93 | #undef HAVE_GETWD |
---|
94 | /* Define if you have snprintf */ |
---|
95 | #undef HAVE_VSNPRINTF |
---|
96 | /* Define if you have readlink */ |
---|
97 | #undef HAVE_READLINK |
---|
98 | /* Define if you have usleep */ |
---|
99 | #undef HAVE_USLEEP |
---|
100 | /* Define if you have sleep */ |
---|
101 | #undef HAVE_SLEEP |
---|
102 | /* Define if you have setenv */ |
---|
103 | #undef HAVE_SETENV |
---|
104 | /* Define if you have petpwnam */ |
---|
105 | #undef HAVE_GETPWNAM |
---|
106 | /* Define sizeof(char) */ |
---|
107 | #define SIZEOF_CHAR 1 |
---|
108 | /* Define sizeof(short) */ |
---|
109 | #define SIZEOF_SHORT 2 |
---|
110 | /* Define sizeof(int) */ |
---|
111 | #define SIZEOF_INT 4 |
---|
112 | /* Define sizeof(long) */ |
---|
113 | #define SIZEOF_LONG 4 |
---|
114 | /* Define sizeof(void*) */ |
---|
115 | #define SIZEOF_VOIDP 4 |
---|
116 | /* Define sizeof(double) */ |
---|
117 | #define SIZEOF_DOUBLE 8 |
---|
118 | /* Define if your integer format is big endian */ |
---|
119 | #undef WORDS_BIGENDIAN |
---|
120 | /* Define the type of the exponents to be used in monomials */ |
---|
121 | #define EXPONENT_TYPE short |
---|
122 | /* Define the size of exponent */ |
---|
123 | #define SIZEOF_EXPONENT SIZEOF_SHORT |
---|
124 | /* Define major version of Singular -- should be set in ../configure.in!!!*/ |
---|
125 | #define SINGULAR_MAJOR_VERSION 0 |
---|
126 | /* Define minor version of Singular -- should be set in ../configure.in!!! */ |
---|
127 | #define SINGULAR_MINOR_VERSION 0 |
---|
128 | /* Define sub version of Singular -- should be set in ../configure.in!!! */ |
---|
129 | #define SINGULAR_SUB_VERSION 0 |
---|
130 | /* Define version as a string */ |
---|
131 | #define S_VERSION1 "" |
---|
132 | /* Define version date as a string */ |
---|
133 | #define S_VERSION2 "" |
---|
134 | /* Define uname identifier as a string */ |
---|
135 | #define S_UNAME "" |
---|
136 | /* Absolute pathname of root directory of Singular source */ |
---|
137 | #define S_ROOT_DIR "" |
---|
138 | |
---|
139 | /******************************************************************* |
---|
140 | * Defines which are not set by configure |
---|
141 | ******************************************************************/ |
---|
142 | /* define to use the dynamic linking of readline in non-distributions builds */ |
---|
143 | /* #undef USE_STATIC_RL */ |
---|
144 | |
---|
145 | /* Default value for timer resolution in ticks per second */ |
---|
146 | /* set to 10 for resolution of tenth of a second, etc */ |
---|
147 | #define TIMER_RESOLUTION 1 |
---|
148 | |
---|
149 | /* Undefine to disable the quote/eval of expressions */ |
---|
150 | #define SIQ 1 |
---|
151 | |
---|
152 | /* Define to enable TCL interface */ |
---|
153 | #undef HAVE_TCL |
---|
154 | |
---|
155 | /* Undefine to disable Gerhard's and Wilfried's fast and dirty std computations */ |
---|
156 | #define FAST_AND_DIRTY |
---|
157 | #ifdef __MWERKS__ |
---|
158 | /* includes for Metrowerks */ |
---|
159 | #include "mod2.mwerks.h" |
---|
160 | #else |
---|
161 | /* works around a quirk in the generation of parser tables */ |
---|
162 | #define INIT_BUG |
---|
163 | #endif |
---|
164 | |
---|
165 | /* linear algebra extensions from pcv.h/pcv.cc */ |
---|
166 | #define HAVE_PCV 1 |
---|
167 | |
---|
168 | /* Define to use old mechanismen for saving currRing with procedures |
---|
169 | * Does not work with HAVE_NAMESPACES enabled |
---|
170 | */ |
---|
171 | #undef USE_IILOCALRING |
---|
172 | |
---|
173 | /* Define to use new namespaces techniks */ |
---|
174 | #undef HAVE_NAMESPACES |
---|
175 | |
---|
176 | /* Define to enable dynamic module code */ |
---|
177 | #undef HAVE_DYNAMIC_LOADING |
---|
178 | |
---|
179 | /* Define to use scanner when loading libraries */ |
---|
180 | #define HAVE_LIBPARSER |
---|
181 | |
---|
182 | /*#define PROFILING*/ |
---|
183 | #ifdef PROFILING |
---|
184 | #define PROFILER ,0,0 |
---|
185 | #else |
---|
186 | #define PROFILER |
---|
187 | #endif |
---|
188 | |
---|
189 | /* Define to use gmp for rational arithmetic */ |
---|
190 | #define HAVE_GMP |
---|
191 | |
---|
192 | /******************************************************************* |
---|
193 | * Evaluate the set defines |
---|
194 | ******************************************************************/ |
---|
195 | /* dynamic readline or readline ? */ |
---|
196 | #ifdef HAVE_DL |
---|
197 | #if !defined(USE_STATIC_RL) |
---|
198 | #define HAVE_DYN_RL |
---|
199 | #endif |
---|
200 | #endif |
---|
201 | |
---|
202 | /* FGLM needs factory */ |
---|
203 | #ifdef HAVE_FACTORY |
---|
204 | #define HAVE_FGLM |
---|
205 | #endif |
---|
206 | |
---|
207 | /* Define if you want fglm for homogeneous case */ |
---|
208 | #ifdef HAVE_FGLM |
---|
209 | #undef HAVE_FGLM_HOME |
---|
210 | #endif |
---|
211 | |
---|
212 | /* Spectrum needs GMP */ |
---|
213 | #ifdef HAVE_GMP |
---|
214 | /* #define HAVE_SPECTRUM */ |
---|
215 | #endif |
---|
216 | |
---|
217 | /* Undefine to disable real time measurments */ |
---|
218 | #ifdef HAVE_GETTIMEOFDAY |
---|
219 | #if ! defined(__MWERKS__) && ! defined(MSDOS) |
---|
220 | #define HAVE_RTIMER |
---|
221 | #else |
---|
222 | #undef HAVE_RTIMER |
---|
223 | #endif |
---|
224 | #endif |
---|
225 | |
---|
226 | #if SIZEOF_VOIDP == 8 |
---|
227 | /* SIZEOF_LONG == SIZEOF_VOIDP is guaranteed by configure */ |
---|
228 | #define ALIGN_8 |
---|
229 | #define LOG_SIZEOF_LONG 3 |
---|
230 | #define LOG_SIZEOF_VOIDP 3 |
---|
231 | #else |
---|
232 | #define LOG_SIZEOF_LONG 2 |
---|
233 | #define LOG_SIZEOF_VOIDP 2 |
---|
234 | #endif |
---|
235 | |
---|
236 | #ifndef CHAR_BIT |
---|
237 | #define CHAR_BIT 8 |
---|
238 | #endif |
---|
239 | |
---|
240 | #define BIT_SIZEOF_LONG CHAR_BIT*SIZEOF_LONG |
---|
241 | |
---|
242 | #define SINGULAR_VERSION (SINGULAR_MAJOR_VERSION*1000 + SINGULAR_MINOR_VERSION*100 + SINGULAR_SUB_VERSION) |
---|
243 | |
---|
244 | #if SIZEOF_EXPONENT == 1 |
---|
245 | #define MAX_EXPONENT 0x7f |
---|
246 | #define MAX_COMPONENT 0xff |
---|
247 | #elif SIZEOF_EXPONENT == 2 |
---|
248 | #define MAX_EXPONENT 0x7fff |
---|
249 | #define MAX_COMPONENT 0xffff |
---|
250 | #else /* SIZEOF_EXPONENT == 4 */ |
---|
251 | #define MAX_EXPONENT 0x7fffffff |
---|
252 | #define MAX_COMPONENT 0xffffffff |
---|
253 | #endif |
---|
254 | |
---|
255 | /******************************************************************* |
---|
256 | * Miscellanous Defines |
---|
257 | ******************************************************************/ |
---|
258 | /* Under HPUX 9, system(...) returns -1 if SIGCHLD does not equal |
---|
259 | SIG_DFL. However, if it stays at SIG_DFL we get zombie processes |
---|
260 | for terminated childs generated by fork. Therefors some special treatment |
---|
261 | is necessary */ |
---|
262 | #ifdef HPUX_9 |
---|
263 | #include <stdlib.h> |
---|
264 | #define system hpux9_system |
---|
265 | #ifdef __cplusplus |
---|
266 | extern "C" { |
---|
267 | #endif |
---|
268 | int hpux9_system(const char* system); |
---|
269 | #ifdef __cplusplus |
---|
270 | } |
---|
271 | #endif |
---|
272 | #endif |
---|
273 | |
---|
274 | #ifndef HAVE_LIBPARSER |
---|
275 | # undef YYLPDEBUG |
---|
276 | #else |
---|
277 | # define YYLPDEBUG 1 |
---|
278 | #endif |
---|
279 | |
---|
280 | #ifndef FALSE |
---|
281 | #define FALSE 0 |
---|
282 | #endif |
---|
283 | |
---|
284 | #ifndef TRUE |
---|
285 | #define TRUE 1 |
---|
286 | #endif |
---|
287 | |
---|
288 | #ifndef NULL |
---|
289 | #define NULL (0) |
---|
290 | #endif |
---|
291 | |
---|
292 | #ifndef SEEK_END |
---|
293 | #define SEEK_END 2 |
---|
294 | #endif |
---|
295 | |
---|
296 | #ifndef SEEK_SET |
---|
297 | #define SEEK_SET 0 |
---|
298 | #endif |
---|
299 | |
---|
300 | #define HALT() m2_end(2) |
---|
301 | |
---|
302 | #define memcpy4 memcpy |
---|
303 | |
---|
304 | /* define OLD_RES for res/sres/mres(i,j,k) */ |
---|
305 | #undef OLD_RES |
---|
306 | |
---|
307 | /* the maximal ascii length of an int number + 1 = 11 for 32 bit int */ |
---|
308 | #define MAX_INT_LEN 11 |
---|
309 | #define MAX_INT_VAL 0x7fffffff |
---|
310 | extern int pShortOut; |
---|
311 | |
---|
312 | #ifdef DO_PROFILE |
---|
313 | /* define to enable explicit profiling of some crucial inline |
---|
314 | * routines and defines */ |
---|
315 | #undef DO_DEEP_PROFILE |
---|
316 | #endif |
---|
317 | |
---|
318 | #define buildin_rand 1 |
---|
319 | |
---|
320 | /* define to enable assume */ |
---|
321 | #ifndef HAVE_ASSUME |
---|
322 | #undef HAVE_ASSUME |
---|
323 | #endif |
---|
324 | |
---|
325 | |
---|
326 | /******************************************************************* |
---|
327 | * DEBUG OPTIONS |
---|
328 | * -- only significant for for compiling without -DNDEBUG |
---|
329 | * -- you better know what your are doing, if you touch this |
---|
330 | ******************************************************************/ |
---|
331 | #ifndef NDEBUG |
---|
332 | |
---|
333 | /* undefine to disable assume -- should normally be defined for NDEBUG */ |
---|
334 | #define HAVE_ASSUME |
---|
335 | |
---|
336 | /* undef PDEBUG to disable checks of polys |
---|
337 | * |
---|
338 | * define PDEBUG to |
---|
339 | * 0 for basic, explicitely requested tests |
---|
340 | * 1 for tests in pProcs |
---|
341 | * 2 for low-level tests (Exponent access, primitive monom operations) |
---|
342 | * NOTE: for PDEBUG > 1 it gets very slow |
---|
343 | * You can locally enable tests in pProcs by setting the |
---|
344 | * define at the beginning of pProcs.cc |
---|
345 | */ |
---|
346 | #define PDEBUG 0 |
---|
347 | |
---|
348 | /* PDEBUG requires MDEBUG -- obachman: really?? if yes, why???*/ |
---|
349 | #ifdef PDEBUG |
---|
350 | #ifndef MDEBUG |
---|
351 | #define MDEBUG 0 |
---|
352 | #endif |
---|
353 | #endif |
---|
354 | |
---|
355 | /* define MDEBUG to enable memory checks */ |
---|
356 | #define MDEBUG 0 |
---|
357 | |
---|
358 | #ifdef MDEBUG |
---|
359 | /* If ! defined(OM_NDEBUG) and (defined(OM_TRACK) or defined(OM_CHECK) |
---|
360 | then omDebug routines are used for memory allocation/free: |
---|
361 | |
---|
362 | The omDebug routines are controlled by the values of OM_TRACK and om_CHECK. |
---|
363 | There meaning is roughly as follows: |
---|
364 | OM_TRACK: strored with address : extra space |
---|
365 | 0 : no additional info is stored : 0 |
---|
366 | 1 : file:line of location where address was allocated : 1 word |
---|
367 | 2 : plus backtrace of stack where adress was allocated: 6 words |
---|
368 | 3 : plus size/bin info and front-, and back padding : 9 words |
---|
369 | 4 : plus file:line of location where adress was freed : 10 words |
---|
370 | 5 : plus backtrace of stack where adress was allocated: 15 words |
---|
371 | OM_CHECK: checks done |
---|
372 | 0 : no checks |
---|
373 | 1 : constant-time checks: i.e. addr checks only |
---|
374 | 2 : plus linear-time checks and constant related bin check |
---|
375 | 3 : plus quadratic-time checks and linear-time related bin checks and |
---|
376 | constant time all memory checks |
---|
377 | 4 : and so on |
---|
378 | ==> for OM_CHECK >= 3 it gets rather slow |
---|
379 | |
---|
380 | OM_CHECK and OM_TRACK can be set on a per-file basis (as can OM_NDEBUG), |
---|
381 | e.g.: |
---|
382 | #define OM_CHECK 3 |
---|
383 | #define OM_TRACK 5 |
---|
384 | #include <omalloc.h> |
---|
385 | ensures that all memory allocs/free in this file are done with |
---|
386 | OM_CHECK==3 and OM_TRACK==5. |
---|
387 | |
---|
388 | To set OM_CHECK and OM_TRACK under dynamic scope, set |
---|
389 | om_Opts.MinCheck and om_Opts.MinTrack to the respectiv values. e.g.: |
---|
390 | om_Opts.MinCheck = 3; omOpts.MinTrack = 5; |
---|
391 | ExternalRoutine(); |
---|
392 | om_Opts.MinCheck = 0; omOpts.MinTrack = 0; |
---|
393 | ensures that all calls omDebug routines occuring during the computation of |
---|
394 | ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5. |
---|
395 | |
---|
396 | Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies |
---|
397 | how many addresses are kept before they are actually freed. |
---|
398 | |
---|
399 | Some tips on possible values of OM_TRACK, OM_CHECK: |
---|
400 | + To find out about an address that has been freed twice, set OM_TRACK |
---|
401 | to 4 or 5 and OM_SING_KEEP (resp. om_Opts.Keep) to a high values |
---|
402 | (say, LONG_MAX). |
---|
403 | + to find out where "memory corruption" occured, increase value of |
---|
404 | OM_CHECK - the higher this value is, the more consistency checks are |
---|
405 | done (However a value > 3 checks the entire memory each time an omalloc |
---|
406 | routin is used!) |
---|
407 | |
---|
408 | Some more tips on the usage of omalloc: |
---|
409 | + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines |
---|
410 | assume that sizes are > 0 and pointers are != NULL |
---|
411 | + omalloc*, omrealloc*, omfree* omcheck*, omdebug* omtest* routines allow |
---|
412 | NULL pointers and sizes == 0 |
---|
413 | + You can safely use any free/realloc routine in combination with any alloc |
---|
414 | routine (including the debug versions): E.g., an address allocated with |
---|
415 | omAllocBin can be freed with omfree, or an adress allocated with |
---|
416 | om(Debug)Alloc can be freed with omfree, or omFree, or omFreeSize, etc. |
---|
417 | However, keep in mind that the efficincy decreases from |
---|
418 | Bin over Size to General routines (i.e., omFreeBin is more efficient than |
---|
419 | omFreeSize which is more efficient than omFree, likewise wqith the alloc |
---|
420 | routines). |
---|
421 | + if OM_CHECK is undefed or 0, then all omCheck routines are undefined |
---|
422 | + if OM_CHECK and OM_TRACK are both undefined, or if OM_NDEBUG is defined, |
---|
423 | then the "real" alloc/realloc/free macros are used, and all omTest, |
---|
424 | omDebug and omCheck routines are undefined |
---|
425 | + to break at the time an omError occurs within a debugger, |
---|
426 | set a breakpoint on omReportError |
---|
427 | + to do checks from within the debugger, or to do checks with exlicit check level, |
---|
428 | use omTest routines. |
---|
429 | */ |
---|
430 | |
---|
431 | #define OM_TRACK 3 |
---|
432 | #define OM_CHECK 1 |
---|
433 | #define OM_SING_KEEP 1000 |
---|
434 | #endif /* MDEBUG */ |
---|
435 | |
---|
436 | |
---|
437 | /* undef KDEBUG for check of data during std computations |
---|
438 | * |
---|
439 | * define KDEBUG to |
---|
440 | * 0 for basic tests |
---|
441 | * 1 for tests in kSpoly |
---|
442 | * NOTE: You can locally enable tests in kspoly by setting the |
---|
443 | * define at the beginning of kspoly.cc |
---|
444 | */ |
---|
445 | #define KDEBUG 0 |
---|
446 | |
---|
447 | /* define LDEBUG checking numbers, undefine otherwise */ |
---|
448 | #define LDEBUG |
---|
449 | /* define RDEBUG checking rings (together with TRACE=9) */ |
---|
450 | #define RDEBUG |
---|
451 | /* define TEST for non time critical tests, undefine otherwise */ |
---|
452 | #define TEST |
---|
453 | |
---|
454 | /* #define PAGE_TEST */ |
---|
455 | |
---|
456 | /* define YYDEBUG 1 for debugging bison texts, 0 otherwise */ |
---|
457 | #define YYDEBUG 1 |
---|
458 | |
---|
459 | /* Undefine to disable debugging of MP stuff */ |
---|
460 | #ifdef HAVE_MPSR |
---|
461 | #define MPSR_DEBUG |
---|
462 | #endif |
---|
463 | |
---|
464 | |
---|
465 | #ifdef TEST |
---|
466 | #ifndef buildin_rand |
---|
467 | #define buildin_rand 1 |
---|
468 | #endif |
---|
469 | #endif |
---|
470 | |
---|
471 | /* define SPECTRUM_DEBUG and SPECTRUM_PRINT for debugging the spectrum code */ |
---|
472 | /* define SPECTRUM_IOSTREAM to use C++ iostream for error messages */ |
---|
473 | |
---|
474 | /* #define SPECTRUM_DEBUG */ |
---|
475 | /* #define SPECTRUM_PRINT */ |
---|
476 | #undef SPECTRUM_IOSTREAM |
---|
477 | |
---|
478 | #ifdef SPECTRUM_DEBUG |
---|
479 | #define MULTICNT_DEBUG |
---|
480 | #define GMPRAT_DEBUG |
---|
481 | #define KMATRIX_DEBUG |
---|
482 | #define SPLIST_DEBUG |
---|
483 | #define NPOLYGON_DEBUG |
---|
484 | #define SEMIC_DEBUG |
---|
485 | #endif |
---|
486 | |
---|
487 | #ifdef SPECTRUM_PRINT |
---|
488 | #define MULTICNT_PRINT |
---|
489 | #define GMPRAT_PRINT |
---|
490 | #define KMATRIX_PRINT |
---|
491 | #define SPLIST_PRINT |
---|
492 | #define NPOLYGON_PRINT |
---|
493 | #define SEMIC_PRINT |
---|
494 | #endif |
---|
495 | |
---|
496 | #ifdef SPECTRUM_IOSTREAM |
---|
497 | #define MULTICNT_IOSTREAM |
---|
498 | #define GMPRAT_IOSTREAM |
---|
499 | #define KMATRIX_IOSTREAM |
---|
500 | #define SPLIST_IOSTREAM |
---|
501 | #define NPOLYGON_IOSTREAM |
---|
502 | #define SEMIC_IOSTREAM |
---|
503 | #endif |
---|
504 | |
---|
505 | |
---|
506 | #else /* not NDEBUG **************************************************** */ |
---|
507 | |
---|
508 | /* define YYDEBUG 1 for debugging bison texts, 0 otherwise */ |
---|
509 | #define YYDEBUG 0 |
---|
510 | |
---|
511 | #endif /* not NDEBUG */ |
---|
512 | |
---|
513 | #ifdef HAVE_DYNAMIC_LOADING |
---|
514 | # define HAVE_NAMESPACES 1 |
---|
515 | #endif /* HAVE_DYNAMIC_LOADING */ |
---|
516 | #ifdef HAVE_NAMESPACES |
---|
517 | # undef USE_IILOCALRING |
---|
518 | #endif |
---|
519 | |
---|
520 | /******************************************************************* |
---|
521 | * |
---|
522 | * assume(x) -- a handy macro for assumptions |
---|
523 | * |
---|
524 | ******************************************************************/ |
---|
525 | |
---|
526 | #ifndef HAVE_ASSUME |
---|
527 | #define assume(x) ((void) 0) |
---|
528 | #define r_assume(x) ((void) 0) |
---|
529 | #else /* ! HAVE_ASSUME */ |
---|
530 | |
---|
531 | #ifdef __cplusplus |
---|
532 | extern "C" { |
---|
533 | #endif |
---|
534 | /* Set a breakpoint on this function */ |
---|
535 | extern void assume_violation(char* file, int line); |
---|
536 | #ifdef __cplusplus |
---|
537 | } |
---|
538 | #endif |
---|
539 | |
---|
540 | |
---|
541 | #define assume(x) _assume(x, __FILE__, __LINE__) |
---|
542 | #define r_assume(x) _r_assume(x, __FILE__, __LINE__) |
---|
543 | |
---|
544 | #define _assume(x, f, l) \ |
---|
545 | do \ |
---|
546 | { \ |
---|
547 | if (! (x)) \ |
---|
548 | { \ |
---|
549 | assume_violation(f, l); \ |
---|
550 | } \ |
---|
551 | } \ |
---|
552 | while (0) |
---|
553 | |
---|
554 | #define _r_assume(x, f, l) \ |
---|
555 | do \ |
---|
556 | { \ |
---|
557 | if (! (x)) \ |
---|
558 | { \ |
---|
559 | assume_violation(f, l); \ |
---|
560 | return 0; \ |
---|
561 | } \ |
---|
562 | } \ |
---|
563 | while (0) |
---|
564 | #endif /* HAVE_ASSUME */ |
---|
565 | |
---|
566 | #endif /* MOD2_H */ |
---|