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