source: git/kernel/structs.h @ f2772b

spielwiese
Last change on this file since f2772b was 29d76d4, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Fixed brocken linkage under OSX (char_ptr_bin)
  • Property mode set to 100644
File size: 2.0 KB
Line 
1#ifndef STRUCTS_H
2#define STRUCTS_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/*
7* ABSTRACT
8*/
9
10/* for omBin */
11#include <omalloc/omalloc.h>
12#include <misc/auxiliary.h>
13#include <kernel/polys.h>
14#include <polys/coeffrings.h>
15
16#ifdef HAVE_RINGS
17#include <coeffs/si_gmp.h>
18#endif
19
20/* standard types */
21//#ifdef HAVE_RINGS
22//typedef unsigned long NATNUMBER;
23//typedef mpz_ptr int_number;
24//#endif
25
26#define BITSET  unsigned int
27
28
29/* C++-part */
30#ifdef __cplusplus
31class sleftv;
32class procinfo;
33class skStrategy;
34class ssyStrategy;
35class CPolynomialSummator;
36class CGlobalMultiplier;
37class CFormulaPowerMultiplier;
38#endif
39
40
41enum tHomog
42{
43  isNotHomog = FALSE,
44  isHomog    = TRUE,
45  testHomog
46};
47
48
49struct sip_package;
50typedef struct sip_package ip_package;
51typedef ip_package *       package;
52
53typedef struct  n_Procs_s  n_Procs_s;
54
55// #ifdef HAVE_PLURAL
56struct nc_struct;
57typedef struct nc_struct   nc_struct;
58// #endif
59
60typedef struct sip_link    ip_link;
61
62/* the pointer types */
63typedef char *             char_ptr;
64typedef int  *             int_ptr;
65
66#ifdef __cplusplus
67//typedef ip_link *          si_link;
68typedef sleftv *           leftv;
69//typedef slists *           lists;
70//typedef sattr *            attr;
71typedef skStrategy *       kStrategy;
72typedef ssyStrategy *      syStrategy;
73typedef 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
89extern "C" {
90#endif
91void  m2_end(int i);
92#ifdef __cplusplus
93}
94#endif
95
96/* 7.2 C++-routines : */
97
98#ifdef __cplusplus
99int   inits(void);
100//int   IsPrime(int i);
101extern int siSeed;
102int siRand();
103#endif
104
105#define loop for(;;)
106
107#ifndef ABS
108#define ABS(x) ((x)<0?(-(x)):(x))
109#endif
110
111class 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
123
124#endif
125
Note: See TracBrowser for help on using the repository browser.