summaryrefslogtreecommitdiff
path: root/modules/load.c
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2001-08-19 10:53:56 +0000
committerEric Blake <ebb9@byu.net>2007-10-05 17:12:24 -0600
commit0a7af6da176dd12bcb96b52a6cbc60cea12202b6 (patch)
treec981a92937dd8a725c1204e88d172f171b541911 /modules/load.c
parent96f4a9aec45acc4d4b6eea03e6e8bae41eff7bb5 (diff)
downloadm4-0a7af6da176dd12bcb96b52a6cbc60cea12202b6.tar.gz
* c-boxes.el: Deleted.
* m4/builtin.c: Reformat box comments to be closer to GNU standards. * m4/debug.c: Ditto. * m4/eval.c: Ditto. * m4/evalparse.c: Ditto. * m4/input.c: Ditto. * m4/m4module.h: Ditto. * m4/macro.c: Ditto. * m4/output.c: Ditto. * m4/symtab.c: Ditto. * m4/utility.c: Ditto. * modules/changeword.c: Ditto. * modules/format.c: Ditto. * modules/gnu.c: Ditto. * modules/load.c: Ditto. * modules/m4.c: Ditto. * modules/modtest.c: Ditto. * modules/mpeval.c: Ditto. * modules/perl.c: Ditto. * modules/shadow.c: Ditto. * modules/stdlib.c: Ditto. * modules/time.c: Ditto. * src/freeze.c: Ditto. * src/main.c: Ditto.
Diffstat (limited to 'modules/load.c')
-rw-r--r--modules/load.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/modules/load.c b/modules/load.c
index 919076bf..dca8304d 100644
--- a/modules/load.c
+++ b/modules/load.c
@@ -82,16 +82,17 @@ M4INIT_HANDLER (load)
-/*------------------------------------------------------------.
-| Loading external module at runtime. |
-| The following functions provide the implementation for each |
-| of the m4 builtins declared in `m4_builtin_table[]' above. |
-`------------------------------------------------------------*/
-
-/* The expansion of this builtin is a comma separated list of
- loaded modules. */
+/* Loading an external module at runtime.
+ The following functions provide the implementation for each
+ of the m4 builtins declared in `m4_builtin_table[]' above. */
+
+/**
+ * modules()
+ **/
M4BUILTIN_HANDLER (modules)
{
+ /* The expansion of this builtin is a comma separated list of
+ loaded modules. */
lt_dlhandle handle = lt_dlhandle_next (NULL);
if (m4_bad_argc (argv[0], argc, 1, 1))
@@ -108,22 +109,28 @@ M4BUILTIN_HANDLER (modules)
while (handle);
}
-/* Load the named module and install the builtins and macros
- exported by that module. */
+/**
+ * load(MODULE-NAME)
+ **/
M4BUILTIN_HANDLER (load)
{
if (m4_bad_argc (argv[0], argc, 2, 2))
return;
+ /* Load the named module and install the builtins and macros
+ exported by that module. */
m4_module_load (M4ARG(1), obs);
}
-/* Remove all builtins and macros installed by the named module,
- and then unload the module from memory entirely. */
+/**
+ * unload(MODULE-NAME)
+ **/
M4BUILTIN_HANDLER (unload)
{
if (m4_bad_argc (argv[0], argc, 2, 2))
return;
+ /* Remove all builtins and macros installed by the named module,
+ and then unload the module from memory entirely. */
m4_module_unload (M4ARG(1), obs);
}