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.324 97/08/07 10:26:49
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   2
41#define TCL_RELEASE_SERIAL  0
42
43#define TCL_VERSION	    "8.0"
44#define TCL_PATCH_LEVEL	    "8.0"
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
413EXTERN void		Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
414EXTERN void		Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
415EXTERN int		Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr));
416
417#ifdef TCL_MEM_DEBUG
418#   define Tcl_IncrRefCount(objPtr) \
419	Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__)
420#   define Tcl_DecrRefCount(objPtr) \
421	Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__)
422#   define Tcl_IsShared(objPtr) \
423	Tcl_DbIsShared(objPtr, __FILE__, __LINE__)
424#else
425#   define Tcl_IncrRefCount(objPtr) \
426	++(objPtr)->refCount
427#   define Tcl_DecrRefCount(objPtr) \
428	if (--(objPtr)->refCount <= 0) TclFreeObj(objPtr)
429#   define Tcl_IsShared(objPtr) \
430	((objPtr)->refCount > 1)
431#endif
432
433/*
434 * Macros and definitions that help to debug the use of Tcl objects.
435 * When TCL_MEM_DEBUG is defined, the Tcl_New* declarations are
436 * overridden to call debugging versions of the object creation procedures.
437 */
438
439EXTERN Tcl_Obj *	Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));
440EXTERN Tcl_Obj *	Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));
441EXTERN Tcl_Obj *	Tcl_NewIntObj _ANSI_ARGS_((int intValue));
442EXTERN Tcl_Obj *	Tcl_NewListObj _ANSI_ARGS_((int objc,
443			    Tcl_Obj *CONST objv[]));
444EXTERN Tcl_Obj *	Tcl_NewLongObj _ANSI_ARGS_((long longValue));
445EXTERN Tcl_Obj *	Tcl_NewObj _ANSI_ARGS_((void));
446EXTERN Tcl_Obj *	Tcl_NewStringObj _ANSI_ARGS_((char *bytes,
447			    int length));
448
449#ifdef TCL_MEM_DEBUG
450#  define Tcl_NewBooleanObj(val) \
451     Tcl_DbNewBooleanObj(val, __FILE__, __LINE__)
452#  define Tcl_NewDoubleObj(val) \
453     Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)
454#  define Tcl_NewIntObj(val) \
455     Tcl_DbNewLongObj(val, __FILE__, __LINE__)
456#  define Tcl_NewListObj(objc, objv) \
457     Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__)
458#  define Tcl_NewLongObj(val) \
459     Tcl_DbNewLongObj(val, __FILE__, __LINE__)
460#  define Tcl_NewObj() \
461     Tcl_DbNewObj(__FILE__, __LINE__)
462#  define Tcl_NewStringObj(bytes, len) \
463     Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__)
464#endif /* TCL_MEM_DEBUG */
465
466/*
467 * The following definitions support Tcl's namespace facility.
468 * Note: the first five fields must match exactly the fields in a
469 * Namespace structure (see tcl.h).
470 */
471
472typedef struct Tcl_Namespace {
473    char *name;                 /* The namespace's name within its parent
474				 * namespace. This contains no ::'s. The
475				 * name of the global namespace is ""
476				 * although "::" is an synonym. */
477    char *fullName;             /* The namespace's fully qualified name.
478				 * This starts with ::. */
479    ClientData clientData;      /* Arbitrary value associated with this
480				 * namespace. */
481    Tcl_NamespaceDeleteProc* deleteProc;
482                                /* Procedure invoked when deleting the
483				 * namespace to, e.g., free clientData. */
484    struct Tcl_Namespace* parentPtr;
485                                /* Points to the namespace that contains
486				 * this one. NULL if this is the global
487				 * namespace. */
488} Tcl_Namespace;
489
490/*
491 * The following structure represents a call frame, or activation record.
492 * A call frame defines a naming context for a procedure call: its local
493 * scope (for local variables) and its namespace scope (used for non-local
494 * variables; often the global :: namespace). A call frame can also define
495 * the naming context for a namespace eval or namespace inscope command:
496 * the namespace in which the command's code should execute. The
497 * Tcl_CallFrame structures exist only while procedures or namespace
498 * eval/inscope's are being executed, and provide a Tcl call stack.
499 *
500 * A call frame is initialized and pushed using Tcl_PushCallFrame and
501 * popped using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be
502 * provided by the Tcl_PushCallFrame caller, and callers typically allocate
503 * them on the C call stack for efficiency. For this reason, Tcl_CallFrame
504 * is defined as a structure and not as an opaque token. However, most
505 * Tcl_CallFrame fields are hidden since applications should not access
506 * them directly; others are declared as "dummyX".
507 *
508 * WARNING!! The structure definition must be kept consistent with the
509 * CallFrame structure in tclInt.h. If you change one, change the other.
510 */
511
512typedef struct Tcl_CallFrame {
513    Tcl_Namespace *nsPtr;
514    int dummy1;
515    int dummy2;
516    char *dummy3;
517    char *dummy4;
518    char *dummy5;
519    int dummy6;
520    char *dummy7;
521    char *dummy8;
522    int dummy9;
523    char* dummy10;
524} Tcl_CallFrame;
525
526/*
527 * Information about commands that is returned by Tcl_GetCommandInfo and
528 * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based
529 * command procedure while proc is a traditional Tcl argc/argv
530 * string-based procedure. Tcl_CreateObjCommand and Tcl_CreateCommand
531 * ensure that both objProc and proc are non-NULL and can be called to
532 * execute the command. However, it may be faster to call one instead of
533 * the other. The member isNativeObjectProc is set to 1 if an
534 * object-based procedure was registered by Tcl_CreateObjCommand, and to
535 * 0 if a string-based procedure was registered by Tcl_CreateCommand.
536 * The other procedure is typically set to a compatibility wrapper that
537 * does string-to-object or object-to-string argument conversions then
538 * calls the other procedure.
539 */
540
541typedef struct Tcl_CmdInfo {
542    int isNativeObjectProc;	 /* 1 if objProc was registered by a call to
543				  * Tcl_CreateObjCommand; 0 otherwise.
544				  * Tcl_SetCmdInfo does not modify this
545				  * field. */
546    Tcl_ObjCmdProc *objProc;	 /* Command's object-based procedure. */
547    ClientData objClientData;	 /* ClientData for object proc. */
548    Tcl_CmdProc *proc;		 /* Command's string-based procedure. */
549    ClientData clientData;	 /* ClientData for string proc. */
550    Tcl_CmdDeleteProc *deleteProc;
551                                 /* Procedure to call when command is
552                                  * deleted. */
553    ClientData deleteData;	 /* Value to pass to deleteProc (usually
554				  * the same as clientData). */
555    Tcl_Namespace *namespacePtr; /* Points to the namespace that contains
556				  * this command. Note that Tcl_SetCmdInfo
557				  * will not change a command's namespace;
558				  * use Tcl_RenameCommand to do that. */
559
560} Tcl_CmdInfo;
561
562/*
563 * The structure defined below is used to hold dynamic strings.  The only
564 * field that clients should use is the string field, and they should
565 * never modify it.
566 */
567
568#define TCL_DSTRING_STATIC_SIZE 200
569typedef struct Tcl_DString {
570    char *string;		/* Points to beginning of string:  either
571				 * staticSpace below or a malloced array. */
572    int length;			/* Number of non-NULL characters in the
573				 * string. */
574    int spaceAvl;		/* Total number of bytes available for the
575				 * string and its terminating NULL char. */
576    char staticSpace[TCL_DSTRING_STATIC_SIZE];
577				/* Space to use in common case where string
578				 * is small. */
579} Tcl_DString;
580
581#define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
582#define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
583#define Tcl_DStringTrunc Tcl_DStringSetLength
584
585/*
586 * Definitions for the maximum number of digits of precision that may
587 * be specified in the "tcl_precision" variable, and the number of
588 * characters of buffer space required by Tcl_PrintDouble.
589 */
590
591#define TCL_MAX_PREC 17
592#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
593
594/*
595 * Flag that may be passed to Tcl_ConvertElement to force it not to
596 * output braces (careful!  if you change this flag be sure to change
597 * the definitions at the front of tclUtil.c).
598 */
599
600#define TCL_DONT_USE_BRACES	1
601
602/*
603 * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
604 * abbreviated strings.
605 */
606
607#define TCL_EXACT	1
608
609/*
610 * Flag values passed to Tcl_RecordAndEval.
611 * WARNING: these bit choices must not conflict with the bit choices
612 * for evalFlag bits in tclInt.h!!
613 */
614
615#define TCL_NO_EVAL		0x10000
616#define TCL_EVAL_GLOBAL		0x20000
617
618/*
619 * Special freeProc values that may be passed to Tcl_SetResult (see
620 * the man page for details):
621 */
622
623#define TCL_VOLATILE	((Tcl_FreeProc *) 1)
624#define TCL_STATIC	((Tcl_FreeProc *) 0)
625#define TCL_DYNAMIC	((Tcl_FreeProc *) 3)
626
627/*
628 * Flag values passed to variable-related procedures.
629 */
630
631#define TCL_GLOBAL_ONLY		 1
632#define TCL_NAMESPACE_ONLY	 2
633#define TCL_APPEND_VALUE	 4
634#define TCL_LIST_ELEMENT	 8
635#define TCL_TRACE_READS		 0x10
636#define TCL_TRACE_WRITES	 0x20
637#define TCL_TRACE_UNSETS	 0x40
638#define TCL_TRACE_DESTROYED	 0x80
639#define TCL_INTERP_DESTROYED	 0x100
640#define TCL_LEAVE_ERR_MSG	 0x200
641#define TCL_PARSE_PART1		 0x400
642
643/*
644 * Types for linked variables:
645 */
646
647#define TCL_LINK_INT		1
648#define TCL_LINK_DOUBLE		2
649#define TCL_LINK_BOOLEAN	3
650#define TCL_LINK_STRING		4
651#define TCL_LINK_READ_ONLY	0x80
652
653/*
654 * The following declarations either map ckalloc and ckfree to
655 * malloc and free, or they map them to procedures with all sorts
656 * of debugging hooks defined in tclCkalloc.c.
657 */
658
659EXTERN char *		Tcl_Alloc _ANSI_ARGS_((unsigned int size));
660EXTERN void		Tcl_Free _ANSI_ARGS_((char *ptr));
661EXTERN char *		Tcl_Realloc _ANSI_ARGS_((char *ptr,
662			    unsigned int size));
663
664#ifdef TCL_MEM_DEBUG
665
666#  define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
667#  define Tcl_Free(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
668#  define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
669#  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
670#  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
671#  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
672
673EXTERN int		Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
674EXTERN void		Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
675			    int line));
676
677#else
678
679#  if USE_TCLALLOC
680#     define ckalloc(x) Tcl_Alloc(x)
681#     define ckfree(x) Tcl_Free(x)
682#     define ckrealloc(x,y) Tcl_Realloc(x,y)
683#  else
684#     define ckalloc(x) malloc(x)
685#     define ckfree(x)  free(x)
686#     define ckrealloc(x,y) realloc(x,y)
687#  endif
688#  define Tcl_DumpActiveMemory(x)
689#  define Tcl_ValidateAllMemory(x,y)
690
691#endif /* TCL_MEM_DEBUG */
692
693/*
694 * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers
695 * to prevent errors when the forward reference to Tcl_HashTable is
696 * encountered in the Tcl_HashEntry structure.
697 */
698
699#ifdef __cplusplus
700struct Tcl_HashTable;
701#endif
702
703/*
704 * Structure definition for an entry in a hash table.  No-one outside
705 * Tcl should access any of these fields directly;  use the macros
706 * defined below.
707 */
708
709typedef struct Tcl_HashEntry {
710    struct Tcl_HashEntry *nextPtr;	/* Pointer to next entry in this
711					 * hash bucket, or NULL for end of
712					 * chain. */
713    struct Tcl_HashTable *tablePtr;	/* Pointer to table containing entry. */
714    struct Tcl_HashEntry **bucketPtr;	/* Pointer to bucket that points to
715					 * first entry in this entry's chain:
716					 * used for deleting the entry. */
717    ClientData clientData;		/* Application stores something here
718					 * with Tcl_SetHashValue. */
719    union {				/* Key has one of these forms: */
720	char *oneWordValue;		/* One-word value for key. */
721	int words[1];			/* Multiple integer words for key.
722					 * The actual size will be as large
723					 * as necessary for this table's
724					 * keys. */
725	char string[4];			/* String for key.  The actual size
726					 * will be as large as needed to hold
727					 * the key. */
728    } key;				/* MUST BE LAST FIELD IN RECORD!! */
729} Tcl_HashEntry;
730
731/*
732 * Structure definition for a hash table.  Must be in tcl.h so clients
733 * can allocate space for these structures, but clients should never
734 * access any fields in this structure.
735 */
736
737#define TCL_SMALL_HASH_TABLE 4
738typedef struct Tcl_HashTable {
739    Tcl_HashEntry **buckets;		/* Pointer to bucket array.  Each
740					 * element points to first entry in
741					 * bucket's hash chain, or NULL. */
742    Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
743					/* Bucket array used for small tables
744					 * (to avoid mallocs and frees). */
745    int numBuckets;			/* Total number of buckets allocated
746					 * at **bucketPtr. */
747    int numEntries;			/* Total number of entries present
748					 * in table. */
749    int rebuildSize;			/* Enlarge table when numEntries gets
750					 * to be this large. */
751    int downShift;			/* Shift count used in hashing
752					 * function.  Designed to use high-
753					 * order bits of randomized keys. */
754    int mask;				/* Mask value used in hashing
755					 * function. */
756    int keyType;			/* Type of keys used in this table.
757					 * It's either TCL_STRING_KEYS,
758					 * TCL_ONE_WORD_KEYS, or an integer
759					 * giving the number of ints that
760                                         * is the size of the key.
761					 */
762    Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
763	    CONST char *key));
764    Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
765	    CONST char *key, int *newPtr));
766} Tcl_HashTable;
767
768/*
769 * Structure definition for information used to keep track of searches
770 * through hash tables:
771 */
772
773typedef struct Tcl_HashSearch {
774    Tcl_HashTable *tablePtr;		/* Table being searched. */
775    int nextIndex;			/* Index of next bucket to be
776					 * enumerated after present one. */
777    Tcl_HashEntry *nextEntryPtr;	/* Next entry to be enumerated in the
778					 * the current bucket. */
779} Tcl_HashSearch;
780
781/*
782 * Acceptable key types for hash tables:
783 */
784
785#define TCL_STRING_KEYS		0
786#define TCL_ONE_WORD_KEYS	1
787
788/*
789 * Macros for clients to use to access fields of hash entries:
790 */
791
792#define Tcl_GetHashValue(h) ((h)->clientData)
793#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
794#define Tcl_GetHashKey(tablePtr, h) \
795    ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
796						: (h)->key.string))
797
798/*
799 * Macros to use for clients to use to invoke find and create procedures
800 * for hash tables:
801 */
802
803#define Tcl_FindHashEntry(tablePtr, key) \
804	(*((tablePtr)->findProc))(tablePtr, key)
805#define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
806	(*((tablePtr)->createProc))(tablePtr, key, newPtr)
807
808/*
809 * Flag values to pass to Tcl_DoOneEvent to disable searches
810 * for some kinds of events:
811 */
812
813#define TCL_DONT_WAIT		(1<<1)
814#define TCL_WINDOW_EVENTS	(1<<2)
815#define TCL_FILE_EVENTS		(1<<3)
816#define TCL_TIMER_EVENTS	(1<<4)
817#define TCL_IDLE_EVENTS		(1<<5)	/* WAS 0x10 ???? */
818#define TCL_ALL_EVENTS		(~TCL_DONT_WAIT)
819
820/*
821 * The following structure defines a generic event for the Tcl event
822 * system.  These are the things that are queued in calls to Tcl_QueueEvent
823 * and serviced later by Tcl_DoOneEvent.  There can be many different
824 * kinds of events with different fields, corresponding to window events,
825 * timer events, etc.  The structure for a particular event consists of
826 * a Tcl_Event header followed by additional information specific to that
827 * event.
828 */
829
830struct Tcl_Event {
831    Tcl_EventProc *proc;	/* Procedure to call to service this event. */
832    struct Tcl_Event *nextPtr;	/* Next in list of pending events, or NULL. */
833};
834
835/*
836 * Positions to pass to Tcl_QueueEvent:
837 */
838
839typedef enum {
840    TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
841} Tcl_QueuePosition;
842
843/*
844 * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
845 * event routines.
846 */
847
848#define TCL_SERVICE_NONE 0
849#define TCL_SERVICE_ALL 1
850
851/*
852 * The following structure keeps is used to hold a time value, either as
853 * an absolute time (the number of seconds from the epoch) or as an
854 * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
855 * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT.
856 */
857
858typedef struct Tcl_Time {
859    long sec;			/* Seconds. */
860    long usec;			/* Microseconds. */
861} Tcl_Time;
862
863/*
864 * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler
865 * to indicate what sorts of events are of interest:
866 */
867
868#define TCL_READABLE	(1<<1)
869#define TCL_WRITABLE	(1<<2)
870#define TCL_EXCEPTION	(1<<3)
871
872/*
873 * Flag values to pass to Tcl_OpenCommandChannel to indicate the
874 * disposition of the stdio handles.  TCL_STDIN, TCL_STDOUT, TCL_STDERR,
875 * are also used in Tcl_GetStdChannel.
876 */
877
878#define TCL_STDIN		(1<<1)
879#define TCL_STDOUT		(1<<2)
880#define TCL_STDERR		(1<<3)
881#define TCL_ENFORCE_MODE	(1<<4)
882
883/*
884 * Typedefs for the various operations in a channel type:
885 */
886
887typedef int	(Tcl_DriverBlockModeProc) _ANSI_ARGS_((
888		    ClientData instanceData, int mode));
889typedef int	(Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,
890		    Tcl_Interp *interp));
891typedef int	(Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,
892		    char *buf, int toRead, int *errorCodePtr));
893typedef int	(Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
894		    char *buf, int toWrite, int *errorCodePtr));
895typedef int	(Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
896		    long offset, int mode, int *errorCodePtr));
897typedef int	(Tcl_DriverSetOptionProc) _ANSI_ARGS_((
898		    ClientData instanceData, Tcl_Interp *interp,
899	            char *optionName, char *value));
900typedef int	(Tcl_DriverGetOptionProc) _ANSI_ARGS_((
901		    ClientData instanceData, Tcl_Interp *interp,
902		    char *optionName, Tcl_DString *dsPtr));
903typedef void	(Tcl_DriverWatchProc) _ANSI_ARGS_((
904		    ClientData instanceData, int mask));
905typedef int	(Tcl_DriverGetHandleProc) _ANSI_ARGS_((
906		    ClientData instanceData, int direction,
907		    ClientData *handlePtr));
908
909/*
910 * Enum for different end of line translation and recognition modes.
911 */
912
913typedef enum Tcl_EolTranslation {
914    TCL_TRANSLATE_AUTO,			/* Eol == \r, \n and \r\n. */
915    TCL_TRANSLATE_CR,			/* Eol == \r. */
916    TCL_TRANSLATE_LF,			/* Eol == \n. */
917    TCL_TRANSLATE_CRLF			/* Eol == \r\n. */
918} Tcl_EolTranslation;
919
920/*
921 * struct Tcl_ChannelType:
922 *
923 * One such structure exists for each type (kind) of channel.
924 * It collects together in one place all the functions that are
925 * part of the specific channel type.
926 */
927
928typedef struct Tcl_ChannelType {
929    char *typeName;			/* The name of the channel type in Tcl
930                                         * commands. This storage is owned by
931                                         * channel type. */
932    Tcl_DriverBlockModeProc *blockModeProc;
933    					/* Set blocking mode for the
934                                         * raw channel. May be NULL. */
935    Tcl_DriverCloseProc *closeProc;	/* Procedure to call to close
936                                         * the channel. */
937    Tcl_DriverInputProc *inputProc;	/* Procedure to call for input
938                                         * on channel. */
939    Tcl_DriverOutputProc *outputProc;	/* Procedure to call for output
940                                         * on channel. */
941    Tcl_DriverSeekProc *seekProc;	/* Procedure to call to seek
942                                         * on the channel. May be NULL. */
943    Tcl_DriverSetOptionProc *setOptionProc;
944    					/* Set an option on a channel. */
945    Tcl_DriverGetOptionProc *getOptionProc;
946    					/* Get an option from a channel. */
947    Tcl_DriverWatchProc *watchProc;	/* Set up the notifier to watch
948                                         * for events on this channel. */
949    Tcl_DriverGetHandleProc *getHandleProc;
950					/* Get an OS handle from the channel
951                                         * or NULL if not supported. */
952} Tcl_ChannelType;
953
954/*
955 * The following flags determine whether the blockModeProc above should
956 * set the channel into blocking or nonblocking mode. They are passed
957 * as arguments to the blockModeProc procedure in the above structure.
958 */
959
960#define TCL_MODE_BLOCKING 0		/* Put channel into blocking mode. */
961#define TCL_MODE_NONBLOCKING 1		/* Put channel into nonblocking
962					 * mode. */
963
964/*
965 * Enum for different types of file paths.
966 */
967
968typedef enum Tcl_PathType {
969    TCL_PATH_ABSOLUTE,
970    TCL_PATH_RELATIVE,
971    TCL_PATH_VOLUME_RELATIVE
972} Tcl_PathType;
973
974/*
975 * Exported Tcl procedures:
976 */
977
978EXTERN void		Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
979			    char *message));
980EXTERN void		Tcl_AddObjErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
981			    char *message, int length));
982EXTERN void		Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
983EXTERN int		Tcl_AppendAllObjTypes _ANSI_ARGS_((
984			    Tcl_Interp *interp, Tcl_Obj *objPtr));
985EXTERN void		Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
986			    char *string));
987EXTERN void		Tcl_AppendResult _ANSI_ARGS_(
988			    TCL_VARARGS(Tcl_Interp *,interp));
989EXTERN void		Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj *objPtr,
990			    char *bytes, int length));
991EXTERN void		Tcl_AppendStringsToObj _ANSI_ARGS_(
992			    TCL_VARARGS(Tcl_Obj *,interp));
993EXTERN int		Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
994EXTERN Tcl_AsyncHandler	Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
995			    ClientData clientData));
996EXTERN void		Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
997EXTERN int		Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
998			    int code));
999EXTERN void		Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
1000EXTERN int		Tcl_AsyncReady _ANSI_ARGS_((void));
1001EXTERN void		Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp *interp));
1002EXTERN char		Tcl_Backslash _ANSI_ARGS_((CONST char *src,
1003			    int *readPtr));
1004EXTERN int		Tcl_BadChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
1005			    char *optionName, char *optionList));
1006EXTERN void		Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
1007			    Tcl_InterpDeleteProc *proc,
1008			    ClientData clientData));
1009EXTERN void		Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
1010			    ClientData clientData));
1011#define Tcl_Ckalloc Tcl_Alloc
1012#define Tcl_Ckfree Tcl_Free
1013#define Tcl_Ckrealloc Tcl_Realloc
1014EXTERN int		Tcl_Close _ANSI_ARGS_((Tcl_Interp *interp,
1015        		    Tcl_Channel chan));
1016EXTERN int		Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
1017EXTERN char *		Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
1018EXTERN Tcl_Obj *	Tcl_ConcatObj _ANSI_ARGS_((int objc,
1019			    Tcl_Obj *CONST objv[]));
1020EXTERN int		Tcl_ConvertCountedElement _ANSI_ARGS_((CONST char *src,
1021			    int length, char *dst, int flags));
1022EXTERN int		Tcl_ConvertElement _ANSI_ARGS_((CONST char *src,
1023			    char *dst, int flags));
1024EXTERN int		Tcl_ConvertToType _ANSI_ARGS_((Tcl_Interp *interp,
1025			    Tcl_Obj *objPtr, Tcl_ObjType *typePtr));
1026EXTERN int		Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp *slave,
1027			    char *slaveCmd, Tcl_Interp *target,
1028        		    char *targetCmd, int argc, char **argv));
1029EXTERN int		Tcl_CreateAliasObj _ANSI_ARGS_((Tcl_Interp *slave,
1030			    char *slaveCmd, Tcl_Interp *target,
1031        		    char *targetCmd, int objc,
1032		            Tcl_Obj *CONST objv[]));
1033EXTERN Tcl_Channel	Tcl_CreateChannel _ANSI_ARGS_((
1034    			    Tcl_ChannelType *typePtr, char *chanName,
1035                            ClientData instanceData, int mask));
1036EXTERN void		Tcl_CreateChannelHandler _ANSI_ARGS_((
1037			    Tcl_Channel chan, int mask,
1038                            Tcl_ChannelProc *proc, ClientData clientData));
1039EXTERN void		Tcl_CreateCloseHandler _ANSI_ARGS_((
1040			    Tcl_Channel chan, Tcl_CloseProc *proc,
1041                            ClientData clientData));
1042EXTERN Tcl_Command	Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
1043			    char *cmdName, Tcl_CmdProc *proc,
1044			    ClientData clientData,
1045			    Tcl_CmdDeleteProc *deleteProc));
1046EXTERN void		Tcl_CreateEventSource _ANSI_ARGS_((
1047			    Tcl_EventSetupProc *setupProc,
1048			    Tcl_EventCheckProc *checkProc,
1049			    ClientData clientData));
1050EXTERN void		Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
1051			    ClientData clientData));
1052EXTERN void		Tcl_CreateFileHandler _ANSI_ARGS_((
1053    			    int fd, int mask, Tcl_FileProc *proc,
1054			    ClientData clientData));
1055EXTERN Tcl_Interp *	Tcl_CreateInterp _ANSI_ARGS_((void));
1056EXTERN void		Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
1057			    char *name, int numArgs, Tcl_ValueType *argTypes,
1058			    Tcl_MathProc *proc, ClientData clientData));
1059EXTERN Tcl_Command	Tcl_CreateObjCommand _ANSI_ARGS_((
1060			    Tcl_Interp *interp, char *cmdName,
1061			    Tcl_ObjCmdProc *proc, ClientData clientData,
1062			    Tcl_CmdDeleteProc *deleteProc));
1063EXTERN Tcl_Interp *	Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp *interp,
1064		            char *slaveName, int isSafe));
1065EXTERN Tcl_TimerToken	Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
1066			    Tcl_TimerProc *proc, ClientData clientData));
1067EXTERN Tcl_Trace	Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
1068			    int level, Tcl_CmdTraceProc *proc,
1069			    ClientData clientData));
1070EXTERN char *		Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
1071			    char *file, int line));
1072EXTERN int		Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
1073			    char *file, int line));
1074EXTERN char *		Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
1075			    unsigned int size, char *file, int line));
1076EXTERN void		Tcl_DbDecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
1077			    char *file, int line));
1078EXTERN void		Tcl_DbIncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
1079			    char *file, int line));
1080EXTERN int		Tcl_DbIsShared _ANSI_ARGS_((Tcl_Obj *objPtr,
1081			    char *file, int line));
1082EXTERN Tcl_Obj *	Tcl_DbNewBooleanObj _ANSI_ARGS_((int boolValue,
1083                            char *file, int line));
1084EXTERN Tcl_Obj *	Tcl_DbNewDoubleObj _ANSI_ARGS_((double doubleValue,
1085                            char *file, int line));
1086EXTERN Tcl_Obj *	Tcl_DbNewListObj _ANSI_ARGS_((int objc,
1087			    Tcl_Obj *CONST objv[], char *file, int line));
1088EXTERN Tcl_Obj *	Tcl_DbNewLongObj _ANSI_ARGS_((long longValue,
1089                            char *file, int line));
1090EXTERN Tcl_Obj *	Tcl_DbNewObj _ANSI_ARGS_((char *file, int line));
1091EXTERN Tcl_Obj *	Tcl_DbNewStringObj _ANSI_ARGS_((char *bytes,
1092			    int length, char *file, int line));
1093EXTERN void		Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1094                            char *name));
1095EXTERN int		Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
1096			    char *cmdName));
1097EXTERN int		Tcl_DeleteCommandFromToken _ANSI_ARGS_((
1098			    Tcl_Interp *interp, Tcl_Command command));
1099EXTERN void		Tcl_DeleteChannelHandler _ANSI_ARGS_((
1100    			    Tcl_Channel chan, Tcl_ChannelProc *proc,
1101                            ClientData clientData));
1102EXTERN void		Tcl_DeleteCloseHandler _ANSI_ARGS_((
1103			    Tcl_Channel chan, Tcl_CloseProc *proc,
1104                            ClientData clientData));
1105EXTERN void		Tcl_DeleteEvents _ANSI_ARGS_((
1106			    Tcl_EventDeleteProc *proc,
1107                            ClientData clientData));
1108EXTERN void		Tcl_DeleteEventSource _ANSI_ARGS_((
1109			    Tcl_EventSetupProc *setupProc,
1110			    Tcl_EventCheckProc *checkProc,
1111			    ClientData clientData));
1112EXTERN void		Tcl_DeleteExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
1113			    ClientData clientData));
1114EXTERN void		Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
1115EXTERN void		Tcl_DeleteHashEntry _ANSI_ARGS_((
1116			    Tcl_HashEntry *entryPtr));
1117EXTERN void		Tcl_DeleteHashTable _ANSI_ARGS_((
1118			    Tcl_HashTable *tablePtr));
1119EXTERN void		Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
1120EXTERN void		Tcl_DeleteTimerHandler _ANSI_ARGS_((
1121			    Tcl_TimerToken token));
1122EXTERN void		Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
1123			    Tcl_Trace trace));
1124EXTERN void		Tcl_DetachPids _ANSI_ARGS_((int numPids, Tcl_Pid *pidPtr));
1125EXTERN void		Tcl_DontCallWhenDeleted _ANSI_ARGS_((
1126			    Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
1127			    ClientData clientData));
1128EXTERN int		Tcl_DoOneEvent _ANSI_ARGS_((int flags));
1129EXTERN void		Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
1130			    ClientData clientData));
1131EXTERN char *		Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
1132			    CONST char *string, int length));
1133EXTERN char *		Tcl_DStringAppendElement _ANSI_ARGS_((
1134			    Tcl_DString *dsPtr, CONST char *string));
1135EXTERN void		Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
1136EXTERN void		Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
1137EXTERN void		Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
1138			    Tcl_DString *dsPtr));
1139EXTERN void		Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
1140EXTERN void		Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
1141			    Tcl_DString *dsPtr));
1142EXTERN void		Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
1143			    int length));
1144EXTERN void		Tcl_DStringStartSublist _ANSI_ARGS_((
1145			    Tcl_DString *dsPtr));
1146EXTERN Tcl_Obj *	Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr));
1147EXTERN int		Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
1148EXTERN char *		Tcl_ErrnoId _ANSI_ARGS_((void));
1149EXTERN char *		Tcl_ErrnoMsg _ANSI_ARGS_((int err));
1150EXTERN int		Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
1151			    char *string));
1152EXTERN int		Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
1153			    char *fileName));
1154EXTERN void		Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
1155			    Tcl_FreeProc *freeProc));
1156EXTERN int		Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp *interp,
1157			    Tcl_Obj *objPtr));
1158EXTERN void		Tcl_Exit _ANSI_ARGS_((int status));
1159EXTERN int		Tcl_ExposeCommand _ANSI_ARGS_((Tcl_Interp *interp,
1160        		    char *hiddenCmdToken, char *cmdName));
1161EXTERN int		Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
1162			    char *string, int *ptr));
1163EXTERN int		Tcl_ExprBooleanObj _ANSI_ARGS_((Tcl_Interp *interp,
1164			    Tcl_Obj *objPtr, int *ptr));
1165EXTERN int		Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
1166			    char *string, double *ptr));
1167EXTERN int		Tcl_ExprDoubleObj _ANSI_ARGS_((Tcl_Interp *interp,
1168			    Tcl_Obj *objPtr, double *ptr));
1169EXTERN int		Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
1170			    char *string, long *ptr));
1171EXTERN int		Tcl_ExprLongObj _ANSI_ARGS_((Tcl_Interp *interp,
1172			    Tcl_Obj *objPtr, long *ptr));
1173EXTERN int		Tcl_ExprObj _ANSI_ARGS_((Tcl_Interp *interp,
1174			    Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr));
1175EXTERN int		Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
1176			    char *string));
1177EXTERN void		Tcl_Finalize _ANSI_ARGS_((void));
1178EXTERN void		Tcl_FindExecutable _ANSI_ARGS_((char *argv0));
1179EXTERN Tcl_HashEntry *	Tcl_FirstHashEntry _ANSI_ARGS_((
1180			    Tcl_HashTable *tablePtr,
1181			    Tcl_HashSearch *searchPtr));
1182EXTERN int		Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
1183EXTERN void		TclFreeObj _ANSI_ARGS_((Tcl_Obj *objPtr));
1184EXTERN void		Tcl_FreeResult _ANSI_ARGS_((Tcl_Interp *interp));
1185EXTERN int		Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp *interp,
1186       			    char *slaveCmd, Tcl_Interp **targetInterpPtr,
1187                            char **targetCmdPtr, int *argcPtr,
1188			    char ***argvPtr));
1189EXTERN int		Tcl_GetAliasObj _ANSI_ARGS_((Tcl_Interp *interp,
1190       			    char *slaveCmd, Tcl_Interp **targetInterpPtr,
1191                            char **targetCmdPtr, int *objcPtr,
1192			    Tcl_Obj ***objv));
1193EXTERN ClientData	Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1194                            char *name, Tcl_InterpDeleteProc **procPtr));
1195EXTERN int		Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
1196			    char *string, int *boolPtr));
1197EXTERN int		Tcl_GetBooleanFromObj _ANSI_ARGS_((
1198			    Tcl_Interp *interp, Tcl_Obj *objPtr,
1199			    int *boolPtr));
1200EXTERN Tcl_Channel	Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp *interp,
1201	        	    char *chanName, int *modePtr));
1202EXTERN int		Tcl_GetChannelBufferSize _ANSI_ARGS_((
1203    			    Tcl_Channel chan));
1204EXTERN int		Tcl_GetChannelHandle _ANSI_ARGS_((Tcl_Channel chan,
1205	        	    int direction, ClientData *handlePtr));
1206EXTERN ClientData	Tcl_GetChannelInstanceData _ANSI_ARGS_((
1207    			    Tcl_Channel chan));
1208EXTERN int		Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
1209EXTERN char *		Tcl_GetChannelName _ANSI_ARGS_((Tcl_Channel chan));
1210EXTERN int		Tcl_GetChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
1211			    Tcl_Channel chan, char *optionName,
1212			    Tcl_DString *dsPtr));
1213EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
1214EXTERN int		Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
1215			    char *cmdName, Tcl_CmdInfo *infoPtr));
1216EXTERN char *		Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
1217			    Tcl_Command command));
1218EXTERN char *		Tcl_GetCwd _ANSI_ARGS_((char *buf, int len));
1219EXTERN int		Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
1220			    char *string, double *doublePtr));
1221EXTERN int		Tcl_GetDoubleFromObj _ANSI_ARGS_((
1222			    Tcl_Interp *interp, Tcl_Obj *objPtr,
1223			    double *doublePtr));
1224EXTERN int		Tcl_GetErrno _ANSI_ARGS_((void));
1225EXTERN int		Tcl_GetErrorLine _ANSI_ARGS_((Tcl_Interp *interp));
1226EXTERN char *		Tcl_GetHostName _ANSI_ARGS_((void));
1227EXTERN int		Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1228			    Tcl_Obj *objPtr, char **tablePtr, char *msg,
1229			    int flags, int *indexPtr));
1230EXTERN int		Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
1231			    char *string, int *intPtr));
1232EXTERN int		Tcl_GetInterpPath _ANSI_ARGS_((Tcl_Interp *askInterp,
1233			    Tcl_Interp *slaveInterp));
1234EXTERN int		Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1235			    Tcl_Obj *objPtr, int *intPtr));
1236EXTERN int		Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1237			    Tcl_Obj *objPtr, long *longPtr));
1238EXTERN Tcl_Interp *	Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp));
1239EXTERN Tcl_Obj *	Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp *interp));
1240EXTERN Tcl_ObjType *	Tcl_GetObjType _ANSI_ARGS_((char *typeName));
1241EXTERN int		Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
1242			    char *string, int write, int checkUsage,
1243			    ClientData *filePtr));
1244EXTERN Tcl_Command	Tcl_GetOriginalCommand _ANSI_ARGS_((
1245			    Tcl_Command command));
1246EXTERN Tcl_PathType	Tcl_GetPathType _ANSI_ARGS_((char *path));
1247EXTERN int		Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
1248        		    Tcl_DString *dsPtr));
1249EXTERN int		Tcl_GetsObj _ANSI_ARGS_((Tcl_Channel chan,
1250        		    Tcl_Obj *objPtr));
1251EXTERN int		Tcl_GetServiceMode _ANSI_ARGS_((void));
1252EXTERN Tcl_Interp *	Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp *interp,
1253			    char *slaveName));
1254EXTERN Tcl_Channel	Tcl_GetStdChannel _ANSI_ARGS_((int type));
1255EXTERN char *		Tcl_GetStringFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1256			    int *lengthPtr));
1257EXTERN char *		Tcl_GetStringResult _ANSI_ARGS_((Tcl_Interp *interp));
1258EXTERN char *		Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
1259			    char *varName, int flags));
1260EXTERN char *		Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1261			    char *part1, char *part2, int flags));
1262EXTERN int		Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
1263			    char *command));
1264EXTERN int		Tcl_GlobalEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
1265			    Tcl_Obj *objPtr));
1266EXTERN char *		Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
1267EXTERN int		Tcl_HideCommand _ANSI_ARGS_((Tcl_Interp *interp,
1268		            char *cmdName, char *hiddenCmdToken));
1269EXTERN int		Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
1270EXTERN void		Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
1271			    int keyType));
1272EXTERN void		Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
1273EXTERN int		Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
1274EXTERN int		Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
1275EXTERN int		Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp *interp));
1276EXTERN int		Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp *interp));
1277EXTERN void		Tcl_InvalidateStringRep _ANSI_ARGS_((
1278			    Tcl_Obj *objPtr));
1279EXTERN char *		Tcl_JoinPath _ANSI_ARGS_((int argc, char **argv,
1280			    Tcl_DString *resultPtr));
1281EXTERN int		Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
1282			    char *varName, char *addr, int type));
1283EXTERN int		Tcl_ListObjAppendList _ANSI_ARGS_((
1284			    Tcl_Interp *interp, Tcl_Obj *listPtr,
1285			    Tcl_Obj *elemListPtr));
1286EXTERN int		Tcl_ListObjAppendElement _ANSI_ARGS_((
1287			    Tcl_Interp *interp, Tcl_Obj *listPtr,
1288			    Tcl_Obj *objPtr));
1289EXTERN int		Tcl_ListObjGetElements _ANSI_ARGS_((
1290			    Tcl_Interp *interp, Tcl_Obj *listPtr,
1291			    int *objcPtr, Tcl_Obj ***objvPtr));
1292EXTERN int		Tcl_ListObjIndex _ANSI_ARGS_((Tcl_Interp *interp,
1293			    Tcl_Obj *listPtr, int index,
1294			    Tcl_Obj **objPtrPtr));
1295EXTERN int		Tcl_ListObjLength _ANSI_ARGS_((Tcl_Interp *interp,
1296			    Tcl_Obj *listPtr, int *intPtr));
1297EXTERN int		Tcl_ListObjReplace _ANSI_ARGS_((Tcl_Interp *interp,
1298			    Tcl_Obj *listPtr, int first, int count,
1299			    int objc, Tcl_Obj *CONST objv[]));
1300EXTERN void		Tcl_Main _ANSI_ARGS_((int argc, char **argv,
1301			    Tcl_AppInitProc *appInitProc));
1302EXTERN Tcl_Channel	Tcl_MakeFileChannel _ANSI_ARGS_((ClientData handle,
1303			    int mode));
1304EXTERN int		Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp *interp));
1305EXTERN Tcl_Channel	Tcl_MakeTcpClientChannel _ANSI_ARGS_((
1306    			    ClientData tcpSocket));
1307EXTERN char *		Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
1308EXTERN Tcl_HashEntry *	Tcl_NextHashEntry _ANSI_ARGS_((
1309			    Tcl_HashSearch *searchPtr));
1310EXTERN void		Tcl_NotifyChannel _ANSI_ARGS_((Tcl_Channel channel,
1311			    int mask));
1312EXTERN Tcl_Obj *	Tcl_ObjGetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1313			    Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
1314			    int flags));
1315EXTERN Tcl_Obj *	Tcl_ObjSetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1316			    Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
1317			    Tcl_Obj *newValuePtr, int flags));
1318EXTERN Tcl_Channel	Tcl_OpenCommandChannel _ANSI_ARGS_((
1319    			    Tcl_Interp *interp, int argc, char **argv,
1320			    int flags));
1321EXTERN Tcl_Channel	Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
1322        		    char *fileName, char *modeString,
1323                            int permissions));
1324EXTERN Tcl_Channel	Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp *interp,
1325			    int port, char *address, char *myaddr,
1326		            int myport, int async));
1327EXTERN Tcl_Channel	Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp *interp,
1328		            int port, char *host,
1329        		    Tcl_TcpAcceptProc *acceptProc,
1330			    ClientData callbackData));
1331EXTERN char *		Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
1332			    char *string, char **termPtr));
1333EXTERN int		Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp *interp,
1334			    char *name, char *version));
1335EXTERN char *		Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp *interp,
1336			    char *name, char *version, int exact));
1337EXTERN char *		Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
1338EXTERN void		Tcl_Preserve _ANSI_ARGS_((ClientData data));
1339EXTERN void		Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
1340			    double value, char *dst));
1341EXTERN int		Tcl_PutEnv _ANSI_ARGS_((CONST char *string));
1342EXTERN void		Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
1343			    Tcl_QueuePosition position));
1344EXTERN int		Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
1345	        	    char *bufPtr, int toRead));
1346EXTERN void		Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
1347EXTERN int		Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
1348			    char *cmd, int flags));
1349EXTERN int		Tcl_RecordAndEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
1350			    Tcl_Obj *cmdPtr, int flags));
1351EXTERN Tcl_RegExp	Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
1352			    char *string));
1353EXTERN int		Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
1354			    Tcl_RegExp regexp, char *string, char *start));
1355EXTERN int		Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
1356			    char *string, char *pattern));
1357EXTERN void		Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
1358			    int index, char **startPtr, char **endPtr));
1359EXTERN void		Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
1360	        	    Tcl_Channel chan));
1361EXTERN void		Tcl_RegisterObjType _ANSI_ARGS_((
1362			    Tcl_ObjType *typePtr));
1363EXTERN void		Tcl_Release _ANSI_ARGS_((ClientData clientData));
1364EXTERN void		Tcl_RestartIdleTimer _ANSI_ARGS_((void));
1365EXTERN void		Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
1366#define Tcl_Return Tcl_SetResult
1367EXTERN int		Tcl_ScanCountedElement _ANSI_ARGS_((CONST char *string,
1368			    int length, int *flagPtr));
1369EXTERN int		Tcl_ScanElement _ANSI_ARGS_((CONST char *string,
1370			    int *flagPtr));
1371EXTERN int		Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
1372        		    int offset, int mode));
1373EXTERN int		Tcl_ServiceAll _ANSI_ARGS_((void));
1374EXTERN int		Tcl_ServiceEvent _ANSI_ARGS_((int flags));
1375EXTERN void		Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1376                            char *name, Tcl_InterpDeleteProc *proc,
1377                            ClientData clientData));
1378EXTERN void		Tcl_SetBooleanObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1379			    int boolValue));
1380EXTERN void		Tcl_SetChannelBufferSize _ANSI_ARGS_((
1381			    Tcl_Channel chan, int sz));
1382EXTERN int		Tcl_SetChannelOption _ANSI_ARGS_((
1383			    Tcl_Interp *interp, Tcl_Channel chan,
1384	        	    char *optionName, char *newValue));
1385EXTERN int		Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
1386			    char *cmdName, Tcl_CmdInfo *infoPtr));
1387EXTERN void		Tcl_SetDoubleObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1388			    double doubleValue));
1389EXTERN void		Tcl_SetErrno _ANSI_ARGS_((int err));
1390EXTERN void		Tcl_SetErrorCode _ANSI_ARGS_(
1391    			    TCL_VARARGS(Tcl_Interp *,arg1));
1392EXTERN void		Tcl_SetIntObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1393			    int intValue));
1394EXTERN void		Tcl_SetListObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1395			    int objc, Tcl_Obj *CONST objv[]));
1396EXTERN void		Tcl_SetLongObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1397			    long longValue));
1398EXTERN void		Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
1399EXTERN void		Tcl_SetObjErrorCode _ANSI_ARGS_((Tcl_Interp *interp,
1400			    Tcl_Obj *errorObjPtr));
1401EXTERN void		Tcl_SetObjLength _ANSI_ARGS_((Tcl_Obj *objPtr,
1402			    int length));
1403EXTERN void		Tcl_SetObjResult _ANSI_ARGS_((Tcl_Interp *interp,
1404			    Tcl_Obj *resultObjPtr));
1405EXTERN void		Tcl_SetPanicProc _ANSI_ARGS_((void (*proc)
1406			    _ANSI_ARGS_(TCL_VARARGS(char *, format))));
1407EXTERN int		Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
1408			    int depth));
1409EXTERN void		Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
1410			    char *string, Tcl_FreeProc *freeProc));
1411EXTERN int		Tcl_SetServiceMode _ANSI_ARGS_((int mode));
1412EXTERN void		Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
1413			    int type));
1414EXTERN void		Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1415			    char *bytes, int length));
1416EXTERN void		Tcl_SetTimer _ANSI_ARGS_((Tcl_Time *timePtr));
1417EXTERN char *		Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
1418			    char *varName, char *newValue, int flags));
1419EXTERN char *		Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1420			    char *part1, char *part2, char *newValue,
1421			    int flags));
1422EXTERN char *		Tcl_SignalId _ANSI_ARGS_((int sig));
1423EXTERN char *		Tcl_SignalMsg _ANSI_ARGS_((int sig));
1424EXTERN void		Tcl_Sleep _ANSI_ARGS_((int ms));
1425EXTERN void		Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
1426EXTERN int		Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
1427			    char *list, int *argcPtr, char ***argvPtr));
1428EXTERN void		Tcl_SplitPath _ANSI_ARGS_((char *path,
1429			    int *argcPtr, char ***argvPtr));
1430EXTERN void		Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp *interp,
1431			    char *pkgName, Tcl_PackageInitProc *initProc,
1432			    Tcl_PackageInitProc *safeInitProc));
1433EXTERN int		Tcl_StringMatch _ANSI_ARGS_((char *string,
1434			    char *pattern));
1435EXTERN int		Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
1436#define Tcl_TildeSubst Tcl_TranslateFileName
1437EXTERN int		Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
1438			    char *varName, int flags, Tcl_VarTraceProc *proc,
1439			    ClientData clientData));
1440EXTERN int		Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1441			    char *part1, char *part2, int flags,
1442			    Tcl_VarTraceProc *proc, ClientData clientData));
1443EXTERN char *		Tcl_TranslateFileName _ANSI_ARGS_((Tcl_Interp *interp,
1444			    char *name, Tcl_DString *bufferPtr));
1445EXTERN int		Tcl_Ungets _ANSI_ARGS_((Tcl_Channel chan, char *str,
1446			    int len, int atHead));
1447EXTERN void		Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
1448			    char *varName));
1449EXTERN int		Tcl_UnregisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
1450			    Tcl_Channel chan));
1451EXTERN int		Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
1452			    char *varName, int flags));
1453EXTERN int		Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1454			    char *part1, char *part2, int flags));
1455EXTERN void		Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
1456			    char *varName, int flags, Tcl_VarTraceProc *proc,
1457			    ClientData clientData));
1458EXTERN void		Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1459			    char *part1, char *part2, int flags,
1460			    Tcl_VarTraceProc *proc, ClientData clientData));
1461EXTERN void		Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp *interp,
1462			    char *varName));
1463EXTERN int		Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
1464			    char *frameName, char *varName,
1465			    char *localName, int flags));
1466EXTERN int		Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1467			    char *frameName, char *part1, char *part2,
1468			    char *localName, int flags));
1469EXTERN int		Tcl_VarEval _ANSI_ARGS_(
1470    			    TCL_VARARGS(Tcl_Interp *,interp));
1471EXTERN ClientData	Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
1472			    char *varName, int flags,
1473			    Tcl_VarTraceProc *procPtr,
1474			    ClientData prevClientData));
1475EXTERN ClientData	Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
1476			    char *part1, char *part2, int flags,
1477			    Tcl_VarTraceProc *procPtr,
1478			    ClientData prevClientData));
1479EXTERN int		Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time *timePtr));
1480EXTERN Tcl_Pid		Tcl_WaitPid _ANSI_ARGS_((Tcl_Pid pid, int *statPtr,
1481			    int options));
1482EXTERN int		Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
1483			    char *s, int slen));
1484EXTERN void		Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp *interp,
1485			    int objc, Tcl_Obj *CONST objv[], char *message));
1486
1487#endif /* RESOURCE_INCLUDED */
1488#endif /* _TCL */
1489