home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tkisrc04.zip / tcl / os2 / tclLoadNone.c < prev    next >
C/C++ Source or Header  |  1998-08-07  |  2KB  |  82 lines

  1. /* 
  2.  * tclLoadNone.c --
  3.  *
  4.  *    This procedure provides a version of the TclLoadFile for use
  5.  *    in systems that don't support dynamic loading; it just returns
  6.  *    an error.
  7.  *
  8.  * Copyright (c) 1995-1996 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: @(#) tclLoadNone.c 1.5 96/02/15 11:43:01
  14.  */
  15.  
  16. #include "tclInt.h"
  17.  
  18. /*
  19.  *----------------------------------------------------------------------
  20.  *
  21.  * TclLoadFile --
  22.  *
  23.  *    This procedure is called to carry out dynamic loading of binary
  24.  *    code;  it is intended for use only on systems that don't support
  25.  *    dynamic loading (it returns an error).
  26.  *
  27.  * Results:
  28.  *    The result is TCL_ERROR, and an error message is left in
  29.  *    interp->result.
  30.  *
  31.  * Side effects:
  32.  *    None.
  33.  *
  34.  *----------------------------------------------------------------------
  35.  */
  36.  
  37. int
  38. TclLoadFile(interp, fileName, sym1, sym2, proc1Ptr, proc2Ptr)
  39.     Tcl_Interp *interp;        /* Used for error reporting. */
  40.     char *fileName;        /* Name of the file containing the desired
  41.                  * code. */
  42.     char *sym1, *sym2;        /* Names of two procedures to look up in
  43.                  * the file's symbol table. */
  44.     Tcl_PackageInitProc **proc1Ptr, **proc2Ptr;
  45.                 /* Where to return the addresses corresponding
  46.                  * to sym1 and sym2. */
  47. {
  48.     interp->result =
  49.         "dynamic loading is not currently available on this system";
  50.     return TCL_ERROR;
  51. }
  52.  
  53. /*
  54.  *----------------------------------------------------------------------
  55.  *
  56.  * TclGuessPackageName --
  57.  *
  58.  *    If the "load" command is invoked without providing a package
  59.  *    name, this procedure is invoked to try to figure it out.
  60.  *
  61.  * Results:
  62.  *    Always returns 0 to indicate that we couldn't figure out a
  63.  *    package name;  generic code will then try to guess the package
  64.  *    from the file name.  A return value of 1 would have meant that
  65.  *    we figured out the package name and put it in bufPtr.
  66.  *
  67.  * Side effects:
  68.  *    None.
  69.  *
  70.  *----------------------------------------------------------------------
  71.  */
  72.  
  73. int
  74. TclGuessPackageName(fileName, bufPtr)
  75.     char *fileName;        /* Name of file containing package (already
  76.                  * translated to local form if needed). */
  77.     Tcl_DString *bufPtr;    /* Initialized empty dstring.  Append
  78.                  * package name to this if possible. */
  79. {
  80.     return 0;
  81. }
  82.