home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tk42r2x.zip / TclTk / include / tcl.h < prev    next >
C/C++ Source or Header  |  1998-01-28  |  45KB  |  1,175 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-1996 Sun Microsystems, Inc.
  9.  * Copyright (c) 1996-1998 Sun Microsystems, Inc.
  10.  *
  11.  * See the file "license.terms" for information on usage and redistribution
  12.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  13.  *
  14.  * SCCS: @(#) tcl.h 1.285 97/01/29 13:04:49
  15.  */
  16.  
  17. #ifndef _TCL
  18. #define _TCL
  19.  
  20. /*
  21.  * When version numbers change here, must also go into the following files
  22.  * and update the version numbers:
  23.  *
  24.  * library/init.tcl
  25.  * unix/configure.in
  26.  * unix/Makefile.in
  27.  * unix/pkginfo
  28.  * win/makefile.bc
  29.  * win/makefile.vc
  30.  *
  31.  * The release level should be  0 for alpha, 1 for beta, and 2 for
  32.  * final/patch.  The release serial value is the number that follows the
  33.  * "a", "b", or "p" in the patch level; for example, if the patch level
  34.  * is 7.6b2, TCL_RELEASE_SERIAL is 2.  It restarts at 1 whenever the
  35.  * release level is changed, except for the final release which is 0
  36.  * (the first patch will start at 1).
  37.  */
  38.  
  39. #define TCL_MAJOR_VERSION   7
  40. #define TCL_MINOR_VERSION   6
  41. #define TCL_RELEASE_LEVEL   2
  42. #define TCL_RELEASE_SERIAL  2
  43.  
  44. #define TCL_VERSION        "7.6"
  45. #define TCL_PATCH_LEVEL        "7.6p2"
  46.  
  47. /*
  48.  * The following definitions set up the proper options for Windows
  49.  * compilers.  We use this method because there is no autoconf equivalent.
  50.  * Ditto for OS/2.
  51.  */
  52.  
  53. #ifndef __WIN32__
  54. #   if defined(_WIN32) || defined(WIN32)
  55. #    define __WIN32__
  56. #   endif
  57. #endif
  58.  
  59. #if defined(__WIN32__) || defined(__EMX__)
  60. #   ifndef STRICT
  61. #    define STRICT
  62. #   endif
  63. #   ifndef USE_PROTOTYPE
  64. #    define USE_PROTOTYPE 1
  65. #   endif
  66. #   ifndef HAS_STDARG
  67. #    define HAS_STDARG 1
  68. #   endif
  69. #   ifndef USE_PROTOTYPE
  70. #    define USE_PROTOTYPE 1
  71. #   endif
  72. #   ifndef USE_TCLALLOC
  73. #    define USE_TCLALLOC 1
  74. #   endif
  75. #   ifndef STRINGIFY
  76. #    define STRINGIFY(x)        STRINGIFY1(x)
  77. #    define STRINGIFY1(x)        #x
  78. #   endif
  79. #endif /* __WIN32__ || __EMX__ */
  80.  
  81. /*
  82.  * The following definitions set up the proper options for Macintosh
  83.  * compilers.  We use this method because there is no autoconf equivalent.
  84.  */
  85.  
  86. #ifdef MAC_TCL
  87. #   ifndef HAS_STDARG
  88. #    define HAS_STDARG 1
  89. #   endif
  90. #   ifndef USE_TCLALLOC
  91. #    define USE_TCLALLOC 1
  92. #   endif
  93. #   ifndef NO_STRERROR
  94. #    define NO_STRERROR 1
  95. #   endif
  96. #endif
  97.  
  98. /*
  99.  * The following definitions set up the proper options for OS/2 and EMX.
  100.  * We use this method because there is no autoconf equivalent.
  101.  */
  102.  
  103. #ifdef __EMX__
  104. #   ifndef STRICT
  105. #    define STRICT
  106. #   endif
  107. #   ifndef USE_PROTOTYPE
  108. #    define USE_PROTOTYPE 1
  109. #   endif
  110. #   ifndef HAS_STDARG
  111. #    define HAS_STDARG 1
  112. #   endif
  113. #   ifndef USE_PROTOTYPE
  114. #    define USE_PROTOTYPE 1
  115. #   endif
  116. #   ifndef USE_TCLALLOC
  117. #    define USE_TCLALLOC 1
  118. #   endif
  119. #   ifndef STRINGIFY
  120. #    define STRINGIFY(x)        STRINGIFY1(x)
  121. #    define STRINGIFY1(x)        #x
  122. #   endif
  123. #endif /* __EMX__ */
  124.  
  125. /* 
  126.  * A special definition used to allow this header file to be included 
  127.  * in resource files so that they can get obtain version information from
  128.  * this file.  Resource compilers don't like all the C stuff, like typedefs
  129.  * and procedure declarations, that occur below.
  130.  */
  131.  
  132. #ifndef RESOURCE_INCLUDED
  133.  
  134. #ifndef BUFSIZ
  135. #include <stdio.h>
  136. #endif
  137.  
  138. /*
  139.  * Definitions that allow Tcl functions with variable numbers of
  140.  * arguments to be used with either varargs.h or stdarg.h.  TCL_VARARGS
  141.  * is used in procedure prototypes.  TCL_VARARGS_DEF is used to declare
  142.  * the arguments in a function definiton: it takes the type and name of
  143.  * the first argument and supplies the appropriate argument declaration
  144.  * string for use in the function definition.  TCL_VARARGS_START
  145.  * initializes the va_list data structure and returns the first argument.
  146.  */
  147.  
  148. #if defined(__STDC__) || defined(HAS_STDARG)
  149. #   define TCL_VARARGS(type, name) (type name, ...)
  150. #   define TCL_VARARGS_DEF(type, name) (type name, ...)
  151. #   define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
  152. #else
  153. #   ifdef __cplusplus
  154. #    define TCL_VARARGS(type, name) (type name, ...)
  155. #    define TCL_VARARGS_DEF(type, name) (type va_alist, ...)
  156. #   else
  157. #    define TCL_VARARGS(type, name) ()
  158. #    define TCL_VARARGS_DEF(type, name) (va_alist)
  159. #   endif
  160. #   define TCL_VARARGS_START(type, name, list) \
  161.     (va_start(list), va_arg(list, type))
  162. #endif
  163.  
  164. /*
  165.  * Definitions that allow this header file to be used either with or
  166.  * without ANSI C features like function prototypes.
  167.  */
  168.  
  169. #undef _ANSI_ARGS_
  170. #undef CONST
  171.  
  172. #if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) || defined(USE_PROTOTYPE)
  173. #   define _USING_PROTOTYPES_ 1
  174. #   define _ANSI_ARGS_(x)    x
  175. #   define CONST const
  176. #else
  177. #   define _ANSI_ARGS_(x)    ()
  178. #   define CONST
  179. #endif
  180.  
  181. #ifdef __cplusplus
  182. #   define EXTERN extern "C"
  183. #else
  184. #   define EXTERN extern
  185. #endif
  186.  
  187. /*
  188.  * Macro to use instead of "void" for arguments that must have
  189.  * type "void *" in ANSI C;  maps them to type "char *" in
  190.  * non-ANSI systems.
  191.  */
  192. #ifndef __WIN32__
  193. #ifndef VOID
  194. #   ifdef __STDC__
  195. #       define VOID void
  196. #   else
  197. #       define VOID char
  198. #   endif
  199. #endif
  200. #else /* __WIN32__ */
  201. /*
  202.  * The following code is copied from winnt.h
  203.  */
  204. #ifndef VOID
  205. #define VOID void
  206. typedef char CHAR;
  207. typedef short SHORT;
  208. typedef long LONG;
  209. #endif
  210. #endif /* __WIN32__ */
  211.  
  212. /*
  213.  * Miscellaneous declarations.
  214.  */
  215.  
  216. #ifndef NULL
  217. #define NULL 0
  218. #endif
  219.  
  220. #ifndef _CLIENTDATA
  221. #   if defined(__STDC__) || defined(__cplusplus)
  222.     typedef void *ClientData;
  223. #   else
  224.     typedef int *ClientData;
  225. #   endif /* __STDC__ */
  226. #define _CLIENTDATA
  227. #endif
  228.  
  229. /*
  230.  * Data structures defined opaquely in this module.  The definitions
  231.  * below just provide dummy types.  A few fields are made visible in
  232.  * Tcl_Interp structures, namely those for returning string values.
  233.  * Note:  any change to the Tcl_Interp definition below must be mirrored
  234.  * in the "real" definition in tclInt.h.
  235.  */
  236.  
  237. typedef struct Tcl_Interp{
  238.     char *result;        /* Points to result string returned by last
  239.                  * command. */
  240.     void (*freeProc) _ANSI_ARGS_((char *blockPtr));
  241.                 /* Zero means result is statically allocated.
  242.                  * TCL_DYNAMIC means result was allocated with
  243.                  * ckalloc and should be freed with ckfree.
  244.                  * Other values give address of procedure
  245.                  * to invoke to free the result.  Must be
  246.                  * freed by Tcl_Eval before executing next
  247.                  * command. */
  248.     int errorLine;        /* When TCL_ERROR is returned, this gives
  249.                  * the line number within the command where
  250.                  * the error occurred (1 means first line). */
  251. } Tcl_Interp;
  252.  
  253. typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
  254. typedef struct Tcl_Command_ *Tcl_Command;
  255. typedef struct Tcl_Event Tcl_Event;
  256. typedef struct Tcl_File_ *Tcl_File;
  257. typedef struct Tcl_Channel_ *Tcl_Channel;
  258. typedef struct Tcl_RegExp_ *Tcl_RegExp;
  259. typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
  260. typedef struct Tcl_Trace_ *Tcl_Trace;
  261.  
  262. /*
  263.  * When a TCL command returns, the string pointer interp->result points to
  264.  * a string containing return information from the command.  In addition,
  265.  * the command procedure returns an integer value, which is one of the
  266.  * following:
  267.  *
  268.  * TCL_OK        Command completed normally;  interp->result contains
  269.  *            the command's result.
  270.  * TCL_ERROR        The command couldn't be completed successfully;
  271.  *            interp->result describes what went wrong.
  272.  * TCL_RETURN        The command requests that the current procedure
  273.  *            return;  interp->result contains the procedure's
  274.  *            return value.
  275.  * TCL_BREAK        The command requests that the innermost loop
  276.  *            be exited;  interp->result is meaningless.
  277.  * TCL_CONTINUE        Go on to the next iteration of the current loop;
  278.  *            interp->result is meaningless.
  279.  */
  280.  
  281. #define TCL_OK        0
  282. #define TCL_ERROR    1
  283. #define TCL_RETURN    2
  284. #define TCL_BREAK    3
  285. #define TCL_CONTINUE    4
  286.  
  287. #define TCL_RESULT_SIZE 200
  288.  
  289. /*
  290.  * Argument descriptors for math function callbacks in expressions:
  291.  */
  292.  
  293. typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
  294. typedef struct Tcl_Value {
  295.     Tcl_ValueType type;        /* Indicates intValue or doubleValue is
  296.                  * valid, or both. */
  297.     long intValue;        /* Integer value. */
  298.     double doubleValue;        /* Double-precision floating value. */
  299. } Tcl_Value;
  300.  
  301. /*
  302.  * Procedure types defined by Tcl:
  303.  */
  304.  
  305. typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
  306. typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
  307.     Tcl_Interp *interp, int code));
  308. typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask));
  309. typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
  310. typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
  311. typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
  312.     Tcl_Interp *interp, int argc, char *argv[]));
  313. typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
  314.     Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
  315.     ClientData cmdClientData, int argc, char *argv[]));
  316. typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags));
  317. typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData,
  318.     int flags));
  319. typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr,
  320.         ClientData clientData));
  321. typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData,
  322.     int flags));
  323. typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData));
  324. typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask));
  325. typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData));
  326. typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
  327. typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData));
  328. typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
  329.     Tcl_Interp *interp));
  330. typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
  331.     Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
  332. typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
  333. typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData,
  334.         Tcl_Channel chan, char *address, int port));
  335. typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData));
  336. typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
  337.     Tcl_Interp *interp, char *part1, char *part2, int flags));
  338.  
  339. /*
  340.  * The structure returned by Tcl_GetCmdInfo and passed into
  341.  * Tcl_SetCmdInfo:
  342.  */
  343.  
  344. typedef struct Tcl_CmdInfo {
  345.     Tcl_CmdProc *proc;            /* Procedure to implement command. */
  346.     ClientData clientData;        /* ClientData passed to proc. */
  347.     Tcl_CmdDeleteProc *deleteProc;    /* Procedure to call when command
  348.                      * is deleted. */
  349.     ClientData deleteData;        /* Value to pass to deleteProc (usually
  350.                      * the same as clientData). */
  351. } Tcl_CmdInfo;
  352.  
  353. /*
  354.  * The structure defined below is used to hold dynamic strings.  The only
  355.  * field that clients should use is the string field, and they should
  356.  * never modify it.
  357.  */
  358.  
  359. #define TCL_DSTRING_STATIC_SIZE 200
  360. typedef struct Tcl_DString {
  361.     char *string;        /* Points to beginning of string:  either
  362.                  * staticSpace below or a malloc'ed array. */
  363.     int length;            /* Number of non-NULL characters in the
  364.                  * string. */
  365.     int spaceAvl;        /* Total number of bytes available for the
  366.                  * string and its terminating NULL char. */
  367.     char staticSpace[TCL_DSTRING_STATIC_SIZE];
  368.                 /* Space to use in common case where string
  369.                  * is small. */
  370. } Tcl_DString;
  371.  
  372. #define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
  373. #define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
  374. #define Tcl_DStringTrunc Tcl_DStringSetLength
  375.  
  376. /*
  377.  * Definitions for the maximum number of digits of precision that may
  378.  * be specified in the "tcl_precision" variable, and the number of
  379.  * characters of buffer space required by Tcl_PrintDouble.
  380.  */
  381.  
  382. #define TCL_MAX_PREC 17
  383. #define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
  384.  
  385. /*
  386.  * Flag that may be passed to Tcl_ConvertElement to force it not to
  387.  * output braces (careful!  if you change this flag be sure to change
  388.  * the definitions at the front of tclUtil.c).
  389.  */
  390.  
  391. #define TCL_DONT_USE_BRACES    1
  392.  
  393. /*
  394.  * Flag values passed to Tcl_RecordAndEval.
  395.  * WARNING: these bit choices must not conflict with the bit choices
  396.  * for evalFlag bits in tclInt.h!!
  397.  */
  398.  
  399. #define TCL_NO_EVAL        0x10000
  400. #define TCL_EVAL_GLOBAL        0x20000
  401.  
  402. /*
  403.  * Special freeProc values that may be passed to Tcl_SetResult (see
  404.  * the man page for details):
  405.  */
  406.  
  407. #define TCL_VOLATILE    ((Tcl_FreeProc *) 1)
  408. #define TCL_STATIC    ((Tcl_FreeProc *) 0)
  409. #define TCL_DYNAMIC    ((Tcl_FreeProc *) 3)
  410.  
  411. /*
  412.  * Flag values passed to variable-related procedures.
  413.  */
  414.  
  415. #define TCL_GLOBAL_ONLY        1
  416. #define TCL_APPEND_VALUE    2
  417. #define TCL_LIST_ELEMENT    4
  418. #define TCL_TRACE_READS        0x10
  419. #define TCL_TRACE_WRITES    0x20
  420. #define TCL_TRACE_UNSETS    0x40
  421. #define TCL_TRACE_DESTROYED    0x80
  422. #define TCL_INTERP_DESTROYED    0x100
  423. #define TCL_LEAVE_ERR_MSG    0x200
  424.  
  425. /*
  426.  * Types for linked variables:
  427.  */
  428.  
  429. #define TCL_LINK_INT        1
  430. #define TCL_LINK_DOUBLE        2
  431. #define TCL_LINK_BOOLEAN    3
  432. #define TCL_LINK_STRING        4
  433. #define TCL_LINK_READ_ONLY    0x80
  434.  
  435. /*
  436.  * The following declarations either map ckalloc and ckfree to
  437.  * malloc and free, or they map them to procedures with all sorts
  438.  * of debugging hooks defined in tclCkalloc.c.
  439.  */
  440.  
  441. EXTERN char *        Tcl_Alloc _ANSI_ARGS_((unsigned int size));
  442. EXTERN void        Tcl_Free _ANSI_ARGS_((char *ptr));
  443. EXTERN char *        Tcl_Realloc _ANSI_ARGS_((char *ptr,
  444.                 unsigned int size));
  445.  
  446. #ifdef TCL_MEM_DEBUG
  447.  
  448. #  define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  449. #  define Tcl_Free(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  450. #  define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  451. #  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  452. #  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  453. #  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  454.  
  455. EXTERN int        Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
  456. EXTERN void        Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
  457.                 int line));
  458.  
  459. #else
  460.  
  461. #  if USE_TCLALLOC
  462. #     define ckalloc(x) Tcl_Alloc(x)
  463. #     define ckfree(x) Tcl_Free(x)
  464. #     define ckrealloc(x,y) Tcl_Realloc(x,y)
  465. #  else
  466. #     define ckalloc(x) malloc(x)
  467. #     define ckfree(x)  free(x)
  468. #     define ckrealloc(x,y) realloc(x,y)
  469. #  endif
  470. #  define Tcl_DumpActiveMemory(x)
  471. #  define Tcl_ValidateAllMemory(x,y)
  472.  
  473. #endif /* TCL_MEM_DEBUG */
  474.  
  475. /*
  476.  * Macro to free result of interpreter.
  477.  */
  478.  
  479. #define Tcl_FreeResult(interp)                    \
  480.     if ((interp)->freeProc != 0) {                \
  481.     if (((interp)->freeProc == TCL_DYNAMIC)            \
  482.         || ((interp)->freeProc == (Tcl_FreeProc *) free)) {    \
  483.         ckfree((interp)->result);                \
  484.     } else {                        \
  485.         (*(interp)->freeProc)((interp)->result);        \
  486.     }                            \
  487.     (interp)->freeProc = 0;                    \
  488.     }
  489.  
  490. /*
  491.  * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers
  492.  * to prevent errors when the forward reference to Tcl_HashTable is
  493.  * encountered in the Tcl_HashEntry structure.
  494.  */
  495.  
  496. #ifdef __cplusplus
  497. struct Tcl_HashTable;
  498. #endif
  499.  
  500. /*
  501.  * Structure definition for an entry in a hash table.  No-one outside
  502.  * Tcl should access any of these fields directly;  use the macros
  503.  * defined below.
  504.  */
  505.  
  506. typedef struct Tcl_HashEntry {
  507.     struct Tcl_HashEntry *nextPtr;    /* Pointer to next entry in this
  508.                      * hash bucket, or NULL for end of
  509.                      * chain. */
  510.     struct Tcl_HashTable *tablePtr;    /* Pointer to table containing entry. */
  511.     struct Tcl_HashEntry **bucketPtr;    /* Pointer to bucket that points to
  512.                      * first entry in this entry's chain:
  513.                      * used for deleting the entry. */
  514.     ClientData clientData;        /* Application stores something here
  515.                      * with Tcl_SetHashValue. */
  516.     union {                /* Key has one of these forms: */
  517.     char *oneWordValue;        /* One-word value for key. */
  518.     int words[1];            /* Multiple integer words for key.
  519.                      * The actual size will be as large
  520.                      * as necessary for this table's
  521.                      * keys. */
  522.     char string[4];            /* String for key.  The actual size
  523.                      * will be as large as needed to hold
  524.                      * the key. */
  525.     } key;                /* MUST BE LAST FIELD IN RECORD!! */
  526. } Tcl_HashEntry;
  527.  
  528. /*
  529.  * Structure definition for a hash table.  Must be in tcl.h so clients
  530.  * can allocate space for these structures, but clients should never
  531.  * access any fields in this structure.
  532.  */
  533.  
  534. #define TCL_SMALL_HASH_TABLE 4
  535. typedef struct Tcl_HashTable {
  536.     Tcl_HashEntry **buckets;        /* Pointer to bucket array.  Each
  537.                      * element points to first entry in
  538.                      * bucket's hash chain, or NULL. */
  539.     Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
  540.                     /* Bucket array used for small tables
  541.                      * (to avoid mallocs and frees). */
  542.     int numBuckets;            /* Total number of buckets allocated
  543.                      * at **bucketPtr. */
  544.     int numEntries;            /* Total number of entries present
  545.                      * in table. */
  546.     int rebuildSize;            /* Enlarge table when numEntries gets
  547.                      * to be this large. */
  548.     int downShift;            /* Shift count used in hashing
  549.                      * function.  Designed to use high-
  550.                      * order bits of randomized keys. */
  551.     int mask;                /* Mask value used in hashing
  552.                      * function. */
  553.     int keyType;            /* Type of keys used in this table. 
  554.                      * It's either TCL_STRING_KEYS,
  555.                      * TCL_ONE_WORD_KEYS, or an integer
  556.                      * giving the number of ints that
  557.                                          * is the size of the key.
  558.                      */
  559.     Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  560.         char *key));
  561.     Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  562.         char *key, int *newPtr));
  563. } Tcl_HashTable;
  564.  
  565. /*
  566.  * Structure definition for information used to keep track of searches
  567.  * through hash tables:
  568.  */
  569.  
  570. typedef struct Tcl_HashSearch {
  571.     Tcl_HashTable *tablePtr;        /* Table being searched. */
  572.     int nextIndex;            /* Index of next bucket to be
  573.                      * enumerated after present one. */
  574.     Tcl_HashEntry *nextEntryPtr;    /* Next entry to be enumerated in the
  575.                      * the current bucket. */
  576. } Tcl_HashSearch;
  577.  
  578. /*
  579.  * Acceptable key types for hash tables:
  580.  */
  581.  
  582. #define TCL_STRING_KEYS        0
  583. #define TCL_ONE_WORD_KEYS    1
  584.  
  585. /*
  586.  * Macros for clients to use to access fields of hash entries:
  587.  */
  588.  
  589. #define Tcl_GetHashValue(h) ((h)->clientData)
  590. #define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
  591. #define Tcl_GetHashKey(tablePtr, h) \
  592.     ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
  593.                         : (h)->key.string))
  594.  
  595. /*
  596.  * Macros to use for clients to use to invoke find and create procedures
  597.  * for hash tables:
  598.  */
  599.  
  600. #define Tcl_FindHashEntry(tablePtr, key) \
  601.     (*((tablePtr)->findProc))(tablePtr, key)
  602. #define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
  603.     (*((tablePtr)->createProc))(tablePtr, key, newPtr)
  604.  
  605. /*
  606.  * Flag values to pass to Tcl_DoOneEvent to disable searches
  607.  * for some kinds of events:
  608.  */
  609.  
  610. #define TCL_DONT_WAIT        (1<<1)
  611. #define TCL_WINDOW_EVENTS    (1<<2)
  612. #define TCL_FILE_EVENTS        (1<<3)
  613. #define TCL_TIMER_EVENTS    (1<<4)
  614. #define TCL_IDLE_EVENTS        (1<<5)    /* WAS 0x10 ???? */
  615. #define TCL_ALL_EVENTS        (~TCL_DONT_WAIT)
  616.  
  617. /*
  618.  * The following structure defines a generic event for the Tcl event
  619.  * system.  These are the things that are queued in calls to Tcl_QueueEvent
  620.  * and serviced later by Tcl_DoOneEvent.  There can be many different
  621.  * kinds of events with different fields, corresponding to window events,
  622.  * timer events, etc.  The structure for a particular event consists of
  623.  * a Tcl_Event header followed by additional information specific to that
  624.  * event.
  625.  */
  626.  
  627. struct Tcl_Event {
  628.     Tcl_EventProc *proc;    /* Procedure to call to service this event. */
  629.     struct Tcl_Event *nextPtr;    /* Next in list of pending events, or NULL. */
  630. };
  631.  
  632. /*
  633.  * Positions to pass to Tk_QueueEvent:
  634.  */
  635.  
  636. typedef enum {
  637.     TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
  638. } Tcl_QueuePosition;
  639.  
  640. /*
  641.  * The following structure keeps is used to hold a time value, either as
  642.  * an absolute time (the number of seconds from the epoch) or as an
  643.  * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
  644.  * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT.
  645.  */
  646.  
  647. typedef struct Tcl_Time {
  648.     long sec;            /* Seconds. */
  649.     long usec;            /* Microseconds. */
  650. } Tcl_Time;
  651.  
  652. /*
  653.  * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler
  654.  * to indicate what sorts of events are of interest:
  655.  */
  656.  
  657. #define TCL_READABLE    (1<<1)
  658. #define TCL_WRITABLE    (1<<2)
  659. #define TCL_EXCEPTION    (1<<3)
  660.  
  661. /*
  662.  * Flag values to pass to Tcl_OpenCommandChannel to indicate the
  663.  * disposition of the stdio handles.  TCL_STDIN, TCL_STDOUT, TCL_STDERR,
  664.  * are also used in Tcl_GetStdChannel.
  665.  */
  666.  
  667. #define TCL_STDIN        (1<<1)    
  668. #define TCL_STDOUT        (1<<2)
  669. #define TCL_STDERR        (1<<3)
  670. #define TCL_ENFORCE_MODE    (1<<4)
  671.  
  672. /*
  673.  * Typedefs for the various operations in a channel type:
  674.  */
  675.  
  676. typedef int    (Tcl_DriverBlockModeProc) _ANSI_ARGS_((ClientData instanceData,
  677.             int mode));
  678. typedef int    (Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,
  679.             Tcl_Interp *interp));
  680. typedef int    (Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,
  681.             char *buf, int toRead, int *errorCodePtr));
  682. typedef int    (Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
  683.                 char *buf, int toWrite, int *errorCodePtr));
  684. typedef int    (Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
  685.             long offset, int mode, int *errorCodePtr));
  686. typedef int    (Tcl_DriverSetOptionProc) _ANSI_ARGS_((
  687.             ClientData instanceData, Tcl_Interp *interp,
  688.                     char *optionName, char *value));
  689. typedef int    (Tcl_DriverGetOptionProc) _ANSI_ARGS_((
  690.             ClientData instanceData, char *optionName,
  691.                     Tcl_DString *dsPtr));
  692. typedef void    (Tcl_DriverWatchChannelProc) _ANSI_ARGS_((
  693.                 ClientData instanceData, int mask));
  694. typedef int    (Tcl_DriverChannelReadyProc) _ANSI_ARGS_((
  695.                 ClientData instanceData, int mask));
  696. typedef Tcl_File (Tcl_DriverGetFileProc) _ANSI_ARGS_((ClientData instanceData,
  697.             int mask));
  698.  
  699. /*
  700.  * Enum for different end of line translation and recognition modes.
  701.  */
  702.  
  703. typedef enum Tcl_EolTranslation {
  704.     TCL_TRANSLATE_AUTO,            /* Eol == \r, \n and \r\n. */
  705.     TCL_TRANSLATE_CR,            /* Eol == \r. */
  706.     TCL_TRANSLATE_LF,            /* Eol == \n. */
  707.     TCL_TRANSLATE_CRLF            /* Eol == \r\n. */
  708. } Tcl_EolTranslation;
  709.  
  710. /*
  711.  * struct Tcl_ChannelType:
  712.  *
  713.  * One such structure exists for each type (kind) of channel.
  714.  * It collects together in one place all the functions that are
  715.  * part of the specific channel type.
  716.  */
  717.  
  718. typedef struct Tcl_ChannelType {
  719.     char *typeName;            /* The name of the channel type in Tcl
  720.                                          * commands. This storage is owned by
  721.                                          * channel type. */
  722.     Tcl_DriverBlockModeProc *blockModeProc;
  723.                         /* Set blocking mode for the
  724.                                          * raw channel. May be NULL. */
  725.     Tcl_DriverCloseProc *closeProc;    /* Procedure to call to close
  726.                                          * the channel. */
  727.     Tcl_DriverInputProc *inputProc;    /* Procedure to call for input
  728.                                          * on channel. */
  729.     Tcl_DriverOutputProc *outputProc;    /* Procedure to call for output
  730.                                          * on channel. */
  731.     Tcl_DriverSeekProc *seekProc;    /* Procedure to call to seek
  732.                                          * on the channel. May be NULL. */
  733.     Tcl_DriverSetOptionProc *setOptionProc;
  734.                         /* Set an option on a channel. */
  735.     Tcl_DriverGetOptionProc *getOptionProc;
  736.                         /* Get an option from a channel. */
  737.     Tcl_DriverWatchChannelProc *watchChannelProc;
  738.                         /* Set up the notifier to watch
  739.                                          * for events on this channel. */
  740.     Tcl_DriverChannelReadyProc *channelReadyProc;
  741.                         /* Check for events of interest on
  742.                                          * this channel. */
  743.     Tcl_DriverGetFileProc *getFileProc;    /* Get a Tcl_File from the channel
  744.                                          * or NULL if not supported. */
  745. } Tcl_ChannelType;
  746.  
  747. /*
  748.  * The following flags determine whether the blockModeProc above should
  749.  * set the channel into blocking or nonblocking mode. They are passed
  750.  * as arguments to the blockModeProc procedure in the above structure.
  751.  */
  752.  
  753. #define TCL_MODE_BLOCKING 0        /* Put channel into blocking mode. */
  754. #define TCL_MODE_NONBLOCKING 1        /* Put channel into nonblocking
  755.                      * mode. */
  756.  
  757. /*
  758.  * Types for file handles:
  759.  */
  760.  
  761. #define TCL_UNIX_FD    1
  762. #define TCL_MAC_FILE    2
  763. #define TCL_MAC_SOCKET    3
  764. #define TCL_WIN_PIPE    4
  765. #define TCL_WIN_FILE    5
  766. #define TCL_WIN_SOCKET    6
  767. #define TCL_WIN_CONSOLE 7
  768. #define TCL_WIN32S_PIPE    8
  769. #define TCL_OS2_PIPE    9
  770. #define TCL_OS2_FILE    10
  771. #define TCL_OS2_SOCKET  11
  772. #define TCL_OS2_CONSOLE 12
  773.  
  774. /*
  775.  * Enum for different types of file paths.
  776.  */
  777.  
  778. typedef enum Tcl_PathType {
  779.     TCL_PATH_ABSOLUTE,
  780.     TCL_PATH_RELATIVE,
  781.     TCL_PATH_VOLUME_RELATIVE
  782. } Tcl_PathType;
  783.  
  784. /*
  785.  * The following interface is exported for backwards compatibility, but
  786.  * is only implemented on Unix.  Portable applications should use
  787.  * Tcl_OpenCommandChannel, instead.
  788.  */
  789.  
  790. EXTERN int        Tcl_CreatePipeline _ANSI_ARGS_((Tcl_Interp *interp,
  791.                 int argc, char **argv, int **pidArrayPtr,
  792.                 int *inPipePtr, int *outPipePtr,
  793.                 int *errFilePtr));
  794.  
  795. /*
  796.  * Exported Tcl procedures:
  797.  */
  798.  
  799. EXTERN void        Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
  800.                 char *message));
  801. EXTERN void        Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
  802. EXTERN void        Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
  803.                 char *string));
  804. EXTERN void        Tcl_AppendResult _ANSI_ARGS_(
  805.                     TCL_VARARGS(Tcl_Interp *,interp));
  806. EXTERN int        Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
  807. EXTERN Tcl_AsyncHandler    Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
  808.                 ClientData clientData));
  809. EXTERN void        Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
  810. EXTERN int        Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
  811.                 int code));
  812. EXTERN void        Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
  813. EXTERN int        Tcl_AsyncReady _ANSI_ARGS_((void));
  814. EXTERN void        Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp *interp));
  815. EXTERN char        Tcl_Backslash _ANSI_ARGS_((char *src,
  816.                 int *readPtr));
  817. EXTERN void        Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
  818.                 Tcl_InterpDeleteProc *proc,
  819.                 ClientData clientData));
  820. EXTERN void        Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
  821.                 ClientData clientData));
  822. #define Tcl_Ckalloc Tcl_Alloc
  823. #define Tcl_Ckfree Tcl_Free
  824. #define Tcl_Ckrealloc Tcl_Realloc
  825. EXTERN int        Tcl_Close _ANSI_ARGS_((Tcl_Interp *interp,
  826.                     Tcl_Channel chan));
  827. EXTERN int        Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
  828. EXTERN char *        Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
  829. EXTERN int        Tcl_ConvertElement _ANSI_ARGS_((char *src,
  830.                 char *dst, int flags));
  831. EXTERN int        Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp *slave,
  832.                 char *slaveCmd, Tcl_Interp *target,
  833.                     char *targetCmd, int argc, char **argv));
  834. EXTERN Tcl_Channel    Tcl_CreateChannel _ANSI_ARGS_((
  835.                     Tcl_ChannelType *typePtr, char *chanName,
  836.                             ClientData instanceData, int mask));
  837. EXTERN void        Tcl_CreateChannelHandler _ANSI_ARGS_((
  838.                 Tcl_Channel chan, int mask,
  839.                             Tcl_ChannelProc *proc, ClientData clientData));
  840. EXTERN void        Tcl_CreateCloseHandler _ANSI_ARGS_((
  841.                 Tcl_Channel chan, Tcl_CloseProc *proc,
  842.                             ClientData clientData));
  843. EXTERN Tcl_Command    Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
  844.                 char *cmdName, Tcl_CmdProc *proc,
  845.                 ClientData clientData,
  846.                 Tcl_CmdDeleteProc *deleteProc));
  847. EXTERN void        Tcl_CreateEventSource _ANSI_ARGS_((
  848.                 Tcl_EventSetupProc *setupProc, Tcl_EventCheckProc
  849.                 *checkProc, ClientData clientData));
  850. EXTERN void        Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
  851.                 ClientData clientData));
  852. EXTERN void        Tcl_CreateFileHandler _ANSI_ARGS_((
  853.                     Tcl_File file, int mask, Tcl_FileProc *proc,
  854.                 ClientData clientData));
  855. EXTERN Tcl_Interp *    Tcl_CreateInterp _ANSI_ARGS_((void));
  856. EXTERN void        Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
  857.                 char *name, int numArgs, Tcl_ValueType *argTypes,
  858.                 Tcl_MathProc *proc, ClientData clientData));
  859. EXTERN void        Tcl_CreateModalTimeout _ANSI_ARGS_((int milliseconds,
  860.                 Tcl_TimerProc *proc, ClientData clientData));
  861. EXTERN Tcl_Interp    *Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp *interp,
  862.                     char *slaveName, int isSafe));
  863. EXTERN Tcl_TimerToken    Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
  864.                 Tcl_TimerProc *proc, ClientData clientData));
  865. EXTERN Tcl_Trace    Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
  866.                 int level, Tcl_CmdTraceProc *proc,
  867.                 ClientData clientData));
  868. EXTERN char *        Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
  869.                 char *file, int line));
  870. EXTERN int        Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
  871.                 char *file, int line));
  872. EXTERN char *        Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
  873.                 unsigned int size, char *file, int line));
  874. EXTERN void        Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  875.                             char *name));
  876. EXTERN int        Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
  877.                 char *cmdName));
  878. EXTERN void        Tcl_DeleteChannelHandler _ANSI_ARGS_((
  879.                     Tcl_Channel chan, Tcl_ChannelProc *proc,
  880.                             ClientData clientData));
  881. EXTERN void        Tcl_DeleteCloseHandler _ANSI_ARGS_((
  882.                 Tcl_Channel chan, Tcl_CloseProc *proc,
  883.                             ClientData clientData));
  884. EXTERN void        Tcl_DeleteEventSource _ANSI_ARGS_((
  885.                 Tcl_EventSetupProc *setupProc,
  886.                 Tcl_EventCheckProc *checkProc,
  887.                 ClientData clientData));
  888. EXTERN void        Tcl_DeleteEvents _ANSI_ARGS_((
  889.                 Tcl_EventDeleteProc *proc,
  890.                             ClientData clientData));
  891. EXTERN void        Tcl_DeleteExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
  892.                 ClientData clientData));
  893. EXTERN void        Tcl_DeleteFileHandler _ANSI_ARGS_((
  894.                     Tcl_File file));
  895. EXTERN void        Tcl_DeleteHashEntry _ANSI_ARGS_((
  896.                 Tcl_HashEntry *entryPtr));
  897. EXTERN void        Tcl_DeleteHashTable _ANSI_ARGS_((
  898.                 Tcl_HashTable *tablePtr));
  899. EXTERN void        Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
  900. EXTERN void        Tcl_DeleteModalTimeout _ANSI_ARGS_((
  901.                 Tcl_TimerProc *proc, ClientData clientData));
  902. EXTERN void        Tcl_DeleteTimerHandler _ANSI_ARGS_((
  903.                 Tcl_TimerToken token));
  904. EXTERN void        Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
  905.                 Tcl_Trace trace));
  906. EXTERN void        Tcl_DetachPids _ANSI_ARGS_((int numPids, int *pidPtr));
  907. EXTERN void        Tcl_DontCallWhenDeleted _ANSI_ARGS_((
  908.                 Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
  909.                 ClientData clientData));
  910. EXTERN int        Tcl_DoOneEvent _ANSI_ARGS_((int flags));
  911. EXTERN void        Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
  912.                 ClientData clientData));
  913. EXTERN char *        Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
  914.                 char *string, int length));
  915. EXTERN char *        Tcl_DStringAppendElement _ANSI_ARGS_((
  916.                 Tcl_DString *dsPtr, char *string));
  917. EXTERN void        Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
  918. EXTERN void        Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
  919. EXTERN void        Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
  920.                 Tcl_DString *dsPtr));
  921. EXTERN void        Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
  922. EXTERN void        Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
  923.                 Tcl_DString *dsPtr));
  924. EXTERN void        Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
  925.                 int length));
  926. EXTERN void        Tcl_DStringStartSublist _ANSI_ARGS_((
  927.                 Tcl_DString *dsPtr));
  928. EXTERN int        Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
  929. EXTERN char *        Tcl_ErrnoId _ANSI_ARGS_((void));
  930. EXTERN char *        Tcl_ErrnoMsg _ANSI_ARGS_((int err));
  931. EXTERN int        Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp, char *cmd));
  932. EXTERN int        Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
  933.                 char *fileName));
  934. EXTERN void        Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
  935.                 Tcl_FreeProc *freeProc));
  936. EXTERN void        Tcl_Exit _ANSI_ARGS_((int status));
  937. EXTERN int        Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  938.                 char *string, int *ptr));
  939. EXTERN int        Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
  940.                 char *string, double *ptr));
  941. EXTERN int        Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
  942.                 char *string, long *ptr));
  943. EXTERN int        Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
  944.                 char *string));
  945. EXTERN int        Tcl_FileReady _ANSI_ARGS_((Tcl_File file,
  946.                 int mask));
  947. EXTERN void        Tcl_FindExecutable _ANSI_ARGS_((char *argv0));
  948. EXTERN Tcl_HashEntry *    Tcl_FirstHashEntry _ANSI_ARGS_((
  949.                 Tcl_HashTable *tablePtr,
  950.                 Tcl_HashSearch *searchPtr));
  951. EXTERN int        Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
  952. EXTERN void         Tcl_FreeFile _ANSI_ARGS_((
  953.                     Tcl_File file));
  954. EXTERN int        Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp *interp,
  955.                        char *slaveCmd, Tcl_Interp **targetInterpPtr,
  956.                             char **targetCmdPtr, int *argcPtr,
  957.                 char ***argvPtr));
  958. EXTERN ClientData    Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  959.                             char *name, Tcl_InterpDeleteProc **procPtr));
  960. EXTERN int        Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  961.                 char *string, int *boolPtr));
  962. EXTERN Tcl_Channel    Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp *interp,
  963.                     char *chanName, int *modePtr));
  964. EXTERN int        Tcl_GetChannelBufferSize _ANSI_ARGS_((
  965.                     Tcl_Channel chan));
  966. EXTERN Tcl_File        Tcl_GetChannelFile _ANSI_ARGS_((Tcl_Channel chan,
  967.                     int direction));
  968. EXTERN ClientData    Tcl_GetChannelInstanceData _ANSI_ARGS_((
  969.                     Tcl_Channel chan));
  970. EXTERN int        Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
  971. EXTERN char *        Tcl_GetChannelName _ANSI_ARGS_((Tcl_Channel chan));
  972. EXTERN int        Tcl_GetChannelOption _ANSI_ARGS_((Tcl_Channel chan,
  973.                     char *optionName, Tcl_DString *dsPtr));
  974. EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
  975. EXTERN int        Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  976.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  977. EXTERN char *        Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
  978.                 Tcl_Command command));
  979. EXTERN char *        Tcl_GetCwd _ANSI_ARGS_((char *buf, int len));
  980. EXTERN int        Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
  981.                 char *string, double *doublePtr));
  982. EXTERN int        Tcl_GetErrno _ANSI_ARGS_((void));
  983. EXTERN Tcl_File        Tcl_GetFile _ANSI_ARGS_((ClientData fileData,
  984.                 int type));
  985. EXTERN ClientData    Tcl_GetFileInfo _ANSI_ARGS_((Tcl_File file,
  986.                 int *typePtr));
  987. EXTERN char *        Tcl_GetHostName _ANSI_ARGS_((void));
  988. EXTERN int        Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
  989.                 char *string, int *intPtr));
  990. EXTERN int        Tcl_GetInterpPath _ANSI_ARGS_((Tcl_Interp *askInterp,
  991.                 Tcl_Interp *slaveInterp));
  992. EXTERN Tcl_Interp    *Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp));
  993. EXTERN ClientData    Tcl_GetNotifierData _ANSI_ARGS_((Tcl_File file,
  994.                 Tcl_FileFreeProc **freeProcPtr));
  995. EXTERN int        Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
  996.                 char *string, int write, int checkUsage,
  997.                 ClientData *filePtr));
  998. EXTERN Tcl_PathType    Tcl_GetPathType _ANSI_ARGS_((char *path));
  999. EXTERN int        Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
  1000.                     Tcl_DString *dsPtr));
  1001. EXTERN Tcl_Interp    *Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp *interp,
  1002.                 char *slaveName));
  1003. EXTERN Tcl_Channel    Tcl_GetStdChannel _ANSI_ARGS_((int type));
  1004. EXTERN char *        Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1005.                 char *varName, int flags));
  1006. EXTERN char *        Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1007.                 char *part1, char *part2, int flags));
  1008. EXTERN int        Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
  1009.                 char *command));
  1010. EXTERN char *        Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
  1011. EXTERN int        Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
  1012. EXTERN void        Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
  1013.                 int keyType));
  1014. EXTERN void        Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
  1015. EXTERN int        Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
  1016. EXTERN int        Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
  1017. EXTERN int        Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp *interp));
  1018. EXTERN int        Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp *interp));
  1019. EXTERN char *        Tcl_JoinPath _ANSI_ARGS_((int argc, char **argv,
  1020.                 Tcl_DString *resultPtr));
  1021. EXTERN int        Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  1022.                 char *varName, char *addr, int type));
  1023. EXTERN void        Tcl_Main _ANSI_ARGS_((int argc, char **argv,
  1024.                 Tcl_AppInitProc *appInitProc));
  1025. EXTERN Tcl_Channel    Tcl_MakeFileChannel _ANSI_ARGS_((ClientData inFile,
  1026.                     ClientData outFile, int mode));
  1027. EXTERN int        Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp *interp));
  1028. EXTERN Tcl_Channel    Tcl_MakeTcpClientChannel _ANSI_ARGS_((
  1029.                     ClientData tcpSocket));
  1030. EXTERN char *        Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
  1031. EXTERN Tcl_HashEntry *    Tcl_NextHashEntry _ANSI_ARGS_((
  1032.                 Tcl_HashSearch *searchPtr));
  1033. EXTERN Tcl_Channel    Tcl_OpenCommandChannel _ANSI_ARGS_((
  1034.                     Tcl_Interp *interp, int argc, char **argv,
  1035.                 int flags));
  1036. EXTERN Tcl_Channel    Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1037.                     char *fileName, char *modeString,
  1038.                             int permissions));
  1039. EXTERN Tcl_Channel    Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp *interp,
  1040.                 int port, char *address, char *myaddr,
  1041.                     int myport, int async));
  1042. EXTERN Tcl_Channel    Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp *interp,
  1043.                     int port, char *host,
  1044.                     Tcl_TcpAcceptProc *acceptProc,
  1045.                 ClientData callbackData));
  1046. EXTERN char *        Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
  1047.                 char *string, char **termPtr));
  1048. EXTERN int        Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp *interp,
  1049.                 char *name, char *version));
  1050. EXTERN char *        Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp *interp,
  1051.                 char *name, char *version, int exact));
  1052. EXTERN char *        Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
  1053. EXTERN void        Tcl_Preserve _ANSI_ARGS_((ClientData data));
  1054. EXTERN void        Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
  1055.                 double value, char *dst));
  1056. EXTERN int        Tcl_PutEnv _ANSI_ARGS_((CONST char *string));
  1057. EXTERN void        Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
  1058.                 Tcl_QueuePosition position));
  1059. EXTERN int        Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
  1060.                     char *bufPtr, int toRead));
  1061. EXTERN void        Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
  1062. EXTERN int        Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
  1063.                 char *cmd, int flags));
  1064. EXTERN Tcl_RegExp    Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
  1065.                 char *string));
  1066. EXTERN int        Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
  1067.                 Tcl_RegExp regexp, char *string, char *start));
  1068. EXTERN int        Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
  1069.                 char *string, char *pattern));
  1070. EXTERN void        Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
  1071.                 int index, char **startPtr, char **endPtr));
  1072. EXTERN void        Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1073.                     Tcl_Channel chan));
  1074. EXTERN void        Tcl_Release _ANSI_ARGS_((ClientData clientData));
  1075. EXTERN void        Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
  1076. #define Tcl_Return Tcl_SetResult
  1077. EXTERN int        Tcl_ScanElement _ANSI_ARGS_((char *string,
  1078.                 int *flagPtr));
  1079. EXTERN int        Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
  1080.                     int offset, int mode));
  1081. EXTERN void        Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  1082.                             char *name, Tcl_InterpDeleteProc *proc,
  1083.                             ClientData clientData));
  1084. EXTERN void        Tcl_SetChannelBufferSize _ANSI_ARGS_((
  1085.                 Tcl_Channel chan, int sz));
  1086. EXTERN int        Tcl_SetChannelOption _ANSI_ARGS_((
  1087.                 Tcl_Interp *interp, Tcl_Channel chan,
  1088.                     char *optionName, char *newValue));
  1089. EXTERN int        Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1090.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  1091. EXTERN void        Tcl_SetErrno _ANSI_ARGS_((int err));
  1092. EXTERN void        Tcl_SetErrorCode _ANSI_ARGS_(
  1093.                     TCL_VARARGS(Tcl_Interp *,interp));
  1094. EXTERN void        Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
  1095. EXTERN void        Tcl_SetNotifierData _ANSI_ARGS_((Tcl_File file,
  1096.                 Tcl_FileFreeProc *freeProcPtr, ClientData data));
  1097. EXTERN void        Tcl_SetPanicProc _ANSI_ARGS_((void (*proc)
  1098.                 _ANSI_ARGS_(TCL_VARARGS(char *, format))));
  1099. EXTERN int        Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
  1100.                 int depth));
  1101. EXTERN void        Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
  1102.                 char *string, Tcl_FreeProc *freeProc));
  1103. EXTERN void        Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
  1104.                 int type));
  1105. EXTERN char *        Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1106.                 char *varName, char *newValue, int flags));
  1107. EXTERN char *        Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1108.                 char *part1, char *part2, char *newValue,
  1109.                 int flags));
  1110. EXTERN char *        Tcl_SignalId _ANSI_ARGS_((int sig));
  1111. EXTERN char *        Tcl_SignalMsg _ANSI_ARGS_((int sig));
  1112. EXTERN void        Tcl_Sleep _ANSI_ARGS_((int ms));
  1113. EXTERN void        Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
  1114. EXTERN int        Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
  1115.                 char *list, int *argcPtr, char ***argvPtr));
  1116. EXTERN void        Tcl_SplitPath _ANSI_ARGS_((char *path,
  1117.                 int *argcPtr, char ***argvPtr));
  1118. EXTERN void        Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp *interp,
  1119.                 char *pkgName, Tcl_PackageInitProc *initProc,
  1120.                 Tcl_PackageInitProc *safeInitProc));
  1121. EXTERN int        Tcl_StringMatch _ANSI_ARGS_((char *string,
  1122.                 char *pattern));
  1123. EXTERN int        Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
  1124. #define Tcl_TildeSubst Tcl_TranslateFileName
  1125. EXTERN int        Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  1126.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  1127.                 ClientData clientData));
  1128. EXTERN int        Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1129.                 char *part1, char *part2, int flags,
  1130.                 Tcl_VarTraceProc *proc, ClientData clientData));
  1131. EXTERN char *        Tcl_TranslateFileName _ANSI_ARGS_((Tcl_Interp *interp,
  1132.                 char *name, Tcl_DString *bufferPtr));
  1133. EXTERN void        Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  1134.                 char *varName));
  1135. EXTERN int        Tcl_UnregisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1136.                 Tcl_Channel chan));
  1137. EXTERN int        Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1138.                 char *varName, int flags));
  1139. EXTERN int        Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1140.                 char *part1, char *part2, int flags));
  1141. EXTERN void        Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  1142.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  1143.                 ClientData clientData));
  1144. EXTERN void        Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1145.                 char *part1, char *part2, int flags,
  1146.                 Tcl_VarTraceProc *proc, ClientData clientData));
  1147. EXTERN void        Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp *interp,
  1148.                 char *varName));
  1149. EXTERN int        Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
  1150.                 char *frameName, char *varName,
  1151.                 char *localName, int flags));
  1152. EXTERN int        Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1153.                 char *frameName, char *part1, char *part2,
  1154.                 char *localName, int flags));
  1155. EXTERN int        Tcl_VarEval _ANSI_ARGS_(
  1156.                     TCL_VARARGS(Tcl_Interp *,interp));
  1157. EXTERN ClientData    Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1158.                 char *varName, int flags,
  1159.                 Tcl_VarTraceProc *procPtr,
  1160.                 ClientData prevClientData));
  1161. EXTERN ClientData    Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
  1162.                 char *part1, char *part2, int flags,
  1163.                 Tcl_VarTraceProc *procPtr,
  1164.                 ClientData prevClientData));
  1165. EXTERN int        Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time *timePtr));
  1166. EXTERN int        Tcl_WaitPid _ANSI_ARGS_((int pid, int *statPtr,
  1167.                             int options));
  1168. EXTERN void        Tcl_WatchFile _ANSI_ARGS_((Tcl_File file,
  1169.                 int mask));
  1170. EXTERN int        Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
  1171.                     char *s, int slen));
  1172.  
  1173. #endif /* RESOURCE_INCLUDED */
  1174. #endif /* _TCL */
  1175.