date and time created 80/10/30 00:36:37 by mckusick
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 30 Oct 1980 16:36:37 +0000 (08:36 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 30 Oct 1980 16:36:37 +0000 (08:36 -0800)
SCCS-vsn: usr.bin/pascal/libpc/h00vars.h 1.1

usr/src/usr.bin/pascal/libpc/h00vars.h [new file with mode: 0644]

diff --git a/usr/src/usr.bin/pascal/libpc/h00vars.h b/usr/src/usr.bin/pascal/libpc/h00vars.h
new file mode 100644 (file)
index 0000000..9a8a103
--- /dev/null
@@ -0,0 +1,117 @@
+/* Copyright (c) 1979 Regents of the University of California */
+
+/* sccsid[] = "@(#)h00vars.h 1.1 %G%"; */
+
+#include <stdio.h>
+
+#define PXPFILE                "pmon.out"
+#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
+#define STDLVL         ((struct iorec *)(0x7ffffff1))
+#define GLVL           ((struct iorec *)(0x7ffffff0))
+#define FILNIL         ((struct iorec *)(0))
+#define INPUT          ((struct iorec *)(&input))
+#define OUTPUT         ((struct iorec *)(&output))
+#define ERR            ((struct iorec *)(&_err))
+
+/*
+ * runtime display structure
+ */
+struct display {
+       char    *ap;
+       char    *fp;
+};
+
+/*
+ * formal routine structure
+ */
+struct formalrtn {
+       long            (*entryaddr)();
+       long            cbn;
+       struct display  disp[2*MAXLVL];
+};
+
+/*
+ * program variables
+ */
+extern struct display  _disply[MAXLVL];/* runtime display */
+extern int             _argc;          /* number of passed args */
+extern char            **_argv;        /* values of passed args */
+extern long            _stlim;         /* statement limit */
+extern long            _stcnt;         /* statement count */
+extern char            *_maxptr;       /* maximum valid pointer */
+extern char            *_minptr;       /* minimum valid pointer */
+extern long            _pcpcount[];    /* pxp buffer */
+
+/*
+ * file structures
+ */
+struct iorechd {
+       char            *fileptr;       /* ptr to file window */
+       long            lcount;         /* number of lines printed */
+       long            llimit;         /* maximum number of text lines */
+       FILE            *fbuf;          /* FILE ptr */
+       struct iorec    *fchain;        /* chain to next file */
+       struct iorec    *flev;          /* ptr to associated file variable */
+       char            *pfname;        /* ptr to name of file */
+       short           funit;          /* file status flags */
+       short           fblk;           /* index into active file table */
+       long            fsize;          /* size of elements in the file */
+       char            fname[NAMSIZ];  /* name of associated UNIX file */
+};
+
+struct iorec {
+       char            *fileptr;       /* ptr to file window */
+       long            lcount;         /* number of lines printed */
+       long            llimit;         /* maximum number of text lines */
+       FILE            *fbuf;          /* FILE ptr */
+       struct iorec    *fchain;        /* chain to next file */
+       struct iorec    *flev;          /* ptr to associated file variable */
+       char            *pfname;        /* ptr to name of file */
+       short           funit;          /* file status flags */
+       short           fblk;           /* index into active file table */
+       long            fsize;          /* size of elements in the file */
+       char            fname[NAMSIZ];  /* name of associated UNIX file */
+       char            buf[BUFSIZ];    /* I/O buffer */
+       char            window[1];      /* file window element */
+};
+
+/*
+ * unit flags
+ */
+#define        FDEF    0x80    /* 1 => reserved file name */
+#define        FTEXT   0x40    /* 1 => text file, process EOLN */
+#define        FWRITE  0x20    /* 1 => open for writing */
+#define        FREAD   0x10    /* 1 => open for reading */
+#define        TEMP    0x08    /* 1 => temporary file */
+#define        SYNC    0x04    /* 1 => window is out of sync */
+#define        EOLN    0x02    /* 1 => at end of line */
+#define        EOFF    0x01    /* 1 => at end of file */
+
+/*
+ * file routines
+ */
+extern struct iorec    *GETNAME();
+extern char            *MKTEMP();
+extern char            *PALLOC();
+
+/*
+ * file record variables
+ */
+extern struct iorechd  _fchain;        /* head of active file chain */
+extern struct iorec    *_actfile[];    /* table of active files */
+extern long            _filefre;       /* last used entry in _actfile */
+
+/*
+ * standard files
+ */
+extern struct iorechd  input;
+extern struct iorechd  output;
+extern struct iorechd  _err;