86 |
|
|
87 |
static const char* module_dlerror (void); |
static const char* module_dlerror (void); |
88 |
static int module_remove (m4 *context, lt_dlhandle handle, |
static int module_remove (m4 *context, lt_dlhandle handle, |
89 |
struct obstack *obs); |
m4_obstack *obs); |
90 |
static void module_close (m4 *context, lt_dlhandle handle, |
static void module_close (m4 *context, lt_dlhandle handle, |
91 |
struct obstack *obs); |
m4_obstack *obs); |
92 |
|
|
93 |
static void set_module_macro_table (m4*, lt_dlhandle, const m4_macro*); |
static void set_module_macro_table (m4*, lt_dlhandle, const m4_macro*); |
94 |
static void set_module_builtin_table (m4*, lt_dlhandle, const m4_builtin*); |
static void set_module_builtin_table (m4*, lt_dlhandle, const m4_builtin*); |
197 |
} |
} |
198 |
|
|
199 |
lt_dlhandle |
lt_dlhandle |
200 |
m4_module_load (m4 *context, const char *name, struct obstack *obs) |
m4_module_load (m4 *context, const char *name, m4_obstack *obs) |
201 |
{ |
{ |
202 |
const lt_dlhandle handle = m4__module_open (context, name, obs); |
const lt_dlhandle handle = m4__module_open (context, name, obs); |
203 |
|
|
249 |
|
|
250 |
/* Unload a module. */ |
/* Unload a module. */ |
251 |
void |
void |
252 |
m4_module_unload (m4 *context, const char *name, struct obstack *obs) |
m4_module_unload (m4 *context, const char *name, m4_obstack *obs) |
253 |
{ |
{ |
254 |
lt_dlhandle handle = 0; |
lt_dlhandle handle = 0; |
255 |
int errors = 0; |
int errors = 0; |
355 |
it is searched for in the module path. The module is unloaded in |
it is searched for in the module path. The module is unloaded in |
356 |
case of error. */ |
case of error. */ |
357 |
lt_dlhandle |
lt_dlhandle |
358 |
m4__module_open (m4 *context, const char *name, struct obstack *obs) |
m4__module_open (m4 *context, const char *name, m4_obstack *obs) |
359 |
{ |
{ |
360 |
lt_dlhandle handle = lt_dlopenext (name); |
lt_dlhandle handle = lt_dlopenext (name); |
361 |
m4_module_init_func *init_func = 0; |
m4_module_init_func *init_func = 0; |
493 |
} |
} |
494 |
|
|
495 |
static void |
static void |
496 |
module_close (m4 *context, lt_dlhandle handle, struct obstack *obs) |
module_close (m4 *context, lt_dlhandle handle, m4_obstack *obs) |
497 |
{ |
{ |
498 |
m4_module_finish_func *finish_func; |
m4_module_finish_func *finish_func; |
499 |
const char *name; |
const char *name; |
554 |
} |
} |
555 |
|
|
556 |
static int |
static int |
557 |
module_remove (m4 *context, lt_dlhandle handle, struct obstack *obs) |
module_remove (m4 *context, lt_dlhandle handle, m4_obstack *obs) |
558 |
{ |
{ |
559 |
const lt_dlinfo *info; |
const lt_dlinfo *info; |
560 |
int errors = 0; |
int errors = 0; |