about summary refs log tree commit diff
path: root/Src/module.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-26 15:36:10 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-26 15:36:10 +0000
commite0b26186f1d3c1a3a580eb7e8a8199c25536f4e6 (patch)
treee4247c2507fa1a135740a3cd02e7405cbdbfa69a /Src/module.c
parent56f338eb8bfd4bcdbf14b495ff8a34425c3527d4 (diff)
downloadzsh-e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6.tar.gz
zsh-e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6.tar.xz
zsh-e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6.zip
manual/8424
Diffstat (limited to 'Src/module.c')
-rw-r--r--Src/module.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/Src/module.c b/Src/module.c
index 9922f84df..e620073ce 100644
--- a/Src/module.c
+++ b/Src/module.c
@@ -65,6 +65,21 @@ register_module(char *n)
     } LASTALLOC;
 }
 
+/* Check if a module is linked in. */
+
+/**/
+int
+module_linked(char *name)
+{
+    LinkNode node;
+
+    for (node = firstnode(bltinmodules); node; incnode(node))
+	if (!strcmp((char *) getdata(node), name))
+	    return 1;
+
+    return 0;
+}
+
 /* addbuiltin() can be used to add a new builtin.  It returns zero on *
  * success, 1 on failure.  The only possible type of failure is that  *
  * a builtin with the specified name already exists.  An autoloaded   *
@@ -1401,7 +1416,7 @@ addhookdefs(char const *nam, Hookdef h, int size)
 
     while (size--) {
 	if (addhookdef(h)) {
-	    zwarnnam(nam, "name clash when adding condition `%s'", h->name, 0);
+	    zwarnnam(nam, "name clash when adding hook `%s'", h->name, 0);
 	    hadf = 1;
 	} else
 	    hads = 2;