[35aab3] | 1 | #ifndef STRUCTS_H |
---|
| 2 | #define STRUCTS_H |
---|
| 3 | /**************************************** |
---|
| 4 | * Computer Algebra System SINGULAR * |
---|
| 5 | ****************************************/ |
---|
| 6 | /* |
---|
| 7 | * ABSTRACT |
---|
| 8 | */ |
---|
| 9 | |
---|
[c5e0e1] | 10 | /* for omBin */ |
---|
[b1dfaf] | 11 | #include <omalloc/omalloc.h> |
---|
[c81a40] | 12 | #ifdef HAVE_RINGS |
---|
[cab375] | 13 | #include <coeffs/si_gmp.h> |
---|
[c81a40] | 14 | #endif |
---|
[35aab3] | 15 | |
---|
| 16 | /* standard types */ |
---|
[b56249] | 17 | //#ifdef HAVE_RINGS |
---|
| 18 | //typedef unsigned long NATNUMBER; |
---|
| 19 | //typedef mpz_ptr int_number; |
---|
| 20 | //#endif |
---|
[35aab3] | 21 | |
---|
| 22 | #define BITSET unsigned int |
---|
| 23 | |
---|
[fc5095] | 24 | |
---|
[35aab3] | 25 | /* C++-part */ |
---|
| 26 | #ifdef __cplusplus |
---|
[29af60] | 27 | #include <misc/auxiliary.h> |
---|
| 28 | #include <kernel/polys.h> |
---|
| 29 | #include <polys/coeffrings.h> |
---|
| 30 | |
---|
[35aab3] | 31 | class sleftv; |
---|
[c6474a] | 32 | class procinfo; |
---|
[35aab3] | 33 | class skStrategy; |
---|
| 34 | class ssyStrategy; |
---|
[6bde67] | 35 | class CPolynomialSummator; |
---|
[1495df4] | 36 | class CGlobalMultiplier; |
---|
[a7fbdd] | 37 | class CFormulaPowerMultiplier; |
---|
[35aab3] | 38 | #endif |
---|
| 39 | |
---|
[da6156] | 40 | |
---|
| 41 | enum tHomog |
---|
| 42 | { |
---|
| 43 | isNotHomog = FALSE, |
---|
| 44 | isHomog = TRUE, |
---|
| 45 | testHomog |
---|
| 46 | }; |
---|
| 47 | |
---|
| 48 | |
---|
[35aab3] | 49 | struct sip_package; |
---|
[49abe32] | 50 | typedef struct sip_package ip_package; |
---|
| 51 | typedef ip_package * package; |
---|
[35aab3] | 52 | |
---|
| 53 | typedef struct n_Procs_s n_Procs_s; |
---|
| 54 | |
---|
[5a9e7b] | 55 | // #ifdef HAVE_PLURAL |
---|
[35aab3] | 56 | struct nc_struct; |
---|
| 57 | typedef struct nc_struct nc_struct; |
---|
[5a9e7b] | 58 | // #endif |
---|
[35aab3] | 59 | |
---|
| 60 | typedef struct sip_link ip_link; |
---|
| 61 | |
---|
| 62 | /* the pointer types */ |
---|
| 63 | typedef char * char_ptr; |
---|
| 64 | typedef int * int_ptr; |
---|
| 65 | |
---|
| 66 | #ifdef __cplusplus |
---|
[c6474a] | 67 | //typedef ip_link * si_link; |
---|
[35aab3] | 68 | typedef sleftv * leftv; |
---|
[c6474a] | 69 | //typedef slists * lists; |
---|
| 70 | //typedef sattr * attr; |
---|
[35aab3] | 71 | typedef skStrategy * kStrategy; |
---|
| 72 | typedef ssyStrategy * syStrategy; |
---|
| 73 | typedef procinfo * procinfov; |
---|
| 74 | |
---|
| 75 | /* the function pointer types */ |
---|
| 76 | |
---|
| 77 | #endif /* __cplusplus */ |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | /* |
---|
| 82 | ** 7. runtime procedures/global data |
---|
| 83 | */ |
---|
| 84 | |
---|
| 85 | /* 7.1 C-routines : */ |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | #ifdef __cplusplus |
---|
| 89 | extern "C" { |
---|
| 90 | #endif |
---|
[8f64a0f] | 91 | void m2_end(int i); |
---|
[35aab3] | 92 | #ifdef __cplusplus |
---|
| 93 | } |
---|
| 94 | #endif |
---|
| 95 | |
---|
| 96 | /* 7.2 C++-routines : */ |
---|
| 97 | |
---|
| 98 | #ifdef __cplusplus |
---|
| 99 | int inits(void); |
---|
[ce7f16] | 100 | //int IsPrime(int i); |
---|
[35aab3] | 101 | extern int siSeed; |
---|
| 102 | int siRand(); |
---|
| 103 | #endif |
---|
| 104 | |
---|
| 105 | #define loop for(;;) |
---|
| 106 | |
---|
| 107 | #ifndef ABS |
---|
| 108 | #define ABS(x) ((x)<0?(-(x)):(x)) |
---|
| 109 | #endif |
---|
| 110 | |
---|
[29d76d4] | 111 | class CGlobals |
---|
| 112 | { |
---|
| 113 | public: |
---|
| 114 | static inline const omBin& getCharPtrBin() |
---|
| 115 | { |
---|
| 116 | static omBin _char_ptr_bin = omGetSpecBin(sizeof(char*)); |
---|
| 117 | return _char_ptr_bin; |
---|
| 118 | } |
---|
| 119 | }; |
---|
| 120 | |
---|
| 121 | #define char_ptr_bin (CGlobals::getCharPtrBin()) |
---|
| 122 | |
---|
[35aab3] | 123 | |
---|
| 124 | #endif |
---|
| 125 | |
---|