aboutsummaryrefslogtreecommitdiffstats
path: root/ext.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-07-25 22:34:19 +0300
committerArnold D. Robbins <arnold@skeeve.com>2012-07-25 22:34:19 +0300
commit3d2d6b46bf3325c0273b35a202184ab09d38e0cd (patch)
treead96062cc57a903fb25a0725210c8e12b84487df /ext.c
parent0fff60287fb9cc41288b3373f47031ab3dd597ac (diff)
downloadegawk-3d2d6b46bf3325c0273b35a202184ab09d38e0cd.tar.gz
egawk-3d2d6b46bf3325c0273b35a202184ab09d38e0cd.tar.bz2
egawk-3d2d6b46bf3325c0273b35a202184ab09d38e0cd.zip
Start refactoring iop handling. Add readdir extension.
Diffstat (limited to 'ext.c')
-rw-r--r--ext.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext.c b/ext.c
index af6542d4..17ade95a 100644
--- a/ext.c
+++ b/ext.c
@@ -51,6 +51,9 @@ load_ext(const char *lib_name)
if (do_traditional || do_posix)
fatal(_("-l / @load are gawk extensions"));
+ if (lib_name == NULL)
+ fatal(_("load_ext: received NULL lib_name"));
+
if ((dl = dlopen(lib_name, flags)) == NULL)
fatal(_("load_ext: cannot open library `%s' (%s)\n"), lib_name,
dlerror());
@@ -60,6 +63,7 @@ load_ext(const char *lib_name)
if (gpl_compat == NULL)
fatal(_("load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"),
lib_name, dlerror());
+
install_func = (int (*)(const gawk_api_t *const, awk_ext_id_t))
dlsym(dl, INIT_FUNC);
if (install_func == NULL)