1 /* Code generated from eC source file: memory.ec */
3 typedef long long int64;
4 typedef unsigned long long uint64;
8 #elif defined(__TINYC__)
10 #define __builtin_va_list va_list
11 #define __builtin_va_start va_start
12 #define __builtin_va_end va_end
14 #define strcasecmp stricmp
15 #define strncasecmp strnicmp
16 #define __declspec(x) __attribute__((x))
20 typedef long long int64;
21 typedef unsigned long long uint64;
23 typedef __int64 int64;
24 typedef unsigned __int64 uint64;
27 #define __ENDIAN_PAD(x) (8 - (x))
29 #define __ENDIAN_PAD(x) 0
32 #include <sys/types.h>
33 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
35 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
37 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
39 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
41 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
43 struct __ecereNameSpace__ecere__sys__BTNode;
45 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
47 struct __ecereNameSpace__ecere__sys__BinaryTree
49 struct __ecereNameSpace__ecere__sys__BTNode * root;
51 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
52 void (* FreeKey)(void * key);
53 } __attribute__ ((gcc_struct));
55 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
57 struct __ecereNameSpace__ecere__sys__OldList
64 } __attribute__ ((gcc_struct));
66 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
68 struct __ecereNameSpace__ecere__com__Class
70 struct __ecereNameSpace__ecere__com__Class * prev;
71 struct __ecereNameSpace__ecere__com__Class * next;
77 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
78 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
81 struct __ecereNameSpace__ecere__com__Class * base;
82 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
83 struct __ecereNameSpace__ecere__sys__BinaryTree members;
84 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
85 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
86 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
87 struct __ecereNameSpace__ecere__sys__OldList derivatives;
91 struct __ecereNameSpace__ecere__com__Instance * module;
92 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
93 char * dataTypeString;
94 struct __ecereNameSpace__ecere__com__Instance * dataType;
97 void (* Initialize)();
99 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
100 char * designerClass;
101 unsigned int noExpansion;
102 char * defaultProperty;
103 unsigned int comRedefinition;
105 unsigned int isRemote;
106 unsigned int internalDecl;
108 unsigned int computeSize;
110 int destructionWatchOffset;
112 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
113 int inheritanceAccess;
116 struct __ecereNameSpace__ecere__sys__OldList conversions;
117 struct __ecereNameSpace__ecere__sys__OldList templateParams;
118 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
119 struct __ecereNameSpace__ecere__com__Class * templateClass;
120 struct __ecereNameSpace__ecere__sys__OldList templatized;
122 unsigned int isInstanceClass;
123 } __attribute__ ((gcc_struct));
125 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
127 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
129 struct __ecereNameSpace__ecere__com__Instance
132 struct __ecereNameSpace__ecere__com__Class * _class;
134 } __attribute__ ((gcc_struct));
136 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
138 struct __ecereNameSpace__ecere__com__Property
140 struct __ecereNameSpace__ecere__com__Property * prev;
141 struct __ecereNameSpace__ecere__com__Property * next;
143 unsigned int isProperty;
146 struct __ecereNameSpace__ecere__com__Class * _class;
147 char * dataTypeString;
148 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
149 struct __ecereNameSpace__ecere__com__Instance * dataType;
150 void (* Set)(void * , int);
151 int (* Get)(void * );
152 unsigned int (* IsSet)(void * );
156 unsigned int conversion;
157 unsigned int watcherOffset;
159 unsigned int compiled;
160 unsigned int selfWatchable;
161 unsigned int isWatchable;
162 } __attribute__ ((gcc_struct));
164 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
166 struct __ecereNameSpace__ecere__com__DataMember
168 struct __ecereNameSpace__ecere__com__DataMember * prev;
169 struct __ecereNameSpace__ecere__com__DataMember * next;
171 unsigned int isProperty;
174 struct __ecereNameSpace__ecere__com__Class * _class;
175 char * dataTypeString;
176 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
177 struct __ecereNameSpace__ecere__com__Instance * dataType;
181 struct __ecereNameSpace__ecere__sys__OldList members;
182 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
185 } __attribute__ ((gcc_struct));
187 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
189 struct __ecereNameSpace__ecere__com__Method
192 struct __ecereNameSpace__ecere__com__Method * parent;
193 struct __ecereNameSpace__ecere__com__Method * left;
194 struct __ecereNameSpace__ecere__com__Method * right;
199 struct __ecereNameSpace__ecere__com__Class * _class;
201 char * dataTypeString;
202 struct __ecereNameSpace__ecere__com__Instance * dataType;
204 } __attribute__ ((gcc_struct));
206 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
208 struct __ecereNameSpace__ecere__com__SerialBuffer
210 unsigned char * _buffer;
214 } __attribute__ ((gcc_struct));
216 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
218 struct __ecereNameSpace__ecere__com__DataValue
233 } __attribute__ ((gcc_struct));
234 } __attribute__ ((gcc_struct));
236 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
238 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
244 char * dataTypeString;
245 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
246 } __attribute__ ((gcc_struct));
247 struct __ecereNameSpace__ecere__com__DataValue expression;
253 struct __ecereNameSpace__ecere__com__DataMember * member;
254 struct __ecereNameSpace__ecere__com__Property * prop;
255 struct __ecereNameSpace__ecere__com__Method * method;
256 } __attribute__ ((gcc_struct));
257 } __attribute__ ((gcc_struct));
258 } __attribute__ ((gcc_struct));
259 } __attribute__ ((gcc_struct));
261 extern void * memmove(void * , const void * , size_t size);
263 void __ecereNameSpace__ecere__sys__MoveBytes(void * dest, const void * source, unsigned int count)
265 memmove(dest, source, count);
268 extern void * memcpy(void * , const void * , size_t size);
270 void __ecereNameSpace__ecere__sys__CopyBytes(void * dest, const void * source, unsigned int count)
272 memcpy(dest, source, count);
275 void __ecereNameSpace__ecere__sys__CopyBytesBy2(void * dest, const void * source, unsigned int count)
277 memcpy(dest, source, count << 1);
280 void __ecereNameSpace__ecere__sys__CopyBytesBy4(void * dest, const void * source, unsigned int count)
282 memcpy(dest, source, count << 2);
285 extern void * memset(void * area, int value, size_t count);
287 void __ecereNameSpace__ecere__sys__FillBytes(void * area, unsigned char value, unsigned int count)
289 memset(area, value, count);
292 void __ecereNameSpace__ecere__sys__FillBytesBy2(void * area, unsigned short value, unsigned int count)
294 unsigned short * dest = area;
297 for(c = 0; c < count; c++)
301 void __ecereNameSpace__ecere__sys__FillBytesBy4(void * area, unsigned int value, unsigned int count)
303 unsigned int * dest = area;
306 for(c = 0; c < count; c++)
310 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
312 struct __ecereNameSpace__ecere__com__GlobalFunction;
314 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(char * name, char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
316 void __ecereRegisterModule_memory(struct __ecereNameSpace__ecere__com__Instance * module)
318 struct __ecereNameSpace__ecere__com__Class * class;
320 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::MoveBytes", "void ecere::sys::MoveBytes(void * dest, const void * source, uint count)", __ecereNameSpace__ecere__sys__MoveBytes, module, 1);
321 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::CopyBytes", "void ecere::sys::CopyBytes(void * dest, const void * source, uint count)", __ecereNameSpace__ecere__sys__CopyBytes, module, 1);
322 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::CopyBytesBy2", "void ecere::sys::CopyBytesBy2(void * dest, const void * source, uint count)", __ecereNameSpace__ecere__sys__CopyBytesBy2, module, 1);
323 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::CopyBytesBy4", "void ecere::sys::CopyBytesBy4(void * dest, const void * source, uint count)", __ecereNameSpace__ecere__sys__CopyBytesBy4, module, 1);
324 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytes", "void ecere::sys::FillBytes(void * area, byte value, uint count)", __ecereNameSpace__ecere__sys__FillBytes, module, 1);
325 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytesBy2", "void ecere::sys::FillBytesBy2(void * area, uint16 value, uint count)", __ecereNameSpace__ecere__sys__FillBytesBy2, module, 1);
326 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytesBy4", "void ecere::sys::FillBytesBy4(void * area, uint value, uint count)", __ecereNameSpace__ecere__sys__FillBytesBy4, module, 1);
329 void __ecereUnregisterModule_memory(struct __ecereNameSpace__ecere__com__Instance * module)