home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcltk805.zip / tcl805s.zip / tcl8.0.5 / os2 / dltest / pkge.c < prev    next >
C/C++ Source or Header  |  1999-04-23  |  1KB  |  50 lines

  1. /* 
  2.  * pkge.c --
  3.  *
  4.  *    This file contains a simple Tcl package "pkge" 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.
  7.  *
  8.  * Copyright (c) 1995 Sun Microsystems, Inc.
  9.  *
  10.  * See the file "license.terms" for information on usage and redistribution
  11.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  12.  *
  13.  * SCCS: @(#) pkge.c 1.5 96/03/07 09:34:27
  14.  */
  15. #include "tcl.h"
  16.  
  17. /*
  18.  * Prototypes for procedures defined later in this file:
  19.  */
  20.  
  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));
  25.  
  26. /*
  27.  *----------------------------------------------------------------------
  28.  *
  29.  * Pkge_Init --
  30.  *
  31.  *    This is a package initialization procedure, which is called
  32.  *    by Tcl when this package is to be added to an interpreter.
  33.  *
  34.  * Results:
  35.  *    Returns TCL_ERROR and leaves an error message in interp->result.
  36.  *
  37.  * Side effects:
  38.  *    None.
  39.  *
  40.  *----------------------------------------------------------------------
  41.  */
  42.  
  43. int
  44. Pkge_Init(interp)
  45.     Tcl_Interp *interp;        /* Interpreter in which the package is
  46.                  * to be made available. */
  47. {
  48.     return Tcl_Eval(interp, "if 44 {open non_existent}");
  49. }
  50.