diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2005-03-12 05:05:06 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2005-03-12 05:05:06 (GMT) |
commit | 568cba4b0aa026e34b9a316b7da95b520f4d25c9 (patch) | |
tree | bc576fd6db24f3b581b32fc1b74e867dfbdb7e86 | |
parent | bc7b3f86e328ce8dc44b7b031e96533a52cdad81 (diff) | |
download | powwow-568cba4b0aa026e34b9a316b7da95b520f4d25c9.zip powwow-568cba4b0aa026e34b9a316b7da95b520f4d25c9.tar.gz powwow-568cba4b0aa026e34b9a316b7da95b520f4d25c9.tar.bz2 |
Made #module print messages prefixed with #module instead of #lib, also display
the path to the library that was loaded so that if testing new libraries you can
tell which one was found :p
-rw-r--r-- | cmd.c | 6 | ||||
-rw-r--r-- | ptr.h | 3 |
2 files changed, 7 insertions, 2 deletions
@@ -259,15 +259,17 @@ static void cmd_module __P1 (char *,arg) { /* open lib */ lib = dlopen( libname, RTLD_LAZY ); if( ! lib ) { - PRINTF( "#lib error: %s\n", dlerror() ); + PRINTF( "#module error: %s\n", dlerror() ); return; + }else{ + PRINTF( "#module loaded %s\n", libname ); } func = dlsym( lib, "powwow_init" ); if( func ) { (*func)(); }else{ - PRINTF( "#lib error: %s\n", dlerror() ); + PRINTF( "#module error: %s\n", dlerror() ); } } @@ -62,6 +62,9 @@ char *memrchrs __P ((char *p, int lenp, char *q, int lenq)); # define memfind memmem #else char *memfind __P ((char *hay, int haylen, char *needle, int needlelen)); +/* TODO: watch memrchr, it is defined differently here than under _GNU_SOURCE, + * so it could cause bizarre results if a module makes use of a library that + * uses it */ char *memrchr __P ((char *p, int lenp, char c)); #endif |