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