modules: remove support for module unload and refcount.
Module management is horrifically more complex than it needs to
be for the simple purpose of providing a means to implement new
builtins using C. Fussing about reference counting or needing to
maintain and test a facility to unload modules is an easy 600
lines to cut as a start at simplification.
* src/main.c (main): Don't call m4__module_exit to unload all
modules just prior to exiting the application.
* m4/m4private.h (FINISH_SYMBOL, m4_module:refcount)
(m4__module_exit, m4_module_refcount): Remove.
(m4__module_next): Rename from this...
* m4/m4module.h (m4_module_next): ...to this. Adjust all callers.
(M4FINISH_HANDLER, m4_module_finish_func, m4_module_makeresident)
(m4_module_refcount, m4_module_unload, m4_module_exit): Remove.
* m4/m4module.c (m4__module_next): Rename from this...
(m4_module_next): ...to this.
(module_remove, m4_module_makeresident, m4_module_unload)
(m4_module_exit, m4_module_refcount): Remove.
* modules/load.c: Remove.
(m4modules): Move from here...
* modules/gnu.c (m4modules): ...to here. Update all callers.
(M4FINISH_HANDLER(gnu)): Remove.
* modules/m4.c (M4INIT_HANDLER(m4)): Remove.
* modules/modtest.c (M4FINISH_HANDLER(modtest)): Remove.
* modules/shadow.c (M4INIT_HANDLER(shadow)): Rewrite to work
without refcount.
* Makefile.am (pkglib_LTLIBRARIES): Remove modules/load.la.
(modules_load_la_LDFLAGS, modules_load_la_LIBADD): Remove.
* tests/modules.at: Remove references to load module, and
tests of unload builtin.
* tests/options.at: Remove obsolute finish hook and module unload
trace output.
* doc/m4.texi (Unload, Refcount): Remove.
(M4modules): Change module reference from load to gnu.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
15 files changed: