home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / os2 / remind / src / err.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-12  |  7.0 KB  |  233 lines

  1. /***************************************************************/
  2. /*                                                             */
  3. /*  ERR.H                                                      */
  4. /*                                                             */
  5. /*  Error definitions.                                         */
  6. /*                                                             */
  7. /*  This file is part of REMIND.                               */
  8. /*  Copyright (C) 1992, 1993 by David F. Skoll.                */
  9. /*                                                             */
  10. /***************************************************************/
  11.  
  12. /* Note that not all of the "errors" are really errors - some are just
  13.    messages for information purposes.  Constants beginning with M_ should
  14.    never be returned as error indicators - they should only be used to
  15.    index the ErrMsg array. */
  16.  
  17. #define OK                    0
  18. #define E_MISS_END            1
  19. #define E_MISS_QUOTE          2
  20. #define E_OP_STK_OVER         3
  21. #define E_VA_STK_OVER         4
  22. #define E_MISS_RIGHT_PAREN    5
  23. #define E_UNDEF_FUNC          6
  24. #define E_ILLEGAL_CHAR        7
  25. #define E_EXPECTING_BINOP     8
  26. #define E_NO_MEM              9
  27. #define E_BAD_NUMBER         10
  28. #define E_OP_STK_UNDER       11
  29. #define E_VA_STK_UNDER       12
  30. #define E_CANT_COERCE        13
  31. #define E_BAD_TYPE           14
  32. #define E_DATE_OVER          15
  33. #define E_STACK_ERR          16
  34. #define E_DIV_ZERO           17
  35. #define E_NOSUCH_VAR         18
  36. #define E_EOLN             19
  37. #define E_EOF             20
  38. #define E_IO_ERR             21
  39. #define E_LINE_2_LONG        22
  40. #define E_SWERR             23
  41. #define E_BAD_DATE           24
  42. #define E_2FEW_ARGS         25
  43. #define E_2MANY_ARGS         26
  44. #define E_BAD_TIME         27
  45. #define E_2HIGH             28
  46. #define E_2LOW              29
  47. #define E_CANT_OPEN          30
  48. #define E_NESTED_INCLUDE     31
  49. #define E_PARSE_ERR          32
  50. #define E_CANT_TRIG          33
  51. #define E_NESTED_IF          34
  52. #define E_ELSE_NO_IF         35
  53. #define E_ENDIF_NO_IF        36
  54. #define E_2MANY_LOCALOMIT    37
  55. #define E_EXTRANEOUS_TOKEN   38
  56. #define E_POP_NO_PUSH        39
  57. #define E_RUN_DISABLED       40
  58. #define E_DOMAIN_ERR         41
  59. #define E_BAD_ID             42
  60. #define E_RECURSIVE          43
  61. #define E_PARSE_AS_REM       44 /* Not really an error - just returned by
  62.                                    DoOmit to indicate line should be executed
  63.                                    as a REM statement, also. */
  64. #define E_CANT_MODIFY        45
  65. #define E_MKTIME_PROBLEM     46
  66. #define E_REDEF_FUNC         47
  67. #define E_CANTNEST_FDEF      48
  68. #define E_REP_FULSPEC        49
  69. #define E_YR_TWICE         50
  70. #define E_MON_TWICE         51
  71. #define E_DAY_TWICE         52
  72. #define E_UNKNOWN_TOKEN         53
  73. #define E_SPEC_MON_DAY         54
  74. #define E_2MANY_PART         55
  75. #define E_2MANY_FULL         56
  76. #define E_PUSH_NOPOP         57
  77. #define E_ERR_READING         58
  78. #define E_EXPECTING_EOL         59
  79. #define E_BAD_HEBDATE         60
  80. #define E_IIF_ODD         61
  81. #define E_MISS_ENDIF         62
  82. #define E_EXPECT_COMMA         63
  83. #define E_WD_TWICE         64
  84. #define E_SKIP_ERR         65
  85. #define E_CANT_NEST_RTYPE    66
  86. #define E_REP_TWICE         67
  87. #define E_DELTA_TWICE         68
  88. #define E_BACK_TWICE         69
  89. #define E_ONCE_TWICE         70
  90. #define E_EXPECT_TIME         71
  91. #define E_UNTIL_TWICE         72
  92. #define E_INCOMPLETE         73
  93. #define E_SCAN_TWICE         74
  94. #define E_VAR             75
  95. #define E_VAL             76
  96. #define E_UNDEF             77
  97. #define E_ENTER_FUN         78
  98. #define E_LEAVE_FUN         79
  99. #define E_EXPIRED         80
  100. #define E_CANTFORK         81
  101. #define E_CANTACCESS         82
  102. #define M_BAD_SYS_DATE         83
  103. #define M_BAD_DB_FLAG         84
  104. #define M_BAD_OPTION         85
  105. #define M_BAD_USER         86
  106. #define M_NO_CHG_GID         87
  107. #define M_NO_CHG_UID         88
  108. #define M_NOMEM_ENV         89
  109. #define E_MISS_EQ         90
  110. #define E_MISS_VAR         91
  111. #define E_MISS_EXPR         92
  112. #define M_CANTSET_ACCESS     93
  113. #define M_I_OPTION         94
  114. #define E_NOREMINDERS         95
  115. #define M_QUEUED         96
  116. #define E_EXPECTING_NUMBER   97
  117.  
  118. #ifdef MK_GLOBALS
  119. #undef EXTERN
  120. #define EXTERN
  121. #else
  122. #undef EXTERN
  123. #define EXTERN extern
  124. #endif
  125.  
  126. #ifndef L_ERR_OVERRIDE
  127. EXTERN char *ErrMsg[]
  128.  
  129. #ifdef MK_GLOBALS
  130. = {
  131.    "Ok",
  132.    "Missing ']'",
  133.    "Missing quote",
  134.    "Expression too complex - too many operators",
  135.    "Expression too complex - too many operands",
  136.    "Missing ')'",
  137.    "Undefined function",
  138.    "Illegal character",
  139.    "Expecting binary operator",
  140.    "Out of memory",
  141.    "Ill-formed number",
  142.    "Op stack underflow - internal error",
  143.    "Va stack underflow - internal error",
  144.    "Can't coerce",
  145.    "Type mismatch",
  146.    "Date overflow",
  147.    "Stack error - internal error",
  148.    "Division by zero",
  149.    "Undefined variable",
  150.    "Unexpected end of line",
  151.    "Unexpected end of file",
  152.    "I/O error",
  153.    "Line too long",
  154.    "Internal error",
  155.    "Bad date specification",
  156.    "Not enough arguments",
  157.    "Too many arguments",
  158.    "Ill-formed time",
  159.    "Number too high",
  160.    "Number too low",
  161.    "Can't open file",
  162.    "INCLUDE nested too deeply",
  163.    "Parse error",
  164.    "Can't compute trigger",
  165.    "Too many nested IFs",
  166.    "ELSE with no matching IF",
  167.    "ENDIF with no matching IF",
  168.    "Can't OMIT every weekday",
  169.    "Extraneous token(s) on line",
  170.    "POP-OMIT-CONTEXT without matching PUSH-OMIT-CONTEXT",
  171.    "RUN disabled",
  172.    "Domain error",
  173.    "Invalid identifier",
  174.    "Recursive function call detected",
  175.    "",
  176.    "Cannot modify system variable",
  177.    "C library function can't represent date/time",
  178.    "Attempt to redefine built-in function",
  179.    "Can't nest function definition in expression",
  180.    "Must fully specify date to use repeat factor",
  181.    "Year specified twice",
  182.    "Month specified twice",
  183.    "Day specified twice",
  184.    "Unknown token",
  185.    "Must specify month and day in OMIT command",
  186.    "Too many partial OMITs",
  187.    "Too many full OMITs",
  188.    "Warning: PUSH-OMIT-CONTEXT without matching POP-OMIT-CONTEXT",
  189.    "Error reading file",
  190.    "Expecting end-of-line",
  191.    "Invalid Hebrew date",
  192.    "IIF needs odd number of arguments",
  193.    "Warning: Missing ENDIF",
  194.    "Expecting comma",
  195.    "Weekday specified twice",
  196.    "Only use one of BEFORE, AFTER or SKIP",
  197.    "Can't nest MSG, MSF, RUN, etc. in expression",
  198.    "Repeat value specified twice",
  199.    "Delta value specified twice",
  200.    "Back value specified twice",
  201.    "ONCE keyword used twice. (Hah.)",
  202.    "Expecting time after AT",
  203.    "UNTIL keyword used twice",
  204.    "Incomplete date specification",
  205.    "SCANFROM keyword used twice",
  206.    "Variable",
  207.    "Value",
  208.    "*UNDEFINED*",
  209.    "Entering UserFN",
  210.    "Leaving UserFN",
  211.    "Expired",
  212.    "fork() failed - can't do queued reminders",
  213.    "Can't access file",
  214.    "Illegal system date: Year is less than %d\n",
  215.    "Unknown debug flag '%c'\n",
  216.    "Unknown option '%c'\n",
  217.    "Unknown user '%s'\n",
  218.    "Could not change gid to %d\n",
  219.    "Could not change uid to %d\n",
  220.    "Out of memory for environment\n",
  221.    "Missing '=' sign",
  222.    "Missing variable name",
  223.    "Missing expression",
  224.    "Can't reset access date of %s\n",
  225.    "Remind: '-i' option: %s\n",
  226.    "No reminders.",
  227.    "%d reminder(s) queued for later today.\n",
  228.    "Expecting number"
  229. }
  230. #endif /* MK_GLOBALS */
  231. ;
  232. #endif /* L_ERR_OVERRIDE */
  233.