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