about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/parse.c3
-rw-r--r--Test/09funcdef.ztst5
3 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9cc0c77a9..5276d12f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-06-29  Sven Wischnowsky  <wischnow@zsh.org>
 
+	* 12125: Src/parse.c, Test/09funcdef.ztst: fix for `foo () print
+ 	bar' (function definitions without braces)
+	
 	* 12122: Completion/Core/_main_complete: reverse meaning of yes=num
  	again
 
diff --git a/Src/parse.c b/Src/parse.c
index 4f79b2e4b..ab2cf5a02 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1516,10 +1516,11 @@ par_simple(int *complex, int nr)
 		}
 		yylex();
 	    } else {
-		int ll, sl, c = 0;
+		int ll, sl, pl, c = 0;
 
 		ll = ecadd(0);
 		sl = ecadd(0);
+		pl = ecadd(WCB_PIPE(WC_PIPE_END, 0));
 
 		par_cmd(&c);
 
diff --git a/Test/09funcdef.ztst b/Test/09funcdef.ztst
index 9a244db65..07a20349d 100644
--- a/Test/09funcdef.ztst
+++ b/Test/09funcdef.ztst
@@ -6,3 +6,8 @@
   f$$
 0:Regression test: `function f$$ () { ... }'
 >regress expansion of function names
+
+  function foo () print bar
+  foo
+0:Function definition without braces
+>bar