Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / dtdocbook / tcl / tclLoadNone.c
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
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
22  */
23 /* $XConsortium: tclLoadNone.c /main/2 1996/08/08 14:45:21 cde-hp $ */
24 /* 
25  * tclLoadNone.c --
26  *
27  *      This procedure provides a version of the TclLoadFile for use
28  *      in systems that don't support dynamic loading; it just returns
29  *      an error.
30  *
31  * Copyright (c) 1995-1996 Sun Microsystems, Inc.
32  *
33  * See the file "license.terms" for information on usage and redistribution
34  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
35  *
36  * SCCS: @(#) tclLoadNone.c 1.5 96/02/15 11:43:01
37  */
38
39 #include "tclInt.h"
40 \f
41 /*
42  *----------------------------------------------------------------------
43  *
44  * TclLoadFile --
45  *
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).
49  *
50  * Results:
51  *      The result is TCL_ERROR, and an error message is left in
52  *      interp->result.
53  *
54  * Side effects:
55  *      None.
56  *
57  *----------------------------------------------------------------------
58  */
59
60 int
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
64                                  * code. */
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. */
70 {
71     interp->result =
72             "dynamic loading is not currently available on this system";
73     return TCL_ERROR;
74 }
75 \f
76 /*
77  *----------------------------------------------------------------------
78  *
79  * TclGuessPackageName --
80  *
81  *      If the "load" command is invoked without providing a package
82  *      name, this procedure is invoked to try to figure it out.
83  *
84  * Results:
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.
89  *
90  * Side effects:
91  *      None.
92  *
93  *----------------------------------------------------------------------
94  */
95
96 int
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. */
102 {
103     return 0;
104 }