4 * This file contains a simple Tcl package "pkgf" that is intended
5 * for testing the Tcl dynamic loading facilities. Its Init
6 * procedure returns an error in order to test how this is handled.
8 * Copyright (c) 1995 Sun Microsystems, Inc.
10 * See the file "license.terms" for information on usage and redistribution
11 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
18 * Prototypes for procedures defined later in this file:
21 static int Pkgd_SubCmd _ANSI_ARGS_((ClientData clientData,
22 Tcl_Interp *interp, int argc, char **argv));
23 static int Pkgd_UnsafeCmd _ANSI_ARGS_((ClientData clientData,
24 Tcl_Interp *interp, int argc, char **argv));
27 *----------------------------------------------------------------------
31 * This is a package initialization procedure, which is called
32 * by Tcl when this package is to be added to an interpreter.
35 * Returns TCL_ERROR and leaves an error message in interp->result.
40 *----------------------------------------------------------------------
45 Tcl_Interp *interp; /* Interpreter in which the package is
46 * to be made available. */
48 static char script[] = "if 44 {open non_existent}";
49 if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
52 return Tcl_Eval(interp, script);