home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / tcl.h < prev    next >
C/C++ Source or Header  |  1994-04-11  |  23KB  |  633 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-1993 The Regents of the University of California.
  8.  * All rights reserved.
  9.  *
  10.  * Permission is hereby granted, without written agreement and without
  11.  * license or royalty fees, to use, copy, modify, and distribute this
  12.  * software and its documentation for any purpose, provided that the
  13.  * above copyright notice and the following two paragraphs appear in
  14.  * all copies of this software.
  15.  * 
  16.  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
  17.  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
  18.  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  19.  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  20.  *
  21.  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  22.  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  23.  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  24.  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  25.  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  26.  *
  27.  * $Header: /user6/ouster/tcl/RCS/tcl.h,v 1.131 93/11/21 14:50:35 ouster Exp $ SPRITE (Berkeley)
  28.  */
  29.  
  30. #ifndef _TCL
  31. #define _TCL
  32.  
  33. #ifndef BUFSIZ
  34. #include <stdio.h>
  35. #endif
  36.  
  37. #define TCL_VERSION "7.3"
  38. #define TCL_MAJOR_VERSION 7
  39. #define TCL_MINOR_VERSION 3
  40.  
  41. /*
  42.  * Definitions that allow this header file to be used either with or
  43.  * without ANSI C features like function prototypes.
  44.  */
  45.  
  46. #undef _ANSI_ARGS_
  47. #undef CONST
  48. #if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus)
  49. #   define _USING_PROTOTYPES_ 1
  50. #   define _ANSI_ARGS_(x)    x
  51. #   define CONST const
  52. #   ifdef __cplusplus
  53. #       define VARARGS (...)
  54. #   else
  55. #       define VARARGS ()
  56. #   endif
  57. #else
  58. #   define _ANSI_ARGS_(x)    ()
  59. #   define CONST
  60. #endif
  61.  
  62. #ifdef __cplusplus
  63. #   define EXTERN extern "C"
  64. #else
  65. #   define EXTERN extern
  66. #endif
  67.  
  68. /*
  69.  * Macro to use instead of "void" for arguments that must have
  70.  * type "void *" in ANSI C;  maps them to type "char *" in
  71.  * non-ANSI systems.
  72.  */
  73.  
  74. #ifndef VOID
  75. #   ifdef __STDC__
  76. #       define VOID void
  77. #   else
  78. #       define VOID char
  79. #   endif
  80. #endif
  81.  
  82. /*
  83.  * Miscellaneous declarations (to allow Tcl to be used stand-alone,
  84.  * without the rest of Sprite).
  85.  */
  86.  
  87. #ifndef NULL
  88. #define NULL 0
  89. #endif
  90.  
  91. #ifndef _CLIENTDATA
  92. #   ifdef __STDC__
  93.     typedef void *ClientData;
  94. #   else
  95.     typedef int *ClientData;
  96. #   endif /* __STDC__ */
  97. #define _CLIENTDATA
  98. #endif
  99.  
  100. /*
  101.  * Data structures defined opaquely in this module.  The definitions
  102.  * below just provide dummy types.  A few fields are made visible in
  103.  * Tcl_Interp structures, namely those for returning string values.
  104.  * Note:  any change to the Tcl_Interp definition below must be mirrored
  105.  * in the "real" definition in tclInt.h.
  106.  */
  107.  
  108. typedef struct Tcl_Interp{
  109.     char *result;        /* Points to result string returned by last
  110.                  * command. */
  111.     void (*freeProc) _ANSI_ARGS_((char *blockPtr));
  112.                 /* Zero means result is statically allocated.
  113.                  * If non-zero, gives address of procedure
  114.                  * to invoke to free the result.  Must be
  115.                  * freed by Tcl_Eval before executing next
  116.                  * command. */
  117.     int errorLine;        /* When TCL_ERROR is returned, this gives
  118.                  * the line number within the command where
  119.                  * the error occurred (1 means first line). */
  120. } Tcl_Interp;
  121.  
  122. typedef int *Tcl_Trace;
  123. typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
  124.  
  125. /*
  126.  * When a TCL command returns, the string pointer interp->result points to
  127.  * a string containing return information from the command.  In addition,
  128.  * the command procedure returns an integer value, which is one of the
  129.  * following:
  130.  *
  131.  * TCL_OK        Command completed normally;  interp->result contains
  132.  *            the command's result.
  133.  * TCL_ERROR        The command couldn't be completed successfully;
  134.  *            interp->result describes what went wrong.
  135.  * TCL_RETURN        The command requests that the current procedure
  136.  *            return;  interp->result contains the procedure's
  137.  *            return value.
  138.  * TCL_BREAK        The command requests that the innermost loop
  139.  *            be exited;  interp->result is meaningless.
  140.  * TCL_CONTINUE        Go on to the next iteration of the current loop;
  141.  *            interp->result is meaningless.
  142.  */
  143.  
  144. #define TCL_OK        0
  145. #define TCL_ERROR    1
  146. #define TCL_RETURN    2
  147. #define TCL_BREAK    3
  148. #define TCL_CONTINUE    4
  149. #define TCL_UNWIND    5
  150.  
  151. #define TCL_RESULT_SIZE 200
  152.  
  153. /*
  154.  * Argument descriptors for math function callbacks in expressions:
  155.  */
  156.  
  157. typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
  158. typedef struct Tcl_Value {
  159.     Tcl_ValueType type;        /* Indicates intValue or doubleValue is
  160.                  * valid, or both. */
  161.     int intValue;        /* Integer value. */
  162.     double doubleValue;        /* Double-precision floating value. */
  163. } Tcl_Value;
  164.  
  165. /*
  166.  * Procedure types defined by Tcl:
  167.  */
  168.  
  169. typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
  170.     Tcl_Interp *interp, int code));
  171. typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
  172. typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
  173.     Tcl_Interp *interp, int argc, char *argv[]));
  174. typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
  175.     Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
  176.     ClientData cmdClientData, int argc, char *argv[]));
  177. typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
  178. typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
  179.     Tcl_Interp *interp));
  180. typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
  181.     Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
  182. typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
  183.     Tcl_Interp *interp, char *part1, char *part2, int flags));
  184.  
  185. /*
  186.  * The structure returned by Tcl_GetCmdInfo and passed into
  187.  * Tcl_SetCmdInfo:
  188.  */
  189.  
  190. typedef struct Tcl_CmdInfo {
  191.     Tcl_CmdProc *proc;            /* Procedure that implements command. */
  192.     ClientData clientData;        /* ClientData passed to proc. */
  193.     Tcl_CmdDeleteProc *deleteProc;    /* Procedure to call when command
  194.                      * is deleted. */
  195.     ClientData deleteData;        /* Value to pass to deleteProc (usually
  196.                      * the same as clientData). */
  197. } Tcl_CmdInfo;
  198.  
  199. /*
  200.  * The structure defined below is used to hold dynamic strings.  The only
  201.  * field that clients should use is the string field, and they should
  202.  * never modify it.
  203.  */
  204.  
  205. #define TCL_DSTRING_STATIC_SIZE 200
  206. typedef struct Tcl_DString {
  207.     char *string;        /* Points to beginning of string:  either
  208.                  * staticSpace below or a malloc'ed array. */
  209.     int length;            /* Number of non-NULL characters in the
  210.                  * string. */
  211.     int spaceAvl;        /* Total number of bytes available for the
  212.                  * string and its terminating NULL char. */
  213.     char staticSpace[TCL_DSTRING_STATIC_SIZE];
  214.                 /* Space to use in common case where string
  215.                  * is small. */
  216. } Tcl_DString;
  217.  
  218. #define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
  219. #define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
  220.  
  221. /*
  222.  * Definitions for the maximum number of digits of precision that may
  223.  * be specified in the "tcl_precision" variable, and the number of
  224.  * characters of buffer space required by Tcl_PrintDouble.
  225.  */
  226.  
  227. #define TCL_MAX_PREC 17
  228. #define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
  229.  
  230. /*
  231.  * Flag values passed to Tcl_Eval (see the man page for details;  also
  232.  * see tclInt.h for additional flags that are only used internally by
  233.  * Tcl):
  234.  */
  235.  
  236. #define TCL_BRACKET_TERM    1
  237.  
  238. /*
  239.  * Flag that may be passed to Tcl_ConvertElement to force it not to
  240.  * output braces (careful!  if you change this flag be sure to change
  241.  * the definitions at the front of tclUtil.c).
  242.  */
  243.  
  244. #define TCL_DONT_USE_BRACES    1
  245.  
  246. /*
  247.  * Flag value passed to Tcl_RecordAndEval to request no evaluation
  248.  * (record only).
  249.  */
  250.  
  251. #define TCL_NO_EVAL        -1
  252.  
  253. /*
  254.  * Special freeProc values that may be passed to Tcl_SetResult (see
  255.  * the man page for details):
  256.  */
  257.  
  258. #define TCL_VOLATILE    ((Tcl_FreeProc *) -1)
  259. #define TCL_STATIC    ((Tcl_FreeProc *) 0)
  260. #define TCL_DYNAMIC    ((Tcl_FreeProc *) free)
  261.  
  262. /*
  263.  * Flag values passed to variable-related procedures.
  264.  */
  265.  
  266. #define TCL_GLOBAL_ONLY        1
  267. #define TCL_APPEND_VALUE    2
  268. #define TCL_LIST_ELEMENT    4
  269. #define TCL_TRACE_READS        0x10
  270. #define TCL_TRACE_WRITES    0x20
  271. #define TCL_TRACE_UNSETS    0x40
  272. #define TCL_TRACE_DESTROYED    0x80
  273. #define TCL_INTERP_DESTROYED    0x100
  274. #define TCL_LEAVE_ERR_MSG    0x200
  275.  
  276. /*
  277.  * Types for linked variables:
  278.  */
  279.  
  280. #define TCL_LINK_INT        1
  281. #define TCL_LINK_DOUBLE        2
  282. #define TCL_LINK_BOOLEAN    3
  283. #define TCL_LINK_STRING        4
  284. #define TCL_LINK_READ_ONLY    0x80
  285.  
  286. /*
  287.  * Permission flags for files:
  288.  */
  289.  
  290. #define TCL_FILE_READABLE    1
  291. #define TCL_FILE_WRITABLE    2
  292.  
  293. /*
  294.  * The following declarations either map ckalloc and ckfree to
  295.  * malloc and free, or they map them to procedures with all sorts
  296.  * of debugging hooks defined in tclCkalloc.c.
  297.  */
  298.  
  299. #ifdef TCL_MEM_DEBUG
  300.  
  301. EXTERN char *        Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
  302.                 char *file, int line));
  303. EXTERN int        Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
  304.                 char *file, int line));
  305. EXTERN char *        Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
  306.                 unsigned int size, char *file, int line));
  307. EXTERN int        Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
  308. EXTERN void        Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
  309.                 int line));
  310. #  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  311. #  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  312. #  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  313.  
  314. #else
  315.  
  316. #  define ckalloc(x) malloc(x)
  317. #  define ckfree(x)  free(x)
  318. #  define ckrealloc(x,y) realloc(x,y)
  319. #  define Tcl_DumpActiveMemory(x)
  320. #  define Tcl_ValidateAllMemory(x,y)
  321.  
  322. #endif /* TCL_MEM_DEBUG */
  323.  
  324. /*
  325.  * Macro to free up result of interpreter.
  326.  */
  327.  
  328. #define Tcl_FreeResult(interp)                    \
  329.     if ((interp)->freeProc != 0) {                \
  330.     if ((interp)->freeProc == (Tcl_FreeProc *) free) {    \
  331.         ckfree((interp)->result);                \
  332.     } else {                        \
  333.         (*(interp)->freeProc)((interp)->result);        \
  334.     }                            \
  335.     (interp)->freeProc = 0;                    \
  336.     }
  337.  
  338. /*
  339.  * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers
  340.  * to prevent errors when the forward reference to Tcl_HashTable is
  341.  * encountered in the Tcl_HashEntry structure.
  342.  */
  343.  
  344. #ifdef __cplusplus
  345. struct Tcl_HashTable;
  346. #endif
  347.  
  348. /*
  349.  * Structure definition for an entry in a hash table.  No-one outside
  350.  * Tcl should access any of these fields directly;  use the macros
  351.  * defined below.
  352.  */
  353.  
  354. typedef struct Tcl_HashEntry {
  355.     struct Tcl_HashEntry *nextPtr;    /* Pointer to next entry in this
  356.                      * hash bucket, or NULL for end of
  357.                      * chain. */
  358.     struct Tcl_HashTable *tablePtr;    /* Pointer to table containing entry. */
  359.     struct Tcl_HashEntry **bucketPtr;    /* Pointer to bucket that points to
  360.                      * first entry in this entry's chain:
  361.                      * used for deleting the entry. */
  362.     ClientData clientData;        /* Application stores something here
  363.                      * with Tcl_SetHashValue. */
  364.     union {                /* Key has one of these forms: */
  365.     char *oneWordValue;        /* One-word value for key. */
  366.     int words[1];            /* Multiple integer words for key.
  367.                      * The actual size will be as large
  368.                      * as necessary for this table's
  369.                      * keys. */
  370.     char string[4];            /* String for key.  The actual size
  371.                      * will be as large as needed to hold
  372.                      * the key. */
  373.     } key;                /* MUST BE LAST FIELD IN RECORD!! */
  374. } Tcl_HashEntry;
  375.  
  376. /*
  377.  * Structure definition for a hash table.  Must be in tcl.h so clients
  378.  * can allocate space for these structures, but clients should never
  379.  * access any fields in this structure.
  380.  */
  381.  
  382. #define TCL_SMALL_HASH_TABLE 4
  383. typedef struct Tcl_HashTable {
  384.     Tcl_HashEntry **buckets;        /* Pointer to bucket array.  Each
  385.                      * element points to first entry in
  386.                      * bucket's hash chain, or NULL. */
  387.     Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
  388.                     /* Bucket array used for small tables
  389.                      * (to avoid mallocs and frees). */
  390.     int numBuckets;            /* Total number of buckets allocated
  391.                      * at **bucketPtr. */
  392.     int numEntries;            /* Total number of entries present
  393.                      * in table. */
  394.     int rebuildSize;            /* Enlarge table when numEntries gets
  395.                      * to be this large. */
  396.     int downShift;            /* Shift count used in hashing
  397.                      * function.  Designed to use high-
  398.                      * order bits of randomized keys. */
  399.     int mask;                /* Mask value used in hashing
  400.                      * function. */
  401.     int keyType;            /* Type of keys used in this table. 
  402.                      * It's either TCL_STRING_KEYS,
  403.                      * TCL_ONE_WORD_KEYS, or an integer
  404.                      * giving the number of ints in a
  405.                      */
  406.     Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  407.         char *key));
  408.     Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  409.         char *key, int *newPtr));
  410. } Tcl_HashTable;
  411.  
  412. /*
  413.  * Structure definition for information used to keep track of searches
  414.  * through hash tables:
  415.  */
  416.  
  417. typedef struct Tcl_HashSearch {
  418.     Tcl_HashTable *tablePtr;        /* Table being searched. */
  419.     int nextIndex;            /* Index of next bucket to be
  420.                      * enumerated after present one. */
  421.     Tcl_HashEntry *nextEntryPtr;    /* Next entry to be enumerated in the
  422.                      * the current bucket. */
  423. } Tcl_HashSearch;
  424.  
  425. /*
  426.  * Acceptable key types for hash tables:
  427.  */
  428.  
  429. #define TCL_STRING_KEYS        0
  430. #define TCL_ONE_WORD_KEYS    1
  431.  
  432. /*
  433.  * Macros for clients to use to access fields of hash entries:
  434.  */
  435.  
  436. #define Tcl_GetHashValue(h) ((h)->clientData)
  437. #define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
  438. #define Tcl_GetHashKey(tablePtr, h) \
  439.     ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
  440.                         : (h)->key.string))
  441.  
  442. /*
  443.  * Macros to use for clients to use to invoke find and create procedures
  444.  * for hash tables:
  445.  */
  446.  
  447. #define Tcl_FindHashEntry(tablePtr, key) \
  448.     (*((tablePtr)->findProc))(tablePtr, key)
  449. #define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
  450.     (*((tablePtr)->createProc))(tablePtr, key, newPtr)
  451.  
  452. /*
  453.  * Exported Tcl variables:
  454.  */
  455.  
  456. EXTERN int        tcl_AsyncReady;
  457. EXTERN char *        tcl_RcFileName;
  458.  
  459. /*
  460.  * Exported Tcl procedures:
  461.  */
  462.  
  463. EXTERN void        Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
  464. EXTERN Tcl_AsyncHandler    Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
  465.                 ClientData clientData));
  466. EXTERN void        Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
  467. EXTERN int        Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
  468.                 int code));
  469. EXTERN void        Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
  470.                 char *string));
  471. EXTERN void        Tcl_AppendResult _ANSI_ARGS_(VARARGS);
  472. EXTERN int        Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
  473. EXTERN void        Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
  474.                 char *message));
  475. EXTERN char        Tcl_Backslash _ANSI_ARGS_((char *src,
  476.                 int *readPtr));
  477. EXTERN void        Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
  478.                 Tcl_InterpDeleteProc *proc,
  479.                 ClientData clientData));
  480. EXTERN int        Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
  481. EXTERN char *        Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
  482. EXTERN int        Tcl_ConvertElement _ANSI_ARGS_((char *src,
  483.                 char *dst, int flags));
  484. EXTERN void        Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
  485.                 char *cmdName, Tcl_CmdProc *proc,
  486.                 ClientData clientData,
  487.                 Tcl_CmdDeleteProc *deleteProc));
  488. EXTERN Tcl_Interp *    Tcl_CreateInterp _ANSI_ARGS_((void));
  489. EXTERN void        Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
  490.                 char *name, int numArgs, Tcl_ValueType *argTypes,
  491.                 Tcl_MathProc *proc, ClientData clientData));
  492. EXTERN int        Tcl_CreatePipeline _ANSI_ARGS_((Tcl_Interp *interp,
  493.                 int argc, char **argv, int **pidArrayPtr,
  494.                 int *inPipePtr, int *outPipePtr,
  495.                 int *errFilePtr));
  496. EXTERN Tcl_Trace    Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
  497.                 int level, Tcl_CmdTraceProc *proc,
  498.                 ClientData clientData));
  499. EXTERN void        Tcl_DeleteHashEntry _ANSI_ARGS_((
  500.                 Tcl_HashEntry *entryPtr));
  501. EXTERN void        Tcl_DeleteHashTable _ANSI_ARGS_((
  502.                 Tcl_HashTable *tablePtr));
  503. EXTERN char *        Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
  504.                 char *string, int length));
  505. EXTERN char *        Tcl_DStringAppendElement _ANSI_ARGS_((
  506.                 Tcl_DString *dsPtr, char *string));
  507. EXTERN void        Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
  508. EXTERN void        Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
  509. EXTERN void        Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
  510. EXTERN void        Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
  511.                 Tcl_DString *dsPtr));
  512. EXTERN void        Tcl_DStringStartSublist _ANSI_ARGS_((
  513.                 Tcl_DString *dsPtr));
  514. EXTERN void        Tcl_DStringTrunc _ANSI_ARGS_((Tcl_DString *dsPtr,
  515.                 int length));
  516. EXTERN int        Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
  517.                 char *cmdName));
  518. EXTERN void        Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
  519. EXTERN void        Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
  520.                 Tcl_Trace trace));
  521. EXTERN void        Tcl_DetachPids _ANSI_ARGS_((int numPids, int *pidPtr));
  522. EXTERN void        Tcl_DontCallWhenDeleted _ANSI_ARGS_((
  523.                 Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
  524.                 ClientData clientData));
  525. EXTERN void        Tcl_EnterFile _ANSI_ARGS_((Tcl_Interp *interp,
  526.                 FILE *file, int permissions));
  527. EXTERN char *        Tcl_ErrnoId _ANSI_ARGS_((void));
  528. EXTERN int        Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp, char *cmd));
  529. EXTERN int        Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
  530.                 char *fileName));
  531. EXTERN int        Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  532.                 char *string, int *ptr));
  533. EXTERN int        Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
  534.                 char *string, double *ptr));
  535. EXTERN int        Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
  536.                 char *string, long *ptr));
  537. EXTERN int        Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
  538.                 char *string));
  539. EXTERN int        Tcl_FilePermissions _ANSI_ARGS_((FILE *file));
  540. EXTERN Tcl_HashEntry *    Tcl_FirstHashEntry _ANSI_ARGS_((
  541.                 Tcl_HashTable *tablePtr,
  542.                 Tcl_HashSearch *searchPtr));
  543. EXTERN int        Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  544.                 char *string, int *boolPtr));
  545. EXTERN int        Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  546.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  547. EXTERN int        Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
  548.                 char *string, double *doublePtr));
  549. EXTERN int        Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
  550.                 char *string, int *intPtr));
  551. EXTERN int        Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
  552.                 char *string, int write, int checkUsage,
  553.                 FILE **filePtr));
  554. EXTERN char *        Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
  555.                 char *varName, int flags));
  556. EXTERN char *        Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  557.                 char *part1, char *part2, int flags));
  558. EXTERN int        Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
  559.                 char *command));
  560. EXTERN char *        Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
  561. EXTERN int        Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
  562. EXTERN void        Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
  563.                 int keyType));
  564. EXTERN void        Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
  565. EXTERN int        Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  566.                 char *varName, char *addr, int type));
  567. EXTERN char *        Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
  568. EXTERN Tcl_HashEntry *    Tcl_NextHashEntry _ANSI_ARGS_((
  569.                 Tcl_HashSearch *searchPtr));
  570. EXTERN char *        Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
  571.                 char *string, char **termPtr));
  572. EXTERN char *        Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
  573. EXTERN void        Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
  574.                 double value, char *dst));
  575. EXTERN void        Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
  576. EXTERN int        Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
  577.                 char *cmd, int flags));
  578. EXTERN int        Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
  579.                 char *string, char *pattern));
  580. EXTERN void        Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
  581. #define Tcl_Return Tcl_SetResult
  582. EXTERN int        Tcl_ScanElement _ANSI_ARGS_((char *string,
  583.                 int *flagPtr));
  584. EXTERN int        Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  585.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  586. EXTERN void        Tcl_SetErrorCode _ANSI_ARGS_(VARARGS);
  587. EXTERN int        Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
  588.                 int depth));
  589. EXTERN void        Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
  590.                 char *string, Tcl_FreeProc *freeProc));
  591. EXTERN char *        Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
  592.                 char *varName, char *newValue, int flags));
  593. EXTERN char *        Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  594.                 char *part1, char *part2, char *newValue,
  595.                 int flags));
  596. EXTERN char *        Tcl_SignalId _ANSI_ARGS_((int sig));
  597. EXTERN char *        Tcl_SignalMsg _ANSI_ARGS_((int sig));
  598. EXTERN int        Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
  599.                 char *list, int *argcPtr, char ***argvPtr));
  600. EXTERN int        Tcl_StringMatch _ANSI_ARGS_((char *string,
  601.                 char *pattern));
  602. EXTERN char *        Tcl_TildeSubst _ANSI_ARGS_((Tcl_Interp *interp,
  603.                 char *name, Tcl_DString *bufferPtr));
  604. EXTERN int        Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  605.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  606.                 ClientData clientData));
  607. EXTERN int        Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  608.                 char *part1, char *part2, int flags,
  609.                 Tcl_VarTraceProc *proc, ClientData clientData));
  610. EXTERN void        Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  611.                 char *varName));
  612. EXTERN int        Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
  613.                 char *varName, int flags));
  614. EXTERN int        Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  615.                 char *part1, char *part2, int flags));
  616. EXTERN void        Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  617.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  618.                 ClientData clientData));
  619. EXTERN void        Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  620.                 char *part1, char *part2, int flags,
  621.                 Tcl_VarTraceProc *proc, ClientData clientData));
  622. EXTERN int        Tcl_VarEval _ANSI_ARGS_(VARARGS);
  623. EXTERN ClientData    Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
  624.                 char *varName, int flags,
  625.                 Tcl_VarTraceProc *procPtr,
  626.                 ClientData prevClientData));
  627. EXTERN ClientData    Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
  628.                 char *part1, char *part2, int flags,
  629.                 Tcl_VarTraceProc *procPtr,
  630.                 ClientData prevClientData));
  631.  
  632. #endif /* _TCL */
  633.