X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/89060898a0a69996bc5f210a468c22f42398b22f..79029c32280d78322b4fb003d1cf99489dda7f1c:/usr/src/usr.bin/pascal/px/vars.h diff --git a/usr/src/usr.bin/pascal/px/vars.h b/usr/src/usr.bin/pascal/px/vars.h index 22f6ece6c5..45b0431a7b 100644 --- a/usr/src/usr.bin/pascal/px/vars.h +++ b/usr/src/usr.bin/pascal/px/vars.h @@ -1,6 +1,6 @@ /* Copyright (c) 1979 Regents of the University of California */ -/* static char sccsid[] = "@(#)vars.h 1.4 %G%"; */ +/* static char sccsid[] = "@(#)vars.h 1.8 %G%"; */ #include @@ -40,14 +40,17 @@ #define BITSPERBYTE 8 #define BITSPERLONG (BITSPERBYTE * sizeof(long)) #define HZ 60 -#define TRUE 1 -#define FALSE 0 #define MAXLVL 20 #define NAMSIZ 76 #define MAXFILES 32 #define PREDEF 2 +#ifdef VAX #define STDLVL ((struct iorec *)(0x7ffffff1)) #define GLVL ((struct iorec *)(0x7ffffff0)) +#else +#define STDLVL ((struct iorec *)(0xfff1)) +#define GLVL ((struct iorec *)(0xfff0)) +#endif VAX #define FILNIL ((struct iorec *)(0)) #define INPUT ((struct iorec *)(&input)) #define OUTPUT ((struct iorec *)(&output)) @@ -55,12 +58,14 @@ #define PX 0 /* normal run of px */ #define PIX 1 /* load and go */ #define PIPE 2 /* bootstrap via a pipe */ +#define PDX 3 /* invoked by the debugger "pdx" */ #define releq 0 #define relne 2 #define rellt 4 #define relgt 6 #define relle 8 #define relge 10 +typedef enum {FALSE, TRUE} bool; /* * interrupt and allocation routines @@ -68,6 +73,7 @@ extern long createtime; extern char *PALLOC(); extern char *malloc(); +extern long time(); extern intr(); extern memsize(); extern except(); @@ -75,11 +81,15 @@ extern syserr(); extern liberr(); /* - * stack routines + * stack routines and structures */ +struct sze8 { + char element[8]; +}; extern short pop2(); extern long pop4(); extern double pop8(); +extern struct sze8 popsze8(); extern char *pushsp(); /* @@ -91,7 +101,7 @@ union progcntr { short *sp; unsigned short *usp; long *lp; - double *dp; + double *dbp; struct hdr *hdrp; }; @@ -162,7 +172,7 @@ struct stack { struct hdr { long framesze; /* number of bytes of local vars */ long nargs; /* number of bytes of arguments */ - short tests; /* TRUE => perform runtime tests */ + bool tests; /* TRUE => perform runtime tests */ short offset; /* offset of procedure in source file */ char name[1]; /* name of active procedure */ } *entry; @@ -181,9 +191,9 @@ union disply { * formal routine structure */ struct formalrtn { - char *entryaddr; - long cbn; - struct disp disp[2*MAXLVL]; + char *fentryaddr; /* formal entry point */ + long fbn; /* block number of function */ + struct disp fdisp[ MAXLVL ]; /* saved at first passing */ }; /* @@ -194,8 +204,8 @@ extern struct disp *_dp; /* ptr to active frame */ extern long _lino; /* current line number */ extern int _argc; /* number of passed args */ extern char **_argv; /* values of passed args */ -extern long _nodump; /* TRUE => no post mortum dump */ -extern long _runtst; /* TRUE => runtime tests */ +extern bool _nodump; /* TRUE => no post mortum dump */ +extern bool _runtst; /* TRUE => runtime tests */ extern long _mode; /* execl by PX, PIPE, or PIX */ extern long _stlim; /* statement limit */ extern long _stcnt; /* statement count */