about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-06-21 10:54:49 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-06-21 10:54:49 +0000
commite25f86419eaae347d49728542d405972d44921fa (patch)
treebe566f48a63c2249bc6cee6f1541b90cc232f524
parent6c074dfaf3f6f144d64056ddfb58984817f0296a (diff)
downloadzsh-e25f86419eaae347d49728542d405972d44921fa.tar.gz
zsh-e25f86419eaae347d49728542d405972d44921fa.tar.xz
zsh-e25f86419eaae347d49728542d405972d44921fa.zip
No POSIX "for" syntax with csh syntax.
-rw-r--r--ChangeLog4
-rw-r--r--Src/parse.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 87d47ac65..fd954ba26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 2001-06-21  Bart Schaefer  <schaefer@zsh.org>
 
-	* 15023: Src/parse.c: Accept newlines before the "in" keyword in
-	"for" and "select", per POSIX.
+	* 15023, 15027: Src/parse.c: Accept newlines before the "in"
+	keyword in "for" and "select", per POSIX.
 
 	* 15020: Completion/Zsh/Command/_cd, Completion/Zsh/Context/_autocd,
 	Completion/Zsh/Type/_command_names: When AUTO_CD is set, complete
diff --git a/Src/parse.c b/Src/parse.c
index 9ea691d2c..b611e8e0c 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -903,13 +903,15 @@ 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();
-	while (isnewlin && !csh)
+	posix_in = isnewlin;
+	while (isnewlin)
 	  yylex();
 	if (tok == STRING && !strcmp(tokstr, "in")) {
 	    int np, n;
@@ -922,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;