# 2.11BSD#431 - /usr/src/ucb/PORT/pascal/utilities/pc3.h

##### Macros

    BOOL              X
    CHARALLOC         X
    ERROR             X
    FALSE             X
    FATAL             X
    NEW               X
    NIL               X
    NONE              X
    OARMAG            X
    OLD               X
    SHORT_ABS         X
    STRINGPRIME       X
    SYMBOLALLOC       X
    SYMBOLPRIME       X
    TRUE              X
    WARNING           X

##### struct's

    fileinfo          X
    stringtableinfo   X
    symbol            X
    symboltableinfo   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:  *	@(#)pc3.h	5.1 (Berkeley) 6/5/85
       7:  */
       8:
       9:     /*	static	char sccsid[] = "@(#)pc3.h 5.1 6/5/85"; */
      10:
      11:     /*
      12:      *	a symbol table entry.
      13:      */
      14: struct symbol {
      15:     char        *name;          /* pointer to string table */
      16:     short       desc;           /* symbol description */
      17:     int         lookup;         /* whether new or old */
      18:     struct symbol   *fromp;         /* its defining .p file */
      19:     union {                 /* either */
      20:     struct {                /*   for a symbol, */
      21:         struct symbol   *fromi;     /*     its defining .i file */
      22:         long        iline;      /*     the .i file line */
      23:         struct symbol   *rfilep;    /*     its resolving file */
      24:         long        rline;      /*     resolving file line */
      25:     }       sym_str;
      26:     long        checksum;       /*   for a file, its checksum */
      27:     }           sym_un;
      28: };
      29:
      30:     /*
      31:      *	struct for an argument .o file.
      32:      */
      33: struct fileinfo {
      34:     FILE        *file;
      35:     char        *name;
      36:     off_t       nextoffset;
      37: };
      38:
      39:     /*
      40:      *	old archive magic for error detection.
      41:      */
      42: #define OARMAG  0177545
      43:
      44:     /*
      45:      *	this is used to trim pointers into the range of a mod of a prime.
      46:      */
      47: #define SHORT_ABS( n )  ( n & 077777 )
      48:
      49:     /*
      50:      *	a prime number which gets sizeof( struct symboltableinfo )
      51:      *	up to a multiple of BUFSIZ.
      52:      */
      53: #define SYMBOLPRIME 1021
      54:
      55:     /*
      56:      *	number of entries used in this symbol table,
      57:      *	a chain to the next symbol table,
      58:      *	and the entries. (pointers to struct symbols.)
      59:      */
      60: struct symboltableinfo {
      61:     long            used;
      62:     struct symboltableinfo  *chain;
      63:     struct symbol       *entry[ SYMBOLPRIME ];
      64: };
      65:
      66:     /*
      67:      *	if new struct symbols are needed,
      68:      *	allocate this much space and hack it up into struct symbols.
      69:      */
      70: #define SYMBOLALLOC BUFSIZ
      71:
      72:     /*
      73:      *	a prime number which gets sizeof( struct stringtableinfo )
      74:      *	up to a multiple of BUFSIZ.
      75:      */
      76: #define STRINGPRIME 1021
      77:
      78:     /*
      79:      *	number of entries used in this string table,
      80:      *	a chain to the next string table,
      81:      *	and the entries. (pointers to the character table.)
      82:      */
      83: struct stringtableinfo {
      84:     long            used;
      85:     struct stringtableinfo  *chain;
      86:     char            *entry[ STRINGPRIME ];
      87: };
      88:
      89:     /*
      90:      *	if more character table space is needed,
      91:      *	allocate this much and hack it up into strings.
      92:      */
      93: #define CHARALLOC   BUFSIZ
      94:
      95:     /*
      96:      *	uninitialized pointer
      97:      */
      98: #define NIL 0
      99:
     100:     /*
     101:      *	an enumeration for error types
     102:      */
     103: #define NONE    0
     104: #define WARNING 1
     105: #define ERROR   2
     106: #define FATAL   3
     107:
     108:     /*
     109:      *	an enumeration for lookups
     110:      */
     111: #define NEW 0
     112: #define OLD 1
     113:
     114:     /*
     115:      *	booleans
     116:      */
     117: #define BOOL    int
     118: #define FALSE   0
     119: #define TRUE    1
     120:
     121:     /*
     122:      *	function types.
     123:      */
     124: struct symbol   *entersymbol();
     125: struct symbol   *symbolalloc();
     126: long        stringhash();
     127: char        *enterstring();
     128: char        *charalloc();
     129: BOOL        nextelement();
     130: time_t      mtime();
     131: char        *classify();
     132: char        *article();

#### Defined struct's

fileinfo defined in line 33; used 10 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 100(2), 126(2), 180(2), 268(2), 764(2)

stringtableinfo defined in line 83; used 10 times

- in line 85(2)
- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 659-661(4), 679-680(4)

symbol defined in line 14; used 36 times

- in line 18-23(6), 63(2), 124-125(4)
- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 270-272(6), 527(2), 535-536(4), 605-610(6), 616-622(6)

symboltableinfo defined in line 60; used 10 times

- in line 62(2)
- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 531-534(4), 553-554(4)

#### Defined macros

BOOL defined in line 117; used 3 times

- in line 129
- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 91, 762

CHARALLOC defined in line 93; used 2 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 741(2)

ERROR defined in line 105; used 7 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 137, 143, 161, 194, 350, 384, 441

FALSE defined in line 118; used 2 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 91, 774

FATAL defined in line 106; used 14 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 106, 210, 229, 298, 353, 361, 378, 480, 556, 620, 682, 748, 821-822(2)

NEW defined in line 111; used 2 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 289, 573

NIL defined in line 98; used 15 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 270-271(2), 314, 404, 440, 542, 549, 555, 564, 608, 668, 675, 681, 690, 734

NONE defined in line 103; used 1 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 90

OARMAG defined in line 42; used 1 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 146

OLD defined in line 112; used 1 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 583

SHORT_ABS defined in line 47; used 2 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 540, 666

STRINGPRIME defined in line 76; used 7 times

- in line 86
- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 666, 672, 687-692(2), 717-720(2)

SYMBOLALLOC defined in line 70; used 3 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 616-622(3)

SYMBOLPRIME defined in line 53; used 7 times

- in line 63
- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 540, 546, 561-566(2), 592-595(2)

TRUE defined in line 119; used 2 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 108, 790

WARNING defined in line 104; used 9 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 147, 205, 216, 223, 234, 321, 332, 497, 801

#### Usage of this include

pc3.h used 1 times

- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 88

Last modified: 1985-06-06 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1147 |