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
177 typedef char CHAR;
178 typedef short SHORT;
179 typedef 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 
219 typedef 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 
235 typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
236 typedef struct Tcl_Channel_ *Tcl_Channel;
237 typedef struct Tcl_Command_ *Tcl_Command;
238 typedef struct Tcl_Event Tcl_Event;
239 typedef struct Tcl_Pid_ *Tcl_Pid;
240 typedef struct Tcl_RegExp_ *Tcl_RegExp;
241 typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
242 typedef struct Tcl_Trace_ *Tcl_Trace;
243 typedef 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 
278 typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
279 typedef 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 
292 struct Tcl_Obj;
293 
294 /*
295  * Procedure types defined by Tcl:
296  */
297 
298 typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
299 typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
300 	Tcl_Interp *interp, int code));
301 typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask));
302 typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
303 typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
304 typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
305 	Tcl_Interp *interp, int argc, char *argv[]));
306 typedef 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[]));
309 typedef void (Tcl_DupInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *srcPtr,
310         struct Tcl_Obj *dupPtr));
311 typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags));
312 typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData,
313 	int flags));
314 typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr,
315         ClientData clientData));
316 typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData,
317 	int flags));
318 typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData));
319 typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask));
320 typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData));
321 typedef void (Tcl_FreeInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
322 typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
323 typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData));
324 typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
325 	Tcl_Interp *interp));
326 typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
327 	Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
328 typedef void (Tcl_NamespaceDeleteProc) _ANSI_ARGS_((ClientData clientData));
329 typedef int (Tcl_ObjCmdProc) _ANSI_ARGS_((ClientData clientData,
330 	Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST objv[]));
331 typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
332 typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData,
333         Tcl_Channel chan, char *address, int port));
334 typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData));
335 typedef int (Tcl_SetFromAnyProc) _ANSI_ARGS_((Tcl_Interp *interp,
336 	struct Tcl_Obj *objPtr));
337 typedef void (Tcl_UpdateStringProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
338 typedef 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 
347 typedef 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 
372 typedef struct Tcl_Obj {
373     int refCount;		/* When 0 the object will be freed. */
374     char *bytes;		/* This points to the first byte of the
375 				 * object's string representation. The array
376 				 * must be followed by a null byte (i.e., at
377 				 * offset length) but may also contain
378 				 * embedded null characters. The array's
379 				 * storage is allocated by ckalloc. NULL
380 				 * means the string rep is invalid and must
381 				 * be regenerated from the internal rep.
382 				 * Clients should use Tcl_GetStringFromObj
383 				 * to get a pointer to the byte array as a
384 				 * readonly value. */
385     int length;			/* The number of bytes at *bytes, not
386 				 * including the terminating null. */
387     Tcl_ObjType *typePtr;	/* Denotes the object's type. Always
388 				 * corresponds to the type of the object's
389 				 * internal rep. NULL indicates the object
390 				 * has no internal rep (has no type). */
391     union {			/* The internal representation: */
392 	long longValue;		/*   - an long integer value */
393 	double doubleValue;	/*   - a double-precision floating value */
394 	VOID *otherValuePtr;	/*   - another, type-specific value */
395 	struct {		/*   - internal rep as two pointers */
396 	    VOID *ptr1;
397 	    VOID *ptr2;
398 	} twoPtrValue;
399     } internalRep;
400 } Tcl_Obj;
401 
402 /*
403  * Macros to increment and decrement a Tcl_Obj's reference count, and to
404  * test whether an object is shared (i.e. has reference count > 1).
405  * Note: clients should use Tcl_DecrRefCount() when they are finished using
406  * an object, and should never call TclFreeObj() directly. TclFreeObj() is
407  * only defined and made public in tcl.h to support Tcl_DecrRefCount's macro
408  * definition. Note also that Tcl_DecrRefCount() refers to the parameter
409  * "obj" twice. This means that you should avoid calling it with an
410  * expression that is expensive to compute or has side effects.
411  */
412 
413 EXTERN void		Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
414 EXTERN void		Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
415 EXTERN 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 
439 EXTERN Tcl_Obj *	Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));
440 EXTERN Tcl_Obj *	Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));
441 EXTERN Tcl_Obj *	Tcl_NewIntObj _ANSI_ARGS_((int intValue));
442 EXTERN Tcl_Obj *	Tcl_NewListObj _ANSI_ARGS_((int objc,
443 			    Tcl_Obj *CONST objv[]));
444 EXTERN Tcl_Obj *	Tcl_NewLongObj _ANSI_ARGS_((long longValue));
445 EXTERN Tcl_Obj *	Tcl_NewObj _ANSI_ARGS_((void));
446 EXTERN 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 
472 typedef 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 
512 typedef 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 
541 typedef 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
569 typedef 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 
659 EXTERN char *		Tcl_Alloc _ANSI_ARGS_((unsigned int size));
660 EXTERN void		Tcl_Free _ANSI_ARGS_((char *ptr));
661 EXTERN 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 
673 EXTERN int		Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
674 EXTERN 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
700 struct 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 
709 typedef 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
738 typedef 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 
773 typedef 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 
830 struct 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 
839 typedef 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 
858 typedef 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 
887 typedef int	(Tcl_DriverBlockModeProc) _ANSI_ARGS_((
888 		    ClientData instanceData, int mode));
889 typedef int	(Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,
890 		    Tcl_Interp *interp));
891 typedef int	(Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,
892 		    char *buf, int toRead, int *errorCodePtr));
893 typedef int	(Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
894 		    char *buf, int toWrite, int *errorCodePtr));
895 typedef int	(Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
896 		    long offset, int mode, int *errorCodePtr));
897 typedef int	(Tcl_DriverSetOptionProc) _ANSI_ARGS_((
898 		    ClientData instanceData, Tcl_Interp *interp,
899 	            char *optionName, char *value));
900 typedef int	(Tcl_DriverGetOptionProc) _ANSI_ARGS_((
901 		    ClientData instanceData, Tcl_Interp *interp,
902 		    char *optionName, Tcl_DString *dsPtr));
903 typedef void	(Tcl_DriverWatchProc) _ANSI_ARGS_((
904 		    ClientData instanceData, int mask));
905 typedef 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 
913 typedef 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  * Andreas Kupries <andreas_kupries@users.sourceforge.net>, 05/31/1997.
922  * Support of Tcl-Trf (binio).
923  *
924  * Enum for different byteorders.
925  */
926 
927 typedef enum Tcl_ByteOrder {
928   TCL_BIGENDIAN,       /* Multibyte words are stored with MSB first */
929   TCL_SMALLENDIAN      /* Multibyte words are stored with MSB last */
930 } Tcl_ByteOrder;
931 
932 /*
933  * struct Tcl_ChannelType:
934  *
935  * One such structure exists for each type (kind) of channel.
936  * It collects together in one place all the functions that are
937  * part of the specific channel type.
938  */
939 
940 typedef struct Tcl_ChannelType {
941     char *typeName;			/* The name of the channel type in Tcl
942                                          * commands. This storage is owned by
943                                          * channel type. */
944     Tcl_DriverBlockModeProc *blockModeProc;
945     					/* Set blocking mode for the
946                                          * raw channel. May be NULL. */
947     Tcl_DriverCloseProc *closeProc;	/* Procedure to call to close
948                                          * the channel. */
949     Tcl_DriverInputProc *inputProc;	/* Procedure to call for input
950                                          * on channel. */
951     Tcl_DriverOutputProc *outputProc;	/* Procedure to call for output
952                                          * on channel. */
953     Tcl_DriverSeekProc *seekProc;	/* Procedure to call to seek
954                                          * on the channel. May be NULL. */
955     Tcl_DriverSetOptionProc *setOptionProc;
956     					/* Set an option on a channel. */
957     Tcl_DriverGetOptionProc *getOptionProc;
958     					/* Get an option from a channel. */
959     Tcl_DriverWatchProc *watchProc;	/* Set up the notifier to watch
960                                          * for events on this channel. */
961     Tcl_DriverGetHandleProc *getHandleProc;
962 					/* Get an OS handle from the channel
963                                          * or NULL if not supported. */
964 } Tcl_ChannelType;
965 
966 /*
967  * The following flags determine whether the blockModeProc above should
968  * set the channel into blocking or nonblocking mode. They are passed
969  * as arguments to the blockModeProc procedure in the above structure.
970  */
971 
972 #define TCL_MODE_BLOCKING 0		/* Put channel into blocking mode. */
973 #define TCL_MODE_NONBLOCKING 1		/* Put channel into nonblocking
974 					 * mode. */
975 
976 /*
977  * Enum for different types of file paths.
978  */
979 
980 typedef enum Tcl_PathType {
981     TCL_PATH_ABSOLUTE,
982     TCL_PATH_RELATIVE,
983     TCL_PATH_VOLUME_RELATIVE
984 } Tcl_PathType;
985 
986 /*
987  * Exported Tcl procedures:
988  */
989 
990 EXTERN void		Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
991 			    char *message));
992 EXTERN void		Tcl_AddObjErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
993 			    char *message, int length));
994 EXTERN void		Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
995 EXTERN int		Tcl_AppendAllObjTypes _ANSI_ARGS_((
996 			    Tcl_Interp *interp, Tcl_Obj *objPtr));
997 EXTERN void		Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
998 			    char *string));
999 EXTERN void		Tcl_AppendResult _ANSI_ARGS_(
1000 			    TCL_VARARGS(Tcl_Interp *,interp));
1001 EXTERN void		Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1002 			    char *bytes, int length));
1003 EXTERN void		Tcl_AppendStringsToObj _ANSI_ARGS_(
1004 			    TCL_VARARGS(Tcl_Obj *,interp));
1005 EXTERN int		Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
1006 EXTERN Tcl_AsyncHandler	Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
1007 			    ClientData clientData));
1008 EXTERN void		Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
1009 EXTERN int		Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
1010 			    int code));
1011 EXTERN void		Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
1012 EXTERN int		Tcl_AsyncReady _ANSI_ARGS_((void));
1013 EXTERN void		Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp *interp));
1014 EXTERN char		Tcl_Backslash _ANSI_ARGS_((CONST char *src,
1015 			    int *readPtr));
1016 EXTERN int		Tcl_BadChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
1017 			    char *optionName, char *optionList));
1018 EXTERN void		Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
1019 			    Tcl_InterpDeleteProc *proc,
1020 			    ClientData clientData));
1021 EXTERN void		Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
1022 			    ClientData clientData));
1023 #define Tcl_Ckalloc Tcl_Alloc
1024 #define Tcl_Ckfree Tcl_Free
1025 #define Tcl_Ckrealloc Tcl_Realloc
1026 EXTERN int		Tcl_Close _ANSI_ARGS_((Tcl_Interp *interp,
1027         		    Tcl_Channel chan));
1028 EXTERN int		Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
1029 EXTERN char *		Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
1030 EXTERN Tcl_Obj *	Tcl_ConcatObj _ANSI_ARGS_((int objc,
1031 			    Tcl_Obj *CONST objv[]));
1032 EXTERN int		Tcl_ConvertCountedElement _ANSI_ARGS_((CONST char *src,
1033 			    int length, char *dst, int flags));
1034 EXTERN int		Tcl_ConvertElement _ANSI_ARGS_((CONST char *src,
1035 			    char *dst, int flags));
1036 EXTERN int		Tcl_ConvertToType _ANSI_ARGS_((Tcl_Interp *interp,
1037 			    Tcl_Obj *objPtr, Tcl_ObjType *typePtr));
1038 EXTERN int		Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp *slave,
1039 			    char *slaveCmd, Tcl_Interp *target,
1040         		    char *targetCmd, int argc, char **argv));
1041 EXTERN int		Tcl_CreateAliasObj _ANSI_ARGS_((Tcl_Interp *slave,
1042 			    char *slaveCmd, Tcl_Interp *target,
1043         		    char *targetCmd, int objc,
1044 		            Tcl_Obj *CONST objv[]));
1045 EXTERN Tcl_Channel	Tcl_CreateChannel _ANSI_ARGS_((
1046     			    Tcl_ChannelType *typePtr, char *chanName,
1047                             ClientData instanceData, int mask));
1048 EXTERN void		Tcl_CreateChannelHandler _ANSI_ARGS_((
1049 			    Tcl_Channel chan, int mask,
1050                             Tcl_ChannelProc *proc, ClientData clientData));
1051 EXTERN void		Tcl_CreateCloseHandler _ANSI_ARGS_((
1052 			    Tcl_Channel chan, Tcl_CloseProc *proc,
1053                             ClientData clientData));
1054 EXTERN Tcl_Command	Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
1055 			    char *cmdName, Tcl_CmdProc *proc,
1056 			    ClientData clientData,
1057 			    Tcl_CmdDeleteProc *deleteProc));
1058 EXTERN void		Tcl_CreateEventSource _ANSI_ARGS_((
1059 			    Tcl_EventSetupProc *setupProc,
1060 			    Tcl_EventCheckProc *checkProc,
1061 			    ClientData clientData));
1062 EXTERN void		Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
1063 			    ClientData clientData));
1064 EXTERN void		Tcl_CreateFileHandler _ANSI_ARGS_((
1065     			    int fd, int mask, Tcl_FileProc *proc,
1066 			    ClientData clientData));
1067 EXTERN Tcl_Interp *	Tcl_CreateInterp _ANSI_ARGS_((void));
1068 EXTERN void		Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
1069 			    char *name, int numArgs, Tcl_ValueType *argTypes,
1070 			    Tcl_MathProc *proc, ClientData clientData));
1071 EXTERN Tcl_Command	Tcl_CreateObjCommand _ANSI_ARGS_((
1072 			    Tcl_Interp *interp, char *cmdName,
1073 			    Tcl_ObjCmdProc *proc, ClientData clientData,
1074 			    Tcl_CmdDeleteProc *deleteProc));
1075 EXTERN Tcl_Interp *	Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp *interp,
1076 		            char *slaveName, int isSafe));
1077 EXTERN Tcl_TimerToken	Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
1078 			    Tcl_TimerProc *proc, ClientData clientData));
1079 EXTERN Tcl_Trace	Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
1080 			    int level, Tcl_CmdTraceProc *proc,
1081 			    ClientData clientData));
1082 EXTERN char *		Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
1083 			    char *file, int line));
1084 EXTERN int		Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
1085 			    char *file, int line));
1086 EXTERN char *		Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
1087 			    unsigned int size, char *file, int line));
1088 EXTERN void		Tcl_DbDecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
1089 			    char *file, int line));
1090 EXTERN void		Tcl_DbIncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
1091 			    char *file, int line));
1092 EXTERN int		Tcl_DbIsShared _ANSI_ARGS_((Tcl_Obj *objPtr,
1093 			    char *file, int line));
1094 EXTERN Tcl_Obj *	Tcl_DbNewBooleanObj _ANSI_ARGS_((int boolValue,
1095                             char *file, int line));
1096 EXTERN Tcl_Obj *	Tcl_DbNewDoubleObj _ANSI_ARGS_((double doubleValue,
1097                             char *file, int line));
1098 EXTERN Tcl_Obj *	Tcl_DbNewListObj _ANSI_ARGS_((int objc,
1099 			    Tcl_Obj *CONST objv[], char *file, int line));
1100 EXTERN Tcl_Obj *	Tcl_DbNewLongObj _ANSI_ARGS_((long longValue,
1101                             char *file, int line));
1102 EXTERN Tcl_Obj *	Tcl_DbNewObj _ANSI_ARGS_((char *file, int line));
1103 EXTERN Tcl_Obj *	Tcl_DbNewStringObj _ANSI_ARGS_((char *bytes,
1104 			    int length, char *file, int line));
1105 EXTERN void		Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1106                             char *name));
1107 EXTERN int		Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
1108 			    char *cmdName));
1109 EXTERN int		Tcl_DeleteCommandFromToken _ANSI_ARGS_((
1110 			    Tcl_Interp *interp, Tcl_Command command));
1111 EXTERN void		Tcl_DeleteChannelHandler _ANSI_ARGS_((
1112     			    Tcl_Channel chan, Tcl_ChannelProc *proc,
1113                             ClientData clientData));
1114 EXTERN void		Tcl_DeleteCloseHandler _ANSI_ARGS_((
1115 			    Tcl_Channel chan, Tcl_CloseProc *proc,
1116                             ClientData clientData));
1117 EXTERN void		Tcl_DeleteEvents _ANSI_ARGS_((
1118 			    Tcl_EventDeleteProc *proc,
1119                             ClientData clientData));
1120 EXTERN void		Tcl_DeleteEventSource _ANSI_ARGS_((
1121 			    Tcl_EventSetupProc *setupProc,
1122 			    Tcl_EventCheckProc *checkProc,
1123 			    ClientData clientData));
1124 EXTERN void		Tcl_DeleteExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
1125 			    ClientData clientData));
1126 EXTERN void		Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
1127 EXTERN void		Tcl_DeleteHashEntry _ANSI_ARGS_((
1128 			    Tcl_HashEntry *entryPtr));
1129 EXTERN void		Tcl_DeleteHashTable _ANSI_ARGS_((
1130 			    Tcl_HashTable *tablePtr));
1131 EXTERN void		Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
1132 EXTERN void		Tcl_DeleteTimerHandler _ANSI_ARGS_((
1133 			    Tcl_TimerToken token));
1134 EXTERN void		Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
1135 			    Tcl_Trace trace));
1136 EXTERN void		Tcl_DetachPids _ANSI_ARGS_((int numPids, Tcl_Pid *pidPtr));
1137 EXTERN void		Tcl_DontCallWhenDeleted _ANSI_ARGS_((
1138 			    Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
1139 			    ClientData clientData));
1140 EXTERN int		Tcl_DoOneEvent _ANSI_ARGS_((int flags));
1141 EXTERN void		Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
1142 			    ClientData clientData));
1143 EXTERN char *		Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
1144 			    CONST char *string, int length));
1145 EXTERN char *		Tcl_DStringAppendElement _ANSI_ARGS_((
1146 			    Tcl_DString *dsPtr, CONST char *string));
1147 EXTERN void		Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
1148 EXTERN void		Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
1149 EXTERN void		Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
1150 			    Tcl_DString *dsPtr));
1151 EXTERN void		Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
1152 EXTERN void		Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
1153 			    Tcl_DString *dsPtr));
1154 EXTERN void		Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
1155 			    int length));
1156 EXTERN void		Tcl_DStringStartSublist _ANSI_ARGS_((
1157 			    Tcl_DString *dsPtr));
1158 EXTERN Tcl_Obj *	Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr));
1159 EXTERN int		Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
1160 EXTERN char *		Tcl_ErrnoId _ANSI_ARGS_((void));
1161 EXTERN char *		Tcl_ErrnoMsg _ANSI_ARGS_((int err));
1162 EXTERN int		Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
1163 			    char *string));
1164 EXTERN int		Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
1165 			    char *fileName));
1166 EXTERN void		Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
1167 			    Tcl_FreeProc *freeProc));
1168 EXTERN int		Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp *interp,
1169 			    Tcl_Obj *objPtr));
1170 EXTERN void		Tcl_Exit _ANSI_ARGS_((int status));
1171 EXTERN int		Tcl_ExposeCommand _ANSI_ARGS_((Tcl_Interp *interp,
1172         		    char *hiddenCmdToken, char *cmdName));
1173 EXTERN int		Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
1174 			    char *string, int *ptr));
1175 EXTERN int		Tcl_ExprBooleanObj _ANSI_ARGS_((Tcl_Interp *interp,
1176 			    Tcl_Obj *objPtr, int *ptr));
1177 EXTERN int		Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
1178 			    char *string, double *ptr));
1179 EXTERN int		Tcl_ExprDoubleObj _ANSI_ARGS_((Tcl_Interp *interp,
1180 			    Tcl_Obj *objPtr, double *ptr));
1181 EXTERN int		Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
1182 			    char *string, long *ptr));
1183 EXTERN int		Tcl_ExprLongObj _ANSI_ARGS_((Tcl_Interp *interp,
1184 			    Tcl_Obj *objPtr, long *ptr));
1185 EXTERN int		Tcl_ExprObj _ANSI_ARGS_((Tcl_Interp *interp,
1186 			    Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr));
1187 EXTERN int		Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
1188 			    char *string));
1189 EXTERN void		Tcl_Finalize _ANSI_ARGS_((void));
1190 EXTERN void		Tcl_FindExecutable _ANSI_ARGS_((char *argv0));
1191 EXTERN Tcl_HashEntry *	Tcl_FirstHashEntry _ANSI_ARGS_((
1192 			    Tcl_HashTable *tablePtr,
1193 			    Tcl_HashSearch *searchPtr));
1194 EXTERN int		Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
1195 EXTERN void		TclFreeObj _ANSI_ARGS_((Tcl_Obj *objPtr));
1196 EXTERN void		Tcl_FreeResult _ANSI_ARGS_((Tcl_Interp *interp));
1197 EXTERN int		Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp *interp,
1198        			    char *slaveCmd, Tcl_Interp **targetInterpPtr,
1199                             char **targetCmdPtr, int *argcPtr,
1200 			    char ***argvPtr));
1201 EXTERN int		Tcl_GetAliasObj _ANSI_ARGS_((Tcl_Interp *interp,
1202        			    char *slaveCmd, Tcl_Interp **targetInterpPtr,
1203                             char **targetCmdPtr, int *objcPtr,
1204 			    Tcl_Obj ***objv));
1205 EXTERN ClientData	Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1206                             char *name, Tcl_InterpDeleteProc **procPtr));
1207 EXTERN int		Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
1208 			    char *string, int *boolPtr));
1209 EXTERN int		Tcl_GetBooleanFromObj _ANSI_ARGS_((
1210 			    Tcl_Interp *interp, Tcl_Obj *objPtr,
1211 			    int *boolPtr));
1212 EXTERN Tcl_Channel	Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp *interp,
1213 	        	    char *chanName, int *modePtr));
1214 EXTERN int		Tcl_GetChannelBufferSize _ANSI_ARGS_((
1215     			    Tcl_Channel chan));
1216   /* Andreas Kupries <andreas_kupries@users.sourceforge.net>, 05/31/1997.
1217    * Support of Tcl-Trf (binio).
1218    */
1219 EXTERN Tcl_ByteOrder	Tcl_GetChannelByteorder _ANSI_ARGS_((
1220     			    Tcl_Channel chan));
1221 EXTERN Tcl_ByteOrder	Tcl_GetHostByteorder _ANSI_ARGS_((void));
1222 EXTERN int		Tcl_GetChannelHandle _ANSI_ARGS_((Tcl_Channel chan,
1223 	        	    int direction, ClientData *handlePtr));
1224 EXTERN ClientData	Tcl_GetChannelInstanceData _ANSI_ARGS_((
1225     			    Tcl_Channel chan));
1226 EXTERN int		Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
1227 EXTERN char *		Tcl_GetChannelName _ANSI_ARGS_((Tcl_Channel chan));
1228 EXTERN int		Tcl_GetChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
1229 			    Tcl_Channel chan, char *optionName,
1230 			    Tcl_DString *dsPtr));
1231 EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
1232 EXTERN int		Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
1233 			    char *cmdName, Tcl_CmdInfo *infoPtr));
1234 EXTERN char *		Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
1235 			    Tcl_Command command));
1236 EXTERN char *		Tcl_GetCwd _ANSI_ARGS_((char *buf, int len));
1237 EXTERN int		Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
1238 			    char *string, double *doublePtr));
1239 EXTERN int		Tcl_GetDoubleFromObj _ANSI_ARGS_((
1240 			    Tcl_Interp *interp, Tcl_Obj *objPtr,
1241 			    double *doublePtr));
1242 EXTERN int		Tcl_GetErrno _ANSI_ARGS_((void));
1243 EXTERN int		Tcl_GetErrorLine _ANSI_ARGS_((Tcl_Interp *interp));
1244 EXTERN char *		Tcl_GetHostName _ANSI_ARGS_((void));
1245 EXTERN int		Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1246 			    Tcl_Obj *objPtr, char **tablePtr, char *msg,
1247 			    int flags, int *indexPtr));
1248 EXTERN int		Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
1249 			    char *string, int *intPtr));
1250 EXTERN int		Tcl_GetInterpPath _ANSI_ARGS_((Tcl_Interp *askInterp,
1251 			    Tcl_Interp *slaveInterp));
1252 EXTERN int		Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1253 			    Tcl_Obj *objPtr, int *intPtr));
1254 EXTERN int		Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1255 			    Tcl_Obj *objPtr, long *longPtr));
1256 EXTERN Tcl_Interp *	Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp));
1257 EXTERN Tcl_Obj *	Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp *interp));
1258 EXTERN Tcl_ObjType *	Tcl_GetObjType _ANSI_ARGS_((char *typeName));
1259 EXTERN int		Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
1260 			    char *string, int write, int checkUsage,
1261 			    ClientData *filePtr));
1262 EXTERN Tcl_Command	Tcl_GetOriginalCommand _ANSI_ARGS_((
1263 			    Tcl_Command command));
1264 EXTERN Tcl_PathType	Tcl_GetPathType _ANSI_ARGS_((char *path));
1265 EXTERN int		Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
1266         		    Tcl_DString *dsPtr));
1267 EXTERN int		Tcl_GetsObj _ANSI_ARGS_((Tcl_Channel chan,
1268         		    Tcl_Obj *objPtr));
1269 EXTERN int		Tcl_GetServiceMode _ANSI_ARGS_((void));
1270 EXTERN Tcl_Interp *	Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp *interp,
1271 			    char *slaveName));
1272 EXTERN Tcl_Channel	Tcl_GetStdChannel _ANSI_ARGS_((int type));
1273 EXTERN char *		Tcl_GetStringFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1274 			    int *lengthPtr));
1275 EXTERN char *		Tcl_GetStringResult _ANSI_ARGS_((Tcl_Interp *interp));
1276 EXTERN char *		Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
1277 			    char *varName, int flags));
1278 EXTERN char *		Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1279 			    char *part1, char *part2, int flags));
1280 EXTERN int		Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
1281 			    char *command));
1282 EXTERN int		Tcl_GlobalEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
1283 			    Tcl_Obj *objPtr));
1284 EXTERN char *		Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
1285 EXTERN int		Tcl_HideCommand _ANSI_ARGS_((Tcl_Interp *interp,
1286 		            char *cmdName, char *hiddenCmdToken));
1287 EXTERN int		Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
1288 EXTERN void		Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
1289 			    int keyType));
1290 EXTERN void		Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
1291 EXTERN int		Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
1292 EXTERN int		Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
1293 EXTERN int		Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp *interp));
1294 EXTERN int		Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp *interp));
1295 EXTERN void		Tcl_InvalidateStringRep _ANSI_ARGS_((
1296 			    Tcl_Obj *objPtr));
1297 EXTERN char *		Tcl_JoinPath _ANSI_ARGS_((int argc, char **argv,
1298 			    Tcl_DString *resultPtr));
1299 EXTERN int		Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
1300 			    char *varName, char *addr, int type));
1301 EXTERN int		Tcl_ListObjAppendList _ANSI_ARGS_((
1302 			    Tcl_Interp *interp, Tcl_Obj *listPtr,
1303 			    Tcl_Obj *elemListPtr));
1304 EXTERN int		Tcl_ListObjAppendElement _ANSI_ARGS_((
1305 			    Tcl_Interp *interp, Tcl_Obj *listPtr,
1306 			    Tcl_Obj *objPtr));
1307 EXTERN int		Tcl_ListObjGetElements _ANSI_ARGS_((
1308 			    Tcl_Interp *interp, Tcl_Obj *listPtr,
1309 			    int *objcPtr, Tcl_Obj ***objvPtr));
1310 EXTERN int		Tcl_ListObjIndex _ANSI_ARGS_((Tcl_Interp *interp,
1311 			    Tcl_Obj *listPtr, int index,
1312 			    Tcl_Obj **objPtrPtr));
1313 EXTERN int		Tcl_ListObjLength _ANSI_ARGS_((Tcl_Interp *interp,
1314 			    Tcl_Obj *listPtr, int *intPtr));
1315 EXTERN int		Tcl_ListObjReplace _ANSI_ARGS_((Tcl_Interp *interp,
1316 			    Tcl_Obj *listPtr, int first, int count,
1317 			    int objc, Tcl_Obj *CONST objv[]));
1318 EXTERN void		Tcl_Main _ANSI_ARGS_((int argc, char **argv,
1319 			    Tcl_AppInitProc *appInitProc));
1320 EXTERN Tcl_Channel	Tcl_MakeFileChannel _ANSI_ARGS_((ClientData handle,
1321 			    int mode));
1322 EXTERN int		Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp *interp));
1323 EXTERN Tcl_Channel	Tcl_MakeTcpClientChannel _ANSI_ARGS_((
1324     			    ClientData tcpSocket));
1325 EXTERN char *		Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
1326 EXTERN Tcl_HashEntry *	Tcl_NextHashEntry _ANSI_ARGS_((
1327 			    Tcl_HashSearch *searchPtr));
1328 EXTERN void		Tcl_NotifyChannel _ANSI_ARGS_((Tcl_Channel channel,
1329 			    int mask));
1330 EXTERN Tcl_Obj *	Tcl_ObjGetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1331 			    Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
1332 			    int flags));
1333 EXTERN Tcl_Obj *	Tcl_ObjSetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1334 			    Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
1335 			    Tcl_Obj *newValuePtr, int flags));
1336 EXTERN Tcl_Channel	Tcl_OpenCommandChannel _ANSI_ARGS_((
1337     			    Tcl_Interp *interp, int argc, char **argv,
1338 			    int flags));
1339 EXTERN Tcl_Channel	Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
1340         		    char *fileName, char *modeString,
1341                             int permissions));
1342 EXTERN Tcl_Channel	Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp *interp,
1343 			    int port, char *address, char *myaddr,
1344 		            int myport, int async));
1345 EXTERN Tcl_Channel	Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp *interp,
1346 		            int port, char *host,
1347         		    Tcl_TcpAcceptProc *acceptProc,
1348 			    ClientData callbackData));
1349 EXTERN char *		Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
1350 			    char *string, char **termPtr));
1351 EXTERN int		Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp *interp,
1352 			    char *name, char *version));
1353 EXTERN char *		Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp *interp,
1354 			    char *name, char *version, int exact));
1355 EXTERN char *		Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
1356 EXTERN void		Tcl_Preserve _ANSI_ARGS_((ClientData data));
1357 EXTERN void		Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
1358 			    double value, char *dst));
1359 EXTERN int		Tcl_PutEnv _ANSI_ARGS_((CONST char *string));
1360 EXTERN void		Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
1361 			    Tcl_QueuePosition position));
1362 EXTERN int		Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
1363 	        	    char *bufPtr, int toRead));
1364 EXTERN void		Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
1365 EXTERN int		Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
1366 			    char *cmd, int flags));
1367 EXTERN int		Tcl_RecordAndEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
1368 			    Tcl_Obj *cmdPtr, int flags));
1369 EXTERN Tcl_RegExp	Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
1370 			    char *string));
1371 EXTERN int		Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
1372 			    Tcl_RegExp regexp, char *string, char *start));
1373 EXTERN int		Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
1374 			    char *string, char *pattern));
1375 EXTERN void		Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
1376 			    int index, char **startPtr, char **endPtr));
1377 EXTERN void		Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
1378 	        	    Tcl_Channel chan));
1379 EXTERN void		Tcl_RegisterObjType _ANSI_ARGS_((
1380 			    Tcl_ObjType *typePtr));
1381 EXTERN void		Tcl_Release _ANSI_ARGS_((ClientData clientData));
1382 EXTERN void		Tcl_RestartIdleTimer _ANSI_ARGS_((void));
1383 EXTERN void		Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
1384 #define Tcl_Return Tcl_SetResult
1385 EXTERN int		Tcl_ScanCountedElement _ANSI_ARGS_((CONST char *string,
1386 			    int length, int *flagPtr));
1387 EXTERN int		Tcl_ScanElement _ANSI_ARGS_((CONST char *string,
1388 			    int *flagPtr));
1389 EXTERN int		Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
1390         		    int offset, int mode));
1391 EXTERN int		Tcl_ServiceAll _ANSI_ARGS_((void));
1392 EXTERN int		Tcl_ServiceEvent _ANSI_ARGS_((int flags));
1393 EXTERN void		Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
1394                             char *name, Tcl_InterpDeleteProc *proc,
1395                             ClientData clientData));
1396 EXTERN void		Tcl_SetBooleanObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1397 			    int boolValue));
1398 EXTERN void		Tcl_SetChannelBufferSize _ANSI_ARGS_((
1399 			    Tcl_Channel chan, int sz));
1400 EXTERN int		Tcl_SetChannelOption _ANSI_ARGS_((
1401 			    Tcl_Interp *interp, Tcl_Channel chan,
1402 	        	    char *optionName, char *newValue));
1403 EXTERN int		Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
1404 			    char *cmdName, Tcl_CmdInfo *infoPtr));
1405 EXTERN void		Tcl_SetDoubleObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1406 			    double doubleValue));
1407 EXTERN void		Tcl_SetErrno _ANSI_ARGS_((int err));
1408 EXTERN void		Tcl_SetErrorCode _ANSI_ARGS_(
1409     			    TCL_VARARGS(Tcl_Interp *,arg1));
1410 EXTERN void		Tcl_SetIntObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1411 			    int intValue));
1412 EXTERN void		Tcl_SetListObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1413 			    int objc, Tcl_Obj *CONST objv[]));
1414 EXTERN void		Tcl_SetLongObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1415 			    long longValue));
1416 EXTERN void		Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
1417 EXTERN void		Tcl_SetObjErrorCode _ANSI_ARGS_((Tcl_Interp *interp,
1418 			    Tcl_Obj *errorObjPtr));
1419 EXTERN void		Tcl_SetObjLength _ANSI_ARGS_((Tcl_Obj *objPtr,
1420 			    int length));
1421 EXTERN void		Tcl_SetObjResult _ANSI_ARGS_((Tcl_Interp *interp,
1422 			    Tcl_Obj *resultObjPtr));
1423 EXTERN void		Tcl_SetPanicProc _ANSI_ARGS_((void (*proc)
1424 			    _ANSI_ARGS_(TCL_VARARGS(char *, format))));
1425 EXTERN int		Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
1426 			    int depth));
1427 EXTERN void		Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
1428 			    char *string, Tcl_FreeProc *freeProc));
1429 EXTERN int		Tcl_SetServiceMode _ANSI_ARGS_((int mode));
1430 EXTERN void		Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
1431 			    int type));
1432 EXTERN void		Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj *objPtr,
1433 			    char *bytes, int length));
1434 EXTERN void		Tcl_SetTimer _ANSI_ARGS_((Tcl_Time *timePtr));
1435 EXTERN char *		Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
1436 			    char *varName, char *newValue, int flags));
1437 EXTERN char *		Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1438 			    char *part1, char *part2, char *newValue,
1439 			    int flags));
1440 EXTERN char *		Tcl_SignalId _ANSI_ARGS_((int sig));
1441 EXTERN char *		Tcl_SignalMsg _ANSI_ARGS_((int sig));
1442 EXTERN void		Tcl_Sleep _ANSI_ARGS_((int ms));
1443 EXTERN void		Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
1444 EXTERN int		Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
1445 			    char *list, int *argcPtr, char ***argvPtr));
1446 EXTERN void		Tcl_SplitPath _ANSI_ARGS_((char *path,
1447 			    int *argcPtr, char ***argvPtr));
1448 EXTERN void		Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp *interp,
1449 			    char *pkgName, Tcl_PackageInitProc *initProc,
1450 			    Tcl_PackageInitProc *safeInitProc));
1451 EXTERN int		Tcl_StringMatch _ANSI_ARGS_((char *string,
1452 			    char *pattern));
1453 EXTERN int		Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
1454 #define Tcl_TildeSubst Tcl_TranslateFileName
1455 EXTERN int		Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
1456 			    char *varName, int flags, Tcl_VarTraceProc *proc,
1457 			    ClientData clientData));
1458 EXTERN int		Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1459 			    char *part1, char *part2, int flags,
1460 			    Tcl_VarTraceProc *proc, ClientData clientData));
1461 EXTERN char *		Tcl_TranslateFileName _ANSI_ARGS_((Tcl_Interp *interp,
1462 			    char *name, Tcl_DString *bufferPtr));
1463 EXTERN int		Tcl_Ungets _ANSI_ARGS_((Tcl_Channel chan, char *str,
1464 			    int len, int atHead));
1465 EXTERN void		Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
1466 			    char *varName));
1467 EXTERN int		Tcl_UnregisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
1468 			    Tcl_Channel chan));
1469 EXTERN int		Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
1470 			    char *varName, int flags));
1471 EXTERN int		Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1472 			    char *part1, char *part2, int flags));
1473 EXTERN void		Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
1474 			    char *varName, int flags, Tcl_VarTraceProc *proc,
1475 			    ClientData clientData));
1476 EXTERN void		Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1477 			    char *part1, char *part2, int flags,
1478 			    Tcl_VarTraceProc *proc, ClientData clientData));
1479 EXTERN void		Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp *interp,
1480 			    char *varName));
1481 EXTERN int		Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
1482 			    char *frameName, char *varName,
1483 			    char *localName, int flags));
1484 EXTERN int		Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
1485 			    char *frameName, char *part1, char *part2,
1486 			    char *localName, int flags));
1487 EXTERN int		Tcl_VarEval _ANSI_ARGS_(
1488     			    TCL_VARARGS(Tcl_Interp *,interp));
1489 EXTERN ClientData	Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
1490 			    char *varName, int flags,
1491 			    Tcl_VarTraceProc *procPtr,
1492 			    ClientData prevClientData));
1493 EXTERN ClientData	Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
1494 			    char *part1, char *part2, int flags,
1495 			    Tcl_VarTraceProc *procPtr,
1496 			    ClientData prevClientData));
1497 EXTERN int		Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time *timePtr));
1498 EXTERN Tcl_Pid		Tcl_WaitPid _ANSI_ARGS_((Tcl_Pid pid, int *statPtr,
1499 			    int options));
1500 EXTERN int		Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
1501 			    char *s, int slen));
1502 EXTERN void		Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp *interp,
1503 			    int objc, Tcl_Obj *CONST objv[], char *message));
1504 
1505 /* Andreas Kupries <andreas_kupries@users.sourceforge.net>, 05/31/1997.
1506  * Support of Tcl-Trf.
1507  */
1508 EXTERN Tcl_Channel      Tcl_ReplaceChannel _ANSI_ARGS_ ((Tcl_Interp* interp,
1509 			    Tcl_ChannelType* typePtr, ClientData instanceData,
1510 			    int mask, Tcl_Channel prevChan));
1511 
1512 EXTERN void             Tcl_UndoReplaceChannel _ANSI_ARGS_ ((Tcl_Interp* interp,
1513 			    Tcl_Channel chan));
1514 
1515 #endif /* RESOURCE_INCLUDED */
1516 #endif /* _TCL */
1517