compiler/libec: (#307, #70) Warning on undeclared class; Overriding namespaces
[sdk] / compiler / bootstrap / ecere / bootstrap / BTNode.c
index b4b5c4f..2c627be 100644 (file)
@@ -136,289 +136,246 @@ struct __ecereNameSpace__ecere__sys__BTNode * parent, * left, * right;
 int depth;
 } __attribute__ ((gcc_struct));
 
-int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this);
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this)
+{
+while(this->left)
+this = this->left;
+return this;
+}
 
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this);
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this)
+{
+while(this->right)
+this = this->right;
+return this;
+}
 
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this);
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindString(struct __ecereNameSpace__ecere__sys__BTNode * this, const char * key)
+{
+while(this)
+{
+int result;
 
-int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(struct __ecereNameSpace__ecere__sys__BTNode * this);
+if(key && this->key)
+result = strcmp(key, (const char *)this->key);
+else if(key && !this->key)
+result = 1;
+else if(!key && this->key)
+result = -1;
+else
+result = 0;
+if(result < 0)
+this = this->left;
+else if(result > 0)
+this = this->right;
+else
+break;
+}
+return this;
+}
 
-int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(struct __ecereNameSpace__ecere__sys__BTNode * this);
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindPrefix(struct __ecereNameSpace__ecere__sys__BTNode * this, const char * key)
+{
+struct __ecereNameSpace__ecere__sys__BTNode * subString = (((void *)0));
+int len = key ? strlen(key) : 0;
 
-struct __ecereNameSpace__ecere__com__Class;
+while(this)
+{
+int result;
 
-struct __ecereNameSpace__ecere__com__Instance
+if(key && this->key)
+result = strcmp(key, (const char *)this->key);
+else if(key && !this->key)
+result = 1;
+else if(!key && this->key)
+result = -1;
+else
+result = 0;
+if(result < 0)
 {
-void * *  _vTbl;
-struct __ecereNameSpace__ecere__com__Class * _class;
-int _refCount;
-} __attribute__ ((gcc_struct));
+if(!strncmp(key, (const char *)this->key, len))
+subString = this;
+this = this->left;
+}
+else if(result > 0)
+this = this->right;
+else
+{
+subString = this;
+break;
+}
+}
+return subString;
+}
 
-extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name);
+void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * swap)
+{
+if(swap->left)
+{
+swap->left->parent = swap->parent;
+if(swap == swap->parent->left)
+swap->parent->left = swap->left;
+else if(swap == swap->parent->right)
+swap->parent->right = swap->left;
+swap->left = (((void *)0));
+}
+if(swap->right)
+{
+swap->right->parent = swap->parent;
+if(swap == swap->parent->left)
+swap->parent->left = swap->right;
+else if(swap == swap->parent->right)
+swap->parent->right = swap->right;
+swap->right = (((void *)0));
+}
+if(swap == swap->parent->left)
+swap->parent->left = (((void *)0));
+else if(swap == swap->parent->right)
+swap->parent->right = (((void *)0));
+{
+struct __ecereNameSpace__ecere__sys__BTNode * n;
 
-extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, long long value);
+for(n = swap->parent; n; n = n->parent)
+{
+int __simpleStruct0, __simpleStruct1;
+int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
 
-extern void *  __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
+if(newDepth == n->depth)
+break;
+n->depth = newDepth;
+if(n == this)
+break;
+}
+}
+{
+swap->left = this->left;
+if(this->left)
+this->left->parent = swap;
+}
+{
+swap->right = this->right;
+if(this->right)
+this->right->parent = swap;
+}
+swap->parent = this->parent;
+this->left = (((void *)0));
+this->right = (((void *)0));
+if(this->parent)
+{
+if(this == this->parent->left)
+this->parent->left = swap;
+else if(this == this->parent->right)
+this->parent->right = swap;
+}
+}
 
-extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, const char *  string, long long value);
+int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(struct __ecereNameSpace__ecere__sys__BTNode * this)
+{
+int leftDepth = this->left ? (this->left->depth + 1) : 0;
+int rightDepth = this->right ? (this->right->depth + 1) : 0;
 
-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);
+return rightDepth - leftDepth;
+}
 
-struct __ecereNameSpace__ecere__com__Property
+void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
 {
-struct __ecereNameSpace__ecere__com__Property * prev;
-struct __ecereNameSpace__ecere__com__Property * next;
-const char *  name;
-unsigned int isProperty;
-int memberAccess;
-int id;
-struct __ecereNameSpace__ecere__com__Class * _class;
-const char *  dataTypeString;
-struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-struct __ecereNameSpace__ecere__com__Instance * dataType;
-void (*  Set)(void * , int);
-int (*  Get)(void * );
-unsigned int (*  IsSet)(void * );
-void *  data;
-void *  symbol;
-int vid;
-unsigned int conversion;
-unsigned int watcherOffset;
-const char *  category;
-unsigned int compiled;
-unsigned int selfWatchable;
-unsigned int isWatchable;
-} __attribute__ ((gcc_struct));
+int __simpleStruct2, __simpleStruct3;
+int __simpleStruct0, __simpleStruct1;
 
-extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+if(this->parent)
+{
+if(this == this->parent->left)
+this->parent->left = this->left;
+else if(this == this->parent->right)
+this->parent->right = this->left;
+}
+this->left->parent = this->parent;
+this->parent = this->left;
+this->left = this->parent->right;
+if(this->left)
+this->left->parent = this;
+this->parent->right = this;
+this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
+this->parent->depth = (__simpleStruct2 = this->parent->left ? (this->parent->left->depth + 1) : 0, __simpleStruct3 = this->parent->right ? (this->parent->right->depth + 1) : 0, (__simpleStruct2 > __simpleStruct3) ? __simpleStruct2 : __simpleStruct3);
+{
+struct __ecereNameSpace__ecere__sys__BTNode * n;
 
-extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char *  name, void *  function);
+for(n = this->parent->parent; n; n = n->parent)
+{
+int __simpleStruct0, __simpleStruct1;
+int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
 
-extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
+if(newDepth == n->depth)
+break;
+n->depth = newDepth;
+}
+}
+}
 
-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);
+void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
+{
+int __simpleStruct2, __simpleStruct3;
+int __simpleStruct0, __simpleStruct1;
 
-extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+if(this->parent)
+{
+if(this == this->parent->right)
+this->parent->right = this->right;
+else if(this == this->parent->left)
+this->parent->left = this->right;
+}
+this->right->parent = this->parent;
+this->parent = this->right;
+this->right = this->parent->left;
+if(this->right)
+this->right->parent = this;
+this->parent->left = this;
+this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
+this->parent->depth = (__simpleStruct2 = this->parent->left ? (this->parent->left->depth + 1) : 0, __simpleStruct3 = this->parent->right ? (this->parent->right->depth + 1) : 0, (__simpleStruct2 > __simpleStruct3) ? __simpleStruct2 : __simpleStruct3);
+{
+struct __ecereNameSpace__ecere__sys__BTNode * n;
 
-void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, const void * data);
+for(n = this->parent->parent; n; n = n->parent)
+{
+int __simpleStruct0, __simpleStruct1;
+int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
 
-void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * *  data);
+if(newDepth == n->depth)
+break;
+n->depth = newDepth;
+}
+}
+}
 
-struct __ecereNameSpace__ecere__sys__StringBTNode;
+int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this);
 
-struct __ecereNameSpace__ecere__sys__StringBTNode
-{
-char * key;
-struct __ecereNameSpace__ecere__sys__StringBTNode * parent, * left, * right;
-int depth;
-} __attribute__ ((gcc_struct));
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this);
 
-struct __ecereNameSpace__ecere__sys__BinaryTree;
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this);
 
-struct __ecereNameSpace__ecere__sys__BinaryTree
-{
-struct __ecereNameSpace__ecere__sys__BTNode * root;
-int count;
-int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
-void (*  FreeKey)(void *  key);
-} __attribute__ ((gcc_struct));
+int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(struct __ecereNameSpace__ecere__sys__BTNode * this);
 
-struct __ecereNameSpace__ecere__com__DataMember;
-
-struct __ecereNameSpace__ecere__com__DataMember
-{
-struct __ecereNameSpace__ecere__com__DataMember * prev;
-struct __ecereNameSpace__ecere__com__DataMember * next;
-const char *  name;
-unsigned int isProperty;
-int memberAccess;
-int id;
-struct __ecereNameSpace__ecere__com__Class * _class;
-const char *  dataTypeString;
-struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-struct __ecereNameSpace__ecere__com__Instance * dataType;
-int type;
-int offset;
-int memberID;
-struct __ecereNameSpace__ecere__sys__OldList members;
-struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
-int memberOffset;
-short structAlignment;
-short pointerAlignment;
-} __attribute__ ((gcc_struct));
-
-extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, const char *  type, unsigned int size, unsigned int alignment, int declMode);
-
-struct __ecereNameSpace__ecere__com__Method;
-
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument
-{
-union
-{
-struct
-{
-const char *  dataTypeString;
-struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-} __attribute__ ((gcc_struct)) __anon1;
-struct __ecereNameSpace__ecere__com__DataValue expression;
-struct
-{
-const char *  memberString;
-union
-{
-struct __ecereNameSpace__ecere__com__DataMember * member;
-struct __ecereNameSpace__ecere__com__Property * prop;
-struct __ecereNameSpace__ecere__com__Method * method;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct)) __anon2;
-} __attribute__ ((gcc_struct)) __anon1;
-} __attribute__ ((gcc_struct));
-
-struct __ecereNameSpace__ecere__com__Method
-{
-const char *  name;
-struct __ecereNameSpace__ecere__com__Method * parent;
-struct __ecereNameSpace__ecere__com__Method * left;
-struct __ecereNameSpace__ecere__com__Method * right;
-int depth;
-int (*  function)();
-int vid;
-int type;
-struct __ecereNameSpace__ecere__com__Class * _class;
-void *  symbol;
-const char *  dataTypeString;
-struct __ecereNameSpace__ecere__com__Instance * dataType;
-int memberAccess;
-} __attribute__ ((gcc_struct));
-
-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);
-
-struct __ecereNameSpace__ecere__com__Module;
-
-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);
-
-extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
-
-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);
-
-struct __ecereNameSpace__ecere__com__NameSpace;
+int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(struct __ecereNameSpace__ecere__sys__BTNode * this);
 
-struct __ecereNameSpace__ecere__com__NameSpace
+void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
 {
-const char *  name;
-struct __ecereNameSpace__ecere__com__NameSpace *  btParent;
-struct __ecereNameSpace__ecere__com__NameSpace *  left;
-struct __ecereNameSpace__ecere__com__NameSpace *  right;
-int depth;
-struct __ecereNameSpace__ecere__com__NameSpace *  parent;
-struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
-struct __ecereNameSpace__ecere__sys__BinaryTree classes;
-struct __ecereNameSpace__ecere__sys__BinaryTree defines;
-struct __ecereNameSpace__ecere__sys__BinaryTree functions;
-} __attribute__ ((gcc_struct));
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this->left);
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
+}
 
-struct __ecereNameSpace__ecere__com__Class
+void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
 {
-struct __ecereNameSpace__ecere__com__Class * prev;
-struct __ecereNameSpace__ecere__com__Class * next;
-const char *  name;
-int offset;
-int structSize;
-void * *  _vTbl;
-int vTblSize;
-unsigned int (*  Constructor)(void * );
-void (*  Destructor)(void * );
-int offsetClass;
-int sizeClass;
-struct __ecereNameSpace__ecere__com__Class * base;
-struct __ecereNameSpace__ecere__sys__BinaryTree methods;
-struct __ecereNameSpace__ecere__sys__BinaryTree members;
-struct __ecereNameSpace__ecere__sys__BinaryTree prop;
-struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
-struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
-struct __ecereNameSpace__ecere__sys__OldList derivatives;
-int memberID;
-int startMemberID;
-int type;
-struct __ecereNameSpace__ecere__com__Instance * module;
-struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
-const char *  dataTypeString;
-struct __ecereNameSpace__ecere__com__Instance * dataType;
-int typeSize;
-int defaultAlignment;
-void (*  Initialize)();
-int memberOffset;
-struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
-const char *  designerClass;
-unsigned int noExpansion;
-const char *  defaultProperty;
-unsigned int comRedefinition;
-int count;
-int isRemote;
-unsigned int internalDecl;
-void *  data;
-unsigned int computeSize;
-short structAlignment;
-short pointerAlignment;
-int destructionWatchOffset;
-unsigned int fixed;
-struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
-int inheritanceAccess;
-const char *  fullName;
-void *  symbol;
-struct __ecereNameSpace__ecere__sys__OldList conversions;
-struct __ecereNameSpace__ecere__sys__OldList templateParams;
-struct __ecereNameSpace__ecere__com__ClassTemplateArgument *  templateArgs;
-struct __ecereNameSpace__ecere__com__Class * templateClass;
-struct __ecereNameSpace__ecere__sys__OldList templatized;
-int numParams;
-unsigned int isInstanceClass;
-unsigned int byValueSystemClass;
-} __attribute__ ((gcc_struct));
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this->right);
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
+}
 
-struct __ecereNameSpace__ecere__com__Application
+int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this)
 {
-int argc;
-const char * *  argv;
-int exitCode;
-unsigned int isGUIApp;
-struct __ecereNameSpace__ecere__sys__OldList allModules;
-char *  parsedCommand;
-struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
-} __attribute__ ((gcc_struct));
-
-static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle;
-
-static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
-
-static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__StringBTNode;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_bool;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_uint;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_String;
-
-extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
+int leftDepth = this->left ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->left) + 1) : 0;
+int rightDepth = this->right ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->right) + 1) : 0;
 
-struct __ecereNameSpace__ecere__com__Module
-{
-struct __ecereNameSpace__ecere__com__Instance * application;
-struct __ecereNameSpace__ecere__sys__OldList classes;
-struct __ecereNameSpace__ecere__sys__OldList defines;
-struct __ecereNameSpace__ecere__sys__OldList functions;
-struct __ecereNameSpace__ecere__sys__OldList modules;
-struct __ecereNameSpace__ecere__com__Instance * prev;
-struct __ecereNameSpace__ecere__com__Instance * next;
-const char *  name;
-void *  library;
-void *  Unload;
-int importType;
-int origImportType;
-struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
-struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
-} __attribute__ ((gcc_struct));
+return ((leftDepth > rightDepth) ? leftDepth : rightDepth);
+}
 
 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_prev(struct __ecereNameSpace__ecere__sys__BTNode * this)
 {
@@ -452,46 +409,211 @@ this = parent;
 return (((void *)0));
 }
 
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this)
-{
-while(this->left)
-this = this->left;
-return this;
-}
-
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this)
-{
-while(this->right)
-this = this->right;
-return this;
-}
-
 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(struct __ecereNameSpace__ecere__sys__BTNode * this)
 {
 return 1 + (this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(this->left) : 0) + (this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(this->right) : 0);
 }
 
-int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this)
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(struct __ecereNameSpace__ecere__sys__BTNode * this)
 {
-int leftDepth = this->left ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->left) + 1) : 0;
-int rightDepth = this->right ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->right) + 1) : 0;
+while(1)
+{
+int factor = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this);
 
-return ((leftDepth > rightDepth) ? leftDepth : rightDepth);
+if(factor < -1)
+{
+if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->left) == 1)
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(this);
+else
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
 }
-
-unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Add(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BinaryTree * tree, struct __ecereNameSpace__ecere__sys__BTNode * node)
+else if(factor > 1)
 {
-uintptr_t newKey = node->key;
+if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->right) == -1)
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(this);
+else
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
+}
+if(this->parent)
+this = this->parent;
+else
+return this;
+}
+}
 
-while(1)
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
 {
-int result = tree->CompareKey(tree, newKey, this->key);
+struct __ecereNameSpace__ecere__sys__BTNode * swap = this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(this->left) : this->right;
+struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
 
-if(!result)
+if(swap)
 {
-return 0;
+swapParent = swap->parent;
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
 }
-else if(result > 0)
+if(this->parent)
+{
+if(this == this->parent->left)
+this->parent->left = (((void *)0));
+else if(this == this->parent->right)
+this->parent->right = (((void *)0));
+}
+{
+struct __ecereNameSpace__ecere__sys__BTNode * n;
+
+for(n = swap ? swap : this->parent; n; n = n->parent)
+{
+int __simpleStruct0, __simpleStruct1;
+int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
+
+if(newDepth == n->depth && n != swap)
+break;
+n->depth = newDepth;
+}
+}
+if(swapParent && swapParent != this)
+return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
+else if(swap)
+return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
+else if(this->parent)
+return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
+else
+return (((void *)0));
+}
+
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
+{
+struct __ecereNameSpace__ecere__sys__BTNode * result;
+struct __ecereNameSpace__ecere__sys__BTNode * swap = this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(this->right) : this->left;
+struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
+
+if(swap)
+{
+swapParent = swap->parent;
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
+}
+if(this->parent)
+{
+if(this == this->parent->left)
+this->parent->left = (((void *)0));
+else if(this == this->parent->right)
+this->parent->right = (((void *)0));
+}
+{
+struct __ecereNameSpace__ecere__sys__BTNode * n;
+
+for(n = swap ? swap : this->parent; n; n = n->parent)
+{
+int __simpleStruct0, __simpleStruct1;
+int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
+
+if(newDepth == n->depth && n != swap)
+break;
+n->depth = newDepth;
+}
+}
+if(swapParent && swapParent != this)
+result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
+else if(swap)
+result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
+else if(this->parent)
+result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
+else
+result = (((void *)0));
+return result;
+}
+
+struct __ecereNameSpace__ecere__com__Class;
+
+struct __ecereNameSpace__ecere__com__Instance
+{
+void * *  _vTbl;
+struct __ecereNameSpace__ecere__com__Class * _class;
+int _refCount;
+} __attribute__ ((gcc_struct));
+
+extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name);
+
+extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, long long value);
+
+extern void *  __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
+
+extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, const char *  string, long long value);
+
+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);
+
+struct __ecereNameSpace__ecere__com__Property
+{
+struct __ecereNameSpace__ecere__com__Property * prev;
+struct __ecereNameSpace__ecere__com__Property * next;
+const char *  name;
+unsigned int isProperty;
+int memberAccess;
+int id;
+struct __ecereNameSpace__ecere__com__Class * _class;
+const char *  dataTypeString;
+struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
+struct __ecereNameSpace__ecere__com__Instance * dataType;
+void (*  Set)(void * , int);
+int (*  Get)(void * );
+unsigned int (*  IsSet)(void * );
+void *  data;
+void *  symbol;
+int vid;
+unsigned int conversion;
+unsigned int watcherOffset;
+const char *  category;
+unsigned int compiled;
+unsigned int selfWatchable;
+unsigned int isWatchable;
+} __attribute__ ((gcc_struct));
+
+extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+
+extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char *  name, void *  function);
+
+extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
+
+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);
+
+extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+
+void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, const void * data);
+
+void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * *  data);
+
+struct __ecereNameSpace__ecere__sys__StringBTNode;
+
+struct __ecereNameSpace__ecere__sys__StringBTNode
+{
+char * key;
+struct __ecereNameSpace__ecere__sys__StringBTNode * parent, * left, * right;
+int depth;
+} __attribute__ ((gcc_struct));
+
+struct __ecereNameSpace__ecere__sys__BinaryTree;
+
+struct __ecereNameSpace__ecere__sys__BinaryTree
+{
+struct __ecereNameSpace__ecere__sys__BTNode * root;
+int count;
+int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
+void (*  FreeKey)(void *  key);
+} __attribute__ ((gcc_struct));
+
+unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Add(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BinaryTree * tree, struct __ecereNameSpace__ecere__sys__BTNode * node)
+{
+uintptr_t newKey = node->key;
+
+while(1)
+{
+int result = tree->CompareKey(tree, newKey, this->key);
+
+if(!result)
+{
+return 0;
+}
+else if(result > 0)
 {
 if(this->right)
 this = this->right;
@@ -560,202 +682,304 @@ break;
 return this;
 }
 
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindString(struct __ecereNameSpace__ecere__sys__BTNode * this, const char * key)
-{
-while(this)
-{
-int result;
+unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(struct __ecereNameSpace__ecere__sys__BTNode *  this, struct __ecereNameSpace__ecere__sys__BTNode *  node);
 
-if(key && this->key)
-result = strcmp(key, (const char *)this->key);
-else if(key && !this->key)
-result = 1;
-else if(!key && this->key)
-result = -1;
-else
-result = 0;
-if(result < 0)
-this = this->left;
-else if(result > 0)
-this = this->right;
-else
-break;
-}
-return this;
+unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * node)
+{
+if(this == node)
+return 1;
+else if(this->left && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->left, node))
+return 1;
+else if(this->right && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->right, node))
+return 1;
+return 0;
 }
 
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindPrefix(struct __ecereNameSpace__ecere__sys__BTNode * this, const char * key)
-{
-struct __ecereNameSpace__ecere__sys__BTNode * subString = (((void *)0));
-int len = key ? strlen(key) : 0;
+struct __ecereNameSpace__ecere__sys__BTNode *  __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(struct __ecereNameSpace__ecere__sys__BTNode *  this, uintptr_t key);
 
-while(this)
+struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(struct __ecereNameSpace__ecere__sys__BTNode * this, uintptr_t key)
 {
-int result;
+struct __ecereNameSpace__ecere__sys__BTNode * result = (((void *)0));
 
-if(key && this->key)
-result = strcmp(key, (const char *)this->key);
-else if(key && !this->key)
-result = 1;
-else if(!key && this->key)
-result = -1;
-else
-result = 0;
-if(result < 0)
-{
-if(!strncmp(key, (const char *)this->key, len))
-subString = this;
-this = this->left;
-}
-else if(result > 0)
-this = this->right;
-else
-{
-subString = this;
-break;
-}
-}
-return subString;
+if(this->key == key)
+result = this;
+if(!result && this->left)
+result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->left, key);
+if(!result && this->right)
+result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->right, key);
+return result;
 }
 
-void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * swap)
+char *  __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(struct __ecereNameSpace__ecere__sys__BTNode *  this, char *  output, int tps);
+
+void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode *  this, char *  output, int wantedDepth, int curDepth, int maxDepth, unsigned int last);
+
+char * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int tps)
 {
-if(swap->left)
+switch(tps)
 {
-swap->left->parent = swap->parent;
-if(swap == swap->parent->left)
-swap->parent->left = swap->left;
-else if(swap == swap->parent->right)
-swap->parent->right = swap->left;
-swap->left = (((void *)0));
-}
-if(swap->right)
+case 0:
+case 2:
+case 1:
 {
-swap->right->parent = swap->parent;
-if(swap == swap->parent->left)
-swap->parent->left = swap->right;
-else if(swap == swap->parent->right)
-swap->parent->right = swap->right;
-swap->right = (((void *)0));
+if(tps == 2)
+__ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
+if(this->left)
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->left, output, tps);
+if(tps == 0)
+__ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
+if(this->right)
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->right, output, tps);
+if(tps == 1)
+__ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
+return output;
 }
-if(swap == swap->parent->left)
-swap->parent->left = (((void *)0));
-else if(swap == swap->parent->right)
-swap->parent->right = (((void *)0));
+case 3:
 {
-struct __ecereNameSpace__ecere__sys__BTNode * n;
+int maxDepth = this->depth;
+int curDepth;
 
-for(n = swap->parent; n; n = n->parent)
+for(curDepth = 0; curDepth <= maxDepth; curDepth++)
 {
-int __simpleStruct0, __simpleStruct1;
-int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
+int c;
 
-if(newDepth == n->depth)
-break;
-n->depth = newDepth;
-if(n == this)
-break;
+for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4 / 2; c++)
+strcat(output, " ");
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(this, output, curDepth, 0, maxDepth, 1);
+strcat(output, "\n");
 }
+return output;
 }
-{
-swap->left = this->left;
-if(this->left)
-this->left->parent = swap;
 }
+return (((void *)0));
+}
+
+void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int wantedDepth, int curDepth, int maxDepth, unsigned int last)
 {
-swap->right = this->right;
-if(this->right)
-this->right->parent = swap;
+int c;
+
+if(wantedDepth == curDepth)
+{
+char nodeString[10] = "";
+int len;
+
+if(this)
+sprintf(nodeString, "%d", (int)this->key);
+len = strlen(nodeString);
+for(c = 0; c < (4 - len) / 2; c++)
+strcat(output, " ");
+len += c;
+strcat(output, nodeString);
+for(c = len; c < 4; c++)
+strcat(output, " ");
+if(curDepth && !last)
+{
+for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4; c++)
+strcat(output, " ");
 }
-swap->parent = this->parent;
-this->left = (((void *)0));
-this->right = (((void *)0));
-if(this->parent)
+}
+else if(curDepth <= maxDepth)
 {
-if(this == this->parent->left)
-this->parent->left = swap;
-else if(this == this->parent->right)
-this->parent->right = swap;
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth((this ? this->left : (struct __ecereNameSpace__ecere__sys__BTNode *)(((void *)0))), output, wantedDepth, curDepth + 1, maxDepth, last && this && !this->right);
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth((this ? this->right : (struct __ecereNameSpace__ecere__sys__BTNode *)(((void *)0))), output, wantedDepth, curDepth + 1, maxDepth, last);
 }
 }
 
-int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(struct __ecereNameSpace__ecere__sys__BTNode * this)
+struct __ecereNameSpace__ecere__com__DataMember;
+
+struct __ecereNameSpace__ecere__com__DataMember
 {
-int leftDepth = this->left ? (this->left->depth + 1) : 0;
-int rightDepth = this->right ? (this->right->depth + 1) : 0;
+struct __ecereNameSpace__ecere__com__DataMember * prev;
+struct __ecereNameSpace__ecere__com__DataMember * next;
+const char *  name;
+unsigned int isProperty;
+int memberAccess;
+int id;
+struct __ecereNameSpace__ecere__com__Class * _class;
+const char *  dataTypeString;
+struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
+struct __ecereNameSpace__ecere__com__Instance * dataType;
+int type;
+int offset;
+int memberID;
+struct __ecereNameSpace__ecere__sys__OldList members;
+struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
+int memberOffset;
+short structAlignment;
+short pointerAlignment;
+} __attribute__ ((gcc_struct));
 
-return rightDepth - leftDepth;
-}
+extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, const char *  type, unsigned int size, unsigned int alignment, int declMode);
 
-void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
-{
-int __simpleStruct2, __simpleStruct3;
-int __simpleStruct0, __simpleStruct1;
+struct __ecereNameSpace__ecere__com__Method;
 
-if(this->parent)
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument
 {
-if(this == this->parent->left)
-this->parent->left = this->left;
-else if(this == this->parent->right)
-this->parent->right = this->left;
-}
-this->left->parent = this->parent;
-this->parent = this->left;
-this->left = this->parent->right;
-if(this->left)
-this->left->parent = this;
-this->parent->right = this;
-this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
-this->parent->depth = (__simpleStruct2 = this->parent->left ? (this->parent->left->depth + 1) : 0, __simpleStruct3 = this->parent->right ? (this->parent->right->depth + 1) : 0, (__simpleStruct2 > __simpleStruct3) ? __simpleStruct2 : __simpleStruct3);
+union
 {
-struct __ecereNameSpace__ecere__sys__BTNode * n;
+struct
+{
+const char *  dataTypeString;
+struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
+} __attribute__ ((gcc_struct)) __anon1;
+struct __ecereNameSpace__ecere__com__DataValue expression;
+struct
+{
+const char *  memberString;
+union
+{
+struct __ecereNameSpace__ecere__com__DataMember * member;
+struct __ecereNameSpace__ecere__com__Property * prop;
+struct __ecereNameSpace__ecere__com__Method * method;
+} __attribute__ ((gcc_struct)) __anon1;
+} __attribute__ ((gcc_struct)) __anon2;
+} __attribute__ ((gcc_struct)) __anon1;
+} __attribute__ ((gcc_struct));
 
-for(n = this->parent->parent; n; n = n->parent)
+struct __ecereNameSpace__ecere__com__Method
 {
-int __simpleStruct0, __simpleStruct1;
-int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
+const char *  name;
+struct __ecereNameSpace__ecere__com__Method * parent;
+struct __ecereNameSpace__ecere__com__Method * left;
+struct __ecereNameSpace__ecere__com__Method * right;
+int depth;
+int (*  function)();
+int vid;
+int type;
+struct __ecereNameSpace__ecere__com__Class * _class;
+void *  symbol;
+const char *  dataTypeString;
+struct __ecereNameSpace__ecere__com__Instance * dataType;
+int memberAccess;
+} __attribute__ ((gcc_struct));
 
-if(newDepth == n->depth)
-break;
-n->depth = newDepth;
-}
-}
-}
+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);
 
-void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
-{
-int __simpleStruct2, __simpleStruct3;
-int __simpleStruct0, __simpleStruct1;
+struct __ecereNameSpace__ecere__com__Module;
 
-if(this->parent)
+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);
+
+extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
+
+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);
+
+struct __ecereNameSpace__ecere__com__NameSpace;
+
+struct __ecereNameSpace__ecere__com__NameSpace
 {
-if(this == this->parent->right)
-this->parent->right = this->right;
-else if(this == this->parent->left)
-this->parent->left = this->right;
-}
-this->right->parent = this->parent;
-this->parent = this->right;
-this->right = this->parent->left;
-if(this->right)
-this->right->parent = this;
-this->parent->left = this;
-this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
-this->parent->depth = (__simpleStruct2 = this->parent->left ? (this->parent->left->depth + 1) : 0, __simpleStruct3 = this->parent->right ? (this->parent->right->depth + 1) : 0, (__simpleStruct2 > __simpleStruct3) ? __simpleStruct2 : __simpleStruct3);
+const char *  name;
+struct __ecereNameSpace__ecere__com__NameSpace *  btParent;
+struct __ecereNameSpace__ecere__com__NameSpace *  left;
+struct __ecereNameSpace__ecere__com__NameSpace *  right;
+int depth;
+struct __ecereNameSpace__ecere__com__NameSpace *  parent;
+struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
+struct __ecereNameSpace__ecere__sys__BinaryTree classes;
+struct __ecereNameSpace__ecere__sys__BinaryTree defines;
+struct __ecereNameSpace__ecere__sys__BinaryTree functions;
+} __attribute__ ((gcc_struct));
+
+struct __ecereNameSpace__ecere__com__Class
 {
-struct __ecereNameSpace__ecere__sys__BTNode * n;
+struct __ecereNameSpace__ecere__com__Class * prev;
+struct __ecereNameSpace__ecere__com__Class * next;
+const char *  name;
+int offset;
+int structSize;
+void * *  _vTbl;
+int vTblSize;
+unsigned int (*  Constructor)(void * );
+void (*  Destructor)(void * );
+int offsetClass;
+int sizeClass;
+struct __ecereNameSpace__ecere__com__Class * base;
+struct __ecereNameSpace__ecere__sys__BinaryTree methods;
+struct __ecereNameSpace__ecere__sys__BinaryTree members;
+struct __ecereNameSpace__ecere__sys__BinaryTree prop;
+struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
+struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
+struct __ecereNameSpace__ecere__sys__OldList derivatives;
+int memberID;
+int startMemberID;
+int type;
+struct __ecereNameSpace__ecere__com__Instance * module;
+struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
+const char *  dataTypeString;
+struct __ecereNameSpace__ecere__com__Instance * dataType;
+int typeSize;
+int defaultAlignment;
+void (*  Initialize)();
+int memberOffset;
+struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
+const char *  designerClass;
+unsigned int noExpansion;
+const char *  defaultProperty;
+unsigned int comRedefinition;
+int count;
+int isRemote;
+unsigned int internalDecl;
+void *  data;
+unsigned int computeSize;
+short structAlignment;
+short pointerAlignment;
+int destructionWatchOffset;
+unsigned int fixed;
+struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
+int inheritanceAccess;
+const char *  fullName;
+void *  symbol;
+struct __ecereNameSpace__ecere__sys__OldList conversions;
+struct __ecereNameSpace__ecere__sys__OldList templateParams;
+struct __ecereNameSpace__ecere__com__ClassTemplateArgument *  templateArgs;
+struct __ecereNameSpace__ecere__com__Class * templateClass;
+struct __ecereNameSpace__ecere__sys__OldList templatized;
+int numParams;
+unsigned int isInstanceClass;
+unsigned int byValueSystemClass;
+} __attribute__ ((gcc_struct));
 
-for(n = this->parent->parent; n; n = n->parent)
+struct __ecereNameSpace__ecere__com__Application
 {
-int __simpleStruct0, __simpleStruct1;
-int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
+int argc;
+const char * *  argv;
+int exitCode;
+unsigned int isGUIApp;
+struct __ecereNameSpace__ecere__sys__OldList allModules;
+char *  parsedCommand;
+struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
+} __attribute__ ((gcc_struct));
 
-if(newDepth == n->depth)
-break;
-n->depth = newDepth;
-}
-}
-}
+static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle;
+
+static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
+
+static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__StringBTNode;
+
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_bool;
+
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_uint;
+
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_String;
+
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
+
+struct __ecereNameSpace__ecere__com__Module
+{
+struct __ecereNameSpace__ecere__com__Instance * application;
+struct __ecereNameSpace__ecere__sys__OldList classes;
+struct __ecereNameSpace__ecere__sys__OldList defines;
+struct __ecereNameSpace__ecere__sys__OldList functions;
+struct __ecereNameSpace__ecere__sys__OldList modules;
+struct __ecereNameSpace__ecere__com__Instance * prev;
+struct __ecereNameSpace__ecere__com__Instance * next;
+const char *  name;
+void *  library;
+void *  Unload;
+int importType;
+int origImportType;
+struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
+struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
+} __attribute__ ((gcc_struct));
 
 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnSerialize(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__com__Instance * channel)
 {
@@ -866,18 +1090,6 @@ __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = (void *)0;
 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = (void *)0;
 }
 
-void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this->left);
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
-}
-
-void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this->right);
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
-}
-
 void __ecereRegisterModule_BTNode(struct __ecereNameSpace__ecere__com__Instance * module)
 {
 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
@@ -939,231 +1151,6 @@ if(class)
 class->fixed = (unsigned int)1;
 }
 
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(struct __ecereNameSpace__ecere__sys__BTNode * this)
-{
-while(1)
-{
-int factor = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this);
-
-if(factor < -1)
-{
-if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->left) == 1)
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(this);
-else
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
-}
-else if(factor > 1)
-{
-if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->right) == -1)
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(this);
-else
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
-}
-if(this->parent)
-this = this->parent;
-else
-return this;
-}
-}
-
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
-{
-struct __ecereNameSpace__ecere__sys__BTNode * swap = this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(this->left) : this->right;
-struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
-
-if(swap)
-{
-swapParent = swap->parent;
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
-}
-if(this->parent)
-{
-if(this == this->parent->left)
-this->parent->left = (((void *)0));
-else if(this == this->parent->right)
-this->parent->right = (((void *)0));
-}
-{
-struct __ecereNameSpace__ecere__sys__BTNode * n;
-
-for(n = swap ? swap : this->parent; n; n = n->parent)
-{
-int __simpleStruct0, __simpleStruct1;
-int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
-
-if(newDepth == n->depth && n != swap)
-break;
-n->depth = newDepth;
-}
-}
-if(swapParent && swapParent != this)
-return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
-else if(swap)
-return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
-else if(this->parent)
-return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
-else
-return (((void *)0));
-}
-
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
-{
-struct __ecereNameSpace__ecere__sys__BTNode * result;
-struct __ecereNameSpace__ecere__sys__BTNode * swap = this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(this->right) : this->left;
-struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
-
-if(swap)
-{
-swapParent = swap->parent;
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
-}
-if(this->parent)
-{
-if(this == this->parent->left)
-this->parent->left = (((void *)0));
-else if(this == this->parent->right)
-this->parent->right = (((void *)0));
-}
-{
-struct __ecereNameSpace__ecere__sys__BTNode * n;
-
-for(n = swap ? swap : this->parent; n; n = n->parent)
-{
-int __simpleStruct0, __simpleStruct1;
-int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
-
-if(newDepth == n->depth && n != swap)
-break;
-n->depth = newDepth;
-}
-}
-if(swapParent && swapParent != this)
-result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
-else if(swap)
-result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
-else if(this->parent)
-result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
-else
-result = (((void *)0));
-return result;
-}
-
-void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(struct __ecereNameSpace__ecere__sys__BTNode *  this, void (*  FreeKey)(void *  key));
-
-void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(struct __ecereNameSpace__ecere__sys__BTNode * this, void (* FreeKey)(void * key))
-{
-if(this->left)
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->left, FreeKey);
-if(this->right)
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->right, FreeKey);
-if(FreeKey)
-FreeKey((void *)this->key);
-((this ? (__ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor ? __ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor((void *)this) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(this)) : 0), this = 0);
-}
-
-unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(struct __ecereNameSpace__ecere__sys__BTNode *  this, struct __ecereNameSpace__ecere__sys__BTNode *  node);
-
-unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * node)
-{
-if(this == node)
-return 1;
-else if(this->left && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->left, node))
-return 1;
-else if(this->right && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->right, node))
-return 1;
-return 0;
-}
-
-struct __ecereNameSpace__ecere__sys__BTNode *  __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(struct __ecereNameSpace__ecere__sys__BTNode *  this, uintptr_t key);
-
-struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(struct __ecereNameSpace__ecere__sys__BTNode * this, uintptr_t key)
-{
-struct __ecereNameSpace__ecere__sys__BTNode * result = (((void *)0));
-
-if(this->key == key)
-result = this;
-if(!result && this->left)
-result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->left, key);
-if(!result && this->right)
-result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->right, key);
-return result;
-}
-
-char *  __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(struct __ecereNameSpace__ecere__sys__BTNode *  this, char *  output, int tps);
-
-void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode *  this, char *  output, int wantedDepth, int curDepth, int maxDepth, unsigned int last);
-
-char * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int tps)
-{
-switch(tps)
-{
-case 0:
-case 2:
-case 1:
-{
-if(tps == 2)
-__ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
-if(this->left)
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->left, output, tps);
-if(tps == 0)
-__ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
-if(this->right)
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->right, output, tps);
-if(tps == 1)
-__ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
-return output;
-}
-case 3:
-{
-int maxDepth = this->depth;
-int curDepth;
-
-for(curDepth = 0; curDepth <= maxDepth; curDepth++)
-{
-int c;
-
-for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4 / 2; c++)
-strcat(output, " ");
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(this, output, curDepth, 0, maxDepth, 1);
-strcat(output, "\n");
-}
-return output;
-}
-}
-return (((void *)0));
-}
-
-void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int wantedDepth, int curDepth, int maxDepth, unsigned int last)
-{
-int c;
-
-if(wantedDepth == curDepth)
-{
-char nodeString[10] = "";
-int len;
-
-if(this)
-sprintf(nodeString, "%d", (int)this->key);
-len = strlen(nodeString);
-for(c = 0; c < (4 - len) / 2; c++)
-strcat(output, " ");
-len += c;
-strcat(output, nodeString);
-for(c = len; c < 4; c++)
-strcat(output, " ");
-if(curDepth && !last)
-{
-for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4; c++)
-strcat(output, " ");
-}
-}
-else if(curDepth <= maxDepth)
-{
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth((this ? this->left : (struct __ecereNameSpace__ecere__sys__BTNode *)(((void *)0))), output, wantedDepth, curDepth + 1, maxDepth, last && this && !this->right);
-__ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth((this ? this->right : (struct __ecereNameSpace__ecere__sys__BTNode *)(((void *)0))), output, wantedDepth, curDepth + 1, maxDepth, last);
-}
-}
-
 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(struct __ecereNameSpace__ecere__sys__BTNode *  this, struct __ecereNameSpace__ecere__sys__BinaryTree *  tree);
 
 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BinaryTree * tree)
@@ -1219,3 +1206,16 @@ printf("Node %d is *greater* than right subtree %d\n", (int)this->key, (int)this
 return valid;
 }
 
+void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(struct __ecereNameSpace__ecere__sys__BTNode *  this, void (*  FreeKey)(void *  key));
+
+void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(struct __ecereNameSpace__ecere__sys__BTNode * this, void (* FreeKey)(void * key))
+{
+if(this->left)
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->left, FreeKey);
+if(this->right)
+__ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->right, FreeKey);
+if(FreeKey)
+FreeKey((void *)this->key);
+((this ? (__ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor ? __ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor((void *)this) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(this)) : 0), this = 0);
+}
+