# 2.11BSD#431 - /usr/src/ucb/PORT/pascal/pdx/defs.h

##### Variables

    cmdname           X
    errfilename       X
    errlineno         X

##### Macros

    FALSE             X
    LOCAL             X
    NIL               X
    TRUE              X
    alloc             X
    dispose           X
    get               X
    put               X
    strdup            X
    streq             X

##### typedef's

    ADDRESS           X
    BOOLEAN           X
    BYTE              X
    FRAME             X
    LINENO            X
    NODE              X
    OP                X
    OPINFO            X
    SYM               X
    SYMTAB            X
    WORD              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:  *	@(#)defs.h	5.1 (Berkeley) 6/6/85
       7:  */
       8:
       9: /*
      10:  * Global debugger defines.
      11:  *
      12:  * All files include this header.
      13:  */
      14:
      15: #include <stdio.h>
      16:
      17: /*
      18:  * Since C does not allow forward referencing of types,
      19:  * all the global types are declared here.
      20:  */
      21:
      22: #define LOCAL static
      23: #define NIL 0
      24:
      25: typedef int BOOLEAN;
      26:
      27: #define FALSE 0
      28: #define TRUE 1
      29:
      30: typedef unsigned int ADDRESS;       /* object code addresses */
      31: typedef short LINENO;           /* source file line numbers */
      32: typedef struct sym SYM;         /* symbol information structure */
      33: typedef struct symtab SYMTAB;       /* symbol table */
      34: typedef struct node NODE;       /* expression tree node */
      35: typedef short OP;           /* tree operator */
      36: typedef struct opinfo OPINFO;       /* tree operator information table */
      37: typedef unsigned int WORD;      /* machine word */
      38: typedef unsigned char BYTE;     /* machine byte */
      39: typedef struct frame FRAME;     /* runtime activation record */
      40:
      41: /*
      42:  * Definitions of standard C library routines that aren't in the
      43:  * standard I/O library, but which are generally useful.
      44:  */
      45:
      46: extern long atol();     /* ascii to long */
      47: extern double atof();       /* ascii to floating point */
      48: extern char *mktemp();      /* make a temporary file name */
      49:
      50: /*
      51:  * Definitions of library routines.
      52:  */
      53:
      54: char *cmdname;          /* name of command for error messages */
      55: char *errfilename;      /* current file associated with error */
      56: short errlineno;        /* line number associated with error */
      57:
      58: error();            /* print an error message */
      59: panic();            /* print error message and exit */
      60: short numerrors();      /* return number of errors since last call */
      61:
      62: /*
      63:  * defintions for doing memory allocation
      64:  */
      65:
      66: extern char *malloc();
      67:
      68: #define alloc(n, type)  ((type *) malloc((unsigned) (n) * sizeof(type)))
      69: #define dispose(p)  { free((char *) p); p = NIL; }
      70:
      71: /*
      72:  * macros for doing freads + fwrites
      73:  */
      74:
      75: #define get(fp, var)    fread((char *) &(var), sizeof(var), 1, fp)
      76: #define put(fp, var)    fwrite((char *) &(var), sizeof(var), 1, fp)
      77:
      78: /*
      79:  * string definitions
      80:  */
      81:
      82: extern char *strcpy();
      83: extern int strlen();
      84:
      85: #define strdup(s)       strcpy(malloc((unsigned) strlen(s) + 1), s)
      86: #define streq(s1, s2)   (strcmp(s1, s2) == 0)

#### Defined variables

cmdname defined in line 54; never used
errfilename defined in line 55; never used
errlineno defined in line 56; never used

#### Defined typedef's

ADDRESS defined in line 30; never used
BOOLEAN defined in line 25; never used
BYTE defined in line 38; never used
FRAME defined in line 39; never used
LINENO defined in line 31; used 1 times

- in /usr/src/ucb/PORT/pascal/src/savenl.c line 279

NODE defined in line 34; never used
OP defined in line 35; never used
OPINFO defined in line 36; never used
SYM defined in line 32; never used
SYMTAB defined in line 33; never used
WORD defined in line 37; never used

#### Defined macros

FALSE defined in line 27; never used
LOCAL defined in line 22; used 13 times

- in /usr/src/ucb/PORT/pascal/src/savenl.c line 59-69(9), 238-239(2), 291, 308

NIL defined in line 23; used 3 times

- in line 69
- in /usr/src/ucb/PORT/pascal/src/savenl.c line 47, 188

TRUE defined in line 28; never used
alloc defined in line 68; never used
dispose defined in line 69; never used
get defined in line 75; never used
put defined in line 76; never used
strdup defined in line 85; never used
streq defined in line 86; never used

#### Usage of this include

defs.h used 1 times

- in /usr/src/ucb/PORT/pascal/src/savenl.c line 53

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