1 /* Code generated from eC source file: TempFile.ec */
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
7 #define __runtimePlatform 2
10 typedef long long int64;
11 typedef unsigned long long uint64;
15 #elif defined(__TINYC__)
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
27 typedef long long int64;
28 typedef unsigned long long uint64;
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
34 #define __ENDIAN_PAD(x) (8 - (x))
36 #define __ENDIAN_PAD(x) 0
39 #include <sys/types.h>
41 #if /*defined(_W64) || */(defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
47 #define arch_PointerSize sizeof(void *)
48 #define structSize_Instance (_64BIT ? 24 : 12)
50 struct __ecereNameSpace__ecere__com__Instance;
52 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
54 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
56 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
58 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
60 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
62 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
64 struct __ecereNameSpace__ecere__sys__BTNode;
66 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
68 struct __ecereNameSpace__ecere__sys__BinaryTree
70 struct __ecereNameSpace__ecere__sys__BTNode * root;
72 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
73 void (* FreeKey)(void * key);
74 } __attribute__ ((gcc_struct));
76 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
78 struct __ecereNameSpace__ecere__sys__OldList
85 } __attribute__ ((gcc_struct));
87 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
89 struct __ecereNameSpace__ecere__com__Class
91 struct __ecereNameSpace__ecere__com__Class * prev;
92 struct __ecereNameSpace__ecere__com__Class * next;
98 unsigned int (* Constructor)(void * );
99 void (* Destructor)(void * );
102 struct __ecereNameSpace__ecere__com__Class * base;
103 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
104 struct __ecereNameSpace__ecere__sys__BinaryTree members;
105 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
106 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
107 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
108 struct __ecereNameSpace__ecere__sys__OldList derivatives;
112 struct __ecereNameSpace__ecere__com__Instance * module;
113 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
114 const char * dataTypeString;
115 struct __ecereNameSpace__ecere__com__Instance * dataType;
117 int defaultAlignment;
118 void (* Initialize)();
120 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
121 const char * designerClass;
122 unsigned int noExpansion;
123 const char * defaultProperty;
124 unsigned int comRedefinition;
127 unsigned int internalDecl;
129 unsigned int computeSize;
131 int destructionWatchOffset;
133 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
134 int inheritanceAccess;
135 const char * fullName;
137 struct __ecereNameSpace__ecere__sys__OldList conversions;
138 struct __ecereNameSpace__ecere__sys__OldList templateParams;
139 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
140 struct __ecereNameSpace__ecere__com__Class * templateClass;
141 struct __ecereNameSpace__ecere__sys__OldList templatized;
143 unsigned int isInstanceClass;
144 unsigned int byValueSystemClass;
145 } __attribute__ ((gcc_struct));
147 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
149 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
151 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
153 struct __ecereNameSpace__ecere__com__Property
155 struct __ecereNameSpace__ecere__com__Property * prev;
156 struct __ecereNameSpace__ecere__com__Property * next;
158 unsigned int isProperty;
161 struct __ecereNameSpace__ecere__com__Class * _class;
162 const char * dataTypeString;
163 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
164 struct __ecereNameSpace__ecere__com__Instance * dataType;
165 void (* Set)(void * , int);
166 int (* Get)(void * );
167 unsigned int (* IsSet)(void * );
171 unsigned int conversion;
172 unsigned int watcherOffset;
173 const char * category;
174 unsigned int compiled;
175 unsigned int selfWatchable;
176 unsigned int isWatchable;
177 } __attribute__ ((gcc_struct));
179 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
181 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
183 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
185 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);
187 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
189 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
191 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
193 struct __ecereNameSpace__ecere__com__Instance
196 struct __ecereNameSpace__ecere__com__Class * _class;
198 } __attribute__ ((gcc_struct));
200 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
202 struct __ecereNameSpace__ecere__com__DataMember
204 struct __ecereNameSpace__ecere__com__DataMember * prev;
205 struct __ecereNameSpace__ecere__com__DataMember * next;
207 unsigned int isProperty;
210 struct __ecereNameSpace__ecere__com__Class * _class;
211 const char * dataTypeString;
212 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
213 struct __ecereNameSpace__ecere__com__Instance * dataType;
217 struct __ecereNameSpace__ecere__sys__OldList members;
218 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
221 } __attribute__ ((gcc_struct));
223 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
225 struct __ecereNameSpace__ecere__com__Method
228 struct __ecereNameSpace__ecere__com__Method * parent;
229 struct __ecereNameSpace__ecere__com__Method * left;
230 struct __ecereNameSpace__ecere__com__Method * right;
235 struct __ecereNameSpace__ecere__com__Class * _class;
237 const char * dataTypeString;
238 struct __ecereNameSpace__ecere__com__Instance * dataType;
240 } __attribute__ ((gcc_struct));
242 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
244 struct __ecereNameSpace__ecere__com__SerialBuffer
246 unsigned char * _buffer;
250 } __attribute__ ((gcc_struct));
252 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
254 struct __ecereNameSpace__ecere__com__DataValue
269 } __attribute__ ((gcc_struct)) __anon1;
270 } __attribute__ ((gcc_struct));
272 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
274 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
280 const char * dataTypeString;
281 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
282 } __attribute__ ((gcc_struct)) __anon1;
283 struct __ecereNameSpace__ecere__com__DataValue expression;
286 const char * memberString;
289 struct __ecereNameSpace__ecere__com__DataMember * member;
290 struct __ecereNameSpace__ecere__com__Property * prop;
291 struct __ecereNameSpace__ecere__com__Method * method;
292 } __attribute__ ((gcc_struct)) __anon1;
293 } __attribute__ ((gcc_struct)) __anon2;
294 } __attribute__ ((gcc_struct)) __anon1;
295 } __attribute__ ((gcc_struct));
297 static __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__TempFile_openMode, * __ecerePropM___ecereNameSpace__ecere__sys__TempFile_openMode;
299 static __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__TempFile_buffer, * __ecerePropM___ecereNameSpace__ecere__sys__TempFile_buffer;
301 struct __ecereNameSpace__ecere__sys__TempFile
303 unsigned char * buffer;
305 unsigned int position;
308 unsigned int allocated;
309 } __attribute__ ((gcc_struct));
311 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
313 unsigned int __ecereConstructor___ecereNameSpace__ecere__sys__TempFile(struct __ecereNameSpace__ecere__com__Instance * this)
315 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
317 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->openMode = 5;
321 void __ecereDestructor___ecereNameSpace__ecere__sys__TempFile(struct __ecereNameSpace__ecere__com__Instance * this)
323 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
326 (__ecereNameSpace__ecere__com__eSystem_Delete(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer), __ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer = 0);
330 extern void * memcpy(void * , const void * , size_t size);
332 int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Read(struct __ecereNameSpace__ecere__com__Instance * this, unsigned char * buffer, unsigned int size, unsigned int count)
335 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
336 int readSize = size * count;
337 int read = (__simpleStruct0 = __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size - __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position, (readSize < __simpleStruct0) ? readSize : __simpleStruct0);
339 if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->position >= __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size)
340 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->eof = 1;
342 memcpy(buffer, __ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer + __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position, read);
343 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position += read;
347 int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Write(struct __ecereNameSpace__ecere__com__Instance * this, const unsigned char * buffer, unsigned int size, unsigned int count)
349 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
350 int writeSize = size * count;
351 int written = writeSize;
353 if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->size - __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position < writeSize)
355 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size += writeSize - (__ecerePointer___ecereNameSpace__ecere__sys__TempFile->size - __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position);
356 if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->allocated < __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size)
358 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->allocated *= 2;
359 if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->allocated < __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size)
360 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->allocated = __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size * 2;
361 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer = __ecereNameSpace__ecere__com__eSystem_Renew(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer, sizeof(unsigned char) * (__ecerePointer___ecereNameSpace__ecere__sys__TempFile->allocated));
364 memcpy(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer + __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position, buffer, writeSize);
365 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position += written;
366 return written / size;
369 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
371 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Getc(struct __ecereNameSpace__ecere__com__Instance * this, char * ch)
373 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
374 int read = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
375 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
377 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
378 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(this, ch, 1, 1);
380 return !__ecerePointer___ecereNameSpace__ecere__sys__TempFile->eof && read != 0;
383 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
385 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Putc(struct __ecereNameSpace__ecere__com__Instance * this, char ch)
387 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
388 int written = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
389 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
391 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
392 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(this, &ch, 1, 1);
397 extern size_t strlen(const char * );
399 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Puts(struct __ecereNameSpace__ecere__com__Instance * this, const char * string)
401 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
402 int len = string ? strlen(string) : 0;
403 int written = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
404 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = this;
406 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
407 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(this, string, 1, len);
409 return written == len;
412 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Seek(struct __ecereNameSpace__ecere__com__Instance * this, int pos, int mode)
414 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
415 unsigned int result = 1;
416 unsigned int increase = 0;
422 if(pos >= __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size)
424 if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->openMode == 4)
426 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = pos;
427 increase = pos - __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size;
431 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size;
437 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = 0;
441 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = pos;
446 if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->position + pos >= __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size)
448 if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->openMode == 4)
450 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position += pos;
451 increase = __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position - __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size;
455 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size;
459 else if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->position + pos < 0)
461 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = 0;
465 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position += pos;
470 if((int)__ecerePointer___ecereNameSpace__ecere__sys__TempFile->size + pos >= (int)__ecerePointer___ecereNameSpace__ecere__sys__TempFile->size)
472 if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->openMode == 4)
474 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size + pos;
475 increase = __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position - __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size;
479 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size;
483 else if((int)__ecerePointer___ecereNameSpace__ecere__sys__TempFile->size + pos < 0)
485 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = 0;
489 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size + pos;
494 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->eof = 0;
497 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size += increase;
498 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer = __ecereNameSpace__ecere__com__eSystem_Renew(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer, sizeof(unsigned char) * (__ecerePointer___ecereNameSpace__ecere__sys__TempFile->size));
503 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Tell(struct __ecereNameSpace__ecere__com__Instance * this)
505 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
507 return __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position;
510 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Eof(struct __ecereNameSpace__ecere__com__Instance * this)
512 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
514 return __ecerePointer___ecereNameSpace__ecere__sys__TempFile->eof;
517 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_GetSize(struct __ecereNameSpace__ecere__com__Instance * this)
519 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
521 return __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size;
524 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Truncate(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int size)
526 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
528 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer = __ecereNameSpace__ecere__com__eSystem_Renew(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer, sizeof(unsigned char) * (size));
529 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->size = (unsigned int)size;
530 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->allocated = (unsigned int)size;
531 if(__ecerePointer___ecereNameSpace__ecere__sys__TempFile->position > size)
532 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->position = (unsigned int)size;
536 int __ecereProp___ecereNameSpace__ecere__sys__TempFile_Get_openMode(struct __ecereNameSpace__ecere__com__Instance * this)
538 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
540 return __ecerePointer___ecereNameSpace__ecere__sys__TempFile->openMode;
543 void __ecereProp___ecereNameSpace__ecere__sys__TempFile_Set_openMode(struct __ecereNameSpace__ecere__com__Instance * this, int value)
545 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
547 __ecerePointer___ecereNameSpace__ecere__sys__TempFile->openMode = value;
548 __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(this, __ecereProp___ecereNameSpace__ecere__sys__TempFile_openMode), __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(this, __ecerePropM___ecereNameSpace__ecere__sys__TempFile_openMode);
551 unsigned char * __ecereProp___ecereNameSpace__ecere__sys__TempFile_Get_buffer(struct __ecereNameSpace__ecere__com__Instance * this)
553 __attribute__((unused)) struct __ecereNameSpace__ecere__sys__TempFile * __ecerePointer___ecereNameSpace__ecere__sys__TempFile = (struct __ecereNameSpace__ecere__sys__TempFile *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__sys__TempFile->offset) : 0);
555 return __ecerePointer___ecereNameSpace__ecere__sys__TempFile->buffer;
558 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, const char * name, const char * baseName, int size, int sizeClass, unsigned int (* Constructor)(void * ), void (* Destructor)(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
560 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
562 struct __ecereNameSpace__ecere__com__NameSpace
565 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
566 struct __ecereNameSpace__ecere__com__NameSpace * left;
567 struct __ecereNameSpace__ecere__com__NameSpace * right;
569 struct __ecereNameSpace__ecere__com__NameSpace * parent;
570 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
571 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
572 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
573 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
574 } __attribute__ ((gcc_struct));
576 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
578 struct __ecereNameSpace__ecere__com__Module
580 struct __ecereNameSpace__ecere__com__Instance * application;
581 struct __ecereNameSpace__ecere__sys__OldList classes;
582 struct __ecereNameSpace__ecere__sys__OldList defines;
583 struct __ecereNameSpace__ecere__sys__OldList functions;
584 struct __ecereNameSpace__ecere__sys__OldList modules;
585 struct __ecereNameSpace__ecere__com__Instance * prev;
586 struct __ecereNameSpace__ecere__com__Instance * next;
592 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
593 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
594 } __attribute__ ((gcc_struct));
596 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
598 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode);
600 extern struct __ecereNameSpace__ecere__com__Property * __ecereNameSpace__ecere__com__eClass_AddProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * dataType, void * setStmt, void * getStmt, int declMode);
602 void __ecereRegisterModule_TempFile(struct __ecereNameSpace__ecere__com__Instance * module)
604 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
606 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ecere::sys::TempFile", "ecere::sys::File", sizeof(struct __ecereNameSpace__ecere__sys__TempFile), 0, (void *)__ecereConstructor___ecereNameSpace__ecere__sys__TempFile, (void *)__ecereDestructor___ecereNameSpace__ecere__sys__TempFile, module, 1, 1);
607 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
608 __ecereClass___ecereNameSpace__ecere__sys__TempFile = class;
609 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Seek", 0, __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Seek, 1);
610 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Tell", 0, __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Tell, 1);
611 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Read", 0, __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Read, 1);
612 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Write", 0, __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Write, 1);
613 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Getc", 0, __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Getc, 1);
614 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Putc", 0, __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Putc, 1);
615 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Puts", 0, __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Puts, 1);
616 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Eof", 0, __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Eof, 1);
617 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Truncate", 0, __ecereMethod___ecereNameSpace__ecere__sys__TempFile_Truncate, 1);
618 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "GetSize", 0, __ecereMethod___ecereNameSpace__ecere__sys__TempFile_GetSize, 1);
619 __ecerePropM___ecereNameSpace__ecere__sys__TempFile_openMode = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "openMode", "ecere::sys::FileOpenMode", __ecereProp___ecereNameSpace__ecere__sys__TempFile_Set_openMode, __ecereProp___ecereNameSpace__ecere__sys__TempFile_Get_openMode, 1);
620 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
621 __ecereProp___ecereNameSpace__ecere__sys__TempFile_openMode = __ecerePropM___ecereNameSpace__ecere__sys__TempFile_openMode, __ecerePropM___ecereNameSpace__ecere__sys__TempFile_openMode = (void *)0;
622 __ecerePropM___ecereNameSpace__ecere__sys__TempFile_buffer = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "buffer", "byte *", 0, __ecereProp___ecereNameSpace__ecere__sys__TempFile_Get_buffer, 1);
623 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
624 __ecereProp___ecereNameSpace__ecere__sys__TempFile_buffer = __ecerePropM___ecereNameSpace__ecere__sys__TempFile_buffer, __ecerePropM___ecereNameSpace__ecere__sys__TempFile_buffer = (void *)0;
627 void __ecereUnregisterModule_TempFile(struct __ecereNameSpace__ecere__com__Instance * module)
630 __ecerePropM___ecereNameSpace__ecere__sys__TempFile_openMode = (void *)0;
631 __ecerePropM___ecereNameSpace__ecere__sys__TempFile_buffer = (void *)0;