home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcltk805.zip / tcl805s.zip / tcl8.0.5 / os2 / tcl.h < prev    next >
C/C++ Source or Header  |  2001-07-28  |  62KB  |  1,603 lines

  1. /*
  2.  * tcl.h --
  3.  *
  4.  *    This header file describes the externally-visible facilities
  5.  *    of the Tcl interpreter.
  6.  *
  7.  * Copyright (c) 1987-1994 The Regents of the University of California.
  8.  * Copyright (c) 1994-1997 Sun Microsystems, Inc.
  9.  * Copyright (c) 1993-1996 Lucent Technologies.
  10.  * Copyright (c) 1998-1999 Scriptics Corporation.
  11.  *
  12.  * See the file "license.terms" for information on usage and redistribution
  13.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  14.  *
  15.  * RCS: @(#) $Id: tcl.h,v 1.33 1999/02/03 02:58:25 stanton Exp $
  16.  */
  17.  
  18. #ifndef _TCL
  19. #define _TCL
  20.  
  21. /*
  22.  * When version numbers change here, must also go into the following files
  23.  * and update the version numbers:
  24.  *
  25.  * README
  26.  * library/init.tcl    (only if major.minor changes, not patchlevel)
  27.  * unix/configure.in
  28.  * win/makefile.bc    (only if major.minor changes, not patchlevel)
  29.  * win/makefile.vc    (only if major.minor changes, not patchlevel)
  30.  * win/README
  31.  * win/README.binary
  32.  * mac/README
  33.  * os2/makefile    (only if major.minor changes, not patchlevel)
  34.  * os2/README
  35.  *
  36.  * The release level should be  0 for alpha, 1 for beta, and 2 for
  37.  * final/patch.  The release serial value is the number that follows the
  38.  * "a", "b", or "p" in the patch level; for example, if the patch level
  39.  * is 7.6b2, TCL_RELEASE_SERIAL is 2.  It restarts at 1 whenever the
  40.  * release level is changed, except for the final release which is 0
  41.  * (the first patch will start at 1).
  42.  */
  43.  
  44. #define TCL_MAJOR_VERSION   8
  45. #define TCL_MINOR_VERSION   0
  46. #define TCL_RELEASE_LEVEL   2
  47. #define TCL_RELEASE_SERIAL  5
  48.  
  49. #define TCL_VERSION        "8.0"
  50. #define TCL_PATCH_LEVEL        "8.0.5"
  51.  
  52. /*
  53.  * The following definitions set up the proper options for Windows
  54.  * compilers.  We use this method because there is no autoconf equivalent.
  55.  */
  56.  
  57. #ifndef __WIN32__
  58. #   if defined(_WIN32) || defined(WIN32)
  59. #    define __WIN32__
  60. #   endif
  61. #endif
  62.  
  63. #ifdef __WIN32__
  64. #   ifndef STRICT
  65. #    define STRICT
  66. #   endif
  67. #   ifndef USE_PROTOTYPE
  68. #    define USE_PROTOTYPE 1
  69. #   endif
  70. #   ifndef HAS_STDARG
  71. #    define HAS_STDARG 1
  72. #   endif
  73. #   ifndef USE_PROTOTYPE
  74. #    define USE_PROTOTYPE 1
  75. #   endif
  76.  
  77. /*
  78.  * Under Windows we need to call Tcl_Alloc in all cases to avoid competing
  79.  * C run-time library issues.
  80.  */
  81.  
  82. #   ifndef USE_TCLALLOC
  83. #    define USE_TCLALLOC 1
  84. #   endif
  85. #endif /* __WIN32__ */
  86.  
  87. /*
  88.  * The following definitions set up the proper options for Macintosh
  89.  * compilers.  We use this method because there is no autoconf equivalent.
  90.  */
  91.  
  92. #ifdef MAC_TCL
  93. #   ifndef HAS_STDARG
  94. #    define HAS_STDARG 1
  95. #   endif
  96. #   ifndef USE_TCLALLOC
  97. #    define USE_TCLALLOC 1
  98. #   endif
  99. #   ifndef NO_STRERROR
  100. #    define NO_STRERROR 1
  101. #   endif
  102. #endif
  103.  
  104. /*
  105.  * The following definitions set up the proper options for OS/2
  106.  * compilers.  We use this method because don't use autoconf.
  107.  */
  108.  
  109. #ifdef __OS2__
  110. #   ifndef STRICT
  111. #       define STRICT
  112. #   endif
  113. #   ifndef USE_PROTOTYPE
  114. #       define USE_PROTOTYPE 1
  115. #   endif
  116. #   ifndef HAS_STDARG
  117. #       define HAS_STDARG 1
  118. #   endif
  119. #   ifndef USE_TCLALLOC
  120. #       define USE_TCLALLOC 1
  121. #   endif
  122. #endif /* __OS2__ */
  123.  
  124. /*
  125.  * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
  126.  * quotation marks), JOIN joins two arguments.
  127.  */
  128.  
  129. #define VERBATIM(x) x
  130. #ifdef _MSC_VER
  131. # define STRINGIFY(x) STRINGIFY1(x)
  132. # define STRINGIFY1(x) #x
  133. # define JOIN(a,b) JOIN1(a,b)
  134. # define JOIN1(a,b) a##b
  135. #else
  136. # ifdef RESOURCE_INCLUDED
  137. #  define STRINGIFY(x) STRINGIFY1(x)
  138. #  define STRINGIFY1(x) #x
  139. #  define JOIN(a,b) JOIN1(a,b)
  140. #  define JOIN1(a,b) a##b
  141. # else
  142. #  ifdef __STDC__
  143. #   define STRINGIFY(x) #x
  144. #   define JOIN(a,b) a##b
  145. #  else
  146. #   define STRINGIFY(x) "x"
  147. #   define JOIN(a,b) VERBATIM(a)VERBATIM(b)
  148. #  endif
  149. # endif
  150. #endif
  151.  
  152. /* 
  153.  * A special definition used to allow this header file to be included 
  154.  * in resource files so that they can get obtain version information from
  155.  * this file.  Resource compilers don't like all the C stuff, like typedefs
  156.  * and procedure declarations, that occur below.
  157.  */
  158.  
  159. #ifndef RESOURCE_INCLUDED
  160.  
  161. #ifndef BUFSIZ
  162. #include <stdio.h>
  163. #endif
  164.  
  165. /*
  166.  * Definitions that allow Tcl functions with variable numbers of
  167.  * arguments to be used with either varargs.h or stdarg.h.  TCL_VARARGS
  168.  * is used in procedure prototypes.  TCL_VARARGS_DEF is used to declare
  169.  * the arguments in a function definiton: it takes the type and name of
  170.  * the first argument and supplies the appropriate argument declaration
  171.  * string for use in the function definition.  TCL_VARARGS_START
  172.  * initializes the va_list data structure and returns the first argument.
  173.  */
  174.  
  175. #if defined(__STDC__) || defined(HAS_STDARG)
  176. #   define TCL_VARARGS(type, name) (type name, ...)
  177. #   define TCL_VARARGS_DEF(type, name) (type name, ...)
  178. #   define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
  179. #else
  180. #   ifdef __cplusplus
  181. #    define TCL_VARARGS(type, name) (type name, ...)
  182. #    define TCL_VARARGS_DEF(type, name) (type va_alist, ...)
  183. #   else
  184. #    define TCL_VARARGS(type, name) ()
  185. #    define TCL_VARARGS_DEF(type, name) (va_alist)
  186. #   endif
  187. #   define TCL_VARARGS_START(type, name, list) \
  188.     (va_start(list), va_arg(list, type))
  189. #endif
  190.  
  191. /*
  192.  * Macros used to declare a function to be exported by a DLL.
  193.  * Used by Windows, maps to no-op declarations on non-Windows systems.
  194.  * The default build on windows is for a DLL, which causes the DLLIMPORT
  195.  * and DLLEXPORT macros to be nonempty. To build a static library, the
  196.  * macro STATIC_BUILD should be defined.
  197.  * The support follows the convention that a macro called BUILD_xxxx, where
  198.  * xxxx is the name of a library we are building, is set on the compile line
  199.  * for sources that are to be placed in the library. See BUILD_tcl in this
  200.  * file for an example of how the macro is to be used.
  201.  */
  202.  
  203. #ifdef __WIN32__
  204. # ifdef STATIC_BUILD
  205. #  define DLLIMPORT
  206. #  define DLLEXPORT
  207. # else
  208. #  if defined(_MSC_VER) || (defined(__GNUC__) && defined(__declspec))
  209. #   define DLLIMPORT __declspec(dllimport)
  210. #   define DLLEXPORT __declspec(dllexport)
  211. #  else
  212. #   define DLLIMPORT
  213. #   define DLLEXPORT
  214. #  endif
  215. # endif
  216. #else
  217. # define DLLIMPORT
  218. # define DLLEXPORT
  219. #endif
  220.  
  221. #ifdef TCL_STORAGE_CLASS
  222. # undef TCL_STORAGE_CLASS
  223. #endif
  224. #ifdef BUILD_tcl
  225. # define TCL_STORAGE_CLASS DLLEXPORT
  226. #else
  227. # define TCL_STORAGE_CLASS DLLIMPORT
  228. #endif
  229.  
  230. /*
  231.  * Definitions that allow this header file to be used either with or
  232.  * without ANSI C features like function prototypes.
  233.  */
  234.  
  235. #undef _ANSI_ARGS_
  236. #undef CONST
  237.  
  238. #if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) || defined(USE_PROTOTYPE)
  239. #   define _USING_PROTOTYPES_ 1
  240. #   define _ANSI_ARGS_(x)    x
  241. #   define CONST const
  242. #else
  243. #   define _ANSI_ARGS_(x)    ()
  244. #   define CONST
  245. #endif
  246.  
  247. #ifdef __cplusplus
  248. #   define EXTERN extern "C" TCL_STORAGE_CLASS
  249. #else
  250. #   define EXTERN extern TCL_STORAGE_CLASS
  251. #endif
  252.  
  253. /*
  254.  * Macro to use instead of "void" for arguments that must have
  255.  * type "void *" in ANSI C;  maps them to type "char *" in
  256.  * non-ANSI systems.
  257.  */
  258. #ifndef __WIN32__
  259. #ifndef VOID
  260. #   ifdef __STDC__
  261. #       define VOID void
  262. #   else
  263. #       define VOID char
  264. #   endif
  265. #endif
  266. #else /* __WIN32__ */
  267. /*
  268.  * The following code is copied from winnt.h
  269.  */
  270. #ifndef VOID
  271. #define VOID void
  272. typedef char CHAR;
  273. typedef short SHORT;
  274. typedef long LONG;
  275. #endif
  276. #endif /* __WIN32__ */
  277.  
  278. /*
  279.  * Miscellaneous declarations.
  280.  */
  281.  
  282. #ifndef NULL
  283. #define NULL 0
  284. #endif
  285.  
  286. #ifndef _CLIENTDATA
  287. #   if defined(__STDC__) || defined(__cplusplus)
  288.     typedef void *ClientData;
  289. #   else
  290.     typedef int *ClientData;
  291. #   endif /* __STDC__ */
  292. #define _CLIENTDATA
  293. #endif
  294.  
  295. /*
  296.  * Data structures defined opaquely in this module. The definitions below
  297.  * just provide dummy types. A few fields are made visible in Tcl_Interp
  298.  * structures, namely those used for returning a string result from
  299.  * commands. Direct access to the result field is discouraged in Tcl 8.0.
  300.  * The interpreter result is either an object or a string, and the two
  301.  * values are kept consistent unless some C code sets interp->result
  302.  * directly. Programmers should use either the procedure Tcl_GetObjResult()
  303.  * or Tcl_GetStringResult() to read the interpreter's result. See the
  304.  * SetResult man page for details.
  305.  * 
  306.  * Note: any change to the Tcl_Interp definition below must be mirrored
  307.  * in the "real" definition in tclInt.h.
  308.  *
  309.  * Note: Tcl_ObjCmdProc procedures do not directly set result and freeProc.
  310.  * Instead, they set a Tcl_Obj member in the "real" structure that can be
  311.  * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
  312.  */
  313.  
  314. typedef struct Tcl_Interp {
  315.     char *result;        /* If the last command returned a string
  316.                  * result, this points to it. */
  317.     void (*freeProc) _ANSI_ARGS_((char *blockPtr));
  318.                 /* Zero means the string result is
  319.                  * statically allocated. TCL_DYNAMIC means
  320.                  * it was allocated with ckalloc and should
  321.                  * be freed with ckfree. Other values give
  322.                  * the address of procedure to invoke to
  323.                  * free the result. Tcl_Eval must free it
  324.                  * before executing next command. */
  325.     int errorLine;              /* When TCL_ERROR is returned, this gives
  326.                                  * the line number within the command where
  327.                                  * the error occurred (1 if first line). */
  328. } Tcl_Interp;
  329.  
  330. typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
  331. typedef struct Tcl_Channel_ *Tcl_Channel;
  332. typedef struct Tcl_Command_ *Tcl_Command;
  333. typedef struct Tcl_Event Tcl_Event;
  334. typedef struct Tcl_Pid_ *Tcl_Pid;
  335. typedef struct Tcl_RegExp_ *Tcl_RegExp;
  336. typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
  337. typedef struct Tcl_Trace_ *Tcl_Trace;
  338. typedef struct Tcl_Var_ *Tcl_Var;
  339.  
  340. /*
  341.  * When a TCL command returns, the interpreter contains a result from the
  342.  * command. Programmers are strongly encouraged to use one of the
  343.  * procedures Tcl_GetObjResult() or Tcl_GetStringResult() to read the
  344.  * interpreter's result. See the SetResult man page for details. Besides
  345.  * this result, the command procedure returns an integer code, which is 
  346.  * one of the following:
  347.  *
  348.  * TCL_OK        Command completed normally; the interpreter's
  349.  *            result contains    the command's result.
  350.  * TCL_ERROR        The command couldn't be completed successfully;
  351.  *            the interpreter's result describes what went wrong.
  352.  * TCL_RETURN        The command requests that the current procedure
  353.  *            return; the interpreter's result contains the
  354.  *            procedure's return value.
  355.  * TCL_BREAK        The command requests that the innermost loop
  356.  *            be exited; the interpreter's result is meaningless.
  357.  * TCL_CONTINUE        Go on to the next iteration of the current loop;
  358.  *            the interpreter's result is meaningless.
  359.  */
  360.  
  361. #define TCL_OK        0
  362. #define TCL_ERROR    1
  363. #define TCL_RETURN    2
  364. #define TCL_BREAK    3
  365. #define TCL_CONTINUE    4
  366.  
  367. #define TCL_RESULT_SIZE 200
  368.  
  369. /*
  370.  * Argument descriptors for math function callbacks in expressions:
  371.  */
  372.  
  373. typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
  374. typedef struct Tcl_Value {
  375.     Tcl_ValueType type;        /* Indicates intValue or doubleValue is
  376.                  * valid, or both. */
  377.     long intValue;        /* Integer value. */
  378.     double doubleValue;        /* Double-precision floating value. */
  379. } Tcl_Value;
  380.  
  381. /*
  382.  * Forward declaration of Tcl_Obj to prevent an error when the forward
  383.  * reference to Tcl_Obj is encountered in the procedure types declared 
  384.  * below.
  385.  */
  386.  
  387. struct Tcl_Obj;
  388.  
  389. /*
  390.  * Procedure types defined by Tcl:
  391.  */
  392.  
  393. typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
  394. typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
  395.     Tcl_Interp *interp, int code));
  396. typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask));
  397. typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
  398. typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
  399. typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
  400.     Tcl_Interp *interp, int argc, char *argv[]));
  401. typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
  402.     Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
  403.     ClientData cmdClientData, int argc, char *argv[]));
  404. typedef void (Tcl_DupInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *srcPtr, 
  405.         struct Tcl_Obj *dupPtr));
  406. typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags));
  407. typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData,
  408.     int flags));
  409. typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr,
  410.         ClientData clientData));
  411. typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData,
  412.     int flags));
  413. typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData));
  414. typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask));
  415. typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData));
  416. typedef void (Tcl_FreeInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
  417. typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
  418. typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData));
  419. typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
  420.     Tcl_Interp *interp));
  421. typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
  422.     Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
  423. typedef void (Tcl_NamespaceDeleteProc) _ANSI_ARGS_((ClientData clientData));
  424. typedef int (Tcl_ObjCmdProc) _ANSI_ARGS_((ClientData clientData,
  425.     Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST objv[]));
  426. typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
  427. typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData,
  428.         Tcl_Channel chan, char *address, int port));
  429. typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData));
  430. typedef int (Tcl_SetFromAnyProc) _ANSI_ARGS_((Tcl_Interp *interp,
  431.     struct Tcl_Obj *objPtr));
  432. typedef void (Tcl_UpdateStringProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
  433. typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
  434.     Tcl_Interp *interp, char *part1, char *part2, int flags));
  435.  
  436. /*
  437.  * The following structure represents a type of object, which is a
  438.  * particular internal representation for an object plus a set of
  439.  * procedures that provide standard operations on objects of that type.
  440.  */
  441.  
  442. typedef struct Tcl_ObjType {
  443.     char *name;            /* Name of the type, e.g. "int". */
  444.     Tcl_FreeInternalRepProc *freeIntRepProc;
  445.                 /* Called to free any storage for the type's
  446.                  * internal rep. NULL if the internal rep
  447.                  * does not need freeing. */
  448.     Tcl_DupInternalRepProc *dupIntRepProc;
  449.                     /* Called to create a new object as a copy
  450.                  * of an existing object. */
  451.     Tcl_UpdateStringProc *updateStringProc;
  452.                     /* Called to update the string rep from the
  453.                  * type's internal representation. */
  454.     Tcl_SetFromAnyProc *setFromAnyProc;
  455.                     /* Called to convert the object's internal
  456.                  * rep to this type. Frees the internal rep
  457.                  * of the old type. Returns TCL_ERROR on
  458.                  * failure. */
  459. } Tcl_ObjType;
  460.  
  461. /*
  462.  * One of the following structures exists for each object in the Tcl
  463.  * system. An object stores a value as either a string, some internal
  464.  * representation, or both.
  465.  */
  466.  
  467. typedef struct Tcl_Obj {
  468.     int refCount;        /* When 0 the object will be freed. */
  469.     char *bytes;        /* This points to the first byte of the
  470.                  * object's string representation. The array
  471.                  * must be followed by a null byte (i.e., at
  472.                  * offset length) but may also contain
  473.                  * embedded null characters. The array's
  474.                  * storage is allocated by ckalloc. NULL
  475.                  * means the string rep is invalid and must
  476.                  * be regenerated from the internal rep.
  477.                  * Clients should use Tcl_GetStringFromObj
  478.                  * to get a pointer to the byte array as a
  479.                  * readonly value. */
  480.     int length;            /* The number of bytes at *bytes, not
  481.                  * including the terminating null. */
  482.     Tcl_ObjType *typePtr;    /* Denotes the object's type. Always
  483.                  * corresponds to the type of the object's
  484.                  * internal rep. NULL indicates the object
  485.                  * has no internal rep (has no type). */
  486.     union {            /* The internal representation: */
  487.     long longValue;        /*   - an long integer value */
  488.     double doubleValue;    /*   - a double-precision floating value */
  489.     VOID *otherValuePtr;    /*   - another, type-specific value */
  490.     struct {        /*   - internal rep as two pointers */
  491.         VOID *ptr1;
  492.         VOID *ptr2;
  493.     } twoPtrValue;
  494.     } internalRep;
  495. } Tcl_Obj;
  496.  
  497. /*
  498.  * Macros to increment and decrement a Tcl_Obj's reference count, and to
  499.  * test whether an object is shared (i.e. has reference count > 1).
  500.  * Note: clients should use Tcl_DecrRefCount() when they are finished using
  501.  * an object, and should never call TclFreeObj() directly. TclFreeObj() is
  502.  * only defined and made public in tcl.h to support Tcl_DecrRefCount's macro
  503.  * definition. Note also that Tcl_DecrRefCount() refers to the parameter
  504.  * "obj" twice. This means that you should avoid calling it with an
  505.  * expression that is expensive to compute or has side effects.
  506.  */
  507.  
  508. EXTERN void        Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
  509. EXTERN void        Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
  510. EXTERN int        Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr));
  511.  
  512. #ifdef TCL_MEM_DEBUG
  513. #   define Tcl_IncrRefCount(objPtr) \
  514.     Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__)
  515. #   define Tcl_DecrRefCount(objPtr) \
  516.     Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__)
  517. #   define Tcl_IsShared(objPtr) \
  518.     Tcl_DbIsShared(objPtr, __FILE__, __LINE__)
  519. #else
  520. #   define Tcl_IncrRefCount(objPtr) \
  521.     ++(objPtr)->refCount
  522. #   define Tcl_DecrRefCount(objPtr) \
  523.     if (--(objPtr)->refCount <= 0) TclFreeObj(objPtr)
  524. #   define Tcl_IsShared(objPtr) \
  525.     ((objPtr)->refCount > 1)
  526. #endif
  527.  
  528. /*
  529.  * Macros and definitions that help to debug the use of Tcl objects.
  530.  * When TCL_MEM_DEBUG is defined, the Tcl_New* declarations are 
  531.  * overridden to call debugging versions of the object creation procedures.
  532.  */
  533.  
  534. EXTERN Tcl_Obj *    Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));
  535. EXTERN Tcl_Obj *    Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));
  536. EXTERN Tcl_Obj *    Tcl_NewIntObj _ANSI_ARGS_((int intValue));
  537. EXTERN Tcl_Obj *    Tcl_NewListObj _ANSI_ARGS_((int objc,
  538.                 Tcl_Obj *CONST objv[]));
  539. EXTERN Tcl_Obj *    Tcl_NewLongObj _ANSI_ARGS_((long longValue));
  540. EXTERN Tcl_Obj *    Tcl_NewObj _ANSI_ARGS_((void));
  541. EXTERN Tcl_Obj *    Tcl_NewStringObj _ANSI_ARGS_((char *bytes,
  542.                 int length));
  543.  
  544. #ifdef TCL_MEM_DEBUG
  545. #  define Tcl_NewBooleanObj(val) \
  546.      Tcl_DbNewBooleanObj(val, __FILE__, __LINE__)
  547. #  define Tcl_NewDoubleObj(val) \
  548.      Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)
  549. #  define Tcl_NewIntObj(val) \
  550.      Tcl_DbNewLongObj(val, __FILE__, __LINE__)
  551. #  define Tcl_NewListObj(objc, objv) \
  552.      Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__)
  553. #  define Tcl_NewLongObj(val) \
  554.      Tcl_DbNewLongObj(val, __FILE__, __LINE__)
  555. #  define Tcl_NewObj() \
  556.      Tcl_DbNewObj(__FILE__, __LINE__)
  557. #  define Tcl_NewStringObj(bytes, len) \
  558.      Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__)
  559. #endif /* TCL_MEM_DEBUG */
  560.  
  561. /*
  562.  * The following definitions support Tcl's namespace facility.
  563.  * Note: the first five fields must match exactly the fields in a
  564.  * Namespace structure (see tcl.h). 
  565.  */
  566.  
  567. typedef struct Tcl_Namespace {
  568.     char *name;                 /* The namespace's name within its parent
  569.                  * namespace. This contains no ::'s. The
  570.                  * name of the global namespace is ""
  571.                  * although "::" is an synonym. */
  572.     char *fullName;             /* The namespace's fully qualified name.
  573.                  * This starts with ::. */
  574.     ClientData clientData;      /* Arbitrary value associated with this
  575.                  * namespace. */
  576.     Tcl_NamespaceDeleteProc* deleteProc;
  577.                                 /* Procedure invoked when deleting the
  578.                  * namespace to, e.g., free clientData. */
  579.     struct Tcl_Namespace* parentPtr;
  580.                                 /* Points to the namespace that contains
  581.                  * this one. NULL if this is the global
  582.                  * namespace. */
  583. } Tcl_Namespace;
  584.  
  585. /*
  586.  * The following structure represents a call frame, or activation record.
  587.  * A call frame defines a naming context for a procedure call: its local
  588.  * scope (for local variables) and its namespace scope (used for non-local
  589.  * variables; often the global :: namespace). A call frame can also define
  590.  * the naming context for a namespace eval or namespace inscope command:
  591.  * the namespace in which the command's code should execute. The
  592.  * Tcl_CallFrame structures exist only while procedures or namespace
  593.  * eval/inscope's are being executed, and provide a Tcl call stack.
  594.  * 
  595.  * A call frame is initialized and pushed using Tcl_PushCallFrame and
  596.  * popped using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be
  597.  * provided by the Tcl_PushCallFrame caller, and callers typically allocate
  598.  * them on the C call stack for efficiency. For this reason, Tcl_CallFrame
  599.  * is defined as a structure and not as an opaque token. However, most
  600.  * Tcl_CallFrame fields are hidden since applications should not access
  601.  * them directly; others are declared as "dummyX".
  602.  *
  603.  * WARNING!! The structure definition must be kept consistent with the
  604.  * CallFrame structure in tclInt.h. If you change one, change the other.
  605.  */
  606.  
  607. typedef struct Tcl_CallFrame {
  608.     Tcl_Namespace *nsPtr;
  609.     int dummy1;
  610.     int dummy2;
  611.     char *dummy3;
  612.     char *dummy4;
  613.     char *dummy5;
  614.     int dummy6;
  615.     char *dummy7;
  616.     char *dummy8;
  617.     int dummy9;
  618.     char* dummy10;
  619. } Tcl_CallFrame;
  620.  
  621. /*
  622.  * Information about commands that is returned by Tcl_GetCommandInfo and
  623.  * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based
  624.  * command procedure while proc is a traditional Tcl argc/argv
  625.  * string-based procedure. Tcl_CreateObjCommand and Tcl_CreateCommand
  626.  * ensure that both objProc and proc are non-NULL and can be called to
  627.  * execute the command. However, it may be faster to call one instead of
  628.  * the other. The member isNativeObjectProc is set to 1 if an
  629.  * object-based procedure was registered by Tcl_CreateObjCommand, and to
  630.  * 0 if a string-based procedure was registered by Tcl_CreateCommand.
  631.  * The other procedure is typically set to a compatibility wrapper that
  632.  * does string-to-object or object-to-string argument conversions then
  633.  * calls the other procedure.
  634.  */
  635.      
  636. typedef struct Tcl_CmdInfo {
  637.     int isNativeObjectProc;     /* 1 if objProc was registered by a call to
  638.                   * Tcl_CreateObjCommand; 0 otherwise.
  639.                   * Tcl_SetCmdInfo does not modify this
  640.                   * field. */
  641.     Tcl_ObjCmdProc *objProc;     /* Command's object-based procedure. */
  642.     ClientData objClientData;     /* ClientData for object proc. */
  643.     Tcl_CmdProc *proc;         /* Command's string-based procedure. */
  644.     ClientData clientData;     /* ClientData for string proc. */
  645.     Tcl_CmdDeleteProc *deleteProc;
  646.                                  /* Procedure to call when command is
  647.                                   * deleted. */
  648.     ClientData deleteData;     /* Value to pass to deleteProc (usually
  649.                   * the same as clientData). */
  650.     Tcl_Namespace *namespacePtr; /* Points to the namespace that contains
  651.                   * this command. Note that Tcl_SetCmdInfo
  652.                   * will not change a command's namespace;
  653.                   * use Tcl_RenameCommand to do that. */
  654.  
  655. } Tcl_CmdInfo;
  656.  
  657. /*
  658.  * The structure defined below is used to hold dynamic strings.  The only
  659.  * field that clients should use is the string field, and they should
  660.  * never modify it.
  661.  */
  662.  
  663. #define TCL_DSTRING_STATIC_SIZE 200
  664. typedef struct Tcl_DString {
  665.     char *string;        /* Points to beginning of string:  either
  666.                  * staticSpace below or a malloced array. */
  667.     int length;            /* Number of non-NULL characters in the
  668.                  * string. */
  669.     int spaceAvl;        /* Total number of bytes available for the
  670.                  * string and its terminating NULL char. */
  671.     char staticSpace[TCL_DSTRING_STATIC_SIZE];
  672.                 /* Space to use in common case where string
  673.                  * is small. */
  674. } Tcl_DString;
  675.  
  676. #define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
  677. #define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
  678. #define Tcl_DStringTrunc Tcl_DStringSetLength
  679.  
  680. /*
  681.  * Definitions for the maximum number of digits of precision that may
  682.  * be specified in the "tcl_precision" variable, and the number of
  683.  * characters of buffer space required by Tcl_PrintDouble.
  684.  */
  685.  
  686. #define TCL_MAX_PREC 17
  687. #define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
  688.  
  689. /*
  690.  * Flag that may be passed to Tcl_ConvertElement to force it not to
  691.  * output braces (careful!  if you change this flag be sure to change
  692.  * the definitions at the front of tclUtil.c).
  693.  */
  694.  
  695. #define TCL_DONT_USE_BRACES    1
  696.  
  697. /*
  698.  * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
  699.  * abbreviated strings.
  700.  */
  701.  
  702. #define TCL_EXACT    1
  703.  
  704. /*
  705.  * Flag values passed to Tcl_RecordAndEval.
  706.  * WARNING: these bit choices must not conflict with the bit choices
  707.  * for evalFlag bits in tclInt.h!!
  708.  */
  709.  
  710. #define TCL_NO_EVAL        0x10000
  711. #define TCL_EVAL_GLOBAL        0x20000
  712.  
  713. /*
  714.  * Special freeProc values that may be passed to Tcl_SetResult (see
  715.  * the man page for details):
  716.  */
  717.  
  718. #define TCL_VOLATILE    ((Tcl_FreeProc *) 1)
  719. #define TCL_STATIC    ((Tcl_FreeProc *) 0)
  720. #define TCL_DYNAMIC    ((Tcl_FreeProc *) 3)
  721.  
  722. /*
  723.  * Flag values passed to variable-related procedures.
  724.  */
  725.  
  726. #define TCL_GLOBAL_ONLY         1
  727. #define TCL_NAMESPACE_ONLY     2
  728. #define TCL_APPEND_VALUE     4
  729. #define TCL_LIST_ELEMENT     8
  730. #define TCL_TRACE_READS         0x10
  731. #define TCL_TRACE_WRITES     0x20
  732. #define TCL_TRACE_UNSETS     0x40
  733. #define TCL_TRACE_DESTROYED     0x80
  734. #define TCL_INTERP_DESTROYED     0x100
  735. #define TCL_LEAVE_ERR_MSG     0x200
  736. #define TCL_PARSE_PART1         0x400
  737.  
  738. /*
  739.  * Types for linked variables:
  740.  */
  741.  
  742. #define TCL_LINK_INT        1
  743. #define TCL_LINK_DOUBLE        2
  744. #define TCL_LINK_BOOLEAN    3
  745. #define TCL_LINK_STRING        4
  746. #define TCL_LINK_READ_ONLY    0x80
  747.  
  748. /*
  749.  * The following declarations either map ckalloc and ckfree to
  750.  * malloc and free, or they map them to procedures with all sorts
  751.  * of debugging hooks defined in tclCkalloc.c.
  752.  */
  753.  
  754. EXTERN char *        Tcl_Alloc _ANSI_ARGS_((unsigned int size));
  755. EXTERN void        Tcl_Free _ANSI_ARGS_((char *ptr));
  756. EXTERN char *        Tcl_Realloc _ANSI_ARGS_((char *ptr,
  757.                 unsigned int size));
  758.  
  759. #ifdef TCL_MEM_DEBUG
  760.  
  761. #  define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  762. #  define Tcl_Free(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  763. #  define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  764. #  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  765. #  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  766. #  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  767.  
  768. EXTERN int        Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
  769. EXTERN void        Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
  770.                 int line));
  771.  
  772. #else
  773.  
  774. /*
  775.  * If USE_TCLALLOC is true, then we need to call Tcl_Alloc instead of
  776.  * the native malloc/free.  The only time USE_TCLALLOC should not be
  777.  * true is when compiling the Tcl/Tk libraries on Unix systems.  In this
  778.  * case we can safely call the native malloc/free directly as a performance
  779.  * optimization.
  780.  */
  781.  
  782. #  if USE_TCLALLOC
  783. #     define ckalloc(x) Tcl_Alloc(x)
  784. #     define ckfree(x) Tcl_Free(x)
  785. #     define ckrealloc(x,y) Tcl_Realloc(x,y)
  786. #  else
  787. #     define ckalloc(x) malloc(x)
  788. #     define ckfree(x)  free(x)
  789. #     define ckrealloc(x,y) realloc(x,y)
  790. #  endif
  791. #  define Tcl_DumpActiveMemory(x)
  792. #  define Tcl_ValidateAllMemory(x,y)
  793.  
  794. #endif /* TCL_MEM_DEBUG */
  795.  
  796. /*
  797.  * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers
  798.  * to prevent errors when the forward reference to Tcl_HashTable is
  799.  * encountered in the Tcl_HashEntry structure.
  800.  */
  801.  
  802. #ifdef __cplusplus
  803. struct Tcl_HashTable;
  804. #endif
  805.  
  806. /*
  807.  * Structure definition for an entry in a hash table.  No-one outside
  808.  * Tcl should access any of these fields directly;  use the macros
  809.  * defined below.
  810.  */
  811.  
  812. typedef struct Tcl_HashEntry {
  813.     struct Tcl_HashEntry *nextPtr;    /* Pointer to next entry in this
  814.                      * hash bucket, or NULL for end of
  815.                      * chain. */
  816.     struct Tcl_HashTable *tablePtr;    /* Pointer to table containing entry. */
  817.     struct Tcl_HashEntry **bucketPtr;    /* Pointer to bucket that points to
  818.                      * first entry in this entry's chain:
  819.                      * used for deleting the entry. */
  820.     ClientData clientData;        /* Application stores something here
  821.                      * with Tcl_SetHashValue. */
  822.     union {                /* Key has one of these forms: */
  823.     char *oneWordValue;        /* One-word value for key. */
  824.     int words[1];            /* Multiple integer words for key.
  825.                      * The actual size will be as large
  826.                      * as necessary for this table's
  827.                      * keys. */
  828.     char string[4];            /* String for key.  The actual size
  829.                      * will be as large as needed to hold
  830.                      * the key. */
  831.     } key;                /* MUST BE LAST FIELD IN RECORD!! */
  832. } Tcl_HashEntry;
  833.  
  834. /*
  835.  * Structure definition for a hash table.  Must be in tcl.h so clients
  836.  * can allocate space for these structures, but clients should never
  837.  * access any fields in this structure.
  838.  */
  839.  
  840. #define TCL_SMALL_HASH_TABLE 4
  841. typedef struct Tcl_HashTable {
  842.     Tcl_HashEntry **buckets;        /* Pointer to bucket array.  Each
  843.                      * element points to first entry in
  844.                      * bucket's hash chain, or NULL. */
  845.     Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
  846.                     /* Bucket array used for small tables
  847.                      * (to avoid mallocs and frees). */
  848.     int numBuckets;            /* Total number of buckets allocated
  849.                      * at **bucketPtr. */
  850.     int numEntries;            /* Total number of entries present
  851.                      * in table. */
  852.     int rebuildSize;            /* Enlarge table when numEntries gets
  853.                      * to be this large. */
  854.     int downShift;            /* Shift count used in hashing
  855.                      * function.  Designed to use high-
  856.                      * order bits of randomized keys. */
  857.     int mask;                /* Mask value used in hashing
  858.                      * function. */
  859.     int keyType;            /* Type of keys used in this table. 
  860.                      * It's either TCL_STRING_KEYS,
  861.                      * TCL_ONE_WORD_KEYS, or an integer
  862.                      * giving the number of ints that
  863.                                          * is the size of the key.
  864.                      */
  865.     Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  866.         CONST char *key));
  867.     Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  868.         CONST char *key, int *newPtr));
  869. } Tcl_HashTable;
  870.  
  871. /*
  872.  * Structure definition for information used to keep track of searches
  873.  * through hash tables:
  874.  */
  875.  
  876. typedef struct Tcl_HashSearch {
  877.     Tcl_HashTable *tablePtr;        /* Table being searched. */
  878.     int nextIndex;            /* Index of next bucket to be
  879.                      * enumerated after present one. */
  880.     Tcl_HashEntry *nextEntryPtr;    /* Next entry to be enumerated in the
  881.                      * the current bucket. */
  882. } Tcl_HashSearch;
  883.  
  884. /*
  885.  * Acceptable key types for hash tables:
  886.  */
  887.  
  888. #define TCL_STRING_KEYS        0
  889. #define TCL_ONE_WORD_KEYS    1
  890.  
  891. /*
  892.  * Macros for clients to use to access fields of hash entries:
  893.  */
  894.  
  895. #define Tcl_GetHashValue(h) ((h)->clientData)
  896. #define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
  897. #define Tcl_GetHashKey(tablePtr, h) \
  898.     ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
  899.                         : (h)->key.string))
  900.  
  901. /*
  902.  * Macros to use for clients to use to invoke find and create procedures
  903.  * for hash tables:
  904.  */
  905.  
  906. #define Tcl_FindHashEntry(tablePtr, key) \
  907.     (*((tablePtr)->findProc))(tablePtr, key)
  908. #define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
  909.     (*((tablePtr)->createProc))(tablePtr, key, newPtr)
  910.  
  911. /*
  912.  * Flag values to pass to Tcl_DoOneEvent to disable searches
  913.  * for some kinds of events:
  914.  */
  915.  
  916. #define TCL_DONT_WAIT        (1<<1)
  917. #define TCL_WINDOW_EVENTS    (1<<2)
  918. #define TCL_FILE_EVENTS        (1<<3)
  919. #define TCL_TIMER_EVENTS    (1<<4)
  920. #define TCL_IDLE_EVENTS        (1<<5)    /* WAS 0x10 ???? */
  921. #define TCL_ALL_EVENTS        (~TCL_DONT_WAIT)
  922.  
  923. /*
  924.  * The following structure defines a generic event for the Tcl event
  925.  * system.  These are the things that are queued in calls to Tcl_QueueEvent
  926.  * and serviced later by Tcl_DoOneEvent.  There can be many different
  927.  * kinds of events with different fields, corresponding to window events,
  928.  * timer events, etc.  The structure for a particular event consists of
  929.  * a Tcl_Event header followed by additional information specific to that
  930.  * event.
  931.  */
  932.  
  933. struct Tcl_Event {
  934.     Tcl_EventProc *proc;    /* Procedure to call to service this event. */
  935.     struct Tcl_Event *nextPtr;    /* Next in list of pending events, or NULL. */
  936. };
  937.  
  938. /*
  939.  * Positions to pass to Tcl_QueueEvent:
  940.  */
  941.  
  942. typedef enum {
  943.     TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
  944. } Tcl_QueuePosition;
  945.  
  946. /*
  947.  * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
  948.  * event routines.
  949.  */
  950.  
  951. #define TCL_SERVICE_NONE 0
  952. #define TCL_SERVICE_ALL 1
  953.  
  954. /*
  955.  * The following structure keeps is used to hold a time value, either as
  956.  * an absolute time (the number of seconds from the epoch) or as an
  957.  * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
  958.  * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT.
  959.  */
  960.  
  961. typedef struct Tcl_Time {
  962.     long sec;            /* Seconds. */
  963.     long usec;            /* Microseconds. */
  964. } Tcl_Time;
  965.  
  966. /*
  967.  * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler
  968.  * to indicate what sorts of events are of interest:
  969.  */
  970.  
  971. #define TCL_READABLE    (1<<1)
  972. #define TCL_WRITABLE    (1<<2)
  973. #define TCL_EXCEPTION    (1<<3)
  974.  
  975. /*
  976.  * Flag values to pass to Tcl_OpenCommandChannel to indicate the
  977.  * disposition of the stdio handles.  TCL_STDIN, TCL_STDOUT, TCL_STDERR,
  978.  * are also used in Tcl_GetStdChannel.
  979.  */
  980.  
  981. #define TCL_STDIN        (1<<1)    
  982. #define TCL_STDOUT        (1<<2)
  983. #define TCL_STDERR        (1<<3)
  984. #define TCL_ENFORCE_MODE    (1<<4)
  985.  
  986. /*
  987.  * Typedefs for the various operations in a channel type:
  988.  */
  989.  
  990. typedef int    (Tcl_DriverBlockModeProc) _ANSI_ARGS_((
  991.             ClientData instanceData, int mode));
  992. typedef int    (Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,
  993.             Tcl_Interp *interp));
  994. typedef int    (Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,
  995.             char *buf, int toRead, int *errorCodePtr));
  996. typedef int    (Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
  997.             char *buf, int toWrite, int *errorCodePtr));
  998. typedef int    (Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
  999.             long offset, int mode, int *errorCodePtr));
  1000. typedef int    (Tcl_DriverSetOptionProc) _ANSI_ARGS_((
  1001.             ClientData instanceData, Tcl_Interp *interp,
  1002.                 char *optionName, char *value));
  1003. typedef int    (Tcl_DriverGetOptionProc) _ANSI_ARGS_((
  1004.             ClientData instanceData, Tcl_Interp *interp,
  1005.             char *optionName, Tcl_DString *dsPtr));
  1006. typedef void    (Tcl_DriverWatchProc) _ANSI_ARGS_((
  1007.             ClientData instanceData, int mask));
  1008. typedef int    (Tcl_DriverGetHandleProc) _ANSI_ARGS_((
  1009.             ClientData instanceData, int direction,
  1010.             ClientData *handlePtr));
  1011.  
  1012. /*
  1013.  * Enum for different end of line translation and recognition modes.
  1014.  */
  1015.  
  1016. typedef enum Tcl_EolTranslation {
  1017.     TCL_TRANSLATE_AUTO,            /* Eol == \r, \n and \r\n. */
  1018.     TCL_TRANSLATE_CR,            /* Eol == \r. */
  1019.     TCL_TRANSLATE_LF,            /* Eol == \n. */
  1020.     TCL_TRANSLATE_CRLF            /* Eol == \r\n. */
  1021. } Tcl_EolTranslation;
  1022.  
  1023. /*
  1024.  * struct Tcl_ChannelType:
  1025.  *
  1026.  * One such structure exists for each type (kind) of channel.
  1027.  * It collects together in one place all the functions that are
  1028.  * part of the specific channel type.
  1029.  */
  1030.  
  1031. typedef struct Tcl_ChannelType {
  1032.     char *typeName;            /* The name of the channel type in Tcl
  1033.                                          * commands. This storage is owned by
  1034.                                          * channel type. */
  1035.     Tcl_DriverBlockModeProc *blockModeProc;
  1036.                         /* Set blocking mode for the
  1037.                                          * raw channel. May be NULL. */
  1038.     Tcl_DriverCloseProc *closeProc;    /* Procedure to call to close
  1039.                                          * the channel. */
  1040.     Tcl_DriverInputProc *inputProc;    /* Procedure to call for input
  1041.                                          * on channel. */
  1042.     Tcl_DriverOutputProc *outputProc;    /* Procedure to call for output
  1043.                                          * on channel. */
  1044.     Tcl_DriverSeekProc *seekProc;    /* Procedure to call to seek
  1045.                                          * on the channel. May be NULL. */
  1046.     Tcl_DriverSetOptionProc *setOptionProc;
  1047.                         /* Set an option on a channel. */
  1048.     Tcl_DriverGetOptionProc *getOptionProc;
  1049.                         /* Get an option from a channel. */
  1050.     Tcl_DriverWatchProc *watchProc;    /* Set up the notifier to watch
  1051.                                          * for events on this channel. */
  1052.     Tcl_DriverGetHandleProc *getHandleProc;
  1053.                     /* Get an OS handle from the channel
  1054.                                          * or NULL if not supported. */
  1055.     VOID *reserved;            /* reserved for future expansion */
  1056. } Tcl_ChannelType;
  1057.  
  1058. /*
  1059.  * The following flags determine whether the blockModeProc above should
  1060.  * set the channel into blocking or nonblocking mode. They are passed
  1061.  * as arguments to the blockModeProc procedure in the above structure.
  1062.  */
  1063.  
  1064. #define TCL_MODE_BLOCKING 0        /* Put channel into blocking mode. */
  1065. #define TCL_MODE_NONBLOCKING 1        /* Put channel into nonblocking
  1066.                      * mode. */
  1067.  
  1068. /*
  1069.  * Enum for different types of file paths.
  1070.  */
  1071.  
  1072. typedef enum Tcl_PathType {
  1073.     TCL_PATH_ABSOLUTE,
  1074.     TCL_PATH_RELATIVE,
  1075.     TCL_PATH_VOLUME_RELATIVE
  1076. } Tcl_PathType;
  1077.  
  1078. /*
  1079.  * Exported Tcl procedures:
  1080.  */
  1081.  
  1082. EXTERN void        Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1083.                 char *message));
  1084. EXTERN void        Tcl_AddObjErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1085.                 char *message, int length));
  1086. EXTERN void        Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
  1087. EXTERN int        Tcl_AppendAllObjTypes _ANSI_ARGS_((
  1088.                 Tcl_Interp *interp, Tcl_Obj *objPtr));
  1089. EXTERN void        Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
  1090.                 char *string));
  1091. EXTERN void        Tcl_AppendResult _ANSI_ARGS_(
  1092.                 TCL_VARARGS(Tcl_Interp *,interp));
  1093. EXTERN void        Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj *objPtr,
  1094.                 char *bytes, int length));
  1095. EXTERN void        Tcl_AppendStringsToObj _ANSI_ARGS_(
  1096.                 TCL_VARARGS(Tcl_Obj *,interp));
  1097. EXTERN Tcl_AsyncHandler    Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
  1098.                 ClientData clientData));
  1099. EXTERN void        Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
  1100. EXTERN int        Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
  1101.                 int code));
  1102. EXTERN void        Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
  1103. EXTERN int        Tcl_AsyncReady _ANSI_ARGS_((void));
  1104. EXTERN void        Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp *interp));
  1105. EXTERN char        Tcl_Backslash _ANSI_ARGS_((CONST char *src,
  1106.                 int *readPtr));
  1107. EXTERN int        Tcl_BadChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
  1108.                 char *optionName, char *optionList));
  1109. EXTERN void        Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
  1110.                 Tcl_InterpDeleteProc *proc,
  1111.                 ClientData clientData));
  1112. EXTERN void        Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
  1113.                 ClientData clientData));
  1114. #define Tcl_Ckalloc Tcl_Alloc
  1115. #define Tcl_Ckfree Tcl_Free
  1116. #define Tcl_Ckrealloc Tcl_Realloc
  1117. EXTERN int        Tcl_Close _ANSI_ARGS_((Tcl_Interp *interp,
  1118.                     Tcl_Channel chan));
  1119. EXTERN int        Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
  1120. EXTERN char *        Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
  1121. EXTERN Tcl_Obj *    Tcl_ConcatObj _ANSI_ARGS_((int objc,
  1122.                 Tcl_Obj *CONST objv[]));
  1123. EXTERN int        Tcl_ConvertCountedElement _ANSI_ARGS_((CONST char *src,
  1124.                 int length, char *dst, int flags));
  1125. EXTERN int        Tcl_ConvertElement _ANSI_ARGS_((CONST char *src,
  1126.                 char *dst, int flags));
  1127. EXTERN int        Tcl_ConvertToType _ANSI_ARGS_((Tcl_Interp *interp,
  1128.                 Tcl_Obj *objPtr, Tcl_ObjType *typePtr));
  1129. EXTERN int        Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp *slave,
  1130.                 char *slaveCmd, Tcl_Interp *target,
  1131.                     char *targetCmd, int argc, char **argv));
  1132. EXTERN int        Tcl_CreateAliasObj _ANSI_ARGS_((Tcl_Interp *slave,
  1133.                 char *slaveCmd, Tcl_Interp *target,
  1134.                     char *targetCmd, int objc,
  1135.                     Tcl_Obj *CONST objv[]));
  1136. EXTERN Tcl_Channel    Tcl_CreateChannel _ANSI_ARGS_((
  1137.                     Tcl_ChannelType *typePtr, char *chanName,
  1138.                             ClientData instanceData, int mask));
  1139. EXTERN void        Tcl_CreateChannelHandler _ANSI_ARGS_((
  1140.                 Tcl_Channel chan, int mask,
  1141.                             Tcl_ChannelProc *proc, ClientData clientData));
  1142. EXTERN void        Tcl_CreateCloseHandler _ANSI_ARGS_((
  1143.                 Tcl_Channel chan, Tcl_CloseProc *proc,
  1144.                             ClientData clientData));
  1145. EXTERN Tcl_Command    Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1146.                 char *cmdName, Tcl_CmdProc *proc,
  1147.                 ClientData clientData,
  1148.                 Tcl_CmdDeleteProc *deleteProc));
  1149. EXTERN void        Tcl_CreateEventSource _ANSI_ARGS_((
  1150.                 Tcl_EventSetupProc *setupProc,
  1151.                 Tcl_EventCheckProc *checkProc,
  1152.                 ClientData clientData));
  1153. EXTERN void        Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
  1154.                 ClientData clientData));
  1155. EXTERN void        Tcl_CreateFileHandler _ANSI_ARGS_((
  1156.                     int fd, int mask, Tcl_FileProc *proc,
  1157.                 ClientData clientData));
  1158. EXTERN Tcl_Interp *    Tcl_CreateInterp _ANSI_ARGS_((void));
  1159. EXTERN void        Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
  1160.                 char *name, int numArgs, Tcl_ValueType *argTypes,
  1161.                 Tcl_MathProc *proc, ClientData clientData));
  1162. EXTERN Tcl_Command    Tcl_CreateObjCommand _ANSI_ARGS_((
  1163.                 Tcl_Interp *interp, char *cmdName,
  1164.                 Tcl_ObjCmdProc *proc, ClientData clientData,
  1165.                 Tcl_CmdDeleteProc *deleteProc));
  1166. EXTERN Tcl_Interp *    Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp *interp,
  1167.                     char *slaveName, int isSafe));
  1168. EXTERN Tcl_TimerToken    Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
  1169.                 Tcl_TimerProc *proc, ClientData clientData));
  1170. EXTERN Tcl_Trace    Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
  1171.                 int level, Tcl_CmdTraceProc *proc,
  1172.                 ClientData clientData));
  1173. EXTERN char *        Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
  1174.                 char *file, int line));
  1175. EXTERN int        Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
  1176.                 char *file, int line));
  1177. EXTERN char *        Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
  1178.                 unsigned int size, char *file, int line));
  1179. EXTERN void        Tcl_DbDecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
  1180.                 char *file, int line));
  1181. EXTERN void        Tcl_DbIncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
  1182.                 char *file, int line));
  1183. EXTERN int        Tcl_DbIsShared _ANSI_ARGS_((Tcl_Obj *objPtr,
  1184.                 char *file, int line));
  1185. EXTERN Tcl_Obj *    Tcl_DbNewBooleanObj _ANSI_ARGS_((int boolValue,
  1186.                             char *file, int line));
  1187. EXTERN Tcl_Obj *    Tcl_DbNewDoubleObj _ANSI_ARGS_((double doubleValue,
  1188.                             char *file, int line));
  1189. EXTERN Tcl_Obj *    Tcl_DbNewListObj _ANSI_ARGS_((int objc,
  1190.                 Tcl_Obj *CONST objv[], char *file, int line));
  1191. EXTERN Tcl_Obj *    Tcl_DbNewLongObj _ANSI_ARGS_((long longValue,
  1192.                             char *file, int line));
  1193. EXTERN Tcl_Obj *    Tcl_DbNewObj _ANSI_ARGS_((char *file, int line));
  1194. EXTERN Tcl_Obj *    Tcl_DbNewStringObj _ANSI_ARGS_((char *bytes,
  1195.                 int length, char *file, int line));
  1196. EXTERN void        Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  1197.                             char *name));
  1198. EXTERN int        Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1199.                 char *cmdName));
  1200. EXTERN int        Tcl_DeleteCommandFromToken _ANSI_ARGS_((
  1201.                 Tcl_Interp *interp, Tcl_Command command));
  1202. EXTERN void        Tcl_DeleteChannelHandler _ANSI_ARGS_((
  1203.                     Tcl_Channel chan, Tcl_ChannelProc *proc,
  1204.                             ClientData clientData));
  1205. EXTERN void        Tcl_DeleteCloseHandler _ANSI_ARGS_((
  1206.                 Tcl_Channel chan, Tcl_CloseProc *proc,
  1207.                             ClientData clientData));
  1208. EXTERN void        Tcl_DeleteEvents _ANSI_ARGS_((
  1209.                 Tcl_EventDeleteProc *proc,
  1210.                             ClientData clientData));
  1211. EXTERN void        Tcl_DeleteEventSource _ANSI_ARGS_((
  1212.                 Tcl_EventSetupProc *setupProc,
  1213.                 Tcl_EventCheckProc *checkProc,
  1214.                 ClientData clientData));
  1215. EXTERN void        Tcl_DeleteExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
  1216.                 ClientData clientData));
  1217. EXTERN void        Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
  1218. EXTERN void        Tcl_DeleteHashEntry _ANSI_ARGS_((
  1219.                 Tcl_HashEntry *entryPtr));
  1220. EXTERN void        Tcl_DeleteHashTable _ANSI_ARGS_((
  1221.                 Tcl_HashTable *tablePtr));
  1222. EXTERN void        Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
  1223. EXTERN void        Tcl_DeleteTimerHandler _ANSI_ARGS_((
  1224.                 Tcl_TimerToken token));
  1225. EXTERN void        Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
  1226.                 Tcl_Trace trace));
  1227. EXTERN void        Tcl_DetachPids _ANSI_ARGS_((int numPids, Tcl_Pid *pidPtr));
  1228. EXTERN void        Tcl_DontCallWhenDeleted _ANSI_ARGS_((
  1229.                 Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
  1230.                 ClientData clientData));
  1231. EXTERN int        Tcl_DoOneEvent _ANSI_ARGS_((int flags));
  1232. EXTERN void        Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
  1233.                 ClientData clientData));
  1234. EXTERN char *        Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
  1235.                 CONST char *string, int length));
  1236. EXTERN char *        Tcl_DStringAppendElement _ANSI_ARGS_((
  1237.                 Tcl_DString *dsPtr, CONST char *string));
  1238. EXTERN void        Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
  1239. EXTERN void        Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
  1240. EXTERN void        Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
  1241.                 Tcl_DString *dsPtr));
  1242. EXTERN void        Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
  1243. EXTERN void        Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
  1244.                 Tcl_DString *dsPtr));
  1245. EXTERN void        Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
  1246.                 int length));
  1247. EXTERN void        Tcl_DStringStartSublist _ANSI_ARGS_((
  1248.                 Tcl_DString *dsPtr));
  1249. EXTERN Tcl_Obj *    Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr));
  1250. EXTERN int        Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
  1251. EXTERN char *        Tcl_ErrnoId _ANSI_ARGS_((void));
  1252. EXTERN char *        Tcl_ErrnoMsg _ANSI_ARGS_((int err));
  1253. EXTERN int        Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
  1254.                 char *string));
  1255. EXTERN int        Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
  1256.                 char *fileName));
  1257. EXTERN void        Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
  1258.                 Tcl_FreeProc *freeProc));
  1259. EXTERN int        Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp *interp,
  1260.                 Tcl_Obj *objPtr));
  1261. EXTERN void        Tcl_Exit _ANSI_ARGS_((int status));
  1262. EXTERN int        Tcl_ExposeCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1263.                     char *hiddenCmdToken, char *cmdName));
  1264. EXTERN int        Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  1265.                 char *string, int *ptr));
  1266. EXTERN int        Tcl_ExprBooleanObj _ANSI_ARGS_((Tcl_Interp *interp,
  1267.                 Tcl_Obj *objPtr, int *ptr));
  1268. EXTERN int        Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
  1269.                 char *string, double *ptr));
  1270. EXTERN int        Tcl_ExprDoubleObj _ANSI_ARGS_((Tcl_Interp *interp,
  1271.                 Tcl_Obj *objPtr, double *ptr));
  1272. EXTERN int        Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
  1273.                 char *string, long *ptr));
  1274. EXTERN int        Tcl_ExprLongObj _ANSI_ARGS_((Tcl_Interp *interp,
  1275.                 Tcl_Obj *objPtr, long *ptr));
  1276. EXTERN int        Tcl_ExprObj _ANSI_ARGS_((Tcl_Interp *interp,
  1277.                 Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr));
  1278. EXTERN int        Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
  1279.                 char *string));
  1280. EXTERN void        Tcl_Finalize _ANSI_ARGS_((void));
  1281. EXTERN void        Tcl_FindExecutable _ANSI_ARGS_((char *argv0));
  1282. EXTERN Tcl_HashEntry *    Tcl_FirstHashEntry _ANSI_ARGS_((
  1283.                 Tcl_HashTable *tablePtr,
  1284.                 Tcl_HashSearch *searchPtr));
  1285. EXTERN int        Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
  1286. EXTERN void        TclFreeObj _ANSI_ARGS_((Tcl_Obj *objPtr));
  1287. EXTERN void        Tcl_FreeResult _ANSI_ARGS_((Tcl_Interp *interp));
  1288. EXTERN int        Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp *interp,
  1289.                        char *slaveCmd, Tcl_Interp **targetInterpPtr,
  1290.                             char **targetCmdPtr, int *argcPtr,
  1291.                 char ***argvPtr));
  1292. EXTERN int        Tcl_GetAliasObj _ANSI_ARGS_((Tcl_Interp *interp,
  1293.                        char *slaveCmd, Tcl_Interp **targetInterpPtr,
  1294.                             char **targetCmdPtr, int *objcPtr,
  1295.                 Tcl_Obj ***objv));
  1296. EXTERN ClientData    Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  1297.                             char *name, Tcl_InterpDeleteProc **procPtr));
  1298. EXTERN int        Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  1299.                 char *string, int *boolPtr));
  1300. EXTERN int        Tcl_GetBooleanFromObj _ANSI_ARGS_((
  1301.                 Tcl_Interp *interp, Tcl_Obj *objPtr,
  1302.                 int *boolPtr));
  1303. EXTERN Tcl_Channel    Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1304.                     char *chanName, int *modePtr));
  1305. EXTERN int        Tcl_GetChannelBufferSize _ANSI_ARGS_((
  1306.                     Tcl_Channel chan));
  1307. EXTERN int        Tcl_GetChannelHandle _ANSI_ARGS_((Tcl_Channel chan,
  1308.                     int direction, ClientData *handlePtr));
  1309. EXTERN ClientData    Tcl_GetChannelInstanceData _ANSI_ARGS_((
  1310.                     Tcl_Channel chan));
  1311. EXTERN int        Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
  1312. EXTERN char *        Tcl_GetChannelName _ANSI_ARGS_((Tcl_Channel chan));
  1313. EXTERN int        Tcl_GetChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
  1314.                 Tcl_Channel chan, char *optionName,
  1315.                 Tcl_DString *dsPtr));
  1316. EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
  1317. EXTERN int        Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1318.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  1319. EXTERN char *        Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
  1320.                 Tcl_Command command));
  1321. EXTERN int        Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
  1322.                 char *string, double *doublePtr));
  1323. EXTERN int        Tcl_GetDoubleFromObj _ANSI_ARGS_((
  1324.                 Tcl_Interp *interp, Tcl_Obj *objPtr,
  1325.                 double *doublePtr));
  1326. EXTERN int        Tcl_GetErrno _ANSI_ARGS_((void));
  1327. EXTERN char *        Tcl_GetHostName _ANSI_ARGS_((void));
  1328. EXTERN int        Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1329.                 Tcl_Obj *objPtr, char **tablePtr, char *msg,
  1330.                 int flags, int *indexPtr));
  1331. EXTERN int        Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
  1332.                 char *string, int *intPtr));
  1333. EXTERN int        Tcl_GetInterpPath _ANSI_ARGS_((Tcl_Interp *askInterp,
  1334.                 Tcl_Interp *slaveInterp));
  1335. EXTERN int        Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1336.                 Tcl_Obj *objPtr, int *intPtr));
  1337. EXTERN int        Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1338.                 Tcl_Obj *objPtr, long *longPtr));
  1339. EXTERN Tcl_Interp *    Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp));
  1340. EXTERN CONST char *    Tcl_GetNameOfExecutable _ANSI_ARGS_((void));
  1341. EXTERN Tcl_Obj *    Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp *interp));
  1342. EXTERN Tcl_ObjType *    Tcl_GetObjType _ANSI_ARGS_((char *typeName));
  1343. EXTERN int        Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
  1344.                 char *string, int write, int checkUsage,
  1345.                 ClientData *filePtr));
  1346. EXTERN Tcl_PathType    Tcl_GetPathType _ANSI_ARGS_((char *path));
  1347. EXTERN int        Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
  1348.                     Tcl_DString *dsPtr));
  1349. EXTERN int        Tcl_GetsObj _ANSI_ARGS_((Tcl_Channel chan,
  1350.                     Tcl_Obj *objPtr));
  1351. EXTERN int        Tcl_GetServiceMode _ANSI_ARGS_((void));
  1352. EXTERN Tcl_Interp *    Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp *interp,
  1353.                 char *slaveName));
  1354. EXTERN Tcl_Channel    Tcl_GetStdChannel _ANSI_ARGS_((int type));
  1355. EXTERN char *        Tcl_GetStringFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
  1356.                 int *lengthPtr));
  1357. EXTERN char *        Tcl_GetStringResult _ANSI_ARGS_((Tcl_Interp *interp));
  1358. EXTERN char *        Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1359.                 char *varName, int flags));
  1360. EXTERN char *        Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1361.                 char *part1, char *part2, int flags));
  1362. EXTERN int        Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
  1363.                 char *command));
  1364. EXTERN int        Tcl_GlobalEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
  1365.                 Tcl_Obj *objPtr));
  1366. EXTERN char *        Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
  1367. EXTERN int        Tcl_HideCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1368.                     char *cmdName, char *hiddenCmdToken));
  1369. EXTERN int        Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
  1370. EXTERN void        Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
  1371.                 int keyType));
  1372. EXTERN void        Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
  1373. EXTERN int        Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
  1374. EXTERN int        Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
  1375. EXTERN int        Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp *interp));
  1376. EXTERN int        Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp *interp));
  1377. EXTERN void        Tcl_InvalidateStringRep _ANSI_ARGS_((
  1378.                 Tcl_Obj *objPtr));
  1379. EXTERN char *        Tcl_JoinPath _ANSI_ARGS_((int argc, char **argv,
  1380.                 Tcl_DString *resultPtr));
  1381. EXTERN int        Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  1382.                 char *varName, char *addr, int type));
  1383. EXTERN int        Tcl_ListObjAppendList _ANSI_ARGS_((
  1384.                 Tcl_Interp *interp, Tcl_Obj *listPtr, 
  1385.                 Tcl_Obj *elemListPtr));
  1386. EXTERN int        Tcl_ListObjAppendElement _ANSI_ARGS_((
  1387.                 Tcl_Interp *interp, Tcl_Obj *listPtr,
  1388.                 Tcl_Obj *objPtr));
  1389. EXTERN int        Tcl_ListObjGetElements _ANSI_ARGS_((
  1390.                 Tcl_Interp *interp, Tcl_Obj *listPtr,
  1391.                 int *objcPtr, Tcl_Obj ***objvPtr));
  1392. EXTERN int        Tcl_ListObjIndex _ANSI_ARGS_((Tcl_Interp *interp,
  1393.                 Tcl_Obj *listPtr, int index, 
  1394.                 Tcl_Obj **objPtrPtr));
  1395. EXTERN int        Tcl_ListObjLength _ANSI_ARGS_((Tcl_Interp *interp,
  1396.                 Tcl_Obj *listPtr, int *intPtr));
  1397. EXTERN int        Tcl_ListObjReplace _ANSI_ARGS_((Tcl_Interp *interp,
  1398.                 Tcl_Obj *listPtr, int first, int count,
  1399.                 int objc, Tcl_Obj *CONST objv[]));
  1400. EXTERN void        Tcl_Main _ANSI_ARGS_((int argc, char **argv,
  1401.                 Tcl_AppInitProc *appInitProc));
  1402. EXTERN Tcl_Channel    Tcl_MakeFileChannel _ANSI_ARGS_((ClientData handle,
  1403.                 int mode));
  1404. EXTERN int        Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp *interp));
  1405. EXTERN Tcl_Channel    Tcl_MakeTcpClientChannel _ANSI_ARGS_((
  1406.                     ClientData tcpSocket));
  1407. EXTERN char *        Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
  1408. EXTERN Tcl_HashEntry *    Tcl_NextHashEntry _ANSI_ARGS_((
  1409.                 Tcl_HashSearch *searchPtr));
  1410. EXTERN void        Tcl_NotifyChannel _ANSI_ARGS_((Tcl_Channel channel,
  1411.                 int mask));
  1412. EXTERN Tcl_Obj *    Tcl_ObjGetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1413.                 Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
  1414.                 int flags));
  1415. EXTERN Tcl_Obj *    Tcl_ObjSetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1416.                 Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
  1417.                 Tcl_Obj *newValuePtr, int flags));
  1418. EXTERN Tcl_Channel    Tcl_OpenCommandChannel _ANSI_ARGS_((
  1419.                     Tcl_Interp *interp, int argc, char **argv,
  1420.                 int flags));
  1421. EXTERN Tcl_Channel    Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1422.                     char *fileName, char *modeString,
  1423.                             int permissions));
  1424. EXTERN Tcl_Channel    Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp *interp,
  1425.                 int port, char *address, char *myaddr,
  1426.                     int myport, int async));
  1427. EXTERN Tcl_Channel    Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp *interp,
  1428.                     int port, char *host,
  1429.                     Tcl_TcpAcceptProc *acceptProc,
  1430.                 ClientData callbackData));
  1431. EXTERN char *        Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
  1432.                 char *string, char **termPtr));
  1433. EXTERN int        Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp *interp,
  1434.                 char *name, char *version));
  1435. EXTERN char *        Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp *interp,
  1436.                 char *name, char *version, int exact));
  1437. EXTERN char *        Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
  1438. EXTERN void        Tcl_Preserve _ANSI_ARGS_((ClientData data));
  1439. EXTERN void        Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
  1440.                 double value, char *dst));
  1441. EXTERN int        Tcl_PutEnv _ANSI_ARGS_((CONST char *string));
  1442. EXTERN void        Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
  1443.                 Tcl_QueuePosition position));
  1444. EXTERN int        Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
  1445.                     char *bufPtr, int toRead));
  1446. EXTERN void        Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
  1447. EXTERN int        Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
  1448.                 char *cmd, int flags));
  1449. EXTERN int        Tcl_RecordAndEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
  1450.                 Tcl_Obj *cmdPtr, int flags));
  1451. EXTERN Tcl_RegExp    Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
  1452.                 char *string));
  1453. EXTERN int        Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
  1454.                 Tcl_RegExp regexp, char *string, char *start));
  1455. EXTERN int        Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
  1456.                 char *string, char *pattern));
  1457. EXTERN void        Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
  1458.                 int index, char **startPtr, char **endPtr));
  1459. EXTERN void        Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1460.                     Tcl_Channel chan));
  1461. EXTERN void        Tcl_RegisterObjType _ANSI_ARGS_((
  1462.                 Tcl_ObjType *typePtr));
  1463. EXTERN void        Tcl_Release _ANSI_ARGS_((ClientData clientData));
  1464. EXTERN void        Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
  1465. #define Tcl_Return Tcl_SetResult
  1466. EXTERN int        Tcl_ScanCountedElement _ANSI_ARGS_((CONST char *string,
  1467.                 int length, int *flagPtr));
  1468. EXTERN int        Tcl_ScanElement _ANSI_ARGS_((CONST char *string,
  1469.                 int *flagPtr));
  1470. EXTERN int        Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
  1471.                     int offset, int mode));
  1472. EXTERN int        Tcl_ServiceAll _ANSI_ARGS_((void));
  1473. EXTERN int        Tcl_ServiceEvent _ANSI_ARGS_((int flags));
  1474. EXTERN void        Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  1475.                             char *name, Tcl_InterpDeleteProc *proc,
  1476.                             ClientData clientData));
  1477. EXTERN void        Tcl_SetBooleanObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1478.                 int boolValue));
  1479. EXTERN void        Tcl_SetChannelBufferSize _ANSI_ARGS_((
  1480.                 Tcl_Channel chan, int sz));
  1481. EXTERN int        Tcl_SetChannelOption _ANSI_ARGS_((
  1482.                 Tcl_Interp *interp, Tcl_Channel chan,
  1483.                     char *optionName, char *newValue));
  1484. EXTERN int        Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1485.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  1486. EXTERN void        Tcl_SetDoubleObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1487.                 double doubleValue));
  1488. EXTERN void        Tcl_SetErrno _ANSI_ARGS_((int err));
  1489. EXTERN void        Tcl_SetErrorCode _ANSI_ARGS_(
  1490.                     TCL_VARARGS(Tcl_Interp *,arg1));
  1491. EXTERN void        Tcl_SetIntObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1492.                 int intValue));
  1493. EXTERN void        Tcl_SetListObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1494.                 int objc, Tcl_Obj *CONST objv[]));
  1495. EXTERN void        Tcl_SetLongObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1496.                 long longValue));
  1497. EXTERN void        Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
  1498. EXTERN void        Tcl_SetObjErrorCode _ANSI_ARGS_((Tcl_Interp *interp,
  1499.                 Tcl_Obj *errorObjPtr));
  1500. EXTERN void        Tcl_SetObjLength _ANSI_ARGS_((Tcl_Obj *objPtr,
  1501.                 int length));
  1502. EXTERN void        Tcl_SetObjResult _ANSI_ARGS_((Tcl_Interp *interp,
  1503.                 Tcl_Obj *resultObjPtr));
  1504. EXTERN void        Tcl_SetPanicProc _ANSI_ARGS_((void (*proc)
  1505.                 _ANSI_ARGS_(TCL_VARARGS(char *, format))));
  1506. EXTERN int        Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
  1507.                 int depth));
  1508. EXTERN void        Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
  1509.                 char *string, Tcl_FreeProc *freeProc));
  1510. EXTERN int        Tcl_SetServiceMode _ANSI_ARGS_((int mode));
  1511. EXTERN void        Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
  1512.                 int type));
  1513. EXTERN void        Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1514.                 char *bytes, int length));
  1515. EXTERN void        Tcl_SetTimer _ANSI_ARGS_((Tcl_Time *timePtr));
  1516. EXTERN char *        Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1517.                 char *varName, char *newValue, int flags));
  1518. EXTERN char *        Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1519.                 char *part1, char *part2, char *newValue,
  1520.                 int flags));
  1521. EXTERN char *        Tcl_SignalId _ANSI_ARGS_((int sig));
  1522. EXTERN char *        Tcl_SignalMsg _ANSI_ARGS_((int sig));
  1523. EXTERN void        Tcl_Sleep _ANSI_ARGS_((int ms));
  1524. EXTERN void        Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
  1525. EXTERN int        Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
  1526.                 char *list, int *argcPtr, char ***argvPtr));
  1527. EXTERN void        Tcl_SplitPath _ANSI_ARGS_((char *path,
  1528.                 int *argcPtr, char ***argvPtr));
  1529. EXTERN void        Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp *interp,
  1530.                 char *pkgName, Tcl_PackageInitProc *initProc,
  1531.                 Tcl_PackageInitProc *safeInitProc));
  1532. EXTERN int        Tcl_StringMatch _ANSI_ARGS_((char *string,
  1533.                 char *pattern));
  1534. EXTERN int        Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
  1535. #define Tcl_TildeSubst Tcl_TranslateFileName
  1536. EXTERN int        Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  1537.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  1538.                 ClientData clientData));
  1539. EXTERN int        Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1540.                 char *part1, char *part2, int flags,
  1541.                 Tcl_VarTraceProc *proc, ClientData clientData));
  1542. EXTERN char *        Tcl_TranslateFileName _ANSI_ARGS_((Tcl_Interp *interp,
  1543.                 char *name, Tcl_DString *bufferPtr));
  1544. EXTERN int        Tcl_Ungets _ANSI_ARGS_((Tcl_Channel chan, char *str,
  1545.                 int len, int atHead));
  1546. EXTERN void        Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  1547.                 char *varName));
  1548. EXTERN int        Tcl_UnregisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1549.                 Tcl_Channel chan));
  1550. EXTERN int        Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1551.                 char *varName, int flags));
  1552. EXTERN int        Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1553.                 char *part1, char *part2, int flags));
  1554. EXTERN void        Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  1555.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  1556.                 ClientData clientData));
  1557. EXTERN void        Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1558.                 char *part1, char *part2, int flags,
  1559.                 Tcl_VarTraceProc *proc, ClientData clientData));
  1560. EXTERN void        Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp *interp,
  1561.                 char *varName));
  1562. EXTERN int        Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
  1563.                 char *frameName, char *varName,
  1564.                 char *localName, int flags));
  1565. EXTERN int        Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1566.                 char *frameName, char *part1, char *part2,
  1567.                 char *localName, int flags));
  1568. EXTERN int        Tcl_VarEval _ANSI_ARGS_(
  1569.                     TCL_VARARGS(Tcl_Interp *,interp));
  1570. EXTERN ClientData    Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1571.                 char *varName, int flags,
  1572.                 Tcl_VarTraceProc *procPtr,
  1573.                 ClientData prevClientData));
  1574. EXTERN ClientData    Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
  1575.                 char *part1, char *part2, int flags,
  1576.                 Tcl_VarTraceProc *procPtr,
  1577.                 ClientData prevClientData));
  1578. EXTERN int        Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time *timePtr));
  1579. EXTERN Tcl_Pid        Tcl_WaitPid _ANSI_ARGS_((Tcl_Pid pid, int *statPtr, 
  1580.                 int options));
  1581. EXTERN int        Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
  1582.                 char *s, int slen));
  1583. EXTERN void        Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp *interp,
  1584.                 int objc, Tcl_Obj *CONST objv[], char *message));
  1585.  
  1586. #undef TCL_STORAGE_CLASS
  1587. #define TCL_STORAGE_CLASS
  1588.  
  1589. /*
  1590.  * Convenience declaration of Tcl_AppInit for backwards compatibility.
  1591.  * This function is not *implemented* by the tcl library, so the storage
  1592.  * class is neither DLLEXPORT nor DLLIMPORT
  1593.  */
  1594.  
  1595. EXTERN int             Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
  1596.  
  1597. #endif /* RESOURCE_INCLUDED */
  1598.  
  1599. #undef TCL_STORAGE_CLASS
  1600. #define TCL_STORAGE_CLASS DLLIMPORT
  1601.  
  1602. #endif /* _TCL */
  1603.