1 | #ifndef STRUCTS_H |
---|
2 | #define STRUCTS_H |
---|
3 | /**************************************** |
---|
4 | * Computer Algebra System SINGULAR * |
---|
5 | ****************************************/ |
---|
6 | /* $Id: structs.h,v 1.17 1998-12-14 15:32:29 Singular Exp $ */ |
---|
7 | /* |
---|
8 | * ABSTRACT |
---|
9 | */ |
---|
10 | |
---|
11 | /* standard types */ |
---|
12 | typedef unsigned char uchar ; |
---|
13 | typedef unsigned short CARDINAL; |
---|
14 | typedef short BOOLEAN; |
---|
15 | |
---|
16 | typedef void * Sy_reference; |
---|
17 | #define ADDRESS Sy_reference |
---|
18 | #define BITSET unsigned int |
---|
19 | |
---|
20 | /* EXPONENT_TYPE is determined by configure und defined in mod2.h */ |
---|
21 | typedef EXPONENT_TYPE Exponent_t; |
---|
22 | |
---|
23 | enum tHomog |
---|
24 | { |
---|
25 | isNotHomog = FALSE, |
---|
26 | isHomog = TRUE, |
---|
27 | testHomog |
---|
28 | }; |
---|
29 | enum noeof_t |
---|
30 | { |
---|
31 | noeof_brace = 1, |
---|
32 | noeof_asstring, |
---|
33 | noeof_block, |
---|
34 | noeof_bracket, |
---|
35 | noeof_comment, |
---|
36 | noeof_procname, |
---|
37 | noeof_string |
---|
38 | }; |
---|
39 | |
---|
40 | struct sip_memHeap; |
---|
41 | typedef struct sip_memHeap ip_memHeap; |
---|
42 | typedef ip_memHeap * memHeap; |
---|
43 | |
---|
44 | /* C++-part */ |
---|
45 | #ifdef __cplusplus |
---|
46 | class ip_smatrix; |
---|
47 | class idrec; |
---|
48 | class intvec; |
---|
49 | class sleftv; |
---|
50 | class slists; |
---|
51 | class sattr; |
---|
52 | class skStrategy; |
---|
53 | class ssyStrategy; |
---|
54 | class procinfo; |
---|
55 | class namerec; |
---|
56 | #endif |
---|
57 | |
---|
58 | struct sip_sring; |
---|
59 | struct sip_sideal; |
---|
60 | struct sip_link; |
---|
61 | struct spolynom; |
---|
62 | struct _ssubexpr; |
---|
63 | struct _sssym; |
---|
64 | struct snumber; |
---|
65 | struct sip_command; |
---|
66 | struct sip_package; |
---|
67 | struct s_si_link_extension; |
---|
68 | struct reca; |
---|
69 | |
---|
70 | typedef struct _ssubexpr sSubexpr; |
---|
71 | typedef struct _sssym ssym; |
---|
72 | typedef struct spolyrec polyrec; |
---|
73 | typedef struct snumber rnumber; |
---|
74 | typedef struct sip_sideal ip_sideal; |
---|
75 | typedef struct sip_smap ip_smap; |
---|
76 | typedef struct sip_sring ip_sring; |
---|
77 | typedef struct sip_link ip_link; |
---|
78 | typedef struct sip_command ip_command; |
---|
79 | typedef struct sip_package ip_package; |
---|
80 | |
---|
81 | |
---|
82 | /* the pointer types */ |
---|
83 | typedef ip_sring * ring; |
---|
84 | typedef int idtyp; |
---|
85 | typedef rnumber * number; |
---|
86 | typedef polyrec * poly; |
---|
87 | typedef poly * polyset; |
---|
88 | typedef ip_sideal * ideal; |
---|
89 | typedef ip_smap * map; |
---|
90 | typedef ideal * resolvente; |
---|
91 | typedef union uutypes utypes; |
---|
92 | typedef ip_command * command; |
---|
93 | typedef struct s_si_link_extension *si_link_extension; |
---|
94 | typedef struct reca * alg; |
---|
95 | #ifdef __cplusplus |
---|
96 | typedef idrec * idhdl; |
---|
97 | typedef ip_smatrix * matrix; |
---|
98 | typedef ip_link * si_link; |
---|
99 | typedef sleftv * leftv; |
---|
100 | typedef slists * lists; |
---|
101 | typedef sSubexpr * Subexpr; |
---|
102 | typedef sattr * attr; |
---|
103 | typedef skStrategy * kStrategy; |
---|
104 | typedef ip_package * package; |
---|
105 | typedef ssyStrategy * syStrategy; |
---|
106 | typedef procinfo * procinfov; |
---|
107 | typedef namerec * namehdl; |
---|
108 | #endif |
---|
109 | |
---|
110 | struct _scmdnames |
---|
111 | { |
---|
112 | char *name; |
---|
113 | short alias; |
---|
114 | short tokval; |
---|
115 | short toktype; |
---|
116 | }; |
---|
117 | typedef struct _scmdnames cmdnames; |
---|
118 | |
---|
119 | /* the function pointer types */ |
---|
120 | typedef number (*numberfunc)(number a,number b); |
---|
121 | |
---|
122 | typedef void (*pSetmProc)(poly p); |
---|
123 | typedef int (*pLDegProc)(poly p, int *length); |
---|
124 | typedef int (*pFDegProc)(poly p); |
---|
125 | typedef int (*pCompProc)(poly p1, poly p2); |
---|
126 | |
---|
127 | extern ring currRing; |
---|
128 | |
---|
129 | /* |
---|
130 | ** 7. runtime procedures/global data |
---|
131 | */ |
---|
132 | |
---|
133 | /* 7.1 C-routines : */ |
---|
134 | |
---|
135 | #ifdef __cplusplus |
---|
136 | extern "C" { |
---|
137 | #endif |
---|
138 | void m2_end(short i); |
---|
139 | #ifdef __cplusplus |
---|
140 | } |
---|
141 | #endif |
---|
142 | |
---|
143 | /* 7.2 C++-routines : */ |
---|
144 | |
---|
145 | #ifdef __cplusplus |
---|
146 | int inits(void); |
---|
147 | void singular_help(char *str, BOOLEAN example); |
---|
148 | #ifdef buildin_help |
---|
149 | int singular_manual(char *str); |
---|
150 | #endif |
---|
151 | #ifdef buildin_rand |
---|
152 | extern int siSeed; |
---|
153 | int siRand(); |
---|
154 | #endif |
---|
155 | #endif |
---|
156 | |
---|
157 | /*the general set of std-options --> kutil.cc */ |
---|
158 | extern BITSET test; |
---|
159 | /*the general set of verbose-options --> febase.cc */ |
---|
160 | #ifdef __cplusplus |
---|
161 | extern "C" BITSET verbose; |
---|
162 | #else |
---|
163 | extern BITSET verbose; |
---|
164 | #endif |
---|
165 | /*debugging the bison grammar --> grammar.cc*/ |
---|
166 | #ifdef YYDEBUG |
---|
167 | #if YYDEBUG |
---|
168 | extern int yydebug; |
---|
169 | #endif |
---|
170 | #endif |
---|
171 | |
---|
172 | #ifdef HAVE_LIBPARSER |
---|
173 | #ifdef __cplusplus |
---|
174 | class libstack; |
---|
175 | typedef libstack * libstackv; |
---|
176 | #endif |
---|
177 | #endif /* HAVE_LIBPARSER */ |
---|
178 | |
---|
179 | #endif |
---|
180 | |
---|