reset the alias and eval pointers before calling lex
authorChristos Zoulas <christos@ucbvax.Berkeley.EDU>
Tue, 5 Nov 1991 10:49:32 +0000 (02:49 -0800)
committerChristos Zoulas <christos@ucbvax.Berkeley.EDU>
Tue, 5 Nov 1991 10:49:32 +0000 (02:49 -0800)
SCCS-vsn: bin/csh/glob.c 5.31

usr/src/bin/csh/glob.c

index e940539..7244064 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)glob.c     5.30 (Berkeley) %G%";
+static char sccsid[] = "@(#)glob.c     5.31 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -623,6 +623,15 @@ backeval(cp, literal)
        arginp = cp;
        while (*cp)
            *cp++ &= TRIM;
        arginp = cp;
        while (*cp)
            *cp++ &= TRIM;
+
+        /*
+        * In the child ``forget'' everything about current aliases or
+        * eval vectors.
+        */
+       alvec = NULL;
+       evalvec = NULL;
+       alvecp = NULL;
+       evalp = NULL;
        (void) lex(&paraml);
        if (seterr)
            stderror(ERR_OLD);
        (void) lex(&paraml);
        if (seterr)
            stderror(ERR_OLD);