source: git/kernel/structs.h @ c6474a

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