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