# 2.11BSD#431 - /usr/src/ucb/error/error.h

##### Variables

    names_ignored     X
    nignored          X
    touchedfiles      X

##### Macros

    ASINCOMMENT       X
    CINCOMMENT        X
    COUTCOMMENT       X
    C_DISCARD         X
    C_DUPL            X
    C_FIRST           X
    C_IGNORE          X
    C_LAST            X
    C_NONSPEC         X
    C_NULLED          X
    C_SYNC            X
    C_THISFILE        X
    C_TRUE            X
    C_UNKNOWN         X
    ERRORNAME         X
    FALSE             X
    FINCOMMENT        X
    FOUTCOMMENT       X
    F_NOTEXIST        X
    F_NOTREAD         X
    F_NOTWRITE        X
    F_TOUCHIT         X
    IG_FILE1          X
    IG_FILE2          X
    IG_FILE3          X
    IG_FILE4          X
    INAPL             X
    INAS              X
    INCC              X
    INCPP             X
    INF77             X
    INFRANZ           X
    INLD              X
    INLEX             X
    INLINT            X
    INLISP            X
    INMAKE            X
    INMOD2            X
    INPC              X
    INPI              X
    INRATFOR          X
    INRI              X
    INTROFF           X
    INUNKNOWN         X
    INVAXIMA          X
    INYACC            X
    LISPINCOMMENT     X
    MOD2INCOMMENT     X
    MOD2OUTCOMMENT    X
    NEWLINE           X
    NOTSORTABLE       X
    PIINCOMMENT       X
    PIOUTCOMMENT      X
    Q_NO              X
    Q_YES             X
    Q_no              X
    Q_yes             X
    RIINCOMMENT       X
    RIOUTCOMMENT      X
    SORTABLE          X
    TOSTDOUT          X
    TOTHEFILE         X
    TROFFINCOMMENT    X
    TROFFOUTCOMMENT   X
    TRUE              X
    false             X
    ndiscard          X
    ndupl             X
    nignore           X
    nnonspec          X
    nnulled           X
    nsyncerrors       X
    nthisfile         X
    ntrue             X
    nunknown          X
    reg               X
    true              X

##### struct's

    edesc             X
    lang_desc         X

##### typedef's

    Edesc             X
    Eptr              X
    Errorclass        X
    boolean           X

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

#### Defined variables

names_ignored defined in line 150; used 7 times

- in /usr/src/ucb/error/errorfilter.c line 73, 84-91(5), 113

nignored defined in line 149; used 10 times

- in /usr/src/ucb/error/errorfilter.c line 41, 71-73(3), 80-90(4), 109-111(2)

touchedfiles defined in line 179; used 7 times

- in /usr/src/ucb/error/errortouch.c line 44, 61(2), 69, 229, 262, 469

#### Defined struct's

edesc defined in line 157; used 1 times

- in line 154

lang_desc defined in line 115; used 4 times

- in line 120(2)
- in /usr/src/ucb/error/errorsubr.c line 231(2)

#### Defined typedef's

Edesc defined in line 154; used 2 times

- in line 155
- in /usr/src/ucb/error/errorinput.c line 108

Eptr defined in line 155; used 47 times

- in line 172-158(4)
- in /usr/src/ucb/error/errorfilter.c line 131
- in /usr/src/ucb/error/errorinput.c line 43, 93, 108
- in /usr/src/ucb/error/errormain.c line 20-24(3), 155, 229-231(2)
- in /usr/src/ucb/error/errorsubr.c line 19-23(4), 30(2), 37, 258-261(2)
- in /usr/src/ucb/error/errortouch.c line 29-43(6), 81-85(2), 116, 153-158(3), 188-195(3), 247, 280-284(2), 358, 364-365(2), 456, 532, 689

Errorclass defined in line 48; used 35 times

- in line 161-162(2)
- in /usr/src/ucb/error/errorfilter.c line 130-135(2)
- in /usr/src/ucb/error/errorinput.c line 21-34(14), 46, 90-91(2), 132, 178, 200, 237, 264, 294, 331, 361, 417, 429, 464, 473, 497
- in /usr/src/ucb/error/errorpi.c line 177

boolean defined in line 9; used 35 times

- in line 92-93(2), 179, 197
- in /usr/src/ucb/error/errorinput.c line 45
- in /usr/src/ucb/error/errormain.c line 31-34(4), 91-94(4)
- in /usr/src/ucb/error/errorpi.c line 116, 129, 136, 147, 159, 187, 272
- in /usr/src/ucb/error/errorsubr.c line 157, 188, 256
- in /usr/src/ucb/error/errortouch.c line 44(2), 184-186(2), 197, 250, 277, 360, 490-495(2), 533, 690

#### Defined macros

ASINCOMMENT defined in line 130; used 2 times

- in /usr/src/ucb/error/errorsubr.c line 235, 248

CINCOMMENT defined in line 122; used 2 times

- in line 131
- in /usr/src/ucb/error/errorsubr.c line 216

COUTCOMMENT defined in line 123; used 2 times

- in line 132
- in /usr/src/ucb/error/errorsubr.c line 217

C_DISCARD defined in line 54; used 2 times

- in line 73
- in /usr/src/ucb/error/errorfilter.c line 151

C_DUPL defined in line 59; used 3 times

- in line 78
- in /usr/src/ucb/error/errorinput.c line 321
- in /usr/src/ucb/error/errorsubr.c line 266

C_FIRST defined in line 50; used 1 times

- in /usr/src/ucb/error/errortouch.c line 112

C_IGNORE defined in line 52; used 4 times

- in line 71
- in /usr/src/ucb/error/errorpi.c line 345
- in /usr/src/ucb/error/errorsubr.c line 264
- in /usr/src/ucb/error/errortouch.c line 694

C_LAST defined in line 60; used 1 times

- in /usr/src/ucb/error/errortouch.c line 112

C_NONSPEC defined in line 55; used 9 times

- in line 63, 74
- in /usr/src/ucb/error/errorfilter.c line 144-148(2), 158
- in /usr/src/ucb/error/errorinput.c line 100, 170, 366, 470

C_NULLED defined in line 57; used 3 times

- in line 76
- in /usr/src/ucb/error/errorfilter.c line 159
- in /usr/src/ucb/error/errortouch.c line 65

C_SYNC defined in line 53; used 13 times

- in line 72
- in /usr/src/ucb/error/errorinput.c line 46, 145-153(3), 159, 173, 393, 421-425(2)
- in /usr/src/ucb/error/errorpi.c line 328, 337
- in /usr/src/ucb/error/errortouch.c line 165

C_THISFILE defined in line 56; used 2 times

- in line 75
- in /usr/src/ucb/error/errorpi.c line 302

C_TRUE defined in line 58; used 27 times

- in line 77
- in /usr/src/ucb/error/errorinput.c line 96-102(3), 112, 195, 224, 258, 286, 321-325(2), 353, 410, 459, 493, 516
- in /usr/src/ucb/error/errorpi.c line 225, 246, 288-292(2), 316, 369-373(3)
- in /usr/src/ucb/error/errortouch.c line 66, 216, 379

C_UNKNOWN defined in line 51; used 35 times

- in line 70
- in /usr/src/ucb/error/errorinput.c line 58-76(15), 175, 197, 226, 261, 291, 328, 356, 368, 396, 412, 427, 461, 495, 518
- in /usr/src/ucb/error/errorpi.c line 182, 288, 370-375(2)
- in /usr/src/ucb/error/errortouch.c line 162

ERRORNAME defined in line 148; used 1 times

- in /usr/src/ucb/error/errorfilter.c line 54

FALSE defined in line 13; used 25 times

- in /usr/src/ucb/error/errormain.c line 31-34(4), 91-94(4), 157
- in /usr/src/ucb/error/errorpi.c line 144, 163-167(2)
- in /usr/src/ucb/error/errorsubr.c line 182, 213
- in /usr/src/ucb/error/errortouch.c line 61, 69, 226, 241, 254, 287-288(2), 393, 490, 514, 609

FINCOMMENT defined in line 124; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 218

FOUTCOMMENT defined in line 125; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 219

F_NOTEXIST defined in line 107; used 1 times

- in /usr/src/ucb/error/errortouch.c line 730

F_NOTREAD defined in line 108; used 1 times

- in /usr/src/ucb/error/errortouch.c line 732

F_NOTWRITE defined in line 109; used 1 times

- in /usr/src/ucb/error/errortouch.c line 734

F_TOUCHIT defined in line 110; used 1 times

- in /usr/src/ucb/error/errortouch.c line 735

IG_FILE1 defined in line 143; used 1 times

- in /usr/src/ucb/error/errorfilter.c line 18

IG_FILE2 defined in line 144; used 1 times

- in /usr/src/ucb/error/errorfilter.c line 19

IG_FILE3 defined in line 145; used 1 times

- in /usr/src/ucb/error/errorfilter.c line 20

IG_FILE4 defined in line 146; used 1 times

- in /usr/src/ucb/error/errorfilter.c line 21

INAPL defined in line 36; never used
INAS defined in line 24; used 1 times

- in /usr/src/ucb/error/errorinput.c line 149

INCC defined in line 23; used 4 times

- in /usr/src/ucb/error/errorinput.c line 159, 223, 256
- in /usr/src/ucb/error/errormain.c line 25

INCPP defined in line 22; used 1 times

- in /usr/src/ucb/error/errorinput.c line 192

INF77 defined in line 27; used 1 times

- in /usr/src/ucb/error/errorinput.c line 403

INFRANZ defined in line 30; never used
INLD defined in line 25; used 4 times

- in /usr/src/ucb/error/errorinput.c line 135, 153, 162, 188

INLEX defined in line 34; never used
INLINT defined in line 26; used 5 times

- in /usr/src/ucb/error/errorfilter.c line 147
- in /usr/src/ucb/error/errorinput.c line 285, 314, 347, 365

INLISP defined in line 31; never used
INMAKE defined in line 37; used 3 times

- in /usr/src/ucb/error/errorinput.c line 145, 420-424(2)

INMOD2 defined in line 40; used 1 times

- in /usr/src/ucb/error/errorinput.c line 515

INPC defined in line 29; never used
INPI defined in line 28; used 8 times

- in /usr/src/ucb/error/errorpi.c line 210, 238, 275, 310, 325, 335, 343, 362

INRATFOR defined in line 33; never used
INRI defined in line 38; used 1 times

- in /usr/src/ucb/error/errorinput.c line 458

INTROFF defined in line 39; used 1 times

- in /usr/src/ucb/error/errorinput.c line 492

INUNKNOWN defined in line 21; used 1 times

- in /usr/src/ucb/error/errorinput.c line 469

INVAXIMA defined in line 32; never used
INYACC defined in line 35; never used
LISPINCOMMENT defined in line 129; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 223

MOD2INCOMMENT defined in line 135; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 228

MOD2OUTCOMMENT defined in line 136; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 229

NEWLINE defined in line 126; used 2 times

- in line 134
- in /usr/src/ucb/error/errorsubr.c line 220

NOTSORTABLE defined in line 63; used 7 times

- in line 62
- in /usr/src/ucb/error/errormain.c line 243-246(4)
- in /usr/src/ucb/error/errortouch.c line 53, 162

PIINCOMMENT defined in line 127; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 221

PIOUTCOMMENT defined in line 128; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 222

Q_NO defined in line 98; used 3 times

- in /usr/src/ucb/error/errortouch.c line 380, 387, 718

Q_YES defined in line 100; used 2 times

- in /usr/src/ucb/error/errortouch.c line 25, 716

Q_no defined in line 99; used 1 times

- in /usr/src/ucb/error/errortouch.c line 719

Q_yes defined in line 101; used 1 times

- in /usr/src/ucb/error/errortouch.c line 717

RIINCOMMENT defined in line 131; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 224

RIOUTCOMMENT defined in line 132; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 225

SORTABLE defined in line 62; used 1 times

- in /usr/src/ucb/error/errortouch.c line 91

TOSTDOUT defined in line 83; used 8 times

- in /usr/src/ucb/error/errortouch.c line 255, 261-264(2), 311, 328, 335, 342, 349

TOTHEFILE defined in line 82; used 2 times

- in /usr/src/ucb/error/errortouch.c line 269, 349

TROFFINCOMMENT defined in line 133; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 226

TROFFOUTCOMMENT defined in line 134; used 1 times

- in /usr/src/ucb/error/errorsubr.c line 227

TRUE defined in line 12; used 21 times

- in /usr/src/ucb/error/errormain.c line 106-111(6), 154
- in /usr/src/ucb/error/errorpi.c line 142
- in /usr/src/ucb/error/errorsubr.c line 179, 210
- in /usr/src/ucb/error/errortouch.c line 176, 237, 262, 295-297(2), 382, 389, 502, 509-511(2), 610

false defined in line 16; never used
ndiscard defined in line 73; used 2 times

- in /usr/src/ucb/error/errorinput.c line 118
- in /usr/src/ucb/error/errormain.c line 168

ndupl defined in line 78; never used
nignore defined in line 71; used 4 times

- in /usr/src/ucb/error/errorinput.c line 124
- in /usr/src/ucb/error/errormain.c line 163-167(3)

nnonspec defined in line 74; used 3 times

- in /usr/src/ucb/error/errorinput.c line 120
- in /usr/src/ucb/error/errormain.c line 171-172(2)

nnulled defined in line 76; used 3 times

- in /usr/src/ucb/error/errorinput.c line 119
- in /usr/src/ucb/error/errormain.c line 169-170(2)

nsyncerrors defined in line 72; used 3 times

- in /usr/src/ucb/error/errorinput.c line 117
- in /usr/src/ucb/error/errormain.c line 165-166(2)

nthisfile defined in line 75; used 3 times

- in /usr/src/ucb/error/errorinput.c line 121
- in /usr/src/ucb/error/errormain.c line 173-174(2)

ntrue defined in line 77; used 3 times

- in /usr/src/ucb/error/errorinput.c line 122
- in /usr/src/ucb/error/errormain.c line 175-176(2)

nunknown defined in line 70; used 3 times

- in /usr/src/ucb/error/errorinput.c line 123
- in /usr/src/ucb/error/errormain.c line 161-162(2)

reg defined in line 10; used 48 times

- in /usr/src/ucb/error/errorfilter.c line 33, 105-106(2), 131-134(2)
- in /usr/src/ucb/error/errorinput.c line 93-94(2), 239-240(2), 266
- in /usr/src/ucb/error/errormain.c line 231
- in /usr/src/ucb/error/errorpi.c line 130, 138, 160
- in /usr/src/ucb/error/errorsubr.c line 22-25(4), 79-82(3), 97, 161, 192, 260-261(2), 301, 346, 367-369(2)
- in /usr/src/ucb/error/errortouch.c line 37-39(2), 85, 118, 157-158(2), 193-195(3), 284, 364-365(2), 403-404(2), 532, 553-555(3)

true defined in line 15; never used

#### Usage of this include

error.h used 6 times

- in /usr/src/ucb/error/errorfilter.c line 15
- in /usr/src/ucb/error/errorinput.c line 13
- in /usr/src/ucb/error/errormain.c line 17
- in /usr/src/ucb/error/errorpi.c line 13
- in /usr/src/ucb/error/errorsubr.c line 13
- in /usr/src/ucb/error/errortouch.c line 16

Last modified: 1996-10-24 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1972 |