fix problems with '\' for except_pat.
authorRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Thu, 4 Apr 1985 01:17:25 +0000 (17:17 -0800)
committerRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Thu, 4 Apr 1985 01:17:25 +0000 (17:17 -0800)
SCCS-vsn: usr.bin/rdist/gram.y 4.13
SCCS-vsn: usr.bin/rdist/expand.c 4.13

usr/src/usr.bin/rdist/expand.c
usr/src/usr.bin/rdist/gram.y

index dd78700..225d1f5 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)expand.c    4.12 (Berkeley) 85/02/04";
+static char *sccsid = "@(#)expand.c    4.13 (Berkeley) 85/04/03";
 #endif
 
 #include "defs.h"
 #endif
 
 #include "defs.h"
@@ -50,8 +50,14 @@ expand(list, wh)
                prnames(list);
        }
 
                prnames(list);
        }
 
-       if (wh == 0)
+       if (wh == 0) {
+               register char *cp;
+
+               for (nl = list; nl != NULL; nl = nl->n_next)
+                       for (cp = nl->n_name; *cp; cp++)
+                               *cp = *cp & TRIM;
                return(list);
                return(list);
+       }
 
        which = wh;
        path = tpathp = pathp = pathbuf;
 
        which = wh;
        path = tpathp = pathp = pathbuf;
@@ -557,7 +563,7 @@ addpath(c)
        if (pathp >= lastpathp)
                yyerror("Pathname too long");
        else {
        if (pathp >= lastpathp)
                yyerror("Pathname too long");
        else {
-               *pathp++ = c;
+               *pathp++ = c & TRIM;
                *pathp = '\0';
        }
 }
                *pathp = '\0';
        }
 }
index 3a9c0bf..a6e4914 100644 (file)
@@ -1,6 +1,6 @@
 %{
 #ifndef lint
 %{
 #ifndef lint
-static char *sccsid = "@(#)gram.y      4.12 (Berkeley) 85/02/04";
+static char *sccsid = "@(#)gram.y      4.13 (Berkeley) 85/04/03";
 #endif
 
 #include "defs.h"
 #endif
 
 #include "defs.h"
@@ -130,7 +130,7 @@ cmd:                  INSTALL options opt_namelist SM = {
                        for (nl = $2; nl != NULL; nl = nl->n_next)
                                if ((cp = re_comp(nl->n_name)) != NULL)
                                        yyerror(cp);
                        for (nl = $2; nl != NULL; nl = nl->n_next)
                                if ((cp = re_comp(nl->n_name)) != NULL)
                                        yyerror(cp);
-                       $1->sc_args = $2;
+                       $1->sc_args = expand($2, E_VARS);
                        $$ = $1;
                }
                | SPECIAL opt_namelist STRING SM = {
                        $$ = $1;
                }
                | SPECIAL opt_namelist STRING SM = {