diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2008-08-10 21:36:35 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-08-10 21:36:35 +0200 |
commit | e17bbcdefb188500b23be259c0f9259a49bbd6cb (patch) | |
tree | 4ba01cc06985e439d6a7800f986d4d7fb5b0e33d /eurephia_getsym.c | |
parent | 6cdb4cef3fc8ad268e63081ce817605cc7a38549 (diff) | |
download | eurephia-e17bbcdefb188500b23be259c0f9259a49bbd6cb.tar.gz eurephia-e17bbcdefb188500b23be259c0f9259a49bbd6cb.tar.xz eurephia-e17bbcdefb188500b23be259c0f9259a49bbd6cb.zip |
Moved eDBlink_getsym(...) out of eurephiadb.c and into eurephia_getsym.c. Renamed to eGetSym(...)
Diffstat (limited to 'eurephia_getsym.c')
-rw-r--r-- | eurephia_getsym.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/eurephia_getsym.c b/eurephia_getsym.c new file mode 100644 index 0000000..67fc227 --- /dev/null +++ b/eurephia_getsym.c @@ -0,0 +1,44 @@ +/* eurephia_getsym.c -- + * + * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; version 2 + * of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + +#include <stdio.h> +#include <dlfcn.h> + +#include "eurephia_struct.h" +#include "eurephia_log.h" + +void *eGetSym(eurephiaCTX *ctx, void *dlh, const char *symnam) +{ + void *func = NULL; + + if( ctx->fatal_error > 0 ) { + return NULL; + } + + eurephia_log(ctx, LOG_DEBUG, 13, "Locating eDBlink function '%s'", symnam); + func = dlsym(dlh, symnam); + if( func == NULL ) { + eurephia_log(ctx, LOG_ERROR, 1, "Could not find needed '%s' function in eDBlink driver", symnam); + ctx->fatal_error = 1; + } + return func; +} + |