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 void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
43 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
45 struct __ecereNameSpace__ecere__sys__BTNode;
47 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
49 struct __ecereNameSpace__ecere__sys__BinaryTree
51 struct __ecereNameSpace__ecere__sys__BTNode * root;
53 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
54 void (* FreeKey)(void * key);
55 } __attribute__ ((gcc_struct));
57 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
59 struct __ecereNameSpace__ecere__sys__OldList
66 } __attribute__ ((gcc_struct));
68 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
70 struct __ecereNameSpace__ecere__com__Class
72 struct __ecereNameSpace__ecere__com__Class * prev;
73 struct __ecereNameSpace__ecere__com__Class * next;
79 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
80 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
83 struct __ecereNameSpace__ecere__com__Class * base;
84 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
85 struct __ecereNameSpace__ecere__sys__BinaryTree members;
86 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
87 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
88 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
89 struct __ecereNameSpace__ecere__sys__OldList derivatives;
93 struct __ecereNameSpace__ecere__com__Instance * module;
94 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
95 const char * dataTypeString;
96 struct __ecereNameSpace__ecere__com__Instance * dataType;
99 void (* Initialize)();
101 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
102 const char * designerClass;
103 unsigned int noExpansion;
104 const char * defaultProperty;
105 unsigned int comRedefinition;
108 unsigned int internalDecl;
110 unsigned int computeSize;
112 int destructionWatchOffset;
114 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
115 int inheritanceAccess;
116 const char * fullName;
118 struct __ecereNameSpace__ecere__sys__OldList conversions;
119 struct __ecereNameSpace__ecere__sys__OldList templateParams;
120 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
121 struct __ecereNameSpace__ecere__com__Class * templateClass;
122 struct __ecereNameSpace__ecere__sys__OldList templatized;
124 unsigned int isInstanceClass;
125 unsigned int byValueSystemClass;
126 } __attribute__ ((gcc_struct));
128 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
130 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
132 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
134 struct __ecereNameSpace__ecere__com__Property
136 struct __ecereNameSpace__ecere__com__Property * prev;
137 struct __ecereNameSpace__ecere__com__Property * next;
139 unsigned int isProperty;
142 struct __ecereNameSpace__ecere__com__Class * _class;
143 const char * dataTypeString;
144 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
145 struct __ecereNameSpace__ecere__com__Instance * dataType;
146 void (* Set)(void * , int);
147 int (* Get)(void * );
148 unsigned int (* IsSet)(void * );
152 unsigned int conversion;
153 unsigned int watcherOffset;
154 const char * category;
155 unsigned int compiled;
156 unsigned int selfWatchable;
157 unsigned int isWatchable;
158 } __attribute__ ((gcc_struct));
160 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
162 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
164 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
166 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);
168 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
170 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
172 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
174 struct __ecereNameSpace__ecere__com__Instance
177 struct __ecereNameSpace__ecere__com__Class * _class;
179 } __attribute__ ((gcc_struct));
181 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
183 struct __ecereNameSpace__ecere__com__DataMember
185 struct __ecereNameSpace__ecere__com__DataMember * prev;
186 struct __ecereNameSpace__ecere__com__DataMember * next;
188 unsigned int isProperty;
191 struct __ecereNameSpace__ecere__com__Class * _class;
192 const char * dataTypeString;
193 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
194 struct __ecereNameSpace__ecere__com__Instance * dataType;
198 struct __ecereNameSpace__ecere__sys__OldList members;
199 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
202 } __attribute__ ((gcc_struct));
204 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
206 struct __ecereNameSpace__ecere__com__Method
209 struct __ecereNameSpace__ecere__com__Method * parent;
210 struct __ecereNameSpace__ecere__com__Method * left;
211 struct __ecereNameSpace__ecere__com__Method * right;
216 struct __ecereNameSpace__ecere__com__Class * _class;
218 const char * dataTypeString;
219 struct __ecereNameSpace__ecere__com__Instance * dataType;
221 } __attribute__ ((gcc_struct));
223 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
225 struct __ecereNameSpace__ecere__com__SerialBuffer
227 unsigned char * _buffer;
231 } __attribute__ ((gcc_struct));
233 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
235 struct __ecereNameSpace__ecere__com__DataValue
250 } __attribute__ ((gcc_struct));
251 } __attribute__ ((gcc_struct));
253 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
255 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
261 const char * dataTypeString;
262 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
263 } __attribute__ ((gcc_struct));
264 struct __ecereNameSpace__ecere__com__DataValue expression;
267 const char * memberString;
270 struct __ecereNameSpace__ecere__com__DataMember * member;
271 struct __ecereNameSpace__ecere__com__Property * prop;
272 struct __ecereNameSpace__ecere__com__Method * method;
273 } __attribute__ ((gcc_struct));
274 } __attribute__ ((gcc_struct));
275 } __attribute__ ((gcc_struct));
276 } __attribute__ ((gcc_struct));
278 extern void * memmove(void * , const void * , size_t size);
280 void __ecereNameSpace__ecere__sys__MoveBytes(void * dest, const void * source, unsigned int count)
282 memmove(dest, source, count);
285 extern void * memcpy(void * , const void * , size_t size);
287 void __ecereNameSpace__ecere__sys__CopyBytes(void * dest, const void * source, unsigned int count)
289 memcpy(dest, source, count);
292 void __ecereNameSpace__ecere__sys__CopyBytesBy2(void * dest, const void * source, unsigned int count)
294 memcpy(dest, source, count << 1);
297 void __ecereNameSpace__ecere__sys__CopyBytesBy4(void * dest, const void * source, unsigned int count)
299 memcpy(dest, source, count << 2);
302 extern void * memset(void * area, int value, size_t count);
304 void __ecereNameSpace__ecere__sys__FillBytes(void * area, unsigned char value, unsigned int count)
306 memset(area, value, count);
309 void __ecereNameSpace__ecere__sys__FillBytesBy2(void * area, unsigned short value, unsigned int count)
311 unsigned short * dest = area;
314 for(c = 0; c < count; c++)
318 void __ecereNameSpace__ecere__sys__FillBytesBy4(void * area, unsigned int value, unsigned int count)
320 unsigned int * dest = area;
323 for(c = 0; c < count; c++)
327 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
329 struct __ecereNameSpace__ecere__com__GlobalFunction;
331 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);
333 void __ecereRegisterModule_memory(struct __ecereNameSpace__ecere__com__Instance * module)
335 struct __ecereNameSpace__ecere__com__Class * class;
337 __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);
338 __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);
339 __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);
340 __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);
341 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytes", "void ecere::sys::FillBytes(void * area, byte value, uint count)", __ecereNameSpace__ecere__sys__FillBytes, module, 1);
342 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytesBy2", "void ecere::sys::FillBytesBy2(void * area, uint16 value, uint count)", __ecereNameSpace__ecere__sys__FillBytesBy2, module, 1);
343 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::FillBytesBy4", "void ecere::sys::FillBytesBy4(void * area, uint value, uint count)", __ecereNameSpace__ecere__sys__FillBytesBy4, module, 1);
346 void __ecereUnregisterModule_memory(struct __ecereNameSpace__ecere__com__Instance * module)