BSD 4_3 release
[unix-history] / usr / src / ucb / pascal / pxp / 0.h
index 191dff8..4a47710 100644 (file)
@@ -1,5 +1,11 @@
-/* static      char *sccsid = "@(#)0.h 1.3 (Berkeley) 2/6/83";*/
-/* Copyright (c) 1979 Regents of the University of California */
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)0.h 5.1 (Berkeley) 6/5/85
+ */
+
 /* #define DEBUG */
 #define        CHAR
 #define        STATIC
 /* #define DEBUG */
 #define        CHAR
 #define        STATIC
  *             indenting unit in the program.
  *
  *     _       Underline keywords in the output.
  *             indenting unit in the program.
  *
  *     _       Underline keywords in the output.
+ *
+ *     O       remove `others'.  if an `others' label is found in a
+ *             case statement the case statement (minus the others case)
+ *             is printed as a guarded case statement, and the others case
+ *             is the else branch of the guard.  this transformation
+ *             causes the case selector to be evaluated twice, a lose
+ *             if the selector has side-effects.  this option is only
+ *             available if pxp is compiled with RMOTHERS defined.
  */
 
 char   all, core, nodecl, full, justify, pmain, stripcomm, table, underline;
 char   profile, onefile;
  */
 
 char   all, core, nodecl, full, justify, pmain, stripcomm, table, underline;
 char   profile, onefile;
+#ifdef RMOTHERS
+char   rmothers;
+#endif RMOTHERS
 char   *firstname, *stdoutn;
 #ifdef DEBUG
 char   fulltrace, errtrace, testtrace, yyunique, typetest;
 char   *firstname, *stdoutn;
 #ifdef DEBUG
 char   fulltrace, errtrace, testtrace, yyunique, typetest;
@@ -116,7 +133,7 @@ int optstk[26];
  */
 
 #define        STRINC  1024            /* string space increment */
  */
 
 #define        STRINC  1024            /* string space increment */
-#define        TRINC   512             /* tree space increment */
+#define        TRINC   1024            /* tree space increment */
 #define        HASHINC 509             /* hash table size in words, each increment */
 
 /*
 #define        HASHINC 509             /* hash table size in words, each increment */
 
 /*
@@ -137,9 +154,28 @@ int        optstk[26];
  * space.  The fundamental limit of 64k total data space
  * should be exceeded well before these are full.
  */
  * space.  The fundamental limit of 64k total data space
  * should be exceeded well before these are full.
  */
-#define        MAXHASH 4
-#define        MAXTREE 30
-#define        MAXDEPTH 150
+/*
+ * TABLE_MULTIPLIER is for uniformly increasing the sizes of the tables
+ */
+#ifdef ADDR32
+#define TABLE_MULTIPLIER       8
+#endif ADDR32
+#ifdef ADDR16
+#define TABLE_MULTIPLIER       1
+#endif ADDR16
+#define        MAXHASH (4 * TABLE_MULTIPLIER)
+#define        MAXTREE (40 * TABLE_MULTIPLIER)
+/*
+ * MAXDEPTH is the depth of the parse stack.
+ * STACK_MULTIPLIER is for increasing its size.
+ */
+#ifdef ADDR32
+#define        STACK_MULTIPLIER        8
+#endif ADDR32
+#ifdef ADDR16
+#define        STACK_MULTIPLIER        1
+#endif ADDR16
+#define        MAXDEPTH ( 150 * STACK_MULTIPLIER )
 \f
 /*
  * ERROR RELATED DEFINITIONS
 \f
 /*
  * ERROR RELATED DEFINITIONS
@@ -216,17 +252,23 @@ int       line;
  * other than "integer" to be
  * assumed by the compiler.
  */
  * other than "integer" to be
  * assumed by the compiler.
  */
-int    *tree();
+struct tnode   *tree();
+char           *skipbl();
 int    *hash();
 char   *alloc();
 long   cntof();
 long   nowcnt();
 
 int    *hash();
 char   *alloc();
 long   cntof();
 long   nowcnt();
 
+/*
+ *     type cast nils to keep lint happy.
+ */
+#define        TR_NIL  ((struct tnode *) NIL)
+
 /*
  * Funny structures to use
  * pointers in wild and wooly ways
  */
 /*
  * Funny structures to use
  * pointers in wild and wooly ways
  */
-struct {
+struct cstruct {
        char    pchar;
 };
 struct {
        char    pchar;
 };
 struct {
@@ -295,6 +337,7 @@ int gocnt;
 int    cnts;
 
 #include <stdio.h>
 int    cnts;
 
 #include <stdio.h>
+#include <sys/types.h>
 
 typedef enum {FALSE, TRUE} bool;
 
 
 typedef enum {FALSE, TRUE} bool;