diff options
author | vincentdarley <vincentdarley> | 2002-07-18 15:04:51 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2002-07-18 15:04:51 (GMT) |
commit | b355103baab13c260a35798a589f4357f9fd115a (patch) | |
tree | f356d5d56da72d498b37011b9e007ccb03fade54 /unix | |
parent | 20f90f51f25cf3474e10150eebc6f1e23f68a0db (diff) | |
download | tcl-b355103baab13c260a35798a589f4357f9fd115a.zip tcl-b355103baab13c260a35798a589f4357f9fd115a.tar.gz tcl-b355103baab13c260a35798a589f4357f9fd115a.tar.bz2 |
load comments and clientData replacement
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclLoadAout.c | 33 | ||||
-rw-r--r-- | unix/tclLoadDl.c | 34 | ||||
-rw-r--r-- | unix/tclLoadDld.c | 34 | ||||
-rw-r--r-- | unix/tclLoadDyld.c | 36 | ||||
-rw-r--r-- | unix/tclLoadNext.c | 32 | ||||
-rw-r--r-- | unix/tclLoadOSF.c | 32 | ||||
-rw-r--r-- | unix/tclLoadShl.c | 34 |
7 files changed, 160 insertions, 75 deletions
diff --git a/unix/tclLoadAout.c b/unix/tclLoadAout.c index c4d6254..b8fa8b6 100644 --- a/unix/tclLoadAout.c +++ b/unix/tclLoadAout.c @@ -14,7 +14,7 @@ * and Design Engineering (MADE) Initiative through ARPA contract * F33615-94-C-4400. * - * RCS: @(#) $Id: tclLoadAout.c,v 1.11 2002/07/17 20:00:46 vincentdarley Exp $ + * RCS: @(#) $Id: tclLoadAout.c,v 1.12 2002/07/18 15:04:53 vincentdarley Exp $ */ #include "tclInt.h" @@ -102,17 +102,14 @@ static void UnlinkSymbolTable _ANSI_ARGS_((void)); /* *---------------------------------------------------------------------- * - * TclpLoadFile -- + * TclpDlopen -- * * Dynamically loads a binary code file into memory and returns - * the addresses of two procedures within that file, if they - * are defined. + * a handle to the new code. * * Results: * A standard Tcl completion code. If an error occurs, an error - * message is left in the interp's result. *proc1Ptr and *proc2Ptr - * are filled in with the addresses of the symbols given by - * *sym1 and *sym2, or NULL if those symbols can't be found. + * message is left in the interp's result. * * Side effects: * New code suddenly appears in memory. @@ -312,6 +309,22 @@ TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr) return TCL_OK; } +/* + *---------------------------------------------------------------------- + * + * TclpFindSymbol -- + * + * Looks up a symbol, by name, through a handle associated with + * a previously loaded piece of code (shared library). + * + * Results: + * Returns a pointer to the function associated with 'symbol' if + * it is found. Otherwise returns NULL and may leave an error + * message in the interp's result. + * + *---------------------------------------------------------------------- + */ +Tcl_PackageInitProc* TclpFindSymbol(interp, loadHandle, symbol) Tcl_Interp *interp; TclLoadHandle loadHandle; @@ -448,9 +461,9 @@ UnlinkSymbolTable () */ void -TclpUnloadFile(clientData) - ClientData clientData; /* ClientData returned by a previous call - * to TclpLoadFile(). The clientData is +TclpUnloadFile(loadHandle) + TclLoadHandle loadHandle; /* loadHandle returned by a previous call + * to TclpDlopen(). The loadHandle is * a token that represents the loaded * file. */ { diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index aa5fab7..c7402aa 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDl.c,v 1.10 2002/07/17 20:02:43 vincentdarley Exp $ + * RCS: @(#) $Id: tclLoadDl.c,v 1.11 2002/07/18 15:04:53 vincentdarley Exp $ */ #include "tclInt.h" @@ -38,17 +38,14 @@ /* *--------------------------------------------------------------------------- * - * TclpLoadFile -- + * TclpDlopen -- * * Dynamically loads a binary code file into memory and returns - * the addresses of two procedures within that file, if they - * are defined. + * a handle to the new code. * * Results: * A standard Tcl completion code. If an error occurs, an error - * message is left in the interp's result. *proc1Ptr and *proc2Ptr - * are filled in with the addresses of the symbols given by - * *sym1 and *sym2, or NULL if those symbols can't be found. + * message is left in the interp's result. * * Side effects: * New code suddenly appears in memory. @@ -87,6 +84,21 @@ TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr) return TCL_OK; } +/* + *---------------------------------------------------------------------- + * + * TclpFindSymbol -- + * + * Looks up a symbol, by name, through a handle associated with + * a previously loaded piece of code (shared library). + * + * Results: + * Returns a pointer to the function associated with 'symbol' if + * it is found. Otherwise returns NULL and may leave an error + * message in the interp's result. + * + *---------------------------------------------------------------------- + */ Tcl_PackageInitProc* TclpFindSymbol(interp, loadHandle, symbol) Tcl_Interp *interp; @@ -138,15 +150,15 @@ TclpFindSymbol(interp, loadHandle, symbol) */ void -TclpUnloadFile(clientData) - ClientData clientData; /* ClientData returned by a previous call - * to TclpLoadFile(). The clientData is +TclpUnloadFile(loadHandle) + TclLoadHandle loadHandle; /* loadHandle returned by a previous call + * to TclpDlopen(). The loadHandle is * a token that represents the loaded * file. */ { VOID *handle; - handle = (VOID *) clientData; + handle = (VOID *) loadHandle; dlclose(handle); } diff --git a/unix/tclLoadDld.c b/unix/tclLoadDld.c index 99fee26..de0ab6d 100644 --- a/unix/tclLoadDld.c +++ b/unix/tclLoadDld.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDld.c,v 1.9 2002/07/17 20:00:46 vincentdarley Exp $ + * RCS: @(#) $Id: tclLoadDld.c,v 1.10 2002/07/18 15:04:53 vincentdarley Exp $ */ #include "tclInt.h" @@ -30,17 +30,14 @@ /* *---------------------------------------------------------------------- * - * TclpLoadFile -- + * TclpDlopen -- * * Dynamically loads a binary code file into memory and returns - * the addresses of two procedures within that file, if they - * are defined. + * a handle to the new code. * * Results: * A standard Tcl completion code. If an error occurs, an error - * message is left in the interp's result. *proc1Ptr and *proc2Ptr - * are filled in with the addresses of the symbols given by - * *sym1 and *sym2, or NULL if those symbols can't be found. + * message is left in the interp's result. * * Side effects: * New code suddenly appears in memory. @@ -99,6 +96,21 @@ TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr) return TCL_OK; } +/* + *---------------------------------------------------------------------- + * + * TclpFindSymbol -- + * + * Looks up a symbol, by name, through a handle associated with + * a previously loaded piece of code (shared library). + * + * Results: + * Returns a pointer to the function associated with 'symbol' if + * it is found. Otherwise returns NULL and may leave an error + * message in the interp's result. + * + *---------------------------------------------------------------------- + */ Tcl_PackageInitProc* TclpFindSymbol(interp, loadHandle, symbol) Tcl_Interp *interp; @@ -127,15 +139,15 @@ TclpFindSymbol(interp, loadHandle, symbol) */ void -TclpUnloadFile(clientData) - ClientData clientData; /* ClientData returned by a previous call - * to TclpLoadFile(). The clientData is +TclpUnloadFile(loadHandle) + TclLoadHandle loadHandle; /* loadHandle returned by a previous call + * to TclpDlopen(). The loadHandle is * a token that represents the loaded * file. */ { char *fileName; - handle = (char *) clientData; + handle = (char *) loadHandle; dld_unlink_by_file(handle, 0); ckfree(handle); } diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index 9eefd91..e220525 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDyld.c,v 1.9 2002/07/17 20:00:46 vincentdarley Exp $ + * RCS: @(#) $Id: tclLoadDyld.c,v 1.10 2002/07/18 15:04:53 vincentdarley Exp $ */ #include "tclInt.h" @@ -21,17 +21,14 @@ /* *---------------------------------------------------------------------- * - * TclpLoadFile -- + * TclpDlopen -- * - * Dynamically loads a binary code file into memory and returns - * the addresses of two procedures within that file, if they - * are defined. + * Dynamically loads a binary code file into memory and returns + * a handle to the new code. * * Results: * A standard Tcl completion code. If an error occurs, an error - * message is left in the interpreter's result. *proc1Ptr and *proc2Ptr - * are filled in with the addresses of the symbols given by - * *sym1 and *sym2, or NULL if those symbols can't be found. + * message is left in the interpreter's result. * * Side effects: * New code suddenly appears in memory. @@ -72,6 +69,21 @@ TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr) return TCL_OK; } +/* + *---------------------------------------------------------------------- + * + * TclpFindSymbol -- + * + * Looks up a symbol, by name, through a handle associated with + * a previously loaded piece of code (shared library). + * + * Results: + * Returns a pointer to the function associated with 'symbol' if + * it is found. Otherwise returns NULL and may leave an error + * message in the interp's result. + * + *---------------------------------------------------------------------- + */ Tcl_PackageInitProc* TclpFindSymbol(interp, loadHandle, symbol) Tcl_Interp *interp; @@ -124,13 +136,13 @@ TclpFindSymbol(interp, loadHandle, symbol) */ void -TclpUnloadFile(clientData) - ClientData clientData; /* ClientData returned by a previous call - * to TclpLoadFile(). The clientData is +TclpUnloadFile(loadHandle) + TclLoadHandle loadHandle; /* loadHandle returned by a previous call + * to TclpDlopen(). The loadHandle is * a token that represents the loaded * file. */ { - NSUnLinkModule(clientData, FALSE); + NSUnLinkModule(loadHandle, FALSE); } /* diff --git a/unix/tclLoadNext.c b/unix/tclLoadNext.c index cb09d38..67d7e18 100644 --- a/unix/tclLoadNext.c +++ b/unix/tclLoadNext.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadNext.c,v 1.8 2002/07/17 20:00:46 vincentdarley Exp $ + * RCS: @(#) $Id: tclLoadNext.c,v 1.9 2002/07/18 15:04:54 vincentdarley Exp $ */ #include "tclInt.h" @@ -20,17 +20,14 @@ /* *---------------------------------------------------------------------- * - * TclpLoadFile -- + * TclpDlopen -- * * Dynamically loads a binary code file into memory and returns - * the addresses of two procedures within that file, if they - * are defined. + * a handle to the new code. * * Results: * A standard Tcl completion code. If an error occurs, an error - * message is left in the interp's result. *proc1Ptr and *proc2Ptr - * are filled in with the addresses of the symbols given by - * *sym1 and *sym2, or NULL if those symbols can't be found. + * message is left in the interp's result. * * Side effects: * New code suddenly appears in memory. @@ -72,6 +69,21 @@ TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr) return TCL_OK; } +/* + *---------------------------------------------------------------------- + * + * TclpFindSymbol -- + * + * Looks up a symbol, by name, through a handle associated with + * a previously loaded piece of code (shared library). + * + * Results: + * Returns a pointer to the function associated with 'symbol' if + * it is found. Otherwise returns NULL and may leave an error + * message in the interp's result. + * + *---------------------------------------------------------------------- + */ Tcl_PackageInitProc* TclpFindSymbol(interp, loadHandle, symbol) Tcl_Interp *interp; @@ -106,9 +118,9 @@ TclpFindSymbol(interp, loadHandle, symbol) */ void -TclpUnloadFile(clientData) - ClientData clientData; /* ClientData returned by a previous call - * to TclpLoadFile(). The clientData is +TclpUnloadFile(loadHandle) + TclLoadHandle loadHandle; /* loadHandle returned by a previous call + * to TclpDlopen(). The loadHandle is * a token that represents the loaded * file. */ { diff --git a/unix/tclLoadOSF.c b/unix/tclLoadOSF.c index 8740feb..45d8ad6 100644 --- a/unix/tclLoadOSF.c +++ b/unix/tclLoadOSF.c @@ -31,7 +31,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadOSF.c,v 1.8 2002/07/17 20:00:46 vincentdarley Exp $ + * RCS: @(#) $Id: tclLoadOSF.c,v 1.9 2002/07/18 15:04:54 vincentdarley Exp $ */ #include "tclInt.h" @@ -41,17 +41,14 @@ /* *---------------------------------------------------------------------- * - * TclpLoadFile -- + * TclpDlopen -- * * Dynamically loads a binary code file into memory and returns - * the addresses of two procedures within that file, if they - * are defined. + * a handle to the new code. * * Results: * A standard Tcl completion code. If an error occurs, an error - * message is left in the interp's result. *proc1Ptr and *proc2Ptr - * are filled in with the addresses of the symbols given by - * *sym1 and *sym2, or NULL if those symbols can't be found. + * message is left in the interp's result. * * Side effects: * New code suddenly appears in memory. @@ -103,6 +100,21 @@ TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr) return TCL_OK; } +/* + *---------------------------------------------------------------------- + * + * TclpFindSymbol -- + * + * Looks up a symbol, by name, through a handle associated with + * a previously loaded piece of code (shared library). + * + * Results: + * Returns a pointer to the function associated with 'symbol' if + * it is found. Otherwise returns NULL and may leave an error + * message in the interp's result. + * + *---------------------------------------------------------------------- + */ Tcl_PackageInitProc* TclpFindSymbol(interp, loadHandle, symbol) Tcl_Interp *interp; @@ -131,9 +143,9 @@ TclpFindSymbol(interp, loadHandle, symbol) */ void -TclpUnloadFile(clientData) - ClientData clientData; /* ClientData returned by a previous call - * to TclpLoadFile(). The clientData is +TclpUnloadFile(loadHandle) + TclLoadHandle loadHandle; /* loadHandle returned by a previous call + * to TclpDlopen(). The loadHandle is * a token that represents the loaded * file. */ { diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c index 14e5b2d..9baadc6 100644 --- a/unix/tclLoadShl.c +++ b/unix/tclLoadShl.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadShl.c,v 1.10 2002/07/17 20:00:46 vincentdarley Exp $ + * RCS: @(#) $Id: tclLoadShl.c,v 1.11 2002/07/18 15:04:54 vincentdarley Exp $ */ #include <dl.h> @@ -28,17 +28,14 @@ /* *---------------------------------------------------------------------- * - * TclpLoadFile -- + * TclpDlopen -- * * Dynamically loads a binary code file into memory and returns - * the addresses of two procedures within that file, if they - * are defined. + * a handle to the new code. * * Results: * A standard Tcl completion code. If an error occurs, an error - * message is left in the interp's result. *proc1Ptr and *proc2Ptr - * are filled in with the addresses of the symbols given by - * *sym1 and *sym2, or NULL if those symbols can't be found. + * message is left in the interp's result. * * Side effects: * New code suddenly appears in memory. @@ -85,6 +82,21 @@ TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr) return TCL_OK; } +/* + *---------------------------------------------------------------------- + * + * TclpFindSymbol -- + * + * Looks up a symbol, by name, through a handle associated with + * a previously loaded piece of code (shared library). + * + * Results: + * Returns a pointer to the function associated with 'symbol' if + * it is found. Otherwise returns NULL and may leave an error + * message in the interp's result. + * + *---------------------------------------------------------------------- + */ Tcl_PackageInitProc* TclpFindSymbol(interp, loadHandle, symbol) Tcl_Interp *interp; @@ -133,15 +145,15 @@ TclpFindSymbol(interp, loadHandle, symbol) */ void -TclpUnloadFile(clientData) - ClientData clientData; /* ClientData returned by a previous call - * to TclpLoadFile(). The clientData is +TclpUnloadFile(loadHandle) + TclLoadHandle loadHandle; /* loadHandle returned by a previous call + * to TclpDlopen(). The loadHandle is * a token that represents the loaded * file. */ { shl_t handle; - handle = (shl_t) clientData; + handle = (shl_t) loadHandle; shl_unload(handle); } |