From 1a38d7538ac45af0d3f7b3790f64db9ca84f0237 Mon Sep 17 00:00:00 2001 From: Mark Hessling Date: Mon, 29 Jul 2002 07:13:28 +0000 Subject: [PATCH] Need to pass library name to registerRxFunctions() --- common/loader.c | 4 ++-- common/rxpack.c | 11 ++++++----- common/rxpack.h | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/common/loader.c b/common/loader.c index c95754e4..5f84d0dc 100644 --- a/common/loader.c +++ b/common/loader.c @@ -18,7 +18,7 @@ * Mark Hessling M.Hessling@qut.edu.au http://www.lightlink.com/hessling/ */ -static char RCSid[] = "$Id: loader.c,v 1.5 2002/07/29 06:19:40 mark Exp $"; +static char RCSid[] = "$Id: loader.c,v 1.6 2002/07/29 07:13:28 mark Exp $"; #include "rxpack.h" @@ -220,7 +220,7 @@ int main /* * Register all external functions */ - if ( ( rc = RegisterRxFunctions( RxPackageGlobalData, GETPACKAGEFUNCTIONS() ) ) != 0 ) + if ( ( rc = RegisterRxFunctions( RxPackageGlobalData, GETPACKAGEFUNCTIONS(), RXPACKAGENAME ) ) != 0 ) return( rc ); /* * Register a default subcommand handler to pass commands to the OS diff --git a/common/rxpack.c b/common/rxpack.c index db1cfc1c..278a697f 100644 --- a/common/rxpack.c +++ b/common/rxpack.c @@ -16,7 +16,7 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -static char RCSid[] = "$Id: rxpack.c,v 1.10 2002/07/29 06:57:33 mark Exp $"; +static char RCSid[] = "$Id: rxpack.c,v 1.11 2002/07/29 07:12:03 mark Exp $"; #include "rxpack.h" @@ -707,11 +707,12 @@ int RegisterRxSubcom int RegisterRxFunctions #ifdef HAVE_PROTO - ( RxPackageGlobalDataDef *RxPackageGlobalData, RexxFunction *RxPackageFunctions ) + ( RxPackageGlobalDataDef *RxPackageGlobalData, RexxFunction *RxPackageFunctions, char *name ) #else - ( RxPackageGlobalData, RxPackageFunctions ) + ( RxPackageGlobalData, RxPackageFunctions, name ) RxPackageGlobalDataDef *RxPackageGlobalData; RexxFunction *RxPackageFunctions; + char *name; #endif { @@ -728,7 +729,7 @@ fprintf(stderr,"%s %d %d %d %s\n",__FILE__,__LINE__,rc,func->DllLoad,func->Inter if (func->DllLoad) { rc = RexxRegisterFunctionDll( func->ExternalName, - RXPACKAGENAME, + name, func->InternalName ); InternalTrace( RxPackageGlobalData, "RegisterRxFunctions","%s-%d: Registered (DLL) %s with rc = %ld\n",__FILE__,__LINE__,func->ExternalName,rc); } @@ -871,7 +872,7 @@ RxPackageGlobalDataDef *InitRxPackage { *rc = (*ptr)( ); } - DEBUGDUMP(fprintf(stderr,"%s-%d: End of InitRxPackage with rc = %ld\n",__FILE__,__LINE__,rc);) + DEBUGDUMP(fprintf(stderr,"%s-%d: End of InitRxPackage with rc = %ld\n",__FILE__,__LINE__,*rc);) return RxPackageGlobalData; } diff --git a/common/rxpack.h b/common/rxpack.h index 86a441a5..77444032 100644 --- a/common/rxpack.h +++ b/common/rxpack.h @@ -203,7 +203,7 @@ void InternalTrace Args(( RxPackageGlobalDataDef *, char *, ... )); void RxDisplayError Args(( RxPackageGlobalDataDef *, RFH_ARG0_TYPE, ... )); RxPackageGlobalDataDef *InitRxPackage Args(( RxPackageGlobalDataDef *, PackageInitialiser, int * )); int TermRxPackage Args(( RxPackageGlobalDataDef *, PackageTerminator, RexxFunction *, char *, int )); -int RegisterRxFunctions Args(( RxPackageGlobalDataDef *, RexxFunction * )); +int RegisterRxFunctions Args(( RxPackageGlobalDataDef *, RexxFunction *, char * )); int RegisterRxSubcom Args(( RxPackageGlobalDataDef *, RexxSubcomHandler * )); int QueryRxFunction Args(( RxPackageGlobalDataDef *, char * )); int DeregisterRxFunctions Args(( RxPackageGlobalDataDef *, RexxFunction *, int ));