return flag to indicate errors
[repair.git] / Repair / RepairCompiler / MCC / CRuntime / tmap.h
1 #ifndef TMAP_H
2 #define TMAP_H
3 #include "classlist.h"
4 #include "redblack.h"
5
6 #ifndef bool
7 #define bool int
8 #endif
9
10 #ifndef true
11 #define true 1
12 #endif
13
14 #ifndef false
15 #define false 0
16 #endif
17
18 struct typemap * allocatetypemap();
19 void freetypemap(struct typemap *);
20 void typemapreset(struct typemap *);
21 void initializetypemapstack(struct typemap *, void *high);
22
23 void typemapallocate(struct typemap *, void *, int);
24 void typemapdeallocate(struct typemap *, void *);
25 bool typemapassertvalidmemoryB(struct typemap *, void* low, void* high);
26 bool typemapasserttypeB(struct typemap *, void *ptr, void *high, int structure);
27 bool typemapassertvalidmemory(struct typemap *, void* low, int structure);
28 bool typemapassertexactmemory(struct typemap *, void* low, int structure);
29 bool typemapasserttype(struct typemap *, void *ptr, int structure);
30 bool typemapistype(struct typemap *, void *ptr, void *high, int structure);
31 bool typemapcheckmemory(struct typemap *, void* low, void* high);
32 void * typemapgetendofblock(struct typemap *thisvar, void* low);
33 bool typemapchecktype(struct typemap *, bool doaction,void *ptr, int structure);
34 bool typemapchecktypeB(struct typemap *, bool doaction, void *low, void *high,int structure, struct rbtree *ttree);
35 int typemapfindoffsetstructure(struct typemap *, int s, int offset);
36
37
38 struct typemap {
39   void *low;
40   void *high;
41   struct rbtree *alloctree;
42   struct rbtree *typetree;
43 };
44
45 struct structuremap * allocatestructuremap(int s);
46 void freestructuremap(struct structuremap *);
47
48 struct structuremap {
49   int str;
50   struct rbtree *typetree;
51 };
52 #endif