about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-11-08 10:38:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-11-08 10:38:05 +0000
commitaba936b17cca86ee0742341f23f0f96795a23275 (patch)
tree9ddbe362d29bf5ca63ba0808e06efb7388b2e38f /Src/builtin.c
parentf367a90505811cf2125549e4d376c33f691bde57 (diff)
downloadzsh-aba936b17cca86ee0742341f23f0f96795a23275.tar.gz
zsh-aba936b17cca86ee0742341f23f0f96795a23275.tar.xz
zsh-aba936b17cca86ee0742341f23f0f96795a23275.zip
22981: Zvi Har'el: bad call from 22952
22980: add hook array for special functions
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index e4ca9b3d9..adb0f6ee2 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -1087,7 +1087,6 @@ cd_try_chdir(char *pfix, char *dest, int hard)
 static void
 cd_new_pwd(int func, LinkNode dir)
 {
-    Eprog prog;
     char *new_pwd, *s;
     int dirstacksize;
 
@@ -1134,15 +1133,9 @@ cd_new_pwd(int func, LinkNode dir)
     }
 
     /* execute the chpwd function */
-    if ((prog = getshfunc("chpwd")) != &dummy_eprog) {
-	int osc = sfcontext;
-
-	fflush(stdout);
-	fflush(stderr);
-	sfcontext = SFC_HOOK;
-	doshfunc("chpwd", prog, NULL, 0, 1);
-	sfcontext = osc;
-    }
+    fflush(stdout);
+    fflush(stderr);
+    callhookfunc("chpwd", NULL, 1);
 
     dirstacksize = getiparam("DIRSTACKSIZE");
     /* handle directory stack sizes out of range */