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
stringtableinfo defined in line 83; used 10 times
symbol defined in line 14; used 36 times
symboltableinfo defined in line 60; used 10 times

Defined macros

BOOL defined in line 117; used 3 times
CHARALLOC defined in line 93; used 2 times
ERROR defined in line 105; used 7 times
FALSE defined in line 118; used 2 times
FATAL defined in line 106; used 14 times
NEW defined in line 111; used 2 times
NIL defined in line 98; used 15 times
NONE defined in line 103; used 1 times
OARMAG defined in line 42; used 1 times
OLD defined in line 112; used 1 times
SHORT_ABS defined in line 47; used 2 times
STRINGPRIME defined in line 76; used 7 times
SYMBOLALLOC defined in line 70; used 3 times
SYMBOLPRIME defined in line 53; used 7 times
TRUE defined in line 119; used 2 times
WARNING defined in line 104; used 9 times

Usage of this include

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