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 struct __ecereNameSpace__ecere__com__Instance;
35 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
37 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
39 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
41 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
43 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
45 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
47 struct __ecereNameSpace__ecere__sys__BTNode;
49 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
51 struct __ecereNameSpace__ecere__sys__BinaryTree
53 struct __ecereNameSpace__ecere__sys__BTNode * root;
55 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
56 void (* FreeKey)(void * key);
57 } __attribute__ ((gcc_struct));
59 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
61 struct __ecereNameSpace__ecere__sys__OldList
68 } __attribute__ ((gcc_struct));
70 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
72 struct __ecereNameSpace__ecere__com__Class
74 struct __ecereNameSpace__ecere__com__Class * prev;
75 struct __ecereNameSpace__ecere__com__Class * next;
81 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
82 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
85 struct __ecereNameSpace__ecere__com__Class * base;
86 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
87 struct __ecereNameSpace__ecere__sys__BinaryTree members;
88 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
89 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
90 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
91 struct __ecereNameSpace__ecere__sys__OldList derivatives;
95 struct __ecereNameSpace__ecere__com__Instance * module;
96 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
97 const char * dataTypeString;
98 struct __ecereNameSpace__ecere__com__Instance * dataType;
100 int defaultAlignment;
101 void (* Initialize)();
103 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
104 const char * designerClass;
105 unsigned int noExpansion;
106 const char * defaultProperty;
107 unsigned int comRedefinition;
110 unsigned int internalDecl;
112 unsigned int computeSize;
114 int destructionWatchOffset;
116 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
117 int inheritanceAccess;
118 const char * fullName;
120 struct __ecereNameSpace__ecere__sys__OldList conversions;
121 struct __ecereNameSpace__ecere__sys__OldList templateParams;
122 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
123 struct __ecereNameSpace__ecere__com__Class * templateClass;
124 struct __ecereNameSpace__ecere__sys__OldList templatized;
126 unsigned int isInstanceClass;
127 unsigned int byValueSystemClass;
128 } __attribute__ ((gcc_struct));
130 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
132 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
134 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
136 struct __ecereNameSpace__ecere__com__Property
138 struct __ecereNameSpace__ecere__com__Property * prev;
139 struct __ecereNameSpace__ecere__com__Property * next;
141 unsigned int isProperty;
144 struct __ecereNameSpace__ecere__com__Class * _class;
145 const char * dataTypeString;
146 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
147 struct __ecereNameSpace__ecere__com__Instance * dataType;
148 void (* Set)(void * , int);
149 int (* Get)(void * );
150 unsigned int (* IsSet)(void * );
154 unsigned int conversion;
155 unsigned int watcherOffset;
156 const char * category;
157 unsigned int compiled;
158 unsigned int selfWatchable;
159 unsigned int isWatchable;
160 } __attribute__ ((gcc_struct));
162 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
164 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
166 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
168 extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
170 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
172 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
174 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
176 struct __ecereNameSpace__ecere__com__Instance
179 struct __ecereNameSpace__ecere__com__Class * _class;
181 } __attribute__ ((gcc_struct));
183 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
185 struct __ecereNameSpace__ecere__com__DataMember
187 struct __ecereNameSpace__ecere__com__DataMember * prev;
188 struct __ecereNameSpace__ecere__com__DataMember * next;
190 unsigned int isProperty;
193 struct __ecereNameSpace__ecere__com__Class * _class;
194 const char * dataTypeString;
195 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
196 struct __ecereNameSpace__ecere__com__Instance * dataType;
200 struct __ecereNameSpace__ecere__sys__OldList members;
201 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
204 } __attribute__ ((gcc_struct));
206 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
208 struct __ecereNameSpace__ecere__com__Method
211 struct __ecereNameSpace__ecere__com__Method * parent;
212 struct __ecereNameSpace__ecere__com__Method * left;
213 struct __ecereNameSpace__ecere__com__Method * right;
218 struct __ecereNameSpace__ecere__com__Class * _class;
220 const char * dataTypeString;
221 struct __ecereNameSpace__ecere__com__Instance * dataType;
223 } __attribute__ ((gcc_struct));
225 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
227 struct __ecereNameSpace__ecere__com__SerialBuffer
229 unsigned char * _buffer;
233 } __attribute__ ((gcc_struct));
235 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
237 struct __ecereNameSpace__ecere__com__DataValue
252 } __attribute__ ((gcc_struct)) __anon1;
253 } __attribute__ ((gcc_struct));
255 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
257 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
263 const char * dataTypeString;
264 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
265 } __attribute__ ((gcc_struct)) __anon1;
266 struct __ecereNameSpace__ecere__com__DataValue expression;
269 const char * memberString;
272 struct __ecereNameSpace__ecere__com__DataMember * member;
273 struct __ecereNameSpace__ecere__com__Property * prop;
274 struct __ecereNameSpace__ecere__com__Method * method;
275 } __attribute__ ((gcc_struct)) __anon1;
276 } __attribute__ ((gcc_struct)) __anon2;
277 } __attribute__ ((gcc_struct)) __anon1;
278 } __attribute__ ((gcc_struct));
280 extern void * memmove(void * , const void * , size_t size);
282 void __ecereNameSpace__ecere__sys__MoveBytes(void * dest, const void * source, unsigned int count)
284 memmove(dest, source, count);
287 extern void * memcpy(void * , const void * , size_t size);
289 void __ecereNameSpace__ecere__sys__CopyBytes(void * dest, const void * source, unsigned int count)
291 memcpy(dest, source, count);
294 void __ecereNameSpace__ecere__sys__CopyBytesBy2(void * dest, const void * source, unsigned int count)
296 memcpy(dest, source, count << 1);
299 void __ecereNameSpace__ecere__sys__CopyBytesBy4(void * dest, const void * source, unsigned int count)
301 memcpy(dest, source, count << 2);
304 extern void * memset(void * area, int value, size_t count);
306 void __ecereNameSpace__ecere__sys__FillBytes(void * area, unsigned char value, unsigned int count)
308 memset(area, value, count);
311 void __ecereNameSpace__ecere__sys__FillBytesBy2(void * area, unsigned short value, unsigned int count)
313 unsigned short * dest = area;
316 for(c = 0; c < count; c++)
320 void __ecereNameSpace__ecere__sys__FillBytesBy4(void * area, unsigned int value, unsigned int count)
322 unsigned int * dest = area;
325 for(c = 0; c < count; c++)
329 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
331 struct __ecereNameSpace__ecere__com__GlobalFunction;
333 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(const char * name, const char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
335 void __ecereRegisterModule_memory(struct __ecereNameSpace__ecere__com__Instance * module)
337 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
339 __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);
340 __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);
341 __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);
342 __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);
343 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytes", "void ecere::sys::FillBytes(void * area, byte value, uint count)", __ecereNameSpace__ecere__sys__FillBytes, module, 1);
344 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytesBy2", "void ecere::sys::FillBytesBy2(void * area, uint16 value, uint count)", __ecereNameSpace__ecere__sys__FillBytesBy2, module, 1);
345 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytesBy4", "void ecere::sys::FillBytesBy4(void * area, uint value, uint count)", __ecereNameSpace__ecere__sys__FillBytesBy4, module, 1);
348 void __ecereUnregisterModule_memory(struct __ecereNameSpace__ecere__com__Instance * module)