source:
git/kernel/structs.h
@
cab375
Last change on this file since cab375 was cab375, checked in by , 13 years ago | |
---|---|
|
|
File size: 1.9 KB |
Rev | Line | |
---|---|---|
[35aab3] | 1 | #ifndef STRUCTS_H |
2 | #define STRUCTS_H | |
3 | /**************************************** | |
4 | * Computer Algebra System SINGULAR * | |
5 | ****************************************/ | |
[341696] | 6 | /* $Id$ */ |
[35aab3] | 7 | /* |
8 | * ABSTRACT | |
9 | */ | |
10 | ||
[c5e0e1] | 11 | /* for omBin */ |
[b1dfaf] | 12 | #include <omalloc/omalloc.h> |
[9d53d0] | 13 | #include <misc/auxiliary.h> |
[c81a40] | 14 | #ifdef HAVE_RINGS |
[cab375] | 15 | #include <coeffs/si_gmp.h> |
[c81a40] | 16 | #endif |
[35aab3] | 17 | |
[9d53d0] | 18 | extern int dummy; |
[994445] | 19 | |
[35aab3] | 20 | /* standard types */ |
[c81a40] | 21 | #ifdef HAVE_RINGS |
[be6689f] | 22 | typedef unsigned long NATNUMBER; |
[a604c3] | 23 | typedef mpz_ptr int_number; |
[c81a40] | 24 | #endif |
[35aab3] | 25 | |
26 | #define BITSET unsigned int | |
27 | ||
[fc5095] | 28 | #if SIZEOF_LONG == 4 |
29 | typedef long long int64; | |
30 | #elif SIZEOF_LONG == 8 | |
31 | typedef long int64; | |
32 | #else | |
[5a9e7b] | 33 | #error int64 undefined |
[fc5095] | 34 | #endif |
35 | ||
36 | ||
[35aab3] | 37 | /* C++-part */ |
38 | #ifdef __cplusplus | |
39 | class sleftv; | |
[c6474a] | 40 | class procinfo; |
[35aab3] | 41 | class skStrategy; |
42 | class ssyStrategy; | |
[6bde67] | 43 | class CPolynomialSummator; |
[1495df4] | 44 | class CGlobalMultiplier; |
[a7fbdd] | 45 | class CFormulaPowerMultiplier; |
[35aab3] | 46 | #endif |
47 | ||
48 | struct sip_package; | |
[49abe32] | 49 | typedef struct sip_package ip_package; |
50 | typedef ip_package * package; | |
[35aab3] | 51 | |
52 | typedef struct n_Procs_s n_Procs_s; | |
53 | ||
[5a9e7b] | 54 | // #ifdef HAVE_PLURAL |
[35aab3] | 55 | struct nc_struct; |
56 | typedef struct nc_struct nc_struct; | |
[5a9e7b] | 57 | // #endif |
[35aab3] | 58 | |
59 | typedef struct sip_link ip_link; | |
60 | ||
61 | /* the pointer types */ | |
62 | typedef char * char_ptr; | |
63 | typedef int * int_ptr; | |
64 | ||
65 | #ifdef __cplusplus | |
[c6474a] | 66 | //typedef ip_link * si_link; |
[35aab3] | 67 | typedef sleftv * leftv; |
[c6474a] | 68 | //typedef slists * lists; |
69 | //typedef sattr * attr; | |
[35aab3] | 70 | typedef skStrategy * kStrategy; |
71 | typedef ssyStrategy * syStrategy; | |
72 | typedef procinfo * procinfov; | |
73 | ||
74 | /* the function pointer types */ | |
75 | ||
[5be7db] | 76 | class idrec; |
77 | typedef idrec * idhdl; | |
78 | ||
[35aab3] | 79 | #endif /* __cplusplus */ |
80 | ||
81 | ||
82 | ||
83 | /* | |
84 | ** 7. runtime procedures/global data | |
85 | */ | |
86 | ||
87 | /* 7.1 C-routines : */ | |
88 | ||
89 | ||
90 | #ifdef __cplusplus | |
91 | extern "C" { | |
92 | #endif | |
[fb0d9a] | 93 | void m2_end(int i) __attribute__((noreturn)); |
[35aab3] | 94 | #ifdef __cplusplus |
95 | } | |
96 | #endif | |
97 | ||
98 | /* 7.2 C++-routines : */ | |
99 | ||
100 | #ifdef __cplusplus | |
101 | int inits(void); | |
102 | int IsPrime(int i); | |
103 | extern int siSeed; | |
104 | int siRand(); | |
105 | #endif | |
106 | ||
107 | #define loop for(;;) | |
108 | ||
109 | #ifndef ABS | |
110 | #define ABS(x) ((x)<0?(-(x)):(x)) | |
111 | #endif | |
112 | ||
[c5e0e1] | 113 | extern omBin char_ptr_bin; |
[35aab3] | 114 | |
115 | #endif | |
116 |
Note: See TracBrowser
for help on using the repository browser.