=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/stackm.h,v retrieving revision 1.4 retrieving revision 1.14 diff -u -p -r1.4 -r1.14 --- OpenXM/src/kan96xx/Kan/stackm.h 2004/09/11 12:13:41 1.4 +++ OpenXM/src/kan96xx/Kan/stackm.h 2015/10/08 11:49:37 1.14 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/stackm.h,v 1.3 2003/11/20 09:20:36 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/stackm.h,v 1.13 2015/10/08 08:14:25 takayama Exp $ */ #define LOAD_SM1_PATH "/usr/local/lib/sm1/" /* Do not forget to put / at the tail. "/usr/local/lib/sm1" does not work. @@ -8,8 +8,18 @@ /******************* stackm.h ******************************/ #include - - +#if defined(__CYGWIN__) || defined(__MSYS__) +#define MYSETJMP(e) _setjmp(e) +#define MYSIGSETJMP(e,f) _setjmp(e) +#define MYLONGJMP(e,f) _longjmp(e,f) +#define MYSIGLONGJMP(e,f) _longjmp(e,f) +#else +#define MYSETJMP(e) setjmp(e) +#define MYSIGSETJMP(e,f) sigsetjmp(e,f) +#define MYLONGJMP(e,f) longjmp(e,f) +#define MYSIGLONGJMP(e,f) siglongjmp(e,f) +#endif + /**** data types (class identifiers) ************/ /* Never change the following orders. If you add a new class, add that class at the bottom and give the @@ -35,8 +45,9 @@ #define SrationalFunction 16 #define Sclass 17 /* class, for extension */ #define Sdouble 18 +#define SbyteArray 19 -#define TYPES 19 /* number of data types. */ +#define TYPES 20 /* number of data types. */ /* NOTE! If you change the above, you need to change mklookup.c too. */ /* Change also dr.sm1 : datatype constants. */ @@ -62,14 +73,19 @@ union cell { struct coeff *universalNumber; void *voidp; double *dbl; + unsigned char *bytes; }; struct object{ int tag; /* class identifier */ union cell lc; /* left cell */ union cell rc; /* right cell */ + struct object *attr; /* Attribute list. See misc-2005/06/gfan/test1.sm1 + as to performance test. */ }; +#define OINIT { .attr = NULL} + struct dictionary { char *key; int h0; /* Value of hash functions */ @@ -98,6 +114,7 @@ struct tokens{ char *token; int kind; struct object object; + int tflag; }; /* used in kind of tokens */ @@ -106,6 +123,8 @@ struct tokens{ #define EXECUTABLE_STRING 4 /* strings enclosed by {} */ #define EXECUTABLE_ARRAY 8 +/* Used in tflag of tokens, bit wise */ +#define NO_DELAY 0x2 /********** macros to use Sarray **********************/ @@ -130,13 +149,15 @@ if ((ob).tag != Sarray) {fprintf(stderr,"Warning: PUTO #define isNullList(list) ((struct object *)NULL == list) #define NULLLIST (struct object *)NULL -/* for dictionary */ +/* For dictionary, flag bit */ #define SET_ATTR_FOR_ALL_WORDS 0x10 +#define OR_ATTR_FOR_ALL_WORDS 0x20 #define PROTECT 0x1 #define ABSOLUTE_PROTECT 0x2 #define ATTR_INFIX 0x4 +#define ATTR_EXPORT 0x8 -/* For status */ +/* For status, flag bit */ #define STATUS_EOF -1 #define STATUS_BREAK 0x1 #define STATUS_INFIX 0x2 @@ -144,3 +165,4 @@ if ((ob).tag != Sarray) {fprintf(stderr,"Warning: PUTO typedef enum {CCPUSH,CCPOP,CCRESTORE} actionOfContextControl; +#define SCANNERBUF_SIZE 240