sl@0: /* sl@0: * tclLoadNone.c -- sl@0: * sl@0: * This procedure provides a version of the TclLoadFile for use sl@0: * in systems that don't support dynamic loading; it just returns sl@0: * an error. sl@0: * sl@0: * Copyright (c) 1995-1997 Sun Microsystems, Inc. sl@0: * sl@0: * See the file "license.terms" for information on usage and redistribution sl@0: * of this file, and for a DISCLAIMER OF ALL WARRANTIES. sl@0: * sl@0: * RCS: @(#) $Id: tclLoadNone.c,v 1.11 2002/07/18 16:26:03 vincentdarley Exp $ sl@0: */ sl@0: sl@0: #include "tclInt.h" sl@0: sl@0: /* sl@0: *---------------------------------------------------------------------- sl@0: * sl@0: * TclpDlopen -- sl@0: * sl@0: * This procedure is called to carry out dynamic loading of binary sl@0: * code; it is intended for use only on systems that don't support sl@0: * dynamic loading (it returns an error). sl@0: * sl@0: * Results: sl@0: * The result is TCL_ERROR, and an error message is left in sl@0: * the interp's result. sl@0: * sl@0: * Side effects: sl@0: * None. sl@0: * sl@0: *---------------------------------------------------------------------- sl@0: */ sl@0: sl@0: int sl@0: TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr) sl@0: Tcl_Interp *interp; /* Used for error reporting. */ sl@0: Tcl_Obj *pathPtr; /* Name of the file containing the desired sl@0: * code (UTF-8). */ sl@0: Tcl_LoadHandle *loadHandle; /* Filled with token for dynamically loaded sl@0: * file which will be passed back to sl@0: * (*unloadProcPtr)() to unload the file. */ sl@0: Tcl_FSUnloadFileProc **unloadProcPtr; sl@0: /* Filled with address of Tcl_FSUnloadFileProc sl@0: * function which should be used for sl@0: * this file. */ sl@0: { sl@0: Tcl_SetResult(interp, sl@0: "dynamic loading is not currently available on this system", sl@0: TCL_STATIC); sl@0: return TCL_ERROR; sl@0: } sl@0: sl@0: /* sl@0: *---------------------------------------------------------------------- sl@0: * sl@0: * TclpFindSymbol -- sl@0: * sl@0: * Looks up a symbol, by name, through a handle associated with sl@0: * a previously loaded piece of code (shared library). sl@0: * sl@0: * Results: sl@0: * Returns a pointer to the function associated with 'symbol' if sl@0: * it is found. Otherwise returns NULL and may leave an error sl@0: * message in the interp's result. sl@0: * sl@0: *---------------------------------------------------------------------- sl@0: */ sl@0: Tcl_PackageInitProc* sl@0: TclpFindSymbol(interp, loadHandle, symbol) sl@0: Tcl_Interp *interp; sl@0: Tcl_LoadHandle loadHandle; sl@0: CONST char *symbol; sl@0: { sl@0: return NULL; sl@0: } sl@0: sl@0: /* sl@0: *---------------------------------------------------------------------- sl@0: * sl@0: * TclGuessPackageName -- sl@0: * sl@0: * If the "load" command is invoked without providing a package sl@0: * name, this procedure is invoked to try to figure it out. sl@0: * sl@0: * Results: sl@0: * Always returns 0 to indicate that we couldn't figure out a sl@0: * package name; generic code will then try to guess the package sl@0: * from the file name. A return value of 1 would have meant that sl@0: * we figured out the package name and put it in bufPtr. sl@0: * sl@0: * Side effects: sl@0: * None. sl@0: * sl@0: *---------------------------------------------------------------------- sl@0: */ sl@0: sl@0: int sl@0: TclGuessPackageName(fileName, bufPtr) sl@0: CONST char *fileName; /* Name of file containing package (already sl@0: * translated to local form if needed). */ sl@0: Tcl_DString *bufPtr; /* Initialized empty dstring. Append sl@0: * package name to this if possible. */ sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: /* sl@0: *---------------------------------------------------------------------- sl@0: * sl@0: * TclpUnloadFile -- sl@0: * sl@0: * This procedure is called to carry out dynamic unloading of binary sl@0: * code; it is intended for use only on systems that don't support sl@0: * dynamic loading (it does nothing). sl@0: * sl@0: * Results: sl@0: * None. sl@0: * sl@0: * Side effects: sl@0: * None. sl@0: * sl@0: *---------------------------------------------------------------------- sl@0: */ sl@0: sl@0: void sl@0: TclpUnloadFile(loadHandle) sl@0: Tcl_LoadHandle loadHandle; /* loadHandle returned by a previous call sl@0: * to TclpDlopen(). The loadHandle is sl@0: * a token that represents the loaded sl@0: * file. */ sl@0: { sl@0: }