os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/generic/tclLoadNone.c
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/generic/tclLoadNone.c Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,135 @@
1.4 +/*
1.5 + * tclLoadNone.c --
1.6 + *
1.7 + * This procedure provides a version of the TclLoadFile for use
1.8 + * in systems that don't support dynamic loading; it just returns
1.9 + * an error.
1.10 + *
1.11 + * Copyright (c) 1995-1997 Sun Microsystems, Inc.
1.12 + *
1.13 + * See the file "license.terms" for information on usage and redistribution
1.14 + * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
1.15 + *
1.16 + * RCS: @(#) $Id: tclLoadNone.c,v 1.11 2002/07/18 16:26:03 vincentdarley Exp $
1.17 + */
1.18 +
1.19 +#include "tclInt.h"
1.20 +
1.21 +/*
1.22 + *----------------------------------------------------------------------
1.23 + *
1.24 + * TclpDlopen --
1.25 + *
1.26 + * This procedure is called to carry out dynamic loading of binary
1.27 + * code; it is intended for use only on systems that don't support
1.28 + * dynamic loading (it returns an error).
1.29 + *
1.30 + * Results:
1.31 + * The result is TCL_ERROR, and an error message is left in
1.32 + * the interp's result.
1.33 + *
1.34 + * Side effects:
1.35 + * None.
1.36 + *
1.37 + *----------------------------------------------------------------------
1.38 + */
1.39 +
1.40 +int
1.41 +TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr)
1.42 + Tcl_Interp *interp; /* Used for error reporting. */
1.43 + Tcl_Obj *pathPtr; /* Name of the file containing the desired
1.44 + * code (UTF-8). */
1.45 + Tcl_LoadHandle *loadHandle; /* Filled with token for dynamically loaded
1.46 + * file which will be passed back to
1.47 + * (*unloadProcPtr)() to unload the file. */
1.48 + Tcl_FSUnloadFileProc **unloadProcPtr;
1.49 + /* Filled with address of Tcl_FSUnloadFileProc
1.50 + * function which should be used for
1.51 + * this file. */
1.52 +{
1.53 + Tcl_SetResult(interp,
1.54 + "dynamic loading is not currently available on this system",
1.55 + TCL_STATIC);
1.56 + return TCL_ERROR;
1.57 +}
1.58 +
1.59 +/*
1.60 + *----------------------------------------------------------------------
1.61 + *
1.62 + * TclpFindSymbol --
1.63 + *
1.64 + * Looks up a symbol, by name, through a handle associated with
1.65 + * a previously loaded piece of code (shared library).
1.66 + *
1.67 + * Results:
1.68 + * Returns a pointer to the function associated with 'symbol' if
1.69 + * it is found. Otherwise returns NULL and may leave an error
1.70 + * message in the interp's result.
1.71 + *
1.72 + *----------------------------------------------------------------------
1.73 + */
1.74 +Tcl_PackageInitProc*
1.75 +TclpFindSymbol(interp, loadHandle, symbol)
1.76 + Tcl_Interp *interp;
1.77 + Tcl_LoadHandle loadHandle;
1.78 + CONST char *symbol;
1.79 +{
1.80 + return NULL;
1.81 +}
1.82 +
1.83 +/*
1.84 + *----------------------------------------------------------------------
1.85 + *
1.86 + * TclGuessPackageName --
1.87 + *
1.88 + * If the "load" command is invoked without providing a package
1.89 + * name, this procedure is invoked to try to figure it out.
1.90 + *
1.91 + * Results:
1.92 + * Always returns 0 to indicate that we couldn't figure out a
1.93 + * package name; generic code will then try to guess the package
1.94 + * from the file name. A return value of 1 would have meant that
1.95 + * we figured out the package name and put it in bufPtr.
1.96 + *
1.97 + * Side effects:
1.98 + * None.
1.99 + *
1.100 + *----------------------------------------------------------------------
1.101 + */
1.102 +
1.103 +int
1.104 +TclGuessPackageName(fileName, bufPtr)
1.105 + CONST char *fileName; /* Name of file containing package (already
1.106 + * translated to local form if needed). */
1.107 + Tcl_DString *bufPtr; /* Initialized empty dstring. Append
1.108 + * package name to this if possible. */
1.109 +{
1.110 + return 0;
1.111 +}
1.112 +
1.113 +/*
1.114 + *----------------------------------------------------------------------
1.115 + *
1.116 + * TclpUnloadFile --
1.117 + *
1.118 + * This procedure is called to carry out dynamic unloading of binary
1.119 + * code; it is intended for use only on systems that don't support
1.120 + * dynamic loading (it does nothing).
1.121 + *
1.122 + * Results:
1.123 + * None.
1.124 + *
1.125 + * Side effects:
1.126 + * None.
1.127 + *
1.128 + *----------------------------------------------------------------------
1.129 + */
1.130 +
1.131 +void
1.132 +TclpUnloadFile(loadHandle)
1.133 + Tcl_LoadHandle loadHandle; /* loadHandle returned by a previous call
1.134 + * to TclpDlopen(). The loadHandle is
1.135 + * a token that represents the loaded
1.136 + * file. */
1.137 +{
1.138 +}