pkge.cGo to the documentation of this file.00001 /* 00002 * pkge.c -- 00003 * 00004 * This file contains a simple Tcl package "pkge" that is intended for 00005 * testing the Tcl dynamic loading facilities. Its Init procedure returns 00006 * an error in order to test how this is handled. 00007 * 00008 * Copyright (c) 1995 Sun Microsystems, Inc. 00009 * 00010 * See the file "license.terms" for information on usage and redistribution of 00011 * this file, and for a DISCLAIMER OF ALL WARRANTIES. 00012 * 00013 * RCS: @(#) $Id: pkge.c,v 1.10 2007/12/13 15:28:43 dgp Exp $ 00014 */ 00015 00016 #include "tcl.h" 00017 00018 00019 /* 00020 *---------------------------------------------------------------------- 00021 * 00022 * Pkge_Init -- 00023 * 00024 * This is a package initialization procedure, which is called by Tcl 00025 * when this package is to be added to an interpreter. 00026 * 00027 * Results: 00028 * Returns TCL_ERROR and leaves an error message in interp->result. 00029 * 00030 * Side effects: 00031 * None. 00032 * 00033 *---------------------------------------------------------------------- 00034 */ 00035 00036 int 00037 Pkge_Init( 00038 Tcl_Interp *interp) /* Interpreter in which the package is to be 00039 * made available. */ 00040 { 00041 static char script[] = "if 44 {open non_existent}"; 00042 00043 if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { 00044 return TCL_ERROR; 00045 } 00046 return Tcl_Eval(interp, script); 00047 }
Generated on Wed Mar 12 12:18:25 2008 by 1.5.1 |