4 * This header file describes the externally-visible facilities
5 * of the Tcl interpreter.
7 * Copyright (c) 1987-1994 The Regents of the University of California.
8 * Copyright (c) 1994-1995 Sun Microsystems, Inc.
10 * This software is copyrighted by the Regents of the University of
11 * California, Sun Microsystems, Inc., and other parties. The following
12 * terms apply to all files associated with the software unless explicitly
13 * disclaimed in individual files.
15 * The authors hereby grant permission to use, copy, modify, distribute,
16 * and license this software and its documentation for any purpose, provided
17 * that existing copyright notices are retained in all copies and that this
18 * notice is included verbatim in any distributions. No written agreement,
19 * license, or royalty fee is required for any of the authorized uses.
20 * Modifications to this software may be copyrighted by their authors
21 * and need not follow the licensing terms described here, provided that
22 * the new terms are clearly indicated on the first page of each file where
25 * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
26 * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
27 * ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
28 * DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
31 * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
32 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
33 * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
34 * IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
35 * NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
38 * RESTRICTED RIGHTS: Use, duplication or disclosure by the government
39 * is subject to the restrictions as set forth in subparagraph (c) (1) (ii)
40 * of the Rights in Technical Data and Computer Software Clause as DFARS
41 * 252.227-7013 and FAR 52.227-19.
43 * $Id: tcl.h,v 1.1 1997/09/16 15:36:32 stanleyg Exp $
45 * @(#) tcl.h 1.153 95/06/27 15:42:31
55 #define TCL_VERSION "7.4"
56 #define TCL_MAJOR_VERSION 7
57 #define TCL_MINOR_VERSION 4
60 * Definitions that allow this header file to be used either with or
61 * without ANSI C features like function prototypes.
66 #if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus)
67 # define _USING_PROTOTYPES_ 1
68 # define _ANSI_ARGS_(x) x
71 # define VARARGS(first) (first, ...)
73 # define VARARGS(first) ()
76 # define _ANSI_ARGS_(x) ()
81 # define EXTERN extern "C"
83 # define EXTERN extern
87 * Macro to use instead of "void" for arguments that must have
88 * type "void *" in ANSI C; maps them to type "char *" in
101 * Miscellaneous declarations (to allow Tcl to be used stand-alone,
102 * without the rest of Sprite).
110 # if defined(__STDC__) || defined(__cplusplus)
111 typedef void *ClientData;
113 typedef int *ClientData;
114 # endif /* __STDC__ */
119 * Data structures defined opaquely in this module. The definitions
120 * below just provide dummy types. A few fields are made visible in
121 * Tcl_Interp structures, namely those for returning string values.
122 * Note: any change to the Tcl_Interp definition below must be mirrored
123 * in the "real" definition in tclInt.h.
126 typedef struct Tcl_Interp{
127 char *result; /* Points to result string returned by last
129 void (*freeProc) _ANSI_ARGS_((char *blockPtr));
130 /* Zero means result is statically allocated.
131 * If non-zero, gives address of procedure
132 * to invoke to free the result. Must be
133 * freed by Tcl_Eval before executing next
135 int errorLine; /* When TCL_ERROR is returned, this gives
136 * the line number within the command where
137 * the error occurred (1 means first line). */
140 typedef int *Tcl_Trace;
141 typedef int *Tcl_Command;
142 typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
143 typedef struct Tcl_RegExp_ *Tcl_RegExp;
146 * When a TCL command returns, the string pointer interp->result points to
147 * a string containing return information from the command. In addition,
148 * the command procedure returns an integer value, which is one of the
151 * TCL_OK Command completed normally; interp->result contains
152 * the command's result.
153 * TCL_ERROR The command couldn't be completed successfully;
154 * interp->result describes what went wrong.
155 * TCL_RETURN The command requests that the current procedure
156 * return; interp->result contains the procedure's
158 * TCL_BREAK The command requests that the innermost loop
159 * be exited; interp->result is meaningless.
160 * TCL_CONTINUE Go on to the next iteration of the current loop;
161 * interp->result is meaningless.
168 #define TCL_CONTINUE 4
170 #define TCL_RESULT_SIZE 200
173 * Argument descriptors for math function callbacks in expressions:
176 typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
177 typedef struct Tcl_Value {
178 Tcl_ValueType type; /* Indicates intValue or doubleValue is
180 long intValue; /* Integer value. */
181 double doubleValue; /* Double-precision floating value. */
185 * Procedure types defined by Tcl:
188 typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
189 typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
190 Tcl_Interp *interp, int code));
191 typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
192 typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
193 Tcl_Interp *interp, int argc, char *argv[]));
194 typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
195 Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
196 ClientData cmdClientData, int argc, char *argv[]));
197 typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
198 typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
199 Tcl_Interp *interp));
200 typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
201 Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
202 typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
203 Tcl_Interp *interp, char *part1, char *part2, int flags));
206 * The structure returned by Tcl_GetCmdInfo and passed into
210 typedef struct Tcl_CmdInfo {
211 Tcl_CmdProc *proc; /* Procedure that implements command. */
212 ClientData clientData; /* ClientData passed to proc. */
213 Tcl_CmdDeleteProc *deleteProc; /* Procedure to call when command
215 ClientData deleteData; /* Value to pass to deleteProc (usually
216 * the same as clientData). */
220 * The structure defined below is used to hold dynamic strings. The only
221 * field that clients should use is the string field, and they should
225 #define TCL_DSTRING_STATIC_SIZE 200
226 typedef struct Tcl_DString {
227 char *string; /* Points to beginning of string: either
228 * staticSpace below or a malloc'ed array. */
229 int length; /* Number of non-NULL characters in the
231 int spaceAvl; /* Total number of bytes available for the
232 * string and its terminating NULL char. */
233 char staticSpace[TCL_DSTRING_STATIC_SIZE];
234 /* Space to use in common case where string
238 #define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
239 #define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
240 #define Tcl_DStringTrunc Tcl_DStringSetLength
243 * Definitions for the maximum number of digits of precision that may
244 * be specified in the "tcl_precision" variable, and the number of
245 * characters of buffer space required by Tcl_PrintDouble.
248 #define TCL_MAX_PREC 17
249 #define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
252 * Flag that may be passed to Tcl_ConvertElement to force it not to
253 * output braces (careful! if you change this flag be sure to change
254 * the definitions at the front of tclUtil.c).
257 #define TCL_DONT_USE_BRACES 1
260 * Flag values passed to Tcl_RecordAndEval.
261 * WARNING: these bit choices must not conflict with the bit choices
262 * for evalFlag bits in tclInt.h!!
265 #define TCL_NO_EVAL 0x10000
266 #define TCL_EVAL_GLOBAL 0x20000
269 * Special freeProc values that may be passed to Tcl_SetResult (see
270 * the man page for details):
273 #define TCL_VOLATILE ((Tcl_FreeProc *) 1)
274 #define TCL_STATIC ((Tcl_FreeProc *) 0)
275 #define TCL_DYNAMIC ((Tcl_FreeProc *) 3)
278 * Flag values passed to variable-related procedures.
281 #define TCL_GLOBAL_ONLY 1
282 #define TCL_APPEND_VALUE 2
283 #define TCL_LIST_ELEMENT 4
284 #define TCL_TRACE_READS 0x10
285 #define TCL_TRACE_WRITES 0x20
286 #define TCL_TRACE_UNSETS 0x40
287 #define TCL_TRACE_DESTROYED 0x80
288 #define TCL_INTERP_DESTROYED 0x100
289 #define TCL_LEAVE_ERR_MSG 0x200
292 * Types for linked variables:
295 #define TCL_LINK_INT 1
296 #define TCL_LINK_DOUBLE 2
297 #define TCL_LINK_BOOLEAN 3
298 #define TCL_LINK_STRING 4
299 #define TCL_LINK_READ_ONLY 0x80
302 * Permission flags for files:
305 #define TCL_FILE_READABLE 1
306 #define TCL_FILE_WRITABLE 2
309 * The following declarations either map ckalloc and ckfree to
310 * malloc and free, or they map them to procedures with all sorts
311 * of debugging hooks defined in tclCkalloc.c.
316 EXTERN char * Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
317 char *file, int line));
318 EXTERN int Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
319 char *file, int line));
320 EXTERN char * Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
321 unsigned int size, char *file, int line));
322 EXTERN int Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
323 EXTERN void Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
325 # define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
326 # define ckfree(x) Tcl_DbCkfree(x, __FILE__, __LINE__)
327 # define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
331 # define ckalloc(x) malloc(x)
332 # define ckfree(x) free(x)
333 # define ckrealloc(x,y) realloc(x,y)
334 # define Tcl_DumpActiveMemory(x)
335 # define Tcl_ValidateAllMemory(x,y)
337 #endif /* TCL_MEM_DEBUG */
340 * Macro to free up result of interpreter.
343 #define Tcl_FreeResult(interp) \
344 if ((interp)->freeProc != 0) { \
345 if ((interp)->freeProc == (Tcl_FreeProc *) free) { \
346 ckfree((interp)->result); \
348 (*(interp)->freeProc)((interp)->result); \
350 (interp)->freeProc = 0; \
354 * Forward declaration of Tcl_HashTable. Needed by some C++ compilers
355 * to prevent errors when the forward reference to Tcl_HashTable is
356 * encountered in the Tcl_HashEntry structure.
360 struct Tcl_HashTable;
364 * Structure definition for an entry in a hash table. No-one outside
365 * Tcl should access any of these fields directly; use the macros
369 typedef struct Tcl_HashEntry {
370 struct Tcl_HashEntry *nextPtr; /* Pointer to next entry in this
371 * hash bucket, or NULL for end of
373 struct Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */
374 struct Tcl_HashEntry **bucketPtr; /* Pointer to bucket that points to
375 * first entry in this entry's chain:
376 * used for deleting the entry. */
377 ClientData clientData; /* Application stores something here
378 * with Tcl_SetHashValue. */
379 union { /* Key has one of these forms: */
380 char *oneWordValue; /* One-word value for key. */
381 int words[1]; /* Multiple integer words for key.
382 * The actual size will be as large
383 * as necessary for this table's
385 char string[4]; /* String for key. The actual size
386 * will be as large as needed to hold
388 } key; /* MUST BE LAST FIELD IN RECORD!! */
392 * Structure definition for a hash table. Must be in tcl.h so clients
393 * can allocate space for these structures, but clients should never
394 * access any fields in this structure.
397 #define TCL_SMALL_HASH_TABLE 4
398 typedef struct Tcl_HashTable {
399 Tcl_HashEntry **buckets; /* Pointer to bucket array. Each
400 * element points to first entry in
401 * bucket's hash chain, or NULL. */
402 Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
403 /* Bucket array used for small tables
404 * (to avoid mallocs and frees). */
405 int numBuckets; /* Total number of buckets allocated
407 int numEntries; /* Total number of entries present
409 int rebuildSize; /* Enlarge table when numEntries gets
410 * to be this large. */
411 int downShift; /* Shift count used in hashing
412 * function. Designed to use high-
413 * order bits of randomized keys. */
414 int mask; /* Mask value used in hashing
416 int keyType; /* Type of keys used in this table.
417 * It's either TCL_STRING_KEYS,
418 * TCL_ONE_WORD_KEYS, or an integer
419 * giving the number of ints in a
421 Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
423 Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
424 char *key, int *newPtr));
428 * Structure definition for information used to keep track of searches
429 * through hash tables:
432 typedef struct Tcl_HashSearch {
433 Tcl_HashTable *tablePtr; /* Table being searched. */
434 int nextIndex; /* Index of next bucket to be
435 * enumerated after present one. */
436 Tcl_HashEntry *nextEntryPtr; /* Next entry to be enumerated in the
437 * the current bucket. */
441 * Acceptable key types for hash tables:
444 #define TCL_STRING_KEYS 0
445 #define TCL_ONE_WORD_KEYS 1
448 * Macros for clients to use to access fields of hash entries:
451 #define Tcl_GetHashValue(h) ((h)->clientData)
452 #define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
453 #define Tcl_GetHashKey(tablePtr, h) \
454 ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
458 * Macros to use for clients to use to invoke find and create procedures
462 #define Tcl_FindHashEntry(tablePtr, key) \
463 (*((tablePtr)->findProc))(tablePtr, key)
464 #define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
465 (*((tablePtr)->createProc))(tablePtr, key, newPtr)
468 * Exported Tcl variables:
471 EXTERN int tcl_AsyncReady;
472 EXTERN void (*tcl_FileCloseProc) _ANSI_ARGS_((FILE *f));
473 EXTERN char * tcl_RcFileName;
476 * Exported Tcl procedures:
479 EXTERN void Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
481 EXTERN void Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
482 EXTERN void Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
484 EXTERN void Tcl_AppendResult _ANSI_ARGS_(
485 VARARGS(Tcl_Interp *interp));
486 EXTERN int Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
487 EXTERN void Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
488 EXTERN Tcl_AsyncHandler Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
489 ClientData clientData));
490 EXTERN void Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
491 EXTERN int Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
493 EXTERN char Tcl_Backslash _ANSI_ARGS_((char *src,
495 EXTERN void Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
496 Tcl_InterpDeleteProc *proc,
497 ClientData clientData));
498 EXTERN int Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
499 EXTERN char * Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
500 EXTERN int Tcl_ConvertElement _ANSI_ARGS_((char *src,
501 char *dst, int flags));
502 EXTERN Tcl_Command Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
503 char *cmdName, Tcl_CmdProc *proc,
504 ClientData clientData,
505 Tcl_CmdDeleteProc *deleteProc));
506 EXTERN Tcl_Interp * Tcl_CreateInterp _ANSI_ARGS_((void));
507 EXTERN void Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
508 char *name, int numArgs, Tcl_ValueType *argTypes,
509 Tcl_MathProc *proc, ClientData clientData));
510 EXTERN int Tcl_CreatePipeline _ANSI_ARGS_((Tcl_Interp *interp,
511 int argc, char **argv, int **pidArrayPtr,
512 int *inPipePtr, int *outPipePtr,
514 EXTERN Tcl_Trace Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
515 int level, Tcl_CmdTraceProc *proc,
516 ClientData clientData));
517 EXTERN int Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
519 EXTERN void Tcl_DeleteHashEntry _ANSI_ARGS_((
520 Tcl_HashEntry *entryPtr));
521 EXTERN void Tcl_DeleteHashTable _ANSI_ARGS_((
522 Tcl_HashTable *tablePtr));
523 EXTERN void Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
524 EXTERN void Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
526 EXTERN void Tcl_DetachPids _ANSI_ARGS_((int numPids, int *pidPtr));
527 EXTERN void Tcl_DontCallWhenDeleted _ANSI_ARGS_((
528 Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
529 ClientData clientData));
530 EXTERN char * Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
531 char *string, int length));
532 EXTERN char * Tcl_DStringAppendElement _ANSI_ARGS_((
533 Tcl_DString *dsPtr, char *string));
534 EXTERN void Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
535 EXTERN void Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
536 EXTERN void Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
537 Tcl_DString *dsPtr));
538 EXTERN void Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
539 EXTERN void Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
540 Tcl_DString *dsPtr));
541 EXTERN void Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
543 EXTERN void Tcl_DStringStartSublist _ANSI_ARGS_((
544 Tcl_DString *dsPtr));
545 EXTERN void Tcl_EnterFile _ANSI_ARGS_((Tcl_Interp *interp,
546 FILE *file, int permissions));
547 EXTERN char * Tcl_ErrnoId _ANSI_ARGS_((void));
548 EXTERN int Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp, char *cmd));
549 EXTERN int Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
551 EXTERN int Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
552 char *string, int *ptr));
553 EXTERN int Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
554 char *string, double *ptr));
555 EXTERN int Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
556 char *string, long *ptr));
557 EXTERN int Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
559 EXTERN int Tcl_FilePermissions _ANSI_ARGS_((FILE *file));
560 EXTERN Tcl_HashEntry * Tcl_FirstHashEntry _ANSI_ARGS_((
561 Tcl_HashTable *tablePtr,
562 Tcl_HashSearch *searchPtr));
563 EXTERN int Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
564 char *string, int *boolPtr));
565 EXTERN int Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
566 char *cmdName, Tcl_CmdInfo *infoPtr));
567 EXTERN char * Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
568 Tcl_Command command));
569 EXTERN int Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
570 char *string, double *doublePtr));
571 EXTERN int Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
572 char *string, int *intPtr));
573 EXTERN int Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
574 char *string, int write, int checkUsage,
576 EXTERN char * Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
577 char *varName, int flags));
578 EXTERN char * Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
579 char *part1, char *part2, int flags));
580 EXTERN int Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
582 EXTERN char * Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
583 EXTERN int Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
584 EXTERN void Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
586 EXTERN void Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
587 EXTERN int Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
588 char *varName, char *addr, int type));
589 EXTERN void Tcl_Main _ANSI_ARGS_((int argc, char **argv,
590 Tcl_AppInitProc *appInitProc));
591 EXTERN char * Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
592 EXTERN Tcl_HashEntry * Tcl_NextHashEntry _ANSI_ARGS_((
593 Tcl_HashSearch *searchPtr));
594 EXTERN char * Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
595 char *string, char **termPtr));
596 EXTERN char * Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
597 EXTERN void Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
598 double value, char *dst));
599 EXTERN void Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
600 EXTERN int Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
601 char *cmd, int flags));
602 EXTERN Tcl_RegExp Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
604 EXTERN int Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
605 Tcl_RegExp regexp, char *string, char *start));
606 EXTERN int Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
607 char *string, char *pattern));
608 EXTERN void Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
609 int index, char **startPtr, char **endPtr));
610 EXTERN void Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
611 #define Tcl_Return Tcl_SetResult
612 EXTERN int Tcl_ScanElement _ANSI_ARGS_((char *string,
614 EXTERN int Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
615 char *cmdName, Tcl_CmdInfo *infoPtr));
616 EXTERN void Tcl_SetErrorCode _ANSI_ARGS_(
617 VARARGS(Tcl_Interp *interp));
618 EXTERN int Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
620 EXTERN void Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
621 char *string, Tcl_FreeProc *freeProc));
622 EXTERN char * Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
623 char *varName, char *newValue, int flags));
624 EXTERN char * Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
625 char *part1, char *part2, char *newValue,
627 EXTERN char * Tcl_SignalId _ANSI_ARGS_((int sig));
628 EXTERN char * Tcl_SignalMsg _ANSI_ARGS_((int sig));
629 EXTERN int Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
630 char *list, int *argcPtr, char ***argvPtr));
631 EXTERN int Tcl_StringMatch _ANSI_ARGS_((char *string,
633 EXTERN char * Tcl_TildeSubst _ANSI_ARGS_((Tcl_Interp *interp,
634 char *name, Tcl_DString *bufferPtr));
635 EXTERN int Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
636 char *varName, int flags, Tcl_VarTraceProc *proc,
637 ClientData clientData));
638 EXTERN int Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
639 char *part1, char *part2, int flags,
640 Tcl_VarTraceProc *proc, ClientData clientData));
641 EXTERN void Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
643 EXTERN int Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
644 char *varName, int flags));
645 EXTERN int Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
646 char *part1, char *part2, int flags));
647 EXTERN void Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
648 char *varName, int flags, Tcl_VarTraceProc *proc,
649 ClientData clientData));
650 EXTERN void Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
651 char *part1, char *part2, int flags,
652 Tcl_VarTraceProc *proc, ClientData clientData));
653 EXTERN int Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
654 char *frameName, char *varName,
655 char *localName, int flags));
656 EXTERN int Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
657 char *frameName, char *part1, char *part2,
658 char *localName, int flags));
659 EXTERN int Tcl_VarEval _ANSI_ARGS_(VARARGS(Tcl_Interp *interp));
660 EXTERN ClientData Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
661 char *varName, int flags,
662 Tcl_VarTraceProc *procPtr,
663 ClientData prevClientData));
664 EXTERN ClientData Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
665 char *part1, char *part2, int flags,
666 Tcl_VarTraceProc *procPtr,
667 ClientData prevClientData));