From aba936b17cca86ee0742341f23f0f96795a23275 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 8 Nov 2006 10:38:05 +0000 Subject: 22981: Zvi Har'el: bad call from 22952 22980: add hook array for special functions --- Src/builtin.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'Src/builtin.c') 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 */ -- cgit 1.4.1