From e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 26 Oct 1999 15:36:10 +0000 Subject: manual/8424 --- Src/module.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Src/module.c') 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; -- cgit 1.4.1