get rid of comment lines when storing rewriting rules
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 20 Jun 1982 12:09:24 +0000 (04:09 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 20 Jun 1982 12:09:24 +0000 (04:09 -0800)
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.123
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 3.27

usr/src/usr.sbin/sendmail/src/readcf.c
usr/src/usr.sbin/sendmail/src/version.c

index 3b40497..7df9ca0 100644 (file)
@@ -1,6 +1,6 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-SCCSID(@(#)readcf.c    3.26            %G%);
+SCCSID(@(#)readcf.c    3.27            %G%);
 
 /*
 **  READCF -- read control file.
 
 /*
 **  READCF -- read control file.
@@ -58,6 +58,7 @@ readcf(cfname, safe)
        int class;
        int ruleset = 0;
        char exbuf[MAXLINE];
        int class;
        int ruleset = 0;
        char exbuf[MAXLINE];
+       char *q;
 
        cf = fopen(cfname, "r");
        if (cf == NULL)
 
        cf = fopen(cfname, "r");
        if (cf == NULL)
@@ -114,7 +115,11 @@ readcf(cfname, safe)
                        /* expand and save the RHS */
                        while (*++p == '\t')
                                continue;
                        /* expand and save the RHS */
                        while (*++p == '\t')
                                continue;
-                       expand(p, exbuf, &exbuf[sizeof exbuf], CurEnv);
+                       q = p;
+                       while (*p != '\0' && *p != '\t')
+                               p++;
+                       *p = '\0';
+                       expand(q, exbuf, &exbuf[sizeof exbuf], CurEnv);
                        rwp->r_rhs = prescan(exbuf, '\t');
                        if (rwp->r_rhs != NULL)
                                rwp->r_rhs = copyplist(rwp->r_rhs, TRUE);
                        rwp->r_rhs = prescan(exbuf, '\t');
                        if (rwp->r_rhs != NULL)
                                rwp->r_rhs = copyplist(rwp->r_rhs, TRUE);
index 277da09..c90f14d 100644 (file)
@@ -1,5 +1,5 @@
 # ifndef lint
 # ifndef lint
-static char    SccsId[] = "@(#)SendMail version 3.122 of %G%";
+static char    SccsId[] = "@(#)SendMail version 3.123 of %G%";
 # endif lint
 
 # endif lint
 
-char   Version[] = "3.122 [%G%]";
+char   Version[] = "3.123 [%G%]";