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-1997 Sun Microsystems, Inc.
9 * Copyright (c) 1993-1996 Lucent Technologies.
10 *
11 * See the file "license.terms" for information on usage and redistribution
12 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 *
14 * SCCS: @(#) tcl.h 1.318 97/06/26 13:43:02
15 */
16
17#ifndef _TCL
18#define _TCL
19
20/*
21 * When version numbers change here, must also go into the following files
22 * and update the version numbers:
23 *
24 * library/init.tcl
25 * unix/configure.in
26 * unix/pkginfo
27 * win/makefile.bc
28 * win/makefile.vc
29 *
30 * The release level should be  0 for alpha, 1 for beta, and 2 for
31 * final/patch.  The release serial value is the number that follows the
32 * "a", "b", or "p" in the patch level; for example, if the patch level
33 * is 7.6b2, TCL_RELEASE_SERIAL is 2.  It restarts at 1 whenever the
34 * release level is changed, except for the final release which is 0
35 * (the first patch will start at 1).
36 */
37
38#define TCL_MAJOR_VERSION   8
39#define TCL_MINOR_VERSION   0
40#define TCL_RELEASE_LEVEL   1
41#define TCL_RELEASE_SERIAL  2
42
43#define TCL_VERSION	    "8.0"
44#define TCL_PATCH_LEVEL	    "8.0b2"
45
46/*
47 * The following definitions set up the proper options for Windows
48 * compilers.  We use this method because there is no autoconf equivalent.
49 */
50
51#ifndef __WIN32__
52#   if defined(_WIN32) || defined(WIN32)
53#	define __WIN32__
54#   endif
55#endif
56
57#ifdef __WIN32__
58#   ifndef STRICT
59#	define STRICT
60#   endif
61#   ifndef USE_PROTOTYPE
62#	define USE_PROTOTYPE 1
63#   endif
64#   ifndef HAS_STDARG
65#	define HAS_STDARG 1
66#   endif
67#   ifndef USE_PROTOTYPE
68#	define USE_PROTOTYPE 1
69#   endif
70#   ifndef USE_TCLALLOC
71#	define USE_TCLALLOC 1
72#   endif
73#   ifndef STRINGIFY
74#	define STRINGIFY(x)	    STRINGIFY1(x)
75#	define STRINGIFY1(x)	    #x
76#   endif
77#endif /* __WIN32__ */
78
79/*
80 * The following definitions set up the proper options for Macintosh
81 * compilers.  We use this method because there is no autoconf equivalent.
82 */
83
84#ifdef MAC_TCL
85#   ifndef HAS_STDARG
86#	define HAS_STDARG 1
87#   endif
88#   ifndef USE_TCLALLOC
89#	define USE_TCLALLOC 1
90#   endif
91#   ifndef NO_STRERROR
92#	define NO_STRERROR 1
93#   endif
94#endif
95
96/*
97 * A special definition used to allow this header file to be included
98 * in resource files so that they can get obtain version information from
99 * this file.  Resource compilers don't like all the C stuff, like typedefs
100 * and procedure declarations, that occur below.
101 */
102
103#ifndef RESOURCE_INCLUDED
104
105#ifndef BUFSIZ
106#include <stdio.h>
107#endif
108
109/*
110 * Definitions that allow Tcl functions with variable numbers of
111 * arguments to be used with either varargs.h or stdarg.h.  TCL_VARARGS
112 * is used in procedure prototypes.  TCL_VARARGS_DEF is used to declare
113 * the arguments in a function definiton: it takes the type and name of
114 * the first argument and supplies the appropriate argument declaration
115 * string for use in the function definition.  TCL_VARARGS_START
116 * initializes the va_list data structure and returns the first argument.
117 */
118
119#if defined(__STDC__) || defined(HAS_STDARG)
120#   define TCL_VARARGS(type, name) (type name, ...)
121#   define TCL_VARARGS_DEF(type, name) (type name, ...)
122#   define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
123#else
124#   ifdef __cplusplus
125#	define TCL_VARARGS(type, name) (type name, ...)
126#	define TCL_VARARGS_DEF(type, name) (type va_alist, ...)
127#   else
128#	define TCL_VARARGS(type, name) ()
129#	define TCL_VARARGS_DEF(type, name) (va_alist)
130#   endif
131#   define TCL_VARARGS_START(type, name, list) \
132	(va_start(list), va_arg(list, type))
133#endif
134
135/*
136 * Definitions that allow this header file to be used either with or
137 * without ANSI C features like function prototypes.
138 */
139
140#undef _ANSI_ARGS_
141#undef CONST
142
143#if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) || defined(USE_PROTOTYPE)
144#   define _USING_PROTOTYPES_ 1
145#   define _ANSI_ARGS_(x)	x
146#   define CONST const
147#else
148#   define _ANSI_ARGS_(x)	()
149#   define CONST
150#endif
151
152#ifdef __cplusplus
153#   define EXTERN extern "C"
154#else
155#   define EXTERN extern
156#endif
157
158/*
159 * Macro to use instead of "void" for arguments that must have
160 * type "void *" in ANSI C;  maps them to type "char *" in
161 * non-ANSI systems.
162 */
163#ifndef __WIN32__
164#ifndef VOID
165#   ifdef __STDC__
166#       define VOID void
167#   else
168#       define VOID char
169#   endif
170#endif
171#else /* __WIN32__ */
172/*
173 * The following code is copied from winnt.h
174 */
175#ifndef VOID
176#define VOID void
177typedef char CHAR;
178typedef short SHORT;
179typedef long LONG;
180#endif
181#endif /* __WIN32__ */
182
183/*
184 * Miscellaneous declarations.
185 */
186
187#ifndef NULL
188#define NULL 0
189#endif
190
191#ifndef _CLIENTDATA
192#   if defined(__STDC__) || defined(__cplusplus)
193    typedef void *ClientData;
194#   else
195    typedef int *ClientData;
196#   endif /* __STDC__ */
197#define _CLIENTDATA
198#endif
199
200/*
201 * Data structures defined opaquely in this module. The definitions below
202 * just provide dummy types. A few fields are made visible in Tcl_Interp
203 * structures, namely those used for returning a string result from
204 * commands. Direct access to the result field is discouraged in Tcl 8.0.
205 * The interpreter result is either an object or a string, and the two
206 * values are kept consistent unless some C code sets interp->result
207 * directly. Programmers should use either the procedure Tcl_GetObjResult()
208 * or Tcl_GetStringResult() to read the interpreter's result. See the
209 * SetResult man page for details.
210 *
211 * Note: any change to the Tcl_Interp definition below must be mirrored
212 * in the "real" definition in tclInt.h.
213 *
214 * Note: Tcl_ObjCmdProc procedures do not directly set result and freeProc.
215 * Instead, they set a Tcl_Obj member in the "real" structure that can be
216 * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
217 */
218
219typedef struct Tcl_Interp {
220    char *result;		/* If the last command returned a string
221				 * result, this points to it. */
222    void (*freeProc) _ANSI_ARGS_((char *blockPtr));
223				/* Zero means the string result is
224				 * statically allocated. TCL_DYNAMIC means
225				 * it was allocated with ckalloc and should
226				 * be freed with ckfree. Other values give
227				 * the address of procedure to invoke to
228				 * free the result. Tcl_Eval must free it
229				 * before executing next command. */
230    int errorLine;              /* When TCL_ERROR is returned, this gives
231                                 * the line number within the command where
232                                 * the error occurred (1 if first line). */
233} Tcl_Interp;
234
235typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
236typedef struct Tcl_Channel_ *Tcl_Channel;
237typedef struct Tcl_Command_ *Tcl_Command;
238typedef struct Tcl_Event Tcl_Event;
239typedef struct Tcl_Pid_ *Tcl_Pid;
240typedef struct Tcl_RegExp_ *Tcl_RegExp;
241typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
242typedef struct Tcl_Trace_ *Tcl_Trace;
243typedef struct Tcl_Var_ *Tcl_Var;
244
245/*
246 * When a TCL command returns, the interpreter contains a result from the
247 * command. Programmers are strongly encouraged to use one of the
248 * procedures Tcl_GetObjResult() or Tcl_GetStringResult() to read the
249 * interpreter's result. See the SetResult man page for details. Besides
250 * this result, the command procedure returns an integer code, which is
251 * one of the following:
252 *
253 * TCL_OK		Command completed normally; the interpreter's
254 *			result contains	the command's result.
255 * TCL_ERROR		The command couldn't be completed successfully;
256 *			the interpreter's result describes what went wrong.
257 * TCL_RETURN		The command requests that the current procedure
258 *			return; the interpreter's result contains the
259 *			procedure's return value.
260 * TCL_BREAK		The command requests that the innermost loop
261 *			be exited; the interpreter's result is meaningless.
262 * TCL_CONTINUE		Go on to the next iteration of the current loop;
263 *			the interpreter's result is meaningless.
264 */
265
266#define TCL_OK		0
267#define TCL_ERROR	1
268#define TCL_RETURN	2
269#define TCL_BREAK	3
270#define TCL_CONTINUE	4
271
272#define TCL_RESULT_SIZE 200
273
274/*
275 * Argument descriptors for math function callbacks in expressions:
276 */
277
278typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
279typedef struct Tcl_Value {
280    Tcl_ValueType type;		/* Indicates intValue or doubleValue is
281				 * valid, or both. */
282    long intValue;		/* Integer value. */
283    double doubleValue;		/* Double-precision floating value. */
284} Tcl_Value;
285
286/*
287 * Forward declaration of Tcl_Obj to prevent an error when the forward
288 * reference to Tcl_Obj is encountered in the procedure types declared
289 * below.
290 */
291
292struct Tcl_Obj;
293
294/*
295 * Procedure types defined by Tcl:
296 */
297
298typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
299typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
300	Tcl_Interp *interp, int code));
301typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask));
302typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
303typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
304typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
305	Tcl_Interp *interp, int argc, char *argv[]));
306typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
307	Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
308	ClientData cmdClientData, int argc, char *argv[]));
309typedef void (Tcl_DupInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *srcPtr,
310        struct Tcl_Obj *dupPtr));
311typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags));
312typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData,
313	int flags));
314typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr,
315        ClientData clientData));
316typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData,
317	int flags));
318typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData));
319typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask));
320typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData));
321typedef void (Tcl_FreeInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
322typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
323typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData));
324typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
325	Tcl_Interp *interp));
326typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
327	Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
328typedef void (Tcl_NamespaceDeleteProc) _ANSI_ARGS_((ClientData clientData));
329typedef int (Tcl_ObjCmdProc) _ANSI_ARGS_((ClientData clientData,
330	Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST objv[]));
331typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
332typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData,
333        Tcl_Channel chan, char *address, int port));
334typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData));
335typedef int (Tcl_SetFromAnyProc) _ANSI_ARGS_((Tcl_Interp *interp,
336	struct Tcl_Obj *objPtr));
337typedef void (Tcl_UpdateStringProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
338typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
339	Tcl_Interp *interp, char *part1, char *part2, int flags));
340
341/*
342 * The following structure represents a type of object, which is a
343 * particular internal representation for an object plus a set of
344 * procedures that provide standard operations on objects of that type.
345 */
346
347typedef struct Tcl_ObjType {
348    char *name;			/* Name of the type, e.g. "int". */
349    Tcl_FreeInternalRepProc *freeIntRepProc;
350				/* Called to free any storage for the type's
351				 * internal rep. NULL if the internal rep
352				 * does not need freeing. */
353    Tcl_DupInternalRepProc *dupIntRepProc;
354    				/* Called to create a new object as a copy
355				 * of an existing object. */
356    Tcl_UpdateStringProc *updateStringProc;
357    				/* Called to update the string rep from the
358				 * type's internal representation. */
359    Tcl_SetFromAnyProc *setFromAnyProc;
360    				/* Called to convert the object's internal
361				 * rep to this type. Frees the internal rep
362				 * of the old type. Returns TCL_ERROR on
363				 * failure. */
364} Tcl_ObjType;
365
366/*
367 * One of the following structures exists for each object in the Tcl
368 * system. An object stores a value as either a string, some internal
369 * representation, or both.
370 */
371
372typedef struct Tcl_Obj {
373    int refCount;		/* When 0 the object will be freed. */
374    char *bytes;		/* This points to the first byte of the
375				 * object's string representation. The array
376				 * must be followed by a null byte (i.e., at
377				 * offset length) but may also contain
378				 * embedded null characters. The array's
379				 * storage is allocated by ckalloc. NULL
380				 * means the string rep is invalid and must
381				 * be regenerated from the internal rep.
382				 * Clients should use Tcl_GetStringFromObj
383				 * to get a pointer to the byte array as a
384				 * readonly value. */
385    int length;			/* The number of bytes at *bytes, not
386				 * including the terminating null. */
387    Tcl_ObjType *typePtr;	/* Denotes the object's type. Always
388				 * corresponds to the type of the object's
389				 * internal rep. NULL indicates the object
390				 * has no internal rep (has no type). */
391    union {			/* The internal representation: */
392	long longValue;		/*   - an long integer value */
393	double doubleValue;	/*   - a double-precision floating value */
394	VOID *otherValuePtr;	/*   - another, type-specific value */
395	struct {		/*   - internal rep as two pointers */
396	    VOID *ptr1;
397	    VOID *ptr2;
398	} twoPtrValue;
399    } internalRep;
400} Tcl_Obj;
401
402/*
403 * Macros to increment and decrement a Tcl_Obj's reference count, and to
404 * test whether an object is shared (i.e. has reference count > 1).
405 * Note: clients should use Tcl_DecrRefCount() when they are finished using
406 * an object, and should never call TclFreeObj() directly. TclFreeObj() is
407 * only defined and made public in tcl.h to support Tcl_DecrRefCount's macro
408 * definition. Note also that Tcl_DecrRefCount() refers to the parameter
409 * "obj" twice. This means that you should avoid calling it with an
410 * expression that is expensive to compute or has side effects.
411 */
412
413#define Tcl_IncrRefCount(objPtr) \
414    ++(objPtr)->refCount
415#define Tcl_DecrRefCount(objPtr) \
416    if (--(objPtr)->refCount <= 0) TclFreeObj(objPtr)
417#define Tcl_IsShared(objPtr) \
418    ((objPtr)->refCount > 1)
419
420/*
421 * Macros and definitions that help to debug the use of Tcl objects.
422 * When TCL_MEM_DEBUG is defined, the Tcl_New* declarations are
423 * overridden to call debugging versions of the object creation procedures.
424 */
425
426EXTERN Tcl_Obj *	Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));
427EXTERN Tcl_Obj *	Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));
428EXTERN Tcl_Obj *	Tcl_NewIntObj _ANSI_ARGS_((int intValue));
429EXTERN Tcl_Obj *	Tcl_NewListObj _ANSI_ARGS_((int objc,
430			    Tcl_Obj *CONST objv[]));
431EXTERN Tcl_Obj *	Tcl_NewLongObj _ANSI_ARGS_((long longValue));
432EXTERN Tcl_Obj *	Tcl_NewObj _ANSI_ARGS_((void));
433EXTERN Tcl_Obj *	Tcl_NewStringObj _ANSI_ARGS_((char *bytes,
434			    int length));
435
436#ifdef TCL_MEM_DEBUG
437#  define Tcl_NewBooleanObj(val) \
438     Tcl_DbNewBooleanObj(val, __FILE__, __LINE__)
439#  define Tcl_NewDoubleObj(val) \
440     Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)
441#  define Tcl_NewIntObj(val) \
442     Tcl_DbNewLongObj(val, __FILE__, __LINE__)
443#  define Tcl_NewListObj(objc, objv) \
444     Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__)
445#  define Tcl_NewLongObj(val) \
446     Tcl_DbNewLongObj(val, __FILE__, __LINE__)
447#  define Tcl_NewObj() \
448     Tcl_DbNewObj(__FILE__, __LINE__)
449#  define Tcl_NewStringObj(bytes, len) \
450     Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__)
451#endif /* TCL_MEM_DEBUG */
452
453/*
454 * The following definitions support Tcl's namespace facility.
455 * Note: the first five fields must match exactly the fields in a
456 * Namespace structure (see tcl.h).
457 */
458
459typedef struct Tcl_Namespace {
460    char *name;                 /* The namespace's name within its parent
461				 * namespace. This contains no ::'s. The
462				 * name of the global namespace is ""
463				 * although "::" is an synonym. */
464    char *fullName;             /* The namespace's fully qualified name.
465				 * This starts with ::. */
466    ClientData clientData;      /* Arbitrary value associated with this
467				 * namespace. */
468    Tcl_NamespaceDeleteProc* deleteProc;
469                                /* Procedure invoked when deleting the
470				 * namespace to, e.g., free clientData. */
471    struct Tcl_Namespace* parentPtr;
472                                /* Points to the namespace that contains
473				 * this one. NULL if this is the global
474				 * namespace. */
475} Tcl_Namespace;
476
477/*
478 * The following structure represents a call frame, or activation record.
479 * A call frame defines a naming context for a procedure call: its local
480 * scope (for local variables) and its namespace scope (used for non-local
481 * variables; often the global :: namespace). A call frame can also define
482 * the naming context for a namespace eval or namespace inscope command:
483 * the namespace in which the command's code should execute. The
484 * Tcl_CallFrame structures exist only while procedures or namespace
485 * eval/inscope's are being executed, and provide a Tcl call stack.
486 *
487 * A call frame is initialized and pushed using Tcl_PushCallFrame and
488 * popped using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be
489 * provided by the Tcl_PushCallFrame caller, and callers typically allocate
490 * them on the C call stack for efficiency. For this reason, Tcl_CallFrame
491 * is defined as a structure and not as an opaque token. However, most
492 * Tcl_CallFrame fields are hidden since applications should not access
493 * them directly; others are declared as "dummyX".
494 *
495 * WARNING!! The structure definition must be kept consistent with the
496 * CallFrame structure in tclInt.h. If you change one, change the other.
497 */
498
499typedef struct Tcl_CallFrame {
500    Tcl_Namespace *nsPtr;
501    int dummy1;
502    int dummy2;
503    char *dummy3;
504    char *dummy4;
505    char *dummy5;
506    int dummy6;
507    char *dummy7;
508    char *dummy8;
509    int dummy9;
510    char* dummy10;
511} Tcl_CallFrame;
512
513/*
514 * Information about commands that is returned by Tcl_GetCmdInfo and passed
515 * to Tcl_SetCmdInfo. objProc is an objc/objv object-based command procedure
516 * while proc is a traditional Tcl argc/argv string-based procedure.
517 * Tcl_CreateObjCommand and Tcl_CreateCommand ensure that both objProc and
518 * proc are non-NULL and can be called to execute the command. However,
519 * it may be faster to call one instead of the other. The member
520 * isNativeObjectProc is set to 1 if an object-based procedure was
521 * registered by Tcl_CreateObjCommand, and to 0 if a string-based procedure
522 * was registered by Tcl_CreateCommand. The other procedure is typically set
523 * to a compatibility wrapper that does string-to-object or object-to-string
524 * argument conversions then calls the other procedure.
525 */
526
527typedef struct Tcl_CmdInfo {
528    int isNativeObjectProc;	 /* 1 if objProc was registered by a call to
529				  * Tcl_CreateObjCommand; 0 otherwise.
530				  * Tcl_SetCmdInfo does not modify this
531				  * field. */
532    Tcl_ObjCmdProc *objProc;	 /* Command's object-based procedure. */
533    ClientData objClientData;	 /* ClientData for object proc. */
534    Tcl_CmdProc *proc;		 /* Command's string-based procedure. */
535    ClientData clientData;	 /* ClientData for string proc. */
536    Tcl_CmdDeleteProc *deleteProc;
537                                 /* Procedure to call when command is
538                                  * deleted. */
539    ClientData deleteData;	 /* Value to pass to deleteProc (usually
540				  * the same as clientData). */
541    Tcl_Namespace *namespacePtr; /* Points to the namespace that contains
542				  * this command. Note that Tcl_SetCmdInfo
543				  * will not change a command's namespace;
544				  * use Tcl_RenameCommand to do that. */
545
546} Tcl_CmdInfo;
547
548/*
549 * The structure defined below is used to hold dynamic strings.  The only
550 * field that clients should use is the string field, and they should
551 * never modify it.
552 */
553
554#define TCL_DSTRING_STATIC_SIZE 200
555typedef struct Tcl_DString {
556    char *string;		/* Points to beginning of string:  either
557				 * staticSpace below or a malloced array. */
558    int length;			/* Number of non-NULL characters in the
559				 * string. */
560    int spaceAvl;		/* Total number of bytes available for the
561				 * string and its terminating NULL char. */
562    char staticSpace[TCL_DSTRING_STATIC_SIZE];
563				/* Space to use in common case where string
564				 * is small. */
565} Tcl_DString;
566
567#define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
568#define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
569#define Tcl_DStringTrunc Tcl_DStringSetLength
570
571/*
572 * Definitions for the maximum number of digits of precision that may
573 * be specified in the "tcl_precision" variable, and the number of
574 * characters of buffer space required by Tcl_PrintDouble.
575 */
576
577#define TCL_MAX_PREC 17
578#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
579
580/*
581 * Flag that may be passed to Tcl_ConvertElement to force it not to
582 * output braces (careful!  if you change this flag be sure to change
583 * the definitions at the front of tclUtil.c).
584 */
585
586#define TCL_DONT_USE_BRACES	1
587
588/*
589 * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
590 * abbreviated strings.
591 */
592
593#define TCL_EXACT	1
594
595/*
596 * Flag values passed to Tcl_RecordAndEval.
597 * WARNING: these bit choices must not conflict with the bit choices
598 * for evalFlag bits in tclInt.h!!
599 */
600
601#define TCL_NO_EVAL		0x10000
602#define TCL_EVAL_GLOBAL		0x20000
603
604/*
605 * Special freeProc values that may be passed to Tcl_SetResult (see
606 * the man page for details):
607 */
608
609#define TCL_VOLATILE	((Tcl_FreeProc *) 1)
610#define TCL_STATIC	((Tcl_FreeProc *) 0)
611#define TCL_DYNAMIC	((Tcl_FreeProc *) 3)
612
613/*
614 * Flag values passed to variable-related procedures.
615 */
616
617#define TCL_GLOBAL_ONLY		 1
618#define TCL_NAMESPACE_ONLY	 2
619#define TCL_APPEND_VALUE	 4
620#define TCL_LIST_ELEMENT	 8
621#define TCL_TRACE_READS		 0x10
622#define TCL_TRACE_WRITES	 0x20
623#define TCL_TRACE_UNSETS	 0x40
624#define TCL_TRACE_DESTROYED	 0x80
625#define TCL_INTERP_DESTROYED	 0x100
626#define TCL_LEAVE_ERR_MSG	 0x200
627#define TCL_PARSE_PART1		 0x400
628
629/*
630 * Types for linked variables:
631 */
632
633#define TCL_LINK_INT		1
634#define TCL_LINK_DOUBLE		2
635#define TCL_LINK_BOOLEAN	3
636#define TCL_LINK_STRING		4
637#define TCL_LINK_READ_ONLY	0x80
638
639/*
640 * The following declarations either map ckalloc and ckfree to
641 * malloc and free, or they map them to procedures with all sorts
642 * of debugging hooks defined in tclCkalloc.c.
643 */
644
645EXTERN char *		Tcl_Alloc _ANSI_ARGS_((unsigned int size));
646EXTERN void		Tcl_Free _ANSI_ARGS_((char *ptr));
647EXTERN char *		Tcl_Realloc _ANSI_ARGS_((char *ptr,
648			    unsigned int size));
649
650#ifdef TCL_MEM_DEBUG
651
652#  define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
653#  define Tcl_Free(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
654#  define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
655#  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
656#  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
657#  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
658
659EXTERN int		Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
660EXTERN void		Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
661			    int line));
662
663#else
664
665#  if USE_TCLALLOC
666#     define ckalloc(x) Tcl_Alloc(x)
667#     define ckfree(x) Tcl_Free(x)
668#     define ckrealloc(x,y) Tcl_Realloc(x,y)
669#  else
670#     define ckalloc(x) malloc(x)
671#     define ckfree(x)  free(x)
672#     define ckrealloc(x,y) realloc(x,y)
673#  endif
674#  define Tcl_DumpActiveMemory(x)
675#  define Tcl_ValidateAllMemory(x,y)
676
677#endif /* TCL_MEM_DEBUG */
678
679/*
680 * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers
681 * to prevent errors when the forward reference to Tcl_HashTable is
682 * encountered in the Tcl_HashEntry structure.
683 */
684
685#ifdef __cplusplus
686struct Tcl_HashTable;
687#endif
688
689/*
690 * Structure definition for an entry in a hash table.  No-one outside
691 * Tcl should access any of these fields directly;  use the macros
692 * defined below.
693 */
694
695typedef struct Tcl_HashEntry {
696    struct Tcl_HashEntry *nextPtr;	/* Pointer to next entry in this
697					 * hash bucket, or NULL for end of
698					 * chain. */
699    struct Tcl_HashTable *tablePtr;	/* Pointer to table containing entry. */
700    struct Tcl_HashEntry **bucketPtr;	/* Pointer to bucket that points to
701					 * first entry in this entry's chain:
702					 * used for deleting the entry. */
703    ClientData clientData;		/* Application stores something here
704					 * with Tcl_SetHashValue. */
705    union {				/* Key has one of these forms: */
706	char *oneWordValue;		/* One-word value for key. */
707	int words[1];			/* Multiple integer words for key.
708					 * The actual size will be as large
709					 * as necessary for this table's
710					 * keys. */
711	char string[4];			/* String for key.  The actual size
712					 * will be as large as needed to hold
713					 * the key. */
714    } key;				/* MUST BE LAST FIELD IN RECORD!! */
715} Tcl_HashEntry;
716
717/*
718 * Structure definition for a hash table.  Must be in tcl.h so clients
719 * can allocate space for these structures, but clients should never
720 * access any fields in this structure.
721 */
722
723#define TCL_SMALL_HASH_TABLE 4
724typedef struct Tcl_HashTable {
725    Tcl_HashEntry **buckets;		/* Pointer to bucket array.  Each
726					 * element points to first entry in
727					 * bucket's hash chain, or NULL. */
728    Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
729					/* Bucket array used for small tables
730					 * (to avoid mallocs and frees). */
731    int numBuckets;			/* Total number of buckets allocated
732					 * at **bucketPtr. */
733    int numEntries;			/* Total number of entries present
734					 * in table. */
735    int rebuildSize;			/* Enlarge table when numEntries gets
736					 * to be this large. */
737    int downShift;			/* Shift count used in hashing
738					 * function.  Designed to use high-
739					 * order bits of randomized keys. */
740    int mask;				/* Mask value used in hashing
741					 * function. */
742    int keyType;			/* Type of keys used in this table.
743					 * It's either TCL_STRING_KEYS,
744					 * TCL_ONE_WORD_KEYS, or an integer
745					 * giving the number of ints that
746                                         * is the size of the key.
747					 */
748    Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
749	    CONST char *key));
750    Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
751	    CONST char *key, int *newPtr));
752} Tcl_HashTable;
753
754/*
755 * Structure definition for information used to keep track of searches
756 * through hash tables:
757 */
758
759typedef struct Tcl_HashSearch {
760    Tcl_HashTable *tablePtr;		/* Table being searched. */
761    int nextIndex;			/* Index of next bucket to be
762					 * enumerated after present one. */
763    Tcl_HashEntry *nextEntryPtr;	/* Next entry to be enumerated in the
764					 * the current bucket. */
765} Tcl_HashSearch;
766
767/*
768 * Acceptable key types for hash tables:
769 */
770
771#define TCL_STRING_KEYS		0
772#define TCL_ONE_WORD_KEYS	1
773
774/*
775 * Macros for clients to use to access fields of hash entries:
776 */
777
778#define Tcl_GetHashValue(h) ((h)->clientData)
779#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
780#define Tcl_GetHashKey(tablePtr, h) \
781    ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
782						: (h)->key.string))
783
784/*
785 * Macros to use for clients to use to invoke find and create procedures
786 * for hash tables:
787 */
788
789#define Tcl_FindHashEntry(tablePtr, key) \
790	(*((tablePtr)->findProc))(tablePtr, key)
791#define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
792	(*((tablePtr)->createProc))(tablePtr, key, newPtr)
793
794/*
795 * Flag values to pass to Tcl_DoOneEvent to disable searches
796 * for some kinds of events:
797 */
798
799#define TCL_DONT_WAIT		(1<<1)
800#define TCL_WINDOW_EVENTS	(1<<2)
801#define TCL_FILE_EVENTS		(1<<3)
802#define TCL_TIMER_EVENTS	(1<<4)
803#define TCL_IDLE_EVENTS		(1<<5)	/* WAS 0x10 ???? */
804#define TCL_ALL_EVENTS		(~TCL_DONT_WAIT)
805
806/*
807 * The following structure defines a generic event for the Tcl event
808 * system.  These are the things that are queued in calls to Tcl_QueueEvent
809 * and serviced later by Tcl_DoOneEvent.  There can be many different
810 * kinds of events with different fields, corresponding to window events,
811 * timer events, etc.  The structure for a particular event consists of
812 * a Tcl_Event header followed by additional information specific to that
813 * event.
814 */
815
816struct Tcl_Event {
817    Tcl_EventProc *proc;	/* Procedure to call to service this event. */
818    struct Tcl_Event *nextPtr;	/* Next in list of pending events, or NULL. */
819};
820
821/*
822 * Positions to pass to Tcl_QueueEvent:
823 */
824
825typedef enum {
826    TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
827} Tcl_QueuePosition;
828
829/*
830 * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
831 * event routines.
832 */
833
834#define TCL_SERVICE_NONE 0
835#define TCL_SERVICE_ALL 1
836
837/*
838 * The following structure keeps is used to hold a time value, either as
839 * an absolute time (the number of seconds from the epoch) or as an
840 * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
841 * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT.
842 */
843
844typedef struct Tcl_Time {
845    long sec;			/* Seconds. */
846    long usec;			/* Microseconds. */
847} Tcl_Time;
848
849/*
850 * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler
851 * to indicate what sorts of events are of interest:
852 */
853
854#define TCL_READABLE	(1<<1)
855#define TCL_WRITABLE	(1<<2)
856#define TCL_EXCEPTION	(1<<3)
857
858/*
859 * Flag values to pass to Tcl_OpenCommandChannel to indicate the
860 * disposition of the stdio handles.  TCL_STDIN, TCL_STDOUT, TCL_STDERR,
861 * are also used in Tcl_GetStdChannel.
862 */
863
864#define TCL_STDIN		(1<<1)
865#define TCL_STDOUT		(1<<2)
866#define TCL_STDERR		(1<<3)
867#define TCL_ENFORCE_MODE	(1<<4)
868
869/*
870 * Typedefs for the various operations in a channel type:
871 */
872
873typedef int	(Tcl_DriverBlockModeProc) _ANSI_ARGS_((
874		    ClientData instanceData, int mode));
875typedef int	(Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,
876		    Tcl_Interp *interp));
877typedef int	(Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,
878		    char *buf, int toRead, int *errorCodePtr));
879typedef int	(Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
880		    char *buf, int toWrite, int *errorCodePtr));
881typedef int	(Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
882		    long offset, int mode, int *errorCodePtr));
883typedef int	(Tcl_DriverSetOptionProc) _ANSI_ARGS_((
884		    ClientData instanceData, Tcl_Interp *interp,
885	            char *optionName, char *value));
886typedef int	(Tcl_DriverGetOptionProc) _ANSI_ARGS_((
887		    ClientData instanceData, Tcl_Interp *interp,
888		    char *optionName, Tcl_DString *dsPtr));
889typedef void	(Tcl_DriverWatchProc) _ANSI_ARGS_((
890		    ClientData instanceData, int mask));
891typedef int	(Tcl_DriverGetHandleProc) _ANSI_ARGS_((
892		    ClientData instanceData, int direction,
893		    ClientData *handlePtr));
894
895/*
896 * Enum for different end of line translation and recognition modes.
897 */
898
899typedef enum Tcl_EolTranslation {
900    TCL_TRANSLATE_AUTO,			/* Eol == \r, \n and \r\n. */
901    TCL_TRANSLATE_CR,			/* Eol == \r. */
902    TCL_TRANSLATE_LF,			/* Eol == \n. */
903    TCL_TRANSLATE_CRLF			/* Eol == \r\n. */
904} Tcl_EolTranslation;
905
906/*
907 * struct Tcl_ChannelType:
908 *
909 * One such structure exists for each type (kind) of channel.
910 * It collects together in one place all the functions that are
911 * part of the specific channel type.
912 */
913
914typedef struct Tcl_ChannelType {
915    char *typeName;			/* The name of the channel type in Tcl
916                                         * commands. This storage is owned by
917                                         * channel type. */
918    Tcl_DriverBlockModeProc *blockModeProc;
919    					/* Set blocking mode for the
920                                         * raw channel. May be NULL. */
921    Tcl_DriverCloseProc *closeProc;	/* Procedure to call to close
922                                         * the channel. */
923    Tcl_DriverInputProc *inputProc;	/* Procedure to call for input
924                                         * on channel. */
925    Tcl_DriverOutputProc *outputProc;	/* Procedure to call for output
926                                         * on channel. */
927    Tcl_DriverSeekProc *seekProc;	/* Procedure to call to seek
928                                         * on the channel. May be NULL. */
929    Tcl_DriverSetOptionProc *setOptionProc;
930    					/* Set an option on a channel. */
931    Tcl_DriverGetOptionProc *getOptionProc;
932    					/* Get an option from a channel. */
933    Tcl_DriverWatchProc *watchProc;	/* Set up the notifier to watch
934                                         * for events on this channel. */
935    Tcl_DriverGetHandleProc *getHandleProc;
936					/* Get an OS handle from the channel
937                                         * or NULL if not supported. */
938} Tcl_ChannelType;
939
940/*
941 * The following flags determine whether the blockModeProc above should
942 * set the channel into blocking or nonblocking mode. They are passed
943 * as arguments to the blockModeProc procedure in the above structure.
944 */
945
946#define TCL_MODE_BLOCKING 0		/* Put channel into blocking mode. */
947#define TCL_MODE_NONBLOCKING 1		/* Put channel into nonblocking
948					 * mode. */
949
950/*
951 * Enum for different types of file paths.
952 */
953
954typedef enum Tcl_PathType {
955    TCL_PATH_ABSOLUTE,
956    TCL_PATH_RELATIVE,
957    TCL_PATH_VOLUME_RELATIVE
958} Tcl_PathType;
959
960/*
961 * Exported Tcl procedures:
962 */
963
964EXTERN void		Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
965			    char *message));
966EXTERN void		Tcl_AddObjErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
967			    char *message, int length));
968EXTERN void		Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
969EXTERN int		Tcl_AppendAllObjTypes _ANSI_ARGS_((
970			    Tcl_Interp *interp, Tcl_Obj *objPtr));
971EXTERN void		Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
972			    char *string));
973EXTERN void		Tcl_AppendResult _ANSI_ARGS_(
974			    TCL_VARARGS(Tcl_Interp *,interp));
975EXTERN void		Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj *objPtr,
976			    char *bytes, int length));
977EXTERN void		Tcl_AppendStringsToObj _ANSI_ARGS_(
978			    TCL_VARARGS(Tcl_Obj *,interp));
979EXTERN int		Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
980EXTERN Tcl_AsyncHandler	Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
981			    ClientData clientData));
982EXTERN void		Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
983EXTERN int		Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
984			    int code));
985EXTERN void		Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
986EXTERN int		Tcl_AsyncReady _ANSI_ARGS_((void));
987EXTERN void		Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp *interp));
988EXTERN char		Tcl_Backslash _ANSI_ARGS_((char *src,
989			    int *readPtr));
990EXTERN int		Tcl_BadChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
991			    char *optionName, char *optionList));
992EXTERN void		Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
993			    Tcl_InterpDeleteProc *proc,
994			    ClientData clientData));
995EXTERN void		Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
996			    ClientData clientData));
997#define Tcl_Ckalloc Tcl_Alloc
998#define Tcl_Ckfree Tcl_Free
999#define Tcl_Ckrealloc Tcl_Realloc
1000EXTERN int		Tcl_Close _ANSI_ARGS_((Tcl_Interp *interp,
1001        		    Tcl_Channel chan));
1002EXTERN int		Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
1003EXTERN char *		Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
1004EXTERN Tcl_Obj *	Tcl_ConcatObj _ANSI_ARGS_((int objc,
1005			    Tcl_Obj *CONST objv[]));
1006EXTERN int		Tcl_ConvertCountedElement _ANSI_ARGS_((char *src,
1007			    int length, char *dst, int flags));
1008EXTERN int		Tcl_ConvertElement _ANSI_ARGS_((char *src,
1009			    char *dst, int flags));
1010EXTERN int		Tcl_ConvertToType _ANSI_ARGS_((Tcl_Interp *interp,
1011			    Tcl_Obj *objPtr, Tcl_ObjType *typePtr));
1012EXTERN int		Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp *slave,
1013			    char *slaveCmd, Tcl_Interp *target,
1014        		    char *targetCmd, int argc, char **argv));
1015EXTERN int		Tcl_CreateAliasObj _ANSI_ARGS_((Tcl_Interp *slave,
1016			    char *slaveCmd, Tcl_Interp *target,
1017        		    char *targetCmd, int objc,
1018		            Tcl_Obj *CONST objv[]));
1019EXTERN Tcl_Channel	Tcl_CreateChannel _ANSI_ARGS_((
1020    			    Tcl_ChannelType *typePtr, char *chanName,
1021                            ClientData instanceData, int mask));
1022EXTERN void		Tcl_CreateChannelHandler _ANSI_ARGS_((
1023			    Tcl_Channel chan, int mask,
1024                            Tcl_ChannelProc *proc, ClientData clientData));
1025EXTERN void		Tcl_CreateCloseHandler _ANSI_ARGS_((
1026			    Tcl_Channel chan, Tcl_CloseProc *proc,
1027                            ClientData clientData));
1028EXTERN Tcl_Command	Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
1029			    char *cmdName, Tcl_CmdProc *proc,
1030			    ClientData clientData,
1031			    Tcl_CmdDeleteProc *deleteProc));
1032EXTERN void		Tcl_CreateEventSource _ANSI_ARGS_((
1033			    Tcl_EventSetupProc *setupProc,
1034			    Tcl_EventCheckProc *checkProc,
1035			    ClientData clientData));
1036EXTERN void		Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
1037			    ClientData clientData));
1038EXTERN void		Tcl_CreateFileHandler _ANSI_ARGS_((
1039    			    int fd, int mask, Tcl_FileProc *proc,
1040			    ClientData clientData));
1041EXTERN Tcl_Interp *	Tcl_CreateInterp _ANSI_ARGS_((void));
1042EXTERN void		Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
1043			    char *name, int numArgs, Tcl_ValueType *argTypes,
1044			    Tcl_MathProc *proc, ClientData clientData));
1045EXTERN Tcl_Command	Tcl_CreateObjCommand _ANSI_ARGS_((
1046			    Tcl_Interp *interp, char *cmdName,
1047			    Tcl_ObjCmdProc *proc, ClientData clientData,
1048			    Tcl_CmdDeleteProc *deleteProc));
1049EXTERN Tcl_Interp *	Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp *interp,
1050		            char *slaveName, int isSafe));
1051EXTERN Tcl_TimerToken	Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
1052			    Tcl_TimerProc *proc, ClientData clientData));
1053EXTERN Tcl_Trace	Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
1054			    int level, Tcl_CmdTraceProc *proc,
1055			    ClientData clientData));
1056EXTERN char *		Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
1057			    char *file, int line));
1058EXTERN int		Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
1059			    char *file, int line));
1060EXTERN char *		Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
1061			    unsigned int size, char *file, int line));
1062EXTERN Tcl_Obj *	Tcl_DbNewBooleanObj _ANSI_ARGS_((int boolValue,
1063                            char *file, int line));
1064EXTERN Tcl_Obj *	Tcl_DbNewDoubleObj _ANSI_ARGS_((double doubleValue,
1065                            char *file, int line));
1066EXTERN Tcl_Obj *	Tcl_DbNewListObj _ANSI_ARGS_((int objc,
1067			    Tcl_Obj *CONST objv[], char *file, int line));
1068EXTERN Tcl_Obj *	Tcl_DbNewLongObj _ANSI_ARGS_((long longValue,
1069                            char *file, int line));
1070EXTERN Tcl_Obj *	Tcl_DbNewObj _ANSI_ARGS_((char *file, int line));
1071EXTERN Tcl_Obj *	Tcl_DbNewStringObj _ANSI_ARGS_((char *bytes,
1072			    int length, char *file, int line));
1073EXTERN void		Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1074                            char *name));
1075EXTERN int		Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
1076			    char *cmdName));
1077EXTERN int		Tcl_DeleteCommandFromToken _ANSI_ARGS_((
1078			    Tcl_Interp *interp, Tcl_Command command));
1079EXTERN void		Tcl_DeleteChannelHandler _ANSI_ARGS_((
1080    			    Tcl_Channel chan, Tcl_ChannelProc *proc,
1081                            ClientData clientData));
1082EXTERN void		Tcl_DeleteCloseHandler _ANSI_ARGS_((
1083			    Tcl_Channel chan, Tcl_CloseProc *proc,
1084                            ClientData clientData));
1085EXTERN void		Tcl_DeleteEvents _ANSI_ARGS_((
1086			    Tcl_EventDeleteProc *proc,
1087                            ClientData clientData));
1088EXTERN void		Tcl_DeleteEventSource _ANSI_ARGS_((
1089			    Tcl_EventSetupProc *setupProc,
1090			    Tcl_EventCheckProc *checkProc,
1091			    ClientData clientData));
1092EXTERN void		Tcl_DeleteExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
1093			    ClientData clientData));
1094EXTERN void		Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
1095EXTERN void		Tcl_DeleteHashEntry _ANSI_ARGS_((
1096			    Tcl_HashEntry *entryPtr));
1097EXTERN void		Tcl_DeleteHashTable _ANSI_ARGS_((
1098			    Tcl_HashTable *tablePtr));
1099EXTERN void		Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
1100EXTERN void		Tcl_DeleteTimerHandler _ANSI_ARGS_((
1101			    Tcl_TimerToken token));
1102EXTERN void		Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
1103			    Tcl_Trace trace));
1104EXTERN void		Tcl_DetachPids _ANSI_ARGS_((int numPids, Tcl_Pid *pidPtr));
1105EXTERN void		Tcl_DontCallWhenDeleted _ANSI_ARGS_((
1106			    Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
1107			    ClientData clientData));
1108EXTERN int		Tcl_DoOneEvent _ANSI_ARGS_((int flags));
1109EXTERN void		Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
1110			    ClientData clientData));
1111EXTERN char *		Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
1112			    char *string, int length));
1113EXTERN char *		Tcl_DStringAppendElement _ANSI_ARGS_((
1114			    Tcl_DString *dsPtr, char *string));
1115EXTERN void		Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
1116EXTERN void		Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
1117EXTERN void		Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
1118			    Tcl_DString *dsPtr));
1119EXTERN void		Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
1120EXTERN void		Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
1121			    Tcl_DString *dsPtr));
1122EXTERN void		Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
1123			    int length));
1124EXTERN void		Tcl_DStringStartSublist _ANSI_ARGS_((
1125			    Tcl_DString *dsPtr));
1126EXTERN Tcl_Obj *	Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr));
1127EXTERN int		Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
1128EXTERN char *		Tcl_ErrnoId _ANSI_ARGS_((void));
1129EXTERN char *		Tcl_ErrnoMsg _ANSI_ARGS_((int err));
1130EXTERN int		Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
1131			    char *string));
1132EXTERN int		Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
1133			    char *fileName));
1134EXTERN void		Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
1135			    Tcl_FreeProc *freeProc));
1136EXTERN int		Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp *interp,
1137			    Tcl_Obj *objPtr));
1138EXTERN void		Tcl_Exit _ANSI_ARGS_((int status));
1139EXTERN int		Tcl_ExposeCommand _ANSI_ARGS_((Tcl_Interp *interp,
1140        		    char *hiddenCmdName, char *cmdName));
1141EXTERN int		Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
1142			    char *string, int *ptr));
1143EXTERN int		Tcl_ExprBooleanObj _ANSI_ARGS_((Tcl_Interp *interp,
1144			    Tcl_Obj *objPtr, int *ptr));
1145EXTERN int		Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
1146			    char *string, double *ptr));
1147EXTERN int		Tcl_ExprDoubleObj _ANSI_ARGS_((Tcl_Interp *interp,
1148			    Tcl_Obj *objPtr, double *ptr));
1149EXTERN int		Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
1150			    char *string, long *ptr));
1151EXTERN int		Tcl_ExprLongObj _ANSI_ARGS_((Tcl_Interp *interp,
1152			    Tcl_Obj *objPtr, long *ptr));
1153EXTERN int		Tcl_ExprObj _ANSI_ARGS_((Tcl_Interp *interp,
1154			    Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr));
1155EXTERN int		Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
1156			    char *string));
1157EXTERN void		Tcl_Finalize _ANSI_ARGS_((void));
1158EXTERN void		Tcl_FindExecutable _ANSI_ARGS_((char *argv0));
1159EXTERN Tcl_HashEntry *	Tcl_FirstHashEntry _ANSI_ARGS_((
1160			    Tcl_HashTable *tablePtr,
1161			    Tcl_HashSearch *searchPtr));
1162EXTERN int		Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
1163EXTERN void		TclFreeObj _ANSI_ARGS_((Tcl_Obj *objPtr));
1164EXTERN void		Tcl_FreeResult _ANSI_ARGS_((Tcl_Interp *interp));
1165EXTERN int		Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp *interp,
1166       			    char *slaveCmd, Tcl_Interp **targetInterpPtr,
1167                            char **targetCmdPtr, int *argcPtr,
1168			    char ***argvPtr));
1169EXTERN int		Tcl_GetAliasObj _ANSI_ARGS_((Tcl_Interp *interp,
1170       			    char *slaveCmd, Tcl_Interp **targetInterpPtr,
1171                            char **targetCmdPtr, int *objcPtr,
1172			    Tcl_Obj ***objv));
1173EXTERN ClientData	Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1174                            char *name, Tcl_InterpDeleteProc **procPtr));
1175EXTERN int		Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
1176			    char *string, int *boolPtr));
1177EXTERN int		Tcl_GetBooleanFromObj _ANSI_ARGS_((
1178			    Tcl_Interp *interp, Tcl_Obj *objPtr,
1179			    int *boolPtr));
1180EXTERN Tcl_Channel	Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp *interp,
1181	        	    char *chanName, int *modePtr));
1182EXTERN int		Tcl_GetChannelBufferSize _ANSI_ARGS_((
1183    			    Tcl_Channel chan));
1184EXTERN int		Tcl_GetChannelHandle _ANSI_ARGS_((Tcl_Channel chan,
1185	        	    int direction, ClientData *handlePtr));
1186EXTERN ClientData	Tcl_GetChannelInstanceData _ANSI_ARGS_((
1187    			    Tcl_Channel chan));
1188EXTERN int		Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
1189EXTERN char *		Tcl_GetChannelName _ANSI_ARGS_((Tcl_Channel chan));
1190EXTERN int		Tcl_GetChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
1191			    Tcl_Channel chan, char *optionName,
1192			    Tcl_DString *dsPtr));
1193EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
1194EXTERN int		Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
1195			    char *cmdName, Tcl_CmdInfo *infoPtr));
1196EXTERN char *		Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
1197			    Tcl_Command command));
1198EXTERN char *		Tcl_GetCwd _ANSI_ARGS_((char *buf, int len));
1199EXTERN int		Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
1200			    char *string, double *doublePtr));
1201EXTERN int		Tcl_GetDoubleFromObj _ANSI_ARGS_((
1202			    Tcl_Interp *interp, Tcl_Obj *objPtr,
1203			    double *doublePtr));
1204EXTERN int		Tcl_GetErrno _ANSI_ARGS_((void));
1205EXTERN int		Tcl_GetErrorLine _ANSI_ARGS_((Tcl_Interp *interp));
1206EXTERN char *		Tcl_GetHostName _ANSI_ARGS_((void));
1207EXTERN int		Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1208			    Tcl_Obj *objPtr, char **tablePtr, char *msg,
1209			    int flags, int *indexPtr));
1210EXTERN int		Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
1211			    char *string, int *intPtr));
1212EXTERN int		Tcl_GetInterpPath _ANSI_ARGS_((Tcl_Interp *askInterp,
1213			    Tcl_Interp *slaveInterp));
1214EXTERN int		Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1215			    Tcl_Obj *objPtr, int *intPtr));
1216EXTERN int		Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1217			    Tcl_Obj *objPtr, long *longPtr));
1218EXTERN Tcl_Interp *	Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp));
1219EXTERN Tcl_Obj *	Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp *interp));
1220EXTERN Tcl_ObjType *	Tcl_GetObjType _ANSI_ARGS_((char *typeName));
1221EXTERN int		Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
1222			    char *string, int write, int checkUsage,
1223			    ClientData *filePtr));
1224EXTERN Tcl_Command	Tcl_GetOriginalCommand _ANSI_ARGS_((
1225			    Tcl_Command command));
1226EXTERN Tcl_PathType	Tcl_GetPathType _ANSI_ARGS_((char *path));
1227EXTERN int		Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
1228        		    Tcl_DString *dsPtr));
1229EXTERN int		Tcl_GetsObj _ANSI_ARGS_((Tcl_Channel chan,
1230        		    Tcl_Obj *objPtr));
1231EXTERN int		Tcl_GetServiceMode _ANSI_ARGS_((void));
1232EXTERN Tcl_Interp *	Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp *interp,
1233			    char *slaveName));
1234EXTERN Tcl_Channel	Tcl_GetStdChannel _ANSI_ARGS_((int type));
1235EXTERN char *		Tcl_GetStringFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1236			    int *lengthPtr));
1237EXTERN char *		Tcl_GetStringResult _ANSI_ARGS_((Tcl_Interp *interp));
1238EXTERN char *		Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
1239			    char *varName, int flags));
1240EXTERN char *		Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1241			    char *part1, char *part2, int flags));
1242EXTERN int		Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
1243			    char *command));
1244EXTERN int		Tcl_GlobalEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
1245			    Tcl_Obj *objPtr));
1246EXTERN char *		Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
1247EXTERN int		Tcl_HideCommand _ANSI_ARGS_((Tcl_Interp *interp,
1248		            char *cmdName, char *hiddenCmdName));
1249EXTERN int		Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
1250EXTERN void		Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
1251			    int keyType));
1252EXTERN void		Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
1253EXTERN int		Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
1254EXTERN int		Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
1255EXTERN int		Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp *interp));
1256EXTERN int		Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp *interp));
1257EXTERN void		Tcl_InvalidateStringRep _ANSI_ARGS_((
1258			    Tcl_Obj *objPtr));
1259EXTERN char *		Tcl_JoinPath _ANSI_ARGS_((int argc, char **argv,
1260			    Tcl_DString *resultPtr));
1261EXTERN int		Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
1262			    char *varName, char *addr, int type));
1263EXTERN int		Tcl_ListObjAppendList _ANSI_ARGS_((
1264			    Tcl_Interp *interp, Tcl_Obj *listPtr,
1265			    Tcl_Obj *elemListPtr));
1266EXTERN int		Tcl_ListObjAppendElement _ANSI_ARGS_((
1267			    Tcl_Interp *interp, Tcl_Obj *listPtr,
1268			    Tcl_Obj *objPtr));
1269EXTERN int		Tcl_ListObjGetElements _ANSI_ARGS_((
1270			    Tcl_Interp *interp, Tcl_Obj *listPtr,
1271			    int *objcPtr, Tcl_Obj ***objvPtr));
1272EXTERN int		Tcl_ListObjIndex _ANSI_ARGS_((Tcl_Interp *interp,
1273			    Tcl_Obj *listPtr, int index,
1274			    Tcl_Obj **objPtrPtr));
1275EXTERN int		Tcl_ListObjLength _ANSI_ARGS_((Tcl_Interp *interp,
1276			    Tcl_Obj *listPtr, int *intPtr));
1277EXTERN int		Tcl_ListObjReplace _ANSI_ARGS_((Tcl_Interp *interp,
1278			    Tcl_Obj *listPtr, int first, int count,
1279			    int objc, Tcl_Obj *CONST objv[]));
1280EXTERN void		Tcl_Main _ANSI_ARGS_((int argc, char **argv,
1281			    Tcl_AppInitProc *appInitProc));
1282EXTERN Tcl_Channel	Tcl_MakeFileChannel _ANSI_ARGS_((ClientData handle,
1283			    int mode));
1284EXTERN int		Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp *interp));
1285EXTERN Tcl_Channel	Tcl_MakeTcpClientChannel _ANSI_ARGS_((
1286    			    ClientData tcpSocket));
1287EXTERN char *		Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
1288EXTERN Tcl_HashEntry *	Tcl_NextHashEntry _ANSI_ARGS_((
1289			    Tcl_HashSearch *searchPtr));
1290EXTERN void		Tcl_NotifyChannel _ANSI_ARGS_((Tcl_Channel channel,
1291			    int mask));
1292EXTERN Tcl_Obj *	Tcl_ObjGetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1293			    Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
1294			    int flags));
1295EXTERN Tcl_Obj *	Tcl_ObjSetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1296			    Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
1297			    Tcl_Obj *newValuePtr, int flags));
1298EXTERN Tcl_Channel	Tcl_OpenCommandChannel _ANSI_ARGS_((
1299    			    Tcl_Interp *interp, int argc, char **argv,
1300			    int flags));
1301EXTERN Tcl_Channel	Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
1302        		    char *fileName, char *modeString,
1303                            int permissions));
1304EXTERN Tcl_Channel	Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp *interp,
1305			    int port, char *address, char *myaddr,
1306		            int myport, int async));
1307EXTERN Tcl_Channel	Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp *interp,
1308		            int port, char *host,
1309        		    Tcl_TcpAcceptProc *acceptProc,
1310			    ClientData callbackData));
1311EXTERN char *		Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
1312			    char *string, char **termPtr));
1313EXTERN int		Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp *interp,
1314			    char *name, char *version));
1315EXTERN char *		Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp *interp,
1316			    char *name, char *version, int exact));
1317EXTERN char *		Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
1318EXTERN void		Tcl_Preserve _ANSI_ARGS_((ClientData data));
1319EXTERN void		Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
1320			    double value, char *dst));
1321EXTERN int		Tcl_PutEnv _ANSI_ARGS_((CONST char *string));
1322EXTERN void		Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
1323			    Tcl_QueuePosition position));
1324EXTERN int		Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
1325	        	    char *bufPtr, int toRead));
1326EXTERN void		Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
1327EXTERN int		Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
1328			    char *cmd, int flags));
1329EXTERN Tcl_RegExp	Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
1330			    char *string));
1331EXTERN int		Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
1332			    Tcl_RegExp regexp, char *string, char *start));
1333EXTERN int		Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
1334			    char *string, char *pattern));
1335EXTERN void		Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
1336			    int index, char **startPtr, char **endPtr));
1337EXTERN void		Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
1338	        	    Tcl_Channel chan));
1339EXTERN void		Tcl_RegisterObjType _ANSI_ARGS_((
1340			    Tcl_ObjType *typePtr));
1341EXTERN void		Tcl_Release _ANSI_ARGS_((ClientData clientData));
1342EXTERN void		Tcl_RestartIdleTimer _ANSI_ARGS_((void));
1343EXTERN void		Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
1344#define Tcl_Return Tcl_SetResult
1345EXTERN int		Tcl_ScanCountedElement _ANSI_ARGS_((char *string,
1346			    int length, int *flagPtr));
1347EXTERN int		Tcl_ScanElement _ANSI_ARGS_((char *string,
1348			    int *flagPtr));
1349EXTERN int		Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
1350        		    int offset, int mode));
1351EXTERN int		Tcl_ServiceAll _ANSI_ARGS_((void));
1352EXTERN int		Tcl_ServiceEvent _ANSI_ARGS_((int flags));
1353EXTERN void		Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1354                            char *name, Tcl_InterpDeleteProc *proc,
1355                            ClientData clientData));
1356EXTERN void		Tcl_SetBooleanObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1357			    int boolValue));
1358EXTERN void		Tcl_SetChannelBufferSize _ANSI_ARGS_((
1359			    Tcl_Channel chan, int sz));
1360EXTERN int		Tcl_SetChannelOption _ANSI_ARGS_((
1361			    Tcl_Interp *interp, Tcl_Channel chan,
1362	        	    char *optionName, char *newValue));
1363EXTERN int		Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
1364			    char *cmdName, Tcl_CmdInfo *infoPtr));
1365EXTERN void		Tcl_SetDoubleObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1366			    double doubleValue));
1367EXTERN void		Tcl_SetErrno _ANSI_ARGS_((int err));
1368EXTERN void		Tcl_SetErrorCode _ANSI_ARGS_(
1369    			    TCL_VARARGS(Tcl_Interp *,arg1));
1370EXTERN void		Tcl_SetIntObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1371			    int intValue));
1372EXTERN void		Tcl_SetListObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1373			    int objc, Tcl_Obj *CONST objv[]));
1374EXTERN void		Tcl_SetLongObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1375			    long longValue));
1376EXTERN void		Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
1377EXTERN void		Tcl_SetObjErrorCode _ANSI_ARGS_((Tcl_Interp *interp,
1378			    Tcl_Obj *errorObjPtr));
1379EXTERN void		Tcl_SetObjLength _ANSI_ARGS_((Tcl_Obj *objPtr,
1380			    int length));
1381EXTERN void		Tcl_SetObjResult _ANSI_ARGS_((Tcl_Interp *interp,
1382			    Tcl_Obj *resultObjPtr));
1383EXTERN void		Tcl_SetPanicProc _ANSI_ARGS_((void (*proc)
1384			    _ANSI_ARGS_(TCL_VARARGS(char *, format))));
1385EXTERN int		Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
1386			    int depth));
1387EXTERN void		Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
1388			    char *string, Tcl_FreeProc *freeProc));
1389EXTERN int		Tcl_SetServiceMode _ANSI_ARGS_((int mode));
1390EXTERN void		Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
1391			    int type));
1392EXTERN void		Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1393			    char *bytes, int length));
1394EXTERN void		Tcl_SetTimer _ANSI_ARGS_((Tcl_Time *timePtr));
1395EXTERN char *		Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
1396			    char *varName, char *newValue, int flags));
1397EXTERN char *		Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1398			    char *part1, char *part2, char *newValue,
1399			    int flags));
1400EXTERN char *		Tcl_SignalId _ANSI_ARGS_((int sig));
1401EXTERN char *		Tcl_SignalMsg _ANSI_ARGS_((int sig));
1402EXTERN void		Tcl_Sleep _ANSI_ARGS_((int ms));
1403EXTERN void		Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
1404EXTERN int		Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
1405			    char *list, int *argcPtr, char ***argvPtr));
1406EXTERN void		Tcl_SplitPath _ANSI_ARGS_((char *path,
1407			    int *argcPtr, char ***argvPtr));
1408EXTERN void		Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp *interp,
1409			    char *pkgName, Tcl_PackageInitProc *initProc,
1410			    Tcl_PackageInitProc *safeInitProc));
1411EXTERN int		Tcl_StringMatch _ANSI_ARGS_((char *string,
1412			    char *pattern));
1413EXTERN int		Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
1414#define Tcl_TildeSubst Tcl_TranslateFileName
1415EXTERN int		Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
1416			    char *varName, int flags, Tcl_VarTraceProc *proc,
1417			    ClientData clientData));
1418EXTERN int		Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1419			    char *part1, char *part2, int flags,
1420			    Tcl_VarTraceProc *proc, ClientData clientData));
1421EXTERN char *		Tcl_TranslateFileName _ANSI_ARGS_((Tcl_Interp *interp,
1422			    char *name, Tcl_DString *bufferPtr));
1423EXTERN int		Tcl_Ungets _ANSI_ARGS_((Tcl_Channel chan, char *str,
1424			    int len, int atHead));
1425EXTERN void		Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
1426			    char *varName));
1427EXTERN int		Tcl_UnregisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
1428			    Tcl_Channel chan));
1429EXTERN int		Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
1430			    char *varName, int flags));
1431EXTERN int		Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1432			    char *part1, char *part2, int flags));
1433EXTERN void		Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
1434			    char *varName, int flags, Tcl_VarTraceProc *proc,
1435			    ClientData clientData));
1436EXTERN void		Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1437			    char *part1, char *part2, int flags,
1438			    Tcl_VarTraceProc *proc, ClientData clientData));
1439EXTERN void		Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp *interp,
1440			    char *varName));
1441EXTERN int		Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
1442			    char *frameName, char *varName,
1443			    char *localName, int flags));
1444EXTERN int		Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1445			    char *frameName, char *part1, char *part2,
1446			    char *localName, int flags));
1447EXTERN int		Tcl_VarEval _ANSI_ARGS_(
1448    			    TCL_VARARGS(Tcl_Interp *,interp));
1449EXTERN ClientData	Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
1450			    char *varName, int flags,
1451			    Tcl_VarTraceProc *procPtr,
1452			    ClientData prevClientData));
1453EXTERN ClientData	Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
1454			    char *part1, char *part2, int flags,
1455			    Tcl_VarTraceProc *procPtr,
1456			    ClientData prevClientData));
1457EXTERN int		Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time *timePtr));
1458EXTERN Tcl_Pid		Tcl_WaitPid _ANSI_ARGS_((Tcl_Pid pid, int *statPtr,
1459			    int options));
1460EXTERN int		Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
1461			    char *s, int slen));
1462EXTERN void		Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp *interp,
1463			    int objc, Tcl_Obj *CONST objv[], char *message));
1464
1465#endif /* RESOURCE_INCLUDED */
1466#endif /* _TCL */
1467