about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-10-16 17:19:18 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-10-16 17:19:18 +0000
commit5437faa28c0cf86c7241f523909ce33ad4839672 (patch)
tree6f18a5cfe4047d32986ff3a7714ec1178929e3c3 /Src
parent6cdd20e367e465bdc70e0616aa2dfbcfd05b1222 (diff)
downloadzsh-5437faa28c0cf86c7241f523909ce33ad4839672.tar.gz
zsh-5437faa28c0cf86c7241f523909ce33ad4839672.tar.xz
zsh-5437faa28c0cf86c7241f523909ce33ad4839672.zip
Merge assorted patches from the dev. version, as approved by PWS.
Read ChangeLog for details.
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c7
-rw-r--r--Src/parse.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/Src/exec.c b/Src/exec.c
index aa2e3437b..f1206e93c 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -2297,9 +2297,6 @@ execcmd(Estate state, int input, int output, int how, int last1)
 #ifdef PATH_DEV_FD
 		closem(2);
 #endif
-		if (isset(PRINTEXITVALUE) && isset(SHINSTDIN) && lastval && !subsh) {
-		    fprintf(stderr, "zsh: exit %ld\n", (long)lastval);
-		}
 		fflush(stdout);
 		if (save[1] == -2) {
 		    if (ferror(stdout)) {
@@ -2309,6 +2306,10 @@ execcmd(Estate state, int input, int output, int how, int last1)
 		} else
 		    clearerr(stdout);
 	    }
+	    if (isset(PRINTEXITVALUE) && isset(SHINSTDIN) &&
+		lastval && !subsh) {
+		fprintf(stderr, "zsh: exit %ld\n", (long)lastval);
+	    }
 
 	    if (do_exec) {
 		if (subsh)
diff --git a/Src/parse.c b/Src/parse.c
index b7b8050c4..15a53add1 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -903,12 +903,16 @@ par_for(int *complex)
 	yylex();
 	type = WC_FOR_COND;
     } else {
+	int posix_in;
 	infor = 0;
 	if (tok != STRING || !isident(tokstr))
 	    YYERRORV(oecused);
 	ecstr(tokstr);
 	incmdpos = 1;
 	yylex();
+	posix_in = isnewlin;
+	while (isnewlin)
+	  yylex();
 	if (tok == STRING && !strcmp(tokstr, "in")) {
 	    int np, n;
 
@@ -920,7 +924,7 @@ par_for(int *complex)
 		YYERRORV(oecused);
 	    ecbuf[np] = n;
 	    type = (sel ? WC_SELECT_LIST : WC_FOR_LIST);
-	} else if (tok == INPAR) {
+	} else if (!posix_in && tok == INPAR) {
 	    int np, n;
 
 	    incmdpos = 0;