From 6bc62d90603a2104074c82e4048276c18a128f65 Mon Sep 17 00:00:00 2001 From: Ralph Campbell Date: Wed, 3 Apr 1985 17:17:25 -0800 Subject: [PATCH] fix problems with '\' for except_pat. 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 | 12 +++++++++--- usr/src/usr.bin/rdist/gram.y | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/usr/src/usr.bin/rdist/expand.c b/usr/src/usr.bin/rdist/expand.c index dd7870053e..225d1f5d07 100644 --- a/usr/src/usr.bin/rdist/expand.c +++ b/usr/src/usr.bin/rdist/expand.c @@ -1,5 +1,5 @@ #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" @@ -50,8 +50,14 @@ expand(list, wh) 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); + } which = wh; path = tpathp = pathp = pathbuf; @@ -557,7 +563,7 @@ addpath(c) if (pathp >= lastpathp) yyerror("Pathname too long"); else { - *pathp++ = c; + *pathp++ = c & TRIM; *pathp = '\0'; } } diff --git a/usr/src/usr.bin/rdist/gram.y b/usr/src/usr.bin/rdist/gram.y index 3a9c0bf64f..a6e4914e58 100644 --- a/usr/src/usr.bin/rdist/gram.y +++ b/usr/src/usr.bin/rdist/gram.y @@ -1,6 +1,6 @@ %{ #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" @@ -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); - $1->sc_args = $2; + $1->sc_args = expand($2, E_VARS); $$ = $1; } | SPECIAL opt_namelist STRING SM = { -- 2.20.1