From 568cba4b0aa026e34b9a316b7da95b520f4d25c9 Mon Sep 17 00:00:00 2001 From: Steve Slaven Date: Sat, 12 Mar 2005 05:05:06 +0000 Subject: 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 diff --git a/cmd.c b/cmd.c index b2800ba..2eb4702 100644 --- a/cmd.c +++ b/cmd.c @@ -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() ); } } diff --git a/ptr.h b/ptr.h index 464b067..ebdf09d 100644 --- a/ptr.h +++ b/ptr.h @@ -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 -- cgit v0.10.2