[comp.mail.sendmail] Official Ease 3.2 Update/Patch

barnett@grymoire.crd.ge.com (Bruce Barnett) (05/17/91)

This is the official patch to convert Ease 3.1 to 3.2
Ease 3.0 and Patch1 was posted to alt.sources. This is Patch/Update 2

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Patch2 cfdiff.sh cfstrip.sh
# Wrapped by barnett@grymoire on Thu May 16 13:27:35 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f Patch2 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Patch2\"
else
echo shar: Extracting \"Patch2\" \(50604 characters\)
sed "s/^X//" >Patch2 <<'END_OF_Patch2'
XThis is the official Patch 2 for Ease 3
XIt converts Ease 3.1 to Ease 3.2
X
XFixes include
X
X	Better support for System V machines
X	Better support for machines with read-only text areas
X	Better support for IDA sendmail databases
X	Bug fixes
X
X	Included is a better cfdiff and cfstrip shell scripts
X
XInstall by going to the directory containing the sources of ease
Xand typing
X	patch -p <Patch2 
X
X
Xdiff -c -r ../3.1/CONVERTING ./CONVERTING
X*** ../3.1/CONVERTING	Thu May 16 12:49:42 1991
X--- ./CONVERTING	Thu May 16 12:38:45 1991
X***************
X*** 34,40 ****
X--- 34,45 ----
X  	HP/UX
X  		=> cfc -i -CGUS
X  
X+ 	A/UX
X+ 		=> cfc -i -CUNI
X  
X+ 	CGI IRIS
X+ 		=> cfc -i -C FKSVN  
X+ 
X  Step 2.  Convert the ease file to cf: 
X  
X  	% et <sendmail.ease >sendmail.cf
X***************
X*** 49,63 ****
X  	-C XYZ flags.
X  
X  	The remaining errors are either warnings or mistakes
X! 	in the translation. NOTE: - some configuration files use macros 
X! 	that are not defined. For instance, Sun's sendmail.main.cf has 
X! 	an undefined D macro. Ultrix has several undefined macros, that if
X! 	you define them, cause your sendmail to exhibit change behavior.
X! 	These are warnings, and are perfectly fine. If you want to
X! 	you can define the missing rulesets. Don't define the missing
X! 	macros unless you examine the sendmail rules and see what happens with
X! 	the change.
X  
X  	So look at the warnings and errors, and repeat step 1 until you 
X  	feel comfortable with the change.
X  
X--- 54,112 ----
X  	-C XYZ flags.
X  
X  	The remaining errors are either warnings or mistakes
X! 	in the translation. 
X! 	Let's look at some examples:
X  
X+ 		line 1598: Warning: Ruleset not defined: RULESET_12
X+ 
X+ 	This says there is a line that has
X+ 		RULESET_12 = ruleset 12;
X+ 
X+ 	Comment it out if you wish.
X+ 
X+ 
X+ 	case 2)
X+ 
X+ 		line 1598: Warning: Macro not defined: Y
X+ 	or
X+ 		line 1598: Warning: Class not defined: Y
X+ 
X+ 	This is just a warning and is probably okay. There may be a rule that 
X+ 	does different actions if the macro is set or not. Example:
X+ 
X+ 	if ( one_or_more )	/* add local domain */
X+ 		next (concat ("$1<@",ifset (Y, "${Y}", "${m_sitename}"))>);
X+ 
X+ 	If this bothers you, rewrite to rule to not need the Y macro:
X+ 
X+ 	if ( one_or_more )	/* add local domain */
X+ 		next ("$1<@${m_sitename}"))>);
X+ 
X+ 	Do not define them, even to define them to be nothing!
X+ 	An empty string is still defined, and may break your sendmail rules.
X+ 
X+ 	case 3)
X+ 
X+ 		line 88 near ";": Warning: Appending to previously defined class T.
X+ 	This is okay. Sendmail allows you to define a class over several lines.
X+ 	combine them into one line if you wish.
X+ 
X+ 	case 4)
X+ 
X+ 	line 1485: Warning: Mailer not defined: ERROR
X+ 
X+ 	Ease treats upper and lower case letters as different.
X+ 	Sendmail does not. Change the case to be consistent
X+ 
X+ 	case 5)
X+ 
X+ 	warning: Unknown option 'M' on line 387
X+ 	
X+ 	cfc found an unusual option. It tries to convert it into
X+ 		an asm("...') string.
X+ 
X+ 
X+ 	.....
X  	So look at the warnings and errors, and repeat step 1 until you 
X  	feel comfortable with the change.
X  
X***************
X*** 77,85 ****
X  
X  	 set path = ( $cwd/bin $path );rehash;cfdiff /etc/sendmail.cf ./sendmail.cf
X  
X! 	You will see some differences in lines that have been split into
X! 	two lines, and the "Ob" option is converted into the more
X! 	verbose "Obackground" option. If there is any other difference, 
X  	please send me a bug report, and see if you can make changes to your
X  	ease input file to match the original file. You may need the asm("")
X  	command.
X--- 126,162 ----
X  
X  	 set path = ( $cwd/bin $path );rehash;cfdiff /etc/sendmail.cf ./sendmail.cf
X  
X! 	You may see some differences. Examples:
X! 
X! 	< Odbackground
X! 	---
X! 	> Odb
X! 
X! 	Okay: ease outputs the full name instead of the abbreviation
X! 
X! 	< Muucp,	P=/usr/bin/uux, F=sDFhuU, S=13, R=23, M=100000,
X! 	< 	A=uux - $h!rmail ($u)
X! 	---
X! 	> Muucp, P=/usr/bin/uux, F=sDFhuU, S=13, R=23, M=100000, A=uux - $h!rmail ($u)
X! 
X! 	Okay: this is on two lines instead of one.
X! 
X! 	< CTuucp UUCP arpa ARPA bitnet BITNET csnet CSNET mailnet MAILNET decnet DECNET rscs RSCS
X! 	---
X! 	> CTuucp UUCP arpa ARPA bitnet BITNET csnet CSNET mailnet
X! 	> CTMAILNET decnet DECNET rscs RSCS
X! 	
X! 	OKAY: this is just a different number of lines.
X! 
X! 
X! 	Differences in the spaces in the rules)
X! 	The syntax of sendmail specifies that there are tabs between the 
X! 	left hand side and the right hand side, and a tab between the right 
X! 	hand side and the comments.
X! 
X! 	Any spaces in the middle of the rules are cosmetic. Ignore differences.
X! 
X! 	If there is any other difference, 
X  	please send me a bug report, and see if you can make changes to your
X  	ease input file to match the original file. You may need the asm("")
X  	command.
Xdiff -c -r ../3.1/INTRO ./INTRO
X*** ../3.1/INTRO	Thu May 16 12:50:33 1991
X--- ./INTRO	Thu May 16 12:38:46 1991
X***************
X*** 71,88 ****
X  output:
X  
X  	Input		Output
X! 	a!b!c!d!user		<@a.UUCP>!b!c!d!user
X  	user@a.uucp		user<@a.uucp>
X  	bigvax::user		user<@bigvax.DECNET>
X! 	user%a.com@b.edu	user%a.com<@b.edu>	
X  	a!b!user@abc.edu	a!b!user<@abc.edu>
X  	@a:user@b.com		<@a>:user@b.com
X  
X  As you can see, the machine that will accept the message will be
X  different depending on the address. Ruleset 3 must find the right
X  machine, and also clean up any addresses if appropriate.
X  It does it's work by looking for a pattern, and transforming the
X! address when it matches the pattern.
X  
X  The cleaning up part can be confusing, but typically ruleset 3 calls
X  other rules to do this. One rule is used to clean up addresses before
X--- 71,91 ----
X  output:
X  
X  	Input		Output
X! 	a!b!c!d!user		<@a.UUCP>!b!c!d!user    or
X! 				b!c!d!user<@a.UUCP>
X  	user@a.uucp		user<@a.uucp>
X  	bigvax::user		user<@bigvax.DECNET>
X! 	user%a.com@b.edu	user%a.com<@b.edu> or - it you are agressive
X! 				user<@a.com>
X  	a!b!user@abc.edu	a!b!user<@abc.edu>
X  	@a:user@b.com		<@a>:user@b.com
X+ 	"Bruce" <barnett@local>	barnett<@local>
X  
X  As you can see, the machine that will accept the message will be
X  different depending on the address. Ruleset 3 must find the right
X  machine, and also clean up any addresses if appropriate.
X  It does it's work by looking for a pattern, and transforming the
X! address when it matches the pattern. 
X  
X  The cleaning up part can be confusing, but typically ruleset 3 calls
X  other rules to do this. One rule is used to clean up addresses before
Xdiff -c -r ../3.1/Makefile ./Makefile
X*** ../3.1/Makefile	Thu May 16 12:51:33 1991
X--- ./Makefile	Thu May 16 12:43:04 1991
X***************
X*** 1,6 ****
X! #	$Header: /home/kreskin/u0/barnett/Src/Ease/ease/RCS/Makefile,v 1.2 1991/02/25 22:07:29 barnett Exp $
X  #
X  #	$Log: Makefile,v $
X  # Revision 1.2  1991/02/25  22:07:29  barnett
X  # Added RCS header, amd specified value for MAKE variable
X  #
X--- 1,9 ----
X! #	$Header: /home/kreskin/u0/barnett/Src/ease/RCS/Makefile,v 3.2 1991/05/16 10:51:13 barnett Exp $
X  #
X  #	$Log: Makefile,v $
X+ # Revision 3.2  1991/05/16  10:51:13  barnett
X+ # Fixed a few typos and added the MAKE variable
X+ #
X  # Revision 1.2  1991/02/25  22:07:29  barnett
X  # Added RCS header, amd specified value for MAKE variable
X  #
X***************
X*** 19,24 ****
X--- 22,30 ----
X  #ORIGINAL=/usr/lib/sendmail.subsidiary.cf
X  
X  # What arguments to cfc do you want for cfc (see the file CONVERTING)
X+ # IDA
X+ #CONVERT_FLAGS=-i
X+ #SunOS Subsidiary
X  CONVERT_FLAGS=-s -CV
X  
X  #what extenstion do you want for the manual pages?
X***************
X*** 55,60 ****
X--- 61,68 ----
X  	cd src; ${MAKE} ${MFLAGS} $@
X  	cd cfc; ${MAKE} ${MFLAGS} $@
X  	cd utils; ${MAKE} ${MFLAGS} $@
X+ 	/bin/rm all
X+ 
X  
X  debug:	all sendmail.ease
X  	BD=${BINDIR};cd debug; ${MAKE} ${MFLAGS} BINDIR=$$BD $@
Xdiff -c -r ../3.1/README ./README
X*** ../3.1/README	Thu May 16 12:49:45 1991
X--- ./README	Thu May 16 12:38:20 1991
X***************
X*** 1,6 ****
X  README - Tue May  1 14:46:33 PDT 1990
X  
X! This is release 3.0 of the CFC and Ease programs.
X  
X  Ease is a compiler for sendmail configuration files.  It reads a high-level
X  mail configuration language and produces a sendmail.cf file.  If you've ever
X--- 1,6 ----
X  README - Tue May  1 14:46:33 PDT 1990
X  
X! This is release 3.2 of the CFC and Ease programs.
X  
X  Ease is a compiler for sendmail configuration files.  It reads a high-level
X  mail configuration language and produces a sendmail.cf file.  If you've ever
X***************
X*** 27,32 ****
X--- 27,38 ----
X      Andrew Partan of the Corporation for Open Systems,
X      Rich Salz of Bolt Beranak, and Newman.
X  
X+ Bugs/patches to Ease 3.0 have been sent in by:
X+ 	bent@lccinc.UUCP (Ben Taylor)
X+ 	"Jonathan I. Kamens" <jik@pit-manager.mit.edu>
X+ 	Matt Heffron <heffron@falstaff.css.beckman.com>
X+ 	William Roberts <liam@cs.qmw.ac.uk>
X+ 	rainer@flyer.uni-duisburg.de (Rainer Bieniek)
X  Cfc was written by Arnold D. Robbins, and has been enhanced by Bruce Barnett
X  (see below).
X  
X***************
X*** 36,46 ****
X  
X  	-----------------------------------------------------------
X  
X! 		Ease 3.0 and cfc Release Notes:
X  		Bruce Barnett barnett@crdgw1.ge.com
X! 		February 1991
X  
X! This document describes Ease 3.0. This version was originally a
X  modified version of the last official release of ease 2.1. I called it
X  2.1 Beta and sent it to several dozen people. I sent the patches to the authors
X  of ease and cfc, but an updated version was never posted to the net.
X--- 42,52 ----
X  
X  	-----------------------------------------------------------
X  
X! 		Ease 3.2 and cfc Release Notes:
X  		Bruce Barnett barnett@crdgw1.ge.com
X! 		May 1991
X  
X! This document describes Ease 3.2. This version was originally a
X  modified version of the last official release of ease 2.1. I called it
X  2.1 Beta and sent it to several dozen people. I sent the patches to the authors
X  of ease and cfc, but an updated version was never posted to the net.
X***************
X*** 48,55 ****
X  the baton now.
X  
X  Since this is a major release, I decided to call it Ease 3.0
X  
X! The main feature of Ease/Cfc 3.0:
X  
X  
X  	I subjected the Cfc/Ease programs to a test suite
X--- 54,62 ----
X  the baton now.
X  
X  Since this is a major release, I decided to call it Ease 3.0
X+ Two updates have been release since then.
X  
X! The main feature of Ease/Cfc 3.2:
X  
X  
X  	I subjected the Cfc/Ease programs to a test suite
X***************
X*** 70,80 ****
X  langauge and feel confident that you won't break anything.
X  	
X  
X! Current status of Ease 3.0
X  	It will handle 100% of the standard Ultrix, SunOS, HP, and Berkeley
X! 	versions of sendmail (I hope). It handles 99% of the IDA
X! 	enhancement package. See the TODO file for problems.
X  
X  	I don't plan to do any major work maintaining this package,
X  but I will gladly accept bug fixes and enhancements.
X  
X--- 77,89 ----
X  langauge and feel confident that you won't break anything.
X  	
X  
X! Current status of Ease 3.2
X  	It will handle 100% of the standard Ultrix, SunOS, HP, and Berkeley
X! 	versions of sendmail (I hope). It handles 99.5% of the IDA
X! 	enhancement package. It compiles of dozens of different machines.
X! 	See the TODO file for problems.
X  
X+ 
X  	I don't plan to do any major work maintaining this package,
X  but I will gladly accept bug fixes and enhancements.
X  
X***************
X*** 140,146 ****
X  	R$+@$-	$@$1@$[$2$:$2.UUCP $]
X  
X  
X- Not everything in IDA is supported. (Remember to use the asm() command!)
X  
X  ----------------
X  General Improvements to the Ease Program:
X--- 149,154 ----
X***************
X*** 171,177 ****
X  		e.g. -C ADG => added classes A, B, and G
X  
X  See the file CONVERTING on tips to convert your sendmail file into ease.
X! I have included some scritps that can compare the original sendmail
X  file to the output of ease. If the rules are identical, then you can
X  feel comfortable using ease instead of raw cf.
X  
X--- 179,185 ----
X  		e.g. -C ADG => added classes A, B, and G
X  
X  See the file CONVERTING on tips to convert your sendmail file into ease.
X! I have included some scripts that can compare the original sendmail
X  file to the output of ease. If the rules are identical, then you can
X  feel comfortable using ease instead of raw cf.
X  
X***************
X*** 199,204 ****
X--- 207,232 ----
X  Also - see the directory test. This includes a shell script to test
X  sendmail files, written by Simon Kenyon. You have two ways to debug
X  sendmail files now!
X+ 
X+ 
X+ Release Notes:
X+ 
X+ 	3.2:
X+ 	Added better support for IDA sendmail
X+ 	Added better support for unusual values in mailer flags, and options
X+ 	Better BSD/SYSV Portability (See the Makefile)
X+ 	Better support for those machines with read only text areas.
X+ 		(See compile flag DATA_RW in makefile)
X+ 	The cfstrip and cfdiff script was improved
X+ 	The documentation was improved
X+ 
X+ Release 3.1:
X+ 	Fixed bug with machines that didn't like free(0).
X+ 	Other portability problems
X+ 	Added support for MALLOC_DEBUG flag
X+ 
X+ Release 3.0:
X+ 	First release of Bruce's changes to the net in alt.sources
X  
X  ============================================================================
X  
Xdiff -c -r ../3.1/TESTING ./TESTING
X*** ../3.1/TESTING	Thu May 16 12:49:46 1991
X--- ./TESTING	Thu May 16 12:38:46 1991
X***************
X*** 27,35 ****
X  
X  where 22 is a mailer rewrite ruleset for a mailer (i.e. UUCP).
X  
X! Ruleset 0 must be avoided when testing the re-write rules for
X! mailers because ruleset 0 outputs a triple (user, host, mailer), 
X! and only one part (user) passed to the mailers.
X  
X  The makefile generates a file in tbl(1) format that 
X  lists the following:
X--- 27,40 ----
X  
X  where 22 is a mailer rewrite ruleset for a mailer (i.e. UUCP).
X  
X! Ruleset 0 must be avoided when testing the re-write rules for mailers
X! because ruleset 0 outputs a triple (user, host, mailer), and only one
X! part (user) passed to the mailers. Therefore you would typically have
X! ruleset 0 when testing resolution decisions, and omit it when testing
X! for mailer re-writes like UUCP and TCP final delivery.
X! 
X! Some newer versions of sendmail do not automatically run ruleset 3 when
X! in debugging mode. You will have to add '3,' before each rule.
X  
X  The makefile generates a file in tbl(1) format that 
X  lists the following:
Xdiff -c -r ../3.1/TODO ./TODO
X*** ../3.1/TODO	Thu May 16 12:49:47 1991
X--- ./TODO	Thu May 16 12:38:28 1991
X***************
X*** 1,23 ****
X  Things to do for Ease 3.?
X! 	Support More IDA extensions
X! 		dbm()			$(x	in RHS
X! 		Keyed databases		OKP/usr/lib/aliases
X! 		Ignore case when checking for mailer names existance
X! 			(local vs. LOCAL)
X  
X! 	Eliminate the concat() construct.
X  
X! 	check for if (exactly_one) next($2); type error.
X! 	check for matching < and > in rulesets
X! 	Check for mailers "local" and "prog" 
X  
X  CFC improvements
X  	Make it a real two-pass parser. This way, it can
X  	properly specify the rulesets, macros, and classes it
X! 	needs.
X  
X  Error Detections
X  	Eliminate syntax errors that just report "syntax error"	
X  
X  --
X  Bruce G. Barnett        <barnett@crdgw1.ge.com>  a.k.a.
X--- 1,35 ----
X  Things to do for Ease 3.?
X! -------------------------
X  
X! Keyed databases definitions (OKP/usr/lib/aliases) should not need an asm()
X  
X! Ignore case when checking for mailer names existance
X! 		(local vs. LOCAL)
X  
X+ Fix the following construct so that cfc/et handles the conversion properly:
X+ 
X+ HReceived: from $?s$s$|localhost$. by $w$?r with $r$.
X+ 	id $i; $b; sendmail $v/$V
X+ 	(from $f for $u)
X+ 
X+ Eliminate the concat() construct.
X+ 
X+ check for if (exactly_one) next($2); type error.
X+ check for matching < and > in rulesets
X+ Check for mailers "local" and "prog" 
X+ 
X  CFC improvements
X  	Make it a real two-pass parser. This way, it can
X  	properly specify the rulesets, macros, and classes it
X! 	needs. Or else write a shell script that determines which rulesets,
X! 	macros, and classes are needed.
X  
X  Error Detections
X  	Eliminate syntax errors that just report "syntax error"	
X+ 
X+ Regression Testing script:
X+ 
X+ 	rewrite it into perl for speed
X  
X  --
X  Bruce G. Barnett        <barnett@crdgw1.ge.com>  a.k.a.
Xdiff -c -r ../3.1/cfc/cfc.c ./cfc/cfc.c
X*** ../3.1/cfc/cfc.c	Thu May 16 12:50:49 1991
X--- ./cfc/cfc.c	Thu May 16 12:43:01 1991
X***************
X*** 1,9 ****
X  #ifndef lint
X! static char RCSid[] = "$Header: /home/kreskin/u0/barnett/Src/ease/cfc/RCS/cfc.c,v 3.0 1991/02/22 19:33:07 barnett Exp $";
X  #endif
X  
X  /*
X   * $Log: cfc.c,v $
X   * Revision 3.0  1991/02/22  19:33:07  barnett
X   * Many enhancements for IDA and HP sendmail.cf files
X   *
X--- 1,14 ----
X  #ifndef lint
X! static char RCSid[] = "$Header: /home/kreskin/u0/barnett/Src/ease/cfc/RCS/cfc.c,v 3.2 1991/05/16 10:49:33 barnett Exp $";
X  #endif
X  
X  /*
X   * $Log: cfc.c,v $
X+  * Revision 3.2  1991/05/16  10:49:33  barnett
X+  * Support for IDA databases
X+  * More tolerant handling of unusual conditions
X+  * more bug fixes
X+  *
X   * Revision 3.0  1991/02/22  19:33:07  barnett
X   * Many enhancements for IDA and HP sendmail.cf files
X   *
X***************
X*** 133,139 ****
X  			"warning: ignoring non-flag command line arguments\n");
X  
X  	printf ("/***********************************************************/\n");
X! 	printf ("/* This ease file generated by cfc version $Revision: 3.0 $*/\n");
X  	printf ("/* automatically from a sendmail.cf file                   */\n");
X  	printf ("/* It may need to be edited before feeding to ease.        */\n");
X  	printf ("/***********************************************************/\n");
X--- 138,144 ----
X  			"warning: ignoring non-flag command line arguments\n");
X  
X  	printf ("/***********************************************************/\n");
X! 	printf ("/* This ease file generated by cfc version $Revision: 3.2 $*/\n");
X  	printf ("/* automatically from a sendmail.cf file                   */\n");
X  	printf ("/* It may need to be edited before feeding to ease.        */\n");
X  	printf ("/***********************************************************/\n");
X***************
X*** 567,573 ****
X  		      if (diddefault) {
X  			  putchar (')');
X  			  diddefault--;
X! 		      }
X  		      break;
X  		    case '{':
X  		      printf ("ypmap (%s, ", macro (*++cp)); /* sunos */
X--- 572,579 ----
X  		      if (diddefault) {
X  			  putchar (')');
X  			  diddefault--;
X! 		      } else
X! 			canon--;
X  		      break;
X  		    case '{':
X  		      printf ("ypmap (%s, ", macro (*++cp)); /* sunos */
X***************
X*** 627,633 ****
X  			  }
X  			  open++;
X  		      } else {
X! 			  printf("\", \"");
X  		      }
X  		      break;
X  		    case ':':
X--- 633,640 ----
X  			  }
X  			  open++;
X  		      } else {
X!  			  printf(", ");
X! /*			  printf("\", \""); */
X  		      }
X  		      break;
X  		    case ':':
X***************
X*** 648,667 ****
X  		      } 
X  		      break;
X  		    case '(':
X! 		      if (*(cp+1) == '@') { /* then IDA alias lookup */
X! 			  cp++;	/* point past '@' */
X! 			  printf("alias(");
X! 			  indbm++;
X! 			  open++;
X! 		      } else { /* lookup */
X! 			  printf("dbm(");
X! 			  printf("$%s, \"",macro(*cp++));
X! 		      }
X  		      break;
X  		    case ')':
X! 		      printf("))");
X  		      open--;
X! 		      indbm--;
X  		      break;
X  		    case '&':
X  		      printf(" eval(%s) ",macro(*(++cp)));
X--- 655,676 ----
X  		      } 
X  		      break;
X  		    case '(':
X! 		      printf((*(++cp) == '@')
X! 			     ? " alias("		/* IDA alias lookup */
X! 			     : " dbm($%c, "	/* IDA database lookup */
X! 			     , *cp);
X! 		      indbm++;
X! 		      open++;
X  		      break;
X  		    case ')':
X! 		      putchar (')');
X  		      open--;
X! 		      if (diddefault) {
X! 			  putchar (')');
X! 			  diddefault--;
X! 		      }
X! 		      else
X! 		    	indbm--;
X  		      break;
X  		    case '&':
X  		      printf(" eval(%s) ",macro(*(++cp)));
X***************
X*** 1397,1410 ****
X  option ()
X  {
X  	register char *name = buffer + 1, *value = buffer + 2;
X  
X  	printf ("options\n\t");
X! 	if (*name == 'd')		/* delivery */
X! 		printf ("o_delivery = %s;\n", delivoption (*value));
X! 	else if (*name == 'e')		/* handling */
X! 		printf ("o_handling = %s;\n", handle_option (*value));
X! 	else
X  		printf ("%s = \"%s\";\n", optionname (*name), value);
X  }
X  
X  /* trusted --- define the list of trusted users */
X--- 1406,1440 ----
X  option ()
X  {
X  	register char *name = buffer + 1, *value = buffer + 2;
X+ 	char *newname;
X+ 	char *newvalue;
X  
X  	printf ("options\n\t");
X! 	if (*name == 'd') {	/* delivery */
X! 	    newvalue = delivoption (*value);
X! 	    if ( newvalue == NULL) {
X! 		printf("/* Unknown value for delivery option           */\n");
X! 		printf("/* Supplying the default value of d_background */\n");
X! 		printf ("o_delivery = d_background ;\n" );
X! 	    } else
X! 	      printf ("o_delivery = %s;\n", newvalue);
X! 	} else if (*name == 'e')	{	/* handling */
X! 	    newvalue = handle_option(*value);
X! 	    if (newvalue == NULL ) {
X! 		printf("/* Unknown value for delivery option       */\n");
X! 		printf("/* Supplying the default value of h_print  */\n");
X! 		printf ("o_handling =  h_print ;\n");
X! 	    } else
X! 	      printf ("o_handling = %s;\n", newvalue);
X! 	} else if (*name == 'K' ) {	/* IDA Keyed Database */
X! 	    printf("asm(\"OK%s\");\n", value);
X! 	} else	{
X! 	    newname = optionname(*name);
X! 	    if (newname == NULL)
X! 	      printf("asm(\"O%c%s\");\n", *name, value);
X! 	    else
X  		printf ("%s = \"%s\";\n", optionname (*name), value);
X+ 	}
X  }
X  
X  /* trusted --- define the list of trusted users */
X***************
X*** 1496,1502 ****
X  		return ("m_ufrom");
X  
X  	case 'm':	/* The Domain Name (SunOS) */
X! 		if (sunos) {
X  		    return ("m_domain");
X  		} else {
X  		    buf[0] = c;
X--- 1526,1532 ----
X  		return ("m_ufrom");
X  
X  	case 'm':	/* The Domain Name (SunOS) */
X! 		if (sunos || ida ) {
X  		    return ("m_domain");
X  		} else {
X  		    buf[0] = c;
X***************
X*** 1561,1566 ****
X--- 1591,1597 ----
X  char c;
X  {
X  	static char buf[2] = { '\0', '\0' };
X+ 	char tstring[100];
X  
X  	switch (c) {
X  	case 'f':	return ("f_ffrom");
X***************
X*** 1592,1602 ****
X  	case 'V':	return ("f_relativize"); /* IDA sendmail */
X  	default:
X  	warn:
X! 		fprintf (stderr,
X! 			"warning: non standard mailer flag '%c' on line %d\n",
X! 				c, line);
X! 		buf[0] = c;
X! 		return buf;
X  	}
X  }
X  
X--- 1623,1633 ----
X  	case 'V':	return ("f_relativize"); /* IDA sendmail */
X  	default:
X  	warn:
X! 	  fprintf (stderr,
X! 		   "warning: non standard mailer flag '%c' on line %d\n",
X! 		   c, line);
X! 	  sprintf(tstring, "/* unknown mailer flag: %c */", c);
X! 	  return tstring;
X  	}
X  }
X  
X***************
X*** 1656,1665 ****
X  	default:
X  	warn:
X  		fprintf (stderr,
X! 			"warning: non standard option '%c' on line %d\n",
X  				c, line);
X! 		buf[0] = c;
X! 		return buf;
X  	}
X  }
X  
X--- 1687,1696 ----
X  	default:
X  	warn:
X  		fprintf (stderr,
X! 			"warning: Unknown option '%c' on line %d\n",
X  				c, line);
X! /*		buf[0] = c; */
X! 		return NULL;
X  	}
X  }
X  
X***************
X*** 1677,1684 ****
X  	default:
X  		fprintf (stderr,
X  	"warning: non standard delivery option '%c' on line %d\n", c, line);
X! 		buf[0] = c;
X! 		return buf;
X  	}
X  }
X  
X--- 1708,1714 ----
X  	default:
X  		fprintf (stderr,
X  	"warning: non standard delivery option '%c' on line %d\n", c, line);
X! 		return NULL;
X  	}
X  }
X  
X***************
X*** 1695,1705 ****
X  	case 'm':	return ("h_mail");
X  	case 'w':	return ("h_write");
X  	case 'e':	return ("h_mailz");
X  	default:
X  		fprintf (stderr,
X  	"warning: non standard handling option '%c' on line %d\n", c, line);
X! 		buf[0] = c;
X! 		return buf;
X  	}
X  }
X  
X--- 1725,1738 ----
X  	case 'm':	return ("h_mail");
X  	case 'w':	return ("h_write");
X  	case 'e':	return ("h_mailz");
X+ 	case '\0': 
X+ 		fprintf (stderr,
X+ 	"warning: value not specified for option on line %d\n", line);
X+ 		return NULL;
X  	default:
X  		fprintf (stderr,
X  	"warning: non standard handling option '%c' on line %d\n", c, line);
X! 		return NULL;
X  	}
X  }
X  
Xdiff -c -r ../3.1/src/Makefile ./src/Makefile
X*** ../3.1/src/Makefile	Thu May 16 12:51:35 1991
X--- ./src/Makefile	Thu May 16 12:43:14 1991
X***************
X*** 1,8 ****
X  # Makefile for Ease Translator (et).
X  #
X! #	$Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/Makefile,v 3.1 1991/02/25 22:09:52 barnett Exp $
X  #
X  #	$Log: Makefile,v $
X  # Revision 3.1  1991/02/25  22:09:52  barnett
X  # Fixed some portability problems
X  #
X--- 1,12 ----
X  # Makefile for Ease Translator (et).
X  #
X! #	$Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/Makefile,v 3.2 1991/05/16 10:45:25 barnett Exp $
X  #
X  #	$Log: Makefile,v $
X+ # Revision 3.2  1991/05/16  10:45:25  barnett
X+ # Better support for System V machines
X+ # Support for machines with read only text segments
X+ #
X  # Revision 3.1  1991/02/25  22:09:52  barnett
X  # Fixed some portability problems
X  #
X***************
X*** 29,35 ****
X  OWNER = root
X  GROUP = staff
X  MODE = 755
X! # Some systems don't have a working version of install
X  #INSTALL = install -c -m ${MODE} -o ${OWNER} -g ${GROUP}
X  INSTALL=cp
X  
X--- 33,68 ----
X  OWNER = root
X  GROUP = staff
X  MODE = 755
X! # Important Compile flags are defined here
X! # DATA_RW - this is defined if your system allows string constants to 
X! #           be modifiable. If you have one of the following systems, I am told
X! #	    you should NOT define it: (Thanks to rainer@flyer.uni-duisburg.de)
X! #	         - A sun 3/60 using gcc
X! #		 - A esix SysV PC  with gcc
X! #                - A HP9000/845 with cc
X! #           The default is to define it, because this is what earlier versions 
X! #           of Ease did.
X! #
X! # SYSV
X! # 		If you have a system V machine, and have <string.h>
X! #		instead of <strings.h>, then define this
X! #
X! #OFLAGS=-DSYSV 
X! OFLAGS=-DDATA_RW
X!  
X! DEFS = ${OFLAGS}
X! LIBS = -ll
X! CFLAGS = -O ${DEFS} ${INCLUDE}
X! CC = cc
X! #CC = gcc
X! YACC = yacc 
X! #YACC = bison -y
X! 
X! LP = lpr
X! LPFLAGS = -J"Ease Source"
X! 
X! 
X! # System V install different from BSD install sigh...
X  #INSTALL = install -c -m ${MODE} -o ${OWNER} -g ${GROUP}
X  INSTALL=cp
X  
X***************
X*** 40,53 ****
X  #DEFS = -DMALLOC_DEBUG	#  Part of the SunOS malloc package
X  #LIBS = /usr/lib/debug/malloc.o -ll
X  #CFLAGS = -g  ${DEFS} ${INCLUDE}
X- #
X- # Normally, You will want the selections below 
X- DEFS = 
X- LIBS = -ll
X- CFLAGS = -O ${DEFS} ${INCLUDE}
X  
X- LP = lpr
X- LPFLAGS = -J"Ease Source"
X  
X  HDR = symtab.h
X  SRC = main.c emitcf.c errors.c idman.c strops.c symtab.c fixstrings.c
X--- 73,79 ----
X***************
X*** 60,66 ****
X  all: et
X  
X  et: ${OBJ}
X! 	cc ${CFLAGS} -o et ${OBJ} ${LIBS}
X  
X  clean: FRC
X  	rm -f et *.o lexan.c parser.c y.output yacc.acts yacc.tmp \
X--- 86,92 ----
X  all: et
X  
X  et: ${OBJ}
X! 	${CC} ${CFLAGS} -o et ${OBJ} ${LIBS}
X  
X  clean: FRC
X  	rm -f et *.o lexan.c parser.c y.output yacc.acts yacc.tmp \
X***************
X*** 98,104 ****
X  
X  y.tab.h parser.c: parser.y
X  	@rm -f parser.c
X! 	yacc -v -d parser.y
X  	sed 's/=yylex/=yyyylex/' < y.tab.c >parser.c
X  
X  # the following dummy rule is because of the results of 'make depend'
X--- 124,130 ----
X  
X  y.tab.h parser.c: parser.y
X  	@rm -f parser.c
X! 	${YACC} -v -d parser.y
X  	sed 's/=yylex/=yyyylex/' < y.tab.c >parser.c
X  
X  # the following dummy rule is because of the results of 'make depend'
X***************
X*** 120,144 ****
X  
X  FRC:
X  
X  # DO NOT DELETE THIS LINE -- make depend uses it
X  
X! main.o: main.c ./fixstrings.h /usr/include/stdio.h
X! emitcf.o: emitcf.c /usr/include/stdio.h ./symtab.h ./fixstrings.h
X! errors.o: errors.c /usr/include/stdio.h ./fixstrings.h
X! idman.o: idman.c /usr/include/stdio.h ./symtab.h ./fixstrings.h
X! strops.o: strops.c ./fixstrings.h /usr/include/stdio.h /usr/include/strings.h
X! strops.o: ./symtab.h
X! symtab.o: symtab.c ./fixstrings.h /usr/include/stdio.h /usr/include/ctype.h
X! symtab.o: ./symtab.h
X! fixstrings.o: fixstrings.c /usr/include/strings.h
X! parser.o: parser.c ./fixstrings.h /usr/include/stdio.h ./symtab.h
X! lexan.o: lexan.c /usr/include/stdio.h ./fixstrings.h ./symtab.h ./lexdefs.h
X! main.o: main.c ./fixstrings.h /usr/include/stdio.h
X! emitcf.o: emitcf.c /usr/include/stdio.h ./symtab.h ./fixstrings.h
X! errors.o: errors.c /usr/include/stdio.h ./fixstrings.h
X! idman.o: idman.c /usr/include/stdio.h ./symtab.h ./fixstrings.h
X! strops.o: strops.c ./fixstrings.h /usr/include/stdio.h /usr/include/strings.h
X! strops.o: ./symtab.h
X! symtab.o: symtab.c ./fixstrings.h /usr/include/stdio.h /usr/include/ctype.h
X! symtab.o: ./symtab.h
X! fixstrings.o: fixstrings.c /usr/include/strings.h
X--- 146,179 ----
X  
X  FRC:
X  
X+ 
X  # DO NOT DELETE THIS LINE -- make depend uses it
X  
X! main.o: main.c fixstrings.h 
X! emitcf.o: emitcf.c  symtab.h fixstrings.h
X! errors.o: errors.c fixstrings.h
X! idman.o: idman.c  symtab.h fixstrings.h
X! strops.o: strops.c fixstrings.h 
X! strops.o: symtab.h
X! symtab.o: symtab.c fixstrings.h 
X! symtab.o: symtab.h
X! fixstrings.o: fixstrings.c 
X! parser.o: parser.c fixstrings.h  symtab.h
X! lexan.o: lexan.c  fixstrings.h symtab.h lexdefs.h
X! main.o: main.c fixstrings.h 
X! emitcf.o: emitcf.c  symtab.h fixstrings.h
X! errors.o: errors.c fixstrings.h
X! idman.o: idman.c  symtab.h fixstrings.h
X! strops.o: strops.c fixstrings.h 
X! strops.o: symtab.h
X! symtab.o: symtab.c fixstrings.h 
X! symtab.o: symtab.h
X! fixstrings.o: fixstrings.c 
X! 
X! 
X! 
X! 
X! 
X! 
X! 
X! 
Xdiff -c -r ../3.1/src/ease.sh ./src/ease.sh
X*** ../3.1/src/ease.sh	Thu May 16 12:50:04 1991
X--- ./src/ease.sh	Thu May 16 12:43:19 1991
X***************
X*** 9,15 ****
X  #  number of your config file into the generated sendmail.cf. 
X  #
X  #  For example, if your ease input file contains the RCS version string
X! #	$Revision: 1.6 $
X  #  and the lines
X  #	define ("Received:",
X  #	    "by ${m_oname} (${VERSION})"
X--- 9,15 ----
X  #  number of your config file into the generated sendmail.cf. 
X  #
X  #  For example, if your ease input file contains the RCS version string
X! #	$Revision: 1.7 $
X  #  and the lines
X  #	define ("Received:",
X  #	    "by ${m_oname} (${VERSION})"
X***************
X*** 32,50 ****
X  #  This makes it a little easier to track down problems in networks comprising
X  #  dozens or hundreds of machines.
X  #
X! # $Source: /isis/usr2/share/src/local/tc/ease/src/RCS/ease.sh,v $
X  # $Locker:  $
X  #
X! # $Revision: 1.6 $
X! # Check-in $Date: 90/05/07 11:15:04 $
X  # $State: Exp $
X  #
X! # $Author: jeff $
X  #
X! # $Log:	/isis/usr2/share/src/local/tc/ease/src/RCS/ease.sh,v $
X! # Version 1.6  90/05/07  11:15:04  jeff
X  # Add support for the "-q" flag added to ease.
X! # 
X  # Version 1.5  90/02/22  15:51:12  jeff
X  # Improved the comments in preparation for netwide release.
X  # 
X--- 32,54 ----
X  #  This makes it a little easier to track down problems in networks comprising
X  #  dozens or hundreds of machines.
X  #
X! # $Source: /home/kreskin/u0/barnett/Src/ease/src/RCS/ease.sh,v $
X  # $Locker:  $
X  #
X! # $Revision: 1.7 $
X! # Check-in $Date: 1991/05/16 10:45:25 $
X  # $State: Exp $
X  #
X! # $Author: barnett $
X  #
X! # $Log: ease.sh,v $
X! # Revision 1.7  1991/05/16  10:45:25  barnett
X! # Better support for System V machines
X! # Support for machines with read only text segments
X! #
X! # Revision 1.6  1990/05/07  11:15:04  jeff
X  # Add support for the "-q" flag added to ease.
X! #
X  # Version 1.5  90/02/22  15:51:12  jeff
X  # Improved the comments in preparation for netwide release.
X  # 
X***************
X*** 63,71 ****
X  # Initial version
X  # 
X  #
X! # @(#)FLUKE source file: $Header: /isis/usr2/share/src/local/tc/ease/src/RCS/ease.sh,v 1.6 90/05/07 11:15:04 jeff Exp $
X  
X! PATH=/bin:/usr/bin:/usr/ucb:/usr/local export PATH
X  
X  echo    "#"
X  echo    "#   Compiled via: $0 $*"
X--- 67,76 ----
X  # Initial version
X  # 
X  #
X! # @(#)FLUKE source file: $Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/ease.sh,v 1.7 1991/05/16 10:45:25 barnett Exp $
X  
X! PATH=.:/bin:/usr/bin:/usr/ucb:/usr/local/bin
X! export PATH
X  
X  echo    "#"
X  echo    "#   Compiled via: $0 $*"
X***************
X*** 78,85 ****
X  echo	"# located in the directory named above."
X  echo    "#"
X  
X! cppflags= etflags='-q'
X  
X  for i in ${1+"$@"} ;do
X      case "$1" in
X  	'')	break;;
X--- 83,93 ----
X  echo	"# located in the directory named above."
X  echo    "#"
X  
X! cppflags=
X! etflags='-q'
X! CPP='cc -E'
X  
X+ 
X  for i in ${1+"$@"} ;do
X      case "$1" in
X  	'')	break;;
X***************
X*** 101,107 ****
X  
X  # The sed commands delete empty comment lines and those preprocessor output
X  # lines which indicate the linenumber and filename.
X! /lib/cpp -DVERSION=\"version\ $Rev\" $cppflags $file |
X      et $etflags |
X      sed -e '/^# *$/d' \
X  	-e '/^#[ 	]*[0123456789][0123456789]*[ 	]*".*"[	 ]*$/d'
X--- 109,115 ----
X  
X  # The sed commands delete empty comment lines and those preprocessor output
X  # lines which indicate the linenumber and filename.
X! $CPP -DVERSION=\"version\ $Rev\" $cppflags $file |
X      et $etflags |
X      sed -e '/^# *$/d' \
X  	-e '/^#[ 	]*[0123456789][0123456789]*[ 	]*".*"[	 ]*$/d'
Xdiff -c -r ../3.1/src/errors.c ./src/errors.c
X*** ../3.1/src/errors.c	Thu May 16 12:50:22 1991
X--- ./src/errors.c	Thu May 16 12:43:16 1991
X***************
X*** 1,6 ****
X  #ifdef FLUKE
X  # ifndef LINT
X!     static char RCSid[] = "@(#)FLUKE  $Header: /isis/usr2/share/src/local/tc/ease/src/RCS/errors.c,v 2.1 90/01/30 14:17:29 jeff Exp $";
X  # endif LINT
X  #endif FLUKE
X  
X--- 1,6 ----
X  #ifdef FLUKE
X  # ifndef LINT
X!     static char RCSid[] = "@(#)FLUKE  $Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/errors.c,v 2.2 1991/05/16 10:45:25 barnett Exp $";
X  # endif LINT
X  #endif FLUKE
X  
X***************
X*** 16,25 ****
X   *
X   *	All rights reserved.
X   *
X!  * $Log:	/isis/usr2/share/src/local/tc/ease/src/RCS/errors.c,v $
X!  * Version 2.1  90/01/30  14:17:29  jeff
X   * Bruce Barnett - extensions for SunOS/Ultrix.
X!  * 
X   * Revision 2.0  88/06/15  14:41:10  root
X   * Baseline release for net posting. ADR.
X   */
X--- 16,29 ----
X   *
X   *	All rights reserved.
X   *
X!  * $Log: errors.c,v $
X!  * Revision 2.2  1991/05/16  10:45:25  barnett
X!  * Better support for System V machines
X!  * Support for machines with read only text segments
X!  *
X!  * Revision 2.1  1990/01/30  14:17:29  jeff
X   * Bruce Barnett - extensions for SunOS/Ultrix.
X!  *
X   * Revision 2.0  88/06/15  14:41:10  root
X   * Baseline release for net posting. ADR.
X   */
X***************
X*** 83,88 ****
X--- 87,93 ----
X      }
X      if (colon)
X        fputs(": ",DIAGf);
X+     fflush(DIAGf);
X  }
X  
X  
X***************
X*** 158,163 ****
X--- 163,169 ----
X  {
X  	fprintf (DIAGf, "%s, line %d: Fatal Error In Translator: %s %s\n", 
X  		 FNbuf, Lcount, sbErr, sbArg); 
X+ 	fflush(stderr);
X  	exit (1);
X  }
X  
Xdiff -c -r ../3.1/src/fixstrings.c ./src/fixstrings.c
X*** ../3.1/src/fixstrings.c	Thu May 16 12:50:05 1991
X--- ./src/fixstrings.c	Thu May 16 12:43:17 1991
X***************
X*** 1,13 ****
X  /*
X!  * $Revision: 2.1 $
X!  * Check-in $Date: 90/01/30 14:25:14 $
X   *
X!  * $Author: jeff $
X   *
X!  * $Log:	/isis/usr2/share/src/local/tc/ease/src/RCS/fixstrings.c,v $
X!  * Version 2.1  90/01/30  14:25:14  jeff
X   * Comment changes only.
X!  * 
X   * Revision 2.0  88/06/15  14:41:19  root
X   * Baseline release for net posting. ADR.
X   * 
X--- 1,17 ----
X  /*
X!  * $Revision: 2.2 $
X!  * Check-in $Date: 1991/05/16 10:45:25 $
X   *
X!  * $Author: barnett $
X   *
X!  * $Log: fixstrings.c,v $
X!  * Revision 2.2  1991/05/16  10:45:25  barnett
X!  * Better support for System V machines
X!  * Support for machines with read only text segments
X!  *
X!  * Revision 2.1  1990/01/30  14:25:14  jeff
X   * Comment changes only.
X!  *
X   * Revision 2.0  88/06/15  14:41:19  root
X   * Baseline release for net posting. ADR.
X   * 
X***************
X*** 17,23 ****
X   */
X  #ifdef FLUKE
X  # ifndef LINT
X!     static char RCSid[] = "@(#)FLUKE  $Header: /isis/usr2/share/src/local/tc/ease/src/RCS/fixstrings.c,v 2.1 90/01/30 14:25:14 jeff Exp $";
X  # endif LINT
X  #endif FLUKE
X  
X--- 21,27 ----
X   */
X  #ifdef FLUKE
X  # ifndef LINT
X!     static char RCSid[] = "@(#)FLUKE  $Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/fixstrings.c,v 2.2 1991/05/16 10:45:25 barnett Exp $";
X  # endif LINT
X  #endif FLUKE
X  
X***************
X*** 31,37 ****
X--- 35,47 ----
X   *  pointers.  In the other C files, cpp macros are used to revector the
X   *  standard string functions to this file.
X   */
X+ #ifdef SYSV
X+ #include <string.h>
X+ #define index strchr
X+ #define rindex strrchr
X+ #else
X  #include <strings.h>
X+ #endif
X  #define fix(s) ((s) ? (s) : "")
X  
X  char *Xstrcat (s1, s2)
Xdiff -c -r ../3.1/src/fixstrings.h ./src/fixstrings.h
X*** ../3.1/src/fixstrings.h	Thu May 16 12:51:35 1991
X--- ./src/fixstrings.h	Thu May 16 12:43:17 1991
X***************
X*** 1,11 ****
X  /*
X!  * $Revision: 3.1 $
X!  * Check-in $Date: 1991/02/25 22:09:52 $
X   * $State: Exp $
X   *
X   * $Author: barnett $
X   *
X   * $Log: fixstrings.h,v $
X   * Revision 3.1  1991/02/25  22:09:52  barnett
X   * Fixed some portability problems
X   *
X--- 1,15 ----
X  /*
X!  * $Revision: 3.2 $
X!  * Check-in $Date: 1991/05/16 10:45:25 $
X   * $State: Exp $
X   *
X   * $Author: barnett $
X   *
X   * $Log: fixstrings.h,v $
X+  * Revision 3.2  1991/05/16  10:45:25  barnett
X+  * Better support for System V machines
X+  * Support for machines with read only text segments
X+  *
X   * Revision 3.1  1991/02/25  22:09:52  barnett
X   * Fixed some portability problems
X   *
X***************
X*** 20,25 ****
X--- 24,36 ----
X  /* FLUKE jps 16-apr-86 - revector the string routines to custom-coded ones
X   *  which handle NULL pointers.
X   */
X+ #ifdef SYSV
X+ #define strchr Xindex
X+ #define strrchr Xrindex
X+ #else
X+ #define index Xindex
X+ #define rindex Xrindex
X+ #endif
X  #define strcat	Xstrcat
X  #define strncat	Xstrncat
X  #define strcmp	Xstrcmp
X***************
X*** 27,34 ****
X  #define strcpy	Xstrcpy
X  #define strncpy	Xstrncpy
X  #define strlen	Xstrlen
X- #define index	Xindex
X- #define rindex	Xrindex
X  
X  extern char *Xstrcpy();
X  extern char *Xindex();
X--- 38,43 ----
Xdiff -c -r ../3.1/src/lexan.l ./src/lexan.l
X*** ../3.1/src/lexan.l	Thu May 16 12:51:37 1991
X--- ./src/lexan.l	Thu May 16 12:43:20 1991
X***************
X*** 2,8 ****
X  
X  #ifdef FLUKE
X  # ifndef LINT
X!     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 $";
X  # endif LINT
X  #endif FLUKE
X  
X--- 2,8 ----
X  
X  #ifdef FLUKE
X  # ifndef LINT
X!     static char RCSid[] = "@(#)FLUKE  $Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/lexan.l,v 3.2 1991/05/16 10:45:25 barnett Exp $";
X  # endif LINT
X  #endif FLUKE
X  
X***************
X*** 23,28 ****
X--- 23,32 ----
X   *	All rights reserved.
X   *
X   * $Log: lexan.l,v $
X+  * Revision 3.2  1991/05/16  10:45:25  barnett
X+  * Better support for System V machines
X+  * Support for machines with read only text segments
X+  *
X   * Revision 3.1  1991/02/25  22:09:52  barnett
X   * Fixed some portability problems
X   *
X***************
X*** 128,133 ****
X--- 132,138 ----
X  	{ "d_background",	DOPTB },
X  	{ "d_interactive",	DOPTI },
X  	{ "d_queue",		DOPTQ },
X+ 	{ "dbm",		DBM },	   /* IDA */
X  	{ "default",		DEFAULT }, /* IDA */
X  	{ "define",		DEFINE },
X   	{ "eval",		EVAL },
Xdiff -c -r ../3.1/src/main.c ./src/main.c
X*** ../3.1/src/main.c	Thu May 16 12:51:38 1991
X--- ./src/main.c	Thu May 16 12:43:20 1991
X***************
X*** 1,6 ****
X  #ifdef FLUKE
X  # ifndef LINT
X!     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 $";
X  # endif LINT
X  #endif FLUKE
X  
X--- 1,6 ----
X  #ifdef FLUKE
X  # ifndef LINT
X!     static char RCSid[] = "@(#)FLUKE  $Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/main.c,v 3.2 1991/05/16 10:45:25 barnett Exp $";
X  # endif LINT
X  #endif FLUKE
X  
X***************
X*** 17,22 ****
X--- 17,26 ----
X   *	All rights reserved.
X   *
X   * $Log: main.c,v $
X+  * Revision 3.2  1991/05/16  10:45:25  barnett
X+  * Better support for System V machines
X+  * Support for machines with read only text segments
X+  *
X   * Revision 3.1  1991/02/25  22:09:52  barnett
X   * Fixed some portability problems
X   *
X***************
X*** 48,53 ****
X--- 52,61 ----
X  #include "fixstrings.h"
X  #include <stdio.h>
X  #include <ctype.h>
X+ #ifdef SYSV
X+ #define index strchr
X+ #define rindex strrchr
X+ #endif
X  #ifdef MALLOC_DEBUG
X  extern int malloc_debug();
X  extern int malloc_verify();
X***************
X*** 57,62 ****
X--- 65,74 ----
X  char *infile = 0;			/* input file name */
X  char *outfile = 0;			/* output file name */
X  extern void InitError (), 
X+ #ifndef	DATA_RW
X+ 	    InitStrOps (),
X+ 	    InitParser (),
X+ #endif
X  	    InitSymbolTable (),
X  	    DefScan (),
X  	    FatalError (),
X***************
X*** 94,99 ****
X--- 106,116 ----
X          malloc_debug(1);
X  #endif MALLOC_DEBUG
X  	InitError ();			/* initialize error conditions */
X+ #ifndef	DATA_RW
X+ 	InitParser ();
X+ 	InitStrOps();
X+ 	
X+ #endif
X  	InitSymbolTable ();		/* initialize the symbol table */
X  	PreLoad ();			/* preload special identifiers */
X  	GetArgs (argc, argv);		/* set up argument files       */
X***************
X*** 193,199 ****
X  	printf ("##           TO THIS FILE WILL DISAPPEAR THE     ##\n");
X  	printf ("##           NEXT TIME THAT EASE IS RUN.         ##\n");
X  	printf ("##                                               ##\n");
X! 	printf ("##           $Revision: 3.1 $                    ##\n");
X  	printf ("##                                               ##\n");
X  	printf ("###################################################\n");
X  }
X--- 210,216 ----
X  	printf ("##           TO THIS FILE WILL DISAPPEAR THE     ##\n");
X  	printf ("##           NEXT TIME THAT EASE IS RUN.         ##\n");
X  	printf ("##                                               ##\n");
X! 	printf ("##           $Revision: 3.2 $                    ##\n");
X  	printf ("##                                               ##\n");
X  	printf ("###################################################\n");
X  }
Xdiff -c -r ../3.1/src/parser.y ./src/parser.y
X*** ../3.1/src/parser.y	Thu May 16 12:51:41 1991
X--- ./src/parser.y	Thu May 16 12:43:15 1991
X***************
X*** 1,7 ****
X  %{
X  #ifdef FLUKE
X  # ifndef LINT
X!     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 $";
X  # endif LINT
X  #endif FLUKE
X  
X--- 1,7 ----
X  %{
X  #ifdef FLUKE
X  # ifndef LINT
X!     static char RCSid[] = "@(#)FLUKE  $Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/parser.y,v 3.2 1991/05/16 10:45:25 barnett Exp $";
X  # endif LINT
X  #endif FLUKE
X  
X***************
X*** 22,27 ****
X--- 22,31 ----
X   *	All rights reserved.
X   *
X   * $Log: parser.y,v $
X+  * Revision 3.2  1991/05/16  10:45:25  barnett
X+  * Better support for System V machines
X+  * Support for machines with read only text segments
X+  *
X   * Revision 3.1  1991/02/25  22:09:52  barnett
X   * Fixed some portability problems
X   *
X***************
X*** 53,58 ****
X--- 57,63 ----
X  extern char	  *MakePosTok ();
X  extern char	  *GetField ();
X  extern char	  *Bracket ();
X+ extern char	  *DbmParen ();
X  extern char	  *MakeRSCall ();
X  extern char	  *CheckMailer ();
X  extern char	  *CheckRS ();
X***************
X*** 61,70 ****
X--- 66,82 ----
X  extern void	   AssignType ();
X  extern void	   RemoveSymbol ();
X  extern void	   yyerror ();
X+ extern void	   FatalError ();
X  extern short RMatch;		/* ruleset match flag 		      */
X  
X+ extern char *strdup(); 
X+ #ifdef DATA_RW
X  char *Cbuf = " ";		/* character buffer   		      */
X  char *Mbuf = "$ ";		/* macro buffer	      		      */
X+ #else
X+ char *Cbuf = NULL;
X+ char *Mbuf = NULL;
X+ #endif
X  char *Tsb;			/* pointer to temporary string buffer */
X  char *Tsb1;			/* pointer to another temporary string buffer */
X  char *Flaglist;			/* pointer to header flag list	      */
X***************
X*** 73,78 ****
X--- 85,98 ----
X  extern int yychar;
X  extern int	yydebug;
X  
X+ #ifndef	DATA_RW
X+ void InitParser()
X+ {
X+ 	if(!(Cbuf = strdup(" ")) || !(Mbuf = strdup("$ ")))
X+ 		FatalError("Out of memory in InitParser()", (char *)NULL);
X+ }
X+ #endif
X+ 
X  static void	
X  Free( ptr )
X  char *ptr;
X***************
X*** 165,170 ****
X--- 185,191 ----
X  %token MRECIPIENT MSENDER NEXT OPTIONS PRECEDENCE READCLASS RESOLVE
X  %token RETRY RETURN RULESET TRUSTED USER
X  %token YPALIAS YPMAP YPPASSWD EVAL RESOLVED QUOTE ASM PROGRAM DEFAULT ALIAS
X+ %token DBM
X  
X  %token ASGN COLON COMMA DEFINE DOLLAR FIELD LBRACE LPAREN RBRACE
X  %token RPAREN SEMI STAR SLASH
X***************
X*** 184,189 ****
X--- 205,211 ----
X  %type	<psb>		doptid eoptid idlist fcond dlist mflags route mdefs
X  %type	<psb>		matchaddr matchtok action actionstmt mailerspec mtdef
X  %type	<psb>		rwaddr rwtok ftype reftok rword cantok resolution
X+ %type	<psb>		dbmtok dbmval dbmvaltok dbmstuff
X  %type	<psb>		userspec hword hostid dheader mdefine
X  %type	<psb>		catstring catstringlist canval canvaltok
X  %type	<ival>		anychar
X***************
X*** 896,901 ****
X--- 918,926 ----
X  		|	cantok {
X  				$$ = $1;
X  			}
X+ 		|	dbmtok {
X+ 				$$ = $1;
X+ 			}
X  		|	ALIAS LPAREN reftok  RPAREN {
X  				$$ = ListAppend("$(@", $3, "$:$)");
X  			}
X***************
X*** 990,995 ****
X--- 1015,1075 ----
X  		|	HOSTNUM LPAREN reftok RPAREN {
X  				$$ = Bracket ($3, FALSE);
X  				Free ($3);
X+ 			}
X+ 		;
X+ 
X+ dbmtok		:	DBM LPAREN DOLLAR IDENT COMMA dbmstuff RPAREN {
X+ 				$$ = DbmParen ($4->psb, $6);
X+ 				RemoveSymbol($4);
X+ 				Free ($6);
X+ 			}
X+                 ;
X+ dbmstuff	:	dbmval COMMA dbmval {
X+ 				$$ = ListAppend ($1, Tsb = ListAppend ("$@", $3, (char *) NULL),
X+ 						 (char *) NULL);
X+ 				Free (Tsb);
X+ 			}
X+ 		|		dbmval {
X+ 				$$ = $1;
X+ 			}
X+ 		;
X+ 
X+ dbmval		:	dbmvaltok {
X+ 				$$ = $1;
X+ 			}
X+ 		|	dbmval dbmvaltok {
X+ 				$$ = ListAppend ($1, $2, (char *) NULL);
X+ 				Free ($1);
X+ /*				Free ($2); */
X+ 			}
X+ 		;
X+ 
X+ dbmvaltok	:	IDENT {
X+ 				$$ = ListAppend ($1->psb, (char *) NULL, (char *) NULL);
X+ 				RemoveSymbol ($1);
X+ 			}
X+ 		|	SCONST {
X+ 				$$ = ListAppend (MacScan ($1), (char *) NULL, (char *) NULL);
X+ 				Free ($1);
X+ 			}
X+                 |	NEXT LPAREN RPAREN {	/* I Used next earlier, but now use default - because it is clearer syntax */
X+ 				$$ = "$:";
X+ 			}
X+                 |	NEXT LPAREN dbmval RPAREN {
X+ 				$$ = ListAppend("$:", $3, (char *)NULL);
X+ 			}
X+                 |	DEFAULT LPAREN RPAREN {
X+ 				$$ = "$:";
X+ 			}
X+                 |	DEFAULT LPAREN dbmval RPAREN {
X+ 				$$ = ListAppend("$:", $3, (char *)NULL);
X+ 			}
X+ 		|	reftok {
X+ 				$$ = $1;
X+ 			}
X+ 		|	SEPCHAR {
X+ 				*Cbuf = $1;
X+ 				$$ = ListAppend (Cbuf, (char *) NULL, (char *) NULL);
X  			}
X  		;
X  
Xdiff -c -r ../3.1/src/strops.c ./src/strops.c
X*** ../3.1/src/strops.c	Thu May 16 12:51:42 1991
X--- ./src/strops.c	Thu May 16 12:43:21 1991
X***************
X*** 1,6 ****
X  #ifdef FLUKE
X  # ifndef LINT
X!     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 $";
X  # endif LINT
X  #endif FLUKE
X  
X--- 1,6 ----
X  #ifdef FLUKE
X  # ifndef LINT
X!     static char RCSid[] = "@(#)FLUKE  $Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/strops.c,v 3.2 1991/05/16 10:45:25 barnett Exp $";
X  # endif LINT
X  #endif FLUKE
X  
X***************
X*** 18,23 ****
X--- 18,27 ----
X   *	All rights reserved.
X   *
X   * $Log: strops.c,v $
X+  * Revision 3.2  1991/05/16  10:45:25  barnett
X+  * Better support for System V machines
X+  * Support for machines with read only text segments
X+  *
X   * Revision 3.1  1991/02/25  22:09:52  barnett
X   * Fixed some portability problems
X   *
X***************
X*** 48,55 ****
X--- 52,64 ----
X  extern char *	  malloc ();
X  
X  short  Rformat = FALSE;			/* class read format flag	  */
X+ #ifdef	DATA_RW
X  static char   *Ptok   = "$  ";		/* positional token structure     */
X  static char   *Cfield = "$= ";		/* class reference structure	  */
X+ #else
X+ static char   *Ptok   = NULL;		/* positional token structure     */
X+ static char   *Cfield = NULL;		/* class reference structure	  */
X+ #endif
X  static char   *Ofield = "$-";		/* one token match structure	  */
X  static char   *Zfield = "$*";		/* zero or more tokens structure  */
X  static char   *Pfield = "$+";		/* one or more tokens structure	  */
X***************
X*** 61,71 ****
X--- 70,110 ----
X   *  with release 3.0.
X   */
X  
X+ #ifdef	DATA_RW
X  static char   *Mfield = "$% ";		/*    match in specified YP map */
X  static char   *Nfield = "$! ";		/* no match in specified YP map */
X  static char   *Mtest  = "$? ";		/* conditional macro test string  */
X+ #else
X+ static char   *Mfield = NULL;		/*    match in specified YP map */
X+ static char   *Nfield = NULL;		/* no match in specified YP map */
X+ static char   *Mtest  = NULL;		/* conditional macro test string  */
X+ #endif
X  
X+ #ifndef	DATA_RW
X+ /* This section of code is for those machines with split text and data
X+  * areas - where string constants are not modifiable
X+  */
X+ #define nil (char *)0
X  
X+ char *	  Strdup(string) /* a clone of the strdup() routine */
X+ char	*string;
X+ {
X+     char *s;
X+     s=malloc(length(string));
X+     if (!s) return (nil);
X+     (void) sprintf(s,"%s",string);
X+     return (s);
X+ }
X+ void InitStrOps()
X+ {
X+ 	if(!(Ptok = Strdup("$  ")) || !(Cfield = Strdup("$= ")) ||
X+ 	   !(Mfield = Strdup("$% ")) || !(Nfield = Strdup("$! ")) ||
X+ 	   !(Mtest = Strdup("$? ")))
X+ 	   	FatalError("Out of memory in InitStrOps()", (char *)NULL);
X+ }
X+ #endif
X+ 
X+ 
X  /*
X   *	ConvOpt () -- Convert an Ease option identifier (optid) by returning a
X   *		      string representation of the cf format.  
X***************
X*** 404,409 ****
X--- 443,471 ----
X  	if (dflag)
X  		res = strcat (res, "$");
X  	res = strcat (res, "]");
X+ 	return (res);
X+ }
X+ /*
X+  *	DbmParen () -- Construct and return a cf string form of the 
X+  *		      dbm reference of the IDA database identifier passed in
X+  *		      the string parameter db_psb, looking up the string identifier
X+  *		      passed in the string parameter lup_psb.
X+  *
X+  */
X+ char *
X+ DbmParen (db_psb, lup_psb)
X+ char *db_psb;			/* identifier of data base */
X+ char *lup_psb;			/* identifier being looked up */
X+ {
X+ 	register char *res;	/* resultant cf form 		  */
X+ 	
X+ 	res = (char *) malloc (strlen (lup_psb) + 7);
X+ 	if (res == NULL)
X+ 		FatalError ("System out of string space in DbmParen ()", (char *) NULL);
X+ 	res = strcpy (res, "$(x ");
X+     *(res+2) = *db_psb;
X+ 	res = strcat (res, lup_psb);
X+ 	res = strcat (res, " $)");
X  	return (res);
X  }
X  
Xdiff -c -r ../3.1/utils/Makefile ./utils/Makefile
X*** ../3.1/utils/Makefile	Thu May 16 12:50:13 1991
X--- ./utils/Makefile	Thu May 16 12:38:36 1991
X***************
X*** 7,13 ****
X  clean:
X  
X  install:
X! 	${INSTALL} cfdiff.csh  ${BINDIR}/cfdiff
X! 	${INSTALL} cfstrip.csh ${BINDIR}/cfstrip
X  	chmod 755 ${BINDIR}/cfstrip  ${BINDIR}/cfdiff
X  
X--- 7,13 ----
X  clean:
X  
X  install:
X! 	${INSTALL} cfdiff.sh  ${BINDIR}/cfdiff
X! 	${INSTALL} cfstrip.sh ${BINDIR}/cfstrip
X  	chmod 755 ${BINDIR}/cfstrip  ${BINDIR}/cfdiff
X  
END_OF_Patch2
if test 50604 -ne `wc -c <Patch2`; then
    echo shar: \"Patch2\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f cfdiff.sh -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"cfdiff.sh\"
else
echo shar: Extracting \"cfdiff.sh\" \(523 characters\)
sed "s/^X//" >cfdiff.sh <<'END_OF_cfdiff.sh'
X#!/bin/sh
X# Bruce Barnett
X# usage:
X# cfdiff file1.cf file2.cf
X# this removes all comments from the cf file
Xcase  $#  in
X	0|1)
X	echo usage: cfdiff file1 file2;
X	exit 1
X	;;
Xesac
X[ ! -f $1 ] && {
X	echo file $1 does not exist;
X	exit 1;
X};
X[ ! -f $2 ] && {
X	echo file $2 does not exist;
X	exit 1;
X}
X# if SunOS, use the -b -w option
XDIFF="diff -b"
XARG1=`basename $1`
XARG2=`basename $2`
X[ $ARG1 = $ARG2 ] && {
X	ARG2=$ARG2-
X}
Xcfstrip <$1>/tmp/$ARG1
Xcfstrip <$2>/tmp/$ARG2
X
Xcd /tmp
X${DIFF} $ARG1 $ARG2
X
X/bin/rm /tmp/$ARG1 /tmp/$ARG2
END_OF_cfdiff.sh
if test 523 -ne `wc -c <cfdiff.sh`; then
    echo shar: \"cfdiff.sh\" unpacked with wrong size!
fi
chmod +x cfdiff.sh
# end of overwriting check
fi
if test -f cfstrip.sh -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"cfstrip.sh\"
else
echo shar: Extracting \"cfstrip.sh\" \(686 characters\)
sed "s/^X//" >cfstrip.sh <<'END_OF_cfstrip.sh'
X#!/bin/sh
X# usage:
X#	cfstrip <infile >outfile
X# Bruce Barnett
X#
X# this file strips out all comments from a sendmail.cf file
X# it also converts 
X#	<tab>[whitespace] 	to 	<tab>
X#	<space>[whitespace]	to	<space>
X#	<space>$		to	$
X#	<space><		to	<
X#	<space>@		to	@
Xcase  $#  in
X	0)
X		;;
X	*)
X		echo no arguments are allowed;
X		exit 1
X		;;
Xesac
Xsed -e '
Xs/^#.*//
Xs/^\(R[^	]*[	][	]*[^	]*\)[	]*.*$/\1/
Xs/^\(R[^	]*[	][	]*[^	]*\)[	]*$/\1/
Xs/^\(R[^	]*[	][	]*[^	]*\)$/\1/
Xs/	[	 ]*/	/g
Xs/ [	 ]*/ /g
Xs/ \$/$/g
Xs/ </</g
Xs/ @/@/g
X# convert multiple tabs into one tab
Xs/		*/	/g
X# this one will really remove most spaces
Xs/^R\([^ ]*\) \([^ ]*\)/R\1\2/g
X# remove a space in "T root"
Xs/^T */T/
X/^[ 	]*$/d
X' 
END_OF_cfstrip.sh
if test 686 -ne `wc -c <cfstrip.sh`; then
    echo shar: \"cfstrip.sh\" unpacked with wrong size!
fi
chmod +x cfstrip.sh
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0
--
Bruce G. Barnett	barnett@crdgw1.ge.com	uunet!crdgw1!barnett

barnett@grymoire.crd.ge.com (Bruce Barnett) (05/17/91)

I didn't mention it in the patch, but the new files cfstrip.sh and
cfdiff.sh are to be moved into the utils directory.

These scripts were converted from csh into sh, and enhanced. Together,
they can compare two sendmail.cf files after stripping out comments.

There will be another patch - thanks to that one-man tiger team
Jonathan Kamens. I will also send the entire Ease 3.3 to
comp.sources.unix, now that I think I have it stable enough that it
runs on most machines. - Thanks to all!

--
Bruce G. Barnett	barnett@crdgw1.ge.com	uunet!crdgw1!barnett