home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume27 / ease3.5 / patch06 next >
Encoding:
Text File  |  1993-11-20  |  39.8 KB  |  1,543 lines

  1. Newsgroups: comp.sources.unix
  2. From: barnett@crdgw1.ge.com (Bruce G. Barnett)
  3. Subject: v27i088: Ease 3.5 - high-level sendmail.cf language, Patch06
  4. Sender: unix-sources-moderator@gw.home.vix.com
  5. Approved: vixie@gw.home.vix.com
  6.  
  7. Submitted-By: barnett@crdgw1.ge.com (Bruce G. Barnett)
  8. Posting-Number: Volume 27, Issue 88
  9. Archive-Name: ease3.5/patch06
  10.  
  11. Ease 3.6 adds support for AIX's sendmail, plus some bug fixes...
  12.  
  13. --------------------------
  14. This is an official patch that converts Ease 3.5 to Ease 3.6
  15. Usage:
  16.     patch -p <Patch6
  17.  
  18. *** ../3.5/README    Tue Nov 26 16:41:32 1991
  19. --- README    Fri May 15 16:51:34 1992
  20. ***************
  21. *** 1,4 ****
  22. ! This is release 3.5 of the CFC and Ease programs.
  23.   
  24.   Ease is a compiler for sendmail configuration files.  It reads a high-level
  25.   mail configuration language and produces a sendmail.cf file.  If you've ever
  26. --- 1,4 ----
  27. ! This is release 3.6 of the CFC and Ease programs.
  28.   
  29.   Ease is a compiler for sendmail configuration files.  It reads a high-level
  30.   mail configuration language and produces a sendmail.cf file.  If you've ever
  31. ***************
  32. *** 24,29 ****
  33. --- 24,30 ----
  34.   Ease 3.0 was developed by Bruce G. Barnett and has been enhanced and
  35.   maintained by various persons, most notably
  36.       Arnold D. Robbins (arnold@unix.cc.emory.edu),
  37. +     (Possible new address: <arnold@penfold.gatech.edu>)
  38.       Stephen Schaefer of Bowling Green State University,
  39.       Raymond A. Schnitzler of Bellcore,
  40.       Andrew Partan of the Corporation for Open Systems,
  41. ***************
  42. *** 171,176 ****
  43. --- 172,178 ----
  44.       -s => SunOS
  45.       -i => IDA sendmail
  46.       -d => Ultrix
  47. +     -a => A/IX
  48.       -C [..] => add predefined classes 
  49.           e.g. -C ADG => added classes A, B, and G
  50.   
  51. ***************
  52. *** 207,212 ****
  53. --- 209,215 ----
  54.   
  55.   Release Notes:
  56.   
  57. +     3.6:    Added A/IX support
  58.       3.5:    Documentation and Copyright changes, 
  59.           doc/makefile changed
  60.       3.4:
  61. *** ../3.5/cfc/cfc.c    Tue Nov 26 16:41:33 1991
  62. --- cfc/cfc.c    Fri May 15 16:52:02 1992
  63. ***************
  64. *** 1,9 ****
  65.   #ifndef lint
  66. ! static char RCSid[] = "$Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/cfc/RCS/cfc.c,v 3.3 1991/09/09 16:34:44 barnett Exp $";
  67.   #endif
  68.   
  69.   /*
  70.    * $Log: cfc.c,v $
  71.    * Revision 3.3  1991/09/09  16:34:44  barnett
  72.    * Bug fixes. Better handling of those $? conditionals.
  73.    *
  74. --- 1,12 ----
  75.   #ifndef lint
  76. ! static char RCSid[] = "$Header: /home/alydar/u0/barnett/Src/Ease/ease/cfc/RCS/cfc.c,v 3.4 1992/05/15 20:45:23 barnett Exp $";
  77.   #endif
  78.   
  79.   /*
  80.    * $Log: cfc.c,v $
  81. +  * Revision 3.4  1992/05/15  20:45:23  barnett
  82. +  * Added A/IX support
  83. +  *
  84.    * Revision 3.3  1991/09/09  16:34:44  barnett
  85.    * Bug fixes. Better handling of those $? conditionals.
  86.    *
  87. ***************
  88. *** 93,101 ****
  89.   int ida = 0;            /* IDA sendmail options  */
  90.   int sunos  = 0;            /* Special parsing for SunOS - bgb */
  91.   int DECos  = 0;            /* Special parsing for Ultrix - bgb */
  92.                   /* NOTE: can't use 'ultrix' cause of cpp */
  93.   int hpos = 0;            /* HP/UX */
  94.   char *classes = 0;            /* list of classes defined */
  95.   main (argc, argv)
  96.   int argc;
  97. --- 96,109 ----
  98.   int ida = 0;            /* IDA sendmail options  */
  99.   int sunos  = 0;            /* Special parsing for SunOS - bgb */
  100.   int DECos  = 0;            /* Special parsing for Ultrix - bgb */
  101. + int aix_os  = 0;            /* Special parsing for AIX - bgb */
  102.                   /* NOTE: can't use 'ultrix' cause of cpp */
  103.   int hpos = 0;            /* HP/UX */
  104. ! int ifset;            /* make it a global variable
  105. !                    true if in $? ... $| ... $. */
  106. ! int quoting;            /* same with quoting 
  107. !                  * Typically turned on after an ifset(( X, "
  108. !                  */
  109.   char *classes = 0;            /* list of classes defined */
  110.   main (argc, argv)
  111.   int argc;
  112. ***************
  113. *** 106,113 ****
  114.       extern char *optarg;
  115.       int i,c;
  116.   
  117. !     while ((c = getopt (argc, argv, "icdhusC:")) != EOF) {
  118.           switch (c) {
  119.           case 'c':
  120.               compat = 1;
  121.               break;
  122. --- 114,124 ----
  123.       extern char *optarg;
  124.       int i,c;
  125.   
  126. !     while ((c = getopt (argc, argv, "acdhisuC:")) != EOF) {
  127.           switch (c) {
  128. +         case 'a':
  129. +             aix_os = 1;
  130. +             break;
  131.           case 'c':
  132.               compat = 1;
  133.               break;
  134. ***************
  135. *** 141,147 ****
  136.               "warning: ignoring non-flag command line arguments\n");
  137.   
  138.       printf ("/***********************************************************/\n");
  139. !     printf ("/* This ease file generated by cfc version $Revision: 3.3 $*/\n");
  140.       printf ("/* automatically from a sendmail.cf file                   */\n");
  141.       printf ("/* It may need to be edited before feeding to ease.        */\n");
  142.       printf ("/***********************************************************/\n");
  143. --- 152,158 ----
  144.               "warning: ignoring non-flag command line arguments\n");
  145.   
  146.       printf ("/***********************************************************/\n");
  147. !     printf ("/* This ease file generated by cfc version $Revision: 3.4 $*/\n");
  148.       printf ("/* automatically from a sendmail.cf file                   */\n");
  149.       printf ("/* It may need to be edited before feeding to ease.        */\n");
  150.       printf ("/***********************************************************/\n");
  151. ***************
  152. *** 294,300 ****
  153.               }
  154.           }
  155.           /* let's make the default configuration nicer for SunOS - bgb */
  156. !         if (DECos || ida  || hpos ) {
  157.               printf ("\tany_in_myhostname : match (1) in c_myname;\n");
  158.           }
  159.           if (sunos) {
  160. --- 305,311 ----
  161.               }
  162.           }
  163.           /* let's make the default configuration nicer for SunOS - bgb */
  164. !         if (DECos || ida  || hpos || aix_os) {
  165.               printf ("\tany_in_myhostname : match (1) in c_myname;\n");
  166.           }
  167.           if (sunos) {
  168. ***************
  169. *** 332,342 ****
  170.   
  171.       /* first, split it up into LHS, RHS, COMMENT */
  172.   
  173. !     while (cp && *cp && *cp != '\t')
  174. !         cp++;
  175.       if (!*cp) {
  176.           fprintf(stderr,
  177. !             "Unexpected EOL when expecting right hand side of rule\n");
  178.           lhs(buffer+1);
  179.           printf("\n\tMissingRightHandSide();\n");
  180.           return;
  181. --- 343,358 ----
  182.   
  183.       /* first, split it up into LHS, RHS, COMMENT */
  184.   
  185. !     if (aix_os ) {
  186. !         while (cp && *cp && *cp != '\t' && *cp != ' ')
  187. !           cp++;
  188. !     } else {
  189. !         while (cp && *cp && *cp != '\t')
  190. !           cp++;
  191. !     }
  192.       if (!*cp) {
  193.           fprintf(stderr,
  194. !             "Unexpected EOL when expecting right hand side of rule, line: %d\n", line);
  195.           lhs(buffer+1);
  196.           printf("\n\tMissingRightHandSide();\n");
  197.           return;
  198. ***************
  199. *** 344,363 ****
  200.       *cp = '\0';
  201.   
  202.       cp++;
  203. !     while (cp && *cp && *cp == '\t')
  204. !         cp++;
  205. !     cp2 = cp;
  206. !     while (cp && *cp && *cp != '\t')
  207. !         cp++;
  208. !     if (*cp == '\t' && cp[1])
  209. !     {
  210. !         *cp = '\0';
  211. !         com++;
  212. !         cp++;
  213. !         while (cp && *cp && *cp == '\t')
  214. !             cp++;
  215.       }
  216. - - 
  217.       /* now print */
  218.       lhs (buffer + 1);    /* left hand side */
  219.       if (com)
  220. --- 360,394 ----
  221.       *cp = '\0';
  222.   
  223.       cp++;
  224. !     if (aix_os) {
  225. !         while (cp && *cp && ((*cp == ' ') || (*cp == '\t')))
  226. !           cp++;
  227. !         cp2 = cp;    /* cp2 points to rhs */
  228. !         while (cp && *cp && *cp != ' ')
  229. !           cp++;
  230. !         if (*cp == ' ' && cp[1])
  231. !           {
  232. !           *cp = '\0';
  233. !           com++;
  234. !           cp++;
  235. !           while (cp && *cp && ((*cp == ' ') || (*cp == '\t')))
  236. !             cp++;
  237. !           }
  238. !     } else {
  239. !         while (cp && *cp && *cp == '\t')
  240. !           cp++;
  241. !         cp2 = cp;
  242. !         while (cp && *cp && *cp != '\t')
  243. !           cp++;
  244. !         if (*cp == '\t' && cp[1])
  245. !           {
  246. !           *cp = '\0';
  247. !           com++;
  248. !           cp++;
  249. !           while (cp && *cp && *cp == '\t')
  250. !             cp++;
  251. !           }
  252.       }
  253.       /* now print */
  254.       lhs (buffer + 1);    /* left hand side */
  255.       if (com)
  256. ***************
  257. *** 373,381 ****
  258.   {
  259.       register char *cp = text;
  260.       register int conditional = 0;
  261. - -     register int quoting = 0;
  262.       register int open = 0;
  263. !     int    ifset = 0;
  264.   
  265.       printf ("\tif (");
  266.       for (; *cp; cp++)
  267. --- 404,412 ----
  268.   {
  269.       register char *cp = text;
  270.       register int conditional = 0;
  271.       register int open = 0;
  272. !     ifset = 0;
  273. !     quoting = 0;
  274.   
  275.       printf ("\tif (");
  276.       for (; *cp; cp++)
  277. ***************
  278. *** 384,390 ****
  279.           case '$':
  280.               if (quoting)
  281.               {
  282. !                 quoting = 0;
  283.                   putchar ('"');
  284.               }
  285.               switch (*++cp) {
  286. --- 415,421 ----
  287.           case '$':
  288.               if (quoting)
  289.               {
  290. !                 quoting = 0;    /* turn it off */
  291.                   putchar ('"');
  292.               }
  293.               switch (*++cp) {
  294. ***************
  295. *** 400,406 ****
  296.               case '=':
  297.                   switch(*++cp) {
  298.                     case 'w':
  299. !                     if (sunos || ida || DECos ) {
  300.                       printf (" any_in_myhostname ");
  301.                       break;
  302.                       } /* else fall through */
  303. --- 431,437 ----
  304.               case '=':
  305.                   switch(*++cp) {
  306.                     case 'w':
  307. !                     if (sunos || ida || DECos || aix_os || hpos ) {
  308.                       printf (" any_in_myhostname ");
  309.                       break;
  310.                       } /* else fall through */
  311. ***************
  312. *** 429,435 ****
  313.                   conditional++;ifset++;
  314.                   break;
  315.               case '|':
  316. !                 if ( ! conditional) complain("in left hand side of rule, found a '$|' without a previous '$?'");
  317.                   if ( ifset) {
  318.                       /* I don't think I have to output a ", " */
  319.                       /* but let's test */
  320. --- 460,466 ----
  321.                   conditional++;ifset++;
  322.                   break;
  323.               case '|':
  324. !                 if ( ! ifset) complain("in left hand side of rule, found a '$|' without a previous '$?'");
  325.                   if ( ifset) {
  326.                       /* I don't think I have to output a ", " */
  327.                       /* but let's test */
  328. ***************
  329. *** 504,514 ****
  330.               break;
  331.           }
  332.       }
  333. !     if (quoting)
  334. !         putchar ('"');
  335.       while (open--)
  336.           putchar (')');
  337. !     if (conditional) { 
  338.           /* the lhs was missing a $. - let's add one automatically */
  339.           complain ("Expected '$.' on left hand side of rule - adding one anyway");
  340.           putchar (')');
  341. --- 535,547 ----
  342.               break;
  343.           }
  344.       }
  345. !     if (quoting) {
  346. !         quoting = 0;
  347. !         putchar ('"');
  348. !     }
  349.       while (open--)
  350.           putchar (')');
  351. !     if (ifset) { 
  352.           /* the lhs was missing a $. - let's add one automatically */
  353.           complain ("Expected '$.' on left hand side of rule - adding one anyway");
  354.           putchar (')');
  355. ***************
  356. *** 527,534 ****
  357.       char *cp1;
  358.       register int open = 0;
  359.       register int conditional = 0;    /* true if in an ifset condition */
  360. !     register int quoting = 0;    /* true if in a string */
  361. !     register int ifset = 0;    /* true if in ifset(), like quoting */
  362.       register int needconcat = 0;    /* true if an $? on line (lookahead) */
  363.       register int didconcat = 0;    /* true if did the concat()    */
  364.       register int indbm = 0;    /* true if in IDA $( $) construct */
  365. --- 560,566 ----
  366.       char *cp1;
  367.       register int open = 0;
  368.       register int conditional = 0;    /* true if in an ifset condition */
  369. ! /*    register int quoting = 0;    /* true if in a string */
  370.       register int needconcat = 0;    /* true if an $? on line (lookahead) */
  371.       register int didconcat = 0;    /* true if did the concat()    */
  372.       register int indbm = 0;    /* true if in IDA $( $) construct */
  373. ***************
  374. *** 538,543 ****
  375. --- 570,578 ----
  376.   
  377.       printf ("\t\t");
  378.   
  379. +     if (aix_os ) { /* handle spaces here */
  380. +         while (cp && *cp && ((*cp == ' ' ) || (*cp == '\t' ))) cp++;
  381. +     }
  382.       /* Need to handle this line */
  383.       /* R$+<@$=S>    $:$1<@$2>$?R<$R>$.    */
  384.       for(cp1=cp;*cp1;cp1++) {
  385. ***************
  386. *** 544,553 ****
  387.           if (*cp1 == '$' && (cp1+1) && *(cp1+1)== '?')
  388.             needconcat = 1;    /* there is an ifset on this line */
  389.       }
  390. !     if (*cp == '$' && index ("#@:", cp[1]) != NULL)
  391.           ;    /* not the default */
  392. !     else
  393. !     {
  394.           printf ("retry (");
  395.           open++;
  396.       }
  397. --- 579,595 ----
  398.           if (*cp1 == '$' && (cp1+1) && *(cp1+1)== '?')
  399.             needconcat = 1;    /* there is an ifset on this line */
  400.       }
  401. !     /* should handle $?X here - this was added for AIX */
  402. !     if (*cp == '$' && cp[1] == '?' ) {
  403. !         ++cp; /* now points at '?' */
  404. !         printf ("ifset (%s, ",  macro (*++cp));
  405. !         ++cp;    /* point past letter */
  406. !         conditional++;
  407. !         ifset++;
  408. !         quoting++;
  409. !     } else     if (*cp == '$' && index ("#@:", cp[1]) != NULL) {
  410.           ;    /* not the default */
  411. !     } else {
  412.           printf ("retry (");
  413.           open++;
  414.       }
  415. ***************
  416. *** 556,562 ****
  417.         {
  418.             switch (*cp) {
  419.           case '$':
  420. !           if (quoting && ! ifset )
  421.               {
  422.               quoting = 0;
  423.               putchar ('"');
  424. --- 598,604 ----
  425.         {
  426.             switch (*cp) {
  427.           case '$':
  428. !           if (quoting && ! ifset && ! didconcat )
  429.               {
  430.               quoting = 0;
  431.               putchar ('"');
  432. ***************
  433. *** 601,616 ****
  434.                 break;
  435.               case '?':
  436.                 if (didconcat) {
  437. !               printf ("\",");
  438.                 needconcat = 0; /* don't need this */
  439.                 }
  440.                 printf ("ifset (%s, \"", macro (*++cp));
  441.                 conditional++;
  442.                 ifset++;
  443. !               quoting++;
  444.                 break;
  445.               case '|':
  446. !               if ( ! conditional) complain("right side of rule - found '$|' without '$?'");
  447.                 if ( ifset) {
  448.                 printf("\", \"");
  449.                 } else {
  450. --- 643,662 ----
  451.                 break;
  452.               case '?':
  453.                 if (didconcat) {
  454. !               if ( quoting) {
  455. !                   printf ("\"");
  456. !                   quoting = 0;
  457. !               }
  458. !               printf (",");
  459.                 needconcat = 0; /* don't need this */
  460.                 }
  461.                 printf ("ifset (%s, \"", macro (*++cp));
  462.                 conditional++;
  463.                 ifset++;
  464. !               quoting++; 
  465.                 break;
  466.               case '|':
  467. !               if ( ! ifset) complain("right side of rule - found '$|' without '$?'");
  468.                 if ( ifset) {
  469.                 printf("\", \"");
  470.                 } else {
  471. ***************
  472. *** 661,667 ****
  473.                 if (needconcat && cp+1 && cp+2 &&
  474.                     ! ((*(cp+1) == '$') && (*(cp+2) == '?'))){ 
  475.                     printf ("concat (\"");
  476. !                   open++;didconcat++;
  477.                 }
  478.                 open++;
  479.                 } 
  480. --- 707,714 ----
  481.                 if (needconcat && cp+1 && cp+2 &&
  482.                     ! ((*(cp+1) == '$') && (*(cp+2) == '?'))){ 
  483.                     printf ("concat (\"");
  484. !                   open++;didconcat++; /* here? */
  485. !                   quoting++;  /* this doesn't work */
  486.                 }
  487.                 open++;
  488.                 } 
  489. ***************
  490. *** 699,704 ****
  491. --- 746,752 ----
  492.                 printf ("$%c", *cp);
  493.                 break;
  494.               default:
  495. + #ifdef REMOVE
  496.                 if (ifset ) {
  497.                 if (quoting)
  498.                   printf ("${%s}", macro (*cp));
  499. ***************
  500. *** 705,720 ****
  501.                 else
  502.                   printf ("$%s", macro (*cp));
  503.                 } else { /* not in ifset() */
  504.                 if (quoting)
  505.                   printf ("${%s}", macro (*cp));
  506.                 else 
  507.                   printf ("$%s", macro (*cp));
  508.                 }
  509.                 break;
  510.             }
  511.             break;         /* not a character that starts with a $ */
  512.           default:
  513. !           if ( ifset  && quoting ) {
  514.                 putchar(*cp);
  515.             } else if (ifset  && ! quoting) {
  516.                 if ( ispunct (*cp)) {
  517. --- 753,771 ----
  518.                 else
  519.                   printf ("$%s", macro (*cp));
  520.                 } else { /* not in ifset() */
  521. + #endif /* REMOVE */
  522.                 if (quoting)
  523.                   printf ("${%s}", macro (*cp));
  524.                 else 
  525.                   printf ("$%s", macro (*cp));
  526. + #ifdef REMOVE
  527.                 }
  528. + #endif /* REMOVE */
  529.                 break;
  530.             }
  531.             break;         /* not a character that starts with a $ */
  532.           default:
  533. !           if ( quoting ) {
  534.                 putchar(*cp);
  535.             } else if (ifset  && ! quoting) {
  536.                 if ( ispunct (*cp)) {
  537. ***************
  538. *** 746,757 ****
  539.             }
  540.         } /* end of for */
  541.   out:
  542. !     if (quoting)
  543. !         putchar ('"');
  544.       while (open--)
  545.           putchar (')');
  546.       printf (";\n");
  547. !     if (conditional)
  548.           die ("rhs - $? without $.");
  549.   }
  550.   /* parseresolve - parse this mailer/host/user mess */
  551. --- 797,810 ----
  552.             }
  553.         } /* end of for */
  554.   out:
  555. !     if (quoting) {
  556. !         quoting = 0;    /* end quoting */
  557. !         putchar ('"');
  558. !     }
  559.       while (open--)
  560.           putchar (')');
  561.       printf (";\n");
  562. !     if (ifset)
  563.           die ("rhs - $? without $.");
  564.   }
  565.   /* parseresolve - parse this mailer/host/user mess */
  566. ***************
  567. *** 758,768 ****
  568.   parseresolve(cp)
  569.   char    *cp;
  570.   {
  571. !     int quoting = 0;
  572.       int open = 0;
  573. - -     int ifset = 0;
  574.       char *addrops;
  575.       addrops = ".:;%@!=/[]?#^,<>$"; /* should be defined from input file */
  576.       printf ("resolve (mailer (");
  577.       /* this is a simple (idiotic) parser (hack) that scans the right
  578.          hand side of a $# rule
  579. --- 811,821 ----
  580.   parseresolve(cp)
  581.   char    *cp;
  582.   {
  583. ! /*    int quoting = 0; */
  584.       int open = 0;
  585.       char *addrops;
  586.       addrops = ".:;%@!=/[]?#^,<>$"; /* should be defined from input file */
  587. + parseall:    
  588.       printf ("resolve (mailer (");
  589.       /* this is a simple (idiotic) parser (hack) that scans the right
  590.          hand side of a $# rule
  591. ***************
  592. *** 772,778 ****
  593.          "$# mailer $: something with a $macro"  or
  594.          "$# $M $: user"  or
  595.          "$# $1 "   (IDA sendmail )
  596. !        
  597.          Note that there may be special constructs
  598.          in the host field, i.e.
  599.          "$1", "[$2]", "$w", or "$K".
  600. --- 825,833 ----
  601.          "$# mailer $: something with a $macro"  or
  602.          "$# $M $: user"  or
  603.          "$# $1 "   (IDA sendmail )
  604. !        But I have seen
  605. !        "$?U$#....$|$#.....$.
  606. !      
  607.          Note that there may be special constructs
  608.          in the host field, i.e.
  609.          "$1", "[$2]", "$w", or "$K".
  610. ***************
  611. *** 797,802 ****
  612. --- 852,858 ----
  613.       /* we may now be pointing to:
  614.          $@ - the host name
  615.          $: - the user
  616. +        $#
  617.          or a macro
  618.          or nothing?! (*cp == 0);
  619.          /* don't look at the '$' */
  620. ***************
  621. *** 846,854 ****
  622.       }
  623.       /* print host name ($@host ) */
  624.       if (ifset)
  625. !       printf (" host (");
  626.       else
  627.         printf ("),\n\t\t\t\thost (");
  628.       for (;cp && *cp;cp++) {
  629.       if (*cp != '$') { 
  630.           putchar (*cp);
  631. --- 902,911 ----
  632.       }
  633.       /* print host name ($@host ) */
  634.       if (ifset)
  635. !       printf ("), host (");
  636.       else
  637.         printf ("),\n\t\t\t\thost (");
  638. +   parsehost2:
  639.       for (;cp && *cp;cp++) {
  640.       if (*cp != '$') { 
  641.           putchar (*cp);
  642. ***************
  643. *** 858,863 ****
  644. --- 915,928 ----
  645.           if ( *(cp+1) == ':') {
  646.           cp++; /* parseuser expects ':' */
  647.           goto parseuser;
  648. +         } else if ( *(cp+1) == ']') {
  649. +         printf (")");
  650. +         cp++;cp++;
  651. +         goto parsehost2;
  652. +         } else if ( *(cp+1) == '[') {
  653. +         printf (" canon (");
  654. +         cp++;cp++; 
  655. +         goto parsehost2;
  656.           } else {
  657.           putchar(*cp++); /* print '$' */
  658.           printf("%s", macro(*cp)); /* and next */
  659. ***************
  660. *** 873,879 ****
  661.         fprintf(stderr,
  662.             "Expected ':', found '%c' after '$' on line %d\n",*cp,line);
  663.       /* looking at the user string */
  664. !     quoting = 0;
  665.       for (cp++; cp && *cp; cp++) {
  666.       if (quoting ) {
  667.   /*        if (isalnum(*cp) || isspace(*cp)) { */
  668. --- 938,944 ----
  669.         fprintf(stderr,
  670.             "Expected ':', found '%c' after '$' on line %d\n",*cp,line);
  671.       /* looking at the user string */
  672. !     quoting = 0; 
  673.       for (cp++; cp && *cp; cp++) {
  674.       if (quoting ) {
  675.   /*        if (isalnum(*cp) || isspace(*cp)) { */
  676. ***************
  677. *** 915,941 ****
  678.           } else if ( *cp == '|') {
  679.               /* This is the middle of an ifset */
  680.               if ( ! ifset ) {
  681. !             fprintf(stderr,
  682. !                 "Found a '$|' in the user address without a '$?' on line %d\n",
  683. !                 *cp,line);
  684.               cp++; /* ignore */
  685.               } else { /* I expected this */
  686. - -             printf(")),\n\t\t\t\t(");
  687.               cp++;
  688. !             goto parsehost;
  689.               }
  690.           } else if ( *cp == '.') {
  691.               /* This is the END of an ifset */
  692.               if ( ! ifset ) {
  693. !             fprintf(stderr,
  694. !                 "Found a '$.' in the user address without a '$?' on line %d\n",
  695. !                 *cp,line);
  696.               cp++; /* ignore */
  697.               } else { /* I expected this */
  698.               /* cp++; */ /* Don't do this, the for loop increments cp */
  699. !             printf("))");
  700.               ifset = 0;
  701.               }
  702.           } else {
  703.               putchar ('$'); /* print $ */
  704.               printf("%s",macro(*cp)); /* and macro */
  705. --- 980,1011 ----
  706.           } else if ( *cp == '|') {
  707.               /* This is the middle of an ifset */
  708.               if ( ! ifset ) {
  709. !             complain("Found a '$|' in the user address without a '$?'");
  710.               cp++; /* ignore */
  711.               } else { /* I expected this */
  712.               cp++;
  713. !             if (*cp == '$' && *(cp+1) == '#' ) {
  714. !                 printf(")),\n\t\t\t\t");
  715. !                 cp++;
  716. !                 goto parseall;
  717. !             } else {
  718. !                 printf(")),\n\t\t\t\t(");
  719. !               goto parsehost;
  720. !               }
  721.               }
  722.           } else if ( *cp == '.') {
  723.               /* This is the END of an ifset */
  724.               if ( ! ifset ) {
  725. !             complain("Found a '$.' in the user address without a '$?'");
  726.               cp++; /* ignore */
  727.               } else { /* I expected this */
  728.               /* cp++; */ /* Don't do this, the for loop increments cp */
  729. !             printf(")");
  730.               ifset = 0;
  731.               }
  732. +         } else if ( *cp == '#') {
  733. +             cp++;
  734. +             goto parsehost;
  735.           } else {
  736.               putchar ('$'); /* print $ */
  737.               printf("%s",macro(*cp)); /* and macro */
  738. ***************
  739. *** 950,961 ****
  740.           } 
  741.       } /* end of quoting/not quoting */
  742.       }
  743. !     if (quoting) printf("\"");
  744.     out:
  745.       if (ifset) {
  746. !     fprintf(stderr,
  747. !         "EOL while expecting '$.' on line  %d\n",
  748. !                 line);
  749.       ifset = 0;
  750.       }
  751.       while (open--) printf(")");
  752. --- 1020,1033 ----
  753.           } 
  754.       } /* end of quoting/not quoting */
  755.       }
  756. !     if (quoting) {
  757. !     quoting = 0;
  758. !     printf("\"");
  759. !     }
  760.     out:
  761.       if (ifset) {
  762. !     complain("EOL while expecting '$.' (adding missing piece)");
  763. !     printf (")");    
  764.       ifset = 0;
  765.       }
  766.       while (open--) printf(")");
  767. ***************
  768. *** 1033,1039 ****
  769.                   }
  770.                   break;
  771.               case '|':
  772. !                 if ( ! conditional) die("def - $| without $?");
  773.                   if ( ifset) {
  774.                       printf("\", \"");
  775.                   } else {
  776. --- 1105,1111 ----
  777.                   }
  778.                   break;
  779.               case '|':
  780. !                 if ( ! ifset) die("def - $| without $?");
  781.                   if ( ifset) {
  782.                       printf("\", \"");
  783.                   } else {
  784. ***************
  785. *** 1096,1102 ****
  786.           concat--;
  787.       }
  788.       printf (";\n");
  789. !     if (conditional)
  790.           die ("def - $? without $.");
  791.   }
  792.   
  793. --- 1168,1174 ----
  794.           concat--;
  795.       }
  796.       printf (";\n");
  797. !     if (ifset)
  798.           die ("def - $? without $.");
  799.   }
  800.   
  801. ***************
  802. *** 1289,1295 ****
  803.       if (ngets (buffer) != NULL)
  804.       {
  805.           line++;
  806. !         if (buffer[0] == '\t')
  807.           {
  808.               cp = buffer;
  809.               goto loop;
  810. --- 1361,1367 ----
  811.       if (ngets (buffer) != NULL)
  812.       {
  813.           line++;
  814. !         if (aix_os ? ((buffer[0] == ' ') || (buffer[0] == '\t')) : (buffer[0] == '\t'))
  815.           {
  816.               cp = buffer;
  817.               goto loop;
  818. ***************
  819. *** 1392,1398 ****
  820.                   if (quote) {
  821.                   putchar('"');quote--;
  822.                   }
  823. !                 if ( ! conditional) complain("header - $| without $?");
  824.                   if ( ifset) {
  825.                   printf(", "); needcomma=0;
  826.                   } else {
  827. --- 1464,1470 ----
  828.                   if (quote) {
  829.                   putchar('"');quote--;
  830.                   }
  831. !                 if ( ! ifset) complain("header - $| without $?");
  832.                   if ( ifset) {
  833.                   printf(", "); needcomma=0;
  834.                   } else {
  835. ***************
  836. *** 1464,1470 ****
  837.       if (ngets (buffer) != NULL)
  838.       {
  839.           line++;
  840. !         if (buffer[0] == '\t')
  841.           {
  842.               if ( concat ) {
  843.                   printf("), ");needcomma=0;
  844. --- 1536,1542 ----
  845.       if (ngets (buffer) != NULL)
  846.       {
  847.           line++;
  848. !         if (aix_os ? ((buffer[0] == ' ') || (buffer[0] == '\t')) : (buffer[0] == '\t'))
  849.           {
  850.               if ( concat ) {
  851.                   printf("), ");needcomma=0;
  852. ***************
  853. *** 1501,1507 ****
  854.       if (flags)
  855.           printf ("\t};\n");
  856.   
  857. !     if (conditional)
  858.           die ("header translation  problem: $? without $.");
  859.   }
  860.   
  861. --- 1573,1579 ----
  862.       if (flags)
  863.           printf ("\t};\n");
  864.   
  865. !     if (ifset)
  866.           die ("header translation  problem: $? without $.");
  867.   }
  868.   
  869. *** ../3.5/Makefile    Tue Nov 26 16:41:35 1991
  870. --- Makefile    Fri May 15 16:51:33 1992
  871. ***************
  872. *** 1,6 ****
  873. ! #    $Header: /home/kreskin/u0/barnett/Src/Ease/ease/RCS/Makefile,v 3.4 1991/10/15 17:37:27 barnett Exp $
  874.   #
  875.   #    $Log: Makefile,v $
  876.   # Revision 3.4  1991/10/15  17:37:27  barnett
  877.   # Changed 'make shar'
  878.   #
  879. --- 1,9 ----
  880. ! #    $Header: /home/alydar/u0/barnett/Src/Ease/ease/RCS/Makefile,v 3.5 1992/05/15 20:45:59 barnett Exp $
  881.   #
  882.   #    $Log: Makefile,v $
  883. + # Revision 3.5  1992/05/15  20:45:59  barnett
  884. + # Added A/IX support
  885. + #
  886.   # Revision 3.4  1991/10/15  17:37:27  barnett
  887.   # Changed 'make shar'
  888.   #
  889. ***************
  890. *** 32,37 ****
  891. --- 35,46 ----
  892.   #CONVERT_FLAGS=-i
  893.   #SunOS Subsidiary
  894.   CONVERT_FLAGS=-s -CV
  895. + #ultrix
  896. + #CONVERT_FLAGS=-d -C SDIZFN
  897. + #hp/ux
  898. + #CONVERT_FLAGS= -i
  899. + #A/IX
  900. + #CONVERT_FLAGS=-a -C FGEHV
  901.   
  902.   #what extenstion do you want for the manual pages?
  903.   #EXT=1
  904. *** ../3.5/doc/cfc.man    Tue Nov 26 16:41:37 1991
  905. --- doc/cfc.man    Fri May 15 16:51:51 1992
  906. ***************
  907. *** 1,7 ****
  908.   ...
  909. ! ... $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/doc/RCS/cfc.man,v 3.3 1991/09/09 16:36:05 barnett Exp $
  910.   ... 
  911.   ... $Log: cfc.man,v $
  912.   ... Revision 3.3  1991/09/09  16:36:05  barnett
  913.   ... minor bug fixes
  914.   ...
  915. --- 1,10 ----
  916.   ...
  917. ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/cfc.man,v 3.4 1992/03/26 17:59:46 barnett Exp $
  918.   ... 
  919.   ... $Log: cfc.man,v $
  920. + ... Revision 3.4  1992/03/26  17:59:46  barnett
  921. + ... Corrections by Arnold Robbins
  922. + ...
  923.   ... Revision 3.3  1991/09/09  16:36:05  barnett
  924.   ... minor bug fixes
  925.   ...
  926. ***************
  927. *** 127,134 ****
  928.   Move some comments.
  929.   The block close on rulesets often comes after the comments that
  930.   precede the next ruleset or mailer specification.
  931. - - 
  932. - - .RE
  933.   .P
  934.   In short,
  935.   .I cfc
  936. --- 130,135 ----
  937. *** ../3.5/doc/ap1    Tue Nov 26 16:41:38 1991
  938. --- doc/ap1    Fri May 15 16:51:40 1992
  939. ***************
  940. *** 42,44 ****
  941. --- 42,45 ----
  942.   *  Taken from pages 19 and 20 of the Sendmail Installation and Operation Guide
  943.   (SMM:7 in the 4.3 BSD UNIX System Manager's Manual), by Eric Allman.
  944.   .FE
  945. + .bp
  946. *** ../3.5/doc/ap2    Tue Nov 26 16:41:39 1991
  947. --- doc/ap2    Fri May 15 16:51:40 1992
  948. ***************
  949. *** 1,7 ****
  950.   ...
  951. ! ... $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/doc/RCS/ap2,v 3.3 1991/09/09 16:36:05 barnett Exp $
  952.   ... 
  953.   ... $Log: ap2,v $
  954.   ... Revision 3.3  1991/09/09  16:36:05  barnett
  955.   ... minor bug fixes
  956.   ...
  957. --- 1,10 ----
  958.   ...
  959. ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/ap2,v 3.4 1992/03/26 17:59:46 barnett Exp $
  960.   ... 
  961.   ... $Log: ap2,v $
  962. + ... Revision 3.4  1992/03/26  17:59:46  barnett
  963. + ... Corrections by Arnold Robbins
  964. + ...
  965.   ... Revision 3.3  1991/09/09  16:36:05  barnett
  966.   ... minor bug fixes
  967.   ...
  968. ***************
  969. *** 40,46 ****
  970.   .sp
  971.   .TS 
  972.   center box;
  973. ! c|c
  974.   l|l.
  975.   Sendmail Option (\fBEase\fR)    Sendmail Option (Raw)    Special Values
  976.   =
  977. --- 43,49 ----
  978.   .sp
  979.   .TS 
  980.   center box;
  981. ! c|c|c
  982.   l|l.
  983.   Sendmail Option (\fBEase\fR)    Sendmail Option (Raw)    Special Values
  984.   =
  985. ***************
  986. *** 93,101 ****
  987.   \fIo_remote\fR    R (SunOS)
  988.   \fIo_aliasfile\fR    Y (SunOS)
  989.   \fIo_envelope\fR    / (IDA)
  990. - - 
  991. - - 
  992. - - 
  993.   .TE
  994.   .PP
  995.   * This option is undocumented and unimplemented in 4.3BSD. It is
  996. --- 96,101 ----
  997. ***************
  998. *** 110,112 ****
  999. --- 110,113 ----
  1000.   \(bu This option is undocumented in 4.3BSD.
  1001.   It specifies the address of a Postmaster who should be carbon-copied on
  1002.   all returned bad mail.
  1003. + .bp
  1004. *** ../3.5/doc/ap3    Tue Nov 26 16:41:40 1991
  1005. --- doc/ap3    Fri May 15 16:51:41 1992
  1006. ***************
  1007. *** 1,11 ****
  1008.   ...
  1009. ! ... $Header: /isis/usr2/share/src/local/tc/ease/doc/RCS/ap3,v 2.1 90/01/30 12:57:45 jeff Exp $
  1010.   ... 
  1011. ! ... $Log:    /isis/usr2/share/src/local/tc/ease/doc/RCS/ap3,v $
  1012. ! ... Version 2.1  90/01/30  12:57:45  jeff
  1013.   ... Made changes corresponding to Ease release 2.1Alpha.
  1014.   ... se.
  1015. ! ... 
  1016.   ... Version 2.0  90/01/30  12:50:38  jeff
  1017.   ... Baseline version, corresponding to netwide release 2.0.
  1018.   ... 
  1019. --- 1,14 ----
  1020.   ...
  1021. ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/ap3,v 2.2 1992/03/26 17:59:46 barnett Exp $
  1022.   ... 
  1023. ! ... $Log: ap3,v $
  1024. ! ... Revision 2.2  1992/03/26  17:59:46  barnett
  1025. ! ... Corrections by Arnold Robbins
  1026. ! ...
  1027. ! ... Revision 2.1  1990/01/30  12:57:45  jeff
  1028.   ... Made changes corresponding to Ease release 2.1Alpha.
  1029.   ... se.
  1030. ! ...
  1031.   ... Version 2.0  90/01/30  12:50:38  jeff
  1032.   ... Baseline version, corresponding to netwide release 2.0.
  1033.   ... 
  1034. ***************
  1035. *** 37,43 ****
  1036.   .TS 
  1037.   center box;
  1038.   c|c
  1039. ! l|l.
  1040.   Mailer Flag (\fBEase\fR)    Mailer Flag (Raw)
  1041.   =
  1042.   \fIf_ffrom\fR    f
  1043. --- 40,46 ----
  1044.   .TS 
  1045.   center box;
  1046.   c|c
  1047. ! l|l|l.
  1048.   Mailer Flag (\fBEase\fR)    Mailer Flag (Raw)
  1049.   =
  1050.   \fIf_ffrom\fR    f
  1051. ***************
  1052. *** 72,74 ****
  1053. --- 75,78 ----
  1054.   both undocumented and unimplemented. \fBEase\fR supports it in anticipation
  1055.   of future developments.
  1056.   .FE
  1057. + .bp
  1058. *** ../3.5/doc/cover    Tue Nov 26 16:41:40 1991
  1059. --- doc/cover    Fri May 15 16:51:42 1992
  1060. ***************
  1061. *** 1,7 ****
  1062.   ...
  1063. ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/cover,v 3.4 1991/11/25 18:17:56 barnett Exp $
  1064.   ...
  1065.   ... $Log: cover,v $
  1066.   ... Revision 3.4  1991/11/25  18:17:56  barnett
  1067.   ... added .bp at EOF
  1068.   ...
  1069. --- 1,10 ----
  1070.   ...
  1071. ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/cover,v 3.5 1992/03/26 17:59:46 barnett Exp $
  1072.   ...
  1073.   ... $Log: cover,v $
  1074. + ... Revision 3.5  1992/03/26  17:59:46  barnett
  1075. + ... Corrections by Arnold Robbins
  1076. + ...
  1077.   ... Revision 3.4  1991/11/25  18:17:56  barnett
  1078.   ... added .bp at EOF
  1079.   ...
  1080. ***************
  1081. *** 61,63 ****
  1082. --- 64,68 ----
  1083.   \fICorporate Research and Development\fR
  1084.   .DE
  1085.   .bp
  1086. + .ps 
  1087. + .nr PS 10
  1088. *** ../3.5/doc/ease.paper    Tue Nov 26 16:41:43 1991
  1089. --- doc/ease.paper    Fri May 15 16:52:01 1992
  1090. ***************
  1091. *** 1,7 ****
  1092.   ...
  1093. ! ... $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/doc/RCS/ease.paper,v 3.3 1991/09/09 16:36:05 barnett Exp $
  1094.   ... 
  1095.   ... $Log: ease.paper,v $
  1096.   ... Revision 3.3  1991/09/09  16:36:05  barnett
  1097.   ... minor bug fixes
  1098.   ...
  1099. --- 1,10 ----
  1100.   ...
  1101. ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/ease.paper,v 3.4 1992/03/26 17:59:46 barnett Exp $
  1102.   ... 
  1103.   ... $Log: ease.paper,v $
  1104. + ... Revision 3.4  1992/03/26  17:59:46  barnett
  1105. + ... Corrections by Arnold Robbins
  1106. + ...
  1107.   ... Revision 3.3  1991/09/09  16:36:05  barnett
  1108.   ... minor bug fixes
  1109.   ...
  1110. ***************
  1111. *** 833,843 ****
  1112.   the \fBconditional-expression\fR evaluates to the string "New Jersey".
  1113.   .NH 2
  1114.   Latest Changes
  1115.   The first two releases of \fBEase\fP provided a good starting point
  1116.   for managing \fIsendmail\fP  files. However, the translation wasn't
  1117. ! perfect. Some editing needed to be done before \fBEase\fB could be
  1118.   used.
  1119. ! Bruce G. Barnett made modifications to Arnold Robbin's \fBEase\fP to
  1120.   sendmail convertor \fIcfc\fP and tested these changes to verify a
  1121.   \fIsendmail\fP configuration fle could be translated into \fBEase\fP
  1122.   and back with no errors: at least for the more common versions of
  1123. --- 836,847 ----
  1124.   the \fBconditional-expression\fR evaluates to the string "New Jersey".
  1125.   .NH 2
  1126.   Latest Changes
  1127. + .PP
  1128.   The first two releases of \fBEase\fP provided a good starting point
  1129.   for managing \fIsendmail\fP  files. However, the translation wasn't
  1130. ! perfect. Some editing needed to be done before \fBEase\fP could be
  1131.   used.
  1132. ! Bruce G. Barnett made modifications to Arnold Robbins' \fBEase\fP to
  1133.   sendmail convertor \fIcfc\fP and tested these changes to verify a
  1134.   \fIsendmail\fP configuration fle could be translated into \fBEase\fP
  1135.   and back with no errors: at least for the more common versions of
  1136. ***************
  1137. *** 906,911 ****
  1138.   .PP
  1139.   The most up to date version of \fBEase\fR should be gotten from the
  1140.   nearest USENET \fBcomp.sources.unix\fR archive site.
  1141. ! # Local variables:
  1142. ! # mode: nroff
  1143. ! # end:
  1144. --- 910,916 ----
  1145.   .PP
  1146.   The most up to date version of \fBEase\fR should be gotten from the
  1147.   nearest USENET \fBcomp.sources.unix\fR archive site.
  1148. ! .bp
  1149. ! ... Local variables:
  1150. ! ... mode: nroff
  1151. ! ... end:
  1152. *** ../3.5/TODO    Tue Nov 26 16:41:44 1991
  1153. --- TODO    Fri May 15 16:51:36 1992
  1154. ***************
  1155. *** 2,7 ****
  1156. --- 2,12 ----
  1157.   -------------------------
  1158.   
  1159.   
  1160. + Handle the following:
  1161. + R$+<@$=S>       $?S $#ether $@$S $:$2!$1 $| $#dni $@$2 $:$1 $.
  1162. + R$+<@$=S.uucp>  $?S $#ether $@$S $:$2!$1 $| $#dni $@$2 $:$1 $.
  1163.   Fix the following constructs so that cfc/et handles the conversion properly:
  1164.   
  1165.       # indirect macros, i.e. 
  1166. *** ../3.5/src/Makefile    Tue Nov 26 16:41:45 1991
  1167. --- src/Makefile    Fri May 15 16:51:51 1992
  1168. ***************
  1169. *** 1,8 ****
  1170.   # Makefile for Ease Translator (et).
  1171.   #
  1172. ! #    $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/Makefile,v 3.3 1991/09/09 16:33:23 barnett Exp $
  1173.   #
  1174.   #    $Log: Makefile,v $
  1175.   # Revision 3.3  1991/09/09  16:33:23  barnett
  1176.   # Minor bug fix release
  1177.   #
  1178. --- 1,11 ----
  1179.   # Makefile for Ease Translator (et).
  1180.   #
  1181. ! #    $Header: /home/alydar/u0/barnett/Src/Ease/ease/src/RCS/Makefile,v 3.4 1992/05/15 20:44:39 barnett Exp $
  1182.   #
  1183.   #    $Log: Makefile,v $
  1184. + # Revision 3.4  1992/05/15  20:44:39  barnett
  1185. + # Added A/IX support
  1186. + #
  1187.   # Revision 3.3  1991/09/09  16:33:23  barnett
  1188.   # Minor bug fix release
  1189.   #
  1190. ***************
  1191. *** 44,58 ****
  1192.   #         - A esix SysV PC  with gcc
  1193.   #                - A HP9000/845 with cc
  1194.   #         - Apollo/Domain with BSD4.3 environment
  1195. ! #           The default is to define it, because this is what earlier versions 
  1196. ! #           of Ease did.
  1197.   #
  1198.   # SYSV
  1199.   #         If you have a system V machine, and have <string.h>
  1200.   #        instead of <strings.h>, then define this
  1201.   #
  1202.   #OFLAGS=-DSYSV 
  1203. - - OFLAGS=-DDATA_RW
  1204.    
  1205.   DEFS = ${OFLAGS}
  1206.   LIBS = -ll
  1207. --- 47,60 ----
  1208.   #         - A esix SysV PC  with gcc
  1209.   #                - A HP9000/845 with cc
  1210.   #         - Apollo/Domain with BSD4.3 environment
  1211. ! #           The default is to not define it, earlier versions did define it
  1212.   #
  1213. + #OFLAGS=-DDATA_RW
  1214.   # SYSV
  1215.   #         If you have a system V machine, and have <string.h>
  1216.   #        instead of <strings.h>, then define this
  1217.   #
  1218.   #OFLAGS=-DSYSV 
  1219.    
  1220.   DEFS = ${OFLAGS}
  1221.   LIBS = -ll
  1222. ***************
  1223. *** 77,83 ****
  1224.   # The following two lines are used with the SunOS malloc() debug package.
  1225.   #DEFS = -DMALLOC_DEBUG    #  Part of the SunOS malloc package
  1226.   #LIBS = /usr/lib/debug/malloc.o -ll
  1227. ! CFLAGS = -g  ${DEFS} ${INCLUDE}
  1228.   
  1229.   
  1230.   HDR = symtab.h
  1231. --- 79,85 ----
  1232.   # The following two lines are used with the SunOS malloc() debug package.
  1233.   #DEFS = -DMALLOC_DEBUG    #  Part of the SunOS malloc package
  1234.   #LIBS = /usr/lib/debug/malloc.o -ll
  1235. ! #CFLAGS = -g  ${DEFS} ${INCLUDE}
  1236.   
  1237.   
  1238.   HDR = symtab.h
  1239. *** ../3.5/src/parser.y    Tue Nov 26 16:41:46 1991
  1240. --- src/parser.y    Fri May 15 16:51:59 1992
  1241. ***************
  1242. *** 1,7 ****
  1243.   %{
  1244.   #ifdef FLUKE
  1245.   # ifndef LINT
  1246. !     static char RCSid[] = "@(#)FLUKE  $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/parser.y,v 3.4 1991/10/15 17:02:04 barnett Exp $";
  1247.   # endif LINT
  1248.   #endif FLUKE
  1249.   
  1250. --- 1,7 ----
  1251.   %{
  1252.   #ifdef FLUKE
  1253.   # ifndef LINT
  1254. !     static char RCSid[] = "@(#)FLUKE  $Header: /home/alydar/u0/barnett/Src/Ease/ease/src/RCS/parser.y,v 3.5 1992/05/15 20:44:39 barnett Exp $";
  1255.   # endif LINT
  1256.   #endif FLUKE
  1257.   
  1258. ***************
  1259. *** 22,27 ****
  1260. --- 22,30 ----
  1261.    *    All rights reserved.
  1262.    *
  1263.    * $Log: parser.y,v $
  1264. +  * Revision 3.5  1992/05/15  20:44:39  barnett
  1265. +  * Added A/IX support
  1266. +  *
  1267.    * Revision 3.4  1991/10/15  17:02:04  barnett
  1268.    * Detect if (one_or_more) next ($2) error
  1269.    *
  1270. ***************
  1271. *** 221,230 ****
  1272.   %type    <optval>    optid
  1273.   %type    <flgval>    flagid
  1274.   %type    <mpval>        mvar
  1275. ! %type    <psb>        ifresmatch elseresmatch ifresroute elseresroute 
  1276.   /* needed special class with no comma's allowed */
  1277.   %type    <ival>        anycharbutcomma
  1278.   %type    <psb>        matchaddrnocomma matchtoknocomma
  1279.   
  1280.   %left COMMA
  1281.   %left LPAREN RPAREN
  1282. --- 224,234 ----
  1283.   %type    <optval>    optid
  1284.   %type    <flgval>    flagid
  1285.   %type    <mpval>        mvar
  1286. ! %type    <psb>        ifresmatch /* elseresmatch */ ifresroute elseresroute 
  1287.   /* needed special class with no comma's allowed */
  1288.   %type    <ival>        anycharbutcomma
  1289.   %type    <psb>        matchaddrnocomma matchtoknocomma
  1290. + %type    <psb>        ifresolution
  1291.   
  1292.   %left COMMA
  1293.   %left LPAREN RPAREN
  1294. ***************
  1295. *** 854,871 ****
  1296.           ;
  1297.   
  1298.   /* just like matchaddr - but comma's aren't allowed */
  1299. ! matchaddrnocomma    :    /* empty */ {
  1300. !                 $$ = NULL;
  1301. !             }
  1302. !         |    matchaddrnocomma matchtoknocomma {
  1303.                   $$ = ListAppend ($1, $2, (char *) NULL);
  1304.                   Free ($1); /* NULL */
  1305.               }
  1306.           |    error {
  1307.                   $$ = NULL;
  1308.               }
  1309.           ;
  1310.   
  1311.   matchtok    :    IDENT {
  1312.                   $$ = GetField ($1);
  1313.               }
  1314. --- 858,876 ----
  1315.           ;
  1316.   
  1317.   /* just like matchaddr - but comma's aren't allowed */
  1318. ! matchaddrnocomma    :    matchaddrnocomma matchtoknocomma {
  1319.                   $$ = ListAppend ($1, $2, (char *) NULL);
  1320.                   Free ($1); /* NULL */
  1321.               }
  1322. +         |  matchtoknocomma {
  1323. +                 $$ = $1;
  1324. +             }
  1325.           |    error {
  1326.                   $$ = NULL;
  1327.               }
  1328.           ;
  1329.   
  1330. + /* matchtok is one of several pieces in the lhs of the rule */
  1331.   matchtok    :    IDENT {
  1332.                   $$ = GetField ($1);
  1333.               }
  1334. ***************
  1335. *** 925,953 ****
  1336.               }
  1337.       ;
  1338.   
  1339. ! ifresmatch    :    matchaddrnocomma elseresmatch {
  1340. !                 if ($2 != NULL) {
  1341. !                     $$ = ListAppend ($1, $2, "$|");
  1342.                       Free ($1);
  1343. !                     Free ($2);
  1344.                   } else
  1345.                       $$ = $1;
  1346.               }
  1347. !         |    error {
  1348.                   $$ = NULL;
  1349.               }
  1350.           ;
  1351.   
  1352. ! elseresmatch    :
  1353.               COMMA matchaddrnocomma {
  1354.                   $$ = $2;
  1355.               }
  1356. !         ;
  1357.   
  1358.   actionstmt    :    action LPAREN rwaddr RPAREN SEMI {
  1359.                   $$ = ListAppend ($1, $3, (char *) NULL);
  1360.                   Free ($3);
  1361.               }
  1362.           |    RESOLVE LPAREN resolution RPAREN SEMI {
  1363.                   $$ = $3;
  1364.               }
  1365. --- 930,975 ----
  1366.               }
  1367.       ;
  1368.   
  1369. ! /* The object of an ifset(V, ..... ) 
  1370. !  * may or may not have a comma */
  1371. ! ifresmatch    :    matchaddrnocomma COMMA matchaddrnocomma  {
  1372. !                 if ($3 != NULL) {
  1373. !                     $$ = ListAppend ($1, $3, "$|");
  1374.                       Free ($1);
  1375. !                     Free ($3);
  1376.                   } else
  1377.                       $$ = $1;
  1378.               }
  1379. !         |     COMMA matchaddrnocomma  {
  1380. !                 if ($2 != NULL) {
  1381. !                     $$ = ListAppend ("$|", $2, (char *)NULL);
  1382. !                     Free ($2);
  1383. !                 } else
  1384. !                     $$ = $2;
  1385. !             }
  1386. !         |    matchaddrnocomma  {
  1387. !                   $$ = $1;
  1388. !             }
  1389. !         |    /* empty */ {
  1390.                   $$ = NULL;
  1391.               }
  1392.           ;
  1393.   
  1394. ! /*elseresmatch    :
  1395.               COMMA matchaddrnocomma {
  1396.                   $$ = $2;
  1397.               }
  1398. !         ; */
  1399.   
  1400.   actionstmt    :    action LPAREN rwaddr RPAREN SEMI {
  1401.                   $$ = ListAppend ($1, $3, (char *) NULL);
  1402.                   Free ($3);
  1403.               }
  1404. +         |    IFSET LPAREN IDENT COMMA ifresolution RPAREN SEMI {
  1405. +                 $$ = MakeCond ($3, MacScan($5)); 
  1406. +             }
  1407.           |    RESOLVE LPAREN resolution RPAREN SEMI {
  1408.                   $$ = $3;
  1409.               }
  1410. ***************
  1411. *** 957,962 ****
  1412. --- 979,992 ----
  1413.               }
  1414.           ;
  1415.   
  1416. + ifresolution    : RESOLVE LPAREN resolution RPAREN {
  1417. +           $$ = $3;
  1418. +         }
  1419. +             | RESOLVE LPAREN resolution RPAREN COMMA RESOLVE LPAREN resolution RPAREN {
  1420. +           $$ = ListAppend ( $3, $8, "$|");
  1421. +         Free ($3);
  1422. +         Free ($8);
  1423. +         }
  1424.   action        :    RETRY {
  1425.                   $$ = NULL;
  1426.               }
  1427. *** ../3.5/src/main.c    Tue Nov 26 16:41:53 1991
  1428. --- src/main.c    Fri May 15 16:51:57 1992
  1429. ***************
  1430. *** 1,6 ****
  1431.   #ifdef FLUKE
  1432.   # ifndef LINT
  1433. !     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 $";
  1434.   # endif LINT
  1435.   #endif FLUKE
  1436.   
  1437. --- 1,6 ----
  1438.   #ifdef FLUKE
  1439.   # ifndef LINT
  1440. !     static char RCSid[] = "@(#)FLUKE  $Header: /home/alydar/u0/barnett/Src/ease/src/RCS/main.c,v 3.2 1991/05/16 10:45:25 barnett Exp $";
  1441.   # endif LINT
  1442.   #endif FLUKE
  1443.   
  1444. *** ../3.5/src/strops.c    Tue Nov 26 16:41:54 1991
  1445. --- src/strops.c    Fri May 15 16:51:58 1992
  1446. ***************
  1447. *** 1,6 ****
  1448.   #ifdef FLUKE
  1449.   # ifndef LINT
  1450. !     static char RCSid[] = "@(#)FLUKE  $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/strops.c,v 3.4 1991/10/15 17:02:04 barnett Exp $";
  1451.   # endif LINT
  1452.   #endif FLUKE
  1453.   
  1454. --- 1,6 ----
  1455.   #ifdef FLUKE
  1456.   # ifndef LINT
  1457. !     static char RCSid[] = "@(#)FLUKE  $Header: /home/alydar/u0/barnett/Src/Ease/ease/src/RCS/strops.c,v 3.5 1992/05/15 20:44:39 barnett Exp $";
  1458.   # endif LINT
  1459.   #endif FLUKE
  1460.   
  1461. ***************
  1462. *** 18,23 ****
  1463. --- 18,26 ----
  1464.    *    All rights reserved.
  1465.    *
  1466.    * $Log: strops.c,v $
  1467. +  * Revision 3.5  1992/05/15  20:44:39  barnett
  1468. +  * Added A/IX support
  1469. +  *
  1470.    * Revision 3.4  1991/10/15  17:02:04  barnett
  1471.    * Detect if (one_or_more) next ($2) error
  1472.    *
  1473. ***************
  1474. *** 43,49 ****
  1475. --- 46,58 ----
  1476.   
  1477.   #include "fixstrings.h"
  1478.   #include <stdio.h>
  1479. + #ifdef SYSV
  1480. + #include <string.h>
  1481. + #define index strchr
  1482. + #define rindex strrchr
  1483. + #else
  1484.   #include <strings.h>
  1485. + #endif
  1486.   #include <ctype.h>
  1487.   #include "symtab.h"
  1488.   
  1489. *** ../3.5/utils/cfstrip.sh    Tue Nov 26 16:41:58 1991
  1490. --- utils/cfstrip.sh    Fri May 15 16:51:49 1992
  1491. ***************
  1492. *** 18,23 ****
  1493. --- 18,25 ----
  1494.           exit 1
  1495.           ;;
  1496.   esac
  1497. + # Add this rule if using AIX's sendmail file deliniated by a space
  1498. + #/^R/ s/   */    /g
  1499.   sed -e '
  1500.   s/^#.*//
  1501.   s/^\(R[^    ]*[    ][    ]*[^    ]*\)[    ]*.*$/\1/
  1502. *** ../3.5/CONVERTING    Tue Nov 26 16:42:07 1991
  1503. --- CONVERTING    Fri May 15 16:51:50 1992
  1504. ***************
  1505. *** 44,49 ****
  1506. --- 44,74 ----
  1507.   
  1508.           => cfc -C DUET
  1509.   
  1510. +     aix
  1511. +         This is complicated. AIX supports sendmail.cf files
  1512. +         deliniated by spaces in addition to tabs. cfc can handle this,
  1513. +         but if you want to compare the original .cf with the output of 
  1514. +         ease, you have to modify cfstrip:
  1515. +         Add the sed rule
  1516. +             /^R/ s/   */    /g
  1517. +         after
  1518. +             s/^#.*//
  1519. +         This will change two or more spaces into a tab
  1520. +         There is a new flag for AIX = -a 
  1521. +         Use the following for converting an AIX sendmail file
  1522. +         cfc -a -C FGEHV
  1523. +         You will get two strange warnings:
  1524. +         
  1525. +         Warning: malformed input line 943: EOL while expecting '$.' (adding missing piece)
  1526. +         Warning: malformed input line 944: EOL while expecting '$.' (adding missing piece)
  1527. +         These are caused by a rle that has a $? but doesn't have the $.
  1528. +         at the end. cfc fixes this problem. It also measn there will be
  1529. +         a difference between the original sendmail and the one ease 
  1530. +         generates as output because cfc fixes the error.
  1531.   Step 2.  Convert the ease file to cf: 
  1532.   
  1533.       % et <sendmail.ease >sendmail.cf
  1534.