tclLoadNone.c

Go to the documentation of this file.
00001 /*
00002  * tclLoadNone.c --
00003  *
00004  *      This procedure provides a version of the TclLoadFile for use in
00005  *      systems that don't support dynamic loading; it just returns an error.
00006  *
00007  * Copyright (c) 1995-1997 Sun Microsystems, Inc.
00008  *
00009  * See the file "license.terms" for information on usage and redistribution of
00010  * this file, and for a DISCLAIMER OF ALL WARRANTIES.
00011  *
00012  * RCS: @(#) $Id: tclLoadNone.c,v 1.12 2005/11/11 23:46:34 dkf Exp $
00013  */
00014 
00015 #include "tclInt.h"
00016 
00017 /*
00018  *----------------------------------------------------------------------
00019  *
00020  * TclpDlopen --
00021  *
00022  *      This procedure is called to carry out dynamic loading of binary code;
00023  *      it is intended for use only on systems that don't support dynamic
00024  *      loading (it returns an error).
00025  *
00026  * Results:
00027  *      The result is TCL_ERROR, and an error message is left in the interp's
00028  *      result.
00029  *
00030  * Side effects:
00031  *      None.
00032  *
00033  *----------------------------------------------------------------------
00034  */
00035 
00036 int
00037 TclpDlopen(
00038     Tcl_Interp *interp,         /* Used for error reporting. */
00039     Tcl_Obj *pathPtr,           /* Name of the file containing the desired
00040                                  * code (UTF-8). */
00041     Tcl_LoadHandle *loadHandle, /* Filled with token for dynamically loaded
00042                                  * file which will be passed back to
00043                                  * (*unloadProcPtr)() to unload the file. */
00044     Tcl_FSUnloadFileProc **unloadProcPtr)
00045                                 /* Filled with address of Tcl_FSUnloadFileProc
00046                                  * function which should be used for this
00047                                  * file. */
00048 {
00049     Tcl_SetResult(interp,
00050             "dynamic loading is not currently available on this system",
00051             TCL_STATIC);
00052     return TCL_ERROR;
00053 }
00054 
00055 /*
00056  *----------------------------------------------------------------------
00057  *
00058  * TclpFindSymbol --
00059  *
00060  *      Looks up a symbol, by name, through a handle associated with a
00061  *      previously loaded piece of code (shared library). This version of this
00062  *      routine should never be called because the associated TclpDlopen()
00063  *      function always returns an error.
00064  *
00065  * Results:
00066  *      Returns a pointer to the function associated with 'symbol' if it is
00067  *      found. Otherwise returns NULL and may leave an error message in the
00068  *      interp's result.
00069  *
00070  *----------------------------------------------------------------------
00071  */
00072 
00073 Tcl_PackageInitProc *
00074 TclpFindSymbol(
00075     Tcl_Interp *interp,
00076     Tcl_LoadHandle loadHandle,
00077     CONST char *symbol)
00078 {
00079     return NULL;
00080 }
00081 
00082 /*
00083  *----------------------------------------------------------------------
00084  *
00085  * TclGuessPackageName --
00086  *
00087  *      If the "load" command is invoked without providing a package name,
00088  *      this procedure is invoked to try to figure it out.
00089  *
00090  * Results:
00091  *      Always returns 0 to indicate that we couldn't figure out a package
00092  *      name; generic code will then try to guess the package from the file
00093  *      name. A return value of 1 would have meant that we figured out the
00094  *      package name and put it in bufPtr.
00095  *
00096  * Side effects:
00097  *      None.
00098  *
00099  *----------------------------------------------------------------------
00100  */
00101 
00102 int
00103 TclGuessPackageName(
00104     CONST char *fileName,       /* Name of file containing package (already
00105                                  * translated to local form if needed). */
00106     Tcl_DString *bufPtr)        /* Initialized empty dstring. Append package
00107                                  * name to this if possible. */
00108 {
00109     return 0;
00110 }
00111 
00112 /*
00113  *----------------------------------------------------------------------
00114  *
00115  * TclpUnloadFile --
00116  *
00117  *    This procedure is called to carry out dynamic unloading of binary code;
00118  *    it is intended for use only on systems that don't support dynamic
00119  *    loading (it does nothing).
00120  *
00121  * Results:
00122  *    None.
00123  *
00124  * Side effects:
00125  *    None.
00126  *
00127  *----------------------------------------------------------------------
00128  */
00129 
00130 void
00131 TclpUnloadFile(
00132     Tcl_LoadHandle loadHandle)  /* loadHandle returned by a previous call to
00133                                  * TclpDlopen(). The loadHandle is a token
00134                                  * that represents the loaded file. */
00135 {
00136 }
00137 
00138 /*
00139  * Local Variables:
00140  * mode: c
00141  * c-basic-offset: 4
00142  * fill-column: 78
00143  * End:
00144  */



Generated on Wed Mar 12 12:18:19 2008 by  doxygen 1.5.1