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