2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: tclLoadNone.c /main/2 1996/08/08 14:45:21 cde-hp $ */
27 * This procedure provides a version of the TclLoadFile for use
28 * in systems that don't support dynamic loading; it just returns
31 * Copyright (c) 1995-1996 Sun Microsystems, Inc.
33 * See the file "license.terms" for information on usage and redistribution
34 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
36 * SCCS: @(#) tclLoadNone.c 1.5 96/02/15 11:43:01
42 *----------------------------------------------------------------------
46 * This procedure is called to carry out dynamic loading of binary
47 * code; it is intended for use only on systems that don't support
48 * dynamic loading (it returns an error).
51 * The result is TCL_ERROR, and an error message is left in
57 *----------------------------------------------------------------------
61 TclLoadFile(interp, fileName, sym1, sym2, proc1Ptr, proc2Ptr)
62 Tcl_Interp *interp; /* Used for error reporting. */
63 char *fileName; /* Name of the file containing the desired
65 char *sym1, *sym2; /* Names of two procedures to look up in
66 * the file's symbol table. */
67 Tcl_PackageInitProc **proc1Ptr, **proc2Ptr;
68 /* Where to return the addresses corresponding
69 * to sym1 and sym2. */
72 "dynamic loading is not currently available on this system";
77 *----------------------------------------------------------------------
79 * TclGuessPackageName --
81 * If the "load" command is invoked without providing a package
82 * name, this procedure is invoked to try to figure it out.
85 * Always returns 0 to indicate that we couldn't figure out a
86 * package name; generic code will then try to guess the package
87 * from the file name. A return value of 1 would have meant that
88 * we figured out the package name and put it in bufPtr.
93 *----------------------------------------------------------------------
97 TclGuessPackageName(fileName, bufPtr)
98 char *fileName; /* Name of file containing package (already
99 * translated to local form if needed). */
100 Tcl_DString *bufPtr; /* Initialized empty dstring. Append
101 * package name to this if possible. */