Subversion Repositories Vertical

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

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