source: git/kernel/structs.h @ 29af60

spielwiese
Last change on this file since 29af60 was 29af60, checked in by Hans Schoenemann <hannes@…>, 10 years ago
chg: structs.h again usable for C and C++
  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[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]31class sleftv;
[c6474a]32class procinfo;
[35aab3]33class skStrategy;
34class ssyStrategy;
[6bde67]35class CPolynomialSummator;
[1495df4]36class CGlobalMultiplier;
[a7fbdd]37class CFormulaPowerMultiplier;
[35aab3]38#endif
39
[da6156]40
41enum tHomog
42{
43  isNotHomog = FALSE,
44  isHomog    = TRUE,
45  testHomog
46};
47
48
[35aab3]49struct sip_package;
[49abe32]50typedef struct sip_package ip_package;
51typedef ip_package *       package;
[35aab3]52
53typedef struct  n_Procs_s  n_Procs_s;
54
[5a9e7b]55// #ifdef HAVE_PLURAL
[35aab3]56struct nc_struct;
57typedef struct nc_struct   nc_struct;
[5a9e7b]58// #endif
[35aab3]59
60typedef struct sip_link    ip_link;
61
62/* the pointer types */
63typedef char *             char_ptr;
64typedef int  *             int_ptr;
65
66#ifdef __cplusplus
[c6474a]67//typedef ip_link *          si_link;
[35aab3]68typedef sleftv *           leftv;
[c6474a]69//typedef slists *           lists;
70//typedef sattr *            attr;
[35aab3]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
[8f64a0f]91void  m2_end(int i);
[35aab3]92#ifdef __cplusplus
93}
94#endif
95
96/* 7.2 C++-routines : */
97
98#ifdef __cplusplus
99int   inits(void);
[ce7f16]100//int   IsPrime(int i);
[35aab3]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
[29d76d4]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
[35aab3]123
124#endif
125
Note: See TracBrowser for help on using the repository browser.