vat.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. #ifndef __VAT
  2. #define __VAT
  3. #include <default.h>
  4. void *alloca(long)__ATTR_GCC__;
  5. #define SYMSTR_CONST(s) ((SYM_STR)(("\0"s)+sizeof(s)))
  6. #define VATSTR SYMSTR
  7. #define __Folder_Del _rom_call(short,(const char*,short),66)
  8. /* Begin Auto-Generated Part */
  9. #define H_NULL 0
  10. #define HS_NULL ((HSym){0,0})
  11. #define NULL ((void*)0)
  12. #ifndef __HAVE_Bool
  13. #define __HAVE_Bool
  14. enum Bool{FALSE,TRUE};
  15. #endif
  16. #ifndef __HAVE_ESQ
  17. #define __HAVE_ESQ
  18. typedef unsigned char ESQ;
  19. #endif
  20. #ifndef __HAVE_CESI
  21. #define __HAVE_CESI
  22. typedef const ESQ*CESI;
  23. #endif
  24. #ifndef __HAVE_ESI
  25. #define __HAVE_ESI
  26. typedef ESQ*ESI;
  27. #endif
  28. #ifndef __HAVE_GraphModes
  29. #define __HAVE_GraphModes
  30. enum GraphModes{GR_FUNC=1,GR_PAR=2,GR_POL=3,GR_SEQ=4,GR_3D=5,GR_DE=6};
  31. #endif
  32. #ifndef __HAVE_HANDLE
  33. #define __HAVE_HANDLE
  34. typedef unsigned short HANDLE;
  35. #endif
  36. #ifndef __HAVE_MULTI_EXPR
  37. #define __HAVE_MULTI_EXPR
  38. typedef struct{unsigned short Size;ESQ Expr[];}MULTI_EXPR;
  39. #endif
  40. #ifndef __HAVE_SYM_STR
  41. #define __HAVE_SYM_STR
  42. typedef CESI SYM_STR;
  43. #endif
  44. enum CompatFlags{CF_NONE=0,CF_CONVERT=1,CF_ENHANCED=2,CF_NEW=3};
  45. enum ExtendedSysTypes{SEQ_INITC=7,DE_INITC=8,DE_FLDPIC=9,SOLVER_SYS_VARS=10,UNIT_VAR=11,C_COL=12,R_REGEQ=13,R_SYSVAR=14};
  46. #ifndef __HAVE_FindOptions
  47. #define __HAVE_FindOptions
  48. enum FindOptions{FO_SINGLE_FOLDER=0x01,FO_RECURSE=0x02,FO_SKIP_TEMPS=0x04,FO_NOTEMPS=0x04,FO_RETURN_TWINS=0x08,FO_CKTWINS=0x08,FO_RETURN_FOLDER=0x10,FO_SKIP_COLLAPSE=0x20};
  49. #endif
  50. enum FolderOpFlags{FOP_UNLOCK=0,FOP_LOCK=1,FOP_ALL_FOLDERS=0x80};
  51. enum FolderStats{MAIN_FOLDER=2,FOLDER_TABLE=3,NOT_FOUND=4,BAD_FOLDER=5};
  52. #ifndef __HAVE_HSym
  53. #define __HAVE_HSym
  54. typedef struct{HANDLE folder;unsigned short offset;}HSym;
  55. #endif
  56. #define HSYM HSym
  57. #ifndef __HAVE_SYM_ENTRY
  58. #define __HAVE_SYM_ENTRY
  59. typedef struct{char name[8];unsigned short compat;union{unsigned short flags_n;struct{unsigned int busy:1,local:1,flag1_5:1,flag1_4:1,collapsed:1,twin:1,archived:1,in_view:1;unsigned int folder:1,overwritten:1,checked:1,hidden:1,locked:1,statvar:1,graph_ref_1:1,graph_ref_0:1;}bits;}flags;HANDLE handle;}SYM_ENTRY;
  60. #endif
  61. enum SymFlags{SF_GREF1=0x0001,SF_GREF2=0x0002,SF_STATVAR=0x0004,SF_LOCKED=0x0008,SF_HIDDEN=0x0010,SF_OPEN=0x0010,SF_CHECKED=0x0020,SF_OVERWRITTEN=0x0040,SF_FOLDER=0x0080,SF_INVIEW=0x0100,SF_ARCHIVED=0x0200,SF_TWIN=0x0400,SF_COLLAPSED=0x0800,SF_LOCAL=0x4000,SF_BUSY=0x8000};
  62. #ifndef __HAVE_SystemDataTypes
  63. #define __HAVE_SystemDataTypes
  64. enum SystemDataTypes{SDT_EXPR=0,SDT_LIST=1,SDT_MAT=2,SDT_FUNC=3,SDT_PRGM=4,SDT_PIC=5,SDT_STR=6,SDT_TEXT=7,SDT_GDB=8,SDT_DATA=9,SDT_FIG=10,SDT_MAC=11,SDT_OTH=12,SDT_SYS=13,SDT_ALL=14,SDT_ASM=15};
  65. #endif
  66. enum VarRecallFlags{VR_NO_SYS_VARS=0x01,VR_FUNC_NAME=0x02,VR_LINK=0x04};
  67. enum VarStoreFlags{STOF_ESI=0x4000,STOF_ELEMENT=0x4001,STOF_NONE=0x4002,STOF_HESI=0x4003};
  68. #define $(s) (SYMSTR_CONST(#s))
  69. #define AddSymToFolder _rom_call(HSym,(SYM_STR,SYM_STR),70)
  70. #define checkCurrent ({__need_in_use_bit;_rom_call(HSym,(SYM_STR,ESQ),121);})
  71. #define CheckLinkLockFlag _rom_call(void,(const SYM_ENTRY*),7F)
  72. #define CheckReservedName _rom_call(short,(SYM_STR),8B)
  73. #define CheckSysFunc _rom_call(short,(const char*,__pushort),89)
  74. #define ClearUserDef _rom_call(void,(HANDLE),7E)
  75. #define DerefSym _rom_call(SYM_ENTRY*,(HSym),79)
  76. #define EM_moveSymFromExtMem ({__need_in_use_bit;_rom_call(short,(SYM_STR,HSym),161);})
  77. #define EM_moveSymToExtMem ({__need_in_use_bit;_rom_call(short,(SYM_STR,HSym),162);})
  78. #define EM_twinSymFromExtMem ({__need_in_use_bit;_rom_call(HSym,(SYM_STR,HSym),166);})
  79. #define EX_stoBCD ({__need_in_use_bit;_rom_call(void,(unsigned char*,float*),C0);})
  80. extern SYM_ENTRY *FindProgramVar(void)__ATTR_LIB_C__;
  81. #define FindSymInFolder _rom_call(HSym,(SYM_STR,const char*),71)
  82. #define FolderAdd _rom_call(HANDLE,(SYM_STR),64)
  83. #define FolderAddTemp _rom_call(SYM_STR,(void),73)
  84. #define FolderClear(c) __Folder_Del((c),1)
  85. #define FolderCount _rom_call(unsigned short,(const SYM_ENTRY*),6B)
  86. #define FolderCur ({__need_in_use_bit;_rom_call(short,(SYM_STR,short),65);})
  87. #define FolderCurTemp _rom_call(short,(SYM_STR),72)
  88. #define FolderDel(c) __Folder_Del((c),0)
  89. #define FolderDelAllTemp ({__need_in_use_bit;_rom_call(void,(short),75);})
  90. #define FolderDelTemp ({__need_in_use_bit;_rom_call(void,(void),74);})
  91. #define FolderFind _rom_call(short,(SYM_STR),67)
  92. #define FolderGetCur _rom_call(void,(char*),68)
  93. #define FolderOp _rom_call(short,(SYM_STR,short),69)
  94. #define FolderRename _rom_call(short,(const char*,const char*),6A)
  95. #define GetFuncPrgmBodyPtr _rom_call_hack(ESI,(ESI),43A,(((unsigned char*)_rom_call_addr(290)-52)),200)
  96. #define HSymDel ({__need_in_use_bit;_rom_call(short,(HSym),5F);})
  97. #define HSYMtoName _rom_call(short,(HSym,char*),7A)
  98. #define IsMainFolderStr _rom_call(short,(const char*),77)
  99. #define MakeHSym _rom_call(HSym,(HANDLE,const SYM_ENTRY*),282)
  100. #define MakeHsym MakeHSym
  101. #define partial_len _rom_call(unsigned long,(const char*,unsigned char*),11C)
  102. #define QSysProtected _rom_call(short,(ESQ),88)
  103. #define ResetSymFlags _rom_call(void,(short),8E)
  104. #define SetOK ({__need_in_use_bit;_rom_call_hack(void,(short),456,((((unsigned char*)_rom_call_addr(1FC)-216))),200);})
  105. #define StrToTokN _rom_call(ESI,(const char*,unsigned char*),7B)
  106. #define SymAdd ({__need_in_use_bit;_rom_call(HSym,(SYM_STR),5C);})
  107. #define SymAddMain ({__need_in_use_bit;_rom_call(HSym,(SYM_STR),5D);})
  108. #define SymAddTwin ({__need_in_use_bit;_rom_call(HSym,(SYM_STR),27F);})
  109. #define SymCmp _rom_call(short,(const char*,const char*),81)
  110. #define SymCpy0 _rom_call(void,(char*,const char*),83)
  111. #define SymCpy _rom_call(void,(char*,const char*),82)
  112. #define SymDel ({__need_in_use_bit;_rom_call(short,(SYM_STR),5E);})
  113. #define SymDelTwin _rom_call(short,(SYM_ENTRY*),280)
  114. #define SymFind ({__need_in_use_bit;_rom_call(HSym,(SYM_STR),60);})
  115. #define SymFindFirst _rom_call(SYM_ENTRY*,(SYM_STR,short),6C)
  116. #define SymFindFolderName _rom_call(char*,(void),6F)
  117. #define SymFindFoldername SymFindFolderName
  118. #define SymFindHome _rom_call(HSym,(SYM_STR),62)
  119. #define SymFindMain ({__need_in_use_bit;_rom_call(HSym,(SYM_STR),61);})
  120. #define SymFindNext _rom_call(SYM_ENTRY*,(void),6D)
  121. #define SymFindPrev _rom_call(SYM_ENTRY*,(void),6E)
  122. #define SymFindPtr ({__need_in_use_bit;_rom_call(SYM_ENTRY*,(SYM_STR,short),283);})
  123. #define SymMove ({__need_in_use_bit;_rom_call(short,(SYM_STR,SYM_STR),63);})
  124. #define SYMSTR(s) ({register unsigned short __slen=_rom_call(unsigned long,(const char*),27E)(s);ESI __tempstr=alloca(__slen+2);__tempstr[0]=0;_rom_call(void*,(void*,const void*,long),26A)(__tempstr+1,(s),__slen+1);__tempstr+__slen+1;})
  125. #define SymSysVar _rom_call(short,(const char*),8C)
  126. #define TempFolderName _rom_call(SYM_STR,(short),76)
  127. #define TokToStrN _rom_call(short,(unsigned char*,SYM_STR),7C)
  128. #define ValidateSymName _rom_call(short,(const char*),84)
  129. #define VarRecall ({__need_in_use_bit;_rom_call(HSym,(SYM_STR,short),85);})
  130. #define VarStore ({__need_in_use_bit;_rom_call(HSym,(SYM_STR,short,short,...),86);})
  131. #if MIN_AMS>=101
  132. #define GetDataType _rom_call_hack(short,(CESI),435,((*(unsigned long*)((unsigned char*)_rom_call_addr(319)+134))),200)
  133. #if MIN_AMS>=200
  134. #define SmapTypeStrings _rom_call(const char*,(short),436)
  135. #endif
  136. #endif
  137. /* End Auto-Generated Part */
  138. #endif