1: /*
   2:  *  @(#)error.h	1.2 (Berkeley) 1/22/82
   3:  */
   4: typedef int boolean;
   5: #define reg register
   6: 
   7: #define TRUE    1
   8: #define FALSE   0
   9: 
  10: #define true    1
  11: #define false   0
  12: /*
  13:  *	Descriptors for the various languages we know about.
  14:  *	If you touch these, also touch lang_table
  15:  */
  16: #define INUNKNOWN   0
  17: #define INCPP   1
  18: #define INCC    2
  19: #define INAS    3
  20: #define INLD    4
  21: #define INLINT  5
  22: #define INF77   6
  23: #define INPI    7
  24: #define INPC    8
  25: #define INFRANZ 9
  26: #define INLISP  10
  27: #define INVAXIMA    11
  28: #define INRATFOR    12
  29: #define INLEX   13
  30: #define INYACC  14
  31: #define INAPL   15
  32: #define INMAKE  16
  33: #define INRI    17
  34: 
  35: extern  int language;
  36: /*
  37:  *	We analyze each line in the error message file, and
  38:  *	attempt to categorize it by type, as well as language.
  39:  *	Here are the type descriptors.
  40:  */
  41: typedef int Errorclass;
  42: 
  43: #define C_FIRST 0       /* first error category */
  44: #define C_UNKNOWN   0   /* must be zero */
  45: #define C_IGNORE    1   /* ignore the message; used for pi */
  46: #define C_SYNC      2   /* synchronization errors */
  47: #define C_DISCARD   3   /* touches dangerous files, so discard */
  48: #define C_NONSPEC   4   /* not specific to any file */
  49: #define C_THISFILE  5   /* specific to this file, but at no line */
  50: #define C_NULLED    6   /* refers to special func; so null */
  51: #define C_TRUE      7   /* fits into true error format */
  52: #define C_DUPL      8   /* sub class only; duplicated error message */
  53: #define C_LAST  9       /* last error category */
  54: 
  55: #define SORTABLE(x) (!(NOTSORTABLE(x)))
  56: #define NOTSORTABLE(x)  (x <= C_NONSPEC)
  57: /*
  58:  *	Resources to count and print out the error categories
  59:  */
  60: extern  char        *class_table[];
  61: extern  int     class_count[];
  62: 
  63: #define nunknown    class_count[C_UNKNOWN]
  64: #define nignore     class_count[C_IGNORE]
  65: #define nsyncerrors class_count[C_SYNC]
  66: #define ndiscard    class_count[C_DISCARD]
  67: #define nnonspec    class_count[C_NONSPEC]
  68: #define nthisfile   class_count[C_THISFILE]
  69: #define nnulled     class_count[C_NULLED]
  70: #define ntrue       class_count[C_TRUE]
  71: #define ndupl       class_count[C_DUPL]
  72: 
  73: /* places to put the error complaints */
  74: 
  75: #define TOTHEFILE   1   /* touch the file */
  76: #define TOSTDOUT    2   /* just print them out (ho-hum) */
  77: 
  78: FILE    *errorfile; /* where error file comes from */
  79: FILE    *queryfile; /* where the query responses from the user come from*/
  80: 
  81: extern  char    *currentfilename;
  82: extern  char    *processname;
  83: extern  char    *scriptname;
  84: 
  85: extern  boolean query;
  86: extern  boolean terse;
  87: int inquire();          /* inquire for yes/no */
  88: /*
  89:  *	codes for inquire() to return
  90:  */
  91: #define Q_NO    1           /* 'N' */
  92: #define Q_no    2           /* 'n' */
  93: #define Q_YES   3           /* 'Y' */
  94: #define Q_yes   4           /* 'y' */
  95: 
  96: int probethisfile();
  97: /*
  98:  *	codes for probethisfile to return
  99:  */
 100: #define F_NOTEXIST  1
 101: #define F_NOTREAD   2
 102: #define F_NOTWRITE  3
 103: #define F_TOUCHIT   4
 104: 
 105: /*
 106:  *	Describes attributes about a language
 107:  */
 108: struct lang_desc{
 109:     char    *lang_name;
 110:     char    *lang_incomment;    /* one of the following defines */
 111:     char    *lang_outcomment;   /* one of the following defines */
 112: };
 113: extern struct lang_desc lang_table[];
 114: 
 115: #define CINCOMMENT  "/*###"
 116: #define COUTCOMMENT "%%%*/\n"
 117: #define FINCOMMENT  "C###"
 118: #define FOUTCOMMENT "%%%\n"
 119: #define NEWLINE     "%%%\n"
 120: #define PIINCOMMENT "(*###"
 121: #define PIOUTCOMMENT    "%%%*)\n"
 122: #define LISPINCOMMENT   ";###"
 123: #define ASINCOMMENT "####"
 124: #define RIINCOMMENT CINCOMMENT
 125: #define RIOUTCOMMENT    COUTCOMMENT
 126: /*
 127:  *	Defines and resources for determing if a given line
 128:  *	is to be discarded because it refers to a file not to
 129:  *	be touched, or if the function reference is to a
 130:  *	function the user doesn't want recorded.
 131:  */
 132: #define IG_FILE1    "llib-lc"
 133: #define IG_FILE2    "llib-port"
 134: #define IG_FILE3    "/usr/lib/llib-lc"
 135: #define IG_FILE4    "/usr/lib/llib-port"
 136: 
 137: #define ERRORNAME   "/.errorrc"
 138: int nignored;
 139: char    **names_ignored;
 140: /*
 141:  *	Structure definition for a full error
 142:  */
 143: typedef struct edesc    Edesc;
 144: typedef Edesc   *Eptr;
 145: 
 146: struct edesc{
 147:     Eptr    error_next;     /*linked together*/
 148:     int error_lgtext;       /* how many on the right hand side*/
 149:     char    **error_text;       /* the right hand side proper*/
 150:     Errorclass  error_e_class;  /* error category of this error*/
 151:     Errorclass  error_s_class;  /* sub descriptor of error_e_class*/
 152:     int error_language;     /* the language for this error*/
 153:     int error_position;     /* oridinal position */
 154:     int error_line;     /* discovered line number*/
 155:     int error_no;       /* sequence number on input */
 156: };
 157: /*
 158:  *	Resources for the true errors
 159:  */
 160: extern  int nerrors;
 161: extern  Eptr    er_head;
 162: extern  Eptr    *errors;
 163: /*
 164:  *	Resources for each of the files mentioned
 165:  */
 166: extern  int nfiles;
 167: extern  Eptr    **files;    /* array of pointers into errors*/
 168: boolean *touchedfiles;          /* which files we touched */
 169: /*
 170:  *	The langauge the compilation is in, as intuited from
 171:  *	the flavor of error messages analyzed.
 172:  */
 173: extern  int langauge;
 174: extern  char    *currentfilename;
 175: /*
 176:  *	Functional forwards
 177:  */
 178: char    *Calloc();
 179: char    *strsave();
 180: char    *clobberfirst();
 181: char    lastchar();
 182: char    firstchar();
 183: char    next_lastchar();
 184: char    **wordvsplice();
 185: int wordvcmp();
 186: boolean persperdexplode();
 187: /*
 188:  *	Printing hacks
 189:  */
 190: char    *plural(), *verbform();

Defined variables

names_ignored defined in line 139; used 7 times
nignored defined in line 138; used 10 times
touchedfiles defined in line 168; used 7 times

Defined struct's

edesc defined in line 146; used 1 times
lang_desc defined in line 108; used 4 times

Defined typedef's

Edesc defined in line 143; used 2 times
Eptr defined in line 144; used 47 times
Errorclass defined in line 41; used 31 times

Defined macros

ASINCOMMENT defined in line 123; used 2 times
CINCOMMENT defined in line 115; used 2 times
COUTCOMMENT defined in line 116; used 2 times
C_DISCARD defined in line 47; used 2 times
C_DUPL defined in line 52; used 3 times
C_FIRST defined in line 43; used 1 times
C_LAST defined in line 53; used 1 times
C_NONSPEC defined in line 48; used 9 times
C_NULLED defined in line 50; used 3 times
C_SYNC defined in line 46; used 12 times
C_THISFILE defined in line 49; used 2 times
C_TRUE defined in line 51; used 25 times
C_UNKNOWN defined in line 44; used 30 times
ERRORNAME defined in line 137; used 1 times
FINCOMMENT defined in line 117; used 1 times
FOUTCOMMENT defined in line 118; used 1 times
F_NOTEXIST defined in line 100; used 1 times
F_NOTREAD defined in line 101; used 1 times
F_NOTWRITE defined in line 102; used 1 times
F_TOUCHIT defined in line 103; used 1 times
IG_FILE1 defined in line 132; used 1 times
IG_FILE2 defined in line 133; used 1 times
IG_FILE3 defined in line 134; used 1 times
IG_FILE4 defined in line 135; used 1 times
INAPL defined in line 31; never used
INAS defined in line 19; used 1 times
INCC defined in line 18; used 4 times
INCPP defined in line 17; used 1 times
INF77 defined in line 22; used 1 times
INFRANZ defined in line 25; never used
INLD defined in line 20; used 4 times
INLEX defined in line 29; never used
INLINT defined in line 21; used 5 times
INLISP defined in line 26; never used
INMAKE defined in line 32; used 3 times
INPC defined in line 24; never used
INPI defined in line 23; used 8 times
INRATFOR defined in line 28; never used
INRI defined in line 33; used 1 times
INUNKNOWN defined in line 16; used 1 times
INVAXIMA defined in line 27; never used
INYACC defined in line 30; never used
LISPINCOMMENT defined in line 122; used 1 times
NEWLINE defined in line 119; used 1 times
NOTSORTABLE defined in line 56; used 7 times
PIINCOMMENT defined in line 120; used 1 times
PIOUTCOMMENT defined in line 121; used 1 times
Q_NO defined in line 91; used 3 times
Q_YES defined in line 93; used 2 times
Q_no defined in line 92; used 1 times
Q_yes defined in line 94; used 1 times
RIINCOMMENT defined in line 124; used 1 times
RIOUTCOMMENT defined in line 125; used 1 times
SORTABLE defined in line 55; used 1 times
TOSTDOUT defined in line 76; used 7 times
TOTHEFILE defined in line 75; used 2 times
false defined in line 11; used 3 times
ndiscard defined in line 66; used 2 times
ndupl defined in line 71; never used
nignore defined in line 64; used 4 times
nnonspec defined in line 67; used 3 times
nnulled defined in line 69; used 3 times
nsyncerrors defined in line 65; used 3 times
nthisfile defined in line 68; used 3 times
ntrue defined in line 70; used 3 times
nunknown defined in line 63; used 3 times
true defined in line 10; used 1 times

Usage of this include

Last modified: 1983-06-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1402
Valid CSS Valid XHTML 1.0 Strict