- fix PR1620, -DNO_HISTORY did not work.
- restore parsing state after parsing old style command substitution. The ';' in '`echo z;`' broke the following: for i in 1; do cat > /dev/tty << __EOF__ `echo z;` __EOF__ done cVS: Enter Log. Lines beginning with `CVS: ' are removed automatically
This commit is contained in:
parent
ef52ec31c1
commit
893ade3fac
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: input.c,v 1.18 1995/10/06 21:38:18 christos Exp $ */
|
||||
/* $NetBSD: input.c,v 1.19 1995/10/19 04:14:37 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -40,7 +40,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)input.c 8.3 (Berkeley) 6/9/95";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: input.c,v 1.18 1995/10/06 21:38:18 christos Exp $";
|
||||
static char rcsid[] = "$NetBSD: input.c,v 1.19 1995/10/19 04:14:37 christos Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -293,11 +293,13 @@ check:
|
||||
savec = *q;
|
||||
*q = '\0';
|
||||
|
||||
#ifndef NO_HISTORY
|
||||
if (parsefile->fd == 0 && hist && something) {
|
||||
INTOFF;
|
||||
history(hist, whichprompt == 1 ? H_ENTER : H_ADD, parsenextc);
|
||||
INTON;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (vflag) {
|
||||
out2str(parsenextc);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: parser.c,v 1.26 1995/05/17 00:05:25 christos Exp $ */
|
||||
/* $NetBSD: parser.c,v 1.27 1995/10/19 04:14:41 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -40,7 +40,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: parser.c,v 1.26 1995/05/17 00:05:25 christos Exp $";
|
||||
static char rcsid[] = "$NetBSD: parser.c,v 1.27 1995/10/19 04:14:41 christos Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -1289,9 +1289,14 @@ parsebackq: {
|
||||
if (!oldstyle && (readtoken() != TRP))
|
||||
synexpect(TRP);
|
||||
(*nlpp)->n = n;
|
||||
/* Start reading from old file again. */
|
||||
if (oldstyle)
|
||||
if (oldstyle) {
|
||||
/*
|
||||
* Start reading from old file again, ignoring any pushed back
|
||||
* tokens left from the backquote parsing
|
||||
*/
|
||||
popfile();
|
||||
tokpushback = 0;
|
||||
}
|
||||
while (stackblocksize() <= savelen)
|
||||
growstackblock();
|
||||
STARTSTACKSTR(out);
|
||||
|
Loading…
x
Reference in New Issue
Block a user