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