/* 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 <stdio.h>
#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))
#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
extern long createtime;
extern char *PALLOC();
extern char *malloc();
+extern long time();
extern intr();
extern memsize();
extern except();
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();
/*
short *sp;
unsigned short *usp;
long *lp;
- double *dp;
+ double *dbp;
struct hdr *hdrp;
};
\f
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;
* 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 */
};
/*
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 */