ports/80173: unixstat port broken under FreeBSD 5.3 (but I have mods. to built it clean and complete)
Thomas Kammeyer
tkammeyer at opgen.com
Tue May 3 19:10:11 UTC 2005
The following reply was made to PR ports/80173; it has been noted by GNATS.
From: "Thomas Kammeyer" <tkammeyer at opgen.com>
To: <bug-followup at FreeBSD.org>, <kemosabi at reductio.com>
Cc:
Subject: Re: ports/80173: unixstat port broken under FreeBSD 5.3 (but I have mods. to built it clean and complete)
Date: Tue, 3 May 2005 14:16:46 -0500
Here's the patch... I've tried to send this before and had my
e-mail address rejected by the mailer on FreeBSD's end. I'm
posting it from my work account instead.
diff -ruN unixstat.orig/Makefile unixstat/Makefile
--- unixstat.orig/Makefile Thu Apr 21 11:41:47 2005
+++ unixstat/Makefile Thu Apr 21 15:13:32 2005
@@ -9,8 +9,9 @@
PORTVERSION=3D 5.4
CATEGORIES=3D math
MASTER_SITES=3D # must fetch manually
-DISTNAME=3D stat
-EXTRACT_SUFX=3D .tar.Z
+DISTNAME=3Dstat
+EXTRACT_SUFX=3D.tar.Z
+TAR=3D/usr/bin/gtar
=20
MAINTAINER=3D mwm at mired.org
COMMENT=3D A statistics package designed for use with the Unix shell
@@ -23,17 +24,19 @@
rankrel.1 ranksort.1 regress.1 repeat.1 reverse.1 series.1 \
stats.1 transpose.1 ts.1 unixstat.1 validata.1
=20
-.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) &&
!defined(PACKAGE_BUILDING)
+# WEEEIRD: BSD make bug? writing a variable into the following exists
+# check from the .if just doesn't work. This is why the previous
+# version of the Makefile never knew the distfile existed!
+.if !exists(/usr/ports/distfiles/stat.tar.Z) && =
!defined(PACKAGE_BUILDING)
IGNORE=3D"Gary Perlman requires that users agree to his license"\
"before he will allow access to the distfile."\
"See his web site at http://www.acm.org/~perlman/stat/ for"\
-"details. Then put ${DISTNAME}${EXTRACT_SUFX} in"\
-"${DISTDIR} and run make again"
+"details. Then put ${DISTNAME}${EXTRACT_SUFX} in ${DISTDIR} and run =
make
again"
.endif
=20
post-patch:
- @{MV} ${WRKSRC}/man/intro.1 ${WRKSRC}/man/unixstat.1
- @{RM} ${WRKSRC}/man/cat.1
+ @${MV} ${WRKSRC}/man/intro.1 ${WRKSRC}/man/unixstat.1
+ @${RM} ${WRKSRC}/man/cat.1
=20
do-build:
@(cd ${WRKSRC}/src; ${SETENV} ${MAKE_ENV} make ${MAKE_ARGS})
diff -ruN unixstat.orig/files/patch-Makefile =
unixstat/files/patch-Makefile
--- unixstat.orig/files/patch-Makefile Thu Apr 21 11:41:47 2005
+++ unixstat/files/patch-Makefile Wed Dec 31 18:00:00 1969
@@ -1,20 +0,0 @@
---- src/makefile.orig Tue Jun 22 18:00:21 1993
-+++ src/makefile Thu Aug 23 15:57:48 2001
-@@ -14,14 +14,13 @@
- =
#########################################################################=
#
-=20
- DESTDIR=3D../bin# destination directory
--DESTDIR=3D../../bin# destination directory
--CFLAGS =3D-O# C Compiler Options
-+#DESTDIR=3D../../bin# destination directory
- LINK =3D$(CC) $(CFLAGS) -o $(DESTDIR)/$@# Generic link command
- LIBS =3D-lm# libraries needed =
(math)
--EDITOR =3D/usr/ucb/vi# editor to call on make =
edit
-+EDITOR =3D/usr/bin/vi# editor to call on make =
edit
- RM =3D/bin/rm -f# remove forcefully
- MV =3D/bin/mv# move/rename files
--MAKE =3D/bin/make# use for recursive =
makes
-+MAKE =3D/usr/bin/make# use for recursive =
makes
-=20
- MAINS =3D abut.c anova.c calc.y colex.c contab.c desc.c dm.y dprime.c =
\
- dsort.c features.c ff.c fpack.c linex.c maketrix.c oneway.c \
diff -ruN unixstat.orig/files/patch-binomial.c
unixstat/files/patch-binomial.c
--- unixstat.orig/files/patch-binomial.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-binomial.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,23 @@
+--- src/binomial.c.orig Thu Apr 21 14:32:22 2005
++++ src/binomial.c Thu Apr 21 14:32:31 2005
+@@ -23,12 +23,12 @@
+ #else
+ #define printbin(msg, N, p1, p2, r, prob)
+ #define trace(X)
+-#endif TRACE
++#endif
+=20
+ #ifndef max
+ # define min(a,b) ((a) < (b) ? (a) : (b))
+ # define max(a,b) ((a) > (b) ? (a) : (b))
+-#endif max
++#endif
+=20
+ =0C/*FUNCTION binomial: compute individual term of binomial =
probability */
+ double
+@@ -231,4 +231,4 @@
+ exit (0);
+ }
+=20
+-#endif BINOMIAL
++#endif
diff -ruN unixstat.orig/files/patch-calc.c unixstat/files/patch-calc.c
--- unixstat.orig/files/patch-calc.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-calc.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,1723 @@
+--- src/calc.c.orig Thu Apr 21 14:32:22 2005
++++ src/calc.c Thu Apr 21 14:32:31 2005
+@@ -1,6 +1,26 @@
+-extern char *malloc(), *realloc();
+-
+-# line 2 "calc.y"
++#include <stdlib.h>
++#ifndef lint
++#ifdef __unused
++__unused
++#endif
++static char const=20
++yyrcsid[] =3D "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.37 2003/02/12
18:03:55 davidc Exp $";
++#endif
++#define YYBYACC 1
++#define YYMAJOR 1
++#define YYMINOR 9
++#define YYLEX yylex()
++#define YYEMPTY -1
++#define yyclearin (yychar=3D(YYEMPTY))
++#define yyerrok (yyerrflag=3D0)
++#define YYRECOVERING() (yyerrflag!=3D0)
++#if defined(__cplusplus) || __STDC__
++static int yygrowstack(void);
++#else
++static int yygrowstack();
++#endif
++#define YYPREFIX "yy"
++#line 2 "calc.y"
+ /* Copyright 1981 Gary Perlman */
+=20
+ #ifdef sun /* need corrective version of atof */
+@@ -79,48 +99,343 @@
+ double eval (), Answer;
+ double *Constant;
+ char *getline ();
+-FILE *Outfile =3D stdout;
+-
+-# line 83 "calc.y"
+-typedef union=20
++FILE *Outfile =3D NULL;
++#line 83 "calc.y"
++typedef union
+ {
+ int opr; /* an operator */
+ int var; /* an index into the variable table */
+ double *num; /* a pointer to a numerical constant */
+ ENODE *ex; /* an expression in the parse tree */
+ } YYSTYPE;
+-# define NUMBER 257
+-# define VARIABLE 258
+-# define IF 259
+-# define THEN 260
+-# define ELSE 261
+-# define EQ 262
+-# define NE 263
+-# define GE 264
+-# define LE 265
+-# define UMINUS 266
+-# define ABS 267
+-# define EXP 268
+-# define LOG 269
+-# define SQRT 270
+-# define COS 271
+-# define TAN 272
+-# define SIN 273
+-# define ACOS 274
+-# define ASIN 275
+-# define ATAN 276
+-#define yyclearin yychar =3D -1
+-#define yyerrok yyerrflag =3D 0
+-extern int yychar;
+-extern int yyerrflag;
+-#ifndef YYMAXDEPTH
+-#define YYMAXDEPTH 150
++#line 112 "y.tab.c"
++#define YYERRCODE 256
++#define NUMBER 257
++#define VARIABLE 258
++#define IF 259
++#define THEN 260
++#define ELSE 261
++#define EQ 262
++#define NE 263
++#define GE 264
++#define LE 265
++#define UMINUS 266
++#define ABS 267
++#define EXP 268
++#define LOG 269
++#define SQRT 270
++#define COS 271
++#define TAN 272
++#define SIN 273
++#define ACOS 274
++#define ASIN 275
++#define ATAN 276
++const short yylhs[] =3D { -1,
++ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
++ 1, 1, 1, 1, 1,
++};
++const short yylen[] =3D { 2,
++ 1, 3, 3, 2, 3, 3, 3, 3, 3, 3,
++ 2, 3, 3, 3, 3, 3, 3, 3, 3, 2,
++ 5, 4, 3, 2, 2, 2, 2, 2, 2, 2,
++ 2, 2, 2, 1, 1,
++};
++const short yydefred[] =3D { 0,
++ 35, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 11, 32, 31, 30, 33, 27, 29,
++ 28, 24, 25, 26, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0,
++};
++const short yydgoto[] =3D { 18,
++ 19,
++};
++const short yysindex[] =3D { 199,
++ 0, -61, 199, 199, 199, 199, 199, 199, 199, 199,
++ 199, 199, 199, 199, 199, 199, 199, 0, 467, 199,
++ 467, 339, 574, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 368, 199, 199, 199, 199, 199,
++ 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
++ 199, 467, 199, 0, 439, 502, 547, 574, -27, -27,
++ -27, -27, -27, -27, -20, -20, -92, -92, -92, -92,
++ 481, 199, 502,
++};
++const short yyrindex[] =3D { 0,
++ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,
++ 8, 0, 91, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 12, 0, 0, 0, 21, 182, 143, 147, 156,
++ 162, 166, 175, 189, 107, 133, 13, 40, 68, 97,
++ 253, 0, 31,
++};
++const short yygindex[] =3D { 0,
++ 639,
++};
++#define YYTABLESIZE 839
++const short yytable[] =3D { 20,
++ 34, 51, 1, 0, 0, 0, 0, 4, 0, 50,
++ 0, 3, 7, 0, 48, 46, 50, 47, 0, 49,
++ 23, 48, 0, 0, 0, 0, 49, 0, 0, 0,
++ 21, 0, 0, 0, 0, 0, 0, 34, 34, 9,
++ 0, 34, 34, 34, 0, 34, 0, 34, 4, 7,
++ 7, 0, 3, 7, 7, 7, 0, 7, 34, 7,
++ 34, 23, 34, 34, 0, 4, 51, 8, 0, 3,
++ 7, 21, 7, 51, 7, 7, 9, 9, 23, 0,
++ 9, 9, 9, 23, 9, 0, 9, 0, 21, 0,
++ 20, 0, 0, 21, 34, 0, 10, 9, 0, 9,
++ 0, 9, 9, 0, 8, 8, 5, 0, 8, 8,
++ 8, 0, 8, 0, 8, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 34, 8, 0, 8, 20, 8,
++ 8, 20, 6, 10, 10, 0, 7, 10, 10, 10,
++ 0, 10, 18, 10, 5, 0, 12, 5, 20, 5,
++ 0, 5, 0, 20, 10, 13, 10, 0, 10, 10,
++ 0, 16, 0, 9, 5, 14, 5, 0, 5, 5,
++ 6, 0, 0, 6, 15, 6, 0, 6, 0, 0,
++ 18, 19, 0, 18, 12, 0, 0, 12, 17, 0,
++ 6, 8, 6, 13, 6, 6, 13, 0, 0, 16,
++ 18, 0, 16, 14, 12, 18, 14, 0, 0, 12,
++ 0, 0, 15, 13, 20, 15, 0, 0, 13, 16,
++ 10, 0, 19, 14, 16, 0, 17, 0, 14, 17,
++ 5, 5, 15, 3, 0, 0, 0, 15, 17, 19,
++ 0, 0, 0, 6, 19, 0, 17, 0, 0, 0,
++ 0, 17, 22, 0, 0, 0, 6, 0, 0, 0,
++ 34, 34, 34, 34, 34, 34, 18, 4, 0, 0,
++ 12, 3, 7, 7, 7, 7, 7, 7, 0, 13,
++ 23, 23, 0, 0, 0, 16, 0, 0, 0, 14,
++ 21, 21, 0, 22, 0, 0, 0, 0, 15, 9,
++ 9, 9, 9, 9, 9, 19, 0, 0, 0, 0,
++ 22, 0, 17, 0, 0, 22, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 8, 8, 8,
++ 8, 8, 8, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 20, 20, 0, 0, 0, 0, 10, 10, 10, 10,
++ 10, 10, 0, 0, 0, 0, 5, 5, 5, 5,
++ 5, 5, 0, 0, 0, 50, 39, 0, 0, 0,
++ 48, 46, 0, 47, 0, 49, 0, 0, 0, 0,
++ 0, 0, 6, 6, 6, 6, 6, 6, 44, 0,
++ 45, 36, 18, 18, 50, 39, 12, 12, 54, 48,
++ 46, 0, 47, 0, 49, 13, 13, 0, 0, 0,
++ 0, 16, 16, 0, 0, 14, 14, 44, 0, 45,
++ 36, 0, 51, 0, 15, 15, 0, 0, 0, 0,
++ 0, 19, 19, 0, 0, 0, 0, 0, 17, 17,
++ 0, 0, 0, 0, 0, 1, 2, 4, 0, 0,
++ 0, 51, 38, 0, 0, 7, 8, 9, 10, 11,
++ 12, 13, 14, 15, 16, 50, 39, 0, 0, 0,
++ 48, 46, 0, 47, 0, 49, 0, 0, 0, 0,
++ 0, 38, 0, 0, 0, 0, 72, 0, 44, 0,
++ 45, 36, 0, 50, 39, 0, 0, 0, 48, 46,
++ 0, 47, 22, 49, 0, 0, 0, 50, 39, 0,
++ 0, 0, 48, 46, 0, 47, 44, 49, 45, 36,
++ 0, 0, 51, 0, 0, 0, 0, 0, 50, 39,
++ 44, 0, 45, 48, 46, 0, 47, 0, 49, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 51, 44, 38, 45, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 51, 0, 0, 0, 0, 0,
++ 0, 0, 0, 50, 39, 0, 0, 0, 48, 46,
++ 38, 47, 0, 49, 0, 51, 0, 0, 53, 37,
++ 40, 41, 42, 43, 38, 0, 44, 0, 45, 0,
++ 50, 0, 0, 0, 0, 48, 46, 0, 47, 0,
++ 49, 0, 0, 0, 0, 38, 0, 0, 37, 40,
++ 41, 42, 43, 44, 0, 45, 0, 0, 0, 0,
++ 51, 21, 22, 23, 24, 25, 26, 27, 28, 29,
++ 30, 31, 32, 33, 34, 35, 0, 0, 52, 0,
++ 0, 0, 0, 0, 0, 0, 0, 51, 0, 0,
++ 0, 0, 0, 0, 55, 56, 57, 58, 59, 60,
++ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
++ 0, 71, 0, 0, 0, 0, 0, 0, 0, 37,
++ 40, 41, 42, 43, 0, 0, 0, 0, 0, 0,
++ 73, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 37, 40, 41,
++ 42, 43, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 37, 40, 41, 42, 43, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 40, 41, 42, 43, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 40, 41,
++ 42, 43, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 40, 41, 42, 43,
++};
++const short yycheck[] =3D { 61,
++ 0, 94, 0, -1, -1, -1, -1, 0, -1, 37,
++ -1, 0, 0, -1, 42, 43, 37, 45, -1, 47,
++ 0, 42, -1, -1, -1, -1, 47, -1, -1, -1,
++ 0, -1, -1, -1, -1, -1, -1, 37, 38, 0,
++ -1, 41, 42, 43, -1, 45, -1, 47, 41, 37,
++ 38, -1, 41, 41, 42, 43, -1, 45, 58, 47,
++ 60, 41, 62, 63, -1, 58, 94, 0, -1, 58,
++ 58, 41, 60, 94, 62, 63, 37, 38, 58, -1,
++ 41, 42, 43, 63, 45, -1, 47, -1, 58, -1,
++ 0, -1, -1, 63, 94, -1, 0, 58, -1, 60,
++ -1, 62, 63, -1, 37, 38, 0, -1, 41, 42,
++ 43, -1, 45, -1, 47, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, 124, 58, -1, 60, 38, 62,
++ 63, 41, 0, 37, 38, -1, 124, 41, 42, 43,
++ -1, 45, 0, 47, 38, -1, 0, 41, 58, 43,
++ -1, 45, -1, 63, 58, 0, 60, -1, 62, 63,
++ -1, 0, -1, 124, 58, 0, 60, -1, 62, 63,
++ 38, -1, -1, 41, 0, 43, -1, 45, -1, -1,
++ 38, 0, -1, 41, 38, -1, -1, 41, 0, -1,
++ 58, 124, 60, 38, 62, 63, 41, -1, -1, 38,
++ 58, -1, 41, 38, 58, 63, 41, -1, -1, 63,
++ -1, -1, 38, 58, 124, 41, -1, -1, 63, 58,
++ 124, -1, 41, 58, 63, -1, 38, -1, 63, 41,
++ 124, 33, 58, 35, -1, -1, -1, 63, 40, 58,
++ -1, -1, -1, 45, 63, -1, 58, -1, -1, -1,
++ -1, 63, 0, -1, -1, -1, 124, -1, -1, -1,
++ 260, 261, 262, 263, 264, 265, 124, 260, -1, -1,
++ 124, 260, 260, 261, 262, 263, 264, 265, -1, 124,
++ 260, 261, -1, -1, -1, 124, -1, -1, -1, 124,
++ 260, 261, -1, 41, -1, -1, -1, -1, 124, 260,
++ 261, 262, 263, 264, 265, 124, -1, -1, -1, -1,
++ 58, -1, 124, -1, -1, 63, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, 260, 261, 262,
++ 263, 264, 265, -1, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ 260, 261, -1, -1, -1, -1, 260, 261, 262, 263,
++ 264, 265, -1, -1, -1, -1, 260, 261, 262, 263,
++ 264, 265, -1, -1, -1, 37, 38, -1, -1, -1,
++ 42, 43, -1, 45, -1, 47, -1, -1, -1, -1,
++ -1, -1, 260, 261, 262, 263, 264, 265, 60, -1,
++ 62, 63, 260, 261, 37, 38, 260, 261, 41, 42,
++ 43, -1, 45, -1, 47, 260, 261, -1, -1, -1,
++ -1, 260, 261, -1, -1, 260, 261, 60, -1, 62,
++ 63, -1, 94, -1, 260, 261, -1, -1, -1, -1,
++ -1, 260, 261, -1, -1, -1, -1, -1, 260, 261,
++ -1, -1, -1, -1, -1, 257, 258, 259, -1, -1,
++ -1, 94, 124, -1, -1, 267, 268, 269, 270, 271,
++ 272, 273, 274, 275, 276, 37, 38, -1, -1, -1,
++ 42, 43, -1, 45, -1, 47, -1, -1, -1, -1,
++ -1, 124, -1, -1, -1, -1, 58, -1, 60, -1,
++ 62, 63, -1, 37, 38, -1, -1, -1, 42, 43,
++ -1, 45, 260, 47, -1, -1, -1, 37, 38, -1,
++ -1, -1, 42, 43, -1, 45, 60, 47, 62, 63,
++ -1, -1, 94, -1, -1, -1, -1, -1, 37, 38,
++ 60, -1, 62, 42, 43, -1, 45, -1, 47, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ 94, 60, 124, 62, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, 94, -1, -1, -1, -1, -1,
++ -1, -1, -1, 37, 38, -1, -1, -1, 42, 43,
++ 124, 45, -1, 47, -1, 94, -1, -1, 260, 261,
++ 262, 263, 264, 265, 124, -1, 60, -1, 62, -1,
++ 37, -1, -1, -1, -1, 42, 43, -1, 45, -1,
++ 47, -1, -1, -1, -1, 124, -1, -1, 261, 262,
++ 263, 264, 265, 60, -1, 62, -1, -1, -1, -1,
++ 94, 3, 4, 5, 6, 7, 8, 9, 10, 11,
++ 12, 13, 14, 15, 16, 17, -1, -1, 20, -1,
++ -1, -1, -1, -1, -1, -1, -1, 94, -1, -1,
++ -1, -1, -1, -1, 36, 37, 38, 39, 40, 41,
++ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
++ -1, 53, -1, -1, -1, -1, -1, -1, -1, 261,
++ 262, 263, 264, 265, -1, -1, -1, -1, -1, -1,
++ 72, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, 261, 262, 263,
++ 264, 265, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, 261, 262, 263, 264, 265, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, 262, 263, 264, 265, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, 262, 263,
++ 264, 265, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, 262, 263, 264, 265,
++};
++#define YYFINAL 18
++#ifndef YYDEBUG
++#define YYDEBUG 0
+ #endif
+-YYSTYPE yylval, yyval;
+-# define YYERRCODE 256
+-
+-# line 287 "calc.y"
+-
++#define YYMAXTOKEN 276
++#if YYDEBUG
++const char * const yyname[] =3D {
++"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0=
,0,
0,0,
++"'!'",0,"'#'",0,"'%'","'&'",0,"'('","')'","'*'","'+'",0,"'-'",0,"'/'",0=
,0,
0,0,0,
++0,0,0,0,0,"':'",0,"'<'","'=3D'","'>'","'?'",0,0,0,0,0,0,0,0,0,0,0,0,0,0=
,0,0,
0,0,0,
++0,0,0,0,0,0,0,0,0,0,0,"'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0=
,0,
0,0,0,
++0,0,0,"'|'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0=
,0,
0,0,0,
++0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0=
,0,
0,0,0,
++0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0=
,0,
0,0,0,
++0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"NUMBER","VARIABLE","IF","THEN","EL=
SE"
,"EQ",
++"NE","GE","LE","UMINUS","ABS","EXP","LOG","SQRT","COS","TAN","SIN","ACO=
S",
++"ASIN","ATAN",
++};
++const char * const yyrule[] =3D {
++"$accept : start",
++"start : expr",
++"expr : '(' expr ')'",
++"expr : VARIABLE '=3D' expr",
++"expr : '#' expr",
++"expr : expr '+' expr",
++"expr : expr '-' expr",
++"expr : expr '*' expr",
++"expr : expr '%' expr",
++"expr : expr '/' expr",
++"expr : expr '^' expr",
++"expr : '-' expr",
++"expr : expr EQ expr",
++"expr : expr NE expr",
++"expr : expr LE expr",
++"expr : expr '<' expr",
++"expr : expr GE expr",
++"expr : expr '>' expr",
++"expr : expr '&' expr",
++"expr : expr '|' expr",
++"expr : '!' expr",
++"expr : expr '?' expr ':' expr",
++"expr : IF expr THEN expr",
++"expr : expr ELSE expr",
++"expr : ACOS expr",
++"expr : ASIN expr",
++"expr : ATAN expr",
++"expr : COS expr",
++"expr : SIN expr",
++"expr : TAN expr",
++"expr : LOG expr",
++"expr : EXP expr",
++"expr : ABS expr",
++"expr : SQRT expr",
++"expr : VARIABLE",
++"expr : NUMBER",
++};
++#endif
++#if YYDEBUG
++#include <stdio.h>
++#endif
++#ifdef YYSTACKSIZE
++#undef YYMAXDEPTH
++#define YYMAXDEPTH YYSTACKSIZE
++#else
++#ifdef YYMAXDEPTH
++#define YYSTACKSIZE YYMAXDEPTH
++#else
++#define YYSTACKSIZE 10000
++#define YYMAXDEPTH 10000
++#endif
++#endif
++#define YYINITSTACKSIZE 200
++int yydebug;
++int yynerrs;
++int yyerrflag;
++int yychar;
++short *yyssp;
++YYSTYPE *yyvsp;
++YYSTYPE yyval;
++YYSTYPE yylval;
++short *yyss;
++short *yysslim;
++YYSTYPE *yyvs;
++int yystacksize;
++#line 288 "calc.y"
+=20
+ yylex ()
+ {
+@@ -221,6 +536,7 @@
+ main (argc, argv) int argc; char *argv[];
+ {
+ int i;
++Outfile =3D stdout;
+ signal (SIGINT, SIG_IGN);
+ if (isatty (fileno (stdin)))
+ {
+@@ -566,928 +882,537 @@
+ fprintf (stderr, "Current state saved in calc.save\n");
+ exit (1);
+ }
+-int yyexca[] =3D{
+--1, 1,
+- 0, -1,
+- -2, 0,
+--1, 58,
+- 262, 0,
+- 263, 0,
+- 264, 0,
+- 265, 0,
+- 60, 0,
+- 62, 0,
+- -2, 12,
+--1, 59,
+- 262, 0,
+- 263, 0,
+- 264, 0,
+- 265, 0,
+- 60, 0,
+- 62, 0,
+- -2, 13,
+--1, 60,
+- 262, 0,
+- 263, 0,
+- 264, 0,
+- 265, 0,
+- 60, 0,
+- 62, 0,
+- -2, 14,
+--1, 61,
+- 262, 0,
+- 263, 0,
+- 264, 0,
+- 265, 0,
+- 60, 0,
+- 62, 0,
+- -2, 15,
+--1, 62,
+- 262, 0,
+- 263, 0,
+- 264, 0,
+- 265, 0,
+- 60, 0,
+- 62, 0,
+- -2, 16,
+--1, 63,
+- 262, 0,
+- 263, 0,
+- 264, 0,
+- 265, 0,
+- 60, 0,
+- 62, 0,
+- -2, 17,
+- };
+-# define YYNPROD 36
+-# define YYLAST 456
+-int yyact[]=3D{
+-
+- 7, 25, 5, 23, 32, 37, 1, 3, 22, 20,
+- 0, 21, 6, 24, 0, 23, 0, 0, 0, 0,
+- 22, 20, 23, 21, 71, 24, 29, 22, 31, 34,
+- 23, 32, 24, 0, 0, 22, 20, 0, 21, 0,
+- 24, 23, 32, 0, 0, 68, 22, 20, 0, 21,
+- 0, 24, 0, 29, 0, 31, 34, 0, 0, 0,
+- 25, 0, 0, 0, 29, 0, 31, 34, 23, 32,
+- 0, 0, 25, 22, 20, 0, 21, 0, 24, 25,
+- 0, 0, 0, 0, 0, 0, 0, 25, 0, 0,
+- 33, 29, 0, 31, 34, 23, 32, 0, 25, 0,
+- 22, 20, 0, 21, 0, 24, 23, 32, 0, 0,
+- 0, 22, 20, 0, 21, 0, 24, 33, 29, 0,
+- 31, 0, 0, 0, 0, 25, 0, 0, 33, 29,
+- 0, 31, 0, 23, 32, 0, 0, 0, 22, 20,
+- 0, 21, 0, 24, 0, 0, 0, 0, 0, 0,
+- 0, 0, 25, 0, 23, 33, 29, 0, 31, 22,
+- 20, 0, 21, 25, 24, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 29, 0, 31,
+- 0, 0, 33, 0, 0, 0, 0, 0, 0, 0,
+- 25, 0, 0, 33, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 25, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 19, 4, 8, 35, 26, 27,
+- 30, 28, 0, 0, 17, 16, 15, 18, 12, 14,
+- 13, 9, 10, 11, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 70, 35, 26, 27, 30, 28, 0,
+- 0, 0, 0, 0, 0, 35, 26, 27, 30, 28,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 35, 26, 27, 30, 28, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 35,
+- 26, 27, 30, 28, 0, 0, 0, 0, 0, 0,
+- 0, 26, 27, 30, 28, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 26, 27,
+- 30, 28, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 26,
+- 27, 30, 28, 2, 0, 0, 0, 36, 0, 38,
+- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+- 49, 50, 51, 0, 52, 53, 54, 55, 56, 57,
+- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+- 0, 69, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 72, 73 };
+-int yypact[]=3D{
+-
+- -33, -1000, 31, -33, -56, -33, -33, -33, -33, -33,
+- -33, -33, -33, -33, -33, -33, -33, -33, -33, -1000,
+- -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+- -33, -33, -33, -33, -33, -33, 4, -33, 31, -1000,
+- 117, -7, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+- -1000, -1000, -15, -15, -93, -93, -93, -93, -22, -22,
+- -22, -22, -22, -22, 117, 96, -34, 69, -1000, 31,
+- -33, -33, 58, 69 };
+-int yypgo[]=3D{
+-
+- 0, 383, 6 };
+-int yyr1[]=3D{
+-
+- 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+- 1, 1, 1, 1, 1, 1 };
+-int yyr2[]=3D{
+-
+- 0, 3, 7, 7, 5, 7, 7, 7, 7, 7,
+- 7, 5, 7, 7, 7, 7, 7, 7, 7, 7,
+- 5, 11, 9, 7, 5, 5, 5, 5, 5, 5,
+- 5, 5, 5, 5, 3, 3 };
+-int yychk[]=3D{
+-
+- -1000, -2, -1, 40, 258, 35, 45, 33, 259, 274,
+- 275, 276, 271, 273, 272, 269, 268, 267, 270, 257,
+- 43, 45, 42, 37, 47, 94, 262, 263, 265, 60,
+- 264, 62, 38, 124, 63, 261, -1, 61, -1, -1,
+- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+- -1, -1, -1, -1, -1, -1, -1, -1, 41, -1,
+- 260, 58, -1, -1 };
+-int yydef[]=3D{
+-
+- 0, -2, 1, 0, 34, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 35,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 4, 11,
+- 20, 0, 24, 25, 26, 27, 28, 29, 30, 31,
+- 32, 33, 5, 6, 7, 8, 9, 10, -2, -2,
+- -2, -2, -2, -2, 18, 19, 0, 23, 2, 3,
+- 0, 0, 22, 21 };
+-typedef struct { char *t_name; int t_val; } yytoktype;
+-#ifndef YYDEBUG
+-# define YYDEBUG 0 /* don't allow debugging */
+-#endif
+-
+-#if YYDEBUG
+-
+-yytoktype yytoks[] =3D
+-{
+- "NUMBER", 257,
+- "VARIABLE", 258,
+- "#", 35,
+- "=3D", 61,
+- "?", 63,
+- "IF", 259,
+- "THEN", 260,
+- ":", 58,
+- "ELSE", 261,
+- "|", 124,
+- "&", 38,
+- "!", 33,
+- "EQ", 262,
+- "NE", 263,
+- "GE", 264,
+- "LE", 265,
+- "<", 60,
+- ">", 62,
+- "+", 43,
+- "-", 45,
+- "*", 42,
+- "/", 47,
+- "%", 37,
+- "^", 94,
+- "UMINUS", 266,
+- "ABS", 267,
+- "EXP", 268,
+- "LOG", 269,
+- "SQRT", 270,
+- "COS", 271,
+- "TAN", 272,
+- "SIN", 273,
+- "ACOS", 274,
+- "ASIN", 275,
+- "ATAN", 276,
+- "-unknown-", -1 /* ends search */
+-};
+-
+-char * yyreds[] =3D
++#line 886 "y.tab.c"
++/* allocate initial stack or double stack size, up to YYMAXDEPTH */
++static int yygrowstack()
+ {
+- "-no such reduction-",
+- "start : expr",
+- "expr : '(' expr ')'",
+- "expr : VARIABLE '=3D' expr",
+- "expr : '#' expr",
+- "expr : expr '+' expr",
+- "expr : expr '-' expr",
+- "expr : expr '*' expr",
+- "expr : expr '%' expr",
+- "expr : expr '/' expr",
+- "expr : expr '^' expr",
+- "expr : '-' expr",
+- "expr : expr EQ expr",
+- "expr : expr NE expr",
+- "expr : expr LE expr",
+- "expr : expr '<' expr",
+- "expr : expr GE expr",
+- "expr : expr '>' expr",
+- "expr : expr '&' expr",
+- "expr : expr '|' expr",
+- "expr : '!' expr",
+- "expr : expr '?' expr ':' expr",
+- "expr : IF expr THEN expr",
+- "expr : expr ELSE expr",
+- "expr : ACOS expr",
+- "expr : ASIN expr",
+- "expr : ATAN expr",
+- "expr : COS expr",
+- "expr : SIN expr",
+- "expr : TAN expr",
+- "expr : LOG expr",
+- "expr : EXP expr",
+- "expr : ABS expr",
+- "expr : SQRT expr",
+- "expr : VARIABLE",
+- "expr : NUMBER",
+-};
+-#endif /* YYDEBUG */
+-#line 1 "/usr/lib/yaccpar"
+-/* @(#)yaccpar 1.10 89/04/04 SMI; from S5R3 1.10 */
+-
+-/*
+-** Skeleton parser driver for yacc output
+-*/
+-
+-/*
+-** yacc user known macros and defines
+-*/
+-#define YYERROR goto yyerrlab
+-#define YYACCEPT { free(yys); free(yyv); return(0); }
+-#define YYABORT { free(yys); free(yyv); return(1); }
+-#define YYBACKUP( newtoken, newvalue )\
+-{\
+- if ( yychar >=3D 0 || ( yyr2[ yytmp ] >> 1 ) !=3D 1 )\
+- {\
+- yyerror( "syntax error - cannot backup" );\
+- goto yyerrlab;\
+- }\
+- yychar =3D newtoken;\
+- yystate =3D *yyps;\
+- yylval =3D newvalue;\
+- goto yynewstate;\
++ int newsize, i;
++ short *newss;
++ YYSTYPE *newvs;
++
++ if ((newsize =3D yystacksize) =3D=3D 0)
++ newsize =3D YYINITSTACKSIZE;
++ else if (newsize >=3D YYMAXDEPTH)
++ return -1;
++ else if ((newsize *=3D 2) > YYMAXDEPTH)
++ newsize =3D YYMAXDEPTH;
++ i =3D yyssp - yyss;
++ newss =3D yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :
++ (short *)malloc(newsize * sizeof *newss);
++ if (newss =3D=3D NULL)
++ return -1;
++ yyss =3D newss;
++ yyssp =3D newss + i;
++ newvs =3D yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) =
:
++ (YYSTYPE *)malloc(newsize * sizeof *newvs);
++ if (newvs =3D=3D NULL)
++ return -1;
++ yyvs =3D newvs;
++ yyvsp =3D newvs + i;
++ yystacksize =3D newsize;
++ yysslim =3D yyss + newsize - 1;
++ return 0;
+ }
+-#define YYRECOVERING() (!!yyerrflag)
+-#ifndef YYDEBUG
+-# define YYDEBUG 1 /* make debugging available */
+-#endif
+-
+-/*
+-** user known globals
+-*/
+-int yydebug; /* set to 1 to get debugging */
+-
+-/*
+-** driver internal defines
+-*/
+-#define YYFLAG (-1000)
+-
+-/*
+-** static variables used by the parser
+-*/
+-static YYSTYPE *yyv; /* value stack */
+-static int *yys; /* state stack */
+-
+-static YYSTYPE *yypv; /* top of value stack */
+-static int *yyps; /* top of state stack */
+-
+-static int yystate; /* current state */
+-static int yytmp; /* extra var (lasts between blocks)
*/
+-
+-int yynerrs; /* number of errors */
+-
+-int yyerrflag; /* error recovery flag */
+-int yychar; /* current input token number */
+=20
++#define YYABORT goto yyabort
++#define YYREJECT goto yyabort
++#define YYACCEPT goto yyaccept
++#define YYERROR goto yyerrlab
++
++#ifndef YYPARSE_PARAM
++#if defined(__cplusplus) || __STDC__
++#define YYPARSE_PARAM_ARG void
++#define YYPARSE_PARAM_DECL
++#else /* ! ANSI-C/C++ */
++#define YYPARSE_PARAM_ARG
++#define YYPARSE_PARAM_DECL
++#endif /* ANSI-C/C++ */
++#else /* YYPARSE_PARAM */
++#ifndef YYPARSE_PARAM_TYPE
++#define YYPARSE_PARAM_TYPE void *
++#endif
++#if defined(__cplusplus) || __STDC__
++#define YYPARSE_PARAM_ARG YYPARSE_PARAM_TYPE YYPARSE_PARAM
++#define YYPARSE_PARAM_DECL
++#else /* ! ANSI-C/C++ */
++#define YYPARSE_PARAM_ARG YYPARSE_PARAM
++#define YYPARSE_PARAM_DECL YYPARSE_PARAM_TYPE YYPARSE_PARAM;
++#endif /* ANSI-C/C++ */
++#endif /* ! YYPARSE_PARAM */
+=20
+-/*
+-** yyparse - return 0 if worked, 1 if syntax error not recovered from
+-*/
+ int
+-yyparse()
++yyparse (YYPARSE_PARAM_ARG)
++ YYPARSE_PARAM_DECL
+ {
+- register YYSTYPE *yypvt; /* top of value stack for $vars */
+- unsigned yymaxdepth =3D YYMAXDEPTH;
++ int yym, yyn, yystate;
++#if YYDEBUG
++ const char *yys;
+=20
+- /*
+- ** Initialize externals - yyparse may be called more than once
+- */
+- yyv =3D (YYSTYPE*)malloc(yymaxdepth*sizeof(YYSTYPE));
+- yys =3D (int*)malloc(yymaxdepth*sizeof(int));
+- if (!yyv || !yys)
+- {
+- yyerror( "out of memory" );
+- return(1);
+- }
+- yypv =3D &yyv[-1];
+- yyps =3D &yys[-1];
+- yystate =3D 0;
+- yytmp =3D 0;
+- yynerrs =3D 0;
+- yyerrflag =3D 0;
+- yychar =3D -1;
++ if ((yys =3D getenv("YYDEBUG")))
++ {
++ yyn =3D *yys;
++ if (yyn >=3D '0' && yyn <=3D '9')
++ yydebug =3D yyn - '0';
++ }
++#endif
+=20
+- goto yystack;
+- {
+- register YYSTYPE *yy_pv; /* top of value stack */
+- register int *yy_ps; /* top of state stack */
+- register int yy_state; /* current state */
+- register int yy_n; /* internal state number
info */
+-
+- /*
+- ** get globals into registers.
+- ** branch to here only if YYBACKUP was called.
+- */
+- yynewstate:
+- yy_pv =3D yypv;
+- yy_ps =3D yyps;
+- yy_state =3D yystate;
+- goto yy_newstate;
+-
+- /*
+- ** get globals into registers.
+- ** either we just started, or we just finished a reduction
+- */
+- yystack:
+- yy_pv =3D yypv;
+- yy_ps =3D yyps;
+- yy_state =3D yystate;
+-
+- /*
+- ** top of for (;;) loop while no reductions done
+- */
+- yy_stack:
+- /*
+- ** put a state and value onto the stacks
+- */
+-#if YYDEBUG
+- /*
+- ** if debugging, look up token value in list of value vs.
+- ** name pairs. 0 and negative (-1) are special values.
+- ** Note: linear search is used since time is not a real
+- ** consideration while debugging.
+- */
+- if ( yydebug )
+- {
+- register int yy_i;
+-
+- (void)printf( "State %d, token ", yy_state );
+- if ( yychar =3D=3D 0 )
+- (void)printf( "end-of-file\n" );
+- else if ( yychar < 0 )
+- (void)printf( "-none-\n" );
+- else
+- {
+- for ( yy_i =3D 0; yytoks[yy_i].t_val >=3D 0;
+- yy_i++ )
+- {
+- if ( yytoks[yy_i].t_val =3D=3D yychar )
+- break;
+- }
+- (void)printf( "%s\n", yytoks[yy_i].t_name );
+- }
+- }
+-#endif /* YYDEBUG */
+- if ( ++yy_ps >=3D &yys[ yymaxdepth ] ) /* room on stack? */
+- {
+- /*
+- ** reallocate and recover. Note that pointers
+- ** have to be reset, or bad things will happen
+- */
+- int yyps_index =3D (yy_ps - yys);
+- int yypv_index =3D (yy_pv - yyv);
+- int yypvt_index =3D (yypvt - yyv);
+- yymaxdepth +=3D YYMAXDEPTH;
+- yyv =3D (YYSTYPE*)realloc((char*)yyv,
+- yymaxdepth * sizeof(YYSTYPE));
+- yys =3D (int*)realloc((char*)yys,
+- yymaxdepth * sizeof(int));
+- if (!yyv || !yys)
+- {
+- yyerror( "yacc stack overflow" );
+- return(1);
+- }
+- yy_ps =3D yys + yyps_index;
+- yy_pv =3D yyv + yypv_index;
+- yypvt =3D yyv + yypvt_index;
+- }
+- *yy_ps =3D yy_state;
+- *++yy_pv =3D yyval;
+-
+- /*
+- ** we have a new state - find out what to do
+- */
+- yy_newstate:
+- if ( ( yy_n =3D yypact[ yy_state ] ) <=3D YYFLAG )
+- goto yydefault; /* simple state */
++ yynerrs =3D 0;
++ yyerrflag =3D 0;
++ yychar =3D (-1);
++
++ if (yyss =3D=3D NULL && yygrowstack()) goto yyoverflow;
++ yyssp =3D yyss;
++ yyvsp =3D yyvs;
++ *yyssp =3D yystate =3D 0;
++
++yyloop:
++ if ((yyn =3D yydefred[yystate])) goto yyreduce;
++ if (yychar < 0)
++ {
++ if ((yychar =3D yylex()) < 0) yychar =3D 0;
+ #if YYDEBUG
+- /*
+- ** if debugging, need to mark whether new token grabbed
+- */
+- yytmp =3D yychar < 0;
++ if (yydebug)
++ {
++ yys =3D 0;
++ if (yychar <=3D YYMAXTOKEN) yys =3D yyname[yychar];
++ if (!yys) yys =3D "illegal-symbol";
++ printf("%sdebug: state %d, reading %d (%s)\n",
++ YYPREFIX, yystate, yychar, yys);
++ }
+ #endif
+- if ( ( yychar < 0 ) && ( ( yychar =3D yylex() ) < 0 ) )
+- yychar =3D 0; /* reached EOF */
+-#if YYDEBUG
+- if ( yydebug && yytmp )
+- {
+- register int yy_i;
+-
+- (void)printf( "Received token " );
+- if ( yychar =3D=3D 0 )
+- (void)printf( "end-of-file\n" );
+- else if ( yychar < 0 )
+- (void)printf( "-none-\n" );
+- else
+- {
+- for ( yy_i =3D 0; yytoks[yy_i].t_val >=3D 0;
+- yy_i++ )
+- {
+- if ( yytoks[yy_i].t_val =3D=3D yychar )
+- break;
+- }
+- (void)printf( "%s\n", yytoks[yy_i].t_name );
+- }
+- }
+-#endif /* YYDEBUG */
+- if ( ( ( yy_n +=3D yychar ) < 0 ) || ( yy_n >=3D YYLAST ) )
+- goto yydefault;
+- if ( yychk[ yy_n =3D yyact[ yy_n ] ] =3D=3D yychar ) /*valid
shift*/
+- {
+- yychar =3D -1;
+- yyval =3D yylval;
+- yy_state =3D yy_n;
+- if ( yyerrflag > 0 )
+- yyerrflag--;
+- goto yy_stack;
+- }
+-
+- yydefault:
+- if ( ( yy_n =3D yydef[ yy_state ] ) =3D=3D -2 )
+- {
++ }
++ if ((yyn =3D yysindex[yystate]) && (yyn +=3D yychar) >=3D 0 &&
++ yyn <=3D YYTABLESIZE && yycheck[yyn] =3D=3D yychar)
++ {
+ #if YYDEBUG
+- yytmp =3D yychar < 0;
++ if (yydebug)
++ printf("%sdebug: state %d, shifting to state %d\n",
++ YYPREFIX, yystate, yytable[yyn]);
+ #endif
+- if ( ( yychar < 0 ) && ( ( yychar =3D yylex() ) < 0 )
)
+- yychar =3D 0; /* reached EOF */
++ if (yyssp >=3D yysslim && yygrowstack())
++ {
++ goto yyoverflow;
++ }
++ *++yyssp =3D yystate =3D yytable[yyn];
++ *++yyvsp =3D yylval;
++ yychar =3D (-1);
++ if (yyerrflag > 0) --yyerrflag;
++ goto yyloop;
++ }
++ if ((yyn =3D yyrindex[yystate]) && (yyn +=3D yychar) >=3D 0 &&
++ yyn <=3D YYTABLESIZE && yycheck[yyn] =3D=3D yychar)
++ {
++ yyn =3D yytable[yyn];
++ goto yyreduce;
++ }
++ if (yyerrflag) goto yyinrecovery;
++#if defined(lint) || defined(__GNUC__)
++ goto yynewerror;
++#endif
++yynewerror:
++ yyerror("syntax error");
++#if defined(lint) || defined(__GNUC__)
++ goto yyerrlab;
++#endif
++yyerrlab:
++ ++yynerrs;
++yyinrecovery:
++ if (yyerrflag < 3)
++ {
++ yyerrflag =3D 3;
++ for (;;)
++ {
++ if ((yyn =3D yysindex[*yyssp]) && (yyn +=3D YYERRCODE) =
>=3D 0 &&
++ yyn <=3D YYTABLESIZE && yycheck[yyn] =3D=3D =
YYERRCODE)
++ {
+ #if YYDEBUG
+- if ( yydebug && yytmp )
+- {
+- register int yy_i;
+-
+- (void)printf( "Received token " );
+- if ( yychar =3D=3D 0 )
+- (void)printf( "end-of-file\n" );
+- else if ( yychar < 0 )
+- (void)printf( "-none-\n" );
+- else
+- {
+- for ( yy_i =3D 0;
+- yytoks[yy_i].t_val >=3D 0;
+- yy_i++ )
+- {
+- if ( yytoks[yy_i].t_val
+- =3D=3D yychar )
+- {
+- break;
+- }
+- }
+- (void)printf( "%s\n",
yytoks[yy_i].t_name );
+- }
+- }
+-#endif /* YYDEBUG */
+- /*
+- ** look through exception table
+- */
+- {
+- register int *yyxi =3D yyexca;
+-
+- while ( ( *yyxi !=3D -1 ) ||
+- ( yyxi[1] !=3D yy_state ) )
+- {
+- yyxi +=3D 2;
+- }
+- while ( ( *(yyxi +=3D 2) >=3D 0 ) &&
+- ( *yyxi !=3D yychar ) )
+- ;
+- if ( ( yy_n =3D yyxi[1] ) < 0 )
+- YYACCEPT;
+- }
+- }
+-
+- /*
+- ** check for syntax error
+- */
+- if ( yy_n =3D=3D 0 ) /* have an error */
+- {
+- /* no worry about speed here! */
+- switch ( yyerrflag )
+- {
+- case 0: /* new error */
+- yyerror( "syntax error" );
+- goto skip_init;
+- yyerrlab:
+- /*
+- ** get globals into registers.
+- ** we have a user generated syntax type
error
+- */
+- yy_pv =3D yypv;
+- yy_ps =3D yyps;
+- yy_state =3D yystate;
+- yynerrs++;
+- skip_init:
+- case 1:
+- case 2: /* incompletely recovered error */
+- /* try again... */
+- yyerrflag =3D 3;
+- /*
+- ** find state where "error" is a legal
+- ** shift action
+- */
+- while ( yy_ps >=3D yys )
+- {
+- yy_n =3D yypact[ *yy_ps ] + YYERRCODE;
+- if ( yy_n >=3D 0 && yy_n < YYLAST &&
+- yychk[yyact[yy_n]] =3D=3D
YYERRCODE) {
+- /*
+- ** simulate shift of "error"
+- */
+- yy_state =3D yyact[ yy_n ];
+- goto yy_stack;
+- }
+- /*
+- ** current state has no shift on
+- ** "error", pop stack
+- */
++ if (yydebug)
++ printf("%sdebug: state %d, error recovery =
shifting\
++ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
++#endif
++ if (yyssp >=3D yysslim && yygrowstack())
++ {
++ goto yyoverflow;
++ }
++ *++yyssp =3D yystate =3D yytable[yyn];
++ *++yyvsp =3D yylval;
++ goto yyloop;
++ }
++ else
++ {
+ #if YYDEBUG
+-# define _POP_ "Error recovery pops state %d, uncovers state %d\n"
+- if ( yydebug )
+- (void)printf( _POP_, *yy_ps,
+- yy_ps[-1] );
+-# undef _POP_
++ if (yydebug)
++ printf("%sdebug: error recovery discarding state
%d\n",
++ YYPREFIX, *yyssp);
+ #endif
+- yy_ps--;
+- yy_pv--;
+- }
+- /*
+- ** there is no state on stack with "error"
as
+- ** a valid shift. give up.
+- */
+- YYABORT;
+- case 3: /* no shift yet; eat a token */
++ if (yyssp <=3D yyss) goto yyabort;
++ --yyssp;
++ --yyvsp;
++ }
++ }
++ }
++ else
++ {
++ if (yychar =3D=3D 0) goto yyabort;
+ #if YYDEBUG
+- /*
+- ** if debugging, look up token in list of
+- ** pairs. 0 and negative shouldn't occur,
+- ** but since timing doesn't matter when
+- ** debugging, it doesn't hurt to leave the
+- ** tests here.
+- */
+- if ( yydebug )
+- {
+- register int yy_i;
+-
+- (void)printf( "Error recovery
discards " );
+- if ( yychar =3D=3D 0 )
+- (void)printf( "token
end-of-file\n" );
+- else if ( yychar < 0 )
+- (void)printf( "token
-none-\n" );
+- else
+- {
+- for ( yy_i =3D 0;
+- yytoks[yy_i].t_val
>=3D 0;
+- yy_i++ )
+- {
+- if (
yytoks[yy_i].t_val
+- =3D=3D yychar )
+- {
+- break;
+- }
+- }
+- (void)printf( "token %s\n",
+- yytoks[yy_i].t_name
);
+- }
+- }
+-#endif /* YYDEBUG */
+- if ( yychar =3D=3D 0 ) /* reached EOF. quit
*/
+- YYABORT;
+- yychar =3D -1;
+- goto yy_newstate;
+- }
+- }/* end if ( yy_n =3D=3D 0 ) */
+- /*
+- ** reduction by production yy_n
+- ** put stack tops, etc. so things right after switch
+- */
++ if (yydebug)
++ {
++ yys =3D 0;
++ if (yychar <=3D YYMAXTOKEN) yys =3D yyname[yychar];
++ if (!yys) yys =3D "illegal-symbol";
++ printf("%sdebug: state %d, error recovery discards token =
%d
(%s)\n",
++ YYPREFIX, yystate, yychar, yys);
++ }
++#endif
++ yychar =3D (-1);
++ goto yyloop;
++ }
++yyreduce:
+ #if YYDEBUG
+- /*
+- ** if debugging, print the string that is the user's
+- ** specification of the reduction which is just about
+- ** to be done.
+- */
+- if ( yydebug )
+- (void)printf( "Reduce by (%d) \"%s\"\n",
+- yy_n, yyreds[ yy_n ] );
+-#endif
+- yytmp =3D yy_n; /* value to switch over */
+- yypvt =3D yy_pv; /* $vars top of value stack
*/
+- /*
+- ** Look in goto table for next state
+- ** Sorry about using yy_state here as temporary
+- ** register variable, but why not, if it works...
+- ** If yyr2[ yy_n ] doesn't have the low order bit
+- ** set, then there is no action to be done for
+- ** this reduction. So, no saving & unsaving of
+- ** registers done. The only difference between the
+- ** code just after the if and the body of the if is
+- ** the goto yy_stack in the body. This way the test
+- ** can be made before the choice of what to do is needed.
+- */
+- {
+- /* length of production doubled with extra bit */
+- register int yy_len =3D yyr2[ yy_n ];
+-
+- if ( !( yy_len & 01 ) )
+- {
+- yy_len >>=3D 1;
+- yyval =3D ( yy_pv -=3D yy_len )[1]; /* $$ =3D $1
*/
+- yy_state =3D yypgo[ yy_n =3D yyr1[ yy_n ] ] +
+- *( yy_ps -=3D yy_len ) + 1;
+- if ( yy_state >=3D YYLAST ||
+- yychk[ yy_state =3D
+- yyact[ yy_state ] ] !=3D -yy_n )
+- {
+- yy_state =3D yyact[ yypgo[ yy_n ] ];
+- }
+- goto yy_stack;
+- }
+- yy_len >>=3D 1;
+- yyval =3D ( yy_pv -=3D yy_len )[1]; /* $$ =3D $1 */
+- yy_state =3D yypgo[ yy_n =3D yyr1[ yy_n ] ] +
+- *( yy_ps -=3D yy_len ) + 1;
+- if ( yy_state >=3D YYLAST ||
+- yychk[ yy_state =3D yyact[ yy_state ] ] !=3D
-yy_n )
+- {
+- yy_state =3D yyact[ yypgo[ yy_n ] ];
+- }
+- }
+- /* save until reenter driver code */
+- yystate =3D yy_state;
+- yyps =3D yy_ps;
+- yypv =3D yy_pv;
+- }
+- /*
+- ** code supplied by user is placed in this switch
+- */
+- switch( yytmp )
+- {
+- =09
++ if (yydebug)
++ printf("%sdebug: state %d, reducing by rule %d (%s)\n",
++ YYPREFIX, yystate, yyn, yyrule[yyn]);
++#endif
++ yym =3D yylen[yyn];
++ yyval =3D yyvsp[1-yym];
++ switch (yyn)
++ {
+ case 1:
+-# line 109 "calc.y"
+- { Expression =3D yypvt[-0].ex;} break;
++#line 109 "calc.y"
++ { Expression =3D yyvsp[0].ex;}
++break;
+ case 2:
+-# line 111 "calc.y"
+- { yyval.ex =3D yypvt[-1].ex; } break;
++#line 111 "calc.y"
++ { yyval.ex =3D yyvsp[-1].ex; }
++break;
+ case 3:
+-# line 112 "calc.y"
++#line 112 "calc.y"
+=20
+ {
+- if (checkrecursion (yypvt[-2].var, yypvt[-0].ex))
++ if (checkrecursion (yyvsp[-2].var, yyvsp[0].ex))
+ {
+ fprintf (stderr, "calc: Can't have recursive
definitions\n");
+- Variable[yypvt[-2].var] =3D NULL;
++ Variable[yyvsp[-2].var] =3D NULL;
+ }
+- else Variable[yypvt[-2].var] =3D yypvt[-0].ex;
+- yyval.ex =3D yypvt[-0].ex;
+- } break;
++ else Variable[yyvsp[-2].var] =3D yyvsp[0].ex;
++ yyval.ex =3D yyvsp[0].ex;
++ }
++break;
+ case 4:
+-# line 122 "calc.y"
++#line 122 "calc.y"
+=20
+ {
+ Constant =3D (double *) malloc (sizeof (double));
+ if (Constant =3D=3D NULL)
+ errorexit ("Out of storage space");
+- *Constant =3D eval (yypvt[-0].ex);
++ *Constant =3D eval (yyvsp[0].ex);
+ Tmp1.num =3D Constant;
+ yyval.ex =3D node (&Tmp1, NUMBER, ENULL, ENULL);
+- } break;
++ }
++break;
+ case 5:
+-# line 131 "calc.y"
++#line 131 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '+';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 6:
+-# line 136 "calc.y"
++#line 136 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '-';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 7:
+-# line 141 "calc.y"
++#line 141 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '*';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 8:
+-# line 146 "calc.y"
++#line 146 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '%';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 9:
+-# line 151 "calc.y"
++#line 151 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '/';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 10:
+-# line 156 "calc.y"
++#line 156 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '^';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 11:
+-# line 161 "calc.y"
++#line 161 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '_';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 12:
+-# line 166 "calc.y"
++#line 166 "calc.y"
+=20
+ {
+ Tmp1.opr =3D EQ;
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 13:
+-# line 171 "calc.y"
++#line 171 "calc.y"
+=20
+ {
+ Tmp1.opr =3D NE;
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 14:
+-# line 176 "calc.y"
++#line 176 "calc.y"
+=20
+ {
+ Tmp1.opr =3D LE;
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 15:
+-# line 181 "calc.y"
++#line 181 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '<';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 16:
+-# line 186 "calc.y"
++#line 186 "calc.y"
+=20
+ {
+ Tmp1.opr =3D GE;
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 17:
+-# line 191 "calc.y"
++#line 191 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '>';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 18:
+-# line 196 "calc.y"
++#line 196 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '&';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 19:
+-# line 201 "calc.y"
++#line 201 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '|';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 20:
+-# line 206 "calc.y"
++#line 206 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '!';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 21:
+-# line 211 "calc.y"
++#line 211 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '?';
+ Tmp2.opr =3D ':';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-4].ex, node (&Tmp2,
OPERATOR, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-4].ex, node (&Tmp2,
OPERATOR, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 22:
+-# line 217 "calc.y"
++#line 217 "calc.y"
+=20
+ {
+ Tmp1.opr =3D '?';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 23:
+-# line 222 "calc.y"
++#line 222 "calc.y"
+=20
+ {
+ Tmp1.opr =3D ':';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 24:
+-# line 227 "calc.y"
++#line 227 "calc.y"
+=20
+ {
+ Tmp1.opr =3D ACOS;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 25:
+-# line 232 "calc.y"
++#line 232 "calc.y"
+=20
+ {
+ Tmp1.opr =3D ASIN;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 26:
+-# line 237 "calc.y"
++#line 237 "calc.y"
+=20
+ {
+ Tmp1.opr =3D ATAN;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 27:
+-# line 242 "calc.y"
++#line 242 "calc.y"
+=20
+ {
+ Tmp1.opr =3D COS;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 28:
+-# line 247 "calc.y"
++#line 247 "calc.y"
+=20
+ {
+ Tmp1.opr =3D SIN;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 29:
+-# line 252 "calc.y"
++#line 252 "calc.y"
+=20
+ {
+ Tmp1.opr =3D TAN;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 30:
+-# line 257 "calc.y"
++#line 257 "calc.y"
+=20
+ {
+ Tmp1.opr =3D LOG;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 31:
+-# line 262 "calc.y"
++#line 262 "calc.y"
+=20
+ {
+ Tmp1.opr =3D EXP;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 32:
+-# line 267 "calc.y"
++#line 267 "calc.y"
+=20
+ {
+ Tmp1.opr =3D ABS;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 33:
+-# line 272 "calc.y"
++#line 272 "calc.y"
+=20
+ {
+ Tmp1.opr =3D SQRT;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 34:
+-# line 277 "calc.y"
++#line 277 "calc.y"
+=20
+ {
+- Tmp1.var =3D yypvt[-0].var;
++ Tmp1.var =3D yyvsp[0].var;
+ yyval.ex =3D node (&Tmp1, VARIABLE, ENULL, ENULL);
+- } break;
++ }
++break;
+ case 35:
+-# line 282 "calc.y"
++#line 282 "calc.y"
+=20
+ {
+- Tmp1.num =3D yypvt[-0].num;
++ Tmp1.num =3D yyvsp[0].num;
+ yyval.ex =3D node (&Tmp1, NUMBER, ENULL, ENULL);
+- } break;
+- }
+- goto yystack; /* reset registers in driver code */
++ }
++break;
++#line 1363 "y.tab.c"
++ }
++ yyssp -=3D yym;
++ yystate =3D *yyssp;
++ yyvsp -=3D yym;
++ yym =3D yylhs[yyn];
++ if (yystate =3D=3D 0 && yym =3D=3D 0)
++ {
++#if YYDEBUG
++ if (yydebug)
++ printf("%sdebug: after reduction, shifting from state 0 =
to\
++ state %d\n", YYPREFIX, YYFINAL);
++#endif
++ yystate =3D YYFINAL;
++ *++yyssp =3D YYFINAL;
++ *++yyvsp =3D yyval;
++ if (yychar < 0)
++ {
++ if ((yychar =3D yylex()) < 0) yychar =3D 0;
++#if YYDEBUG
++ if (yydebug)
++ {
++ yys =3D 0;
++ if (yychar <=3D YYMAXTOKEN) yys =3D yyname[yychar];
++ if (!yys) yys =3D "illegal-symbol";
++ printf("%sdebug: state %d, reading %d (%s)\n",
++ YYPREFIX, YYFINAL, yychar, yys);
++ }
++#endif
++ }
++ if (yychar =3D=3D 0) goto yyaccept;
++ goto yyloop;
++ }
++ if ((yyn =3D yygindex[yym]) && (yyn +=3D yystate) >=3D 0 &&
++ yyn <=3D YYTABLESIZE && yycheck[yyn] =3D=3D yystate)
++ yystate =3D yytable[yyn];
++ else
++ yystate =3D yydgoto[yym];
++#if YYDEBUG
++ if (yydebug)
++ printf("%sdebug: after reduction, shifting from state %d \
++to state %d\n", YYPREFIX, *yyssp, yystate);
++#endif
++ if (yyssp >=3D yysslim && yygrowstack())
++ {
++ goto yyoverflow;
++ }
++ *++yyssp =3D yystate;
++ *++yyvsp =3D yyval;
++ goto yyloop;
++yyoverflow:
++ yyerror("yacc stack overflow");
++yyabort:
++ return (1);
++yyaccept:
++ return (0);
+ }
diff -ruN unixstat.orig/files/patch-calc.y unixstat/files/patch-calc.y
--- unixstat.orig/files/patch-calc.y Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-calc.y Thu Apr 21 14:59:22 2005
@@ -0,0 +1,19 @@
+--- src/calc.y.orig Thu Apr 21 14:32:22 2005
++++ src/calc.y Thu Apr 21 14:32:31 2005
+@@ -77,7 +77,7 @@
+ double eval (), Answer;
+ double *Constant;
+ char *getline ();
+-FILE *Outfile =3D stdout;
++FILE *Outfile =3D NULL;
+ %}
+=20
+ %union
+@@ -385,6 +385,7 @@
+ main (argc, argv) int argc; char *argv[];
+ {
+ int i;
++Outfile =3D stdout;
+ signal (SIGINT, SIG_IGN);
+ if (isatty (fileno (stdin)))
+ {
diff -ruN unixstat.orig/files/patch-chisq.c unixstat/files/patch-chisq.c
--- unixstat.orig/files/patch-chisq.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-chisq.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,11 @@
+--- src/chisq.c.orig Thu Apr 21 14:32:22 2005
++++ src/chisq.c Thu Apr 21 14:32:31 2005
+@@ -43,7 +43,7 @@
+ putchar ('\n');
+ }
+ }
+-#endif CHISQTEST
++#endif
+=20
+ =0C/*FUNCTION pochisq: probability of chi sqaure value */
+ /*ALGORITHM Compute probability of chi square value.
diff -ruN unixstat.orig/files/patch-chitest.c =
unixstat/files/patch-chitest.c
--- unixstat.orig/files/patch-chitest.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-chitest.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,8 @@
+--- src/chitest.c.orig Thu Apr 21 14:32:22 2005
++++ src/chitest.c Thu Apr 21 14:32:31 2005
+@@ -143,4 +143,4 @@
+ {
+ chitest (matrix, rownames, colnames, 2, 5, TRUE);
+ }
+-#endif CHITEST
++#endif
diff -ruN unixstat.orig/files/patch-colex.c unixstat/files/patch-colex.c
--- unixstat.orig/files/patch-colex.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-colex.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,21 @@
+--- src/colex.c.orig Thu Apr 21 14:32:23 2005
++++ src/colex.c Thu Apr 21 14:32:31 2005
+@@ -93,8 +93,17 @@
+=20
+ checkstdin ();
+=20
+- while (gets (line))
++line[0] =3D 0;
++ while (fgets(line, MAXCHARS, stdin))
+ {
++/* TEK20050420: gets is deprecated, so replace
++ * with gets above and then write the following little
++ * schlemiel-the-painter-ish-feeling piece to scan for and
++ * change to a null terminator the first newline.
++ */
++{=20
++ char *s =3D line; while (*s) { if (*s=3D=3D'\n') { *s=3D0; break; } =
s++; }
++}
+ Lineno++;
+ if (Charcolumn)
+ ncols =3D strlen (line);
diff -ruN unixstat.orig/files/patch-contab.c =
unixstat/files/patch-contab.c
--- unixstat.orig/files/patch-contab.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-contab.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,11 @@
+--- src/contab.c.orig Thu Apr 21 14:32:23 2005
++++ src/contab.c Thu Apr 21 14:32:31 2005
+@@ -24,7 +24,7 @@
+ =0C
+ #ifndef I_DATA
+ #define I_DATA /* using integer data in mdmat */
+-#endif I_DATA
++#endif
+ #define MAXLEV 40 /* maximum number of levels of
factors */
+ #define MAXCHARS BUFSIZ /* maximum number of chars in lines =
*/
+ #include "mdmat.h"
diff -ruN unixstat.orig/files/patch-desc.c unixstat/files/patch-desc.c
--- unixstat.orig/files/patch-desc.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-desc.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,25 @@
+--- src/desc.c.orig Thu Apr 21 14:32:23 2005
++++ src/desc.c Thu Apr 21 14:32:31 2005
+@@ -6,7 +6,7 @@
+ #ifdef __STDC__
+ double centile (int perc, float *v, int n);
+ int bindex (float xval);
+- int fltcmp (float *f1, float *f2);
++ int fltcmp (const void *f1, const void *f2);
+ # define vprint(label,format,var) printf (#label " =3D %" #format =
"\n",
var)
+ #else
+ double centile (); /* percentile function */
+@@ -214,10 +214,10 @@
+ ERRDATA
+ }
+=20
+-int
+-fltcmp (f1, f2)
+-float *f1, *f2;
++int fltcmp(const void *a1, const void *a2)
+ {
++ const float *f1 =3D a1;
++ const float *f2 =3D a2;
+ if (*f1 < *f2)
+ return (-1);
+ if (*f1 =3D=3D *f2)
diff -ruN unixstat.orig/files/patch-dm.c unixstat/files/patch-dm.c
--- unixstat.orig/files/patch-dm.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-dm.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,2127 @@
+--- src/dm.c.orig Thu Apr 21 14:32:23 2005
++++ src/dm.c Thu Apr 21 14:32:31 2005
+@@ -1,5 +1,26 @@
+-
+-# line 2 "dm.y"
++#include <stdlib.h>
++#ifndef lint
++#ifdef __unused
++__unused
++#endif
++static char const=20
++yyrcsid[] =3D "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.37 2003/02/12
18:03:55 davidc Exp $";
++#endif
++#define YYBYACC 1
++#define YYMAJOR 1
++#define YYMINOR 9
++#define YYLEX yylex()
++#define YYEMPTY -1
++#define yyclearin (yychar=3D(YYEMPTY))
++#define yyerrok (yyerrflag=3D0)
++#define YYRECOVERING() (yyerrflag!=3D0)
++#if defined(__cplusplus) || __STDC__
++static int yygrowstack(void);
++#else
++static int yygrowstack();
++#endif
++#define YYPREFIX "yy"
++#line 2 "dm.y"
+ /* Copyright 1980 Gary Perlman */
+=20
+ #include "stat.h"
+@@ -103,75 +124,407 @@
+ int Should_output[MAXEXPR+1]; /* used with X */
+ int Exprno; /* expression number */
+ int Nexpr; /* number of expressions */
+-
+-# line 116 "dm.y"
+-typedef union { /* union of the data types the parser will deal with =
*/
++#line 116 "dm.y"
++typedef union { /* union of the data types the parser will deal with =
*/
+ int opr;
+ char *str;
+ double *num;
+ ENODE *ex;
+ } YYSTYPE;
+-#ifdef __cplusplus
+-# include <stdio.h>
+-# include <yacc.h>
+-#endif /* __cplusplus */=20
+-# define NUMBER 257
+-# define STRING 258
+-# define STRINDEX 259
+-# define IF 260
+-# define THEN 261
+-# define ELSE 262
+-# define NOR 263
+-# define NAND 264
+-# define EQ 265
+-# define NE 266
+-# define GE 267
+-# define GT 268
+-# define LE 269
+-# define LT 270
+-# define NOTIN 271
+-# define C 67
+-# define UMINUS 272
+-# define l 108
+-# define L 76
+-# define e 101
+-# define a 97
+-# define f 102
+-# define r 114
+-# define c 99
+-# define SQRT 273
+-# define SIN 274
+-# define COS 275
+-# define TAN 276
+-# define ATAN 277
+-# define ACOS 278
+-# define ASIN 279
+-# define NTYPE 280
+-#define yyclearin yychar =3D -1
+-#define yyerrok yyerrflag =3D 0
+-extern int yychar;
+-#ifndef YYMAXDEPTH
+-#define YYMAXDEPTH 150
+-#endif
+-
+-/* __YYSCLASS defines the scoping/storage class for global objects
+- * that are NOT renamed by the -p option. By default these names
+- * are going to be 'static' so that multi-definition errors
+- * will not occur with multiple parsers.
+- * If you want (unsupported) access to internal names you need
+- * to define this to be null so it implies 'extern' scope.
+- * This should not be used in conjunction with -p.
+- */
+-#ifndef __YYSCLASS
+-# define __YYSCLASS static
++#line 135 "y.tab.c"
++#define YYERRCODE 256
++#define NUMBER 257
++#define STRING 258
++#define STRINDEX 259
++#define IF 260
++#define THEN 261
++#define ELSE 262
++#define NOR 263
++#define NAND 264
++#define EQ 265
++#define NE 266
++#define GE 267
++#define GT 268
++#define LE 269
++#define LT 270
++#define NOTIN 271
++#define UMINUS 272
++#define SQRT 273
++#define SIN 274
++#define COS 275
++#define TAN 276
++#define ATAN 277
++#define ACOS 278
++#define ASIN 279
++#define NTYPE 280
++const short yylhs[] =3D { -1,
++ 0, 3, 3, 1, 1, 1, 1, 1, 1, 1,
++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
++ 1, 1, 2, 2,
++};
++const short yylen[] =3D { 2,
++ 1, 1, 1, 4, 4, 3, 3, 3, 3, 3,
++ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
++ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2,
++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
++ 2, 2, 2, 2, 2, 2, 4, 3, 3, 5,
++ 6, 1, 3, 1,
++};
++const short yydefred[] =3D { 0,
++ 52, 54, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
++ 0, 29, 0, 46, 31, 32, 40, 41, 42, 43,
++ 44, 33, 34, 35, 36, 37, 38, 39, 45, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 6, 53, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 13, 14, 18, 17, 22, 21, 49, 48,
++ 0, 0, 4, 5, 0, 47, 0, 50, 51,
++};
++const short yydgoto[] =3D { 25,
++ 26, 30, 28,
++};
++const short yysindex[] =3D { 417,
++ 0, 0, 417, 417, 417, -40, 417, 417, 417, 417,
++ 417, 417, 417, 417, 417, 417, 417, 417, 417, 417,
++ -40, -89, -88, 417, 0, 694, 303, 0, 441, 303,
++ 485, 0, -40, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 417,
++ 417, 460, 49, 417, 417, 417, 417, 417, 417, 417,
++ 417, 417, 417, 417, 417, 417, 417, 417, 417, 417,
++ -40, -40, -40, -40, -40, -40, -40, -40, 417, 417,
++ -36, 504, 515, 0, 0, -52, 202, 202, 485, 485,
++ -33, -33, -33, -33, -33, -33, -2, -2, -87, -87,
++ -87, -87, 0, 0, 0, 0, 0, 0, 0, 0,
++ 574, -254, 0, 0, 417, 0, 417, 0, 0,
++};
++const short yyrindex[] =3D { 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 153, 105, 0, 0, 0,
++ 93, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 113, 388, 97, 129,
++ 324, 340, 363, 372, 384, 396, 69, 81, 1, 13,
++ 25, 37, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0,
++};
++const short yygindex[] =3D { 0,
++ 869, 791, -28,
++};
++#define YYTABLESIZE 964
++const short yytable[] =3D { 33,
++ 9, 50, 51, 69, 85, 115, 70, 117, 67, 65,
++ 0, 66, 11, 68, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 10, 86, 0, 0, 0, 0,
++ 0, 0, 0, 0, 69, 0, 12, 9, 9, 67,
++ 0, 9, 9, 9, 68, 9, 0, 9, 0, 11,
++ 11, 112, 0, 11, 11, 11, 0, 11, 9, 11,
++ 70, 10, 10, 9, 0, 10, 10, 10, 7, 10,
++ 11, 10, 0, 12, 12, 11, 0, 12, 12, 12,
++ 8, 12, 10, 12, 0, 0, 118, 10, 119, 85,
++ 0, 70, 30, 9, 12, 0, 25, 0, 0, 12,
++ 0, 0, 0, 0, 3, 11, 7, 0, 0, 7,
++ 0, 7, 27, 7, 0, 78, 0, 10, 8, 0,
++ 0, 8, 0, 8, 9, 8, 7, 0, 26, 12,
++ 30, 7, 0, 30, 25, 0, 11, 25, 8, 79,
++ 0, 3, 3, 8, 0, 3, 3, 3, 10, 3,
++ 30, 3, 2, 27, 25, 30, 0, 0, 0, 25,
++ 12, 7, 3, 0, 0, 0, 26, 3, 0, 26,
++ 27, 0, 0, 8, 0, 27, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 30, 26, 0, 0, 25,
++ 0, 26, 7, 2, 0, 0, 0, 3, 3, 0,
++ 0, 0, 0, 0, 8, 27, 0, 0, 0, 0,
++ 2, 0, 0, 0, 0, 0, 30, 2, 0, 0,
++ 25, 26, 0, 0, 0, 0, 0, 0, 3, 0,
++ 0, 0, 0, 0, 0, 0, 27, 0, 69, 57,
++ 0, 0, 0, 67, 65, 2, 66, 0, 68, 0,
++ 0, 0, 26, 0, 0, 0, 0, 0, 0, 0,
++ 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
++ 9, 0, 0, 11, 11, 11, 11, 11, 11, 11,
++ 11, 11, 11, 0, 0, 10, 10, 10, 10, 10,
++ 10, 10, 10, 10, 10, 70, 0, 12, 12, 12,
++ 12, 12, 12, 12, 12, 12, 12, 0, 0, 0,
++ 0, 0, 0, 71, 72, 73, 74, 75, 76, 77,
++ 0, 0, 0, 15, 0, 0, 0, 0, 0, 7,
++ 7, 7, 7, 7, 7, 7, 7, 7, 7, 16,
++ 0, 8, 8, 8, 8, 8, 8, 8, 8, 8,
++ 8, 0, 0, 30, 30, 30, 30, 25, 25, 25,
++ 25, 15, 20, 0, 15, 3, 3, 3, 3, 78,
++ 0, 19, 0, 27, 27, 27, 0, 16, 0, 0,
++ 16, 15, 0, 24, 0, 0, 15, 28, 0, 26,
++ 26, 26, 26, 79, 0, 23, 0, 16, 0, 0,
++ 20, 0, 16, 20, 0, 0, 0, 0, 0, 19,
++ 0, 0, 19, 2, 2, 0, 15, 0, 0, 0,
++ 20, 24, 0, 0, 24, 20, 0, 0, 28, 19,
++ 0, 0, 16, 23, 19, 0, 23, 0, 0, 0,
++ 0, 24, 0, 0, 0, 28, 24, 15, 0, 4,
++ 28, 6, 0, 23, 0, 20, 24, 0, 23, 0,
++ 0, 5, 0, 16, 19, 58, 59, 60, 61, 62,
++ 63, 64, 0, 0, 0, 0, 24, 69, 57, 0,
++ 28, 0, 67, 65, 0, 66, 20, 68, 23, 0,
++ 0, 0, 8, 0, 0, 19, 69, 57, 0, 0,
++ 84, 67, 65, 54, 66, 0, 68, 24, 0, 0,
++ 0, 28, 0, 10, 0, 13, 0, 9, 11, 23,
++ 0, 69, 54, 0, 7, 0, 67, 65, 0, 66,
++ 12, 68, 0, 0, 70, 0, 22, 23, 0, 0,
++ 69, 57, 0, 0, 0, 67, 65, 0, 66, 0,
++ 68, 69, 57, 70, 0, 0, 67, 65, 0, 66,
++ 0, 68, 0, 0, 55, 0, 54, 71, 72, 73,
++ 74, 75, 76, 77, 0, 0, 0, 54, 70, 0,
++ 0, 0, 0, 55, 15, 15, 15, 15, 0, 0,
++ 0, 0, 0, 0, 0, 0, 113, 70, 0, 0,
++ 16, 16, 16, 16, 0, 0, 0, 114, 70, 0,
++ 69, 57, 0, 0, 0, 67, 65, 0, 66, 0,
++ 68, 0, 0, 20, 20, 20, 20, 55, 0, 0,
++ 0, 0, 19, 19, 19, 19, 54, 0, 55, 0,
++ 0, 0, 0, 0, 24, 24, 24, 24, 28, 28,
++ 28, 0, 0, 0, 0, 0, 23, 23, 23, 23,
++ 0, 0, 0, 0, 0, 0, 116, 70, 0, 0,
++ 0, 0, 0, 1, 2, 0, 3, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 14,
++ 15, 16, 17, 18, 19, 20, 21, 55, 0, 0,
++ 0, 80, 0, 56, 58, 59, 60, 61, 62, 63,
++ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 56, 58, 59, 60, 61, 62, 63, 64,
++ 69, 57, 0, 0, 0, 67, 65, 0, 66, 0,
++ 68, 0, 0, 0, 0, 0, 0, 0, 0, 59,
++ 60, 61, 62, 63, 64, 0, 54, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 56, 58, 59, 60,
++ 61, 62, 63, 64, 0, 0, 0, 56, 58, 59,
++ 60, 61, 62, 63, 64, 0, 0, 70, 0, 0,
++ 27, 0, 0, 0, 0, 0, 34, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 49, 0, 0, 53, 0, 0, 55, 0, 0,
++ 0, 0, 0, 81, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 56, 58, 59, 60,
++ 61, 62, 63, 64, 27, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
++ 0, 103, 104, 105, 106, 107, 108, 109, 110, 0,
++ 27, 29, 31, 32, 0, 35, 36, 37, 38, 39,
++ 40, 41, 42, 43, 44, 45, 46, 47, 48, 0,
++ 0, 0, 52, 0, 0, 0, 0, 0, 0, 0,
++ 0, 0, 0, 0, 0, 27, 0, 27, 0, 0,
++ 0, 0, 0, 0, 0, 0, 0, 0, 82, 83,
++ 0, 0, 0, 87, 88, 89, 90, 91, 92, 93,
++ 94, 95, 96, 97, 98, 99, 100, 101, 102, 0,
++ 0, 0, 0, 0, 0, 0, 0, 111, 0, 0,
++ 0, 0, 0, 0, 0, 0, 56, 58, 59, 60,
++ 61, 62, 63, 64,
++};
++const short yycheck[] =3D { 40,
++ 0, 91, 91, 37, 41, 58, 94, 262, 42, 43,
++ -1, 45, 0, 47, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, 0, 54, -1, -1, -1, -1,
++ -1, -1, -1, -1, 37, -1, 0, 37, 38, 42,
++ -1, 41, 42, 43, 47, 45, -1, 47, -1, 37,
++ 38, 80, -1, 41, 42, 43, -1, 45, 58, 47,
++ 94, 37, 38, 63, -1, 41, 42, 43, 0, 45,
++ 58, 47, -1, 37, 38, 63, -1, 41, 42, 43,
++ 0, 45, 58, 47, -1, -1, 115, 63, 117, 41,
++ -1, 94, 0, 93, 58, -1, 0, -1, -1, 63,
++ -1, -1, -1, -1, 0, 93, 38, -1, -1, 41,
++ -1, 43, 0, 45, -1, 67, -1, 93, 38, -1,
++ -1, 41, -1, 43, 124, 45, 58, -1, 0, 93,
++ 38, 63, -1, 41, 38, -1, 124, 41, 58, 91,
++ -1, 37, 38, 63, -1, 41, 42, 43, 124, 45,
++ 58, 47, 0, 41, 58, 63, -1, -1, -1, 63,
++ 124, 93, 58, -1, -1, -1, 38, 63, -1, 41,
++ 58, -1, -1, 93, -1, 63, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, 93, 58, -1, -1, 93,
++ -1, 63, 124, 41, -1, -1, -1, 93, 94, -1,
++ -1, -1, -1, -1, 124, 93, -1, -1, -1, -1,
++ 58, -1, -1, -1, -1, -1, 124, 258, -1, -1,
++ 124, 93, -1, -1, -1, -1, -1, -1, 124, -1,
++ -1, -1, -1, -1, -1, -1, 124, -1, 37, 38,
++ -1, -1, -1, 42, 43, 93, 45, -1, 47, -1,
++ -1, -1, 124, -1, -1, -1, -1, -1, -1, -1,
++ -1, 261, 262, 263, 264, 265, 266, 267, 268, 269,
++ 270, -1, -1, 261, 262, 263, 264, 265, 266, 267,
++ 268, 269, 270, -1, -1, 261, 262, 263, 264, 265,
++ 266, 267, 268, 269, 270, 94, -1, 261, 262, 263,
++ 264, 265, 266, 267, 268, 269, 270, -1, -1, -1,
++ -1, -1, -1, 265, 266, 267, 268, 269, 270, 271,
++ -1, -1, -1, 0, -1, -1, -1, -1, -1, 261,
++ 262, 263, 264, 265, 266, 267, 268, 269, 270, 0,
++ -1, 261, 262, 263, 264, 265, 266, 267, 268, 269,
++ 270, -1, -1, 261, 262, 263, 264, 261, 262, 263,
++ 264, 38, 0, -1, 41, 261, 262, 263, 264, 67,
++ -1, 0, -1, 261, 262, 263, -1, 38, -1, -1,
++ 41, 58, -1, 0, -1, -1, 63, 0, -1, 261,
++ 262, 263, 264, 91, -1, 0, -1, 58, -1, -1,
++ 38, -1, 63, 41, -1, -1, -1, -1, -1, 38,
++ -1, -1, 41, 261, 262, -1, 93, -1, -1, -1,
++ 58, 38, -1, -1, 41, 63, -1, -1, 41, 58,
++ -1, -1, 93, 38, 63, -1, 41, -1, -1, -1,
++ -1, 58, -1, -1, -1, 58, 63, 124, -1, 33,
++ 63, 35, -1, 58, -1, 93, 40, -1, 63, -1,
++ -1, 45, -1, 124, 93, 264, 265, 266, 267, 268,
++ 269, 270, -1, -1, -1, -1, 93, 37, 38, -1,
++ 93, -1, 42, 43, -1, 45, 124, 47, 93, -1,
++ -1, -1, 76, -1, -1, 124, 37, 38, -1, -1,
++ 41, 42, 43, 63, 45, -1, 47, 124, -1, -1,
++ -1, 124, -1, 97, -1, 99, -1, 101, 102, 124,
++ -1, 37, 63, -1, 108, -1, 42, 43, -1, 45,
++ 114, 47, -1, -1, 94, -1, 120, 121, -1, -1,
++ 37, 38, -1, -1, -1, 42, 43, -1, 45, -1,
++ 47, 37, 38, 94, -1, -1, 42, 43, -1, 45,
++ -1, 47, -1, -1, 124, -1, 63, 265, 266, 267,
++ 268, 269, 270, 271, -1, -1, -1, 63, 94, -1,
++ -1, -1, -1, 124, 261, 262, 263, 264, -1, -1,
++ -1, -1, -1, -1, -1, -1, 93, 94, -1, -1,
++ 261, 262, 263, 264, -1, -1, -1, 93, 94, -1,
++ 37, 38, -1, -1, -1, 42, 43, -1, 45, -1,
++ 47, -1, -1, 261, 262, 263, 264, 124, -1, -1,
++ -1, -1, 261, 262, 263, 264, 63, -1, 124, -1,
++ -1, -1, -1, -1, 261, 262, 263, 264, 261, 262,
++ 263, -1, -1, -1, -1, -1, 261, 262, 263, 264,
++ -1, -1, -1, -1, -1, -1, 93, 94, -1, -1,
++ -1, -1, -1, 257, 258, -1, 260, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, -1, 273,
++ 274, 275, 276, 277, 278, 279, 280, 124, -1, -1,
++ -1, 261, -1, 263, 264, 265, 266, 267, 268, 269,
++ 270, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, -1, 263, 264, 265, 266, 267, 268, 269, 270,
++ 37, 38, -1, -1, -1, 42, 43, -1, 45, -1,
++ 47, -1, -1, -1, -1, -1, -1, -1, -1, 265,
++ 266, 267, 268, 269, 270, -1, 63, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, 263, 264, 265, 266,
++ 267, 268, 269, 270, -1, -1, -1, 263, 264, 265,
++ 266, 267, 268, 269, 270, -1, -1, 94, -1, -1,
++ 0, -1, -1, -1, -1, -1, 6, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, 21, -1, -1, 24, -1, -1, 124, -1, -1,
++ -1, -1, -1, 33, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, 263, 264, 265, 266,
++ 267, 268, 269, 270, 54, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
++ -1, 71, 72, 73, 74, 75, 76, 77, 78, -1,
++ 80, 3, 4, 5, -1, 7, 8, 9, 10, 11,
++ 12, 13, 14, 15, 16, 17, 18, 19, 20, -1,
++ -1, -1, 24, -1, -1, -1, -1, -1, -1, -1,
++ -1, -1, -1, -1, -1, 115, -1, 117, -1, -1,
++ -1, -1, -1, -1, -1, -1, -1, -1, 50, 51,
++ -1, -1, -1, 55, 56, 57, 58, 59, 60, 61,
++ 62, 63, 64, 65, 66, 67, 68, 69, 70, -1,
++ -1, -1, -1, -1, -1, -1, -1, 79, -1, -1,
++ -1, -1, -1, -1, -1, -1, 263, 264, 265, 266,
++ 267, 268, 269, 270,
++};
++#define YYFINAL 25
++#ifndef YYDEBUG
++#define YYDEBUG 0
++#endif
++#define YYMAXTOKEN 280
++#if YYDEBUG
++const char * const yyname[] =3D {
++"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0=
,0,
0,0,
++"'!'",0,"'#'",0,"'%'","'&'",0,"'('","')'","'*'","'+'",0,"'-'",0,"'/'",0=
,0,
0,0,0,
++0,0,0,0,0,"':'",0,0,0,0,"'?'",0,0,0,"'C'",0,0,0,0,0,0,0,0,"'L'",0,0,0,0=
,0,
0,0,0,
++0,0,0,0,0,0,"'['",0,"']'","'^'",0,0,"'a'",0,"'c'",0,"'e'","'f'",0,0,0,0=
,0,
"'l'",
++0,0,0,0,0,"'r'",0,0,0,0,0,"'x'","'y'",0,0,"'|'",0,0,0,0,0,0,0,0,0,0,0,0=
,0,
0,0,0,
++0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0=
,0,
0,0,0,
++0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0=
,0,
0,0,0,
++0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0=
,
++"NUMBER","STRING","STRINDEX","IF","THEN","ELSE","NOR","NAND","EQ","NE",=
"GE
",
++"GT","LE","LT","NOTIN","UMINUS","SQRT","SIN","COS","TAN","ATAN","ACOS",=
"AS
IN",
++"NTYPE",
++};
++const char * const yyrule[] =3D {
++"$accept : start",
++"start : stringexpr",
++"stringexpr : expr",
++"stringexpr : string",
++"expr : 'x' '[' expr ']'",
++"expr : 'y' '[' expr ']'",
++"expr : '(' expr ')'",
++"expr : expr '+' expr",
++"expr : expr '-' expr",
++"expr : expr '*' expr",
++"expr : expr '%' expr",
++"expr : expr '/' expr",
++"expr : expr '^' expr",
++"expr : string EQ string",
++"expr : string NE string",
++"expr : expr EQ expr",
++"expr : expr NE expr",
++"expr : string GT string",
++"expr : string GE string",
++"expr : expr GT expr",
++"expr : expr GE expr",
++"expr : string LT string",
++"expr : string LE string",
++"expr : expr LT expr",
++"expr : expr LE expr",
++"expr : expr '&' expr",
++"expr : expr NAND expr",
++"expr : expr '|' expr",
++"expr : expr NOR expr",
++"expr : '-' expr",
++"expr : '!' expr",
++"expr : 'l' expr",
++"expr : 'L' expr",
++"expr : SQRT expr",
++"expr : SIN expr",
++"expr : COS expr",
++"expr : TAN expr",
++"expr : ATAN expr",
++"expr : ACOS expr",
++"expr : ASIN expr",
++"expr : 'e' expr",
++"expr : 'a' expr",
++"expr : 'f' expr",
++"expr : 'r' expr",
++"expr : 'c' expr",
++"expr : NTYPE string",
++"expr : '#' string",
++"expr : string '[' expr ']'",
++"expr : string 'C' string",
++"expr : string NOTIN string",
++"expr : expr '?' stringexpr ':' stringexpr",
++"expr : IF expr THEN stringexpr ELSE stringexpr",
++"expr : NUMBER",
++"string : '(' string ')'",
++"string : STRING",
++};
++#endif
++#if YYDEBUG
++#include <stdio.h>
++#endif
++#ifdef YYSTACKSIZE
++#undef YYMAXDEPTH
++#define YYMAXDEPTH YYSTACKSIZE
++#else
++#ifdef YYMAXDEPTH
++#define YYSTACKSIZE YYMAXDEPTH
++#else
++#define YYSTACKSIZE 10000
++#define YYMAXDEPTH 10000
+ #endif
++#endif
++#define YYINITSTACKSIZE 200
++int yydebug;
++int yynerrs;
++int yyerrflag;
++int yychar;
++short *yyssp;
++YYSTYPE *yyvsp;
++YYSTYPE yyval;
+ YYSTYPE yylval;
+-__YYSCLASS YYSTYPE yyval;
+-typedef int yytabelem;
+-# define YYERRCODE 256
+-
+-# line 431 "dm.y"
+-
++short *yyss;
++short *yysslim;
++YYSTYPE *yyvs;
++int yystacksize;
++#line 432 "dm.y"
+=20
+ /*
+ Next is the scanner that will be repeatedly called by yyparse, yylex.
+@@ -444,9 +797,11 @@
+ char *msg;
+ {
+ if (msg && *msg)
+- fprintf (stderr, "\007dm: %s\n", msg);
++ /*fprintf (stderr, "\007dm: %s\n", msg);*/
++ fprintf (stderr, ": %s\n", msg);
+ fprintf (stderr,
+- "\007dm: Failure occurred with this left in input: (%s)\n",
Expra-1);
++ /*"\007"*/
++ "dm: Failure occurred with this left in input: (%s)\n", =
Expra-1);
+ #ifdef PTREE
+ ptree (Expr[Exprno]);
+ putchar ('\n');
+@@ -484,7 +839,8 @@
+ case STRINGPTR: newnode->contents.str =3D datum->str; break;
+ case STRINGOP:
+ case OPERATOR: newnode->contents.opr =3D datum->opr; break;
+- default: fprintf (stderr, "\007dm/enode: unknown data
type.\n");
++ /*default: fprintf (stderr, "\007dm/enode: unknown data
type.\n");*/
++ default: fprintf (stderr, "dm/enode: unknown data type.\n");
+ }
+ newnode->lchild =3D lson;
+ newnode->rchild =3D rson;
+@@ -567,7 +923,8 @@
+ Should_output[Exprno] =3D TRUE;
+ if (yyparse() =3D=3D PARSERROR) /* call parser */
+ {
+- fprintf (stderr, "\007dm: error in parsing
expr[%d].\n", Exprno--);
++ /*fprintf (stderr, "\007dm: error in parsing
expr[%d].\n", Exprno--);*/
++ fprintf (stderr, "dm: error in parsing expr[%d].\n",
Exprno--);
+ if (input_by_hand)
+ goto readexpr;
+ else
+@@ -586,7 +943,8 @@
+ if (Nexpr =3D=3D 0)
+ {
+ Exprno =3D 0;
+- fprintf (stderr, "dm: \007No expressions were read
in\n");
++ /*fprintf (stderr, "dm: \007No expressions were read
in\n");*/
++ fprintf (stderr, "dm: No expressions were read
in\n");
+ if (input_by_hand && !feof (stdin))
+ goto readexpr;
+ else
+@@ -959,1128 +1317,650 @@
+ s2++;
+ return (0);
+ }
+-__YYSCLASS yytabelem yyexca[] =3D{
+--1, 1,
+- 0, -1,
+- -2, 0,
+--1, 86,
+- 265, 0,
+- 266, 0,
+- 267, 0,
+- 268, 0,
+- 269, 0,
+- 270, 0,
+- -2, 15,
+--1, 87,
+- 265, 0,
+- 266, 0,
+- 267, 0,
+- 268, 0,
+- 269, 0,
+- 270, 0,
+- -2, 16,
+--1, 88,
+- 265, 0,
+- 266, 0,
+- 267, 0,
+- 268, 0,
+- 269, 0,
+- 270, 0,
+- -2, 19,
+--1, 89,
+- 265, 0,
+- 266, 0,
+- 267, 0,
+- 268, 0,
+- 269, 0,
+- 270, 0,
+- -2, 20,
+--1, 90,
+- 265, 0,
+- 266, 0,
+- 267, 0,
+- 268, 0,
+- 269, 0,
+- 270, 0,
+- -2, 23,
+--1, 91,
+- 265, 0,
+- 266, 0,
+- 267, 0,
+- 268, 0,
+- 269, 0,
+- 270, 0,
+- -2, 24,
+- };
+-# define YYNPROD 55
+-# define YYLAST 494
+-__YYSCLASS yytabelem yyact[]=3D{
+-
+- 9, 53, 25, 32, 41, 118, 2, 7, 31, 29,
+- 77, 30, 8, 33, 32, 34, 56, 55, 112, 31,
+- 109, 1, 32, 41, 33, 52, 0, 31, 29, 45,
+- 30, 0, 33, 0, 0, 0, 32, 41, 0, 0,
+- 0, 31, 29, 11, 30, 0, 33, 109, 45, 0,
+- 0, 0, 96, 0, 0, 0, 0, 0, 0, 115,
+- 34, 0, 45, 0, 20, 0, 23, 0, 19, 21,
+- 0, 34, 0, 53, 0, 10, 0, 0, 114, 34,
+- 0, 22, 0, 0, 0, 0, 0, 5, 6, 0,
+- 43, 0, 113, 34, 32, 41, 0, 52, 0, 31,
+- 29, 0, 30, 0, 33, 0, 32, 41, 0, 43,
+- 108, 31, 29, 0, 30, 0, 33, 0, 116, 117,
+- 45, 32, 41, 43, 0, 119, 31, 29, 0, 30,
+- 0, 33, 45, 32, 41, 0, 0, 0, 31, 29,
+- 32, 30, 0, 33, 0, 31, 29, 45, 30, 32,
+- 33, 34, 0, 0, 31, 29, 0, 30, 0, 33,
+- 0, 0, 0, 34, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 34, 0,
+- 0, 43, 0, 0, 0, 0, 0, 0, 0, 0,
+- 34, 0, 0, 43, 0, 0, 0, 34, 0, 46,
+- 47, 49, 48, 51, 50, 54, 34, 0, 43, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 27, 28, 0, 26, 28, 44,
+- 42, 35, 36, 38, 37, 40, 39, 0, 0, 0,
+- 12, 13, 14, 15, 16, 17, 18, 24, 44, 42,
+- 35, 36, 38, 37, 40, 39, 0, 0, 0, 0,
+- 0, 0, 44, 42, 35, 36, 38, 37, 40, 39,
+- 0, 46, 47, 49, 48, 51, 50, 54, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 111, 0,
+- 44, 42, 35, 36, 38, 37, 40, 39, 0, 0,
+- 0, 0, 44, 42, 35, 36, 38, 37, 40, 39,
+- 0, 0, 0, 0, 0, 0, 0, 44, 42, 35,
+- 36, 38, 37, 40, 39, 0, 0, 0, 0, 0,
+- 42, 35, 36, 38, 37, 40, 39, 0, 35, 36,
+- 38, 37, 40, 39, 60, 4, 0, 0, 0, 0,
+- 0, 0, 58, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 76,
+- 78, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 4, 97, 98, 99, 100, 101, 102, 3, 104, 105,
+- 0, 0, 0, 0, 0, 57, 59, 61, 62, 63,
+- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+- 74, 75, 110, 0, 79, 0, 0, 80, 81, 82,
+- 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+- 93, 94, 95, 0, 0, 0, 0, 0, 0, 0,
+- 103, 0, 0, 106, 107, 0, 4, 4, 0, 0,
+- 0, 0, 0, 4 };
+-__YYSCLASS yytabelem yypact[]=3D{
+-
+- -33, -3000, -3000, 84, -66, -74, -75, -33, -33, -33,
+- -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+- -33, -33, -33, -33, -30, -30, -33, -3000, -3000, -33,
+- -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+- -33, -33, -33, -33, -33, -33, -30, -30, -30, -30,
+- -30, -30, -33, -30, -30, -33, -33, 69, 6, -3000,
+- -66, 103, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000,
+- -3000, -3000, -3000, -3000, -3000, -3000, -3000, -30, -3000, 57,
+- -23, -23, -79, -79, -79, -79, 112, 112, 112, 112,
+- 112, 112, 103, 103, 96, 96, -40, -3000, -3000, -3000,
+- -3000, -3000, -3000, -1, -3000, -3000, -15, -34, -3000, -3000,
+- -21, -33, -33, -3000, -3000, -3000, -257, -3000, -33, -3000 =
};
+-__YYSCLASS yytabelem yypgo[]=3D{
+-
+- 0, 427, 374, 6, 21 };
+-__YYSCLASS yytabelem yyr1[]=3D{
+-
+- 0, 4, 3, 3, 1, 1, 1, 1, 1, 1,
+- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+- 1, 1, 1, 2, 2 };
+-__YYSCLASS yytabelem yyr2[]=3D{
+-
+- 0, 3, 3, 3, 9, 9, 7, 7, 7, 7,
+- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+- 7, 7, 7, 7, 7, 7, 7, 7, 7, 5,
+- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+- 5, 5, 5, 5, 5, 5, 5, 9, 7, 7,
+- 11, 13, 3, 7, 3 };
+-__YYSCLASS yytabelem yychk[]=3D{
+-
+- -3000, -4, -3, -1, -2, 120, 121, 40, 45, 33,
+- 108, 76, 273, 274, 275, 276, 277, 278, 279, 101,
+- 97, 102, 114, 99, 280, 35, 260, 257, 258, 43,
+- 45, 42, 37, 47, 94, 265, 266, 268, 267, 270,
+- 269, 38, 264, 124, 263, 63, 265, 266, 268, 267,
+- 270, 269, 91, 67, 271, 91, 91, -1, -2, -1,
+- -2, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+- -1, -1, -1, -1, -1, -1, -2, 40, -2, -1,
+- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+- -1, -1, -1, -1, -1, -1, -3, -2, -2, -2,
+- -2, -2, -2, -1, -2, -2, -1, -1, 41, 41,
+- -2, 261, 58, 93, 93, 93, -3, -3, 262, -3 =
};
+-__YYSCLASS yytabelem yydef[]=3D{
+-
+- 0, -2, 1, 2, 3, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 52, 54, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
+- 0, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+- 39, 40, 41, 42, 43, 44, 45, 0, 46, 0,
+- 7, 8, 9, 10, 11, 12, -2, -2, -2, -2,
+- -2, -2, 25, 26, 27, 28, 0, 13, 14, 17,
+- 18, 21, 22, 0, 48, 49, 0, 0, 6, 53,
+- 0, 0, 0, 47, 4, 5, 0, 50, 0, 51 =
};
+-typedef struct { char *t_name; int t_val; } yytoktype;
+-#ifndef YYDEBUG
+-# define YYDEBUG 0 /* don't allow debugging */
+-#endif
+-
+-#if YYDEBUG
+-
+-__YYSCLASS yytoktype yytoks[] =3D
+-{
+- "NUMBER", 257,
+- "STRING", 258,
+- "STRINDEX", 259,
+- "?", 63,
+- ":", 58,
+- "IF", 260,
+- "THEN", 261,
+- "ELSE", 262,
+- "|", 124,
+- "NOR", 263,
+- "&", 38,
+- "NAND", 264,
+- "!", 33,
+- "EQ", 265,
+- "NE", 266,
+- "GE", 267,
+- "GT", 268,
+- "LE", 269,
+- "LT", 270,
+- "NOTIN", 271,
+- "C", 67,
+- "+", 43,
+- "-", 45,
+- "*", 42,
+- "/", 47,
+- "%", 37,
+- "^", 94,
+- "UMINUS", 272,
+- "#", 35,
+- "l", 108,
+- "L", 76,
+- "e", 101,
+- "a", 97,
+- "f", 102,
+- "r", 114,
+- "c", 99,
+- "SQRT", 273,
+- "SIN", 274,
+- "COS", 275,
+- "TAN", 276,
+- "ATAN", 277,
+- "ACOS", 278,
+- "ASIN", 279,
+- "NTYPE", 280,
+- "-unknown-", -1 /* ends search */
+-};
+-
+-__YYSCLASS char * yyreds[] =3D
+-{
+- "-no such reduction-",
+- "start : stringexpr",
+- "stringexpr : expr",
+- "stringexpr : string",
+- "expr : 'x' '[' expr ']'",
+- "expr : 'y' '[' expr ']'",
+- "expr : '(' expr ')'",
+- "expr : expr '+' expr",
+- "expr : expr '-' expr",
+- "expr : expr '*' expr",
+- "expr : expr '%' expr",
+- "expr : expr '/' expr",
+- "expr : expr '^' expr",
+- "expr : string EQ string",
+- "expr : string NE string",
+- "expr : expr EQ expr",
+- "expr : expr NE expr",
+- "expr : string GT string",
+- "expr : string GE string",
+- "expr : expr GT expr",
+- "expr : expr GE expr",
+- "expr : string LT string",
+- "expr : string LE string",
+- "expr : expr LT expr",
+- "expr : expr LE expr",
+- "expr : expr '&' expr",
+- "expr : expr NAND expr",
+- "expr : expr '|' expr",
+- "expr : expr NOR expr",
+- "expr : '-' expr",
+- "expr : '!' expr",
+- "expr : 'l' expr",
+- "expr : 'L' expr",
+- "expr : SQRT expr",
+- "expr : SIN expr",
+- "expr : COS expr",
+- "expr : TAN expr",
+- "expr : ATAN expr",
+- "expr : ACOS expr",
+- "expr : ASIN expr",
+- "expr : 'e' expr",
+- "expr : 'a' expr",
+- "expr : 'f' expr",
+- "expr : 'r' expr",
+- "expr : 'c' expr",
+- "expr : NTYPE string",
+- "expr : '#' string",
+- "expr : string '[' expr ']'",
+- "expr : string 'C' string",
+- "expr : string NOTIN string",
+- "expr : expr '?' stringexpr ':' stringexpr",
+- "expr : IF expr THEN stringexpr ELSE stringexpr",
+- "expr : NUMBER",
+- "string : '(' string ')'",
+- "string : STRING",
+-};
+-#endif /* YYDEBUG */
+-#define YYFLAG (-3000)
+-/* @(#) $Revision: 70.7 $ */ =20
+-
+-/*
+-** Skeleton parser driver for yacc output
+-*/
+-
+-#if defined(NLS) && !defined(NL_SETN)
+-#include <msgbuf.h>
+-#endif
+-
+-#ifndef nl_msg
+-#define nl_msg(i,s) (s)
+-#endif
+-
+-/*
+-** yacc user known macros and defines
+-*/
+-#define YYERROR goto yyerrlab
+-
+-#ifndef __RUNTIME_YYMAXDEPTH
+-#define YYACCEPT return(0)
+-#define YYABORT return(1)
+-#else
+-#define YYACCEPT {free_stacks(); return(0);}
+-#define YYABORT {free_stacks(); return(1);}
+-#endif
+-
+-#define YYBACKUP( newtoken, newvalue )\
+-{\
+- if ( yychar >=3D 0 || ( yyr2[ yytmp ] >> 1 ) !=3D 1 )\
+- {\
+- yyerror( (nl_msg(30001,"syntax error - cannot backup")) );\
+- goto yyerrlab;\
+- }\
+- yychar =3D newtoken;\
+- yystate =3D *yyps;\
+- yylval =3D newvalue;\
+- goto yynewstate;\
++#line 1321 "y.tab.c"
++/* allocate initial stack or double stack size, up to YYMAXDEPTH */
++static int yygrowstack()
++{
++ int newsize, i;
++ short *newss;
++ YYSTYPE *newvs;
++
++ if ((newsize =3D yystacksize) =3D=3D 0)
++ newsize =3D YYINITSTACKSIZE;
++ else if (newsize >=3D YYMAXDEPTH)
++ return -1;
++ else if ((newsize *=3D 2) > YYMAXDEPTH)
++ newsize =3D YYMAXDEPTH;
++ i =3D yyssp - yyss;
++ newss =3D yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :
++ (short *)malloc(newsize * sizeof *newss);
++ if (newss =3D=3D NULL)
++ return -1;
++ yyss =3D newss;
++ yyssp =3D newss + i;
++ newvs =3D yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) =
:
++ (YYSTYPE *)malloc(newsize * sizeof *newvs);
++ if (newvs =3D=3D NULL)
++ return -1;
++ yyvs =3D newvs;
++ yyvsp =3D newvs + i;
++ yystacksize =3D newsize;
++ yysslim =3D yyss + newsize - 1;
++ return 0;
+ }
+-#define YYRECOVERING() (!!yyerrflag)
+-#ifndef YYDEBUG
+-# define YYDEBUG 1 /* make debugging available */
+-#endif
+-
+-/*
+-** user known globals
+-*/
+-int yydebug; /* set to 1 to get debugging */
+-
+-/*
+-** driver internal defines
+-*/
+-/* define for YYFLAG now generated by yacc program. */
+-/*#define YYFLAG (FLAGVAL)*/
+-
+-/*
+-** global variables used by the parser
+-*/
+-# ifndef __RUNTIME_YYMAXDEPTH
+-__YYSCLASS YYSTYPE yyv[ YYMAXDEPTH ]; /* value stack */
+-__YYSCLASS int yys[ YYMAXDEPTH ]; /* state stack */
+-# else
+-__YYSCLASS YYSTYPE *yyv; /* pointer to malloc'ed
value stack */
+-__YYSCLASS int *yys; /* pointer to malloc'ed stack stack
*/
+-
+-#if defined(__STDC__) || defined (__cplusplus)
+-#include <stdlib.h>
+-#else
+- extern char *malloc();
+- extern char *realloc();
+- extern void free();
+-#endif /* __STDC__ or __cplusplus */
+-
+-
+-static int allocate_stacks();=20
+-static void free_stacks();
+-# ifndef YYINCREMENT
+-# define YYINCREMENT (YYMAXDEPTH/2) + 10
+-# endif
+-# endif /* __RUNTIME_YYMAXDEPTH */
+-long yymaxdepth =3D YYMAXDEPTH;
+-
+-__YYSCLASS YYSTYPE *yypv; /* top of value stack */
+-__YYSCLASS int *yyps; /* top of state stack */
+-
+-__YYSCLASS int yystate; /* current state */
+-__YYSCLASS int yytmp; /* extra var (lasts between blocks)
*/
+-
+-int yynerrs; /* number of errors */
+-__YYSCLASS int yyerrflag; /* error recovery flag */
+-int yychar; /* current input token number */
+-
+=20
++#define YYABORT goto yyabort
++#define YYREJECT goto yyabort
++#define YYACCEPT goto yyaccept
++#define YYERROR goto yyerrlab
++
++#ifndef YYPARSE_PARAM
++#if defined(__cplusplus) || __STDC__
++#define YYPARSE_PARAM_ARG void
++#define YYPARSE_PARAM_DECL
++#else /* ! ANSI-C/C++ */
++#define YYPARSE_PARAM_ARG
++#define YYPARSE_PARAM_DECL
++#endif /* ANSI-C/C++ */
++#else /* YYPARSE_PARAM */
++#ifndef YYPARSE_PARAM_TYPE
++#define YYPARSE_PARAM_TYPE void *
++#endif
++#if defined(__cplusplus) || __STDC__
++#define YYPARSE_PARAM_ARG YYPARSE_PARAM_TYPE YYPARSE_PARAM
++#define YYPARSE_PARAM_DECL
++#else /* ! ANSI-C/C++ */
++#define YYPARSE_PARAM_ARG YYPARSE_PARAM
++#define YYPARSE_PARAM_DECL YYPARSE_PARAM_TYPE YYPARSE_PARAM;
++#endif /* ANSI-C/C++ */
++#endif /* ! YYPARSE_PARAM */
+=20
+-/*
+-** yyparse - return 0 if worked, 1 if syntax error not recovered from
+-*/
+ int
+-yyparse()
++yyparse (YYPARSE_PARAM_ARG)
++ YYPARSE_PARAM_DECL
+ {
+- register YYSTYPE *yypvt; /* top of value stack for $vars */
+-
+- /*
+- ** Initialize externals - yyparse may be called more than once
+- */
+-# ifdef __RUNTIME_YYMAXDEPTH
+- if (allocate_stacks()) YYABORT;
+-# endif
+- yypv =3D &yyv[-1];
+- yyps =3D &yys[-1];
+- yystate =3D 0;
+- yytmp =3D 0;
+- yynerrs =3D 0;
+- yyerrflag =3D 0;
+- yychar =3D -1;
+-
+- goto yystack;
+- {
+- register YYSTYPE *yy_pv; /* top of value stack */
+- register int *yy_ps; /* top of state stack */
+- register int yy_state; /* current state */
+- register int yy_n; /* internal state number
info */
+-
+- /*
+- ** get globals into registers.
+- ** branch to here only if YYBACKUP was called.
+- */
+- yynewstate:
+- yy_pv =3D yypv;
+- yy_ps =3D yyps;
+- yy_state =3D yystate;
+- goto yy_newstate;
+-
+- /*
+- ** get globals into registers.
+- ** either we just started, or we just finished a reduction
+- */
+- yystack:
+- yy_pv =3D yypv;
+- yy_ps =3D yyps;
+- yy_state =3D yystate;
+-
+- /*
+- ** top of for (;;) loop while no reductions done
+- */
+- yy_stack:
+- /*
+- ** put a state and value onto the stacks
+- */
++ int yym, yyn, yystate;
+ #if YYDEBUG
+- /*
+- ** if debugging, look up token value in list of value vs.
+- ** name pairs. 0 and negative (-1) are special values.
+- ** Note: linear search is used since time is not a real
+- ** consideration while debugging.
+- */
+- if ( yydebug )
+- {
+- register int yy_i;
++ const char *yys;
+=20
+- printf( "State %d, token ", yy_state );
+- if ( yychar =3D=3D 0 )
+- printf( "end-of-file\n" );
+- else if ( yychar < 0 )
+- printf( "-none-\n" );
+- else
+- {
+- for ( yy_i =3D 0; yytoks[yy_i].t_val >=3D 0;
+- yy_i++ )
+- {
+- if ( yytoks[yy_i].t_val =3D=3D yychar )
+- break;
+- }
+- printf( "%s\n", yytoks[yy_i].t_name );
+- }
+- }
+-#endif /* YYDEBUG */
+- if ( ++yy_ps >=3D &yys[ yymaxdepth ] ) /* room on stack? */
+- {
+-# ifndef __RUNTIME_YYMAXDEPTH
+- yyerror( (nl_msg(30002,"yacc stack overflow")) );
+- YYABORT;
+-# else
+- /* save old stack bases to recalculate pointers */
+- YYSTYPE * yyv_old =3D yyv;
+- int * yys_old =3D yys;
+- yymaxdepth +=3D YYINCREMENT;
+- yys =3D (int *) realloc(yys, yymaxdepth *
sizeof(int));
+- yyv =3D (YYSTYPE *) realloc(yyv, yymaxdepth *
sizeof(YYSTYPE));
+- if (yys=3D=3D0 || yyv=3D=3D0) {
+- yyerror( (nl_msg(30002,"yacc stack overflow"))
);
+- YYABORT;
+- }
+- /* Reset pointers into stack */
+- yy_ps =3D (yy_ps - yys_old) + yys;
+- yyps =3D (yyps - yys_old) + yys;
+- yy_pv =3D (yy_pv - yyv_old) + yyv;
+- yypv =3D (yypv - yyv_old) + yyv;
+-# endif
+-
+- }
+- *yy_ps =3D yy_state;
+- *++yy_pv =3D yyval;
+-
+- /*
+- ** we have a new state - find out what to do
+- */
+- yy_newstate:
+- if ( ( yy_n =3D yypact[ yy_state ] ) <=3D YYFLAG )
+- goto yydefault; /* simple state */
+-#if YYDEBUG
+- /*
+- ** if debugging, need to mark whether new token grabbed
+- */
+- yytmp =3D yychar < 0;
++ if ((yys =3D getenv("YYDEBUG")))
++ {
++ yyn =3D *yys;
++ if (yyn >=3D '0' && yyn <=3D '9')
++ yydebug =3D yyn - '0';
++ }
+ #endif
+- if ( ( yychar < 0 ) && ( ( yychar =3D yylex() ) < 0 ) )
+- yychar =3D 0; /* reached EOF */
+-#if YYDEBUG
+- if ( yydebug && yytmp )
+- {
+- register int yy_i;
+=20
+- printf( "Received token " );
+- if ( yychar =3D=3D 0 )
+- printf( "end-of-file\n" );
+- else if ( yychar < 0 )
+- printf( "-none-\n" );
+- else
+- {
+- for ( yy_i =3D 0; yytoks[yy_i].t_val >=3D 0;
+- yy_i++ )
+- {
+- if ( yytoks[yy_i].t_val =3D=3D yychar )
+- break;
+- }
+- printf( "%s\n", yytoks[yy_i].t_name );
+- }
+- }
+-#endif /* YYDEBUG */
+- if ( ( ( yy_n +=3D yychar ) < 0 ) || ( yy_n >=3D YYLAST ) )
+- goto yydefault;
+- if ( yychk[ yy_n =3D yyact[ yy_n ] ] =3D=3D yychar ) /*valid
shift*/
+- {
+- yychar =3D -1;
+- yyval =3D yylval;
+- yy_state =3D yy_n;
+- if ( yyerrflag > 0 )
+- yyerrflag--;
+- goto yy_stack;
+- }
+-
+- yydefault:
+- if ( ( yy_n =3D yydef[ yy_state ] ) =3D=3D -2 )
+- {
++ yynerrs =3D 0;
++ yyerrflag =3D 0;
++ yychar =3D (-1);
++
++ if (yyss =3D=3D NULL && yygrowstack()) goto yyoverflow;
++ yyssp =3D yyss;
++ yyvsp =3D yyvs;
++ *yyssp =3D yystate =3D 0;
++
++yyloop:
++ if ((yyn =3D yydefred[yystate])) goto yyreduce;
++ if (yychar < 0)
++ {
++ if ((yychar =3D yylex()) < 0) yychar =3D 0;
+ #if YYDEBUG
+- yytmp =3D yychar < 0;
++ if (yydebug)
++ {
++ yys =3D 0;
++ if (yychar <=3D YYMAXTOKEN) yys =3D yyname[yychar];
++ if (!yys) yys =3D "illegal-symbol";
++ printf("%sdebug: state %d, reading %d (%s)\n",
++ YYPREFIX, yystate, yychar, yys);
++ }
+ #endif
+- if ( ( yychar < 0 ) && ( ( yychar =3D yylex() ) < 0 )
)
+- yychar =3D 0; /* reached EOF */
++ }
++ if ((yyn =3D yysindex[yystate]) && (yyn +=3D yychar) >=3D 0 &&
++ yyn <=3D YYTABLESIZE && yycheck[yyn] =3D=3D yychar)
++ {
+ #if YYDEBUG
+- if ( yydebug && yytmp )
+- {
+- register int yy_i;
+-
+- printf( "Received token " );
+- if ( yychar =3D=3D 0 )
+- printf( "end-of-file\n" );
+- else if ( yychar < 0 )
+- printf( "-none-\n" );
+- else
+- {
+- for ( yy_i =3D 0;
+- yytoks[yy_i].t_val >=3D 0;
+- yy_i++ )
+- {
+- if ( yytoks[yy_i].t_val
+- =3D=3D yychar )
+- {
+- break;
+- }
+- }
+- printf( "%s\n", yytoks[yy_i].t_name
);
+- }
+- }
+-#endif /* YYDEBUG */
+- /*
+- ** look through exception table
+- */
+- {
+- register int *yyxi =3D yyexca;
+-
+- while ( ( *yyxi !=3D -1 ) ||
+- ( yyxi[1] !=3D yy_state ) )
+- {
+- yyxi +=3D 2;
+- }
+- while ( ( *(yyxi +=3D 2) >=3D 0 ) &&
+- ( *yyxi !=3D yychar ) )
+- ;
+- if ( ( yy_n =3D yyxi[1] ) < 0 )
+- YYACCEPT;
+- }
+- }
+-
+- /*
+- ** check for syntax error
+- */
+- if ( yy_n =3D=3D 0 ) /* have an error */
+- {
+- /* no worry about speed here! */
+- switch ( yyerrflag )
+- {
+- case 0: /* new error */
+- yyerror( (nl_msg(30003,"syntax error")) );
+- yynerrs++;
+- goto skip_init;
+- yyerrlab:
+- /*
+- ** get globals into registers.
+- ** we have a user generated syntax type
error
+- */
+- yy_pv =3D yypv;
+- yy_ps =3D yyps;
+- yy_state =3D yystate;
+- yynerrs++;
+- skip_init:
+- case 1:
+- case 2: /* incompletely recovered error */
+- /* try again... */
+- yyerrflag =3D 3;
+- /*
+- ** find state where "error" is a legal
+- ** shift action
+- */
+- while ( yy_ps >=3D yys )
+- {
+- yy_n =3D yypact[ *yy_ps ] + YYERRCODE;
+- if ( yy_n >=3D 0 && yy_n < YYLAST &&
+- yychk[yyact[yy_n]] =3D=3D
YYERRCODE) {
+- /*
+- ** simulate shift of "error"
+- */
+- yy_state =3D yyact[ yy_n ];
+- goto yy_stack;
+- }
+- /*
+- ** current state has no shift on
+- ** "error", pop stack
+- */
++ if (yydebug)
++ printf("%sdebug: state %d, shifting to state %d\n",
++ YYPREFIX, yystate, yytable[yyn]);
++#endif
++ if (yyssp >=3D yysslim && yygrowstack())
++ {
++ goto yyoverflow;
++ }
++ *++yyssp =3D yystate =3D yytable[yyn];
++ *++yyvsp =3D yylval;
++ yychar =3D (-1);
++ if (yyerrflag > 0) --yyerrflag;
++ goto yyloop;
++ }
++ if ((yyn =3D yyrindex[yystate]) && (yyn +=3D yychar) >=3D 0 &&
++ yyn <=3D YYTABLESIZE && yycheck[yyn] =3D=3D yychar)
++ {
++ yyn =3D yytable[yyn];
++ goto yyreduce;
++ }
++ if (yyerrflag) goto yyinrecovery;
++#if defined(lint) || defined(__GNUC__)
++ goto yynewerror;
++#endif
++yynewerror:
++ yyerror("syntax error");
++#if defined(lint) || defined(__GNUC__)
++ goto yyerrlab;
++#endif
++yyerrlab:
++ ++yynerrs;
++yyinrecovery:
++ if (yyerrflag < 3)
++ {
++ yyerrflag =3D 3;
++ for (;;)
++ {
++ if ((yyn =3D yysindex[*yyssp]) && (yyn +=3D YYERRCODE) =
>=3D 0 &&
++ yyn <=3D YYTABLESIZE && yycheck[yyn] =3D=3D =
YYERRCODE)
++ {
+ #if YYDEBUG
+-# define _POP_ "Error recovery pops state %d, uncovers state %d\n"
+- if ( yydebug )
+- printf( _POP_, *yy_ps,
+- yy_ps[-1] );
+-# undef _POP_
++ if (yydebug)
++ printf("%sdebug: state %d, error recovery =
shifting\
++ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
+ #endif
+- yy_ps--;
+- yy_pv--;
+- }
+- /*
+- ** there is no state on stack with "error"
as
+- ** a valid shift. give up.
+- */
+- YYABORT;
+- case 3: /* no shift yet; eat a token */
++ if (yyssp >=3D yysslim && yygrowstack())
++ {
++ goto yyoverflow;
++ }
++ *++yyssp =3D yystate =3D yytable[yyn];
++ *++yyvsp =3D yylval;
++ goto yyloop;
++ }
++ else
++ {
+ #if YYDEBUG
+- /*
+- ** if debugging, look up token in list of
+- ** pairs. 0 and negative shouldn't occur,
+- ** but since timing doesn't matter when
+- ** debugging, it doesn't hurt to leave the
+- ** tests here.
+- */
+- if ( yydebug )
+- {
+- register int yy_i;
+-
+- printf( "Error recovery discards "
);
+- if ( yychar =3D=3D 0 )
+- printf( "token
end-of-file\n" );
+- else if ( yychar < 0 )
+- printf( "token -none-\n" );
+- else
+- {
+- for ( yy_i =3D 0;
+- yytoks[yy_i].t_val
>=3D 0;
+- yy_i++ )
+- {
+- if (
yytoks[yy_i].t_val
+- =3D=3D yychar )
+- {
+- break;
+- }
+- }
+- printf( "token %s\n",
+- yytoks[yy_i].t_name
);
+- }
+- }
+-#endif /* YYDEBUG */
+- if ( yychar =3D=3D 0 ) /* reached EOF. quit
*/
+- YYABORT;
+- yychar =3D -1;
+- goto yy_newstate;
+- }
+- }/* end if ( yy_n =3D=3D 0 ) */
+- /*
+- ** reduction by production yy_n
+- ** put stack tops, etc. so things right after switch
+- */
++ if (yydebug)
++ printf("%sdebug: error recovery discarding state
%d\n",
++ YYPREFIX, *yyssp);
++#endif
++ if (yyssp <=3D yyss) goto yyabort;
++ --yyssp;
++ --yyvsp;
++ }
++ }
++ }
++ else
++ {
++ if (yychar =3D=3D 0) goto yyabort;
+ #if YYDEBUG
+- /*
+- ** if debugging, print the string that is the user's
+- ** specification of the reduction which is just about
+- ** to be done.
+- */
+- if ( yydebug )
+- printf( "Reduce by (%d) \"%s\"\n",
+- yy_n, yyreds[ yy_n ] );
+-#endif
+- yytmp =3D yy_n; /* value to switch over */
+- yypvt =3D yy_pv; /* $vars top of value stack
*/
+- /*
+- ** Look in goto table for next state
+- ** Sorry about using yy_state here as temporary
+- ** register variable, but why not, if it works...
+- ** If yyr2[ yy_n ] doesn't have the low order bit
+- ** set, then there is no action to be done for
+- ** this reduction. So, no saving & unsaving of
+- ** registers done. The only difference between the
+- ** code just after the if and the body of the if is
+- ** the goto yy_stack in the body. This way the test
+- ** can be made before the choice of what to do is needed.
+- */
+- {
+- /* length of production doubled with extra bit */
+- register int yy_len =3D yyr2[ yy_n ];
+-
+- if ( !( yy_len & 01 ) )
+- {
+- yy_len >>=3D 1;
+- yyval =3D ( yy_pv -=3D yy_len )[1]; /* $$ =3D $1
*/
+- yy_state =3D yypgo[ yy_n =3D yyr1[ yy_n ] ] +
+- *( yy_ps -=3D yy_len ) + 1;
+- if ( yy_state >=3D YYLAST ||
+- yychk[ yy_state =3D
+- yyact[ yy_state ] ] !=3D -yy_n )
+- {
+- yy_state =3D yyact[ yypgo[ yy_n ] ];
+- }
+- goto yy_stack;
+- }
+- yy_len >>=3D 1;
+- yyval =3D ( yy_pv -=3D yy_len )[1]; /* $$ =3D $1 */
+- yy_state =3D yypgo[ yy_n =3D yyr1[ yy_n ] ] +
+- *( yy_ps -=3D yy_len ) + 1;
+- if ( yy_state >=3D YYLAST ||
+- yychk[ yy_state =3D yyact[ yy_state ] ] !=3D
-yy_n )
+- {
+- yy_state =3D yyact[ yypgo[ yy_n ] ];
+- }
+- }
+- /* save until reenter driver code */
+- yystate =3D yy_state;
+- yyps =3D yy_ps;
+- yypv =3D yy_pv;
+- }
+- /*
+- ** code supplied by user is placed in this switch
+- */
+- switch( yytmp )
+- {
+- =09
++ if (yydebug)
++ {
++ yys =3D 0;
++ if (yychar <=3D YYMAXTOKEN) yys =3D yyname[yychar];
++ if (!yys) yys =3D "illegal-symbol";
++ printf("%sdebug: state %d, error recovery discards token =
%d
(%s)\n",
++ YYPREFIX, yystate, yychar, yys);
++ }
++#endif
++ yychar =3D (-1);
++ goto yyloop;
++ }
++yyreduce:
++#if YYDEBUG
++ if (yydebug)
++ printf("%sdebug: state %d, reducing by rule %d (%s)\n",
++ YYPREFIX, yystate, yyn, yyrule[yyn]);
++#endif
++ yym =3D yylen[yyn];
++ yyval =3D yyvsp[1-yym];
++ switch (yyn)
++ {
+ case 1:
+-# line 142 "dm.y"
++#line 142 "dm.y"
+ {
+- Expr[Exprno] =3D yypvt[-0].ex;
+- } break;
++ Expr[Exprno] =3D yyvsp[0].ex;
++ }
++break;
+ case 2:
+-# line 147 "dm.y"
++#line 147 "dm.y"
+ {
+- yyval.ex =3D yypvt[-0].ex;
+- } break;
++ yyval.ex =3D yyvsp[0].ex;
++ }
++break;
+ case 3:
+-# line 151 "dm.y"
++#line 151 "dm.y"
+ {
+- yyval.ex =3D yypvt[-0].ex;
+- } break;
++ yyval.ex =3D yyvsp[0].ex;
++ }
++break;
+ case 4:
+-# line 156 "dm.y"
++#line 156 "dm.y"
+ {
+ Tmp1.opr =3D 'x';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-1].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[-1].ex);
++ }
++break;
+ case 5:
+-# line 161 "dm.y"
++#line 161 "dm.y"
+ {
+ Tmp1.opr =3D 'y';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-1].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[-1].ex);
++ }
++break;
+ case 6:
+-# line 166 "dm.y"
++#line 166 "dm.y"
+ {
+- yyval.ex =3D yypvt[-1].ex;
+- } break;
++ yyval.ex =3D yyvsp[-1].ex;
++ }
++break;
+ case 7:
+-# line 170 "dm.y"
++#line 170 "dm.y"
+ {
+ Tmp1.opr =3D '+';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 8:
+-# line 175 "dm.y"
++#line 175 "dm.y"
+ {
+ Tmp1.opr =3D '-';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 9:
+-# line 180 "dm.y"
++#line 180 "dm.y"
+ {
+ Tmp1.opr =3D '*';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 10:
+-# line 185 "dm.y"
++#line 185 "dm.y"
+ {
+ Tmp1.opr =3D '%';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 11:
+-# line 190 "dm.y"
++#line 190 "dm.y"
+ {
+ Tmp1.opr =3D '/';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 12:
+-# line 195 "dm.y"
++#line 195 "dm.y"
+ {
+ Tmp1.opr =3D '^';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 13:
+-# line 200 "dm.y"
++#line 200 "dm.y"
+ {
+ Tmp1.opr =3D '=3D';
+- yyval.ex =3D node (&Tmp1, STRINGOP, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, STRINGOP, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 14:
+-# line 205 "dm.y"
++#line 205 "dm.y"
+ {
+ Tmp1.opr =3D '!';
+ Tmp2.opr =3D '=3D';
+ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL,
+- node (&Tmp2, STRINGOP, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ node (&Tmp2, STRINGOP, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 15:
+-# line 212 "dm.y"
++#line 212 "dm.y"
+ {
+ Tmp1.opr =3D '=3D';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 16:
+-# line 217 "dm.y"
++#line 217 "dm.y"
+ {
+ Tmp1.opr =3D '!';
+ Tmp2.opr =3D '=3D';
+ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL,
+- node (&Tmp2, OPERATOR, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ node (&Tmp2, OPERATOR, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 17:
+-# line 224 "dm.y"
++#line 224 "dm.y"
+ {
+ Tmp1.opr =3D '>';
+- yyval.ex =3D node (&Tmp1, STRINGOP, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, STRINGOP, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 18:
+-# line 229 "dm.y"
++#line 229 "dm.y"
+ {
+ Tmp1.opr =3D '!';
+ Tmp2.opr =3D '<';
+ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL,
+- node (&Tmp2, STRINGOP, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ node (&Tmp2, STRINGOP, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 19:
+-# line 236 "dm.y"
++#line 236 "dm.y"
+ {
+ Tmp1.opr =3D '>';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 20:
+-# line 241 "dm.y"
++#line 241 "dm.y"
+ {
+ Tmp1.opr =3D '!';
+ Tmp2.opr =3D '<';
+ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL,
+- node (&Tmp2, OPERATOR, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ node (&Tmp2, OPERATOR, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 21:
+-# line 248 "dm.y"
++#line 248 "dm.y"
+ {
+ Tmp1.opr =3D '<';
+- yyval.ex =3D node (&Tmp1, STRINGOP, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, STRINGOP, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 22:
+-# line 253 "dm.y"
++#line 253 "dm.y"
+ {
+ Tmp1.opr =3D '!';
+ Tmp2.opr =3D '>';
+ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL,
+- node (&Tmp2, STRINGOP, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ node (&Tmp2, STRINGOP, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 23:
+-# line 260 "dm.y"
++#line 260 "dm.y"
+ {
+ Tmp1.opr =3D '<';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 24:
+-# line 265 "dm.y"
++#line 265 "dm.y"
+ {
+ Tmp1.opr =3D '!';
+ Tmp2.opr =3D '>';
+ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL,
+- node (&Tmp2, OPERATOR, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ node (&Tmp2, OPERATOR, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 25:
+-# line 272 "dm.y"
++#line 272 "dm.y"
+ {
+ Tmp1.opr =3D '&';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 26:
+-# line 277 "dm.y"
++#line 277 "dm.y"
+ {
+ Tmp1.opr =3D '!';
+ Tmp2.opr =3D '&';
+ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL,
+- node (&Tmp2, OPERATOR, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ node (&Tmp2, OPERATOR, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 27:
+-# line 284 "dm.y"
++#line 284 "dm.y"
+ {
+ Tmp1.opr =3D '|';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 28:
+-# line 289 "dm.y"
++#line 289 "dm.y"
+ {
+ Tmp1.opr =3D '!';
+ Tmp2.opr =3D '|';
+ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL,
+- node (&Tmp2, OPERATOR, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ node (&Tmp2, OPERATOR, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 29:
+-# line 296 "dm.y"
++#line 296 "dm.y"
+ {
+ Tmp1.opr =3D '_';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 30:
+-# line 301 "dm.y"
++#line 301 "dm.y"
+ {
+ Tmp1.opr =3D '!';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 31:
+-# line 306 "dm.y"
++#line 306 "dm.y"
+ {
+ Tmp1.opr =3D 'l';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 32:
+-# line 311 "dm.y"
++#line 311 "dm.y"
+ {
+ Tmp1.opr =3D 'L';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 33:
+-# line 316 "dm.y"
++#line 316 "dm.y"
+ {
+ Tmp1.opr =3D SQRT;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 34:
+-# line 321 "dm.y"
++#line 321 "dm.y"
+ {
+ Tmp1.opr =3D SIN;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 35:
+-# line 326 "dm.y"
++#line 326 "dm.y"
+ {
+ Tmp1.opr =3D COS;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 36:
+-# line 331 "dm.y"
++#line 331 "dm.y"
+ {
+ Tmp1.opr =3D TAN;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 37:
+-# line 336 "dm.y"
++#line 336 "dm.y"
+ {
+ Tmp1.opr =3D ATAN;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 38:
+-# line 341 "dm.y"
++#line 341 "dm.y"
+ {
+ Tmp1.opr =3D ACOS;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 39:
+-# line 346 "dm.y"
++#line 346 "dm.y"
+ {
+ Tmp1.opr =3D ASIN;
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 40:
+-# line 351 "dm.y"
++#line 351 "dm.y"
+ {
+ Tmp1.opr =3D 'e';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 41:
+-# line 356 "dm.y"
++#line 356 "dm.y"
+ {
+ Tmp1.opr =3D 'a';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 42:
+-# line 361 "dm.y"
++#line 361 "dm.y"
+ {
+ Tmp1.opr =3D 'f';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 43:
+-# line 366 "dm.y"
++#line 366 "dm.y"
+ {
+ Tmp1.opr =3D 'r';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 44:
+-# line 371 "dm.y"
++#line 371 "dm.y"
+ {
+ Tmp1.opr =3D 'c';
+- yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 45:
+-# line 376 "dm.y"
++#line 376 "dm.y"
+ {
+ Tmp1.opr =3D NTYPE;
+- yyval.ex =3D node (&Tmp1, STRINGOP, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, STRINGOP, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 46:
+-# line 381 "dm.y"
++#line 381 "dm.y"
+ {
+ Tmp1.opr =3D '#';
+- yyval.ex =3D node (&Tmp1, STRINGOP, ENULL, yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, STRINGOP, ENULL, yyvsp[0].ex);
++ }
++break;
+ case 47:
+-# line 386 "dm.y"
++#line 386 "dm.y"
+ {
+ Tmp1.opr =3D '[';
+- yyval.ex =3D node (&Tmp1, STRINGOP, yypvt[-3].ex,
yypvt[-1].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, STRINGOP, yyvsp[-3].ex,
yyvsp[-1].ex);
++ }
++break;
+ case 48:
+-# line 391 "dm.y"
++#line 391 "dm.y"
+ {
+ Tmp1.opr =3D 'C';
+- yyval.ex =3D node (&Tmp1, STRINGOP, yypvt[-2].ex,
yypvt[-0].ex);
+- } break;
++ yyval.ex =3D node (&Tmp1, STRINGOP, yyvsp[-2].ex,
yyvsp[0].ex);
++ }
++break;
+ case 49:
+-# line 396 "dm.y"
++#line 396 "dm.y"
+ {
+ Tmp1.opr =3D '!';
+ Tmp2.opr =3D 'C';
+ yyval.ex =3D node (&Tmp1, OPERATOR, ENULL,
+- node (&Tmp2, STRINGOP, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ node (&Tmp2, STRINGOP, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 50:
+-# line 403 "dm.y"
++#line 403 "dm.y"
+ {
+ Tmp1.opr =3D '?';
+ Tmp2.opr =3D ':';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-4].ex,
+- node (&Tmp2, OPERATOR, yypvt[-2].ex,
yypvt[-0].ex));
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-4].ex,
++ node (&Tmp2, OPERATOR, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 51:
+-# line 410 "dm.y"
++#line 410 "dm.y"
+ {
+ Tmp1.opr =3D '?';
+ Tmp2.opr =3D ':';
+- yyval.ex =3D node (&Tmp1, OPERATOR, yypvt[-4].ex,
+- node (&Tmp2, OPERATOR, yypvt[-2].ex, yypvt[-0].ex));
+- } break;
++ yyval.ex =3D node (&Tmp1, OPERATOR, yyvsp[-4].ex,
++ node (&Tmp2, OPERATOR, yyvsp[-2].ex, yyvsp[0].ex));
++ }
++break;
+ case 52:
+-# line 417 "dm.y"
++#line 417 "dm.y"
+ {
+- Tmp1.num =3D yypvt[-0].num;
++ Tmp1.num =3D yyvsp[0].num;
+ yyval.ex =3D node (&Tmp1, FLOATPTR, ENULL, ENULL);
+- } break;
++ }
++break;
+ case 53:
+-# line 423 "dm.y"
++#line 423 "dm.y"
+ {
+- yyval.ex =3D yypvt[-1].ex;
+- } break;
++ yyval.ex =3D yyvsp[-1].ex;
++ }
++break;
+ case 54:
+-# line 427 "dm.y"
++#line 427 "dm.y"
+ {
+- Tmp1.str =3D yypvt[-0].str;
++ Tmp1.str =3D yyvsp[0].str;
+ yyval.ex =3D node (&Tmp1, STRINGPTR, ENULL, ENULL);
+- } break;
+- }
+- goto yystack; /* reset registers in driver code */
+-}
+-
+-# ifdef __RUNTIME_YYMAXDEPTH
+-
+-static int allocate_stacks() {
+- /* allocate the yys and yyv stacks */
+- yys =3D (int *) malloc(yymaxdepth * sizeof(int));
+- yyv =3D (YYSTYPE *) malloc(yymaxdepth * sizeof(YYSTYPE));
+-
+- if (yys=3D=3D0 || yyv=3D=3D0) {
+- yyerror( (nl_msg(30004,"unable to allocate space for yacc
stacks")) );
+- return(1);
+- }
+- else return(0);
+-
+-}
+-
+-
+-static void free_stacks() {
+- if (yys!=3D0) free((char *) yys);
+- if (yyv!=3D0) free((char *) yyv);
++ }
++break;
++#line 1911 "y.tab.c"
++ }
++ yyssp -=3D yym;
++ yystate =3D *yyssp;
++ yyvsp -=3D yym;
++ yym =3D yylhs[yyn];
++ if (yystate =3D=3D 0 && yym =3D=3D 0)
++ {
++#if YYDEBUG
++ if (yydebug)
++ printf("%sdebug: after reduction, shifting from state 0 =
to\
++ state %d\n", YYPREFIX, YYFINAL);
++#endif
++ yystate =3D YYFINAL;
++ *++yyssp =3D YYFINAL;
++ *++yyvsp =3D yyval;
++ if (yychar < 0)
++ {
++ if ((yychar =3D yylex()) < 0) yychar =3D 0;
++#if YYDEBUG
++ if (yydebug)
++ {
++ yys =3D 0;
++ if (yychar <=3D YYMAXTOKEN) yys =3D yyname[yychar];
++ if (!yys) yys =3D "illegal-symbol";
++ printf("%sdebug: state %d, reading %d (%s)\n",
++ YYPREFIX, YYFINAL, yychar, yys);
++ }
++#endif
++ }
++ if (yychar =3D=3D 0) goto yyaccept;
++ goto yyloop;
++ }
++ if ((yyn =3D yygindex[yym]) && (yyn +=3D yystate) >=3D 0 &&
++ yyn <=3D YYTABLESIZE && yycheck[yyn] =3D=3D yystate)
++ yystate =3D yytable[yyn];
++ else
++ yystate =3D yydgoto[yym];
++#if YYDEBUG
++ if (yydebug)
++ printf("%sdebug: after reduction, shifting from state %d \
++to state %d\n", YYPREFIX, *yyssp, yystate);
++#endif
++ if (yyssp >=3D yysslim && yygrowstack())
++ {
++ goto yyoverflow;
++ }
++ *++yyssp =3D yystate;
++ *++yyvsp =3D yyval;
++ goto yyloop;
++yyoverflow:
++ yyerror("yacc stack overflow");
++yyabort:
++ return (1);
++yyaccept:
++ return (0);
+ }
+-
+-# endif /* defined(__RUNTIME_YYMAXDEPTH) */
+-
diff -ruN unixstat.orig/files/patch-dm.y unixstat/files/patch-dm.y
--- unixstat.orig/files/patch-dm.y Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-dm.y Thu Apr 21 14:59:22 2005
@@ -0,0 +1,46 @@
+--- src/dm.y.orig Thu Apr 21 14:32:23 2005
++++ src/dm.y Thu Apr 21 14:32:31 2005
+@@ -701,9 +701,11 @@
+ char *msg;
+ {
+ if (msg && *msg)
+- fprintf (stderr, "\007dm: %s\n", msg);
++ /*fprintf (stderr, "\007dm: %s\n", msg);*/
++ fprintf (stderr, ": %s\n", msg);
+ fprintf (stderr,
+- "\007dm: Failure occurred with this left in input: (%s)\n",
Expra-1);
++ /*"\007"*/
++ "dm: Failure occurred with this left in input: (%s)\n", =
Expra-1);
+ #ifdef PTREE
+ ptree (Expr[Exprno]);
+ putchar ('\n');
+@@ -741,7 +743,8 @@
+ case STRINGPTR: newnode->contents.str =3D datum->str; break;
+ case STRINGOP:
+ case OPERATOR: newnode->contents.opr =3D datum->opr; break;
+- default: fprintf (stderr, "\007dm/enode: unknown data
type.\n");
++ /*default: fprintf (stderr, "\007dm/enode: unknown data
type.\n");*/
++ default: fprintf (stderr, "dm/enode: unknown data type.\n");
+ }
+ newnode->lchild =3D lson;
+ newnode->rchild =3D rson;
+@@ -824,7 +827,8 @@
+ Should_output[Exprno] =3D TRUE;
+ if (yyparse() =3D=3D PARSERROR) /* call parser */
+ {
+- fprintf (stderr, "\007dm: error in parsing
expr[%d].\n", Exprno--);
++ /*fprintf (stderr, "\007dm: error in parsing
expr[%d].\n", Exprno--);*/
++ fprintf (stderr, "dm: error in parsing expr[%d].\n",
Exprno--);
+ if (input_by_hand)
+ goto readexpr;
+ else
+@@ -843,7 +847,8 @@
+ if (Nexpr =3D=3D 0)
+ {
+ Exprno =3D 0;
+- fprintf (stderr, "dm: \007No expressions were read
in\n");
++ /*fprintf (stderr, "dm: \007No expressions were read
in\n");*/
++ fprintf (stderr, "dm: No expressions were read
in\n");
+ if (input_by_hand && !feof (stdin))
+ goto readexpr;
+ else
diff -ruN unixstat.orig/files/patch-f.c unixstat/files/patch-f.c
--- unixstat.orig/files/patch-f.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-f.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,20 @@
+--- src/f.c.orig Thu Apr 21 14:32:23 2005
++++ src/f.c Thu Apr 21 14:32:31 2005
+@@ -50,7 +50,7 @@
+ putchar ('\n');
+ }
+ }
+-#endif FTEST
++#endif
+=20
+ =0C/*FUNCTION pof: probability of F */
+ /*ALGORITHM Compute probability of F ratio.
+@@ -119,7 +119,7 @@
+ d *=3D (1.0 + a / (j - 2.0)) * z;
+ p =3D (a =3D=3D 1 ? p + d * y / (j - 1.0) : (p + w) * z);
+ }
+-#endif REMARK
++#endif
+ y =3D w * z;
+ z =3D 2.0 / z;
+ b =3D df2 - 2;
diff -ruN unixstat.orig/files/patch-ff.c unixstat/files/patch-ff.c
--- unixstat.orig/files/patch-ff.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-ff.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,11 @@
+--- src/ff.c.orig Thu Apr 21 14:32:23 2005
++++ src/ff.c Thu Apr 21 14:32:31 2005
+@@ -911,7 +911,7 @@
+ =09
+ strcpy (numbuf, oldexpand (title, gpage, page, file));
+ if (Needfls)
+- fls (file, numbuf, answer);
++ ffl (file, numbuf, answer);
+ else
+ strcpy (answer, numbuf);
+ return (answer);
diff -ruN unixstat.orig/files/patch-filter.c =
unixstat/files/patch-filter.c
--- unixstat.orig/files/patch-filter.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-filter.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,22 @@
+--- src/filter.c.orig Thu Apr 21 14:32:23 2005
++++ src/filter.c Thu Apr 21 14:32:31 2005
+@@ -109,7 +109,8 @@
+ if (curarg =3D=3D argc)
+ {
+ if (isatty (fileno (stdin)))
+- fprintf (stderr,"\007%s: Reading input from
keyboard:\n", argv[0]);
++ fprintf (stderr,"%s: Reading input from
keyboard:\n", argv[0]);
++ /*fprintf (stderr,"\007%s: Reading input from
keyboard:\n", argv[0]);*/
+ status +=3D ((*process) ("-", stdin));
+ }
+ else
+@@ -141,7 +142,8 @@
+ if (isstdin (file))
+ {
+ if (isatty (fileno (stdin)))
+- fprintf (stderr,"\007%s:
Reading input from keyboard:\n", argv[0]);
++ fprintf (stderr,"%s: Reading
input from keyboard:\n", argv[0]);
++ /*fprintf (stderr,"\007%s:
Reading input from keyboard:\n", argv[0]);*/
+ status +=3D ((*process) (file, stdin)
!=3D 0);
+ }
+ else
diff -ruN unixstat.orig/files/patch-fisher.c =
unixstat/files/patch-fisher.c
--- unixstat.orig/files/patch-fisher.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-fisher.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,52 @@
+--- src/fisher.c.orig Thu Apr 21 14:32:23 2005
++++ src/fisher.c Thu Apr 21 14:32:31 2005
+@@ -14,11 +14,11 @@
+=20
+ #ifndef BADPROB
+ #define BADPROB (-1.0)
+-#endif BADPROB
++#endif
+=20
+ #ifdef DEBUG
+ extern int Debug;
+-#endif DEBUG
++#endif
+ /*
+ Compute probability of 2x2 contingency table:
+ A B
+@@ -51,7 +51,7 @@
+ printf ("One tailed probability =3D %g\n", fisher2x2 (A, B, C, D));
+ }
+=20
+-#endif FISHER2X2
++#endif
+=20
+ =0C/*FUNCTION fisher2x2: compute cumulative probability of a 2x2
table */
+ /*
+@@ -88,7 +88,7 @@
+ #ifdef DEBUG
+ if (Debug)
+ printf ("mincount =3D %d\n", mincount);
+-#endif DEBUG
++#endif
+=20
+ /* sum every probability for min cell freq mincount..0 */
+ while (mincount-- >=3D 0)
+@@ -96,7 +96,7 @@
+ #ifdef DEBUG
+ if (Debug)
+ printf ("%g\n", compute (A, B, C, D, N));
+-#endif DEBUG
++#endif
+ p +=3D compute (A, B, C, D, N);
+=20
+ /* adjust to new mincount, maintaining constant marginals */
+@@ -188,7 +188,7 @@
+ printf ("delta =3D %d\n", delta);
+ printf ("%d %d %d %d\n", A-delta,
B+delta, C+delta, D-delta);
+ }
+-#endif DEBUG
++#endif
+ p2 =3D fisher2x2 (A - delta, B + delta, C + delta, D - delta);
+ if (p2 >=3D 0.0)
+ {
diff -ruN unixstat.orig/files/patch-fls.c unixstat/files/patch-fls.c
--- unixstat.orig/files/patch-fls.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-fls.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,52 @@
+--- src/fls.c.orig Thu Apr 21 14:32:23 2005
++++ src/fls.c Thu Apr 21 14:32:31 2005
+@@ -33,7 +33,7 @@
+ #define UNSET (-1)
+ typedef struct stat STAT;
+=20
+-Status fls (); /* format file listing */
++Status ffl (char*,char*,char*); /* format file listing */
+ static char *ugname (); /* user/group name */
+ static void rwxmode (); /* get rwx mode */
+ static void printhelp (); /* print a menu of the allowed formats */
+@@ -54,8 +54,8 @@
+ exit (FAILURE);
+ }
+=20
+- /* check format string by sending NULL file to fls */
+- if (fls ((char *) NULL, format, buf) =3D=3D FAILURE)
++ /* check format string by sending NULL file to ffl */
++ if (ffl ((char *) NULL, format, buf) =3D=3D FAILURE)
+ {
+ fprintf (stderr, "%s: Bad format string '%s'\n", argv[0],
format);
+ exit (FAILURE);
+@@ -63,7 +63,7 @@
+=20
+ for (i =3D 2; i < argc; i++)
+ {
+- if (fls (argv[i], format, buf) =3D=3D SUCCESS)
++ if (ffl (argv[i], format, buf) =3D=3D SUCCESS)
+ puts (buf);
+ else
+ {
+@@ -183,7 +183,7 @@
+ statstdin (statptr)
+ struct stat *statptr;
+ {
+- long clock, time ();
++ time_t clock, time ();
+ clock =3D time (0);
+ statptr->st_atime =3D clock;
+ statptr->st_mtime =3D clock;
+@@ -198,9 +198,9 @@
+ statptr->st_size =3D 0;
+ }
+=20
+-=0C/*FUNCTION fls: formated listing of file */
++=0C/*FUNCTION ffl: formated listing of file */
+ Status
+-fls (file, format, bptr) /* put formatted file listing in buffer */
++ffl (file, format, bptr) /* put formatted file listing in buffer */
+ char *file; /* name of the file to print */
+ char *format; /* print format control string, like printf */
+ char *bptr; /* pointer to buffer in which to print stats */
diff -ruN unixstat.orig/files/patch-fpack.c unixstat/files/patch-fpack.c
--- unixstat.orig/files/patch-fpack.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-fpack.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,21 @@
+--- src/fpack.c.orig Thu Apr 21 14:32:23 2005
++++ src/fpack.c Thu Apr 21 14:32:31 2005
+@@ -161,8 +161,17 @@
+ int maglen =3D strlen (MAGIC);
+ char *ptr;
+=20
+- while (gets (line))
++line[0] =3D 0;
++ while (fgets(line,MAXCHARS,stdin))
+ {
++/* TEK20050420: gets is deprecated, so replace
++ * with gets above and then write the following little
++ * schlemiel-the-painter-ish-feeling piece to scan for and
++ * change to a null terminator the first newline.
++ */
++{=20
++ char *s =3D line; while (*s) { if (*s=3D=3D'\n') { *s=3D0; break; } =
s++; }
++}
+ if (!strncmp (MAGIC, line, maglen))
+ {
+ if (ioptr)
diff -ruN unixstat.orig/files/patch-makefile =
unixstat/files/patch-makefile
--- unixstat.orig/files/patch-makefile Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-makefile Thu Apr 21 14:59:22 2005
@@ -0,0 +1,32 @@
+--- src/makefile.orig Thu Apr 21 14:32:23 2005
++++ src/makefile Thu Apr 21 14:59:15 2005
+@@ -13,15 +13,14 @@
+ # you may need to compile with the -bsd option added to CFLAGS
+ =
#########################################################################=
#
+=20
+-DESTDIR=3D../bin# destination directory
+-DESTDIR=3D../../bin# destination directory
++DESTDIR=3D../bin# destination directory
+ CFLAGS =3D-O# C Compiler Options
+-LINK =3D$(CC) $(CFLAGS) -o $(DESTDIR)/$@# Generic link command
++LINK =3D$(CC) $(CFLAGS) -o $@# Generic link command
+ LIBS =3D-lm# libraries needed =
(math)
+ EDITOR =3D/usr/ucb/vi# editor to call on make =
edit
+ RM =3D/bin/rm -f# remove forcefully
+ MV =3D/bin/mv# move/rename files
+-MAKE =3D/bin/make# use for recursive =
makes
++#MAKE =3D/usr/bin/make# use for recursive =
makes
+=20
+ MAINS =3D abut.c anova.c calc.y colex.c contab.c desc.c dm.y dprime.c =
\
+ dsort.c features.c ff.c fpack.c linex.c maketrix.c oneway.c \
+@@ -46,7 +45,9 @@
+ @/bin/echo "Making all the |STAT Programs"
+ @/bin/echo "Using compiler=3D$(CC) with options=3D$(CFLAGS)"
+ @/bin/echo "Installing in directory=3D$(DESTDIR)"
+- @$(MAKE) -i $(PROGS)
++ @$(MAKE) $(PROGS)
++ @mkdir -p $(DESTDIR)
++ @cp $(PROGS) $(DESTDIR)
+=20
+ edit:
+ @$(EDITOR) $(MAINS)
diff -ruN unixstat.orig/files/patch-mdmat.c unixstat/files/patch-mdmat.c
--- unixstat.orig/files/patch-mdmat.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-mdmat.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,78 @@
+--- src/mdmat.c.orig Thu Apr 21 14:32:23 2005
++++ src/mdmat.c Thu Apr 21 14:32:31 2005
+@@ -213,13 +213,13 @@
+ #ifdef R_DATA /* input must be numerical */
+ if (!number (column[Nfactors]))
+ ERRNUM (column[Nfactors],data value)
+-#endif R_DATA
++#endif
+ #ifdef I_DATA /* input must be a frequency count */
+ for (ptr =3D column[Nfactors]; isdigit (*ptr); ptr++)
+ continue;
+ if (*ptr) /* non digit -> not a frequency count */
+ ERRMSG1 (datum (%s) is not a frequency count,
column[Nfactors])
+-#endif I_DATA
++#endif
+ }
+ =09
+ if (Nfactors =3D=3D 0)
+@@ -280,7 +280,7 @@
+ #ifdef R_DATA /* allocate space for replications */
+ if ((Nreplics =3D (short *) calloc (ncells, sizeof (*Nreplics))) =
=3D=3D
NULL)
+ ERRSPACE (data)
+-#endif R_DATA
++#endif
+=20
+ if ((datafile =3D fopen (tmpname, "r")) =3D=3D NULL)
+ ERROPEN ("temporary file");
+@@ -298,7 +298,7 @@
+ address =3D mdaddr (level);
+ #ifdef R_DATA
+ Nreplics[address]++;
+-#endif R_DATA
++#endif
+ Datax[address] +=3D CONV (column[Nfactors]);
+ }
+=20
+@@ -306,7 +306,7 @@
+ for (address =3D 0; address < ncells; address++)
+ if (Nreplics[address] > 1)
+ Datax[address] /=3D Nreplics[address];
+-#endif R_DATA
++#endif
+=20
+ (void) fclose (datafile);
+=20
+@@ -366,12 +366,12 @@
+ #ifdef R_DATA /* only include cells with data in them */
+ if (Nreplics[address])
+ {
+-#endif R_DATA
++#endif
+ sum +=3D Datax[address];
+ count++;
+ #ifdef R_DATA
+ }
+-#endif R_DATA
++#endif
+ }
+=20
+ if (count)
+@@ -387,7 +387,7 @@
+ }
+ }
+ }
+-#endif TRACE
++#endif
+=20
+ =0C/*FUNCTION printlevels: print the levels of the factors */
+ #ifdef TRACE
+@@ -413,7 +413,7 @@
+ factor =3D=3D Nfactors-1 ? '\n' : '\t');
+ }
+ }
+-#endif TRACE
++#endif
+=20
+ =0C/*FUNCTION setsize: return the number of sources (bits) in a set */
+ int
diff -ruN unixstat.orig/files/patch-mdmat.h unixstat/files/patch-mdmat.h
--- unixstat.orig/files/patch-mdmat.h Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-mdmat.h Thu Apr 21 14:59:22 2005
@@ -0,0 +1,34 @@
+--- src/mdmat.h.orig Thu Apr 21 14:32:23 2005
++++ src/mdmat.h Thu Apr 21 14:32:31 2005
+@@ -19,7 +19,7 @@
+ #endif
+ #ifndef MAXLEV
+ #define MAXLEV 500 /* maximum number of levels of a
factor */
+-#endif MAXLEV
++#endif
+ extern Posint Maxlev;
+=20
+ #ifdef R_DATA
+@@ -27,14 +27,14 @@
+ #define DATUM float
+ #define FORMAT "%g"
+ #define CONV atof
+-#endif R_DATA
++#endif
+=20
+ #ifdef I_DATA
+ #define ZERO 0
+ #define DATUM unsigned short
+ #define FORMAT "%d"
+ #define CONV atoi
+-#endif I_DATA
++#endif
+=20
+ extern Posint Nfactors; /* total number of factors */
+ extern char **Factname; /* names of factors */
+@@ -53,4 +53,4 @@
+ Posint mdaddr (); /* compute address in md array */
+ Posint printsource (); /* print the factor names of a
source */
+=20
+-#endif MDMAT_H
++#endif
diff -ruN unixstat.orig/files/patch-pair.c unixstat/files/patch-pair.c
--- unixstat.orig/files/patch-pair.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-pair.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,11 @@
+--- src/pair.c.orig Thu Apr 21 14:32:23 2005
++++ src/pair.c Thu Apr 21 14:32:31 2005
+@@ -386,7 +386,7 @@
+ printf ("minx %20.10f\n", minx);
+ printf ("xval %20.10f\n", xval);
+ printf ("maxx %20.10f\n", maxx);
+-#endif DEBUG
++#endif
+ }
+ else
+ {
diff -ruN unixstat.orig/files/patch-perm.c unixstat/files/patch-perm.c
--- unixstat.orig/files/patch-perm.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-perm.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,18 @@
+--- src/perm.c.orig Thu Apr 21 14:32:23 2005
++++ src/perm.c Thu Apr 21 14:32:31 2005
+@@ -19,11 +19,11 @@
+ Boole InfoLimits; /* print program limits */
+ Boole InfoOptions; /* print usage information */
+=20
+-int jpossible Cdecl ((char **array, int n, int * choice, int i));
+-int jgetunused Cdecl ((char **array, int n, int i));
+-int jchoose Cdecl ((char **array, int n, int *choice, int i));
++static int jpossible Cdecl ((char **array, int n, int * choice, int
i));
++static int jgetunused Cdecl ((char **array, int n, int i));
++static int jchoose Cdecl ((char **array, int n, int *choice, int
i));
+ Status jstrpermut Cdecl ((char **array, int n));
+-void jprint Cdecl ((char *name, char **array, int n));
++static void jprint Cdecl ((char *name, char **array, int n));
+ void strpermut Cdecl ((char **array, int size));
+ int initial Cdecl ((int argc, char **argv));
+ void usinfo Cdecl ((void));
diff -ruN unixstat.orig/files/patch-primes.c =
unixstat/files/patch-primes.c
--- unixstat.orig/files/patch-primes.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-primes.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,26 @@
+--- src/primes.c.orig Thu Apr 21 14:32:23 2005
++++ src/primes.c Thu Apr 21 14:32:31 2005
+@@ -81,7 +81,7 @@
+ #ifdef GENDIV
+ gendiv ("small", small, n);
+ gendiv ("large", small, n);
+-#endif GENDIV
++#endif
+ }
+=20
+ =0C
+@@ -109,7 +109,7 @@
+ pnum(exp(log(d)));
+ }
+ }
+-#endif CHECK_ROUNDING_ERRORS
++#endif
+=20
+ #ifdef GENDIV
+=20
+@@ -128,4 +128,4 @@
+ printf ("%3d\n\t};\n", array[n]);
+ }
+=20
+-#endif GENDIV
++#endif
diff -ruN unixstat.orig/files/patch-probdist.c
unixstat/files/patch-probdist.c
--- unixstat.orig/files/patch-probdist.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-probdist.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,22 @@
+--- src/probdist.c.orig Thu Apr 21 14:32:23 2005
++++ src/probdist.c Thu Apr 21 14:32:31 2005
+@@ -245,8 +245,18 @@
+ else
+ {
+ checkstdin ();
+- while (gets (line))
++line[0] =3D 0;
++ while (fgets(line, BUFSIZ, stdin))
+ {
++/* TEK20050420: gets is deprecated, so replace
++ * with gets above and then write the following little
++ * schlemiel-the-painter-ish-feeling piece to scan for and
++ * change to a null terminator the first newline.
++ */
++{=20
++ char *s =3D line; while (*s) { if (*s=3D=3D'\n') { *s=3D0; break; } =
s++; }
++}
++
+ linecount++;
+ if (ncols =3D parselin (line, array, MAXFIELDS))
+ {
diff -ruN unixstat.orig/files/patch-prodlist.c
unixstat/files/patch-prodlist.c
--- unixstat.orig/files/patch-prodlist.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-prodlist.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,34 @@
+--- src/prodlist.c.orig Thu Apr 21 14:32:23 2005
++++ src/prodlist.c Thu Apr 21 14:32:31 2005
+@@ -20,14 +20,14 @@
+=20
+ #ifdef TRACE
+ #include <stdio.h>
+-#endif TRACE
++#endif
+=20
+ #include "prodlist.h" /* inclusion must follow others */
+ static void primefactor ();
+=20
+ #ifndef NULL
+ #define NULL 0
+-#endif NULL
++#endif
+=20
+ #ifdef TRACE
+ #define trace(X) printf X ; getchar ()
+@@ -225,7 +225,7 @@
+ }
+ printf ("(%d)\n", count);
+ }
+-#endif TRACE
++#endif
+=20
+ =0C
+ #ifdef STANDALONE
+@@ -275,4 +275,4 @@
+ }
+ }
+=20
+-#endif STANDALONE
++#endif
diff -ruN unixstat.orig/files/patch-prodlist.h
unixstat/files/patch-prodlist.h
--- unixstat.orig/files/patch-prodlist.h Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-prodlist.h Thu Apr 21 14:59:22 2005
@@ -0,0 +1,8 @@
+--- src/prodlist.h.orig Thu Apr 21 14:32:23 2005
++++ src/prodlist.h Thu Apr 21 14:32:31 2005
+@@ -53,4 +53,4 @@
+ void dofactor ();
+ #endif
+=20
+-#endif PRODLIST_H
++#endif
diff -ruN unixstat.orig/files/patch-rankind.c =
unixstat/files/patch-rankind.c
--- unixstat.orig/files/patch-rankind.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-rankind.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,11 @@
+--- src/rankind.c.orig Thu Apr 21 14:32:23 2005
++++ src/rankind.c Thu Apr 21 14:32:31 2005
+@@ -352,7 +352,7 @@
+ U =3D sumrank[0] - Count[0] * (Count[0]+1.0) / 2.0;
+ tprint ("U (not corrected for ties)", U);
+ }
+-#endif NEVER
++#endif
+ H =3D 0.0;
+ for (cond =3D 0; cond < Nconds; cond++)
+ H +=3D sumrank[cond] * sumrank[cond] / Count[cond];
diff -ruN unixstat.orig/files/patch-rankrel.c =
unixstat/files/patch-rankrel.c
--- unixstat.orig/files/patch-rankrel.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-rankrel.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,21 @@
+--- src/rankrel.c.orig Thu Apr 21 14:32:23 2005
++++ src/rankrel.c Thu Apr 21 14:32:31 2005
+@@ -180,8 +180,17 @@
+ int cond;
+ Boole dropcase;
+ =09
+- while (gets (line))
++line[0] =3D 0;
++ while (fgets(line, MAXCHARS, stdin))
+ {
++/* TEK20050420: gets is deprecated, so replace
++ * with gets above and then write the following little
++ * schlemiel-the-painter-ish-feeling piece to scan for and
++ * change to a null terminator the first newline.
++ */
++{=20
++ char *s =3D line; while (*s) { if (*s=3D=3D'\n') { *s=3D0; break; } =
s++; }
++}
+ ncols =3D parselin (line, sarray, MAXCOND);
+ if (ncols =3D=3D 0)
+ continue;
diff -ruN unixstat.orig/files/patch-ranksort.c
unixstat/files/patch-ranksort.c
--- unixstat.orig/files/patch-ranksort.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-ranksort.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,27 @@
+--- src/ranksort.c.orig Thu Apr 21 14:32:23 2005
++++ src/ranksort.c Thu Apr 21 14:32:31 2005
+@@ -185,8 +185,17 @@
+ float **matrix =3D NULL;
+ int n;
+=20
+- while (gets (line))
++line[0] =3D 0;
++ while (fgets(line, MAXCHARS, stdin))
+ {
++/* TEK20050420: gets is deprecated, so replace
++ * with gets above and then write the following little
++ * schlemiel-the-painter-ish-feeling piece to scan for and
++ * change to a null terminator the first newline.
++ */
++{=20
++ char *s =3D line; while (*s) { if (*s=3D=3D'\n') { *s=3D0; break; } =
s++; }
++}
+ if (n =3D parselin (line, array, MAXVAR))
+ {
+ if (Nvars =3D=3D 0)
+@@ -277,4 +286,4 @@
+ exit (0);
+ }
+=20
+-#endif RANKSORT
++#endif
diff -ruN unixstat.orig/files/patch-readmatrix.c
unixstat/files/patch-readmatrix.c
--- unixstat.orig/files/patch-readmatrix.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-readmatrix.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,8 @@
+--- src/readmatrix.c.orig Thu Apr 21 14:32:23 2005
++++ src/readmatrix.c Thu Apr 21 14:32:31 2005
+@@ -123,4 +123,4 @@
+ }
+ }
+ }
+-#endif READMATRIX
++#endif
diff -ruN unixstat.orig/files/patch-regress.c =
unixstat/files/patch-regress.c
--- unixstat.orig/files/patch-regress.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-regress.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,21 @@
+--- src/regress.c.orig Thu Apr 21 14:32:23 2005
++++ src/regress.c Thu Apr 21 14:32:31 2005
+@@ -120,8 +120,17 @@
+ double maxx[MAXVAR]; /* maximum value of each variable */
+ register int row, col;
+=20
+- while (gets (line))
++line[0] =3D 0;
++ while (fgets(line, MAXCHARS, stdin))
+ {
++/* TEK20050420: gets is deprecated, so replace
++ * with gets above and then write the following little
++ * schlemiel-the-painter-ish-feeling piece to scan for and
++ * change to a null terminator the first newline.
++ */
++{=20
++ char *s =3D line; while (*s) { if (*s=3D=3D'\n') { *s=3D0; break; } =
s++; }
++}
+ if ((ncols =3D parselin (line, in, MAXVAR)) =3D=3D 0)
+ continue;
+ if (ncols > MAXVAR)
diff -ruN unixstat.orig/files/patch-reverse.c =
unixstat/files/patch-reverse.c
--- unixstat.orig/files/patch-reverse.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-reverse.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,25 @@
+--- src/reverse.c.orig Thu Apr 21 14:32:23 2005
++++ src/reverse.c Thu Apr 21 14:32:31 2005
+@@ -106,8 +106,21 @@
+ println (Lines[--nlines]);
+ }
+ else /* no line reversal */
+- while (gets (line))
++{
++line[0] =3D 0;
++ while (fgets(line, MAXCHARS, stdin))
++ {
++/* TEK20050420: gets is deprecated, so replace
++ * with gets above and then write the following little
++ * schlemiel-the-painter-ish-feeling piece to scan for and
++ * change to a null terminator the first newline.
++ */
++{=20
++ char *s =3D line; while (*s) { if (*s=3D=3D'\n') { *s=3D0; break; } =
s++; }
++}
+ println (line);
++ }
++}
+=20
+ exit (SUCCESS);
+ }
diff -ruN unixstat.orig/files/patch-skipnumber.c
unixstat/files/patch-skipnumber.c
--- unixstat.orig/files/patch-skipnumber.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-skipnumber.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,8 @@
+--- src/skipnumber.c.orig Thu Apr 21 14:32:23 2005
++++ src/skipnumber.c Thu Apr 21 14:32:31 2005
+@@ -83,4 +83,4 @@
+ }
+ }
+=20
+-#endif SKIPNUMBER
++#endif
diff -ruN unixstat.orig/files/patch-specol.c =
unixstat/files/patch-specol.c
--- unixstat.orig/files/patch-specol.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-specol.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,8 @@
+--- src/specol.c.orig Thu Apr 21 14:32:23 2005
++++ src/specol.c Thu Apr 21 14:32:31 2005
+@@ -137,4 +137,4 @@
+ }
+ }
+=20
+-#endif SPECOL
++#endif
diff -ruN unixstat.orig/files/patch-stat.h unixstat/files/patch-stat.h
--- unixstat.orig/files/patch-stat.h Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-stat.h Thu Apr 21 14:59:22 2005
@@ -0,0 +1,43 @@
+--- src/stat.h.orig Thu Apr 21 14:32:23 2005
++++ src/stat.h Thu Apr 21 14:32:31 2005
+@@ -91,8 +91,8 @@
+ extern char *Argv0;\
+ static char sccsfid[] =3D "@(#) name.c ver (|stat) date";
+=20
+-#endif /* ANSI STDC or UNIX */
+-#endif /* lint */
++#endif
++#endif
+=20
+ =0C/******************************* FUNCTIONS =
*****************************/
+ #ifdef __MSDOS__
+@@ -110,18 +110,20 @@
+ #define chiprint(chi,dfval,prob) \
+ printf ("\tchisq %12.6f df %3d p %9.6f\n", chi, dfval,
prob)
+=20
+-#define bellmsg() putc ('\007', stderr); /*PORTABILITY*/
++#define bellmsg()
++/*#define bellmsg() putc ('\007', stderr);*/ /*PORTABILITY*/
+ #ifdef macintosh
+ #include <IOCtl.h>
+ #define isatty(x) (!ioctl(x, FIOINTERACTIVE, NULL))
+ #endif
+ #define checkstdin() \
+- (isatty (fileno (stdin)) && fprintf (stderr,"\007%s: Reading input
from terminal:\n", Argv0))
++ (isatty (fileno (stdin)) && fprintf (stderr,"%s: Reading input from
terminal:\n", Argv0))
++ /*(isatty (fileno (stdin)) && fprintf (stderr,"\007%s: Reading input
from terminal:\n", Argv0))*/
+=20
+ #ifndef max
+ # define min(a,b) ((a) < (b) ? (a) : (b))
+ # define max(a,b) ((a) > (b) ? (a) : (b))
+-#endif max
++#endif
+=20
+ =0C/******************************* STDC MESSAGES
*****************************/
+ #ifdef __STDC__
+@@ -185,4 +187,4 @@
+ #define ropt(flag,arg,desc,val) popt(flag,arg,desc,%g,val)
+ #define const(val,desc) printf ("%10d %s\n", val, desc)
+=20
+-#endif STAT_H
++#endif
diff -ruN unixstat.orig/files/patch-tmpfile.c =
unixstat/files/patch-tmpfile.c
--- unixstat.orig/files/patch-tmpfile.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-tmpfile.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,13 @@
+--- src/tmpfile.c.orig Thu Apr 21 14:32:23 2005
++++ src/tmpfile.c Thu Apr 21 14:32:31 2005
+@@ -57,8 +57,8 @@
+ char newfile[100];
+ while (--argc)
+ {
+- if (tmpfile (*++argv, newfile))
+- putchar ('\007');
++ if (tmpfile (*++argv, newfile)) putchar ('?');
++ /*putchar ('\007');*/
+ puts (newfile);
+ }
+ }
diff -ruN unixstat.orig/files/patch-transpose.c
unixstat/files/patch-transpose.c
--- unixstat.orig/files/patch-transpose.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-transpose.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,22 @@
+--- src/transpose.c.orig Thu Apr 21 14:32:23 2005
++++ src/transpose.c Thu Apr 21 14:32:31 2005
+@@ -63,8 +63,18 @@
+=20
+ initial (argc, argv);
+ checkstdin ();
+- while (gets (line))
++
++line[0] =3D 0;
++ while (fgets(line, MAXCHARS, stdin))
+ {
++/* TEK20050420: gets is deprecated, so replace
++ * with gets above and then write the following little
++ * schlemiel-the-painter-ish-feeling piece to scan for and
++ * change to a null terminator the first newline.
++ */
++{=20
++ char *s =3D line; while (*s) { if (*s=3D=3D'\n') { *s=3D0; break; } =
s++; }
++}
+ ncols =3D parselin (line, array, MAXCOLS);
+ if (ncols =3D=3D 0)
+ continue;
diff -ruN unixstat.orig/files/patch-validata.c
unixstat/files/patch-validata.c
--- unixstat.orig/files/patch-validata.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-validata.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,21 @@
+--- src/validata.c.orig Thu Apr 21 14:32:23 2005
++++ src/validata.c Thu Apr 21 14:32:31 2005
+@@ -62,8 +62,17 @@
+ double value;
+ char *s;
+ =09
+- while (gets (line))
++line[0] =3D 0;
++ while (fgets(line, MAXCHARS, stdin))
+ {
++/* TEK20050420: gets is deprecated, so replace
++ * with gets above and then write the following little
++ * schlemiel-the-painter-ish-feeling piece to scan for and
++ * change to a null terminator the first newline.
++ */
++{=20
++ char *s =3D line; while (*s) { if (*s=3D=3D'\n') { *s=3D0; break; } =
s++; }
++}
+ Linecount++;
+ ncols =3D parselin (line, col, MAXCOLS);
+ if (ncols > MAXCOLS)
diff -ruN unixstat.orig/files/patch-z.c unixstat/files/patch-z.c
--- unixstat.orig/files/patch-z.c Wed Dec 31 18:00:00 1969
+++ unixstat/files/patch-z.c Thu Apr 21 14:59:22 2005
@@ -0,0 +1,11 @@
+--- src/z.c.orig Thu Apr 21 14:32:23 2005
++++ src/z.c Thu Apr 21 14:32:31 2005
+@@ -30,7 +30,7 @@
+ z, poz (z), poz (-z), critz (poz (z)));
+ }
+ }
+-#endif ZTEST
++#endif
+=20
+ =0C/*FUNCTION poz: probability of normal z value */
+ /*ALGORITHM
diff -ruN unixstat.orig/pkg-plist unixstat/pkg-plist
--- unixstat.orig/pkg-plist Thu Apr 21 11:41:47 2005
+++ unixstat/pkg-plist Thu Apr 21 15:11:09 2005
@@ -1,5 +1,6 @@
bin/abut
bin/anova
+bin/calc
bin/colex
bin/contab
bin/desc
@@ -26,7 +27,6 @@
bin/transpose
bin/ts
bin/validata
-%%PORTDOCS%%share/doc/unixstat
%%PORTDOCS%%share/doc/unixstat/!Cover.nr
%%PORTDOCS%%share/doc/unixstat/!Cover.ps
%%PORTDOCS%%share/doc/unixstat/!Cover.txt
More information about the freebsd-ports-bugs
mailing list