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