home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3337 / Patch2 < prev   
Encoding:
Text File  |  1991-05-17  |  49.4 KB  |  1,759 lines

  1. This is the official Patch 2 for Ease 3
  2. It converts Ease 3.1 to Ease 3.2
  3.  
  4. Fixes include
  5.  
  6.     Better support for System V machines
  7.     Better support for machines with read-only text areas
  8.     Better support for IDA sendmail databases
  9.     Bug fixes
  10.  
  11.     Included is a better cfdiff and cfstrip shell scripts
  12.  
  13. Install by going to the directory containing the sources of ease
  14. and typing
  15.     patch -p <Patch2 
  16.  
  17.  
  18. diff -c -r ../3.1/CONVERTING ./CONVERTING
  19. *** ../3.1/CONVERTING    Thu May 16 12:49:42 1991
  20. --- ./CONVERTING    Thu May 16 12:38:45 1991
  21. ***************
  22. *** 34,40 ****
  23. --- 34,45 ----
  24.       HP/UX
  25.           => cfc -i -CGUS
  26.   
  27. +     A/UX
  28. +         => cfc -i -CUNI
  29.   
  30. +     CGI IRIS
  31. +         => cfc -i -C FKSVN  
  32.   Step 2.  Convert the ease file to cf: 
  33.   
  34.       % et <sendmail.ease >sendmail.cf
  35. ***************
  36. *** 49,63 ****
  37.       -C XYZ flags.
  38.   
  39.       The remaining errors are either warnings or mistakes
  40. !     in the translation. NOTE: - some configuration files use macros 
  41. !     that are not defined. For instance, Sun's sendmail.main.cf has 
  42. !     an undefined D macro. Ultrix has several undefined macros, that if
  43. !     you define them, cause your sendmail to exhibit change behavior.
  44. !     These are warnings, and are perfectly fine. If you want to
  45. !     you can define the missing rulesets. Don't define the missing
  46. !     macros unless you examine the sendmail rules and see what happens with
  47. !     the change.
  48.   
  49.       So look at the warnings and errors, and repeat step 1 until you 
  50.       feel comfortable with the change.
  51.   
  52. --- 54,112 ----
  53.       -C XYZ flags.
  54.   
  55.       The remaining errors are either warnings or mistakes
  56. !     in the translation. 
  57. !     Let's look at some examples:
  58.   
  59. +         line 1598: Warning: Ruleset not defined: RULESET_12
  60. +     This says there is a line that has
  61. +         RULESET_12 = ruleset 12;
  62. +     Comment it out if you wish.
  63. +     case 2)
  64. +         line 1598: Warning: Macro not defined: Y
  65. +     or
  66. +         line 1598: Warning: Class not defined: Y
  67. +     This is just a warning and is probably okay. There may be a rule that 
  68. +     does different actions if the macro is set or not. Example:
  69. +     if ( one_or_more )    /* add local domain */
  70. +         next (concat ("$1<@",ifset (Y, "${Y}", "${m_sitename}"))>);
  71. +     If this bothers you, rewrite to rule to not need the Y macro:
  72. +     if ( one_or_more )    /* add local domain */
  73. +         next ("$1<@${m_sitename}"))>);
  74. +     Do not define them, even to define them to be nothing!
  75. +     An empty string is still defined, and may break your sendmail rules.
  76. +     case 3)
  77. +         line 88 near ";": Warning: Appending to previously defined class T.
  78. +     This is okay. Sendmail allows you to define a class over several lines.
  79. +     combine them into one line if you wish.
  80. +     case 4)
  81. +     line 1485: Warning: Mailer not defined: ERROR
  82. +     Ease treats upper and lower case letters as different.
  83. +     Sendmail does not. Change the case to be consistent
  84. +     case 5)
  85. +     warning: Unknown option 'M' on line 387
  86. +     
  87. +     cfc found an unusual option. It tries to convert it into
  88. +         an asm("...') string.
  89. +     .....
  90.       So look at the warnings and errors, and repeat step 1 until you 
  91.       feel comfortable with the change.
  92.   
  93. ***************
  94. *** 77,85 ****
  95.   
  96.        set path = ( $cwd/bin $path );rehash;cfdiff /etc/sendmail.cf ./sendmail.cf
  97.   
  98. !     You will see some differences in lines that have been split into
  99. !     two lines, and the "Ob" option is converted into the more
  100. !     verbose "Obackground" option. If there is any other difference, 
  101.       please send me a bug report, and see if you can make changes to your
  102.       ease input file to match the original file. You may need the asm("")
  103.       command.
  104. --- 126,162 ----
  105.   
  106.        set path = ( $cwd/bin $path );rehash;cfdiff /etc/sendmail.cf ./sendmail.cf
  107.   
  108. !     You may see some differences. Examples:
  109. !     < Odbackground
  110. !     ---
  111. !     > Odb
  112. !     Okay: ease outputs the full name instead of the abbreviation
  113. !     < Muucp,    P=/usr/bin/uux, F=sDFhuU, S=13, R=23, M=100000,
  114. !     <     A=uux - $h!rmail ($u)
  115. !     ---
  116. !     > Muucp, P=/usr/bin/uux, F=sDFhuU, S=13, R=23, M=100000, A=uux - $h!rmail ($u)
  117. !     Okay: this is on two lines instead of one.
  118. !     < CTuucp UUCP arpa ARPA bitnet BITNET csnet CSNET mailnet MAILNET decnet DECNET rscs RSCS
  119. !     ---
  120. !     > CTuucp UUCP arpa ARPA bitnet BITNET csnet CSNET mailnet
  121. !     > CTMAILNET decnet DECNET rscs RSCS
  122. !     
  123. !     OKAY: this is just a different number of lines.
  124. !     Differences in the spaces in the rules)
  125. !     The syntax of sendmail specifies that there are tabs between the 
  126. !     left hand side and the right hand side, and a tab between the right 
  127. !     hand side and the comments.
  128. !     Any spaces in the middle of the rules are cosmetic. Ignore differences.
  129. !     If there is any other difference, 
  130.       please send me a bug report, and see if you can make changes to your
  131.       ease input file to match the original file. You may need the asm("")
  132.       command.
  133. diff -c -r ../3.1/INTRO ./INTRO
  134. *** ../3.1/INTRO    Thu May 16 12:50:33 1991
  135. --- ./INTRO    Thu May 16 12:38:46 1991
  136. ***************
  137. *** 71,88 ****
  138.   output:
  139.   
  140.       Input        Output
  141. !     a!b!c!d!user        <@a.UUCP>!b!c!d!user
  142.       user@a.uucp        user<@a.uucp>
  143.       bigvax::user        user<@bigvax.DECNET>
  144. !     user%a.com@b.edu    user%a.com<@b.edu>    
  145.       a!b!user@abc.edu    a!b!user<@abc.edu>
  146.       @a:user@b.com        <@a>:user@b.com
  147.   
  148.   As you can see, the machine that will accept the message will be
  149.   different depending on the address. Ruleset 3 must find the right
  150.   machine, and also clean up any addresses if appropriate.
  151.   It does it's work by looking for a pattern, and transforming the
  152. ! address when it matches the pattern.
  153.   
  154.   The cleaning up part can be confusing, but typically ruleset 3 calls
  155.   other rules to do this. One rule is used to clean up addresses before
  156. --- 71,91 ----
  157.   output:
  158.   
  159.       Input        Output
  160. !     a!b!c!d!user        <@a.UUCP>!b!c!d!user    or
  161. !                 b!c!d!user<@a.UUCP>
  162.       user@a.uucp        user<@a.uucp>
  163.       bigvax::user        user<@bigvax.DECNET>
  164. !     user%a.com@b.edu    user%a.com<@b.edu> or - it you are agressive
  165. !                 user<@a.com>
  166.       a!b!user@abc.edu    a!b!user<@abc.edu>
  167.       @a:user@b.com        <@a>:user@b.com
  168. +     "Bruce" <barnett@local>    barnett<@local>
  169.   
  170.   As you can see, the machine that will accept the message will be
  171.   different depending on the address. Ruleset 3 must find the right
  172.   machine, and also clean up any addresses if appropriate.
  173.   It does it's work by looking for a pattern, and transforming the
  174. ! address when it matches the pattern. 
  175.   
  176.   The cleaning up part can be confusing, but typically ruleset 3 calls
  177.   other rules to do this. One rule is used to clean up addresses before
  178. diff -c -r ../3.1/Makefile ./Makefile
  179. *** ../3.1/Makefile    Thu May 16 12:51:33 1991
  180. --- ./Makefile    Thu May 16 12:43:04 1991
  181. ***************
  182. *** 1,6 ****
  183. ! #    $Header: /home/kreskin/u0/barnett/Src/Ease/ease/RCS/Makefile,v 1.2 1991/02/25 22:07:29 barnett Exp $
  184.   #
  185.   #    $Log: Makefile,v $
  186.   # Revision 1.2  1991/02/25  22:07:29  barnett
  187.   # Added RCS header, amd specified value for MAKE variable
  188.   #
  189. --- 1,9 ----
  190. ! #    $Header: /home/kreskin/u0/barnett/Src/ease/RCS/Makefile,v 3.2 1991/05/16 10:51:13 barnett Exp $
  191.   #
  192.   #    $Log: Makefile,v $
  193. + # Revision 3.2  1991/05/16  10:51:13  barnett
  194. + # Fixed a few typos and added the MAKE variable
  195. + #
  196.   # Revision 1.2  1991/02/25  22:07:29  barnett
  197.   # Added RCS header, amd specified value for MAKE variable
  198.   #
  199. ***************
  200. *** 19,24 ****
  201. --- 22,30 ----
  202.   #ORIGINAL=/usr/lib/sendmail.subsidiary.cf
  203.   
  204.   # What arguments to cfc do you want for cfc (see the file CONVERTING)
  205. + # IDA
  206. + #CONVERT_FLAGS=-i
  207. + #SunOS Subsidiary
  208.   CONVERT_FLAGS=-s -CV
  209.   
  210.   #what extenstion do you want for the manual pages?
  211. ***************
  212. *** 55,60 ****
  213. --- 61,68 ----
  214.       cd src; ${MAKE} ${MFLAGS} $@
  215.       cd cfc; ${MAKE} ${MFLAGS} $@
  216.       cd utils; ${MAKE} ${MFLAGS} $@
  217. +     /bin/rm all
  218.   
  219.   debug:    all sendmail.ease
  220.       BD=${BINDIR};cd debug; ${MAKE} ${MFLAGS} BINDIR=$$BD $@
  221. diff -c -r ../3.1/README ./README
  222. *** ../3.1/README    Thu May 16 12:49:45 1991
  223. --- ./README    Thu May 16 12:38:20 1991
  224. ***************
  225. *** 1,6 ****
  226.   README - Tue May  1 14:46:33 PDT 1990
  227.   
  228. ! This is release 3.0 of the CFC and Ease programs.
  229.   
  230.   Ease is a compiler for sendmail configuration files.  It reads a high-level
  231.   mail configuration language and produces a sendmail.cf file.  If you've ever
  232. --- 1,6 ----
  233.   README - Tue May  1 14:46:33 PDT 1990
  234.   
  235. ! This is release 3.2 of the CFC and Ease programs.
  236.   
  237.   Ease is a compiler for sendmail configuration files.  It reads a high-level
  238.   mail configuration language and produces a sendmail.cf file.  If you've ever
  239. ***************
  240. *** 27,32 ****
  241. --- 27,38 ----
  242.       Andrew Partan of the Corporation for Open Systems,
  243.       Rich Salz of Bolt Beranak, and Newman.
  244.   
  245. + Bugs/patches to Ease 3.0 have been sent in by:
  246. +     bent@lccinc.UUCP (Ben Taylor)
  247. +     "Jonathan I. Kamens" <jik@pit-manager.mit.edu>
  248. +     Matt Heffron <heffron@falstaff.css.beckman.com>
  249. +     William Roberts <liam@cs.qmw.ac.uk>
  250. +     rainer@flyer.uni-duisburg.de (Rainer Bieniek)
  251.   Cfc was written by Arnold D. Robbins, and has been enhanced by Bruce Barnett
  252.   (see below).
  253.   
  254. ***************
  255. *** 36,46 ****
  256.   
  257.       -----------------------------------------------------------
  258.   
  259. !         Ease 3.0 and cfc Release Notes:
  260.           Bruce Barnett barnett@crdgw1.ge.com
  261. !         February 1991
  262.   
  263. ! This document describes Ease 3.0. This version was originally a
  264.   modified version of the last official release of ease 2.1. I called it
  265.   2.1 Beta and sent it to several dozen people. I sent the patches to the authors
  266.   of ease and cfc, but an updated version was never posted to the net.
  267. --- 42,52 ----
  268.   
  269.       -----------------------------------------------------------
  270.   
  271. !         Ease 3.2 and cfc Release Notes:
  272.           Bruce Barnett barnett@crdgw1.ge.com
  273. !         May 1991
  274.   
  275. ! This document describes Ease 3.2. This version was originally a
  276.   modified version of the last official release of ease 2.1. I called it
  277.   2.1 Beta and sent it to several dozen people. I sent the patches to the authors
  278.   of ease and cfc, but an updated version was never posted to the net.
  279. ***************
  280. *** 48,55 ****
  281.   the baton now.
  282.   
  283.   Since this is a major release, I decided to call it Ease 3.0
  284.   
  285. ! The main feature of Ease/Cfc 3.0:
  286.   
  287.   
  288.       I subjected the Cfc/Ease programs to a test suite
  289. --- 54,62 ----
  290.   the baton now.
  291.   
  292.   Since this is a major release, I decided to call it Ease 3.0
  293. + Two updates have been release since then.
  294.   
  295. ! The main feature of Ease/Cfc 3.2:
  296.   
  297.   
  298.       I subjected the Cfc/Ease programs to a test suite
  299. ***************
  300. *** 70,80 ****
  301.   langauge and feel confident that you won't break anything.
  302.       
  303.   
  304. ! Current status of Ease 3.0
  305.       It will handle 100% of the standard Ultrix, SunOS, HP, and Berkeley
  306. !     versions of sendmail (I hope). It handles 99% of the IDA
  307. !     enhancement package. See the TODO file for problems.
  308.   
  309.       I don't plan to do any major work maintaining this package,
  310.   but I will gladly accept bug fixes and enhancements.
  311.   
  312. --- 77,89 ----
  313.   langauge and feel confident that you won't break anything.
  314.       
  315.   
  316. ! Current status of Ease 3.2
  317.       It will handle 100% of the standard Ultrix, SunOS, HP, and Berkeley
  318. !     versions of sendmail (I hope). It handles 99.5% of the IDA
  319. !     enhancement package. It compiles of dozens of different machines.
  320. !     See the TODO file for problems.
  321.   
  322.       I don't plan to do any major work maintaining this package,
  323.   but I will gladly accept bug fixes and enhancements.
  324.   
  325. ***************
  326. *** 140,146 ****
  327.       R$+@$-    $@$1@$[$2$:$2.UUCP $]
  328.   
  329.   
  330. - Not everything in IDA is supported. (Remember to use the asm() command!)
  331.   
  332.   ----------------
  333.   General Improvements to the Ease Program:
  334. --- 149,154 ----
  335. ***************
  336. *** 171,177 ****
  337.           e.g. -C ADG => added classes A, B, and G
  338.   
  339.   See the file CONVERTING on tips to convert your sendmail file into ease.
  340. ! I have included some scritps that can compare the original sendmail
  341.   file to the output of ease. If the rules are identical, then you can
  342.   feel comfortable using ease instead of raw cf.
  343.   
  344. --- 179,185 ----
  345.           e.g. -C ADG => added classes A, B, and G
  346.   
  347.   See the file CONVERTING on tips to convert your sendmail file into ease.
  348. ! I have included some scripts that can compare the original sendmail
  349.   file to the output of ease. If the rules are identical, then you can
  350.   feel comfortable using ease instead of raw cf.
  351.   
  352. ***************
  353. *** 199,204 ****
  354. --- 207,232 ----
  355.   Also - see the directory test. This includes a shell script to test
  356.   sendmail files, written by Simon Kenyon. You have two ways to debug
  357.   sendmail files now!
  358. + Release Notes:
  359. +     3.2:
  360. +     Added better support for IDA sendmail
  361. +     Added better support for unusual values in mailer flags, and options
  362. +     Better BSD/SYSV Portability (See the Makefile)
  363. +     Better support for those machines with read only text areas.
  364. +         (See compile flag DATA_RW in makefile)
  365. +     The cfstrip and cfdiff script was improved
  366. +     The documentation was improved
  367. + Release 3.1:
  368. +     Fixed bug with machines that didn't like free(0).
  369. +     Other portability problems
  370. +     Added support for MALLOC_DEBUG flag
  371. + Release 3.0:
  372. +     First release of Bruce's changes to the net in alt.sources
  373.   
  374.   ============================================================================
  375.   
  376. diff -c -r ../3.1/TESTING ./TESTING
  377. *** ../3.1/TESTING    Thu May 16 12:49:46 1991
  378. --- ./TESTING    Thu May 16 12:38:46 1991
  379. ***************
  380. *** 27,35 ****
  381.   
  382.   where 22 is a mailer rewrite ruleset for a mailer (i.e. UUCP).
  383.   
  384. ! Ruleset 0 must be avoided when testing the re-write rules for
  385. ! mailers because ruleset 0 outputs a triple (user, host, mailer), 
  386. ! and only one part (user) passed to the mailers.
  387.   
  388.   The makefile generates a file in tbl(1) format that 
  389.   lists the following:
  390. --- 27,40 ----
  391.   
  392.   where 22 is a mailer rewrite ruleset for a mailer (i.e. UUCP).
  393.   
  394. ! Ruleset 0 must be avoided when testing the re-write rules for mailers
  395. ! because ruleset 0 outputs a triple (user, host, mailer), and only one
  396. ! part (user) passed to the mailers. Therefore you would typically have
  397. ! ruleset 0 when testing resolution decisions, and omit it when testing
  398. ! for mailer re-writes like UUCP and TCP final delivery.
  399. ! Some newer versions of sendmail do not automatically run ruleset 3 when
  400. ! in debugging mode. You will have to add '3,' before each rule.
  401.   
  402.   The makefile generates a file in tbl(1) format that 
  403.   lists the following:
  404. diff -c -r ../3.1/TODO ./TODO
  405. *** ../3.1/TODO    Thu May 16 12:49:47 1991
  406. --- ./TODO    Thu May 16 12:38:28 1991
  407. ***************
  408. *** 1,23 ****
  409.   Things to do for Ease 3.?
  410. !     Support More IDA extensions
  411. !         dbm()            $(x    in RHS
  412. !         Keyed databases        OKP/usr/lib/aliases
  413. !         Ignore case when checking for mailer names existance
  414. !             (local vs. LOCAL)
  415.   
  416. !     Eliminate the concat() construct.
  417.   
  418. !     check for if (exactly_one) next($2); type error.
  419. !     check for matching < and > in rulesets
  420. !     Check for mailers "local" and "prog" 
  421.   
  422.   CFC improvements
  423.       Make it a real two-pass parser. This way, it can
  424.       properly specify the rulesets, macros, and classes it
  425. !     needs.
  426.   
  427.   Error Detections
  428.       Eliminate syntax errors that just report "syntax error"    
  429.   
  430.   --
  431.   Bruce G. Barnett        <barnett@crdgw1.ge.com>  a.k.a.
  432. --- 1,35 ----
  433.   Things to do for Ease 3.?
  434. ! -------------------------
  435.   
  436. ! Keyed databases definitions (OKP/usr/lib/aliases) should not need an asm()
  437.   
  438. ! Ignore case when checking for mailer names existance
  439. !         (local vs. LOCAL)
  440.   
  441. + Fix the following construct so that cfc/et handles the conversion properly:
  442. + HReceived: from $?s$s$|localhost$. by $w$?r with $r$.
  443. +     id $i; $b; sendmail $v/$V
  444. +     (from $f for $u)
  445. + Eliminate the concat() construct.
  446. + check for if (exactly_one) next($2); type error.
  447. + check for matching < and > in rulesets
  448. + Check for mailers "local" and "prog" 
  449.   CFC improvements
  450.       Make it a real two-pass parser. This way, it can
  451.       properly specify the rulesets, macros, and classes it
  452. !     needs. Or else write a shell script that determines which rulesets,
  453. !     macros, and classes are needed.
  454.   
  455.   Error Detections
  456.       Eliminate syntax errors that just report "syntax error"    
  457. + Regression Testing script:
  458. +     rewrite it into perl for speed
  459.   
  460.   --
  461.   Bruce G. Barnett        <barnett@crdgw1.ge.com>  a.k.a.
  462. diff -c -r ../3.1/cfc/cfc.c ./cfc/cfc.c
  463. *** ../3.1/cfc/cfc.c    Thu May 16 12:50:49 1991
  464. --- ./cfc/cfc.c    Thu May 16 12:43:01 1991
  465. ***************
  466. *** 1,9 ****
  467.   #ifndef lint
  468. ! 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 $";
  469.   #endif
  470.   
  471.   /*
  472.    * $Log: cfc.c,v $
  473.    * Revision 3.0  1991/02/22  19:33:07  barnett
  474.    * Many enhancements for IDA and HP sendmail.cf files
  475.    *
  476. --- 1,14 ----
  477.   #ifndef lint
  478. ! 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 $";
  479.   #endif
  480.   
  481.   /*
  482.    * $Log: cfc.c,v $
  483. +  * Revision 3.2  1991/05/16  10:49:33  barnett
  484. +  * Support for IDA databases
  485. +  * More tolerant handling of unusual conditions
  486. +  * more bug fixes
  487. +  *
  488.    * Revision 3.0  1991/02/22  19:33:07  barnett
  489.    * Many enhancements for IDA and HP sendmail.cf files
  490.    *
  491. ***************
  492. *** 133,139 ****
  493.               "warning: ignoring non-flag command line arguments\n");
  494.   
  495.       printf ("/***********************************************************/\n");
  496. !     printf ("/* This ease file generated by cfc version $Revision: 3.0 $*/\n");
  497.       printf ("/* automatically from a sendmail.cf file                   */\n");
  498.       printf ("/* It may need to be edited before feeding to ease.        */\n");
  499.       printf ("/***********************************************************/\n");
  500. --- 138,144 ----
  501.               "warning: ignoring non-flag command line arguments\n");
  502.   
  503.       printf ("/***********************************************************/\n");
  504. !     printf ("/* This ease file generated by cfc version $Revision: 3.2 $*/\n");
  505.       printf ("/* automatically from a sendmail.cf file                   */\n");
  506.       printf ("/* It may need to be edited before feeding to ease.        */\n");
  507.       printf ("/***********************************************************/\n");
  508. ***************
  509. *** 567,573 ****
  510.                 if (diddefault) {
  511.                 putchar (')');
  512.                 diddefault--;
  513. !               }
  514.                 break;
  515.               case '{':
  516.                 printf ("ypmap (%s, ", macro (*++cp)); /* sunos */
  517. --- 572,579 ----
  518.                 if (diddefault) {
  519.                 putchar (')');
  520.                 diddefault--;
  521. !               } else
  522. !             canon--;
  523.                 break;
  524.               case '{':
  525.                 printf ("ypmap (%s, ", macro (*++cp)); /* sunos */
  526. ***************
  527. *** 627,633 ****
  528.                 }
  529.                 open++;
  530.                 } else {
  531. !               printf("\", \"");
  532.                 }
  533.                 break;
  534.               case ':':
  535. --- 633,640 ----
  536.                 }
  537.                 open++;
  538.                 } else {
  539. !                printf(", ");
  540. ! /*              printf("\", \""); */
  541.                 }
  542.                 break;
  543.               case ':':
  544. ***************
  545. *** 648,667 ****
  546.                 } 
  547.                 break;
  548.               case '(':
  549. !               if (*(cp+1) == '@') { /* then IDA alias lookup */
  550. !               cp++;    /* point past '@' */
  551. !               printf("alias(");
  552. !               indbm++;
  553. !               open++;
  554. !               } else { /* lookup */
  555. !               printf("dbm(");
  556. !               printf("$%s, \"",macro(*cp++));
  557. !               }
  558.                 break;
  559.               case ')':
  560. !               printf("))");
  561.                 open--;
  562. !               indbm--;
  563.                 break;
  564.               case '&':
  565.                 printf(" eval(%s) ",macro(*(++cp)));
  566. --- 655,676 ----
  567.                 } 
  568.                 break;
  569.               case '(':
  570. !               printf((*(++cp) == '@')
  571. !                  ? " alias("        /* IDA alias lookup */
  572. !                  : " dbm($%c, "    /* IDA database lookup */
  573. !                  , *cp);
  574. !               indbm++;
  575. !               open++;
  576.                 break;
  577.               case ')':
  578. !               putchar (')');
  579.                 open--;
  580. !               if (diddefault) {
  581. !               putchar (')');
  582. !               diddefault--;
  583. !               }
  584. !               else
  585. !                 indbm--;
  586.                 break;
  587.               case '&':
  588.                 printf(" eval(%s) ",macro(*(++cp)));
  589. ***************
  590. *** 1397,1410 ****
  591.   option ()
  592.   {
  593.       register char *name = buffer + 1, *value = buffer + 2;
  594.   
  595.       printf ("options\n\t");
  596. !     if (*name == 'd')        /* delivery */
  597. !         printf ("o_delivery = %s;\n", delivoption (*value));
  598. !     else if (*name == 'e')        /* handling */
  599. !         printf ("o_handling = %s;\n", handle_option (*value));
  600. !     else
  601.           printf ("%s = \"%s\";\n", optionname (*name), value);
  602.   }
  603.   
  604.   /* trusted --- define the list of trusted users */
  605. --- 1406,1440 ----
  606.   option ()
  607.   {
  608.       register char *name = buffer + 1, *value = buffer + 2;
  609. +     char *newname;
  610. +     char *newvalue;
  611.   
  612.       printf ("options\n\t");
  613. !     if (*name == 'd') {    /* delivery */
  614. !         newvalue = delivoption (*value);
  615. !         if ( newvalue == NULL) {
  616. !         printf("/* Unknown value for delivery option           */\n");
  617. !         printf("/* Supplying the default value of d_background */\n");
  618. !         printf ("o_delivery = d_background ;\n" );
  619. !         } else
  620. !           printf ("o_delivery = %s;\n", newvalue);
  621. !     } else if (*name == 'e')    {    /* handling */
  622. !         newvalue = handle_option(*value);
  623. !         if (newvalue == NULL ) {
  624. !         printf("/* Unknown value for delivery option       */\n");
  625. !         printf("/* Supplying the default value of h_print  */\n");
  626. !         printf ("o_handling =  h_print ;\n");
  627. !         } else
  628. !           printf ("o_handling = %s;\n", newvalue);
  629. !     } else if (*name == 'K' ) {    /* IDA Keyed Database */
  630. !         printf("asm(\"OK%s\");\n", value);
  631. !     } else    {
  632. !         newname = optionname(*name);
  633. !         if (newname == NULL)
  634. !           printf("asm(\"O%c%s\");\n", *name, value);
  635. !         else
  636.           printf ("%s = \"%s\";\n", optionname (*name), value);
  637. +     }
  638.   }
  639.   
  640.   /* trusted --- define the list of trusted users */
  641. ***************
  642. *** 1496,1502 ****
  643.           return ("m_ufrom");
  644.   
  645.       case 'm':    /* The Domain Name (SunOS) */
  646. !         if (sunos) {
  647.               return ("m_domain");
  648.           } else {
  649.               buf[0] = c;
  650. --- 1526,1532 ----
  651.           return ("m_ufrom");
  652.   
  653.       case 'm':    /* The Domain Name (SunOS) */
  654. !         if (sunos || ida ) {
  655.               return ("m_domain");
  656.           } else {
  657.               buf[0] = c;
  658. ***************
  659. *** 1561,1566 ****
  660. --- 1591,1597 ----
  661.   char c;
  662.   {
  663.       static char buf[2] = { '\0', '\0' };
  664. +     char tstring[100];
  665.   
  666.       switch (c) {
  667.       case 'f':    return ("f_ffrom");
  668. ***************
  669. *** 1592,1602 ****
  670.       case 'V':    return ("f_relativize"); /* IDA sendmail */
  671.       default:
  672.       warn:
  673. !         fprintf (stderr,
  674. !             "warning: non standard mailer flag '%c' on line %d\n",
  675. !                 c, line);
  676. !         buf[0] = c;
  677. !         return buf;
  678.       }
  679.   }
  680.   
  681. --- 1623,1633 ----
  682.       case 'V':    return ("f_relativize"); /* IDA sendmail */
  683.       default:
  684.       warn:
  685. !       fprintf (stderr,
  686. !            "warning: non standard mailer flag '%c' on line %d\n",
  687. !            c, line);
  688. !       sprintf(tstring, "/* unknown mailer flag: %c */", c);
  689. !       return tstring;
  690.       }
  691.   }
  692.   
  693. ***************
  694. *** 1656,1665 ****
  695.       default:
  696.       warn:
  697.           fprintf (stderr,
  698. !             "warning: non standard option '%c' on line %d\n",
  699.                   c, line);
  700. !         buf[0] = c;
  701. !         return buf;
  702.       }
  703.   }
  704.   
  705. --- 1687,1696 ----
  706.       default:
  707.       warn:
  708.           fprintf (stderr,
  709. !             "warning: Unknown option '%c' on line %d\n",
  710.                   c, line);
  711. ! /*        buf[0] = c; */
  712. !         return NULL;
  713.       }
  714.   }
  715.   
  716. ***************
  717. *** 1677,1684 ****
  718.       default:
  719.           fprintf (stderr,
  720.       "warning: non standard delivery option '%c' on line %d\n", c, line);
  721. !         buf[0] = c;
  722. !         return buf;
  723.       }
  724.   }
  725.   
  726. --- 1708,1714 ----
  727.       default:
  728.           fprintf (stderr,
  729.       "warning: non standard delivery option '%c' on line %d\n", c, line);
  730. !         return NULL;
  731.       }
  732.   }
  733.   
  734. ***************
  735. *** 1695,1705 ****
  736.       case 'm':    return ("h_mail");
  737.       case 'w':    return ("h_write");
  738.       case 'e':    return ("h_mailz");
  739.       default:
  740.           fprintf (stderr,
  741.       "warning: non standard handling option '%c' on line %d\n", c, line);
  742. !         buf[0] = c;
  743. !         return buf;
  744.       }
  745.   }
  746.   
  747. --- 1725,1738 ----
  748.       case 'm':    return ("h_mail");
  749.       case 'w':    return ("h_write");
  750.       case 'e':    return ("h_mailz");
  751. +     case '\0': 
  752. +         fprintf (stderr,
  753. +     "warning: value not specified for option on line %d\n", line);
  754. +         return NULL;
  755.       default:
  756.           fprintf (stderr,
  757.       "warning: non standard handling option '%c' on line %d\n", c, line);
  758. !         return NULL;
  759.       }
  760.   }
  761.   
  762. diff -c -r ../3.1/src/Makefile ./src/Makefile
  763. *** ../3.1/src/Makefile    Thu May 16 12:51:35 1991
  764. --- ./src/Makefile    Thu May 16 12:43:14 1991
  765. ***************
  766. *** 1,8 ****
  767.   # Makefile for Ease Translator (et).
  768.   #
  769. ! #    $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/Makefile,v 3.1 1991/02/25 22:09:52 barnett Exp $
  770.   #
  771.   #    $Log: Makefile,v $
  772.   # Revision 3.1  1991/02/25  22:09:52  barnett
  773.   # Fixed some portability problems
  774.   #
  775. --- 1,12 ----
  776.   # Makefile for Ease Translator (et).
  777.   #
  778. ! #    $Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/Makefile,v 3.2 1991/05/16 10:45:25 barnett Exp $
  779.   #
  780.   #    $Log: Makefile,v $
  781. + # Revision 3.2  1991/05/16  10:45:25  barnett
  782. + # Better support for System V machines
  783. + # Support for machines with read only text segments
  784. + #
  785.   # Revision 3.1  1991/02/25  22:09:52  barnett
  786.   # Fixed some portability problems
  787.   #
  788. ***************
  789. *** 29,35 ****
  790.   OWNER = root
  791.   GROUP = staff
  792.   MODE = 755
  793. ! # Some systems don't have a working version of install
  794.   #INSTALL = install -c -m ${MODE} -o ${OWNER} -g ${GROUP}
  795.   INSTALL=cp
  796.   
  797. --- 33,68 ----
  798.   OWNER = root
  799.   GROUP = staff
  800.   MODE = 755
  801. ! # Important Compile flags are defined here
  802. ! # DATA_RW - this is defined if your system allows string constants to 
  803. ! #           be modifiable. If you have one of the following systems, I am told
  804. ! #        you should NOT define it: (Thanks to rainer@flyer.uni-duisburg.de)
  805. ! #             - A sun 3/60 using gcc
  806. ! #         - A esix SysV PC  with gcc
  807. ! #                - A HP9000/845 with cc
  808. ! #           The default is to define it, because this is what earlier versions 
  809. ! #           of Ease did.
  810. ! #
  811. ! # SYSV
  812. ! #         If you have a system V machine, and have <string.h>
  813. ! #        instead of <strings.h>, then define this
  814. ! #
  815. ! #OFLAGS=-DSYSV 
  816. ! OFLAGS=-DDATA_RW
  817. !  
  818. ! DEFS = ${OFLAGS}
  819. ! LIBS = -ll
  820. ! CFLAGS = -O ${DEFS} ${INCLUDE}
  821. ! CC = cc
  822. ! #CC = gcc
  823. ! YACC = yacc 
  824. ! #YACC = bison -y
  825. ! LP = lpr
  826. ! LPFLAGS = -J"Ease Source"
  827. ! # System V install different from BSD install sigh...
  828.   #INSTALL = install -c -m ${MODE} -o ${OWNER} -g ${GROUP}
  829.   INSTALL=cp
  830.   
  831. ***************
  832. *** 40,53 ****
  833.   #DEFS = -DMALLOC_DEBUG    #  Part of the SunOS malloc package
  834.   #LIBS = /usr/lib/debug/malloc.o -ll
  835.   #CFLAGS = -g  ${DEFS} ${INCLUDE}
  836. - #
  837. - # Normally, You will want the selections below 
  838. - DEFS = 
  839. - LIBS = -ll
  840. - CFLAGS = -O ${DEFS} ${INCLUDE}
  841.   
  842. - LP = lpr
  843. - LPFLAGS = -J"Ease Source"
  844.   
  845.   HDR = symtab.h
  846.   SRC = main.c emitcf.c errors.c idman.c strops.c symtab.c fixstrings.c
  847. --- 73,79 ----
  848. ***************
  849. *** 60,66 ****
  850.   all: et
  851.   
  852.   et: ${OBJ}
  853. !     cc ${CFLAGS} -o et ${OBJ} ${LIBS}
  854.   
  855.   clean: FRC
  856.       rm -f et *.o lexan.c parser.c y.output yacc.acts yacc.tmp \
  857. --- 86,92 ----
  858.   all: et
  859.   
  860.   et: ${OBJ}
  861. !     ${CC} ${CFLAGS} -o et ${OBJ} ${LIBS}
  862.   
  863.   clean: FRC
  864.       rm -f et *.o lexan.c parser.c y.output yacc.acts yacc.tmp \
  865. ***************
  866. *** 98,104 ****
  867.   
  868.   y.tab.h parser.c: parser.y
  869.       @rm -f parser.c
  870. !     yacc -v -d parser.y
  871.       sed 's/=yylex/=yyyylex/' < y.tab.c >parser.c
  872.   
  873.   # the following dummy rule is because of the results of 'make depend'
  874. --- 124,130 ----
  875.   
  876.   y.tab.h parser.c: parser.y
  877.       @rm -f parser.c
  878. !     ${YACC} -v -d parser.y
  879.       sed 's/=yylex/=yyyylex/' < y.tab.c >parser.c
  880.   
  881.   # the following dummy rule is because of the results of 'make depend'
  882. ***************
  883. *** 120,144 ****
  884.   
  885.   FRC:
  886.   
  887.   # DO NOT DELETE THIS LINE -- make depend uses it
  888.   
  889. ! main.o: main.c ./fixstrings.h /usr/include/stdio.h
  890. ! emitcf.o: emitcf.c /usr/include/stdio.h ./symtab.h ./fixstrings.h
  891. ! errors.o: errors.c /usr/include/stdio.h ./fixstrings.h
  892. ! idman.o: idman.c /usr/include/stdio.h ./symtab.h ./fixstrings.h
  893. ! strops.o: strops.c ./fixstrings.h /usr/include/stdio.h /usr/include/strings.h
  894. ! strops.o: ./symtab.h
  895. ! symtab.o: symtab.c ./fixstrings.h /usr/include/stdio.h /usr/include/ctype.h
  896. ! symtab.o: ./symtab.h
  897. ! fixstrings.o: fixstrings.c /usr/include/strings.h
  898. ! parser.o: parser.c ./fixstrings.h /usr/include/stdio.h ./symtab.h
  899. ! lexan.o: lexan.c /usr/include/stdio.h ./fixstrings.h ./symtab.h ./lexdefs.h
  900. ! main.o: main.c ./fixstrings.h /usr/include/stdio.h
  901. ! emitcf.o: emitcf.c /usr/include/stdio.h ./symtab.h ./fixstrings.h
  902. ! errors.o: errors.c /usr/include/stdio.h ./fixstrings.h
  903. ! idman.o: idman.c /usr/include/stdio.h ./symtab.h ./fixstrings.h
  904. ! strops.o: strops.c ./fixstrings.h /usr/include/stdio.h /usr/include/strings.h
  905. ! strops.o: ./symtab.h
  906. ! symtab.o: symtab.c ./fixstrings.h /usr/include/stdio.h /usr/include/ctype.h
  907. ! symtab.o: ./symtab.h
  908. ! fixstrings.o: fixstrings.c /usr/include/strings.h
  909. --- 146,179 ----
  910.   
  911.   FRC:
  912.   
  913.   # DO NOT DELETE THIS LINE -- make depend uses it
  914.   
  915. ! main.o: main.c fixstrings.h 
  916. ! emitcf.o: emitcf.c  symtab.h fixstrings.h
  917. ! errors.o: errors.c fixstrings.h
  918. ! idman.o: idman.c  symtab.h fixstrings.h
  919. ! strops.o: strops.c fixstrings.h 
  920. ! strops.o: symtab.h
  921. ! symtab.o: symtab.c fixstrings.h 
  922. ! symtab.o: symtab.h
  923. ! fixstrings.o: fixstrings.c 
  924. ! parser.o: parser.c fixstrings.h  symtab.h
  925. ! lexan.o: lexan.c  fixstrings.h symtab.h lexdefs.h
  926. ! main.o: main.c fixstrings.h 
  927. ! emitcf.o: emitcf.c  symtab.h fixstrings.h
  928. ! errors.o: errors.c fixstrings.h
  929. ! idman.o: idman.c  symtab.h fixstrings.h
  930. ! strops.o: strops.c fixstrings.h 
  931. ! strops.o: symtab.h
  932. ! symtab.o: symtab.c fixstrings.h 
  933. ! symtab.o: symtab.h
  934. ! fixstrings.o: fixstrings.c 
  935. diff -c -r ../3.1/src/ease.sh ./src/ease.sh
  936. *** ../3.1/src/ease.sh    Thu May 16 12:50:04 1991
  937. --- ./src/ease.sh    Thu May 16 12:43:19 1991
  938. ***************
  939. *** 9,15 ****
  940.   #  number of your config file into the generated sendmail.cf. 
  941.   #
  942.   #  For example, if your ease input file contains the RCS version string
  943. ! #    $Revision: 1.6 $
  944.   #  and the lines
  945.   #    define ("Received:",
  946.   #        "by ${m_oname} (${VERSION})"
  947. --- 9,15 ----
  948.   #  number of your config file into the generated sendmail.cf. 
  949.   #
  950.   #  For example, if your ease input file contains the RCS version string
  951. ! #    $Revision: 1.7 $
  952.   #  and the lines
  953.   #    define ("Received:",
  954.   #        "by ${m_oname} (${VERSION})"
  955. ***************
  956. *** 32,50 ****
  957.   #  This makes it a little easier to track down problems in networks comprising
  958.   #  dozens or hundreds of machines.
  959.   #
  960. ! # $Source: /isis/usr2/share/src/local/tc/ease/src/RCS/ease.sh,v $
  961.   # $Locker:  $
  962.   #
  963. ! # $Revision: 1.6 $
  964. ! # Check-in $Date: 90/05/07 11:15:04 $
  965.   # $State: Exp $
  966.   #
  967. ! # $Author: jeff $
  968.   #
  969. ! # $Log:    /isis/usr2/share/src/local/tc/ease/src/RCS/ease.sh,v $
  970. ! # Version 1.6  90/05/07  11:15:04  jeff
  971.   # Add support for the "-q" flag added to ease.
  972. ! # 
  973.   # Version 1.5  90/02/22  15:51:12  jeff
  974.   # Improved the comments in preparation for netwide release.
  975.   # 
  976. --- 32,54 ----
  977.   #  This makes it a little easier to track down problems in networks comprising
  978.   #  dozens or hundreds of machines.
  979.   #
  980. ! # $Source: /home/kreskin/u0/barnett/Src/ease/src/RCS/ease.sh,v $
  981.   # $Locker:  $
  982.   #
  983. ! # $Revision: 1.7 $
  984. ! # Check-in $Date: 1991/05/16 10:45:25 $
  985.   # $State: Exp $
  986.   #
  987. ! # $Author: barnett $
  988.   #
  989. ! # $Log: ease.sh,v $
  990. ! # Revision 1.7  1991/05/16  10:45:25  barnett
  991. ! # Better support for System V machines
  992. ! # Support for machines with read only text segments
  993. ! #
  994. ! # Revision 1.6  1990/05/07  11:15:04  jeff
  995.   # Add support for the "-q" flag added to ease.
  996. ! #
  997.   # Version 1.5  90/02/22  15:51:12  jeff
  998.   # Improved the comments in preparation for netwide release.
  999.   # 
  1000. ***************
  1001. *** 63,71 ****
  1002.   # Initial version
  1003.   # 
  1004.   #
  1005. ! # @(#)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 $
  1006.   
  1007. ! PATH=/bin:/usr/bin:/usr/ucb:/usr/local export PATH
  1008.   
  1009.   echo    "#"
  1010.   echo    "#   Compiled via: $0 $*"
  1011. --- 67,76 ----
  1012.   # Initial version
  1013.   # 
  1014.   #
  1015. ! # @(#)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 $
  1016.   
  1017. ! PATH=.:/bin:/usr/bin:/usr/ucb:/usr/local/bin
  1018. ! export PATH
  1019.   
  1020.   echo    "#"
  1021.   echo    "#   Compiled via: $0 $*"
  1022. ***************
  1023. *** 78,85 ****
  1024.   echo    "# located in the directory named above."
  1025.   echo    "#"
  1026.   
  1027. ! cppflags= etflags='-q'
  1028.   
  1029.   for i in ${1+"$@"} ;do
  1030.       case "$1" in
  1031.       '')    break;;
  1032. --- 83,93 ----
  1033.   echo    "# located in the directory named above."
  1034.   echo    "#"
  1035.   
  1036. ! cppflags=
  1037. ! etflags='-q'
  1038. ! CPP='cc -E'
  1039.   
  1040.   for i in ${1+"$@"} ;do
  1041.       case "$1" in
  1042.       '')    break;;
  1043. ***************
  1044. *** 101,107 ****
  1045.   
  1046.   # The sed commands delete empty comment lines and those preprocessor output
  1047.   # lines which indicate the linenumber and filename.
  1048. ! /lib/cpp -DVERSION=\"version\ $Rev\" $cppflags $file |
  1049.       et $etflags |
  1050.       sed -e '/^# *$/d' \
  1051.       -e '/^#[     ]*[0123456789][0123456789]*[     ]*".*"[     ]*$/d'
  1052. --- 109,115 ----
  1053.   
  1054.   # The sed commands delete empty comment lines and those preprocessor output
  1055.   # lines which indicate the linenumber and filename.
  1056. ! $CPP -DVERSION=\"version\ $Rev\" $cppflags $file |
  1057.       et $etflags |
  1058.       sed -e '/^# *$/d' \
  1059.       -e '/^#[     ]*[0123456789][0123456789]*[     ]*".*"[     ]*$/d'
  1060. diff -c -r ../3.1/src/errors.c ./src/errors.c
  1061. *** ../3.1/src/errors.c    Thu May 16 12:50:22 1991
  1062. --- ./src/errors.c    Thu May 16 12:43:16 1991
  1063. ***************
  1064. *** 1,6 ****
  1065.   #ifdef FLUKE
  1066.   # ifndef LINT
  1067. !     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 $";
  1068.   # endif LINT
  1069.   #endif FLUKE
  1070.   
  1071. --- 1,6 ----
  1072.   #ifdef FLUKE
  1073.   # ifndef LINT
  1074. !     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 $";
  1075.   # endif LINT
  1076.   #endif FLUKE
  1077.   
  1078. ***************
  1079. *** 16,25 ****
  1080.    *
  1081.    *    All rights reserved.
  1082.    *
  1083. !  * $Log:    /isis/usr2/share/src/local/tc/ease/src/RCS/errors.c,v $
  1084. !  * Version 2.1  90/01/30  14:17:29  jeff
  1085.    * Bruce Barnett - extensions for SunOS/Ultrix.
  1086. !  * 
  1087.    * Revision 2.0  88/06/15  14:41:10  root
  1088.    * Baseline release for net posting. ADR.
  1089.    */
  1090. --- 16,29 ----
  1091.    *
  1092.    *    All rights reserved.
  1093.    *
  1094. !  * $Log: errors.c,v $
  1095. !  * Revision 2.2  1991/05/16  10:45:25  barnett
  1096. !  * Better support for System V machines
  1097. !  * Support for machines with read only text segments
  1098. !  *
  1099. !  * Revision 2.1  1990/01/30  14:17:29  jeff
  1100.    * Bruce Barnett - extensions for SunOS/Ultrix.
  1101. !  *
  1102.    * Revision 2.0  88/06/15  14:41:10  root
  1103.    * Baseline release for net posting. ADR.
  1104.    */
  1105. ***************
  1106. *** 83,88 ****
  1107. --- 87,93 ----
  1108.       }
  1109.       if (colon)
  1110.         fputs(": ",DIAGf);
  1111. +     fflush(DIAGf);
  1112.   }
  1113.   
  1114.   
  1115. ***************
  1116. *** 158,163 ****
  1117. --- 163,169 ----
  1118.   {
  1119.       fprintf (DIAGf, "%s, line %d: Fatal Error In Translator: %s %s\n", 
  1120.            FNbuf, Lcount, sbErr, sbArg); 
  1121. +     fflush(stderr);
  1122.       exit (1);
  1123.   }
  1124.   
  1125. diff -c -r ../3.1/src/fixstrings.c ./src/fixstrings.c
  1126. *** ../3.1/src/fixstrings.c    Thu May 16 12:50:05 1991
  1127. --- ./src/fixstrings.c    Thu May 16 12:43:17 1991
  1128. ***************
  1129. *** 1,13 ****
  1130.   /*
  1131. !  * $Revision: 2.1 $
  1132. !  * Check-in $Date: 90/01/30 14:25:14 $
  1133.    *
  1134. !  * $Author: jeff $
  1135.    *
  1136. !  * $Log:    /isis/usr2/share/src/local/tc/ease/src/RCS/fixstrings.c,v $
  1137. !  * Version 2.1  90/01/30  14:25:14  jeff
  1138.    * Comment changes only.
  1139. !  * 
  1140.    * Revision 2.0  88/06/15  14:41:19  root
  1141.    * Baseline release for net posting. ADR.
  1142.    * 
  1143. --- 1,17 ----
  1144.   /*
  1145. !  * $Revision: 2.2 $
  1146. !  * Check-in $Date: 1991/05/16 10:45:25 $
  1147.    *
  1148. !  * $Author: barnett $
  1149.    *
  1150. !  * $Log: fixstrings.c,v $
  1151. !  * Revision 2.2  1991/05/16  10:45:25  barnett
  1152. !  * Better support for System V machines
  1153. !  * Support for machines with read only text segments
  1154. !  *
  1155. !  * Revision 2.1  1990/01/30  14:25:14  jeff
  1156.    * Comment changes only.
  1157. !  *
  1158.    * Revision 2.0  88/06/15  14:41:19  root
  1159.    * Baseline release for net posting. ADR.
  1160.    * 
  1161. ***************
  1162. *** 17,23 ****
  1163.    */
  1164.   #ifdef FLUKE
  1165.   # ifndef LINT
  1166. !     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 $";
  1167.   # endif LINT
  1168.   #endif FLUKE
  1169.   
  1170. --- 21,27 ----
  1171.    */
  1172.   #ifdef FLUKE
  1173.   # ifndef LINT
  1174. !     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 $";
  1175.   # endif LINT
  1176.   #endif FLUKE
  1177.   
  1178. ***************
  1179. *** 31,37 ****
  1180. --- 35,47 ----
  1181.    *  pointers.  In the other C files, cpp macros are used to revector the
  1182.    *  standard string functions to this file.
  1183.    */
  1184. + #ifdef SYSV
  1185. + #include <string.h>
  1186. + #define index strchr
  1187. + #define rindex strrchr
  1188. + #else
  1189.   #include <strings.h>
  1190. + #endif
  1191.   #define fix(s) ((s) ? (s) : "")
  1192.   
  1193.   char *Xstrcat (s1, s2)
  1194. diff -c -r ../3.1/src/fixstrings.h ./src/fixstrings.h
  1195. *** ../3.1/src/fixstrings.h    Thu May 16 12:51:35 1991
  1196. --- ./src/fixstrings.h    Thu May 16 12:43:17 1991
  1197. ***************
  1198. *** 1,11 ****
  1199.   /*
  1200. !  * $Revision: 3.1 $
  1201. !  * Check-in $Date: 1991/02/25 22:09:52 $
  1202.    * $State: Exp $
  1203.    *
  1204.    * $Author: barnett $
  1205.    *
  1206.    * $Log: fixstrings.h,v $
  1207.    * Revision 3.1  1991/02/25  22:09:52  barnett
  1208.    * Fixed some portability problems
  1209.    *
  1210. --- 1,15 ----
  1211.   /*
  1212. !  * $Revision: 3.2 $
  1213. !  * Check-in $Date: 1991/05/16 10:45:25 $
  1214.    * $State: Exp $
  1215.    *
  1216.    * $Author: barnett $
  1217.    *
  1218.    * $Log: fixstrings.h,v $
  1219. +  * Revision 3.2  1991/05/16  10:45:25  barnett
  1220. +  * Better support for System V machines
  1221. +  * Support for machines with read only text segments
  1222. +  *
  1223.    * Revision 3.1  1991/02/25  22:09:52  barnett
  1224.    * Fixed some portability problems
  1225.    *
  1226. ***************
  1227. *** 20,25 ****
  1228. --- 24,36 ----
  1229.   /* FLUKE jps 16-apr-86 - revector the string routines to custom-coded ones
  1230.    *  which handle NULL pointers.
  1231.    */
  1232. + #ifdef SYSV
  1233. + #define strchr Xindex
  1234. + #define strrchr Xrindex
  1235. + #else
  1236. + #define index Xindex
  1237. + #define rindex Xrindex
  1238. + #endif
  1239.   #define strcat    Xstrcat
  1240.   #define strncat    Xstrncat
  1241.   #define strcmp    Xstrcmp
  1242. ***************
  1243. *** 27,34 ****
  1244.   #define strcpy    Xstrcpy
  1245.   #define strncpy    Xstrncpy
  1246.   #define strlen    Xstrlen
  1247. - #define index    Xindex
  1248. - #define rindex    Xrindex
  1249.   
  1250.   extern char *Xstrcpy();
  1251.   extern char *Xindex();
  1252. --- 38,43 ----
  1253. diff -c -r ../3.1/src/lexan.l ./src/lexan.l
  1254. *** ../3.1/src/lexan.l    Thu May 16 12:51:37 1991
  1255. --- ./src/lexan.l    Thu May 16 12:43:20 1991
  1256. ***************
  1257. *** 2,8 ****
  1258.   
  1259.   #ifdef FLUKE
  1260.   # ifndef LINT
  1261. !     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 $";
  1262.   # endif LINT
  1263.   #endif FLUKE
  1264.   
  1265. --- 2,8 ----
  1266.   
  1267.   #ifdef FLUKE
  1268.   # ifndef LINT
  1269. !     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 $";
  1270.   # endif LINT
  1271.   #endif FLUKE
  1272.   
  1273. ***************
  1274. *** 23,28 ****
  1275. --- 23,32 ----
  1276.    *    All rights reserved.
  1277.    *
  1278.    * $Log: lexan.l,v $
  1279. +  * Revision 3.2  1991/05/16  10:45:25  barnett
  1280. +  * Better support for System V machines
  1281. +  * Support for machines with read only text segments
  1282. +  *
  1283.    * Revision 3.1  1991/02/25  22:09:52  barnett
  1284.    * Fixed some portability problems
  1285.    *
  1286. ***************
  1287. *** 128,133 ****
  1288. --- 132,138 ----
  1289.       { "d_background",    DOPTB },
  1290.       { "d_interactive",    DOPTI },
  1291.       { "d_queue",        DOPTQ },
  1292. +     { "dbm",        DBM },       /* IDA */
  1293.       { "default",        DEFAULT }, /* IDA */
  1294.       { "define",        DEFINE },
  1295.        { "eval",        EVAL },
  1296. diff -c -r ../3.1/src/main.c ./src/main.c
  1297. *** ../3.1/src/main.c    Thu May 16 12:51:38 1991
  1298. --- ./src/main.c    Thu May 16 12:43:20 1991
  1299. ***************
  1300. *** 1,6 ****
  1301.   #ifdef FLUKE
  1302.   # ifndef LINT
  1303. !     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 $";
  1304.   # endif LINT
  1305.   #endif FLUKE
  1306.   
  1307. --- 1,6 ----
  1308.   #ifdef FLUKE
  1309.   # ifndef LINT
  1310. !     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 $";
  1311.   # endif LINT
  1312.   #endif FLUKE
  1313.   
  1314. ***************
  1315. *** 17,22 ****
  1316. --- 17,26 ----
  1317.    *    All rights reserved.
  1318.    *
  1319.    * $Log: main.c,v $
  1320. +  * Revision 3.2  1991/05/16  10:45:25  barnett
  1321. +  * Better support for System V machines
  1322. +  * Support for machines with read only text segments
  1323. +  *
  1324.    * Revision 3.1  1991/02/25  22:09:52  barnett
  1325.    * Fixed some portability problems
  1326.    *
  1327. ***************
  1328. *** 48,53 ****
  1329. --- 52,61 ----
  1330.   #include "fixstrings.h"
  1331.   #include <stdio.h>
  1332.   #include <ctype.h>
  1333. + #ifdef SYSV
  1334. + #define index strchr
  1335. + #define rindex strrchr
  1336. + #endif
  1337.   #ifdef MALLOC_DEBUG
  1338.   extern int malloc_debug();
  1339.   extern int malloc_verify();
  1340. ***************
  1341. *** 57,62 ****
  1342. --- 65,74 ----
  1343.   char *infile = 0;            /* input file name */
  1344.   char *outfile = 0;            /* output file name */
  1345.   extern void InitError (), 
  1346. + #ifndef    DATA_RW
  1347. +         InitStrOps (),
  1348. +         InitParser (),
  1349. + #endif
  1350.           InitSymbolTable (),
  1351.           DefScan (),
  1352.           FatalError (),
  1353. ***************
  1354. *** 94,99 ****
  1355. --- 106,116 ----
  1356.           malloc_debug(1);
  1357.   #endif MALLOC_DEBUG
  1358.       InitError ();            /* initialize error conditions */
  1359. + #ifndef    DATA_RW
  1360. +     InitParser ();
  1361. +     InitStrOps();
  1362. +     
  1363. + #endif
  1364.       InitSymbolTable ();        /* initialize the symbol table */
  1365.       PreLoad ();            /* preload special identifiers */
  1366.       GetArgs (argc, argv);        /* set up argument files       */
  1367. ***************
  1368. *** 193,199 ****
  1369.       printf ("##           TO THIS FILE WILL DISAPPEAR THE     ##\n");
  1370.       printf ("##           NEXT TIME THAT EASE IS RUN.         ##\n");
  1371.       printf ("##                                               ##\n");
  1372. !     printf ("##           $Revision: 3.1 $                    ##\n");
  1373.       printf ("##                                               ##\n");
  1374.       printf ("###################################################\n");
  1375.   }
  1376. --- 210,216 ----
  1377.       printf ("##           TO THIS FILE WILL DISAPPEAR THE     ##\n");
  1378.       printf ("##           NEXT TIME THAT EASE IS RUN.         ##\n");
  1379.       printf ("##                                               ##\n");
  1380. !     printf ("##           $Revision: 3.2 $                    ##\n");
  1381.       printf ("##                                               ##\n");
  1382.       printf ("###################################################\n");
  1383.   }
  1384. diff -c -r ../3.1/src/parser.y ./src/parser.y
  1385. *** ../3.1/src/parser.y    Thu May 16 12:51:41 1991
  1386. --- ./src/parser.y    Thu May 16 12:43:15 1991
  1387. ***************
  1388. *** 1,7 ****
  1389.   %{
  1390.   #ifdef FLUKE
  1391.   # ifndef LINT
  1392. !     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 $";
  1393.   # endif LINT
  1394.   #endif FLUKE
  1395.   
  1396. --- 1,7 ----
  1397.   %{
  1398.   #ifdef FLUKE
  1399.   # ifndef LINT
  1400. !     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 $";
  1401.   # endif LINT
  1402.   #endif FLUKE
  1403.   
  1404. ***************
  1405. *** 22,27 ****
  1406. --- 22,31 ----
  1407.    *    All rights reserved.
  1408.    *
  1409.    * $Log: parser.y,v $
  1410. +  * Revision 3.2  1991/05/16  10:45:25  barnett
  1411. +  * Better support for System V machines
  1412. +  * Support for machines with read only text segments
  1413. +  *
  1414.    * Revision 3.1  1991/02/25  22:09:52  barnett
  1415.    * Fixed some portability problems
  1416.    *
  1417. ***************
  1418. *** 53,58 ****
  1419. --- 57,63 ----
  1420.   extern char      *MakePosTok ();
  1421.   extern char      *GetField ();
  1422.   extern char      *Bracket ();
  1423. + extern char      *DbmParen ();
  1424.   extern char      *MakeRSCall ();
  1425.   extern char      *CheckMailer ();
  1426.   extern char      *CheckRS ();
  1427. ***************
  1428. *** 61,70 ****
  1429. --- 66,82 ----
  1430.   extern void       AssignType ();
  1431.   extern void       RemoveSymbol ();
  1432.   extern void       yyerror ();
  1433. + extern void       FatalError ();
  1434.   extern short RMatch;        /* ruleset match flag               */
  1435.   
  1436. + extern char *strdup(); 
  1437. + #ifdef DATA_RW
  1438.   char *Cbuf = " ";        /* character buffer                 */
  1439.   char *Mbuf = "$ ";        /* macro buffer                        */
  1440. + #else
  1441. + char *Cbuf = NULL;
  1442. + char *Mbuf = NULL;
  1443. + #endif
  1444.   char *Tsb;            /* pointer to temporary string buffer */
  1445.   char *Tsb1;            /* pointer to another temporary string buffer */
  1446.   char *Flaglist;            /* pointer to header flag list          */
  1447. ***************
  1448. *** 73,78 ****
  1449. --- 85,98 ----
  1450.   extern int yychar;
  1451.   extern int    yydebug;
  1452.   
  1453. + #ifndef    DATA_RW
  1454. + void InitParser()
  1455. + {
  1456. +     if(!(Cbuf = strdup(" ")) || !(Mbuf = strdup("$ ")))
  1457. +         FatalError("Out of memory in InitParser()", (char *)NULL);
  1458. + }
  1459. + #endif
  1460.   static void    
  1461.   Free( ptr )
  1462.   char *ptr;
  1463. ***************
  1464. *** 165,170 ****
  1465. --- 185,191 ----
  1466.   %token MRECIPIENT MSENDER NEXT OPTIONS PRECEDENCE READCLASS RESOLVE
  1467.   %token RETRY RETURN RULESET TRUSTED USER
  1468.   %token YPALIAS YPMAP YPPASSWD EVAL RESOLVED QUOTE ASM PROGRAM DEFAULT ALIAS
  1469. + %token DBM
  1470.   
  1471.   %token ASGN COLON COMMA DEFINE DOLLAR FIELD LBRACE LPAREN RBRACE
  1472.   %token RPAREN SEMI STAR SLASH
  1473. ***************
  1474. *** 184,189 ****
  1475. --- 205,211 ----
  1476.   %type    <psb>        doptid eoptid idlist fcond dlist mflags route mdefs
  1477.   %type    <psb>        matchaddr matchtok action actionstmt mailerspec mtdef
  1478.   %type    <psb>        rwaddr rwtok ftype reftok rword cantok resolution
  1479. + %type    <psb>        dbmtok dbmval dbmvaltok dbmstuff
  1480.   %type    <psb>        userspec hword hostid dheader mdefine
  1481.   %type    <psb>        catstring catstringlist canval canvaltok
  1482.   %type    <ival>        anychar
  1483. ***************
  1484. *** 896,901 ****
  1485. --- 918,926 ----
  1486.           |    cantok {
  1487.                   $$ = $1;
  1488.               }
  1489. +         |    dbmtok {
  1490. +                 $$ = $1;
  1491. +             }
  1492.           |    ALIAS LPAREN reftok  RPAREN {
  1493.                   $$ = ListAppend("$(@", $3, "$:$)");
  1494.               }
  1495. ***************
  1496. *** 990,995 ****
  1497. --- 1015,1075 ----
  1498.           |    HOSTNUM LPAREN reftok RPAREN {
  1499.                   $$ = Bracket ($3, FALSE);
  1500.                   Free ($3);
  1501. +             }
  1502. +         ;
  1503. + dbmtok        :    DBM LPAREN DOLLAR IDENT COMMA dbmstuff RPAREN {
  1504. +                 $$ = DbmParen ($4->psb, $6);
  1505. +                 RemoveSymbol($4);
  1506. +                 Free ($6);
  1507. +             }
  1508. +                 ;
  1509. + dbmstuff    :    dbmval COMMA dbmval {
  1510. +                 $$ = ListAppend ($1, Tsb = ListAppend ("$@", $3, (char *) NULL),
  1511. +                          (char *) NULL);
  1512. +                 Free (Tsb);
  1513. +             }
  1514. +         |        dbmval {
  1515. +                 $$ = $1;
  1516. +             }
  1517. +         ;
  1518. + dbmval        :    dbmvaltok {
  1519. +                 $$ = $1;
  1520. +             }
  1521. +         |    dbmval dbmvaltok {
  1522. +                 $$ = ListAppend ($1, $2, (char *) NULL);
  1523. +                 Free ($1);
  1524. + /*                Free ($2); */
  1525. +             }
  1526. +         ;
  1527. + dbmvaltok    :    IDENT {
  1528. +                 $$ = ListAppend ($1->psb, (char *) NULL, (char *) NULL);
  1529. +                 RemoveSymbol ($1);
  1530. +             }
  1531. +         |    SCONST {
  1532. +                 $$ = ListAppend (MacScan ($1), (char *) NULL, (char *) NULL);
  1533. +                 Free ($1);
  1534. +             }
  1535. +                 |    NEXT LPAREN RPAREN {    /* I Used next earlier, but now use default - because it is clearer syntax */
  1536. +                 $$ = "$:";
  1537. +             }
  1538. +                 |    NEXT LPAREN dbmval RPAREN {
  1539. +                 $$ = ListAppend("$:", $3, (char *)NULL);
  1540. +             }
  1541. +                 |    DEFAULT LPAREN RPAREN {
  1542. +                 $$ = "$:";
  1543. +             }
  1544. +                 |    DEFAULT LPAREN dbmval RPAREN {
  1545. +                 $$ = ListAppend("$:", $3, (char *)NULL);
  1546. +             }
  1547. +         |    reftok {
  1548. +                 $$ = $1;
  1549. +             }
  1550. +         |    SEPCHAR {
  1551. +                 *Cbuf = $1;
  1552. +                 $$ = ListAppend (Cbuf, (char *) NULL, (char *) NULL);
  1553.               }
  1554.           ;
  1555.   
  1556. diff -c -r ../3.1/src/strops.c ./src/strops.c
  1557. *** ../3.1/src/strops.c    Thu May 16 12:51:42 1991
  1558. --- ./src/strops.c    Thu May 16 12:43:21 1991
  1559. ***************
  1560. *** 1,6 ****
  1561.   #ifdef FLUKE
  1562.   # ifndef LINT
  1563. !     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 $";
  1564.   # endif LINT
  1565.   #endif FLUKE
  1566.   
  1567. --- 1,6 ----
  1568.   #ifdef FLUKE
  1569.   # ifndef LINT
  1570. !     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 $";
  1571.   # endif LINT
  1572.   #endif FLUKE
  1573.   
  1574. ***************
  1575. *** 18,23 ****
  1576. --- 18,27 ----
  1577.    *    All rights reserved.
  1578.    *
  1579.    * $Log: strops.c,v $
  1580. +  * Revision 3.2  1991/05/16  10:45:25  barnett
  1581. +  * Better support for System V machines
  1582. +  * Support for machines with read only text segments
  1583. +  *
  1584.    * Revision 3.1  1991/02/25  22:09:52  barnett
  1585.    * Fixed some portability problems
  1586.    *
  1587. ***************
  1588. *** 48,55 ****
  1589. --- 52,64 ----
  1590.   extern char *      malloc ();
  1591.   
  1592.   short  Rformat = FALSE;            /* class read format flag      */
  1593. + #ifdef    DATA_RW
  1594.   static char   *Ptok   = "$  ";        /* positional token structure     */
  1595.   static char   *Cfield = "$= ";        /* class reference structure      */
  1596. + #else
  1597. + static char   *Ptok   = NULL;        /* positional token structure     */
  1598. + static char   *Cfield = NULL;        /* class reference structure      */
  1599. + #endif
  1600.   static char   *Ofield = "$-";        /* one token match structure      */
  1601.   static char   *Zfield = "$*";        /* zero or more tokens structure  */
  1602.   static char   *Pfield = "$+";        /* one or more tokens structure      */
  1603. ***************
  1604. *** 61,71 ****
  1605. --- 70,110 ----
  1606.    *  with release 3.0.
  1607.    */
  1608.   
  1609. + #ifdef    DATA_RW
  1610.   static char   *Mfield = "$% ";        /*    match in specified YP map */
  1611.   static char   *Nfield = "$! ";        /* no match in specified YP map */
  1612.   static char   *Mtest  = "$? ";        /* conditional macro test string  */
  1613. + #else
  1614. + static char   *Mfield = NULL;        /*    match in specified YP map */
  1615. + static char   *Nfield = NULL;        /* no match in specified YP map */
  1616. + static char   *Mtest  = NULL;        /* conditional macro test string  */
  1617. + #endif
  1618.   
  1619. + #ifndef    DATA_RW
  1620. + /* This section of code is for those machines with split text and data
  1621. +  * areas - where string constants are not modifiable
  1622. +  */
  1623. + #define nil (char *)0
  1624.   
  1625. + char *      Strdup(string) /* a clone of the strdup() routine */
  1626. + char    *string;
  1627. + {
  1628. +     char *s;
  1629. +     s=malloc(length(string));
  1630. +     if (!s) return (nil);
  1631. +     (void) sprintf(s,"%s",string);
  1632. +     return (s);
  1633. + }
  1634. + void InitStrOps()
  1635. + {
  1636. +     if(!(Ptok = Strdup("$  ")) || !(Cfield = Strdup("$= ")) ||
  1637. +        !(Mfield = Strdup("$% ")) || !(Nfield = Strdup("$! ")) ||
  1638. +        !(Mtest = Strdup("$? ")))
  1639. +            FatalError("Out of memory in InitStrOps()", (char *)NULL);
  1640. + }
  1641. + #endif
  1642.   /*
  1643.    *    ConvOpt () -- Convert an Ease option identifier (optid) by returning a
  1644.    *              string representation of the cf format.  
  1645. ***************
  1646. *** 404,409 ****
  1647. --- 443,471 ----
  1648.       if (dflag)
  1649.           res = strcat (res, "$");
  1650.       res = strcat (res, "]");
  1651. +     return (res);
  1652. + }
  1653. + /*
  1654. +  *    DbmParen () -- Construct and return a cf string form of the 
  1655. +  *              dbm reference of the IDA database identifier passed in
  1656. +  *              the string parameter db_psb, looking up the string identifier
  1657. +  *              passed in the string parameter lup_psb.
  1658. +  *
  1659. +  */
  1660. + char *
  1661. + DbmParen (db_psb, lup_psb)
  1662. + char *db_psb;            /* identifier of data base */
  1663. + char *lup_psb;            /* identifier being looked up */
  1664. + {
  1665. +     register char *res;    /* resultant cf form           */
  1666. +     
  1667. +     res = (char *) malloc (strlen (lup_psb) + 7);
  1668. +     if (res == NULL)
  1669. +         FatalError ("System out of string space in DbmParen ()", (char *) NULL);
  1670. +     res = strcpy (res, "$(x ");
  1671. +     *(res+2) = *db_psb;
  1672. +     res = strcat (res, lup_psb);
  1673. +     res = strcat (res, " $)");
  1674.       return (res);
  1675.   }
  1676.   
  1677. diff -c -r ../3.1/utils/Makefile ./utils/Makefile
  1678. *** ../3.1/utils/Makefile    Thu May 16 12:50:13 1991
  1679. --- ./utils/Makefile    Thu May 16 12:38:36 1991
  1680. ***************
  1681. *** 7,13 ****
  1682.   clean:
  1683.   
  1684.   install:
  1685. !     ${INSTALL} cfdiff.csh  ${BINDIR}/cfdiff
  1686. !     ${INSTALL} cfstrip.csh ${BINDIR}/cfstrip
  1687.       chmod 755 ${BINDIR}/cfstrip  ${BINDIR}/cfdiff
  1688.   
  1689. --- 7,13 ----
  1690.   clean:
  1691.   
  1692.   install:
  1693. !     ${INSTALL} cfdiff.sh  ${BINDIR}/cfdiff
  1694. !     ${INSTALL} cfstrip.sh ${BINDIR}/cfstrip
  1695.       chmod 755 ${BINDIR}/cfstrip  ${BINDIR}/cfdiff
  1696.   
  1697.