Ease 3.0 to Ease 3.1 patch
Bruce Barnett
barnett at grymoire.crd.ge.com
Tue Feb 26 15:04:58 AEST 1991
This is the official "Patch1" for Ease 3.0 which will upgrade the
release to Ease 3.1
It fixes some portability problems.
Use by typing:
patch -p <Patch1
diff -c -r ../3.0/Makefile ./Makefile
*** ../3.0/Makefile Mon Feb 25 17:17:25 1991
--- ./Makefile Mon Feb 25 17:33:50 1991
***************
*** 1,3 ****
--- 1,13 ----
+ # $Header: /home/kreskin/u0/barnett/Src/Ease/ease/RCS/Makefile,v 1.2 1991/02/25 22:07:29 barnett Exp $
+ #
+ # $Log: Makefile,v $
+ # Revision 1.2 1991/02/25 22:07:29 barnett
+ # Added RCS header, amd specified value for MAKE variable
+ #
+ # Revision 1.1 1991/02/25 14:37:28 barnett
+ # Initial revision - release to net
+ #
+ #
# where do you want to place the binaries and scripts?
# the programs are: et cfc cfdiff cfstrip
BINDIR=`pwd`/bin
***************
*** 8,14 ****
#ORIGINAL=/usr/lib/sendmail.main.cf
#ORIGINAL=/usr/lib/sendmail.subsidiary.cf
! # What arguments to cfc do you want for cfc (see the file CONVERT)
CONVERT_FLAGS=-s -CV
#what extenstion do you want for the manual pages?
--- 18,24 ----
#ORIGINAL=/usr/lib/sendmail.main.cf
#ORIGINAL=/usr/lib/sendmail.subsidiary.cf
! # What arguments to cfc do you want for cfc (see the file CONVERTING)
CONVERT_FLAGS=-s -CV
#what extenstion do you want for the manual pages?
***************
*** 16,22 ****
#EXT=l
EXT=n
SHELL=/bin/sh
!
all:
cd cfc; ${MAKE} ${FLAGS} $@
--- 26,32 ----
#EXT=l
EXT=n
SHELL=/bin/sh
! MAKE=make
all:
cd cfc; ${MAKE} ${FLAGS} $@
diff -c -r ../3.0/src/Makefile ./src/Makefile
*** ../3.0/src/Makefile Mon Feb 25 17:18:23 1991
--- ./src/Makefile Mon Feb 25 17:35:59 1991
***************
*** 1,8 ****
# Makefile for Ease Translator (et).
#
! # $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/Makefile,v 2.1 1990/01/30 13:54:13 jeff Exp barnett $
#
# $Log: Makefile,v $
# Revision 2.1 1990/01/30 13:54:13 jeff
# Updated for release 2.1 Aplha.
#
--- 1,11 ----
# Makefile for Ease Translator (et).
#
! # $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/Makefile,v 3.1 1991/02/25 22:09:52 barnett Exp $
#
# $Log: Makefile,v $
+ # Revision 3.1 1991/02/25 22:09:52 barnett
+ # Fixed some portability problems
+ #
# Revision 2.1 1990/01/30 13:54:13 jeff
# Updated for release 2.1 Aplha.
#
***************
*** 26,41 ****
OWNER = root
GROUP = staff
MODE = 755
#INSTALL = install -c -m ${MODE} -o ${OWNER} -g ${GROUP}
INSTALL=cp
! # define this for grammar debugging
#DEFS =-DYYDEBUG
! DEFS =
! # I had strange errors happen when I use SunOS Optimizer.....
! # In particular, with SunOS 4.0.3, Sparc, and -O (-O2)....
! # Maybe you better not use -O with SunOS
! CFLAGS = -g ${DEFS} ${INCLUDE}
! #CFLAGS = -O ${DEFS} ${INCLUDE}
LP = lpr
LPFLAGS = -J"Ease Source"
--- 29,50 ----
OWNER = root
GROUP = staff
MODE = 755
+ # Some systems don't have a working version of install
#INSTALL = install -c -m ${MODE} -o ${OWNER} -g ${GROUP}
INSTALL=cp
!
! # Special Debug flags
! # select this one to debug the grammar
#DEFS =-DYYDEBUG
! # The following are used with the SunOS malloc() debug package.
! #DEFS = -DMALLOC_DEBUG # Part of the SunOS malloc package
! #LIBS = /usr/lib/debug/malloc.o -ll
! #CFLAGS = -g ${DEFS} ${INCLUDE}
! #
! # Normally, You will want the selections below
! DEFS =
! LIBS = -ll
! CFLAGS = -O ${DEFS} ${INCLUDE}
LP = lpr
LPFLAGS = -J"Ease Source"
***************
*** 51,57 ****
all: et
et: ${OBJ}
! cc ${CFLAGS} -o et ${OBJ} -ll
clean: FRC
rm -f et *.o lexan.c parser.c y.output yacc.acts yacc.tmp \
--- 60,66 ----
all: et
et: ${OBJ}
! cc ${CFLAGS} -o et ${OBJ} ${LIBS}
clean: FRC
rm -f et *.o lexan.c parser.c y.output yacc.acts yacc.tmp \
diff -c -r ../3.0/src/fixstrings.h ./src/fixstrings.h
*** ../3.0/src/fixstrings.h Mon Feb 25 17:17:52 1991
--- ./src/fixstrings.h Mon Feb 25 17:35:01 1991
***************
*** 1,15 ****
/*
! * $Revision: 2.1 $
! * Check-in $Date: 90/01/30 14:28:33 $
* $State: Exp $
*
! * $Author: jeff $
*
! * $Log: /isis/usr2/share/src/local/tc/ease/src/RCS/fixstrings.h,v $
! * Version 2.1 90/01/30 14:28:33 jeff
* Bring RCS version number in line with netwide version 2.1. No code
* changes.
! *
* Revision 2.0 88/06/15 14:41:57 root
* Baseline release for net posting. ADR.
*/
--- 1,18 ----
/*
! * $Revision: 3.1 $
! * Check-in $Date: 1991/02/25 22:09:52 $
* $State: Exp $
*
! * $Author: barnett $
*
! * $Log: fixstrings.h,v $
! * Revision 3.1 1991/02/25 22:09:52 barnett
! * Fixed some portability problems
! *
! * Revision 2.1 1990/01/30 14:28:33 jeff
* Bring RCS version number in line with netwide version 2.1. No code
* changes.
! *
* Revision 2.0 88/06/15 14:41:57 root
* Baseline release for net posting. ADR.
*/
***************
*** 26,28 ****
--- 29,35 ----
#define strlen Xstrlen
#define index Xindex
#define rindex Xrindex
+
+ extern char *Xstrcpy();
+ extern char *Xindex();
+ extern char *Xstrcat();
diff -c -r ../3.0/src/idman.c ./src/idman.c
*** ../3.0/src/idman.c Mon Feb 25 17:18:32 1991
--- ./src/idman.c Mon Feb 25 17:36:09 1991
***************
*** 1,6 ****
#ifdef FLUKE
# ifndef LINT
! static char RCSid[] = "@(#)FLUKE $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/idman.c,v 3.0 1991/02/22 18:50:27 barnett Exp $";
# endif LINT
#endif FLUKE
--- 1,6 ----
#ifdef FLUKE
# ifndef LINT
! static char RCSid[] = "@(#)FLUKE $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/idman.c,v 3.1 1991/02/25 22:09:52 barnett Exp $";
# endif LINT
#endif FLUKE
***************
*** 18,23 ****
--- 18,26 ----
* All rights reserved.
*
* $Log: idman.c,v $
+ * Revision 3.1 1991/02/25 22:09:52 barnett
+ * Fixed some portability problems
+ *
* Revision 3.0 1991/02/22 18:50:27 barnett
* Added support for HP/UX and IDA sendmail.
*
***************
*** 38,43 ****
--- 41,47 ----
ErrorReport (),
PrintWarning (),
PrintError ();
+ extern char * malloc ();
char IDused[] = " "; /* 26 blanks */
diff -c -r ../3.0/src/lexan.l ./src/lexan.l
*** ../3.0/src/lexan.l Mon Feb 25 17:18:47 1991
--- ./src/lexan.l Mon Feb 25 17:36:31 1991
***************
*** 2,8 ****
#ifdef FLUKE
# ifndef LINT
! static char RCSid[] = "@(#)FLUKE $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/lexan.l,v 3.0 1991/02/22 18:50:27 barnett Exp $";
# endif LINT
#endif FLUKE
--- 2,8 ----
#ifdef FLUKE
# ifndef LINT
! static char RCSid[] = "@(#)FLUKE $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/lexan.l,v 3.1 1991/02/25 22:09:52 barnett Exp $";
# endif LINT
#endif FLUKE
***************
*** 23,28 ****
--- 23,31 ----
* All rights reserved.
*
* $Log: lexan.l,v $
+ * Revision 3.1 1991/02/25 22:09:52 barnett
+ * Fixed some portability problems
+ *
* Revision 3.0 1991/02/22 18:50:27 barnett
* Added support for HP/UX and IDA sendmail.
*
***************
*** 54,59 ****
--- 57,64 ----
extern struct he *LookupSymbol ();
extern void ErrorReport ();
extern void yymark();
+ extern void PrintError();
+ extern char * malloc ();
int Lcount; /* line counter */
char FNbuf[MaxFN]; /* file name buffer */
***************
*** 68,74 ****
#undef input
# define input() (((yytchar=yychar=yysptr>yysbuf?U(*--yysptr):Getc(yyin,yyout))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
! char
Getc (yyin, yyout)
FILE *yyin, *yyout;
{
--- 73,79 ----
#undef input
# define input() (((yytchar=yychar=yysptr>yysbuf?U(*--yysptr):Getc(yyin,yyout))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
! int
Getc (yyin, yyout)
FILE *yyin, *yyout;
{
***************
*** 88,94 ****
if (c == '\n') {
pc = linbuf;
if (fgets(linbuf, BUFSIZ, yyin) == NULL)
! *pc = EOF;
else
/* echo input as comment (except cpp comments) */
if (EchoInputAsComments) {
--- 93,99 ----
if (c == '\n') {
pc = linbuf;
if (fgets(linbuf, BUFSIZ, yyin) == NULL)
! *pc = (char) EOF;
else
/* echo input as comment (except cpp comments) */
if (EchoInputAsComments) {
***************
*** 96,102 ****
(linbuf[0] == '#' ? "" : "# "), linbuf);
}
}
! return c;
}
/*
--- 101,107 ----
(linbuf[0] == '#' ? "" : "# "), linbuf);
}
}
! return (c == (char) EOF) ? EOF : c;
}
/*
diff -c -r ../3.0/src/main.c ./src/main.c
*** ../3.0/src/main.c Mon Feb 25 17:18:37 1991
--- ./src/main.c Mon Feb 25 17:36:15 1991
***************
*** 1,6 ****
#ifdef FLUKE
# ifndef LINT
! static char RCSid[] = "@(#)FLUKE $Header: /isis/usr2/share/src/local/tc/ease/src/RCS/main.c,v 2.2 90/05/07 11:14:02 jeff Exp $";
# endif LINT
#endif FLUKE
--- 1,6 ----
#ifdef FLUKE
# ifndef LINT
! static char RCSid[] = "@(#)FLUKE $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/main.c,v 3.1 1991/02/25 22:09:52 barnett Exp $";
# endif LINT
#endif FLUKE
***************
*** 16,26 ****
*
* All rights reserved.
*
! * $Log: /isis/usr2/share/src/local/tc/ease/src/RCS/main.c,v $
! * Version 2.2 90/05/07 11:14:02 jeff
* Add support for the "-q" flag which controls whether input lines
* are passed through as comments in the output stream.
! *
* Version 2.1 90/01/30 15:37:16 jeff
* Filter input file through cpp before processing it.
*
--- 16,29 ----
*
* All rights reserved.
*
! * $Log: main.c,v $
! * Revision 3.1 1991/02/25 22:09:52 barnett
! * Fixed some portability problems
! *
! * Revision 2.2 1990/05/07 11:14:02 jeff
* Add support for the "-q" flag which controls whether input lines
* are passed through as comments in the output stream.
! *
* Version 2.1 90/01/30 15:37:16 jeff
* Filter input file through cpp before processing it.
*
***************
*** 45,50 ****
--- 48,57 ----
#include "fixstrings.h"
#include <stdio.h>
#include <ctype.h>
+ #ifdef MALLOC_DEBUG
+ extern int malloc_debug();
+ extern int malloc_verify();
+ #endif /* MALLOC_DEBUG */
extern FILE *DIAGf; /* diagnostic file */
char *infile = 0; /* input file name */
***************
*** 83,88 ****
--- 90,98 ----
int argc; /* argument count for "et" */
char *argv[]; /* argument vector for "et" */
{
+ #ifdef MALLOC_DEBUG
+ malloc_debug(1);
+ #endif MALLOC_DEBUG
InitError (); /* initialize error conditions */
InitSymbolTable (); /* initialize the symbol table */
PreLoad (); /* preload special identifiers */
***************
*** 131,137 ****
register int margc; /* argument count */
register char **margv; /* argument vector */
{
- register char **argp;
int cppflags = 0;
int otherflags = 0;
int arg;
--- 141,146 ----
***************
*** 184,189 ****
--- 193,200 ----
printf ("## TO THIS FILE WILL DISAPPEAR THE ##\n");
printf ("## NEXT TIME THAT EASE IS RUN. ##\n");
printf ("## ##\n");
+ printf ("## $Revision: 3.1 $ ##\n");
+ printf ("## ##\n");
printf ("###################################################\n");
}
***************
*** 209,215 ****
i+=strlen(*argp) + 1;
if ( ! (cmd = (char *) calloc(i + sizeof CPP, sizeof(char))))
return -1; /* no room */
! (void *) strcpy(cmd,CPP);
for (argp = argv; *++argp; )
if (**argp == '-' &&
index(CPPARGS, (*argp)[1]))
--- 220,226 ----
i+=strlen(*argp) + 1;
if ( ! (cmd = (char *) calloc(i + sizeof CPP, sizeof(char))))
return -1; /* no room */
! (void ) strcpy(cmd,CPP);
for (argp = argv; *++argp; )
if (**argp == '-' &&
index(CPPARGS, (*argp)[1]))
diff -c -r ../3.0/src/parser.y ./src/parser.y
*** ../3.0/src/parser.y Mon Feb 25 17:18:52 1991
--- ./src/parser.y Mon Feb 25 17:36:35 1991
***************
*** 1,7 ****
%{
#ifdef FLUKE
# ifndef LINT
! static char RCSid[] = "@(#)FLUKE $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/parser.y,v 3.0 1991/02/22 18:50:27 barnett Exp $";
# endif LINT
#endif FLUKE
--- 1,7 ----
%{
#ifdef FLUKE
# ifndef LINT
! static char RCSid[] = "@(#)FLUKE $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/parser.y,v 3.1 1991/02/25 22:09:52 barnett Exp $";
# endif LINT
#endif FLUKE
***************
*** 22,27 ****
--- 22,30 ----
* All rights reserved.
*
* $Log: parser.y,v $
+ * Revision 3.1 1991/02/25 22:09:52 barnett
+ * Fixed some portability problems
+ *
* Revision 3.0 1991/02/22 18:50:27 barnett
* Added support for HP/UX and IDA sendmail.
*
***************
*** 58,64 ****
extern void AssignType ();
extern void RemoveSymbol ();
extern void yyerror ();
-
extern short RMatch; /* ruleset match flag */
char *Cbuf = " "; /* character buffer */
--- 61,66 ----
***************
*** 71,76 ****
--- 73,90 ----
extern int yychar;
extern int yydebug;
+ static void
+ Free( ptr )
+ char *ptr;
+ {
+ if (ptr == (char *)0) {
+ /* fprintf(stderr,"Freeing a null pointer\n"); */
+ } else {
+ if (free(ptr) < 0 ) {
+ fprintf(stderr,"Free() returned an error\n");
+ }
+ }
+ };
static char *
yydisplay(ch)
register int ch;
***************
*** 243,249 ****
}
| strval SCONST {
$$ = ListAppend ($1, $2, (char *) NULL);
! free ($1);
}
;
--- 257,263 ----
}
| strval SCONST {
$$ = ListAppend ($1, $2, (char *) NULL);
! Free ($1);
}
;
***************
*** 250,262 ****
/* conval specifies what can be in a concat() function */
conval : strval COMMA ifcon {
$$ = ListAppend ($1, $3, (char *) NULL);
! free ($1);
! free ($3);
}
| ifcon COMMA strval {
$$ = ListAppend ($1, $3, (char *) NULL);
! free ($1);
! free ($3);
}
| ifcon {
$$ = $1;
--- 264,276 ----
/* conval specifies what can be in a concat() function */
conval : strval COMMA ifcon {
$$ = ListAppend ($1, $3, (char *) NULL);
! Free ($1);
! Free ($3);
}
| ifcon COMMA strval {
$$ = ListAppend ($1, $3, (char *) NULL);
! Free ($1);
! Free ($3);
}
| ifcon {
$$ = $1;
***************
*** 274,281 ****
ifres : mval elseres {
if ($2 != NULL) {
$$ = ListAppend ($1, $2, "$|");
! free ($1);
! free ($2);
} else
$$ = $1;
}
--- 288,295 ----
ifres : mval elseres {
if ($2 != NULL) {
$$ = ListAppend ($1, $2, "$|");
! Free ($1);
! Free ($2);
} else
$$ = $1;
}
***************
*** 335,347 ****
}
| namelist COMMA IDENT {
$$ = ListAppend ($1, $3->psb, " ");
! free ($1);
RemoveSymbol ($3);
}
| namelist COMMA strval {
$$ = ListAppend ($1, $3, " ");
! free ($1);
! free ($3);
}
;
--- 349,361 ----
}
| namelist COMMA IDENT {
$$ = ListAppend ($1, $3->psb, " ");
! Free ($1);
RemoveSymbol ($3);
}
| namelist COMMA strval {
$$ = ListAppend ($1, $3, " ");
! Free ($1);
! Free ($3);
}
;
***************
*** 518,524 ****
| tlist LBRACE IDENT idlist RBRACE SEMI {
EmitDef (def_trusted, (struct he *) NULL,
ListAppend ($3->psb, $4, " "), (char *) NULL);
! free ($4);
RemoveSymbol ($3);
}
| tlist LBRACE RBRACE SEMI
--- 532,538 ----
| tlist LBRACE IDENT idlist RBRACE SEMI {
EmitDef (def_trusted, (struct he *) NULL,
ListAppend ($3->psb, $4, " "), (char *) NULL);
! Free ($4); /* Gets a Null pointer */
RemoveSymbol ($3);
}
| tlist LBRACE RBRACE SEMI
***************
*** 557,563 ****
}
| mflags COMMA flagid {
$$ = ListAppend ($1, ConvFlg($3), (char *) NULL);
! free ($1);
}
;
--- 571,577 ----
}
| mflags COMMA flagid {
$$ = ListAppend ($1, ConvFlg($3), (char *) NULL);
! Free ($1);
}
;
***************
*** 667,674 ****
dlist : LPAREN strval COMMA catstringlist RPAREN {
$$ = ListAppend ($2, MacScan ($4), " ");
! free ($2);
! free ($4);
}
| LPAREN error RPAREN {
$$ = NULL;
--- 681,688 ----
dlist : LPAREN strval COMMA catstringlist RPAREN {
$$ = ListAppend ($2, MacScan ($4), " ");
! Free ($2);
! Free ($4);
}
| LPAREN error RPAREN {
$$ = NULL;
***************
*** 680,686 ****
}
| catstring COMMA catstringlist {
$$ = ListAppend( $1, $3, (char *) NULL);
! free($1);
}
catstring : SCONST {
$$ = $1;
--- 694,700 ----
}
| catstring COMMA catstringlist {
$$ = ListAppend( $1, $3, (char *) NULL);
! Free($1);
}
catstring : SCONST {
$$ = $1;
***************
*** 710,723 ****
}
| mdefs COMMA mtdef {
$$ = ListAppend ($1, $3, ", ");
! free ($1);
! free ($3);
}
;
mtdef : mvar ASGN mval {
$$ = ListAppend (ConvMat ($1), MacScan ($3), "=");
! free ($3);
}
| MFLAGS ASGN LBRACE mflags RBRACE {
$$ = ListAppend (ConvMat (mat_flags), $4, "=");
--- 724,737 ----
}
| mdefs COMMA mtdef {
$$ = ListAppend ($1, $3, ", ");
! Free ($1);
! Free ($3);
}
;
mtdef : mvar ASGN mval {
$$ = ListAppend (ConvMat ($1), MacScan ($3), "=");
! Free ($3);
}
| MFLAGS ASGN LBRACE mflags RBRACE {
$$ = ListAppend (ConvMat (mat_flags), $4, "=");
***************
*** 730,737 ****
Tsb = ListAppend (ConvMat(mat_sender), CheckRS ($3), "="),
Tsb1 = ListAppend ("/", CheckRS ($5), (char *) NULL),
(char *) NULL);
! free (Tsb);
! free (Tsb1);
}
| MRECIPIENT ASGN IDENT {
$$ = ListAppend (ConvMat (mat_recipient), CheckRS ($3), "=");
--- 744,751 ----
Tsb = ListAppend (ConvMat(mat_sender), CheckRS ($3), "="),
Tsb1 = ListAppend ("/", CheckRS ($5), (char *) NULL),
(char *) NULL);
! Free (Tsb);
! Free (Tsb1);
}
| MRECIPIENT ASGN IDENT {
$$ = ListAppend (ConvMat (mat_recipient), CheckRS ($3), "=");
***************
*** 741,748 ****
Tsb = ListAppend (ConvMat(mat_recipient), CheckRS ($3), "="),
Tsb1 = ListAppend ("/", CheckRS ($5), (char *) NULL),
(char *) NULL);
! free (Tsb);
! free (Tsb1);
}
| error {
$$ = NULL;
--- 755,762 ----
Tsb = ListAppend (ConvMat(mat_recipient), CheckRS ($3), "="),
Tsb1 = ListAppend ("/", CheckRS ($5), (char *) NULL),
(char *) NULL);
! Free (Tsb);
! Free (Tsb1);
}
| error {
$$ = NULL;
***************
*** 781,788 ****
| ruledefs IF LPAREN matchaddr RPAREN actionstmt {
EmitDef (def_ruleset, (struct he *) NULL,
ListAppend ($4, $6, "\t"), (char *) NULL);
! free ($4);
! free ($6);
}
| ruledefs ASM LPAREN SCONST RPAREN SEMI {
printf("%s\n",$4);
--- 795,802 ----
| ruledefs IF LPAREN matchaddr RPAREN actionstmt {
EmitDef (def_ruleset, (struct he *) NULL,
ListAppend ($4, $6, "\t"), (char *) NULL);
! Free ($4);
! Free ($6);
}
| ruledefs ASM LPAREN SCONST RPAREN SEMI {
printf("%s\n",$4);
***************
*** 797,803 ****
}
| matchaddr matchtok {
$$ = ListAppend ($1, $2, (char *) NULL);
! free ($1);
}
| error {
$$ = NULL;
--- 811,817 ----
}
| matchaddr matchtok {
$$ = ListAppend ($1, $2, (char *) NULL);
! Free ($1); /* NULL */
}
| error {
$$ = NULL;
***************
*** 820,826 ****
}
| YPALIAS LPAREN matchtok RPAREN {
$$ = ListAppend("${",$3,(char *) NULL);
! /* free ($3); */
}
| YPPASSWD LPAREN matchtok RPAREN {
$$ = ListAppend("$\"",$3,(char *) NULL);
--- 834,840 ----
}
| YPALIAS LPAREN matchtok RPAREN {
$$ = ListAppend("${",$3,(char *) NULL);
! /* Free ($3); */
}
| YPPASSWD LPAREN matchtok RPAREN {
$$ = ListAppend("$\"",$3,(char *) NULL);
***************
*** 832,838 ****
actionstmt : action LPAREN rwaddr RPAREN SEMI {
$$ = ListAppend ($1, $3, (char *) NULL);
! free ($3);
}
| RESOLVE LPAREN resolution RPAREN SEMI {
$$ = $3;
--- 846,852 ----
actionstmt : action LPAREN rwaddr RPAREN SEMI {
$$ = ListAppend ($1, $3, (char *) NULL);
! Free ($3);
}
| RESOLVE LPAREN resolution RPAREN SEMI {
$$ = $3;
***************
*** 859,871 ****
}
| rwaddr rwtok {
$$ = ListAppend ($1, $2, (char *) NULL);
! free ($1);
}
| rwaddr IDENT LPAREN rwaddr RPAREN {
$$ = ListAppend ($1, (Tsb = MakeRSCall ($2, $4)), (char *) NULL);
! free ($1);
! free ($4);
! free (Tsb);
}
| error {
$$ = NULL;
--- 873,885 ----
}
| rwaddr rwtok {
$$ = ListAppend ($1, $2, (char *) NULL);
! Free ($1); /* NULL */
}
| rwaddr IDENT LPAREN rwaddr RPAREN {
$$ = ListAppend ($1, (Tsb = MakeRSCall ($2, $4)), (char *) NULL);
! Free ($1); /* NULL */
! Free ($4);
! Free (Tsb);
}
| error {
$$ = NULL;
***************
*** 892,901 ****
(char *)NULL),
Tsb1 = ListAppend("$:", $6, "$)" ),
(char *) NULL);
! free (Tsb);
! free (Tsb1);
! free ($3);
! free ($6);
}
| reftok {
$$ = $1;
--- 906,915 ----
(char *)NULL),
Tsb1 = ListAppend("$:", $6, "$)" ),
(char *) NULL);
! Free (Tsb);
! Free (Tsb1);
! Free ($3);
! Free ($6);
}
| reftok {
$$ = $1;
***************
*** 908,916 ****
$$ = ListAppend(Tsb = ListAppend ("${", (char *)Cbuf, (char *)NULL),
Tsb1 = ListAppend ($5, "$}", (char *) NULL),
(char *) NULL);
! free (Tsb);
! free (Tsb1);
! free ($5);
}
| PROGRAM LPAREN IDENT COMMA rwaddr RPAREN {
--- 922,930 ----
$$ = ListAppend(Tsb = ListAppend ("${", (char *)Cbuf, (char *)NULL),
Tsb1 = ListAppend ($5, "$}", (char *) NULL),
(char *) NULL);
! Free (Tsb);
! Free (Tsb1);
! Free ($5);
}
| PROGRAM LPAREN IDENT COMMA rwaddr RPAREN {
***************
*** 918,931 ****
$$ = ListAppend(Tsb = ListAppend ("$<", (char *)Cbuf, (char *)NULL),
Tsb1 = ListAppend ($5, "", (char *) NULL),
(char *) NULL);
! free (Tsb);
! free (Tsb1);
! free ($5);
}
| action LPAREN rwaddr RPAREN {
$$ = ListAppend ($1, $3, (char *) NULL);
! free ($3);
}
;
--- 932,945 ----
$$ = ListAppend(Tsb = ListAppend ("$<", (char *)Cbuf, (char *)NULL),
Tsb1 = ListAppend ($5, "", (char *) NULL),
(char *) NULL);
! Free (Tsb);
! Free (Tsb1);
! Free ($5);
}
| action LPAREN rwaddr RPAREN {
$$ = ListAppend ($1, $3, (char *) NULL);
! Free ($3);
}
;
***************
*** 932,938 ****
cantok : CANON LPAREN canval RPAREN {
$$ = Bracket ($3, TRUE);
! free ($3);
}
;
--- 946,952 ----
cantok : CANON LPAREN canval RPAREN {
$$ = Bracket ($3, TRUE);
! Free ($3);
}
;
***************
*** 941,948 ****
}
| canval canvaltok {
$$ = ListAppend ($1, $2, (char *) NULL);
! free ($1);
! free ($2);
}
;
--- 955,962 ----
}
| canval canvaltok {
$$ = ListAppend ($1, $2, (char *) NULL);
! Free ($1);
! /* Free ($2); */
}
;
***************
*** 952,958 ****
}
| SCONST {
$$ = ListAppend (MacScan ($1), (char *) NULL, (char *) NULL);
! free ($1);
}
| NEXT LPAREN RPAREN { /* I Used next earlier, but now use default - because it is clearer syntax */
$$ = "$:";
--- 966,972 ----
}
| SCONST {
$$ = ListAppend (MacScan ($1), (char *) NULL, (char *) NULL);
! Free ($1);
}
| NEXT LPAREN RPAREN { /* I Used next earlier, but now use default - because it is clearer syntax */
$$ = "$:";
***************
*** 975,981 ****
}
| HOSTNUM LPAREN reftok RPAREN {
$$ = Bracket ($3, FALSE);
! free ($3);
}
;
--- 989,995 ----
}
| HOSTNUM LPAREN reftok RPAREN {
$$ = Bracket ($3, FALSE);
! Free ($3);
}
;
***************
*** 1023,1030 ****
resolution : mailerspec COMMA route {
$$ = ListAppend ($1, $3, (char *) NULL);
! free ($1);
! free ($3);
}
| mailerspec {
$$ = $1;
--- 1037,1044 ----
resolution : mailerspec COMMA route {
$$ = ListAppend ($1, $3, (char *) NULL);
! Free ($1);
! Free ($3);
}
| mailerspec {
$$ = $1;
***************
*** 1042,1051 ****
route : HOST LPAREN hword RPAREN COMMA userspec {
$$ = ListAppend (Tsb = ListAppend ("$@", $3, (char *) NULL),
$6, (char *) NULL);
! free (Tsb);
! free ($6);
}
| userspec {
$$ = $1;
--- 1056,1065 ----
route : HOST LPAREN hword RPAREN COMMA userspec {
$$ = ListAppend (Tsb = ListAppend ("$@", $3, (char *) NULL),
$6, (char *) NULL);
! Free (Tsb);
! Free ($6);
}
| userspec {
$$ = $1;
***************
*** 1057,1063 ****
}
| HOSTNUM LPAREN reftok RPAREN {
$$ = Bracket ($3, FALSE);
! free ($3);
}
;
--- 1071,1077 ----
}
| HOSTNUM LPAREN reftok RPAREN {
$$ = Bracket ($3, FALSE);
! Free ($3);
}
;
***************
*** 1067,1083 ****
| hostid IDENT {
$$ = ListAppend ($1, $2->psb, (char *) NULL);
RemoveSymbol ($2);
! free ($1);
}
| hostid rwtok {
$$ = ListAppend ($1, $2, (char *) NULL);
! free ($1);
}
;
userspec : USER LPAREN rwaddr RPAREN {
$$ = ListAppend ("$:", $3, (char *) NULL);
! free ($3);
}
;
--- 1081,1097 ----
| hostid IDENT {
$$ = ListAppend ($1, $2->psb, (char *) NULL);
RemoveSymbol ($2);
! Free ($1);
}
| hostid rwtok {
$$ = ListAppend ($1, $2, (char *) NULL);
! Free ($1); /* NULL */
}
;
userspec : USER LPAREN rwaddr RPAREN {
$$ = ListAppend ("$:", $3, (char *) NULL);
! Free ($3);
}
;
***************
*** 1092,1098 ****
fdefs : /* empty */
| fdefs IDENT idlist COLON ftype SEMI {
AssignType (ListAppend ($2->psb, $3, " "), $5);
! free ($3);
}
| error SEMI {
yyerrok;
--- 1106,1112 ----
fdefs : /* empty */
| fdefs IDENT idlist COLON ftype SEMI {
AssignType (ListAppend ($2->psb, $3, " "), $5);
! Free ($3); /* NULL */
}
| error SEMI {
yyerrok;
***************
*** 1104,1110 ****
}
| idlist COMMA IDENT {
$$ = ListAppend ($1, $3->psb, " ");
! free ($1);
}
;
--- 1118,1124 ----
}
| idlist COMMA IDENT {
$$ = ListAppend ($1, $3->psb, " ");
! Free ($1);
}
;
diff -c -r ../3.0/src/strops.c ./src/strops.c
*** ../3.0/src/strops.c Mon Feb 25 17:18:49 1991
--- ./src/strops.c Mon Feb 25 17:36:32 1991
***************
*** 1,6 ****
#ifdef FLUKE
# ifndef LINT
! static char RCSid[] = "@(#)FLUKE $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/strops.c,v 3.0 1991/02/22 18:50:27 barnett Exp $";
# endif LINT
#endif FLUKE
--- 1,6 ----
#ifdef FLUKE
# ifndef LINT
! static char RCSid[] = "@(#)FLUKE $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/strops.c,v 3.1 1991/02/25 22:09:52 barnett Exp $";
# endif LINT
#endif FLUKE
***************
*** 18,23 ****
--- 18,26 ----
* All rights reserved.
*
* $Log: strops.c,v $
+ * Revision 3.1 1991/02/25 22:09:52 barnett
+ * Fixed some portability problems
+ *
* Revision 3.0 1991/02/22 18:50:27 barnett
* Added support for HP/UX and IDA sendmail.
*
***************
*** 42,47 ****
--- 45,51 ----
extern void FatalError (),
PrintError (),
ErrorReport ();
+ extern char * malloc ();
short Rformat = FALSE; /* class read format flag */
static char *Ptok = "$ "; /* positional token structure */
***************
*** 55,68 ****
*
* Add the three new $%x, $%y, and $!x match operators that Sun introduced
* with release 3.0.
- *
- * BUG (probably) - Sun has assigned a predefined meaning to the $y macro;
- * I imagine we will need to teach ease to avoid this letter.
*/
! static char *Hfield = "$%y"; /* match in /etc/hosts */
static char *Mfield = "$% "; /* match in specified YP map */
static char *Nfield = "$! "; /* no match in specified YP map */
-
static char *Mtest = "$? "; /* conditional macro test string */
--- 59,68 ----
*
* Add the three new $%x, $%y, and $!x match operators that Sun introduced
* with release 3.0.
*/
!
static char *Mfield = "$% "; /* match in specified YP map */
static char *Nfield = "$! "; /* no match in specified YP map */
static char *Mtest = "$? "; /* conditional macro test string */
***************
*** 208,215 ****
register char *searchptr; /* string search pointer */
register char *bptr, *eptr; /* macro begin and end pointers */
char macname [MAXNAME]; /* macro name buffer */
! char s[11]; /* temp storage for warning below */
! int quote; /* flag for detecting a quote() function */
if ((searchptr = pstring) == NULL)
return ((char *) NULL);
--- 208,214 ----
register char *searchptr; /* string search pointer */
register char *bptr, *eptr; /* macro begin and end pointers */
char macname [MAXNAME]; /* macro name buffer */
! int quote = 0; /* flag for detecting a quote() function */
if ((searchptr = pstring) == NULL)
return ((char *) NULL);
***************
*** 230,236 ****
quote=0;
*searchptr++='!'; /* insert a quote */
/* insert the macro letter */
! *searchptr++ = MakeMac (LookupSymbol (macname), ID_MACRO);
/* now looking at quote( */
/* must skip over everything until )}, and then rewrite
the rest of the macro */
--- 229,236 ----
quote=0;
*searchptr++='!'; /* insert a quote */
/* insert the macro letter */
! *searchptr++ = MakeMac (LookupSymbol (macname),
! (unsigned) ID_MACRO);
/* now looking at quote( */
/* must skip over everything until )}, and then rewrite
the rest of the macro */
***************
*** 244,250 ****
*bptr++ = *eptr;
while (*eptr++ != '\0');
} else {
! *searchptr++ = MakeMac (LookupSymbol (macname), ID_MACRO);
bptr = eptr = searchptr;
while (*eptr++ != '}') /* delete until end of {name} */
/* empty */ ;
--- 244,251 ----
*bptr++ = *eptr;
while (*eptr++ != '\0');
} else {
! *searchptr++ = MakeMac (LookupSymbol (macname),
! (unsigned) ID_MACRO);
bptr = eptr = searchptr;
while (*eptr++ != '}') /* delete until end of {name} */
/* empty */ ;
***************
*** 259,265 ****
PrintError ("Invalid macro format: %s", searchptr + 1);
return ((char *) NULL);
}
! *searchptr++ = MakeMac (LookupSymbol (macname), ID_MACRO);
bptr = eptr = searchptr;
while (isupper(*eptr)) /* delete old macro chars */
eptr++;
--- 260,267 ----
PrintError ("Invalid macro format: %s", searchptr + 1);
return ((char *) NULL);
}
! *searchptr++ = MakeMac (LookupSymbol (macname),
! (unsigned) ID_MACRO);
bptr = eptr = searchptr;
while (isupper(*eptr)) /* delete old macro chars */
eptr++;
***************
*** 336,342 ****
{
register char *res; /* resultant conditional string */
! Mtest[2] = MakeMac (testmac, ID_MACRO); /* get one-char macro rep */
res = (char *) malloc (strlen (ifstring) + 6);
if (res == NULL)
FatalError ("System out of string space in MakeCond ()", (char *) NULL);
--- 338,344 ----
{
register char *res; /* resultant conditional string */
! Mtest[2] = MakeMac (testmac, (unsigned) ID_MACRO); /* get one-char macro rep */
res = (char *) malloc (strlen (ifstring) + 6);
if (res == NULL)
FatalError ("System out of string space in MakeCond ()", (char *) NULL);
***************
*** 474,484 ****
* a simple macro name for a YP map.
* FLUKE jps 25-apr-86
*/
! Nfield[2] = MakeMac (class, ID_MACRO);
return (Nfield);
} else {
Cfield[1] = '~';
! Cfield[2] = MakeMac (class, ID_CLASS);
return (Cfield);
}
}
--- 476,486 ----
* a simple macro name for a YP map.
* FLUKE jps 25-apr-86
*/
! Nfield[2] = MakeMac (class, (unsigned) ID_MACRO);
return (Nfield);
} else {
Cfield[1] = '~';
! Cfield[2] = MakeMac (class, (unsigned) ID_CLASS);
return (Cfield);
}
}
***************
*** 493,503 ****
* a simple macro name for a YP map.
* FLUKE jps 25-apr-86
*/
! Mfield[2] = MakeMac (class, ID_MACRO);
return (Mfield);
} else {
Cfield[1] = '=';
! Cfield[2] = MakeMac (class, ID_CLASS);
return (Cfield);
}
}
--- 495,505 ----
* a simple macro name for a YP map.
* FLUKE jps 25-apr-86
*/
! Mfield[2] = MakeMac (class, (unsigned) ID_MACRO);
return (Mfield);
} else {
Cfield[1] = '=';
! Cfield[2] = MakeMac (class, (unsigned) ID_CLASS);
return (Cfield);
}
}
--
Bruce G. Barnett barnett at crd.ge.com uunet!crdgw1!barnett
More information about the Alt.sources
mailing list