about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/init.c2
-rw-r--r--Src/utils.c2
-rw-r--r--Src/zsh.h9
3 files changed, 10 insertions, 3 deletions
diff --git a/Src/init.c b/Src/init.c
index 341446cb9..2c059ffc2 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -150,7 +150,7 @@ loop(int toplevel, int justonce)
 
 	    if (toplevel &&
 		(getshfunc("preexec") ||
-		 paramtab->getnode(paramtab, "preexec_functions"))) {
+		 paramtab->getnode(paramtab, "preexec" HOOK_SUFFIX))) {
 		LinkList args;
 		char *cmdstr;
 
diff --git a/Src/utils.c b/Src/utils.c
index 05732abb7..66b02ac88 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -1174,8 +1174,6 @@ callhookfunc(char *name, LinkList lnklst, int arrayp, int *retval)
     if (arrayp) {
 	char **arrptr;
 	int namlen = strlen(name);
-#define HOOK_SUFFIX	"_functions"
-#define HOOK_SUFFIX_LEN	11	/* including NUL byte */
 	VARARR(char, arrnam, namlen + HOOK_SUFFIX_LEN);
 	memcpy(arrnam, name, namlen);
 	memcpy(arrnam + namlen, HOOK_SUFFIX, HOOK_SUFFIX_LEN);
diff --git a/Src/zsh.h b/Src/zsh.h
index 159806f2c..0b9007333 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -1117,6 +1117,15 @@ struct funcwrap {
 #define WRAPDEF(func) \
     { NULL, 0, func, NULL }
 
+/*
+ * User-defined hook arrays
+ */
+
+/* Name appended to function name to get hook array */
+#define HOOK_SUFFIX	"_functions"
+/* Length of that including NUL byte */
+#define HOOK_SUFFIX_LEN	11
+
 /* node in builtin command hash table (builtintab) */
 
 /*