From 4544933427065dea3834753ea29c18610f3ef8ea Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 18 May 2001 15:23:08 +0000 Subject: fix zmodload -uf for not-yet-loaded function --- Src/module.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Src/module.c') diff --git a/Src/module.c b/Src/module.c index cd68627ae..f8b3f2758 100644 --- a/Src/module.c +++ b/Src/module.c @@ -1346,7 +1346,7 @@ bin_zmodload_math(char *nam, char **args, char *ops) int ret = 0; if (ops['u']) { - /* remove autoloaded conditions */ + /* remove autoloaded math functions */ for (; *args; args++) { MathFunc f = getmathfunc(*args, 0); @@ -1355,7 +1355,7 @@ bin_zmodload_math(char *nam, char **args, char *ops) zwarnnam(nam, "%s: no such math function", *args, 0); ret = 1; } - } else if (f->flags & CONDF_ADDED) { + } else if (f->flags & MFF_ADDED) { zwarnnam(nam, "%s: math function is already defined", *args, 0); ret = 1; } else @@ -1377,7 +1377,7 @@ bin_zmodload_math(char *nam, char **args, char *ops) } return 0; } else { - /* add autoloaded conditions */ + /* add autoloaded math functions */ char *modnam; modnam = *args++; @@ -2119,6 +2119,8 @@ add_automathfunc(char *nam, char *module) return 1; } + f->flags &= ~MFF_ADDED; /* still to autoload, not added yet */ + return 0; } -- cgit 1.4.1