source: git/kernel/structs.h @ 0f401f

spielwiese
Last change on this file since 0f401f 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
RevLine 
[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
[be6689f]11/* for memset: */
12#include <string.h>
[c5e0e1]13/* for omBin */
[b1dfaf]14#include <omalloc/omalloc.h>
[c81a40]15#ifdef HAVE_RINGS
[599326]16#include <kernel/si_gmp.h>
[c81a40]17#endif
[35aab3]18
[994445]19
[35aab3]20/* standard types */
[c81a40]21#ifdef HAVE_RINGS
[be6689f]22typedef unsigned long NATNUMBER;
[a604c3]23typedef mpz_ptr int_number;
[c81a40]24#endif
[de7394]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 % */
[35aab3]31typedef short BOOLEAN;
[de7394]32#endif
[35aab3]33
[5be7db]34typedef void * ADDRESS;
[35aab3]35#define BITSET  unsigned int
36
[fc5095]37#if SIZEOF_LONG == 4
38typedef long long int64;
39#elif SIZEOF_LONG == 8
40typedef long int64;
41#else
[5a9e7b]42#error int64 undefined
[fc5095]43#endif
44
45
[35aab3]46/* C++-part */
47#ifdef __cplusplus
48class sleftv;
49class slists;
50class sattr;
51class skStrategy;
52class ssyStrategy;
53class procinfo;
[6bde67]54class CPolynomialSummator;
[1495df4]55class CGlobalMultiplier;
[a7fbdd]56class CFormulaPowerMultiplier;
[35aab3]57#endif
58
59struct sip_package;
[49abe32]60typedef struct sip_package ip_package;
61typedef ip_package *       package;
[35aab3]62
[b07ba77]63
[35aab3]64typedef struct  n_Procs_s  n_Procs_s;
65
[5a9e7b]66// #ifdef HAVE_PLURAL
[35aab3]67struct nc_struct;
68typedef struct nc_struct   nc_struct;
[5a9e7b]69// #endif
[35aab3]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
[5be7db]88class idrec;
89typedef idrec *   idhdl;
90
[35aab3]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
[fb0d9a]105void  m2_end(int i) __attribute__((noreturn));
[35aab3]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
[c5e0e1]125extern omBin char_ptr_bin;
126extern omBin sleftv_bin;
[35aab3]127
128#endif
129
Note: See TracBrowser for help on using the repository browser.