home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Compilers⁄Interps / Harvest C / Source Code / Errors.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-16  |  3.1 KB  |  135 lines  |  [TEXT/ALFA]

  1. /*
  2.  * Harvest C
  3.  * 
  4.  * Copyright 1991 Eric W. Sink   All rights reserved.
  5.  * 
  6.  * This file contains interfaces for error handling
  7.  * 
  8.  * 
  9.  * 
  10.  */
  11.  
  12. #ifndef Errors_INTERFACE
  13. #define Errors_INTERFACE
  14.  
  15. #define MAXWARNINGS 100
  16. /* ALL warnings should be optional. */
  17.  
  18. /*
  19.  * Do NOT delete any warnings from this enum.  Numbers must remain constant.
  20.  * The correct way to remove a warning, is to remove all calls to it, and
  21.  * change its warning message in warnings.c.
  22.  */
  23. enum Ecc_Warnings {
  24.     WARN_emptystatement = 1,
  25.     WARN_multicharconstant,
  26.     WARN_redundantcast,
  27.     WARN_floateqcompare,
  28.     WARN_discardfuncresult,
  29.     WARN_assignif,
  30.     WARN_nonvoidreturn,
  31.     WARN_constantif,
  32.     WARN_comparepointerint,
  33.     WARN_pointernonequivassign,
  34.     WARN_pointernonequivreturn,
  35.     WARN_pointernonequivarg,
  36.     WARN_constantswitch,
  37.     WARN_constantwhile,
  38.     WARN_constantdowhile,
  39.     WARN_constantfor,
  40.     WARN_nonintegralswitch,
  41.     WARN_novolatile,
  42.     WARN_AVAILABLE1,
  43.     WARN_unusedvariable,
  44.     WARN_deadcode,
  45.     WARN_implicitdecl,
  46.     WARN_preprocredef,
  47.     WARN_nestedcomment,
  48.     WARN_AVAILABLE2,
  49.     WARN_goto,
  50.     WARN_multireturn,
  51.     WARN_emptycompound,
  52.     WARN_missingreturntype,
  53.     WARN_trigraphs,
  54.     WARN_AVAILABLE3,
  55.     WARN_pascal,
  56.     WARN_AVAILABLE4,
  57.     WARN_semiafterfunction
  58. };
  59.  
  60. void
  61.                                 Output(char *mesg, GenericFileVia_t thefile);
  62. void
  63.                                 OutputCR(char *mesg, GenericFileVia_t thefile);
  64. void
  65.                                 UserMesg(char *mesg);
  66. void
  67.                                 UserMesgCR(char *mesg);
  68. void
  69.                                 File_Line(char *);
  70.  
  71. void
  72.                                 EccErrorNOFILE(char *mesg);
  73.  
  74. void
  75.                                 EccError(char *mesg);
  76.  
  77. int
  78.                                 AssertError(char *file, int line, char *expr);
  79.  
  80. void
  81.                                 TypeError(char *mesg);
  82. void
  83.                                 SemanticError(char *mesg);
  84.  
  85. void
  86.                                 DeclError2(char *mesg, char *info);
  87.  
  88. void
  89.                                 DeclErrorSYM(char *mesg, SYMVia_t thesym);
  90.  
  91. void
  92.                                 DeclError(char *mesg);
  93.  
  94. void
  95.                                 FatalError2(char *mesg, char *info);
  96.  
  97. void
  98.                                 FatalError(char *mesg);
  99.  
  100. void
  101.                                 PreprocError2(char *mesg, char *info);
  102.  
  103. void
  104.                                 UserError(char *mesg);
  105.  
  106. void
  107.                                 PreprocError(char *mesg);
  108.  
  109. void
  110.                                 LexError(char *mesg);
  111.  
  112. void
  113.                                 SemanticError2(char *mesg, char *info);
  114.  
  115. void
  116.                                 InlineAsmError(char *mesg);
  117.  
  118. void
  119.                                 SyntaxError(char *mesg);
  120.  
  121. void
  122.                                 Gen68Error(char *mesg);
  123.  
  124. void
  125.                                 VeryBadParseError(char *mesg);
  126. void
  127.                                 UserWarning(int num);
  128.  
  129. void
  130.                                 UserWarning2(int num, char *mesg);
  131. void
  132.                                 EccWarning(char *mesg);
  133.  
  134. #endif
  135.