error.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. #ifndef __ERROR
  2. #define __ERROR
  3. #include <default.h>
  4. /* Begin Auto-Generated Part */
  5. #ifndef __HAVE_Bool
  6. #define __HAVE_Bool
  7. enum Bool{FALSE,TRUE};
  8. #endif
  9. typedef struct ErrorFrameStruct{unsigned long A2,A3,A4,A5,A6,A7;unsigned long D3,D4,D5,D6,D7;unsigned long NG_control;char*RetIndex;unsigned long PC;struct ErrorFrameStruct*Link;}ERROR_FRAME[1];
  10. #define ER_OK 0
  11. #define ER_OKAY 0
  12. #define ER_EXIT 1
  13. #define ER_STOP 2
  14. #define ER_OFF 3
  15. #define ER_PRGM_STOP 4
  16. #define ER_NO_MSG 9
  17. #define ER_FUNC_DID_NOT_RETURN_VALUE 10
  18. #define ER_TEST_NOT_TRUE_OR_FALSE 20
  19. #define ER_ARG_CANNOT_BE_FOLDER 30
  20. #define ER_ARGUMENT 40
  21. #define ER_ARG_MISMATCH 50
  22. #define ER_EXPECTED_BOOL_OR_AGG 60
  23. #define ER_ARG_MUST_BE_DECIMAL 70
  24. #define ER_ARG_MUST_BE_LABEL 80
  25. #define ER_ARGUMENT_MUST_BE_LIST 90
  26. #define ER_ARG_MUST_BE_MATRIX 100
  27. #define ER_ARG_MUST_BE_PIC 110
  28. #define ER_ARG_MUST_BE_PIC_OR_STR 120
  29. #define ER_ARG_MUST_BE_STRING 130
  30. #define ER_EXPECTED_VAR 140
  31. #define ER_ARG_MUST_BE_EMPTY_FOLDER 150
  32. #define ER_EXPECTED_ALGEBRAIC 160
  33. #define ER_ASAP_TOO_LONG 161
  34. #define ER_ATTRIBUTE_NOT_FOUND 163
  35. #define ER_BATT_LOW 165
  36. #define ER_BOUND 170
  37. #define ER_BREAK 180
  38. #define ER_CHECKSUM 185
  39. #define ER_CIRCULAR_DEFINITION 190
  40. #define ER_INVALID_SUCH_THAT 200
  41. #define ER_DATATYPE 210
  42. #define ER_DEPENDENT_LIMIT 220
  43. #define ER_DIFF_EQ_SETUP 225
  44. #define ER_DIMENSION 230
  45. #define ER_NOT_ENOUGH_ELEMENTS 230
  46. #define ER_NON_CONFORMING_LISTS 240
  47. #define ER_DIVBY0 250
  48. #define ER_DOMAIN 260
  49. #define ER_DUPLICATE_VAR_NAME 270
  50. #define ER_ELSEIF_WITHOUT_IF 280
  51. #define ER_ELSE_WITHOUT_IF 280
  52. #define ER_ENDTRY_WITHOUT_ELSE 290
  53. #define ER_EXCESSIVE_ITERATION 295
  54. #define ER_EXPECTED_2OR3_ELEMENTS 300
  55. #define ER_EXPIRED 305
  56. #define ER_APP_EXT_NOT_FOUND 307
  57. #define ER_APP_NOT_FOUND 308
  58. #define ER_INVALID_NSOLVE_ARG1 310
  59. #define ER_INVALID_SOLVE_ARG1 320
  60. #define ER_FOLDER 330
  61. #define ER_FUNCS_IN_DIFF_EQ 335
  62. #define ER_INCONSISTENT_UNITS 345
  63. #define ER_INVALID_SUBSCRIPT 350
  64. #define ER_INVALID_INDIR_STRING 360
  65. #define ER_INDIR_STRING_NOT_VARNAME 360
  66. #define ER_INDIR_STRING_NOT_FUNNAME 360
  67. #define ER_INVALID_ANS 380
  68. #define ER_ILLEGAL_ASSIGNMENT 390
  69. #define ER_ILLEGAL_ASSIGNMENT_VALUE 400
  70. #define ER_INVALID_AXES 405
  71. #define ER_ILLEGAL_COMMAND 410
  72. #define ER_INVALID_FOLDER_NAME 420
  73. #define ER_GRAPH_MODE 430
  74. #define ER_INVALID_GUESS 435
  75. #define ER_INVALID_IMPLIED_MULT 440
  76. #define ER_ILLEGAL_IN_FUNC 450
  77. #define ER_ILLEGAL_IN_CUSTOM 460
  78. #define ER_ILLEGAL_IN_DIALOG 470
  79. #define ER_ILLEGAL_IN_TOOLBAR 480
  80. #define ER_CANNOT_EXIT_FROM_TRY 490
  81. #define ER_CANNOT_CYCLE_FROM_TRY 490
  82. #define ER_CANNOT_GOTO_FROM_TRY 490
  83. #define ER_CANNOT_GOTO_INTO_TRY 490
  84. #define ER_INVALID_LABEL 500
  85. #define ER_INVALID_LIST_OR_MATRIX 510
  86. #define ER_INVAL_OUTSIDE_TB_CM 520
  87. #define ER_INVAL_OUTSIDE_DG_TB_CM 530
  88. #define ER_INVALID_OUTSIDE_DIALOG 540
  89. #define ER_MUST_BE_IN_PRGM_OR_FUNC 550
  90. #define ER_CYCLE_NOT_IN_LOOP 560
  91. #define ER_EXIT_NOT_IN_LOOP 560
  92. #define ER_INVALID_PATHNAME 570
  93. #define ER_INVALID_POLAR_COMPLEX 575
  94. #define ER_ILLEGAL_PRGM_REF 580
  95. #define ER_INVALID_SYNTAX_BLOCK 590
  96. #define ER_INVALID_TABLE 600
  97. #define ER_INVALID_USE_OF_UNITS 605
  98. #define ER_INVALID_LOCAL_DECLARATION 610
  99. #define ER_EXPECTED_VAR_OR_FUNC 620
  100. #define ER_INVALID_VAR_REF 630
  101. #define ER_INVALID_VECTOR_SYNTAX 640
  102. #define ER_LINK_IO 650
  103. #define ER_MAT_NOT_DIAGONALIZABLE 665
  104. #define ER_MEMORY 670
  105. #define ER_MEMORY_EXHAUSTION 670
  106. #define ER_ESTACK_OVERFLOW 670
  107. #define ER_STACK_VIO 673
  108. #define ER_EXPECTED_LPAR 680
  109. #define ER_EXPECTED_RPAR 690
  110. #define ER_EXPECTED_DOUBLE_QUOTE 700
  111. #define ER_EXPECTED_RIGHT_BRACKET 710
  112. #define ER_EXPECTED_RIGHT_BRACE 720
  113. #define ER_INVALID_BLOCK_STRUCTURE 730
  114. #define ER_MISSING_THEN 740
  115. #define ER_NOT_FUNC_OR_PRGM 750
  116. #define ER_NO_FUNCS_SEL 765
  117. #define ER_NO_SOLUTION 780
  118. #define ER_NON_ALGEBRAIC_VARIABLE 790
  119. #define ER_UNREAL_RESULT 800
  120. #define ER_EXPECTED_REAL 800
  121. #define ER_MEMORY_DML 810
  122. #define ER_RATIONAL_NUMERIC_OVERFLOW 830
  123. #define ER_OVERFLOW 830
  124. #define ER_STAT_PLOT 840
  125. #define ER_PRGM_NOT_FOUND 850
  126. #define ER_RECURSION_TOO_DEEP 860
  127. #define ER_RESERVED 870
  128. #define ER_SYS_FUNC 870
  129. #define ER_ROM_ROUTINE_NOT_AVAILABLE 875
  130. #define ER_SEQUENCE_SETUP 880
  131. #define ER_SIGNATURE_ERR 885
  132. #define ER_SINGULARMAT 890
  133. #define ER_SLOPE_FIELD_FUNCS 895
  134. #define ER_WEIGHTS_SUM_NOT_POS 900
  135. #define ER_LISTS_CONTAIN_NEG 900
  136. #define ER_LISTS_NOT2DISCREET 900
  137. #define ER_EMPTY_GROUP_NOT_VALID 900
  138. #define ER_SYNTAX 910
  139. #define ER_UNEXPECTED_CHARACTER 910
  140. #define ER_EXPECTED_EQUAL 910
  141. #define ER_EXPECTED_FACTOR 910
  142. #define ER_TOO_FEW_ARGS 930
  143. #define ER_TOO_MANY_ARGS 940
  144. #define ER_TOO_MANY_SUBSCRIPTS 950
  145. #define ER_TOO_MANY_UNDEFINED 955
  146. #define ER_UNDEFINED_VAR 960
  147. #define ER_UNLICENSED 965
  148. #define ER_GRAPH_FUNC_IN_USE 970
  149. #define ER_PROG_OR_FUNC_IN_USE 970
  150. #define ER_VAR_IN_USE 970
  151. #define ER_LOCKED 980
  152. #define ER_PROTECTED 980
  153. #define ER_NAME_TOO_LONG 990
  154. #define ER_RANGE 1000
  155. #define ER_ZOOM 1010
  156. #define ER_ILLEGAL_TAG 1020
  157. #define ER_UNKNOWN_TAG 1020
  158. #define ER_DIVISION_BUG 1020
  159. #define ER_MEM_VIO 1030
  160. #define ER_FP_TEST_FAIL 4094
  161. #define EXPECTED_BOOL_OR_AGG_ERROR 60
  162. #define EXPECTED_VAR_ERROR 140
  163. #define EXPECTED_ALGEBRAIC_ERROR 160
  164. #define INVALID_SUCH_THAT_ERROR 200
  165. #define NON_CONFORMING_LISTS_ERROR 240
  166. #define EXPECTED_2OR3_ELEMENTS_ERROR 300
  167. #define INVALID_NSOLVE_ARG1_ERROR 310
  168. #define INVALID_SOLVE_ARG1_ERROR 320
  169. #define INVALID_PATHNAME_ERROR 570
  170. #define EXPECTED_VAR_OR_FUNC_ERROR 620
  171. #define MEMORY_EXHAUSTION_ERROR 670
  172. #define ESTACK_OVERFLOW_ERROR 670
  173. #define EXPECTED_LPAR_ERROR 680
  174. #define EXPECTED_RPAR_ERROR 690
  175. #define EXPECTED_DOUBLE_QUOTE_ERROR 700
  176. #define EXPECTED_RIGHT_BRACKET_ERROR 710
  177. #define EXPECTED_RIGHT_BRACE_ERROR 720
  178. #define UNREAL_RESULT_ERROR 800
  179. #define EXPECTED_REAL_ERROR 800
  180. #define RATIONAL_NUMERIC_OVERFLOW_ERROR 830
  181. #define RECURSION_TOO_DEEP_ERROR 860
  182. #define SYNTAX_ERROR 910
  183. #define UNEXPECTED_CHARACTER_ERROR 910
  184. #define EXPECTED_EQUAL_ERROR 910
  185. #define EXPECTED_FACTOR_ERROR 910
  186. #define TOO_FEW_ARGS_ERROR 930
  187. #define TOO_MANY_ARGS_ERROR 940
  188. #define TOO_MANY_SUBSCRIPTS_ERROR 950
  189. #define TOO_MANY_UNDEFINED_ERROR 955
  190. #define GRAPH_FUNC_IN_USE_ERROR 970
  191. #define NAME_TOO_LONG_ERROR 990
  192. #define ILLEGAL_TAG_ERROR 1020
  193. #define UNKNOWN_TAG_ERROR 1020
  194. #define DIVISION_BUG_ERROR 1020
  195. #define ER_catch _rom_call(short,(void*),154)
  196. #define ER_success _rom_call(void,(void),155)
  197. #define ER_throw(err_no) __builtin_ER_throw(err_no)
  198. #define ER_throwVar _rom_call_attr(void,(short),__attribute__((__noreturn__)),153)
  199. #define ERD_dialog ({__need_in_use_bit;_rom_call(short,(short,short),151);})
  200. #define ERD_process ({__need_in_use_bit;_rom_call(void,(short),152);})
  201. #define ENDFINAL }if(errCode)PASS;}
  202. #define ENDTRY ;_ONERR_=0;}}
  203. #define FINALLY ER_success();}{
  204. #define ONERR ER_success();}else{register short _ONERR_=1;
  205. #define PASS (ER_throwVar(errCode))
  206. #define TRY {ERROR_FRAME __errFrame;unsigned short errCode;errCode=ER_catch(__errFrame);if(!errCode){
  207. #if MIN_AMS>=101
  208. #define find_error_message _rom_call(const char*,(short),2C1)
  209. #endif
  210. /* End Auto-Generated Part */
  211. #define ER_THROW(n) ER_throw(n)
  212. #endif