1/* 2 * tclLoadNone.c -- 3 * 4 * This procedure provides a version of the TclLoadFile for use 5 * in systems that don't support dynamic loading; it just returns 6 * an error. 7 * 8 * Copyright (c) 1995-1997 Sun Microsystems, Inc. 9 * 10 * See the file "license.terms" for information on usage and redistribution 11 * of this file, and for a DISCLAIMER OF ALL WARRANTIES. 12 * 13 * RCS: @(#) $Id: tclLoadNone.c,v 1.11 2002/07/18 16:26:03 vincentdarley Exp $ 14 */ 15 16#include "tclInt.h" 17 18/* 19 *---------------------------------------------------------------------- 20 * 21 * TclpDlopen -- 22 * 23 * This procedure is called to carry out dynamic loading of binary 24 * code; it is intended for use only on systems that don't support 25 * dynamic loading (it returns an error). 26 * 27 * Results: 28 * The result is TCL_ERROR, and an error message is left in 29 * the interp's result. 30 * 31 * Side effects: 32 * None. 33 * 34 *---------------------------------------------------------------------- 35 */ 36 37int 38TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr) 39 Tcl_Interp *interp; /* Used for error reporting. */ 40 Tcl_Obj *pathPtr; /* Name of the file containing the desired 41 * code (UTF-8). */ 42 Tcl_LoadHandle *loadHandle; /* Filled with token for dynamically loaded 43 * file which will be passed back to 44 * (*unloadProcPtr)() to unload the file. */ 45 Tcl_FSUnloadFileProc **unloadProcPtr; 46 /* Filled with address of Tcl_FSUnloadFileProc 47 * function which should be used for 48 * this file. */ 49{ 50 Tcl_SetResult(interp, 51 "dynamic loading is not currently available on this system", 52 TCL_STATIC); 53 return TCL_ERROR; 54} 55 56/* 57 *---------------------------------------------------------------------- 58 * 59 * TclpFindSymbol -- 60 * 61 * Looks up a symbol, by name, through a handle associated with 62 * a previously loaded piece of code (shared library). 63 * 64 * Results: 65 * Returns a pointer to the function associated with 'symbol' if 66 * it is found. Otherwise returns NULL and may leave an error 67 * message in the interp's result. 68 * 69 *---------------------------------------------------------------------- 70 */ 71Tcl_PackageInitProc* 72TclpFindSymbol(interp, loadHandle, symbol) 73 Tcl_Interp *interp; 74 Tcl_LoadHandle loadHandle; 75 CONST char *symbol; 76{ 77 return NULL; 78} 79 80/* 81 *---------------------------------------------------------------------- 82 * 83 * TclGuessPackageName -- 84 * 85 * If the "load" command is invoked without providing a package 86 * name, this procedure is invoked to try to figure it out. 87 * 88 * Results: 89 * Always returns 0 to indicate that we couldn't figure out a 90 * package name; generic code will then try to guess the package 91 * from the file name. A return value of 1 would have meant that 92 * we figured out the package name and put it in bufPtr. 93 * 94 * Side effects: 95 * None. 96 * 97 *---------------------------------------------------------------------- 98 */ 99 100int 101TclGuessPackageName(fileName, bufPtr) 102 CONST char *fileName; /* Name of file containing package (already 103 * translated to local form if needed). */ 104 Tcl_DString *bufPtr; /* Initialized empty dstring. Append 105 * package name to this if possible. */ 106{ 107 return 0; 108} 109 110/* 111 *---------------------------------------------------------------------- 112 * 113 * TclpUnloadFile -- 114 * 115 * This procedure is called to carry out dynamic unloading of binary 116 * code; it is intended for use only on systems that don't support 117 * dynamic loading (it does nothing). 118 * 119 * Results: 120 * None. 121 * 122 * Side effects: 123 * None. 124 * 125 *---------------------------------------------------------------------- 126 */ 127 128void 129TclpUnloadFile(loadHandle) 130 Tcl_LoadHandle loadHandle; /* loadHandle returned by a previous call 131 * to TclpDlopen(). The loadHandle is 132 * a token that represents the loaded 133 * file. */ 134{ 135} 136