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

##### Variables

    enclosing         X
    rtlocs            X

##### Macros

    ADDR_REG_OFFSET   X
    BITSPERBYTE       X
    CURFILEOFFSET     X
    DATA_REG_OFFSET   X
    DISPLAYNAME       X
    DSAVEOFFSET       X
    EXTFORMAT         X
    FORMALPREFIX      X
    FRAME_SIZE_LABEL  X
    GOTOENVOFFSET     X
    LABELFORMAT       X
    LABELPREFIX       X
    LLABELPREFIX      X
    NAMEFORMAT        X
    P2AP              X
    P2APNAME          X
    P2FP              X
    P2FPNAME          X
    PAGE_BREAK_LABEL  X
    PCPCOUNT          X
    PREFIXFORMAT      X
    RSAVEMASK         X
    RUNCHECK          X
    SAVE_MASK_LABEL   X
    STMTCOUNT         X

##### struct's

    entry_exit_cookie X
    rtlocals          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:  *	@(#)pc.h	5.1 (Berkeley) 6/5/85
       7:  */
       8:
       9: #include <setjmp.h>
      10:
      11:     /*
      12:      *	random constants for pc
      13:      */
      14:
      15:     /*
      16:      *	the name of the display.
      17:      */
      18: #define DISPLAYNAME "__disply"
      19:
      20:     /*
      21:      *	the structure below describes the locals used by the run time system.
      22:      *	at function entry, at least this much space is allocated,
      23:      *	and the following information is filled in:
      24:      *	the address of a routine to close the current frame for unwinding,
      25:      *	a pointer to the display entry for the current static level and
      26:      *	the previous contents of the display for this static level.
      27:      *	the curfile location is used to point to the currently active file,
      28:      *	and is filled in as io is initiated.
      29:      *	one of these structures is allocated on the (negatively growing) stack.
      30:      *	at function entry, fp is set to point to the last field of the struct,
      31:      *	thus the offsets of the fields are as indicated below.
      32:      */
      33: struct rtlocals {
      34:     jmp_buf     gotoenv;
      35:     struct iorec    *curfile;
      36:     struct dispsave dsave;
      37: } rtlocs;
      38: #define GOTOENVOFFSET   ( -sizeof rtlocs )
      39: #define CURFILEOFFSET   ( GOTOENVOFFSET + sizeof rtlocs.gotoenv )
      40: #define DSAVEOFFSET ( CURFILEOFFSET + sizeof rtlocs.curfile )
      41:
      42:     /*
      43:      *	this is a cookie used to communicate between the
      44:      *	routine entry code and the routine exit code.
      45:      *	mostly it's for labels shared between the two.
      46:      */
      47: #ifdef vax
      48: struct entry_exit_cookie {
      49:     struct nl   *nlp;
      50:     char    extname[BUFSIZ];
      51:     int     toplabel;
      52:     int     savlabel;
      53: };
      54: #define FRAME_SIZE_LABEL    "LF"
      55: #define SAVE_MASK_LABEL     "L"
      56: #endif vax
      57:
      58: #ifdef mc68000
      59: struct entry_exit_cookie {
      60:     struct nl   *nlp;
      61:     char    extname[BUFSIZ];
      62:     int     toplabel;
      63: };
      64: #define FRAME_SIZE_LABEL    "LF"
      65: #define PAGE_BREAK_LABEL    "LP"
      66: #define SAVE_MASK_LABEL     "LS"
      67: #endif mc68000
      68:
      69:     /*
      70:      *	formats for various names
      71:      *	    NAMEFORMAT		arbitrary length strings.
      72:      *	    EXTFORMAT		for externals, a preceding underscore.
      73:      *	    LABELFORMAT		for label names, a preceding dollar-sign.
      74:      *	    PREFIXFORMAT	used to print made up names with prefixes.
      75:      *	    LABELPREFIX		with getlab() makes up label names.
      76:      *	    LLABELPREFIX	with getlab() makes up sdb labels.
      77:      *	    FORMALPREFIX	prefix for EXTFORMAT for formal entry points.
      78:      *	a typical use might be to print out a name with a preceeding underscore
      79:      *	with putprintf( EXTFORMAT , 0 , name );
      80:      */
      81: #define NAMEFORMAT  "%s"
      82: #define EXTFORMAT   "_%s"
      83: #define LABELFORMAT "$%s"
      84: #define PREFIXFORMAT    "%s%d"
      85: #define LABELPREFIX "L"
      86: #define LLABELPREFIX    "LL"
      87: #define FORMALPREFIX    "__"
      88:
      89:     /*
      90:      *	the name of the statement counter
      91:      */
      92: #define STMTCOUNT   "__stcnt"
      93:
      94:     /*
      95:      *	the name of the pcp counters
      96:      */
      97: #define PCPCOUNT    "__pcpcount"
      98:
      99:     /*
     100:      *	a vector of pointer to enclosing functions for fully qualified names.
     101:      */
     102: char    *enclosing[ DSPLYSZ ];
     103:
     104: #ifdef vax
     105:     /*
     106:      *	the runtime framepointer and argumentpointer registers
     107:      */
     108: #   define  P2FP        13
     109: #   define  P2FPNAME    "fp"
     110: #   define  P2AP        12
     111: #   define  P2APNAME    "ap"
     112:
     113:     /*
     114:      *	the register save mask for saving no registers
     115:      */
     116: #   define  RSAVEMASK   ( 0 )
     117:
     118:     /*
     119:      *	runtime check mask for divide check and integer overflow
     120:      */
     121: #   define  RUNCHECK    ( ( 1 << 15 ) | ( 1 << 14 ) )
     122:
     123:     /*
     124:      *	and of course ...
     125:      */
     126: #   define  BITSPERBYTE 8
     127: #endif vax
     128:
     129: #ifdef mc68000
     130:     /*
     131:      *	these magic numbers lifted from pcc/mac2defs
     132:      *	the offsets are for mapping data and address register numbers
     133:      *	to linear register numbers.  e.g. d2 ==> r2, and a2 ==> r10.
     134:      */
     135: #   define  DATA_REG_OFFSET 0
     136: #   define  ADDR_REG_OFFSET 8
     137: #   define  P2FPNAME    "a6"
     138: #   define  P2FP        (ADDR_REG_OFFSET + 6)
     139: #   define  P2APNAME    "a6"
     140: #   define  P2AP        (ADDR_REG_OFFSET + 6)
     141:
     142:     /*
     143:      *	and still ...
     144:      */
     145: #   define  BITSPERBYTE 8
     146: #endif mc68000

#### Defined variables

enclosing defined in line 102; used 10 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 494-495(2)
- in /usr/src/ucb/PORT/pascal/src/fhdr.c line 91, 129, 164
- in /usr/src/ucb/PORT/pascal/src/lab.c line 192, 284-285(2)
- in /usr/src/ucb/PORT/pascal/src/stab.c line 249-250(2)

rtlocs defined in line 37; used 3 times

- in line 38-40(3)

#### Defined struct's

entry_exit_cookie defined in line 59; used 26 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 65(2), 535(2), 549(2), 570(2), 657(2), 732(2), 744(2), 785(2), 800(2), 817(2), 895(2), 967(2), 975(2)

rtlocals defined in line 33; never used

#### Defined macros

ADDR_REG_OFFSET defined in line 136; used 3 times

- in line 138-140(2)
- in /usr/src/ucb/PORT/pascal/src/tmps.c line 138

BITSPERBYTE defined in line 145; used 2 times

- in /usr/src/ucb/PORT/pascal/src/p2put.c line 100-101(2)

CURFILEOFFSET defined in line 39; used 26 times

- in line 40
- in /usr/src/ucb/PORT/pascal/src/pcproc.c line 192, 217, 238, 247, 430, 574, 588, 622-627(2), 638, 817, 856, 888, 898, 938, 954, 963, 1058, 1106, 1139, 1153, 1168, 1426, 1443, 1452

DATA_REG_OFFSET defined in line 135; used 1 times

- in /usr/src/ucb/PORT/pascal/src/tmps.c line 124

DISPLAYNAME defined in line 18; used 9 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 605, 612, 727, 848, 855, 962
- in /usr/src/ucb/PORT/pascal/src/p2put.c line 303, 314, 325

DSAVEOFFSET defined in line 40; used 4 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 606, 726, 849, 961

EXTFORMAT defined in line 82; used 7 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 494-497(2)
- in /usr/src/ucb/PORT/pascal/src/lab.c line 284-287(2)
- in /usr/src/ucb/PORT/pascal/src/p2put.c line 247, 287
- in /usr/src/ucb/PORT/pascal/src/var.c line 153

FORMALPREFIX defined in line 87; used 5 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 555, 748, 806, 977
- in /usr/src/ucb/PORT/pascal/src/flvalue.c line 95

FRAME_SIZE_LABEL defined in line 64; used 5 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 581, 793, 810, 979
- in /usr/src/ucb/PORT/pascal/src/lab.c line 194

GOTOENVOFFSET defined in line 38; used 4 times

- in line 39
- in /usr/src/ucb/PORT/pascal/src/fend.c line 640, 877
- in /usr/src/ucb/PORT/pascal/src/lab.c line 205

LABELFORMAT defined in line 83; used 1 times

- in /usr/src/ucb/PORT/pascal/src/lab.c line 289

LABELPREFIX defined in line 85; used 28 times

- in /usr/src/ucb/PORT/pascal/src/cset.c line 423
- in /usr/src/ucb/PORT/pascal/src/fend.c line 587, 697, 831, 935
- in /usr/src/ucb/PORT/pascal/src/p2put.c line 359, 403, 728
- in /usr/src/ucb/PORT/pascal/src/pccaseop.c line 281-284(2), 304, 336-341(3), 347-352(3), 393-398(2), 408-414(4), 432-436(2)
- in /usr/src/ucb/PORT/pascal/src/pcproc.c line 790, 1109
- in /usr/src/ucb/PORT/pascal/src/put.c line 787

LLABELPREFIX defined in line 86; used 4 times

- in /usr/src/ucb/PORT/pascal/src/stab.c line 321-322(2), 366-367(2)

NAMEFORMAT defined in line 81; used 12 times

- in /usr/src/ucb/PORT/pascal/src/p2put.c line 704, 711
- in /usr/src/ucb/PORT/pascal/src/stab.c line 96-99(2), 119-122(2), 159-162(2), 277, 319, 327, 364

P2AP defined in line 140; used 3 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 666, 904
- in /usr/src/ucb/PORT/pascal/src/p2put.c line 300

P2APNAME defined in line 139; used 1 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 612

P2FP defined in line 138; used 3 times

- in /usr/src/ucb/PORT/pascal/src/p2put.c line 238, 311, 322

P2FPNAME defined in line 137; used 11 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 606, 726, 769, 777-778(2), 792, 809, 849, 855, 961, 978

PAGE_BREAK_LABEL defined in line 65; used 3 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 795, 812, 981

PCPCOUNT defined in line 97; used 3 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 298, 435
- in /usr/src/ucb/PORT/pascal/src/stat.c line 184

PREFIXFORMAT defined in line 84; used 21 times

- in /usr/src/ucb/PORT/pascal/src/cset.c line 423
- in /usr/src/ucb/PORT/pascal/src/fend.c line 587, 697, 935
- in /usr/src/ucb/PORT/pascal/src/p2put.c line 359, 403, 741-745(2)
- in /usr/src/ucb/PORT/pascal/src/pccaseop.c line 336-341(3), 347-352(3)
- in /usr/src/ucb/PORT/pascal/src/pcproc.c line 790, 1109
- in /usr/src/ucb/PORT/pascal/src/put.c line 787
- in /usr/src/ucb/PORT/pascal/src/stab.c line 321-322(2), 366-367(2)

RSAVEMASK defined in line 116; used 1 times

- in /usr/src/ucb/PORT/pascal/src/tmps.c line 220

RUNCHECK defined in line 121; used 1 times

- in /usr/src/ucb/PORT/pascal/src/tmps.c line 222

SAVE_MASK_LABEL defined in line 66; used 7 times

- in /usr/src/ucb/PORT/pascal/src/fend.c line 545, 562, 740, 749, 796, 813, 982

STMTCOUNT defined in line 92; used 2 times

- in /usr/src/ucb/PORT/pascal/src/forop.c line 370
- in /usr/src/ucb/PORT/pascal/src/stat.c line 218

#### Usage of this include

pc.h used 20 times

- in /usr/src/ucb/PORT/pascal/src/call.c line 17
- in /usr/src/ucb/PORT/pascal/src/cset.c line 18
- in /usr/src/ucb/PORT/pascal/src/fdec.c line 28
- in /usr/src/ucb/PORT/pascal/src/fend.c line 27
- in /usr/src/ucb/PORT/pascal/src/fhdr.c line 27
- in /usr/src/ucb/PORT/pascal/src/flvalue.c line 18
- in /usr/src/ucb/PORT/pascal/src/forop.c line 18
- in /usr/src/ucb/PORT/pascal/src/lab.c line 17
- in /usr/src/ucb/PORT/pascal/src/lval.c line 18
- in /usr/src/ucb/PORT/pascal/src/p2put.c line 22
- in /usr/src/ucb/PORT/pascal/src/pccaseop.c line 21
- in /usr/src/ucb/PORT/pascal/src/pcfunc.c line 20
- in /usr/src/ucb/PORT/pascal/src/pclval.c line 22
- in /usr/src/ucb/PORT/pascal/src/pcproc.c line 20
- in /usr/src/ucb/PORT/pascal/src/put.c line 16
- in /usr/src/ucb/PORT/pascal/src/rval.c line 17
- in /usr/src/ucb/PORT/pascal/src/stab.c line 32
- in /usr/src/ucb/PORT/pascal/src/stat.c line 17
- in /usr/src/ucb/PORT/pascal/src/tmps.c line 15
- in /usr/src/ucb/PORT/pascal/src/var.c line 17

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