Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/generic/tclLoadNone.c @ 35

Last change on this file since 35 was 25, checked in by landauf, 17 years ago

added tcl to libs

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