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