source: git/kernel/structs.h @ 210e07

spielwiese
Last change on this file since 210e07 was 0f401f, checked in by Hans Schoenemann <hannes@…>, 13 years ago
fixed options.h, numbers.h, restored ideals.cc
  • Property mode set to 100644
File size: 2.2 KB
Line 
1#ifndef STRUCTS_H
2#define STRUCTS_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id$ */
7/*
8* ABSTRACT
9*/
10
11/* for memset: */
12#include <string.h>
13/* for omBin */
14#include <omalloc/omalloc.h>
15#ifdef HAVE_RINGS
16#include <kernel/si_gmp.h>
17#endif
18
19
20/* standard types */
21#ifdef HAVE_RINGS
22typedef unsigned long NATNUMBER;
23typedef mpz_ptr int_number;
24#endif
25#if (SIZEOF_LONG == 8)
26typedef int BOOLEAN;
27/* testet on x86_64, gcc 3.4.6: 2 % */
28/* testet on IA64, gcc 3.4.6: 1 % */
29#else
30/* testet on athlon, gcc 2.95.4: 1 % */
31typedef short BOOLEAN;
32#endif
33
34typedef void * ADDRESS;
35#define BITSET  unsigned int
36
37#if SIZEOF_LONG == 4
38typedef long long int64;
39#elif SIZEOF_LONG == 8
40typedef long int64;
41#else
42#error int64 undefined
43#endif
44
45
46/* C++-part */
47#ifdef __cplusplus
48class sleftv;
49class slists;
50class sattr;
51class skStrategy;
52class ssyStrategy;
53class procinfo;
54class CPolynomialSummator;
55class CGlobalMultiplier;
56class CFormulaPowerMultiplier;
57#endif
58
59struct sip_package;
60typedef struct sip_package ip_package;
61typedef ip_package *       package;
62
63
64typedef struct  n_Procs_s  n_Procs_s;
65
66// #ifdef HAVE_PLURAL
67struct nc_struct;
68typedef struct nc_struct   nc_struct;
69// #endif
70
71typedef struct sip_link    ip_link;
72
73/* the pointer types */
74typedef char *             char_ptr;
75typedef int  *             int_ptr;
76
77#ifdef __cplusplus
78typedef ip_link *          si_link;
79typedef sleftv *           leftv;
80typedef slists *           lists;
81typedef sattr *            attr;
82typedef skStrategy *       kStrategy;
83typedef ssyStrategy *      syStrategy;
84typedef procinfo *         procinfov;
85
86/* the function pointer types */
87
88class idrec;
89typedef idrec *   idhdl;
90
91#endif /* __cplusplus */
92
93
94
95/*
96**  7. runtime procedures/global data
97*/
98
99/* 7.1 C-routines : */
100
101
102#ifdef __cplusplus
103extern "C" {
104#endif
105void  m2_end(int i) __attribute__((noreturn));
106#ifdef __cplusplus
107}
108#endif
109
110/* 7.2 C++-routines : */
111
112#ifdef __cplusplus
113int   inits(void);
114int   IsPrime(int i);
115extern int siSeed;
116int siRand();
117#endif
118
119#define loop for(;;)
120
121#ifndef ABS
122#define ABS(x) ((x)<0?(-(x)):(x))
123#endif
124
125extern omBin char_ptr_bin;
126extern omBin sleftv_bin;
127
128#endif
129
Note: See TracBrowser for help on using the repository browser.