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