Fossil SCM

Much more simplified stubs implementation. No changes to Fossil code itself.

jan.nijtmans 2013-09-16 08:34 UTC trunk
Commit 10f71bc7fcd772db2a35c68d1424fc28b465c722
--- a/compat/tcl-8.6/generic/tcl.h
+++ b/compat/tcl-8.6/generic/tcl.h
@@ -0,0 +1,2408 @@
1
+/*
2
+ * tcl.h --
3
+ *
4
+ * This header file describes the externally-visible facilities of the
5
+ * Tcl interpreter.
6
+ *
7
+ * Copyright (c) 1987-1994 The Regents of the University of California.
8
+ * Copyright (c) 1993-1996 Lucent Technologies.
9
+ * Copyright (c) 1994-1998 Sun Microsystems, Inc.
10
+ * Copyright (c) 1998-2000 by Scriptics Corporation.
11
+ * Copyright (c) 2002 by Kevin B. Kenny. All rights reserved.
12
+ *
13
+ * See the file "license.terms" for information on usage and redistribution of
14
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
15
+ */
16
+
17
+#ifndef _TCL
18
+#define _TCL
19
+
20
+/*
21
+ * For C++ compilers, use extern "C"
22
+ */
23
+
24
+#ifdef __cplusplus
25
+extern "C" {
26
+#endif
27
+
28
+/*
29
+ * The following defines are used to indicate the various release levels.
30
+ */
31
+
32
+#define TCL_ALPHA_RELEASE 0
33
+#define TCL_BETA_RELEASE 1
34
+#define TCL_FINAL_RELEASE 2
35
+
36
+/*
37
+ * When version numbers change here, must also go into the following files and
38
+ * update the version numbers:
39
+ *
40
+ * library/init.tcl (1 LOC patch)
41
+ * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
42
+ * win/configure.in (as above)
43
+ * win/tcl.m4 (not patchlevel)
44
+ * win/makefile.bc (not patchlevel) 2 LOC
45
+ * README (sections 0 and 2, with and without separator)
46
+ * macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 1 LOC
47
+ * macosx/Tcl.pbproj/default.pbxuser (not patchlevel) 1 LOC
48
+ * macosx/Tcl.xcode/project.pbxproj (not patchlevel) 2 LOC
49
+ * macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC
50
+ * macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC
51
+ * win/README (not patchlevel) (sections 0 and 2)
52
+ * unix/tcl.spec (1 LOC patch)
53
+ * tools/tcl.hpj.in (not patchlevel, for windows installer)
54
+ */
55
+
56
+#define TCL_MAJOR_VERSION 8
57
+#define TCL_MINOR_VERSION 6
58
+#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
59
+#define TCL_RELEASE_SERIAL 1eader file describes the external/*
60
+ * tcl.h --
61
+ *
62
+ * ThisBAL_ONLY 1
63
+#define TCL_NAMESPACE_ONLY 2
64
+#define TCL_APPEND_VALUE 4
65
+#define TCL_LIST_der file describes the externally-visible facilities of the
66
+ * Tcl interpreter.
67
+ *
68
+ * Copyright (c) 1987-1994 The Regents of the University of California.
69
+ * Copyright (c) 1993-1996 Lucent Technologies.
70
+ * Copyright (c) 1994-1998 Sun Microsystems, Inc.
71
+ * Copyright (c) 1998-2000 by Scriptics Corporation.
72
+ * Copyright (c) 2002 by Kevin B. Kenny. All rights reserved.
73
+ *
74
+ * See the file "license.terms" for information on usage and redistribution of
75
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
76
+ */
77
+
78
+#ifndef _TCL
79
+#define _TCL
80
+
81
+/*
82
+ * For C++ compilers, use extern "C"
83
+ */
84
+
85
+#ifdef __cplusplus
86
+extern "C" {
87
+#endif
88
+
89
+/*
90
+ * The following defines are used to indicate the various release levels.
91
+ */
92
+
93
+#define TCL_ALPHA_RELEASE 0
94
+#define TCL_BETA_RELEASE 1
95
+#define TCL_FINAL_RELEASE 2
96
+
97
+/*
98
+ * When version numbers change here, must also go into the following files and
99
+ * update the version numbers:
100
+ *
101
+ * library/init.tcl (1 LOC patch)
102
+ * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
103
+ * win/configure.in (as above)
104
+ * win/tcl.m4 (not patchlevel)
105
+ * win/makefile.bc (not patchlevel) 2 LOC
106
+ * README (sections 0 and 2, with and without separator)
107
+ * macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 1 LOC
108
+ * macosx/Tcl.pbproj/default.pbxuser (not patchlevel) 1 LOC
109
+ * macosx/Tcl.xcode/project.pbxproj (not patchlevel) 2 LOC
110
+ * macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC
111
+ * macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC
112
+ * win/README (not patchlevel) (sections 0 and 2)
113
+ * unix/tcl.spec (1 LOC patch)
114
+ * tools/tcl.hpj.in (not patchlevel, for windows installer)
115
+ */
116
+
117
+#define TCL_MAJOR_VERSION 8
118
+#define TCL_MINOR_VERSION 6
119
+#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
120
+#define TCL_RELEASE_SERIAL 0
121
+
122
+#define TCL_VERSION "8.6"
123
+#define TCL_PATCH_LEVEL "8.6.0"
124
+
125
+
126
+/*
127
+ *----------------------------------------------------------------------------
128
+ * The following definitions set up the proper options for Windows compilers.
129
+ * We use this method because there is no autoconf equivalent.
130
+ */
131
+
132
+#ifndef __WIN32__
133
+# if defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) || defined(__BORLANDC__) || (defined(__WATCOMC__) && defined(__WINDOWS_386__))
134
+# define __WIN32__
135
+# ifndef WIN32
136
+# define WIN32
137
+# endif
138
+# ifndef _WIN32
139
+# define _WIN32
140
+# endif
141
+# endif
142
+#endif
143
+
144
+/*
145
+ * STRICT: See MSDN Article Q83456
146
+ */
147
+
148
+#ifdef __WIN32__
149
+# ifndef STRICT
150
+# define STRICT
151
+# endif
152
+#endif /* __WIN32__ */
153
+
154
+/*
155
+ * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
156
+ * quotation marks), JOIN joins two arguments.
157
+ */
158
+
159
+#ifndef STRINGIFY
160
+# define STRINGIFY(x) STRINGIFY1(x)
161
+# define STRINGIFY1(x) #x
162
+#endif
163
+#ifndef JOIN
164
+# define JOIN(a,b) JOIN1(a,b)
165
+# define JOIN1(a,b) a##b
166
+#endif
167
+
168
+/*
169
+ * A special definition used to allow this header file to be included from
170
+ * windows resource files so that they can obtain version information.
171
+ * RC_INVOKED is defined by default by the windows RC tool.
172
+ *
173
+ * Resource compilers don't like all the C stuff, like typedefs and function
174
+ * declarations, that occur below, so block them out.
175
+ */
176
+
177
+#ifndef RC_INVOKED
178
+
179
+/*
180
+ * Special macro to define mutexes, that doesn't do anything if we are not
181
+ * using threads.
182
+ */
183
+
184
+#ifdef TCL_THREADS
185
+#define TCL_DECLARE_MUTEX(name) static Tcl_Mutex name;
186
+#else
187
+#define TCL_DECLARE_MUTEX(name)
188
+#endif
189
+
190
+/*
191
+ * Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and
192
+ * SEEK_END, all #define'd by stdio.h .
193
+ *
194
+ * Also, many extensions need stdio.h, and they've grown accustomed to tcl.h
195
+ * providing it for them rather than #include-ing it themselves as they
196
+ * should, so also for their sake, we keep the #include to be consistent with
197
+ * prior Tcl releases.
198
+ */
199
+
200
+#include <stdio.h>
201
+
202
+/*
203
+ *----------------------------------------------------------------------------
204
+ * Support for functions with a variable number of arguments.
205
+ *
206
+ * The following TCL_VARARGS* macros are to support old extensions
207
+ * written for older versions of Tcl where the macros permitted
208
+ * support for the varargs.h system as well as stdarg.h .
209
+ *
210
+ * New code should just directly be written to use stdarg.h conventions.
211
+ */
212
+
213
+#include <stdarg.h>
214
+#ifndef TCL_NO_DEPRECATED
215
+# define TCL_VARARGS(type, name) (type name, ...)
216
+# define TCL_VARARGS_DEF(type, name) (type name, ...)
217
+# define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
218
+#endif
219
+#if defined(__GNUC__) && (__GNUC__ > 2)
220
+# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b)))
221
+#else
222
+# define TCL_FORMAT_PRINTF(a,b)
223
+#endif
224
+
225
+/*
226
+ * Allow a part of Tcl's API to be explicitly marked as deprecated.
227
+ *
228
+ * Used to make TIP 330/336 generate moans even if people use the
229
+ * compatibility macros. Change your code, guys! We won't support you forever.
230
+ */
231
+
232
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
233
+# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC__MINOR__ >= 5))
234
+# define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__ (msg)))
235
+# else
236
+# define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__))
237
+# endif
238
+#else
239
+# define TCL_DEPRECATED_API(msg) /* nothing portable */
240
+#endif
241
+
242
+/*
243
+ *----------------------------------------------------------------------------
244
+ * Macros used to declare a function to be exported by a DLL. Used by Windows,
245
+ * maps to no-op declarations on non-Windows systems. The default build on
246
+ * windows is for a DLL, which causes the DLLIMPORT and DLLEXPORT macros to be
247
+ * nonempty. To build a static library, the macro STATIC_BUILD should be
248
+ * defined.
249
+ *
250
+ * Note: when building static but linking dynamically to MSVCRT we must still
251
+ * correctly decorate the C library imported function. Use CRTIMPORT
252
+ * for this purpose. _DLL is defined by the compiler when linking to
253
+ * MSVCRT.
254
+ */
255
+
256
+#if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || defined(__/*
257
+ * tcl.h
258
+# ifndef NO_VOID
259
+# define VOID void
260
+# ((__deprecated__VOID char/*
261
+ * tcl.h --
262
+ *
263
+ * Thiss header file describes the externally-visible facilities of the
264
+ * Tcl interpreter.
265
+ *
266
+ * Copyright (c) 1987-1994 The Regents of the University of California.
267
+ * Copyright (c) 1993-1996 Lucent Technologies.
268
+ * Copyright (c) 1994-1998 Sun Microsystems, Inc.
269
+ * Copyright (c) 1998-2000 by Scriptics Corporation.
270
+ * Copyright (c) 2002 by Kevin B. Kenny. All rights reserved.
271
+ *
272
+ * See the file "license.terms" for information on usage and redistribution of
273
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
274
+ */
275
+
276
+#ifndef _TCL
277
+#define _TCL
278
+
279
+/*
280
+ * For C++ compilers, use extern "C"
281
+ */
282
+
283
+#ifdef __cplusplus
284
+extern "C" {
285
+#endif
286
+
287
+/*
288
+ * The following defines are used to indicate the various release levels.
289
+ */
290
+
291
+#define TCL_ALPHA_RELEASE 0
292
+#define TCL_BETA_RELEASE 1
293
+#define TCL_FINAL_RELEASE 2
294
+
295
+/*
296
+ * When version numbers change here, must also go into the following files and
297
+ * update the version numbers:
298
+ *
299
+ * library/init.tcl (1 LOC patch)
300
+ * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
301
+ * win/configure.in (as above)
302
+ * win/tcl.m4 (not patchlevel)
303
+ * win/makefile.bc (not patchlevel) 2 LOC
304
+ * README (sections 0 and 2, with and without separator)
305
+ * macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 1 LOC
306
+ * macosx/Tcl.pbproj/default.pbxuser (not patchlevel) 1 LOC
307
+ * macosx/Tcl.xcode/project.pbxproj (not patchlevel) 2 LOC
308
+ * macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC
309
+ * macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC
310
+ * win/README (not patchlevel) (sections 0 and 2)
311
+ * unix/tcl.spec (1 LOC patch)
312
+ * tools/tcl.hpj.in (not patchlevel, for windows installer)
313
+ */
314
+
315
+#define TCL_MAJOR_VERSION 8
316
+#define TCL_MINOR_VERSION 6
317
+#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
318
+#define TCL_RELEASE_SERIAL 0
319
+
320
+#define TCL_VERSION "8.6"
321
+#define TCL_PATCH_LEVEL "8.6.0"
322
+
323
+
324
+/*
325
+ *----------------------------------------------------------------------------
326
+ * The following definitions set up the proper options for Windows compilers.
327
+ * We use this method because there is no autoconf equivalent.
328
+ */
329
+
330
+#ifndef __WIN32__
331
+# if defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) || defined(__BORLANDC__) || (defined(__WATCOMC__) && defined(__WINDOWS_386__))
332
+# define __WIN32__
333
+# ifndef WIN32
334
+# define WIN32
335
+# endif
336
+# ifndef _WIN32
337
+# define _WIN32
338
+# endif
339
+# endif
340
+#endif
341
+
342
+/*
343
+ * STRICT: See MSDN Article Q83456
344
+ */
345
+
346
+#ifdef __WIN32__
347
+# ifndef STRICT
348
+# define STRICT
349
+# endif
350
+#endif /* __WIN32__ */
351
+
352
+/*
353
+ * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
354
+ * quotation marks), JOIN joins two arguments.
355
+ */
356
+
357
+#ifndef STRINGIFY
358
+# define STRINGIFY(x) STRINGIFY1(x)
359
+# define STRINGIFY1(x) #x
360
+#endif
361
+#ifndef JOIN
362
+# define JOIN(a,b) JOIN1(a,b)
363
+# define JOIN1(a,b) a##b
364
+#endif
365
+
366
+/*
367
+ * A special definition used to allow this header file to be included from
368
+ * windows resource files so that they can obtain version information.
369
+ * RC_INVOKED is defined by default by the windows RC tool.
370
+ *
371
+ * Resource compilers don't like all the C stuff, like typedefs and function
372
+ * declarations, that occur below, so block them out.
373
+ */
374
+
375
+#ifndef RC_INVOKED
376
+
377
+/*
378
+ * Special macro to define mutexes, that doesn't do anything if we are not
379
+ * using threads.
380
+ */
381
+
382
+#ifdef TCL_THREADS
383
+#define TCL_DECLARE_MUTEX(name) static Tcl_Mutex name;
384
+#else
385
+#define TCL_DECLARE_MUTEX(name)
386
+#endif
387
+
388
+/*
389
+ * Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and
390
+ * SEEK_END, all #define'd by stdio.h .
391
+ *
392
+ * Also, many extensions need stdio.h, and they've grown accustomed to tcl.h
393
+ * providing it for them rather than #include-ing it themselves as they
394
+ * should, so also for their sake, we keep the #include to be consistent with
395
+ * prior Tcl releases.
396
+ */
397
+
398
+#include <stdio.h>
399
+
400
+/*
401
+ *----------------------------------------------------------------------------
402
+ * Support for functions with a variable number of arguments.
403
+ *
404
+ * The following TCL_VARARGS* macros are to support old extensions
405
+ * written for older versions of Tcl where the macros permitted
406
+ * support for the varargs.h system as well as stdarg.h .
407
+ *
408
+ * New code should just directly be written to use stdarg.h conventions.
409
+ */
410
+
411
+#include <stdarg.h>
412
+#ifndef TCL_NO_DEPRECATED
413
+# define TCL_VARARGS(type, name) (type name, ...)
414
+# define TCL_VARARGS_DEF(type, name) (type name, ...)
415
+# defi && !defined(__APPLE__ defined(HAVE_STRUCT_STAT64)
416
+ typedef struct stat64 Tcl_StatBuf;
417
+#else
418
+ typedef struct stat Tcl_StatBuf;
419
+#endif
420
+
421
+
422
+/*
423
+ *----------------------------------------------------------------------------
424
+ * Data structures defined opaquely in this module. The definitions below just
425
+ * provide dummy types. A few fields are made visible in Tcl_Interp
426
+ * structures, namely those used for returning a string result from commands.
427
+ * Direct access to the result field is discouraged in Tcl 8.0. The
428
+ * interpreter result is either an object or a string, and the two values are
429
+ * kept consistent unless some C code sets interp->result directly.
430
+ * Programmers should use either the function Tcl_GetObjResult() or
431
+ * Tcl_GetStringResult() to read the interpreter's result. See the SetResult
432
+ * man page for details.
433
+ *
434
+ * Note: any change to the Tcl_Interp definition below must be mirrored in the
435
+ * "real" definition in tclInt.h.
436
+ *
437
+ * Note: Tcl_ObjCmdProc functions do not directly set result and freeProc.
438
+ * Instead, they set a Tcl_Obj member in the "real" structure that can be
439
+ * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
440
+ */
441
+
442
+typedef struct Tcl_Interp
443
+#ifndef TCL_NO_DEPRECATED
444
+{
445
+ /* TIP #330: Strongly discourage extensions from using the string
446
+ * result. */
447
+#ifdef USE_INTERP_RStringe is a 4-byte gap */
448
+ long long;
449
+ unsigned short st_ino;
450
+ unsigned short st_mode;
451
+ short st_nlink;
452
+ short st_uid;
453
+ short st_gid;
454
+ /* Here is a 2-byte gap */
455
+ dev_t st_rdev;
456
+ /* HerStringe is a 4-byte gap */
457
+ long long st_size;
458
+ struct {long tv_sec;} st_atim;
459
+ struct {long tv_sec;} st_mtim;
460
+ struct {long tv_sec;} st_ctim;
461
+ /* Here is a 4-byte gap */
462
+ } Tcl_StatBuf;
463
+#elif defined(HAVE_STRUCT_STAT64)
464
+ typedef struct stat64 Tcl_StatBuf;
465
+#else
466
+ typedef struct stat Tcl_StatBuf;
467
+#endif
468
+
469
+
470
+/*
471
+ *----------------------------------------------------------------------------
472
+ * Data structures defined opaquely in this module. The definitions below just
473
+ * provide dummy types. A few fields are made visible in Tcl_Interp
474
+ * structures, namely those used for returning a string result from commands.
475
+ * Direct access to the result field is discouraged in Tcl 8.0. The
476
+ * interpreter result is either an object or a string, and the two values are
477
+ * kept consistent unless some C code sets interp->result directly.
478
+ * Programmers should use either the function Tcl_GetObjResult() or
479
+ * Tcl_GetStringResult() to read the interpreter's result. See the SetResult
480
+ * man page for details.
481
+ *
482
+ * Note: any change to the Tcl_Interp definition below must be mirrored in the
483
+ * "real" definition in tclInt.h.
484
+ *
485
+ * Note: Tcl_ObjCmdProc functions do not directly set result and freeProc.
486
+ * Instead, they set a Tcl_Obj member in the "real" structure that can be
487
+ * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
488
+ */
489
+
490
+typedef struct Tcl_Interp
491
+#ifndef TCL_NO_DEPRECATED
492
+{
493
+ /* TIP #330: Strongly discourage extensions from using the string
494
+ * result. */
495
+#ifdef USE_INTERP_RESULT
496
+ char *result TCL_DEPRECATED_API("use Tcl_GetResult/Tcl_SetResult");
497
+ /* If the last command returned a string
498
+ * result, this points to it. */
499
+ void (*freeProc) (char *blockPtr)
500
+ TCL_DEPRECATED_API("use Tcl_GetResult/Tcl_SetResult");
501
+ /* Zero means the string result is statically
502
+ * allocated. TCL_DYNAMIC means it was
503
+ * allocated with ckalloc and should be freed
504
+ * with ckfree. Other values give the address
505
+ * of function to invoke to free the result.
506
+ * Tcl_Eval must free it before executing next
507
+ * command. */
508
+#else
509
+ char *resultDontUse; /* Don't use in extensions! */
510
+ void (*freeProcDontUse) (char *); /* Don't use in extensions! */
511
+#endif
512
+#ifdef USE_INTERP_ERRORLINE
513
+ int errorLine TCL_DEPRECATED_API("use Tcl_GetErrorLine/Tcl_SetErrorLine");
514
+ /* When TCL_ERROR is returned, this gives the
515
+ * line number within the command where the
516
+ * error occurred (1 if first line). */
517
+#else
518
+ int errorLineDontUse; /* Don't use in extensions! */
519
+#endif
520
+}
521
+#endif /* TCL_NO_DEPRECATED */
522
+Tcl_Interp;
523
+
524
+typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
525
+typedef struct Tcl_Channel_ *Tcl_Channel;
526
+typedef struct Tcl_ChannelTypeVersion_ *Tcl_ChannelTypeVersion;
527
+typedef struct Tcl_Command_ *Tcl_Command;
528
+typedef struct Tcl_Condition_ *Tcl_Condition;
529
+typedef struct Tcl_Dict_ *Tcl_Dict;
530
+typedef struct Tcl_EncodingState_ *Tcl_EncodingState;
531
+typedef struct Tcl_Encoding_ *Tcl_Encoding;
532
+typedef struct Tcl_Event Tcl_Event;
533
+typedef struct Tcl_InterpState_ *Tcl_InterpState;
534
+typedef struct Tcl_LoadHandle_ *Tcl_LoadHandle;
535
+typedef struct Tcl_Mutex_ *Tcl_Mutex;
536
+typedef struct Tcl_Pid_ *Tcl_Pid;
537
+typedef struct Tcl_RegExp_ *Tcl_RegExp;
538
+typedef struct Tcl_ThreadDataKey_ *Tcl_ThreadDataKey;
539
+typedef struct Tcl_ThreadId_ *Tcl_ThreadId;
540
+typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
541
+typedef struct Tcl_Trace_ *Tcl_Trace;
542
+typedef struct Tcl_Var_ *Tcl_Var;
543
+typedef struct Tcl_ZLibStream_ *Tcl_ZlibStream;
544
+
545
+/*
546
+ *----------------------------------------------------------------------------
547
+ * Definition of the interface to functions implementing threads. A function
548
+ * following this definition is given to each call of 'Tcl_CreateThread' and
549
+ * will be called as the main fuction of the new thread created by that call.
550
+ */
551
+
552
+#if defined __WIN32__
553
+typedef unsigned (__stdcall Tcl_ThreadCreateProc) (ClientData clientData);
554
+#else
555
+typedef void (Tcl_ThreadCreateProc) (ClientData clientData);
556
+#endif
557
+
558
+/*
559
+ * Threading function return types used for abstracting away platform
560
+ * differences when writing a Tcl_ThreadCreateProc. See the NewThread function
561
+ * in generic/tclThreadTest.c for it's usage.
562
+ */
563
+
564
+#if defined __WIN32__
565
+# define Tcl_ThreadCreateType unsigned __stdcall
566
+# define TCL_THREAD_CREATE_RETURN return 0
567
+#else
568
+# define Tcl_ThreadCreateType void
569
+# define TCL_THREAD_CREATE_RETURN
570
+#endif
571
+
572
+/*
573
+ * Definition of values for default stacksize and the possible flags to be
574
+ * given to Tcl_CreateThread.
575
+ */
576
+
577
+#define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack. */
578
+#define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default
579
+ * behaviour. */
580
+#define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable. */
581
+
582
+/*
583
+ * Flag values passed to Tcl_StringCaseMatch.
584
+ */
585
+
586
+#define TCL_MATCH_NOCASE (1<<0)
587
+
588
+/*
589
+ * Flag values passed to Tcl_GetRegExpFromObj.
590
+ */
591
+
592
+#define TCL_REG_BASIC 000000 /* BREs (convenience). */
593
+#define TCL_REG_EXTENDED 000001 /* EREs. */
594
+#define TCL_REG_ADVF 000002 /* Advanced features in EREs. */
595
+#define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs). */
596
+#define TCL_REG_QUOTE 000004 /* No special characters, none. */
597
+#define TCL_REG_NOCASE 000010 /* Ignore case. */
598
+#define TCL_REG_NOSUB 000020 /* Don't care about subexpressions. */
599
+#define TCL_REG_EXPANDED 000040 /* Expanded format, white space &
600
+ * comments. */
601
+#define TCL_REG_NLSTOP 000100 /* \n doesn't match . or [^ ] */
602
+#define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before. */
603
+#define TCL_REG_NEWLINE 000300 /* Newlines are line terminators. */
604
+#define TCL_REG_CANMATCH 001000 /* Report details on partial/limited
605
+ * matches. */
606
+
607
+/*
608
+ * Flags values passed to Tcl_RegExpExecObj.
609
+ */
610
+
611
+#define TCL_REG_NOTBOL 0001 /* Beginning of string does not match ^. */
612
+#define TCL_REG_NOTEOL 0002 /* End of string does not match $. */
613
+
614
+/*
615
+ * Structures filled in by Tcl_RegExpInfo. Note that all offset values are
616
+ * relative to the start of the match string, not the beginning of the entire
617
+ * string.
618
+ */
619
+
620
+typedef struct Tcl_RegExpIndices {
621
+ long start; /* Character offset of first character in
622
+ * match. */
623
+ long end; /* Character offset of first character after
624
+ * the match. */
625
+} Tcl_RegExpIndices;
626
+
627
+typedef struct Tcl_RegExpInfo {
628
+ int nsubs; /* Number of subexpressions in the compiled
629
+ * expression. */
630
+ Tcl_RegExpIndices *matches; /* Array of nsubs match offset pairs. */
631
+ long extendStart; /* The offset at which a subsequent match
632
+ * might begin. */
633
+ long reserved; /* Reserved for later use. */
634
+} Tcl_RegExpInfo;
635
+
636
+/*
637
+ * Picky compilers complain if this typdef doesn't appear before the struct's
638
+ * reference in tclDecls.h.
639
+ */
640
+
641
+typedef Tcl_StatBuf *Tcl_Stat_;
642
+typedef struct stat *Tcl_OldStat_;
643
+
644
+/*
645
+ *----------------------------------------------------------------------------
646
+ * When a TCL command returns, the interpreter contains a result from the
647
+ * command. Programmers are strongly encouraged to use one of the functions
648
+ * Tcl_GetObjResult() or Tcl_GetStringResult() to read the interpreter's
649
+ * result. See the SetResult man page for details. Besides this result, the
650
+ * command function returns an integer code, which is one of the following:
651
+ *
652
+ * TCL_OK Command completed normally; the interpreter's result
653
+ * contains the command's result.
654
+ * TCL_ERROR The command couldn't be completed successfully; the
655
+ * interpreter's result describes what went wrong.
656
+ * TCL_RETURN The command requests that the current function return;
657
+ * the interpreter's result contains the function's
658
+ * return value.
659
+ * TCL_BREAK The command requests that the innermost loop be
660
+ * exited; the interpreter's result is meaningless.
661
+ * TCL_CONTINUE Go on to the next iteration of the current loop; the
662
+ * interpreter's result is meaningless.
663
+ */
664
+
665
+#define TCL_OK 0
666
+#define TCL_ERROR 1
667
+#define TCL_RETURN 2
668
+#define TCL_BREAK 3
669
+#define TCL_CONTINUE 4
670
+
671
+#define TCL_RESULT_SIZE 200
672
+
673
+/*
674
+ *----------------------------------------------------------------------------
675
+ * Flags to control what substitutions are performed by Tcl_SubstObj():
676
+ */
677
+
678
+#define TCL_SUBST_COMMANDS 001
679
+#define TCL_SUBST_VARIABLES 002
680
+#define TCL_SUBST_BACKSLASHES 004
681
+#define TCL_SUBST_ALL 007
682
+
683
+/*
684
+ * Argument descriptors for math function callbacks in expressions:
685
+ */
686
+
687
+typedef enum {
688
+ TCL_INT, TCL_DOUBLE, TCL_EITHER, TCL_WIDE_INT
689
+} Tcl_ValueType;
690
+
691
+typedef struct Tcl_Value {
692
+ Tcl_ValueType type; /* Indicates intValue or doubleValue is valid,
693
+ * or both. */
694
+ long intValue; /* Integer value. */
695
+ double doubleValue; /* Double-precision floating value. */
696
+ Tcl_WideInt wideValue; /* Wide (min. 64-bit) integer value. */
697
+} Tcl_Value;
698
+
699
+/*
700
+ * Forward declaration of Tcl_Obj to prevent an error when the forward
701
+ * reference to Tcl_Obj is encountered in the function types declared below.
702
+ */
703
+
704
+struct Tcl_Obj;
705
+
706
+/*
707
+ *----------------------------------------------------------------------------
708
+ * Function types defined by Tcl:
709
+ */
710
+
711
+typedef int (Tcl_AppInitProc) (Tcl_Interp *interp);
712
+typedef int (Tcl_AsyncProc) (ClientData clientData, Tcl_Interp *interp,
713
+ int code);
714
+typedef void (Tcl_ChannelProc) (ClientData clientData, int mask);
715
+typedef void (Tcl_CloseProc) (ClientData data);
716
+typedef void (Tcl_CmdDeleteProc) (ClientData clientData);
717
+typedef int (Tcl_CmdProc) (ClientData clientData, Tcl_Interp *interp,
718
+ int argc, CONST84 char *argv[]);
719
+typedef void (Tcl_CmdTraceProc) (ClientData clientData, Tcl_Interp *interp,
720
+ int level, char *command, Tcl_CmdProc *proc,
721
+ ClientData cmdClientData, int argc, CONST84 char *argv[]);
722
+typedef int (Tcl_CmdObjTraceProc) (ClientData clientData, Tcl_Interp *interp,
723
+ int level, const char *command, Tcl_Command commandInfo, int objc,
724
+ struct Tcl_Obj *const *objv);
725
+typedef void (Tcl_CmdObjTraceDeleteProc) (ClientData clientData);
726
+typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr,
727
+ struct Tcl_Obj *dupPtr);
728
+typedef int (Tcl_EncodingConvertProc) (ClientData clientData, const char *src,
729
+ int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst,
730
+ int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr);
731
+typedef void (Tcl_EncodingFreeProc) (ClientData clientData);
732
+typedef int (Tcl_EventProc) (Tcl_Event *evPtr, int flags);
733
+typedef void (Tcl_EventCheckProc) (ClientData clientData, int flags);
734
+typedef int (Tcl_EventDeleteProc) (Tcl_Event *evPtr, ClientData clientData);
735
+typedef void (Tcl_EventSetupProc) (ClientData clientData, int flags);
736
+typedef void (Tcl_ExitProc) (ClientData clientData);
737
+typedef void (Tcl_FileProc) (ClientData clientData, int mask);
738
+typedef void (Tcl_FileFreeProc) (ClientData clientData);
739
+typedef void (Tcl_FreeInternalRepProc) (struct Tcl_Obj *objPtr);
740
+typedef void (Tcl_FreeProc) (char *blockPtr);
741
+typedef void (Tcl_IdleProc) (ClientData clientData);
742
+typedef void (Tcl_InterpDeleteProc) (ClientData clientData,
743
+ Tcl_Interp *interp);
744
+typedef int (Tcl_MathProc) (ClientData clientData, Tcl_Interp *interp,
745
+ Tcl_Value *args, Tcl_Value *resultPtr);
746
+typedef void (Tcl_NamespaceDeleteProc) (ClientData clientData);
747
+typedef int (Tcl_ObjCmdProc) (ClientData clientData, Tcl_Interp *interp,
748
+ int objc, struct Tcl_Obj *const *objv);
749
+typedef int (Tcl_PackageInitProc) (Tcl_Interp *interp);
750
+typedef int (Tcl_PackageUnloadProc) (Tcl_Interp *interp, int flags);
751
+typedef void (Tcl_PanicProc) (const char *format, ...);
752
+typedef void (Tcl_TcpAcceptProc) (ClientData callbackData, Tcl_Channel chan,
753
+ char *address, int port);
754
+typedef void (Tcl_TimerProc) (ClientData clientData);
755
+typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *interp, struct Tcl_Obj *objPtr);
756
+typedef void (Tcl_UpdateStringProc) (struct Tcl_Obj *objPtr);
757
+typedef char * (Tcl_VarTraceProc) (ClientData clientData, Tcl_Interp *interp,
758
+ CONST84 char *part1, CONST84 char *part2, int flags);
759
+typedef void (Tcl_CommandTraceProc) (ClientData clientData, Tcl_Interp *interp,
760
+ const char *oldName, const char *newName, int flags);
761
+typedef void (Tcl_CreateFileHandlerProc) (int fd, int mask, Tcl_FileProc *proc,
762
+ ClientData clientData);
763
+typedef void (Tcl_DeleteFileHandlerProc) (int fd);
764
+typedef void (Tcl_AlertNotifierProc) (ClientData clientData);
765
+typedef void (Tcl_ServiceModeHookProc) (int mode);
766
+typedef ClientData (Tcl_InitNotifierProc) (void);
767
+typedef void (Tcl_FinalizeNotifierProc) (ClientData clientData);
768
+typedef void (Tcl_MainLoopProc) (void);
769
+
770
+
771
+/*
772
+ *----------------------------------------------------------------------------
773
+ * The following structure represents a type of object, which is a particular
774
+ * internal representation for an object plus a set of functions that provide
775
+ * standard operations on objects of that type.
776
+ */
777
+
778
+typedef struct Tcl_ObjType {
779
+ const char *name; /* Name of the type, e.g. "int". */
780
+ Tcl_FreeInternalRepProc *freeIntRepProc;
781
+ /* Called to free any storage for the type's
782
+ * internal rep. NULL if the internal rep does
783
+ * not need freeing. */
784
+ Tcl_DupInternalRepProc *dupIntRepProc;
785
+ /* Called to create a new object as a copy of
786
+ * an existing object. */
787
+ Tcl_UpdateStringProc *updateStringProc;
788
+ /* Called to update the string rep from the
789
+ * type's internal representation. */
790
+ Tcl_SetFromAnyProc *setFromAnyProc;
791
+ /* Called to convert the object's internal rep
792
+ * to this type. Frees the internal rep of the
793
+ * old type. Returns TCL_ERROR on failure. */
794
+} Tcl_ObjType;
795
+
796
+/*
797
+ * One of the following structures exists for each object in the Tcl system.
798
+ * An object stores a value as either a string, some internal representation,
799
+ * or both.
800
+ */
801
+
802
+typedef struct Tcl_Obj {
803
+ int refCount; /* When 0 the object will be freed. */
804
+ char *bytes; /* This points to the first byte of the
805
+ * object's string representation. The array
806
+ * must be followed by a null byte (i.e., at
807
+ * offset length) but may also contain
808
+ * embedded null characters. The array's
809
+ * storage is allocated by ckalloc. NULL means
810
+ * the string rep is invalid and must be
811
+ * regenerated from the internal rep. Clients
812
+ * should use Tcl_GetStringFromObj or
813
+ * Tcl_GetString to get a pointer to the byte
814
+ * array as a readonly value. */
815
+ int length; /* The number of bytes at *bytes, not
816
+ * including the terminating null. */
817
+ const Tcl_ObjType *typePtr; /* Denotes the object's type. Always
818
+ * corresponds to the type of the object's
819
+ * internal rep. NULL indicates the object has
820
+ * no internal rep (has no type). */
821
+ union { /* The internal representation: */
822
+ long longValue; /* - an long integer value. */
823
+ double doubleValue; /* - a double-precision floating value. */
824
+ void *otherValuePtr; /* - another, type-specific value. */
825
+ Tcl_WideInt wideValue; /* - a long long value. */
826
+ struct { /* - internal rep as two pointers. */
827
+ void *ptr1;
828
+ void *ptr2;
829
+ } twoPtrValue;
830
+ struct { /* - internal rep as a pointer and a long,
831
+ * the main use of which is a bignum's
832
+ * tightly packed fields, where the alloc,
833
+ * used and signum flags are packed into a
834
+ * single word with everything else hung
835
+ * off the pointer. */
836
+ void *ptr;
837
+ unsigned long value;
838
+ } ptrAndLongRep;
839
+ } internalRep;
840
+} Tcl_Obj;
841
+
842
+/*
843
+ * Macros to increment and decrement a Tcl_Obj's reference count, and to test
844
+ * whether an object is shared (i.e. has reference count > 1). Note: clients
845
+ * should use Tcl_DecrRefCount() when they are finished using an object, and
846
+ * should never call TclFreeObj() directly. TclFreeObj() is only defined and
847
+ * made public in tcl.h to support Tcl_DecrRefCount's macro definition.
848
+ */
849
+
850
+void Tcl_IncrRefCount(Tcl_Obj *objPtr);
851
+void Tcl_DecrRefCount(Tcl_Obj *objPtr);
852
+int Tcl_IsShared(Tcl_Obj *objPtr);
853
+
854
+
855
+/*
856
+ *----------------------------------------------------------------------------
857
+ * The following structure contains the state needed by Tcl_SaveResult. No-one
858
+ * outside of Tcl should access any of these fields. This structure is
859
+ * typically allocated on the stack.
860
+ */
861
+
862
+typedef struct Tcl_SavedResult {
863
+ char *result;
864
+ Tcl_FreeProc *freeProc;
865
+ Tcl_Obj *objResultPtr;
866
+ char *appendResult;
867
+ int appendAvl;
868
+ int appendUsed;
869
+ char resultSpace[TCL_RESULT_SIZE+1];
870
+} Tcl_SavedResult;
871
+
872
+/*
873
+ *----------------------------------------------------------------------------
874
+ * The following definitions support Tcl's namespace facility. Note: the first
875
+ * five fields must match exactly the fields in a Namespace structure (see
876
+ * tclInt.h).
877
+ */
878
+
879
+typedef struct Tcl_Namespace {
880
+ char *name; /* The namespace's name within its parent
881
+ * namespace. This contains no ::'s. The name
882
+ * of the global namespace is "" although "::"
883
+ * is an synonym. */
884
+ char *fullName; /* The namespace's fully qualified name. This
885
+ * starts with ::. */
886
+ ClientData clientData; /* Arbitrary value associated with this
887
+ * namespace. */
888
+ Tcl_NamespaceDeleteProc *deleteProc;
889
+ /* Function invoked when deleting the
890
+ * namespace to, e.g., free clientData. */
891
+ struct Tcl_Namespace *parentPtr;
892
+ /* Points to the namespace that contains this
893
+ * one. NULL if this is the global
894
+ * namespace. */
895
+} Tcl_Namespace;
896
+
897
+/*
898
+ *----------------------------------------------------------------------------
899
+ * The following structure represents a call frame, or activation record. A
900
+ * call frame defines a naming context for a procedure call: its local scope
901
+ * (for local variables) and its namespace scope (used for non-local
902
+ * variables; often the global :: namespace). A call frame can also define the
903
+ * naming context for a namespace eval or namespace inscope command: the
904
+ * namespace in which the command's code should execute. The Tcl_CallFrame
905
+ * structures exist only while procedures or namespace eval/inscope's are
906
+ * being executed, and provide a Tcl call stack.
907
+ *
908
+ * A call frame is initialized and pushed using Tcl_PushCallFrame and popped
909
+ * using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be provided by the
910
+ * Tcl_PushCallFrame caller, and callers typically allocate them on the C call
911
+ * stack for efficiency. For this reason, Tcl_CallFrame is defined as a
912
+ * structure and not as an opaque token. However, most Tcl_CallFrame fields
913
+ * are hidden since applications should not access them directly; others are
914
+ * declared as "dummyX".
915
+ *
916
+ * WARNING!! The structure definition must be kept consistent with the
917
+ * CallFrame structure in tclInt.h. If you change one, change the other.
918
+ */
919
+
920
+typedef struct Tcl_CallFrame {
921
+ Tcl_Namespace *nsPtr;
922
+ int dummy1;
923
+ int dummy2;
924
+ void *dummy3;
925
+ void *dummy4;
926
+ void *dummy5;
927
+ int dummy6;
928
+ void *dummy7;
929
+ void *dummy8;
930
+ int dummy9;
931
+ void *dummy10;
932
+ void *dummy11;
933
+ void *dummy12;
934
+ void *dummy13;
935
+} Tcl_CallFrame;
936
+
937
+/*
938
+ *----------------------------------------------------------------------------
939
+ * Information about commands that is returned by Tcl_GetCommandInfo and
940
+ * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based command
941
+ * function while proc is a traditional Tcl argc/argv string-based function.
942
+ * Tcl_CreateObjCommand and Tcl_CreateCommand ensure that both objProc and
943
+ * proc are non-NULL and can be called to execute the command. However, it may
944
+ * be faster to call one instead of the other. The member isNativeObjectProc
945
+ * is set to 1 if an object-based function was registered by
946
+ * Tcl_CreateObjCommand, and to 0 if a string-based function was registered by
947
+ * Tcl_CreateCommand. The other function is typically set to a compatibility
948
+ * wrapper that does string-to-object or object-to-string argument conversions
949
+ * then calls the other function.
950
+ */
951
+
952
+typedef struct Tcl_CmdInfo {
953
+ int isNativeObjectProc; /* 1 if objProc was registered by a call to
954
+ * Tcl_CreateObjCommand; 0 otherwise.
955
+ * Tcl_SetCmdInfo does not modify this
956
+ * field. */
957
+ Tcl_ObjCmdProc *objProc; /* Command's object-based function. */
958
+ ClientData objClientData; /* ClientData for object proc. */
959
+ Tcl_CmdProc *proc; /* Command's string-based function. */
960
+ ClientData clientData; /* ClientData for string proc. */
961
+ Tcl_CmdDeleteProc *deleteProc;
962
+ /* Function to call when command is
963
+ * deleted. */
964
+ ClientData deleteData; /* Value to pass to deleteProc (usually the
965
+ * same as clientData). */
966
+ Tcl_Namespace *namespacePtr;/* Points to the namespace that contains this
967
+ * command. Note that Tcl_SetCmdInfo will not
968
+ * change a command's namespace; use
969
+ * TclRenameCommand or Tcl_Eval (of 'rename')
970
+ * to do that. */
971
+} Tcl_CmdInfo;
972
+
973
+/*
974
+ *----------------------------------------------------------------------------
975
+ * The structure defined below is used to hold dynamic strings. The only
976
+ * fields that clients should use are string and length, accessible via the
977
+ * macros Tcl_DStringValue and Tcl_DStringLength.
978
+ */
979
+
980
+#define TCL_DSTRING_STATIC_SIZE 200
981
+typedef struct Tcl_DString {
982
+ char *string; /* Points to beginning of string: either
983
+ * staticSpace below or a malloced array. */
984
+ int length; /* Number of non-NULL characters in the
985
+ * string. */
986
+ int spaceAvl; /* Total number of bytes available for the
987
+ * string and its terminating NULL char. */
988
+ char staticSpace[TCL_DSTRING_STATIC_SIZE];
989
+ /* Space to use in common case where string is
990
+ * small. */
991
+} Tcl_DString;
992
+
993
+#define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
994
+#define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
995
+#define Tcl_DStringTrunc Tcl_DStringSetLength
996
+
997
+/*
998
+ * Definitions for the maximum number of digits of precision that may be
999
+ * specified in the "tcl_precision" variable, and the number of bytes of
1000
+ * buffer space required by Tcl_PrintDouble.
1001
+ */
1002
+
1003
+#define TCL_MAX_PREC 17
1004
+#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
1005
+
1006
+/*
1007
+ * Definition for a number of bytes of buffer space sufficient to hold the
1008
+ * string representation of an integer in base 10 (assuming the existence of
1009
+ * 64-bit integers).
1010
+ */
1011
+
1012
+#define TCL_INTEGER_SPACE 24
1013
+
1014
+/*
1015
+ * Flag values passed to Tcl_ConvertElement.
1016
+ * TCL_DONT_USE_BRACES forces it not to enclose the element in braces, but to
1017
+ * use backslash quoting instead.
1018
+ * TCL_DONT_QUOTE_HASH disables the default quoting of the '#' character. It
1019
+ * is safe to leave the hash unquoted when the element is not the first
1020
+ * element of a list, and this flag can be used by the caller to indicate
1021
+ * that condition.
1022
+ */
1023
+
1024
+#define TCL_DONT_USE_BRACES 1
1025
+#define TCL_DONT_QUOTE_HASH 8
1026
+
1027
+/*
1028
+ * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
1029
+ * abbreviated strings.
1030
+ */
1031
+
1032
+#define TCL_EXACT 1
1033
+
1034
+/*
1035
+ *----------------------------------------------------------------------------
1036
+ * Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv.
1037
+ * WARNING: these bit choices must not conflict with the bit choices for
1038
+ * evalFlag bits in tclInt.h!
1039
+ *
1040
+ * Meanings:
1041
+ * TCL_NO_EVAL: Just record this command
1042
+ * TCL_EVAL_GLOBAL: Execute script in global namespace
1043
+ * TCL_EVAL_DIRECT: Do not compile this script
1044
+ * TCL_EVAL_INVOKE: Magical Tcl_EvalObjv mode for aliases/ensembles
1045
+ * o Run in iPtr->lookupNsPtr or global namespace
1046
+ * o Cut out of error traces
1047
+ * o Don't reset the flags controlling ensemble
1048
+ * error message rewriting.
1049
+ * TCL_CANCEL_UNWIND: Magical Tcl_CancelEval mode that causes the
1050
+ * stack for the script in progress to be
1051
+ * completely unwound.
1052
+ * TCL_EVAL_NOERR: Do no exception reporting at all, just return
1053
+ * as the caller will report.
1054
+ */
1055
+
1056
+#define TCL_NO_EVAL 0x010000
1057
+#define TCL_EVAL_GLOBAL 0x020000
1058
+#define TCL_EVAL_DIRECT 0x040000
1059
+#define TCL_EVAL_INVOKE 0x080000
1060
+#define TCL_CANCEL_UNWIND 0x100000
1061
+#define TCL_EVAL_NOERR 0x200000
1062
+
1063
+/*
1064
+ * Special freeProc values that may be passed to Tcl_SetResult (see the man
1065
+ * page for details):
1066
+ */
1067
+
1068
+#define TCL_VOLATILE ((Tcl_FreeProc *) 1)
1069
+#define TCL_STATIC ((Tcl_FreeProc *) 0)
1070
+#define TCL_DYNAMIC ((Tcl_FreeProc *) 3)
1071
+
1072
+/*
1073
+ * Flag values passed to variable-related functions.
1074
+ * WARNING: these bit choices must not conflict with the bit choice for
1075
+ * TCL_CANCEL_UNWIND, above.
1076
+ */
1077
+
1078
+#define TCL_GLOBAL_ONLY 1
1079
+#define TCL_NAMESPACE_ONLY 2
1080
+#define TCL_APPEND_VALUE 4
1081
+#define TCL_LIST_ELEMENT 8
1082
+#define TCL_TRACE_READS 0x10
1083
+#define TCL_TRACE_WRITES 0x20
1084
+#define TCL_TRACE_UNSETS 0x40
1085
+#define TCL_TRACE_DESTROYED 0x80
1086
+#define TCL_INTERP_DESTROYED 0x100
1087
+#define TCL_LEAVE_ERR_MSG 0x200
1088
+#define TCL_TRACE_ARRAY 0x800
1089
+#ifndef TCL_REMOVE_OBSOLETE_TRACES
1090
+/* Required to support old variable/vdelete/vinfo traces. */
1091
+#define TCL_TRACE_OLD_STYLE 0x1000
1092
+#endif
1093
+/* Indicate the semantics of the result of a trace. */
1094
+#define TCL_TRACE_RESULT_DYNAMIC 0x8000
1095
+#define TCL_TRACE_RESULT_OBJECT 0x10000
1096
+
1097
+/*
1098
+ * Flag values for ensemble commands.
1099
+ */
1100
+
1101
+#define TCL_ENSEMBLE_PREFIX 0x02/* Flag value to say whether to allow
1102
+ * unambiguous prefixes of commands or to
1103
+ * require exact matches for command names. */
1104
+
1105
+/*
1106
+ * Flag values passed to command-related functions.
1107
+ */
1108
+
1109
+#define TCL_TRACE_RENAME 0x2000
1110
+#define TCL_TRACE_DELETE 0x4000
1111
+
1112
+#define TCL_ALLOW_INLINE_COMPILATION 0x20000
1113
+
1114
+/*
1115
+ * The TCL_PARSE_PART1 flag is deprecated and has no effect. The part1 is now
1116
+ * always parsed whenever the part2 is NULL. (This is to avoid a common error
1117
+ * when converting code to use the new object based APIs and forgetting to
1118
+ * give the flag)
1119
+ */
1120
+
1121
+#ifndef TCL_NO_DEPRECATED
1122
+# define TCL_PARSE_PART1 0x400
1123
+#endif
1124
+
1125
+/*
1126
+ * Types for linked variables:
1127
+ */
1128
+
1129
+#define TCL_LINK_INT 1
1130
+#define TCL_LINK_DOUBLE 2
1131
+#define TCL_LINK_BOOLEAN 3
1132
+#define TCL_LINK_STRING 4
1133
+#define TCL_LINK_WIDE_INT 5
1134
+#define TCL_LINK_CHAR 6
1135
+#define TCL_LINK_UCHAR 7
1136
+#define TCL_LINK_SHORT 8
1137
+#define TCL_LINK_USHORT 9
1138
+#define TCL_LINK_UINT 10
1139
+#define TCL_LINK_LONG 11
1140
+#define TCL_LINK_ULONG 12
1141
+#define TCL_LINK_FLOAT 13
1142
+#define TCL_LINK_WIDE_UINT 14
1143
+#define TCL_LINK_READ_ONLY 0x80
1144
+
1145
+
1146
+/*
1147
+ *----------------------------------------------------------------------------
1148
+ * Forward declarations of Tcl_HashTable and related types.
1149
+ */
1150
+
1151
+typedef struct Tcl_HashKeyType Tcl_HashKeyType;
1152
+typedef struct Tcl_HashTable Tcl_HashTable;
1153
+typedef struct Tcl_HashEntry Tcl_HashEntry;
1154
+
1155
+typedef unsigned (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr);
1156
+typedef int (Tcl_CompareHashKeysProc) (void *keyPtr, Tcl_HashEntry *hPtr);
1157
+typedef Tcl_HashEntry * (Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr,
1158
+ void *keyPtr);
1159
+typedef void (Tcl_FreeHashEntryProc) (Tcl_HashEntry *hPtr);
1160
+
1161
+/*
1162
+ * This flag controls whether the hash table stores the hash of a key, or
1163
+ * recalculates it. There should be no reason for turning this flag off as it
1164
+ * is completely binary and source compatible unless you directly access the
1165
+ * bucketPtr member of the Tcl_HashTableEntry structure. This member has been
1166
+ * removed and the space used to store the hash value.
1167
+ */
1168
+
1169
+#ifndef TCL_HASH_KEY_STORE_HASH
1170
+# define TCL_HASH_KEY_STORE_HASH 1
1171
+#endif
1172
+
1173
+/*
1174
+ * Structure definition for an entry in a hash table. No-one outside Tcl
1175
+ * should access any of these fields directly; use the macros defined below.
1176
+ */
1177
+
1178
+struct Tcl_HashEntry {
1179
+ Tcl_HashEntry *nextPtr; /* Pointer to next entry in this hash bucket,
1180
+ * or NULL for end of chain. */
1181
+ Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */
1182
+#if TCL_HASH_KEY_STORE_HASH
1183
+ void *hash; /* Hash value, stored as pointer to ensure
1184
+ * that the offsets of the fields in this
1185
+ * structure are not changed. */
1186
+#else
1187
+ Tcl_HashEntry **bucketPtr; /* Pointer to bucket that points to first
1188
+ * entry in this entry's chain: used for
1189
+ * deleting the entry. */
1190
+#endif
1191
+ ClientData clientData; /* Application stores something here with
1192
+ * Tcl_SetHashValue. */
1193
+ union { /* Key has one of these forms: */
1194
+ char *oneWordValue; /* One-word value for key. */
1195
+ Tcl_Obj *objPtr; /* Tcl_Obj * key value. */
1196
+ int words[1]; /* Multiple integer words for key. The actual
1197
+ * size will be as large as necessary for this
1198
+ * table's keys. */
1199
+ char string[1]; /* String for key. The actual size will be as
1200
+ * large as needed to hold the key. */
1201
+ } key; /* MUST BE LAST FIELD IN RECORD!! */
1202
+};
1203
+
1204
+/*
1205
+ * Flags used in Tcl_HashKeyType.
1206
+ *
1207
+ * TCL_HASH_KEY_RANDOMIZE_HASH -
1208
+ * There are some things, pointers for example
1209
+ * which don't hash well because they do not use
1210
+ * the lower bits. If this flag is set then the
1211
+ * hash table will attempt to rectify this by
1212
+ * randomising the bits and then using the upper
1213
+ * N bits as the index into the table.
1214
+ * TCL_HASH_KEY_SYSTEM_HASH - If this flag is set then all memory internally
1215
+ * allocated for the hash table that is not for an
1216
+ * entry will use the system heap.
1217
+ */
1218
+
1219
+#define TCL_HASH_KEY_RANDOMIZE_HASH 0x1
1220
+#define TCL_HASH_KEY_SYSTEM_HASH 0x2
1221
+
1222
+/*
1223
+ * Structure definition for the methods associated with a hash table key type.
1224
+ */
1225
+
1226
+#define TCL_HASH_KEY_TYPE_VERSION 1
1227
+struct Tcl_HashKeyType {
1228
+ int version; /* Version of the table. If this structure is
1229
+ * extended in future then the version can be
1230
+ * used to distinguish between different
1231
+ * structures. */
1232
+ int flags; /* Flags, see above for details. */
1233
+ Tcl_HashKeyProc *hashKeyProc;
1234
+ /* Calculates a hash value for the key. If
1235
+ * this is NULL then the pointer itself is
1236
+ * used as a hash value. */
1237
+ Tcl_CompareHashKeysProc *compareKeysProc;
1238
+ /* Compares two keys and returns zero if they
1239
+ * do not match, and non-zero if they do. If
1240
+ * this is NULL then the pointers are
1241
+ * compared. */
1242
+ Tcl_AllocHashEntryProc *allocEntryProc;
1243
+ /* Called to allocate memory for a new entry,
1244
+ * i.e. if the key is a string then this could
1245
+ * allocate a single block which contains
1246
+ * enough space for both the entry and the
1247
+ * string. Only the key field of the allocated
1248
+ * Tcl_HashEntry structure needs to be filled
1249
+ * in. If something else needs to be done to
1250
+ * the key, i.e. incrementing a reference
1251
+ * count then that should be done by this
1252
+ * function. If this is NULL then Tcl_Alloc is
1253
+ * used to allocate enough space for a
1254
+ * Tcl_HashEntry and the key pointer is
1255
+ * assigned to key.oneWordValue. */
1256
+ Tcl_FreeHashEntryProc *freeEntryProc;
1257
+ /* Called to free memory associated with an
1258
+ * entry. If something else needs to be done
1259
+ * to the key, i.e. decrementing a reference
1260
+ * count then that should be done by this
1261
+ * function. If this is NULL then Tcl_Free is
1262
+ * used to free the Tcl_HashEntry. */
1263
+};
1264
+
1265
+/*
1266
+ * Structure definition for a hash table. Must be in tcl.h so clients can
1267
+ * allocate space for these structures, but clients should never access any
1268
+ * fields in this structure.
1269
+ */
1270
+
1271
+#define TCL_SMALL_HASH_TABLE 4
1272
+struct Tcl_HashTable {
1273
+ Tcl_HashEntry **buckets; /* Pointer to bucket array. Each element
1274
+ * points to first entry in bucket's hash
1275
+ * chain, or NULL. */
1276
+ Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
1277
+ /* Bucket array used for small tables (to
1278
+ * avoid mallocs and frees). */
1279
+ int numBuckets; /* Total number of buckets allocated at
1280
+ * **bucketPtr. */
1281
+ int numEntries; /* Total number of entries present in
1282
+ * table. */
1283
+ int rebuildSize; /* Enlarge table when numEntries gets to be
1284
+ * this large. */
1285
+ int downShift; /* Shift count used in hashing function.
1286
+ * Designed to use high-order bits of
1287
+ * randomized keys. */
1288
+ int mask; /* Mask value used in hashing function. */
1289
+ int keyType; /* Type of keys used in this table. It's
1290
+ * either TCL_CUSTOM_KEYS, TCL_STRING_KEYS,
1291
+ * TCL_ONE_WORD_KEYS, or an integer giving the
1292
+ * number of ints that is the size of the
1293
+ * key. */
1294
+ Tcl_HashEntry *(*findProc) (Tcl_HashTable *tablePtr, const char *key);
1295
+ Tcl_HashEntry *(*createProc) (Tcl_HashTable *tablePtr, const char *key,
1296
+ int *newPtr);
1297
+ const Tcl_HashKeyType *typePtr;
1298
+ /* Type of the keys used in the
1299
+ * Tcl_HashTable. */
1300
+};
1301
+
1302
+/*
1303
+ * Structure definition for information used to keep track of searches through
1304
+ * hash tables:
1305
+ */
1306
+
1307
+typedef struct Tcl_HashSearch {
1308
+ Tcl_HashTable *tablePtr; /* Table being searched. */
1309
+ int nextIndex; /* Index of next bucket to be enumerated after
1310
+ * present one. */
1311
+ Tcl_HashEntry *nextEntryPtr;/* Next entry to be enumerated in the current
1312
+ * bucket. */
1313
+} Tcl_HashSearch;
1314
+
1315
+/*
1316
+ * Acceptable key types for hash tables:
1317
+ *
1318
+ * TCL_STRING_KEYS: The keys are strings, they are copied into the
1319
+ * entry.
1320
+ * TCL_ONE_WORD_KEYS: The keys are pointers, the pointer is stored
1321
+ * in the entry.
1322
+ * TCL_CUSTOM_TYPE_KEYS: The keys are arbitrary types which are copied
1323
+ * into the entry.
1324
+ * TCL_CUSTOM_PTR_KEYS: The keys are pointers to arbitrary types, the
1325
+ * pointer is stored in the entry.
1326
+ *
1327
+ * While maintaining binary compatability the above have to be distinct values
1328
+ * as they are used to differentiate between old versions of the hash table
1329
+ * which don't have a typePtr and new ones which do. Once binary compatability
1330
+ * is discarded in favour of making more wide spread changes TCL_STRING_KEYS
1331
+ * can be the same as TCL_CUSTOM_TYPE_KEYS, and TCL_ONE_WORD_KEYS can be the
1332
+ * same as TCL_CUSTOM_PTR_KEYS because they simply determine how the key is
1333
+ * accessed from the entry and not the behaviour.
1334
+ */
1335
+
1336
+#define TCL_STRING_KEYS (0)
1337
+#define TCL_ONE_WORD_KEYS (1)
1338
+#define TCL_CUSTOM_TYPE_KEYS (-2)
1339
+#define TCL_CUSTOM_PTR_KEYS (-1)
1340
+
1341
+/*
1342
+ * Structure definition for information used to keep track of searches through
1343
+ * dictionaries. These fields should not be accessed by code outside
1344
+ * tclDictObj.c
1345
+ */
1346
+
1347
+typedef struct {
1348
+ void *next; /* Search position for underlying hash
1349
+ * table. */
1350
+ int epoch; /* Epoch marker for dictionary being searched,
1351
+ * or -1 if search has terminated. */
1352
+ Tcl_Dict dictionaryPtr; /* Reference to dictionary being searched. */
1353
+} Tcl_DictSearch;
1354
+
1355
+
1356
+/*
1357
+ *----------------------------------------------------------------------------
1358
+ * Flag values to pass to Tcl_DoOneEvent to disable searches for some kinds of
1359
+ * events:
1360
+ */
1361
+
1362
+#define TCL_DONT_WAIT (1<<1)
1363
+#define TCL_WINDOW_EVENTS (1<<2)
1364
+#define TCL_FILE_EVENTS (1<<3)
1365
+#define TCL_TIMER_EVENTS (1<<4)
1366
+#define TCL_IDLE_EVENTS (1<<5) /* WAS 0x10 ???? */
1367
+#define TCL_ALL_EVENTS (~TCL_DONT_WAIT)
1368
+
1369
+/*
1370
+ * The following structure defines a generic event for the Tcl event system.
1371
+ * These are the things that are queued in calls to Tcl_QueueEvent and
1372
+ * serviced later by Tcl_DoOneEvent. There can be many different kinds of
1373
+ * events with different fields, corresponding to window events, timer events,
1374
+ * etc. The structure for a particular event consists of a Tcl_Event header
1375
+ * followed by additional information specific to that event.
1376
+ */
1377
+
1378
+struct Tcl_Event {
1379
+ Tcl_EventProc *proc; /* Function to call to service this event. */
1380
+ struct Tcl_Event *nextPtr; /* Next in list of pending events, or NULL. */
1381
+};
1382
+
1383
+/*
1384
+ * Positions to pass to Tcl_QueueEvent:
1385
+ */
1386
+
1387
+typedef enum {
1388
+ TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
1389
+} Tcl_QueuePosition;
1390
+
1391
+/*
1392
+ * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
1393
+ * event routines.
1394
+ */
1395
+
1396
+#define TCL_SERVICE_NONE 0
1397
+#define TCL_SERVICE_ALL 1
1398
+
1399
+/*
1400
+ * The following structure keeps is used to hold a time value, either as an
1401
+ * absolute time (the number of seconds from the epoch) or as an elapsed time.
1402
+ * On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
1403
+ */
1404
+
1405
+typedef struct Tcl_Time {
1406
+ long sec; /* Seconds. */
1407
+ long usec; /* Microseconds. */
1408
+} Tcl_Time;
1409
+
1410
+typedef void (Tcl_SetTimerProc) (CONST86 Tcl_Time *timePtr);
1411
+typedef int (Tcl_WaitForEventProc) (CONST86 Tcl_Time *timePtr);
1412
+
1413
+/*
1414
+ * TIP #233 (Virtualized Time)
1415
+ */
1416
+
1417
+typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, ClientData clientData);
1418
+typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData);
1419
+
1420
+/*
1421
+ *----------------------------------------------------------------------------
1422
+ * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler to
1423
+ * indicate what sorts of events are of interest:
1424
+ */
1425
+
1426
+#define TCL_READABLE (1<<1)
1427
+#define TCL_WRITABLE (1<<2)
1428
+#define TCL_EXCEPTION (1<<3)
1429
+
1430
+/*
1431
+ * Flag values to pass to Tcl_OpenCommandChannel to indicate the disposition
1432
+ * of the stdio handles. TCL_STDIN, TCL_STDOUT, TCL_STDERR, are also used in
1433
+ * Tcl_GetStdChannel.
1434
+ */
1435
+
1436
+#define TCL_STDIN (1<<1)
1437
+#define TCL_STDOUT (1<<2)
1438
+#define TCL_STDERR (1<<3)
1439
+#define TCL_ENFORCE_MODE (1<<4)
1440
+
1441
+/*
1442
+ * Bits passed to Tcl_DriverClose2Proc to indicate which side of a channel
1443
+ * should be closed.
1444
+ */
1445
+
1446
+#define TCL_CLOSE_READ (1<<1)
1447
+#define TCL_CLOSE_WRITE (1<<2)
1448
+
1449
+/*
1450
+ * Value to use as the closeProc for a channel that supports the close2Proc
1451
+ * interface.
1452
+ */
1453
+
1454
+#define TCL_CLOSE2PROC ((Tcl_DriverCloseProc *) 1)
1455
+
1456
+/*
1457
+ * Channel version tag. This was introduced in 8.3.2/8.4.
1458
+ */
1459
+
1460
+#define TCL_CHANNEL_VERSION_1 ((Tcl_ChannelTypeVersion) 0x1)
1461
+#define TCL_CHANNEL_VERSION_2 ((Tcl_ChannelTypeVersion) 0x2)
1462
+#define TCL_CHANNEL_VERSION_3 ((Tcl_ChannelTypeVersion) 0x3)
1463
+#define TCL_CHANNEL_VERSION_4 ((Tcl_ChannelTypeVersion) 0x4)
1464
+#define TCL_CHANNEL_VERSION_5 ((Tcl_ChannelTypeVersion) 0x5)
1465
+
1466
+/*
1467
+ * TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc.
1468
+ */
1469
+
1470
+#define TCL_CHANNEL_THREAD_INSERT (0)
1471
+#define TCL_CHANNEL_THREAD_REMOVE (1)
1472
+
1473
+/*
1474
+ * Typedefs for the various operations in a channel type:
1475
+ */
1476
+
1477
+typedef int (Tcl_DriverBlockModeProc) (ClientData instanceData, int mode);
1478
+typedef int (Tcl_DriverCloseProc) (ClientData instanceData,
1479
+ Tcl_Interp *interp);
1480
+typedef int (Tcl_DriverClose2Proc) (ClientData instanceData,
1481
+ Tcl_Interp *interp, int flags);
1482
+typedef int (Tcl_DriverInputProc) (ClientData instanceData, char *buf,
1483
+ int toRead, int *errorCodePtr);
1484
+typedef int (Tcl_DriverOutputProc) (ClientData instanceData,
1485
+ CONST84 char *buf, int toWrite, int *errorCodePtr);
1486
+typedef int (Tcl_DriverSeekProc) (ClientData instanceData, long offset,
1487
+ int mode, int *errorCodePtr);
1488
+typedef int (Tcl_DriverSetOptionProc) (ClientData instanceData,
1489
+ Tcl_Interp *interp, const char *optionName,
1490
+ const char *value);
1491
+typedef int (Tcl_DriverGetOptionProc) (ClientData instanceData,
1492
+ Tcl_Interp *interp, CONST84 char *optionName,
1493
+ Tcl_DString *dsPtr);
1494
+typedef void (Tcl_DriverWatchProc) (ClientData instanceData, int mask);
1495
+typedef int (Tcl_DriverGetHandleProc) (ClientData instanceData,
1496
+ int direction, ClientData *handlePtr);
1497
+typedef int (Tcl_DriverFlushProc) (ClientData instanceData);
1498
+typedef int (Tcl_DriverHandlerProc) (ClientData instanceData,
1499
+ int interestMask);
1500
+typedef Tcl_WideInt (Tcl_DriverWideSeekProc) (ClientData instanceData,
1501
+ Tcl_WideInt offset, int mode, int *errorCodePtr);
1502
+/*
1503
+ * TIP #218, Channel Thread Actions
1504
+ */
1505
+typedef void (Tcl_DriverThreadActionProc) (ClientData instanceData,
1506
+ int action);
1507
+/*
1508
+ * TIP #208, File Truncation (etc.)
1509
+ */
1510
+typedef int (Tcl_DriverTruncateProc) (ClientData instanceData,
1511
+ Tcl_WideInt length);
1512
+
1513
+/*
1514
+ * struct Tcl_ChannelType:
1515
+ *
1516
+ * One such structure exists for each type (kind) of channel. It collects
1517
+ * together in one place all the functions that are part of the specific
1518
+ * channel type.
1519
+ *
1520
+ * It is recommend that the Tcl_Channel* functions are used to access elements
1521
+ * of this structure, instead of direct accessing.
1522
+ */
1523
+
1524
+typedef struct Tcl_ChannelType {
1525
+ const char *typeName; /* The name of the channel type in Tcl
1526
+ * commands. This storage is owned by channel
1527
+ * type. */
1528
+ Tcl_ChannelTypeVersion version;
1529
+ /* Version of the channel type. */
1530
+ Tcl_DriverCloseProc *closeProc;
1531
+ /* Function to call to close the channel, or
1532
+ * TCL_CLOSE2PROC if the close2Proc should be
1533
+ * used instead. */
1534
+ Tcl_DriverInputProc *inputProc;
1535
+ /* Function to call for input on channel. */
1536
+ Tcl_DriverOutputProc *outputProc;
1537
+ /* Function to call for output on channel. */
1538
+ Tcl_DriverSeekProc *seekProc;
1539
+ /* Function to call to seek on the channel.
1540
+ * May be NULL. */
1541
+ Tcl_DriverSetOptionProc *setOptionProc;
1542
+ /* Set an option on a channel. */
1543
+ Tcl_DriverGetOptionProc *getOptionProc;
1544
+ /* Get an option from a channel. */
1545
+ Tcl_DriverWatchProc *watchProc;
1546
+ /* Set up the notifier to watch for events on
1547
+ * this channel. */
1548
+ Tcl_DriverGetHandleProc *getHandleProc;
1549
+ /* Get an OS handle from the channel or NULL
1550
+ * if not supported. */
1551
+ Tcl_DriverClose2Proc *close2Proc;
1552
+ /* Function to call to close the channel if
1553
+ * the device supports closing the read &
1554
+ * write sides independently. */
1555
+ Tcl_DriverBlockModeProc *blockModeProc;
1556
+ /* Set blocking mode for the raw channel. May
1557
+ * be NULL. */
1558
+ /*
1559
+ * Only valid in TCL_CHANNEL_VERSION_2 channels or later.
1560
+ */
1561
+ Tcl_DriverFlushProc *flushProc;
1562
+ /* Function to call to flush a channel. May be
1563
+ * NULL. */
1564
+ Tcl_DriverHandlerProc *handlerProc;
1565
+ /* Function to call to handle a channel event.
1566
+ * This will be passed up the stacked channel
1567
+ * chain. */
1568
+ /*
1569
+ * Only valid in TCL_CHANNEL_VERSION_3 channels or later.
1570
+ */
1571
+ Tcl_DriverWideSeekProc *wideSeekProc;
1572
+ /* Function to call to seek on the channel
1573
+ * which can handle 64-bit offsets. May be
1574
+ * NULL, and must be NULL if seekProc is
1575
+ * NULL. */
1576
+ /*
1577
+ * Only valid in TCL_CHANNEL_VERSION_4 channels or later.
1578
+ * TIP #218, Channel Thread Actions.
1579
+ */
1580
+ Tcl_DriverThreadActionProc *threadActionProc;
1581
+ /* Function to call to notify the driver of
1582
+ * thread specific activity for a channel. May
1583
+ * be NULL. */
1584
+ /*
1585
+ * Only valid in TCL_CHANNEL_VERSION_5 channels or later.
1586
+ * TIP #208, File Truncation.
1587
+ */
1588
+ Tcl_DriverTruncateProc *truncateProc;
1589
+ /* Function to call to truncate the underlying
1590
+ * file to a particular length. May be NULL if
1591
+ * the channel does not support truncation. */
1592
+} Tcl_ChannelType;
1593
+
1594
+/*
1595
+ * The following flags determine whether the blockModeProc above should set
1596
+ * the channel into blocking or nonblocking mode. They are passed as arguments
1597
+ * to the blockModeProc function in the above structure.
1598
+ */
1599
+
1600
+#define TCL_MODE_BLOCKING 0 /* Put channel into blocking mode. */
1601
+#define TCL_MODE_NONBLOCKING 1 /* Put channel into nonblocking
1602
+ * mode. */
1603
+
1604
+/*
1605
+ *----------------------------------------------------------------------------
1606
+ * Enum for different types of file paths.
1607
+ */
1608
+
1609
+typedef enum Tcl_PathType {
1610
+ TCL_PATH_ABSOLUTE,
1611
+ TCL_PATH_RELATIVE,
1612
+ TCL_PATH_VOLUME_RELATIVE
1613
+} Tcl_PathType;
1614
+
1615
+/*
1616
+ * The following structure is used to pass glob type data amongst the various
1617
+ * glob routines and Tcl_FSMatchInDirectory.
1618
+ */
1619
+
1620
+typedef struct Tcl_GlobTypeData {
1621
+ int type; /* Corresponds to bcdpfls as in 'find -t'. */
1622
+ int perm; /* Corresponds to file permissions. */
1623
+ Tcl_Obj *macType; /* Acceptable Mac type. */
1624
+ Tcl_Obj *macCreator; /* Acceptable Mac creator. */
1625
+} Tcl_GlobTypeData;
1626
+
1627
+/*
1628
+ * Type and permission definitions for glob command.
1629
+ */
1630
+
1631
+#define TCL_GLOB_TYPE_BLOCK (1<<0)
1632
+#define TCL_GLOB_TYPE_CHAR (1<<1)
1633
+#define TCL_GLOB_TYPE_DIR (1<<2)
1634
+#define TCL_GLOB_TYPE_PIPE (1<<3)
1635
+#define TCL_GLOB_TYPE_FILE (1<<4)
1636
+#define TCL_GLOB_TYPE_LINK (1<<5)
1637
+#define TCL_GLOB_TYPE_SOCK (1<<6)
1638
+#define TCL_GLOB_TYPE_MOUNT (1<<7)
1639
+
1640
+#define TCL_GLOB_PERM_RONLY (1<<0)
1641
+#define TCL_GLOB_PERM_HIDDEN (1<<1)
1642
+#define TCL_GLOB_PERM_R (1<<2)
1643
+#define TCL_GLOB_PERM_W (1<<3)
1644
+#define TCL_GLOB_PERM_X (1<<4)
1645
+
1646
+/*
1647
+ * Flags for the unload callback function.
1648
+ */
1649
+
1650
+#define TCL_UNLOAD_DETACH_FROM_INTERPRETER (1<<0)
1651
+#define TCL_UNLOAD_DETACH_FROM_PROCESS (1<<1)
1652
+
1653
+/*
1654
+ * Typedefs for the various filesystem operations:
1655
+ */
1656
+
1657
+typedef int (Tcl_FSStatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1658
+typedef int (Tcl_FSAccessProc) (Tcl_Obj *pathPtr, int mode);
1659
+typedef Tcl_Channel (Tcl_FSOpenFileChannelProc) (Tcl_Interp *interp,
1660
+ Tcl_Obj *pathPtr, int mode, int permissions);
1661
+typedef int (Tcl_FSMatchInDirectoryProc) (Tcl_Interp *interp, Tcl_Obj *result,
1662
+ Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types);
1663
+typedef Tcl_Obj * (Tcl_FSGetCwdProc) (Tcl_Interp *interp);
1664
+typedef int (Tcl_FSChdirProc) (Tcl_Obj *pathPtr);
1665
+typedef int (Tcl_FSLstatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1666
+typedef int (Tcl_FSCreateDirectoryProc) (Tcl_Obj *pathPtr);
1667
+typedef int (Tcl_FSDeleteFileProc) (Tcl_Obj *pathPtr);
1668
+typedef int (Tcl_FSCopyDirectoryProc) (Tcl_Obj *srcPathPtr,
1669
+ Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr);
1670
+typedef int (Tcl_FSCopyFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr);
1671
+typedef int (Tcl_FSRemoveDirectoryProc) (Tcl_Obj *pathPtr, int recursive,
1672
+ Tcl_Obj **errorPtr);
1673
+typedef int (Tcl_FSRenameFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr);
1674
+typedef void (Tcl_FSUnloadFileProc) (Tcl_LoadHandle loadHandle);
1675
+typedef Tcl_Obj * (Tcl_FSListVolumesProc) (void);
1676
+/* We have to declare the utime structure here. */
1677
+struct utimbuf;
1678
+typedef int (Tcl_FSUtimeProc) (Tcl_Obj *pathPtr, struct utimbuf *tval);
1679
+typedef int (Tcl_FSNormalizePathProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
1680
+ int nextCheckpoint);
1681
+typedef int (Tcl_FSFileAttrsGetProc) (Tcl_Interp *interp, int index,
1682
+ Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef);
1683
+typedef const char *CONST86 * (Tcl_FSFileAttrStringsProc) (Tcl_Obj *pathPtr,
1684
+ Tcl_Obj **objPtrRef);
1685
+typedef int (Tcl_FSFileAttrsSetProc) (Tcl_Interp *interp, int index,
1686
+ Tcl_Obj *pathPtr, Tcl_Obj *objPtr);
1687
+typedef Tcl_Obj * (Tcl_FSLinkProc) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr,
1688
+ int linkType);
1689
+typedef int (Tcl_FSLoadFileProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
1690
+ Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr);
1691
+typedef int (Tcl_FSPathInFilesystemProc) (Tcl_Obj *pathPtr,
1692
+ ClientData *clientDataPtr);
1693
+typedef Tcl_Obj * (Tcl_FSFilesystemPathTypeProc) (Tcl_Obj *pathPtr);
1694
+typedef Tcl_Obj * (Tcl_FSFilesystemSeparatorProc) (Tcl_Obj *pathPtr);
1695
+typedef void (Tcl_FSFreeInternalRepProc) (ClientData clientData);
1696
+typedef ClientData (Tcl_FSDupInternalRepProc) (ClientData clientData);
1697
+typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) (ClientData clientData);
1698
+typedef ClientData (Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr);
1699
+
1700
+typedef struct Tcl_FSVersion_ *Tcl_FSVersion;
1701
+
1702
+/*
1703
+ *----------------------------------------------------------------------------
1704
+ * Data structures related to hooking into the filesystem
1705
+ */
1706
+
1707
+/*
1708
+ * Filesystem version tag. This was introduced in 8.4.
1709
+ */
1710
+
1711
+#define TCL_FILESYSTEM_VERSION_1 ((Tcl_FSVersion) 0x1)
1712
+
1713
+/*
1714
+ * struct Tcl_Filesystem:
1715
+ *
1716
+ * One such structure exists for each type (kind) of filesystem. It collects
1717
+ * together in one place all the functions that are part of the specific
1718
+ * filesystem. Tcl always accesses the filesystem through one of these
1719
+ * structures.
1720
+ *
1721
+ * Not all entries need be non-NULL; any which are NULL are simply ignored.
1722
+ * However, a complete filesystem should provide all of these functions. The
1723
+ * explanations in the structure show the importance of each function.
1724
+ */
1725
+
1726
+typedef struct Tcl_Filesystem {
1727
+ const char *typeName; /* The name of the filesystem. */
1728
+ int structureLength; /* Length of this structure, so future binary
1729
+ * compatibility can be assured. */
1730
+ Tcl_FSVersion version; /* Version of the filesystem type. */
1731
+ Tcl_FSPathInFilesystemProc *pathInFilesystemProc;
1732
+ /* Function to check whether a path is in this
1733
+ * filesystem. This is the most important
1734
+ * filesystem function. */
1735
+ Tcl_FSDupInternalRepProc *dupInternalRepProc;
1736
+ /* Function to duplicate internal fs rep. May
1737
+ * be NULL (but then fs is less efficient). */
1738
+ Tcl_FSFreeInternalRepProc *freeInternalRepProc;
1739
+ /* Function to free internal fs rep. Must be
1740
+ * implemented if internal representations
1741
+ * need freeing, otherwise it can be NULL. */
1742
+ Tcl_FSInternalToNormalizedProc *internalToNormalizedProc;
1743
+ /* Function to convert internal representation
1744
+ * to a normalized path. Only required if the
1745
+ * fs creates pure path objects with no
1746
+ * string/path representation. */
1747
+ Tcl_FSCreateInternalRepProc *createInternalRepProc;
1748
+ /* Function to create a filesystem-specific
1749
+ * internal representation. May be NULL if
1750
+ * paths have no internal representation, or
1751
+ * if the Tcl_FSPathInFilesystemProc for this
1752
+ * filesystem always immediately creates an
1753
+ * internal representation for paths it
1754
+ * accepts. */
1755
+ Tcl_FSNormalizePathProc *normalizePathProc;
1756
+ /* Function to normalize a path. Should be
1757
+ * implemented for all filesystems which can
1758
+ * have multiple string representations for
1759
+ * the same path object. */
1760
+ Tcl_FSFilesystemPathTypeProc *filesystemPathTypeProc;
1761
+ /* Function to determine the type of a path in
1762
+ * this filesystem. May be NULL. */
1763
+ Tcl_FSFilesystemSeparatorProc *filesystemSeparatorProc;
1764
+ /* Function to return the separator
1765
+ * character(s) for this filesystem. Must be
1766
+ * implemented. */
1767
+ Tcl_FSStatProc *statProc; /* Function to process a 'Tcl_FSStat()' call.
1768
+ * Must be implemented for any reasonable
1769
+ * filesystem. */
1770
+ Tcl_FSAccessProc *accessProc;
1771
+ /* Function to process a 'Tcl_FSAccess()'
1772
+ * call. Must be implemented for any
1773
+ * reasonable filesystem. */
1774
+ Tcl_FSOpenFileChannelProc *openFileChannelProc;
1775
+ /* Function to process a
1776
+ * 'Tcl_FSOpenFileChannel()' call. Must be
1777
+ * implemented for any reasonable
1778
+ * filesystem. */
1779
+ Tcl_FSMatchInDirectoryProc *matchInDirectoryProc;
1780
+ /* Function to process a
1781
+ * 'Tcl_FSMatchInDirectory()'. If not
1782
+ * implemented, then glob and recursive copy
1783
+ * functionality will be lacking in the
1784
+ * filesystem. */
1785
+ Tcl_FSUtimeProc *utimeProc; /* Function to process a 'Tcl_FSUtime()' call.
1786
+ * Required to allow setting (not reading) of
1787
+ * times with 'file mtime', 'file atime' and
1788
+ * the open-r/open-w/fcopy implementation of
1789
+ * 'file copy'. */
1790
+ Tcl_FSLinkProc *linkProc; /* Function to process a 'Tcl_FSLink()' call.
1791
+ * Should be implemented only if the
1792
+ * filesystem supports links (reading or
1793
+ * creating). */
1794
+ Tcl_FSListVolumesProc *listVolumesProc;
1795
+ /* Function to list any filesystem volumes
1796
+ * added by this filesystem. Should be
1797
+ * implemented only if the filesystem adds
1798
+ * volumes at the head of the filesystem. */
1799
+ Tcl_FSFileAttrStringsProc *fileAttrStringsProc;
1800
+ /* Function to list all attributes strings
1801
+ * which are valid for this filesystem. If not
1802
+ * implemented the filesystem will not support
1803
+ * the 'file attributes' command. This allows
1804
+ * arbitrary additional information to be
1805
+ * attached to files in the filesystem. */
1806
+ Tcl_FSFileAttrsGetProc *fileAttrsGetProc;
1807
+ /* Function to process a
1808
+ * 'Tcl_FSFileAttrsGet()' call, used by 'file
1809
+ * attributes'. */
1810
+ Tcl_FSFileAttrsSetProc *fileAttrsSetProc;
1811
+ /* Function to process a
1812
+ * 'Tcl_FSFileAttrsSet()' call, used by 'file
1813
+ * attributes'. */
1814
+ Tcl_FSCreateDirectoryProc *createDirectoryProc;
1815
+ /* Function to process a
1816
+ * 'Tcl_FSCreateDirectory()' call. Should be
1817
+ * implemented unless the FS is read-only. */
1818
+ Tcl_FSRemoveDirectoryProc *removeDirectoryProc;
1819
+ /* Function to process a
1820
+ * 'Tcl_FSRemoveDirectory()' call. Should be
1821
+ * implemented unless the FS is read-only. */
1822
+ Tcl_FSDeleteFileProc *deleteFileProc;
1823
+ /* Function to process a 'Tcl_FSDeleteFile()'
1824
+ * call. Should be implemented unless the FS
1825
+ * is read-only. */
1826
+ Tcl_FSCopyFileProc *copyFileProc;
1827
+ /* Function to process a 'Tcl_FSCopyFile()'
1828
+ * call. If not implemented Tcl will fall back
1829
+ * on open-r, open-w and fcopy as a copying
1830
+ * mechanism, for copying actions initiated in
1831
+ * Tcl (not C). */
1832
+ Tcl_FSRenameFileProc *renameFileProc;
1833
+ /* Function to process a 'Tcl_FSRenameFile()'
1834
+ * call. If not implemented, Tcl will fall
1835
+ * back on a copy and delete mechanism, for
1836
+ * rename actions initiated in Tcl (not C). */
1837
+ Tcl_FSCopyDirectoryProc *copyDirectoryProc;
1838
+ /* Function to process a
1839
+ * 'Tcl_FSCopyDirectory()' call. If not
1840
+ * implemented, Tcl will fall back on a
1841
+ * recursive create-dir, file copy mechanism,
1842
+ * for copying actions initiated in Tcl (not
1843
+ * C). */
1844
+ Tcl_FSLstatProc *lstatProc; /* Function to process a 'Tcl_FSLstat()' call.
1845
+ * If not implemented, Tcl will attempt to use
1846
+ * the 'statProc' defined above instead. */
1847
+ Tcl_FSLoadFileProc *loadFileProc;
1848
+ /* Function to process a 'Tcl_FSLoadFile()'
1849
+ * call. If not implemented, Tcl will fall
1850
+ * back on a copy to native-temp followed by a
1851
+ * Tcl_FSLoadFile on that temporary copy. */
1852
+ Tcl_FSGetCwdProc *getCwdProc;
1853
+ /* Function to process a 'Tcl_FSGetCwd()'
1854
+ * call. Most filesystems need not implement
1855
+ * this. It will usually only be called once,
1856
+ * if 'getcwd' is called before 'chdir'. May
1857
+ * be NULL. */
1858
+ Tcl_FSChdirProc *chdirProc; /* Function to process a 'Tcl_FSChdir()' call.
1859
+ * If filesystems do not implement this, it
1860
+ * will be emulated by a series of directory
1861
+ * access checks. Otherwise, virtual
1862
+ * filesystems which do implement it need only
1863
+ * respond with a positive return result if
1864
+ * the dirName is a valid directory in their
1865
+ * filesystem. They need not remember the
1866
+ * result, since that will be automatically
1867
+ * remembered for use by GetCwd. Real
1868
+ * filesystems should carry out the correct
1869
+ * action (i.e. call the correct system
1870
+ * 'chdir' api). If not implemented, then 'cd'
1871
+ * and 'pwd' will fail inside the
1872
+ * filesystem. */
1873
+} Tcl_Filesystem;
1874
+
1875
+/*
1876
+ * The following definitions are used as values for the 'linkAction' flag to
1877
+ * Tcl_FSLink, or the linkProc of any filesystem. Any combination of flags can
1878
+ * be given. For link creation, the linkProc should create a link which
1879
+ * matches any of the types given.
1880
+ *
1881
+ * TCL_CREATE_SYMBOLIC_LINK - Create a symbolic or soft link.
1882
+ * TCL_CREATE_HARD_LINK - Create a hard link.
1883
+ */
1884
+
1885
+#define TCL_CREATE_SYMBOLIC_LINK 0x01
1886
+#define TCL_CREATE_HARD_LINK 0x02
1887
+
1888
+/*
1889
+ *----------------------------------------------------------------------------
1890
+ * The following structure represents the Notifier functions that you can
1891
+ * override with the Tcl_SetNotifier call.
1892
+ */
1893
+
1894
+typedef struct Tcl_NotifierProcs {
1895
+ Tcl_SetTimerProc *setTimerProc;
1896
+ Tcl_WaitForEventProc *waitForEventProc;
1897
+ Tcl_CreateFileHandlerProc *createFileHandlerProc;
1898
+ Tcl_DeleteFileHandlerProc *deleteFileHandlerProc;
1899
+ Tcl_InitNotifierProc *initNotifierProc;
1900
+ Tcl_FinalizeNotifierProc *finalizeNotifierProc;
1901
+ Tcl_AlertNotifierProc *alertNotifierProc;
1902
+ Tcl_ServiceModeHookProc *serviceModeHookProc;
1903
+} Tcl_NotifierProcs;
1904
+
1905
+
1906
+/*
1907
+ *----------------------------------------------------------------------------
1908
+ * The following data structures and declarations are for the new Tcl parser.
1909
+ *
1910
+ * For each word of a command, and for each piece of a word such as a variable
1911
+ * reference, one of the following structures is created to describe the
1912
+ * token.
1913
+ */
1914
+
1915
+typedef struct Tcl_Token {
1916
+ int type; /* Type of token, such as TCL_TOKEN_WORD; see
1917
+ * below for valid types. */
1918
+ const char *start; /* First character in token. */
1919
+ int size; /* Number of bytes in token. */
1920
+ int numComponents; /* If this token is composed of other tokens,
1921
+ * this field tells how many of them there are
1922
+ * (including components of components, etc.).
1923
+ * The component tokens immediately follow
1924
+ * this one. */
1925
+} Tcl_Token;
1926
+
1927
+/*
1928
+ * Type values defined for Tcl_Token structures. These values are defined as
1929
+ * mask bits so that it's easy to check for collections of types.
1930
+ *
1931
+ * TCL_TOKEN_WORD - The token describes one word of a command,
1932
+ * from the first non-blank character of the word
1933
+ * (which may be " or {) up to but not including
1934
+ * the space, semicolon, or bracket that
1935
+ * terminates the word. NumComponents counts the
1936
+ * total number of sub-tokens that make up the
1937
+ * word. This includes, for example, sub-tokens
1938
+ * of TCL_TOKEN_VARIABLE tokens.
1939
+ * TCL_TOKEN_SIMPLE_WORD - This token is just like TCL_TOKEN_WORD except
1940
+ * that the word is guaranteed to consist of a
1941
+ * single TCL_TOKEN_TEXT sub-token.
1942
+ * TCL_TOKEN_TEXT - The token describes a range of literal text
1943
+ * that is part of a word. NumComponents is
1944
+ * always 0.
1945
+ * TCL_TOKEN_BS - The token describes a backslash sequence that
1946
+ * must be collapsed. NumComponents is always 0.
1947
+ * TCL_TOKEN_COMMAND - The token describes a command whose result
1948
+ * must be substituted into the word. The token
1949
+ * includes the enclosing brackets. NumComponents
1950
+ * is always 0.
1951
+ * TCL_TOKEN_VARIABLE - The token describes a variable substitution,
1952
+ * including the dollar sign, variable name, and
1953
+ * array index (if there is one) up through the
1954
+ * right parentheses. NumComponents tells how
1955
+ * many additional tokens follow to represent the
1956
+ * variable name. The first token will be a
1957
+ * TCL_TOKEN_TEXT token that describes the
1958
+ * variable name. If the variable is an array
1959
+ * reference then there will be one or more
1960
+ * additional tokens, of type TCL_TOKEN_TEXT,
1961
+ * TCL_TOKEN_BS, TCL_TOKEN_COMMAND, and
1962
+ * TCL_TOKEN_VARIABLE, that describe the array
1963
+ * index; numComponents counts the total number
1964
+ * of nested tokens that make up the variable
1965
+ * reference, including sub-tokens of
1966
+ * TCL_TOKEN_VARIABLE tokens.
1967
+ * TCL_TOKEN_SUB_EXPR - The token describes one subexpression of an
1968
+ * expression, from the first non-blank character
1969
+ * of the subexpression up to but not including
1970
+ * the space, brace, or bracket that terminates
1971
+ * the subexpression. NumComponents counts the
1972
+ * total number of following subtokens that make
1973
+ * up the subexpression; this includes all
1974
+ * subtokens for any nested TCL_TOKEN_SUB_EXPR
1975
+ * tokens. For example, a numeric value used as a
1976
+ * primitive operand is described by a
1977
+ * TCL_TOKEN_SUB_EXPR token followed by a
1978
+ * TCL_TOKEN_TEXT token. A binary subexpression
1979
+ * is described by a TCL_TOKEN_SUB_EXPR token
1980
+ * followed by the TCL_TOKEN_OPERATOR token for
1981
+ * the operator, then TCL_TOKEN_SUB_EXPR tokens
1982
+ * for the left then the right operands.
1983
+ * TCL_TOKEN_OPERATOR - The token describes one expression operator.
1984
+ * An operator might be the name of a math
1985
+ * function such as "abs". A TCL_TOKEN_OPERATOR
1986
+ * token is always preceeded by one
1987
+ * TCL_TOKEN_SUB_EXPR token for the operator's
1988
+ * subexpression, and is followed by zero or more
1989
+ * TCL_TOKEN_SUB_EXPR tokens for the operator's
1990
+ * operands. NumComponents is always 0.
1991
+ * TCL_TOKEN_EXPAND_WORD - This token is just like TCL_TOKEN_WORD except
1992
+ * that it marks a word that began with the
1993
+ * literal character prefix "{*}". This word is
1994
+ * marked to be expanded - that is, broken into
1995
+ * words after substitution is complete.
1996
+ */
1997
+
1998
+#define TCL_TOKEN_WORD 1
1999
+#define TCL_TOKEN_SIMPLE_WORD 2
2000
+#define TCL_TOKEN_TEXT 4
2001
+#define TCL_TOKEN_BS 8
2002
+#define TCL_TOKEN_COMMAND 16
2003
+#define TCL_TOKEN_VARIABLE 32
2004
+#define TCL_TOKEN_SUB_EXPR 64
2005
+#define TCL_TOKEN_OPERATOR 128
2006
+#define TCL_TOKEN_EXPAND_WORD 256
2007
+
2008
+/*
2009
+ * Parsing error types. On any parsing error, one of these values will be
2010
+ * stored in the error field of the Tcl_Parse structure defined below.
2011
+ */
2012
+
2013
+#define TCL_PARSE_SUCCESS 0
2014
+#define TCL_PARSE_QUOTE_EXTRA 1
2015
+#define TCL_PARSE_BRACE_EXTRA 2
2016
+#define TCL_PARSE_MISSING_BRACE 3
2017
+#define TCL_PARSE_MISSING_BRACKET 4
2018
+#define TCL_PARSE_MISSING_PAREN 5
2019
+#define TCL_PARSE_MISSING_QUOTE 6
2020
+#define TCL_PARSE_MISSING_VAR_BRACE 7
2021
+#define TCL_PARSE_SYNTAX 8
2022
+#define TCL_PARSE_BAD_NUMBER 9
2023
+
2024
+/*
2025
+ * A structure of the following type is filled in by Tcl_ParseCommand. It
2026
+ * describes a single command parsed from an input string.
2027
+ */
2028
+
2029
+#define NUM_STATIC_TOKENS 20
2030
+
2031
+typedef struct Tcl_Parse {
2032
+ const char *commentStart; /* Pointer to # that begins the first of one
2033
+ * or more comments preceding the command. */
2034
+ int commentSize; /* Number of bytes in comments (up through
2035
+ * newline character that terminates the last
2036
+ * comment). If there were no comments, this
2037
+ * field is 0. */
2038
+ const char *commandStart; /* First character in first word of
2039
+ * command. */
2040
+ int commandSize; /* Number of bytes in command, including first
2041
+ * character of first word, up through the
2042
+ * terminating newline, close bracket, or
2043
+ * semicolon. */
2044
+ int numWords; /* Total number of words in command. May be
2045
+ * 0. */
2046
+ Tcl_Token *tokenPtr; /* Pointer to first token representing the
2047
+ * words of the command. Initially points to
2048
+ * staticTokens, but may change to point to
2049
+ * malloc-ed space if command exceeds space in
2050
+ * staticTokens. */
2051
+ int numTokens; /* Total number of tokens in command. */
2052
+ int tokensAvailable; /* Total number of tokens available at
2053
+ * *tokenPtr. */
2054
+ int errorType; /* One of the parsing error types defined
2055
+ * above. */
2056
+
2057
+ /*
2058
+ * The fields below are intended only for the private use of the parser.
2059
+ * They should not be used by functions that invoke Tcl_ParseCommand.
2060
+ */
2061
+
2062
+ const char *string; /* The original command string passed to
2063
+ * Tcl_ParseCommand. */
2064
+ const char *end; /* Points to the character just after the last
2065
+ * one in the command string. */
2066
+ Tcl_Interp *interp; /* Interpreter to use for error reporting, or
2067
+ * NULL. */
2068
+ const char *term; /* Points to character in string that
2069
+ * terminated most recent token. Filled in by
2070
+ * ParseTokens. If an error occurs, points to
2071
+ * beginning of region where the error
2072
+ * occurred (e.g. the open brace if the close
2073
+ * brace is missing). */
2074
+ int incomplete; /* This field is set to 1 by Tcl_ParseCommand
2075
+ * if the command appears to be incomplete.
2076
+ * This information is used by
2077
+ * Tcl_CommandComplete. */
2078
+ Tcl_Token staticTokens[NUM_STATIC_TOKENS];
2079
+ /* Initial space for tokens for command. This
2080
+ * space should be large enough to accommodate
2081
+ * most commands; dynamic space is allocated
2082
+ * for very large commands that don't fit
2083
+ * here. */
2084
+} Tcl_Parse;
2085
+
2086
+
2087
+/*
2088
+ *----------------------------------------------------------------------------
2089
+ * The following structure represents a user-defined encoding. It collects
2090
+ * together all the functions that are used by the specific encoding.
2091
+ */
2092
+
2093
+typedef struct Tcl_EncodingType {
2094
+ const char *encodingName; /* The name of the encoding, e.g. "euc-jp".
2095
+ * This name is the unique key for this
2096
+ * encoding type. */
2097
+ Tcl_EncodingConvertProc *toUtfProc;
2098
+ /* Function to convert from external encoding
2099
+ * into UTF-8. */
2100
+ Tcl_EncodingConvertProc *fromUtfProc;
2101
+ /* Function to convert from UTF-8 into
2102
+ * external encoding. */
2103
+ Tcl_EncodingFreeProc *freeProc;
2104
+ /* If non-NULL, function to call when this
2105
+ * encoding is deleted. */
2106
+ ClientData clientData; /* Arbitrary value associated with encoding
2107
+ * type. Passed to conversion functions. */
2108
+ int nullSize; /* Number of zero bytes that signify
2109
+ * end-of-string in this encoding. This number
2110
+ * is used to determine the source string
2111
+ * length when the srcLen argument is
2112
+ * negative. Must be 1 or 2. */
2113
+} Tcl_EncodingType;
2114
+
2115
+/*
2116
+ * The following definitions are used as values for the conversion control
2117
+ * flags argument when converting text from one character set to another:
2118
+ *
2119
+ * TCL_ENCODING_START - Signifies that the source buffer is the first
2120
+ * block in a (potentially multi-block) input
2121
+ * stream. Tells the conversion function to reset
2122
+ * to an initial state and perform any
2123
+ * initialization that needs to occur before the
2124
+ * first byte is converted. If the source buffer
2125
+ * contains the entire input stream to be
2126
+ * converted, this flag should be set.
2127
+ * TCL_ENCODING_END - Signifies that the source buffer is the last
2128
+ * block in a (potentially multi-block) input
2129
+ * stream. Tells the conversion routine to
2130
+ * perform any finalization that needs to occur
2131
+ * after the last byte is converted and then to
2132
+ * reset to an initial state. If the source
2133
+ * buffer contains the entire input stream to be
2134
+ * converted, this flag should be set.
2135
+ * TCL_ENCODING_STOPONERROR - If set, then the converter will return
2136
+ * immediately upon encountering an invalid byte
2137
+ * sequence or a source character that has no
2138
+ * mapping in the target encoding. If clear, then
2139
+ * the converter will skip the problem,
2140
+ * substituting one or more "close" characters in
2141
+ * the destination buffer and then continue to
2142
+ * convert the source.
2143
+ */
2144
+
2145
+#define TCL_ENCODING_START 0x01
2146
+#define TCL_ENCODING_END 0x02
2147
+#define TCL_ENCODING_STOPONERROR 0x04
2148
+
2149
+/*
2150
+ * The following definitions are the error codes returned by the conversion
2151
+ * routines:
2152
+ *
2153
+ * TCL_OK - All characters were converted.
2154
+ * TCL_CONVERT_NOSPACE - The output buffer would not have been large
2155
+ * enough for all of the converted data; as many
2156
+ * characters as could fit were converted though.
2157
+ * TCL_CONVERT_MULTIBYTE - The last few bytes in the source string were
2158
+ * the beginning of a multibyte sequence, but
2159
+ * more bytes were needed to complete this
2160
+ * sequence. A subsequent call to the conversion
2161
+ * routine should pass the beginning of this
2162
+ * unconverted sequence plus additional bytes
2163
+ * from the source stream to properly convert the
2164
+ * formerly split-up multibyte sequence.
2165
+ * TCL_CONVERT_SYNTAX - The source stream contained an invalid
2166
+ * character sequence. This may occur if the
2167
+ * input stream has been damaged or if the input
2168
+ * encoding method was misidentified. This error
2169
+ * is reported only if TCL_ENCODING_STOPONERROR
2170
+ * was specified.
2171
+ * TCL_CONVERT_UNKNOWN - The source string contained a character that
2172
+ * could not be represented in the target
2173
+ * encoding. This error is reported only if
2174
+ * TCL_ENCODING_STOPONERROR was specified.
2175
+ */
2176
+
2177
+#define TCL_CONVERT_MULTIBYTE (-1)
2178
+#define TCL_CONVERT_SYNTAX (-2)
2179
+#define TCL_CONVERT_UNKNOWN (-3)
2180
+#define TCL_CONVERT_NOSPACE (-4)
2181
+
2182
+/*
2183
+ * The maximum number of bytes that are necessary to represent a single
2184
+ * Unicode character in UTF-8. The valid values should be 3, 4 or 6
2185
+ * (or perhaps 1 if we want to support a non-unicode enabled core). If 3 or
2186
+ * 4, then Tcl_UniChar must be 2-bytes in size (UCS-2) (the default). If 6,
2187
+ * then Tcl_UniChar must be 4-bytes in size (UCS-4). At this time UCS-2 mode
2188
+ * is the default and recommended mode. UCS-4 is experimental and not
2189
+ * recommended. It works for the core, but most extensions expect UCS-2.
2190
+ */
2191
+
2192
+#ifndef TCL_UTF_MAX
2193
+#define TCL_UTF_MAX 3
2194
+#endif
2195
+
2196
+/*
2197
+ * This represents a Unicode character. Any changes to this should also be
2198
+ * reflected in regcustom.h.
2199
+ */
2200
+
2201
+#if TCL_UTF_MAX > 4
2202
+ /*
2203
+ * unsigned int isn't 100% accurate as it should be a strict 4-byte value
2204
+ * (perhaps wchar_t). 64-bit systems may have troubles. The size of this
2205
+ * value must be reflected correctly in regcustom.h and
2206
+ * in tclEncoding.c.
2207
+ * XXX: Tcl is currently UCS-2 and planning UTF-16 for the Unicode
2208
+ * XXX: string rep that Tcl_UniChar represents. Changing the size
2209
+ * XXX: of Tcl_UniChar is /not/ supported.
2210
+ */
2211
+typedef unsigned int Tcl_UniChar;
2212
+#else
2213
+typedef unsigned short Tcl_UniChar;
2214
+#endif
2215
+
2216
+
2217
+/*
2218
+ *----------------------------------------------------------------------------
2219
+ * TIP #59: The following structure is used in calls 'Tcl_RegisterConfig' to
2220
+ * provide the system with the embedded configuration data.
2221
+ */
2222
+
2223
+typedef struct Tcl_Config {
2224
+ const char *key; /* Configuration key to register. ASCII
2225
+ * encoded, thus UTF-8. */
2226
+ const char *value; /* The value associated with the key. System
2227
+ * encoding. */
2228
+} Tcl_Config;
2229
+
2230
+/*
2231
+ *----------------------------------------------------------------------------
2232
+ * Flags for TIP#143 limits, detailing which limits are active in an
2233
+ * interpreter. Used for Tcl_{Add,Remove}LimitHandler type argument.
2234
+ */
2235
+
2236
+#define TCL_LIMIT_COMMANDS 0x01
2237
+#define TCL_LIMIT_TIME 0x02
2238
+
2239
+/*
2240
+ * Structure containing information about a limit handler to be called when a
2241
+ * command- or time-limit is exceeded by an interpreter.
2242
+ */
2243
+
2244
+typedef void (Tcl_LimitHandlerProc) (ClientData clientData, Tcl_Interp *interp);
2245
+typedef void (Tcl_LimitHandlerDeleteProc) (ClientData clientData);
2246
+
2247
+/*
2248
+ *----------------------------------------------------------------------------
2249
+ * Override definitions for libtommath.
2250
+ */
2251
+
2252
+typedef struct mp_int mp_int;
2253
+#define MP_INT_DECLARED
2254
+typedef unsigned int mp_digit;
2255
+#define MP_DIGIT_DECLARED
2256
+
2257
+/*
2258
+ *----------------------------------------------------------------------------
2259
+ * Definitions needed for Tcl_ParseArgvObj routines.
2260
+ * Based on tkArgv.c.
2261
+ * Modifications from the original are copyright (c) Sam Bromley 2006
2262
+ */
2263
+
2264
+typedef struct {
2265
+ int type; /* Indicates the option type; see below. */
2266
+ const char *keyStr; /* The key string that flags the option in the
2267
+ * argv array. */
2268
+ void *srcPtr; /* Value to be used in setting dst; usage
2269
+ * depends on type.*/
2270
+ void *dstPtr; /* Address of value to be modified; usage
2271
+ * depends on type.*/
2272
+ const char *helpStr; /* Documentation message describing this
2273
+ * option. */
2274
+ ClientData clientData; /* Word to pass to function callbacks. */
2275
+} Tcl_ArgvInfo;
2276
+
2277
+/*
2278
+ * Legal values for the type field of a Tcl_ArgInfo: see the user
2279
+ * documentation for details.
2280
+ */
2281
+
2282
+#define TCL_ARGV_CONSTANT 15
2283
+#define TCL_ARGV_INT 16
2284
+#define TCL_ARGV_STRING 17
2285
+#define TCL_ARGV_REST 18
2286
+#define TCL_ARGV_FLOAT 19
2287
+#define TCL_ARGV_FUNC 20
2288
+#define TCL_ARGV_GENFUNC 21
2289
+#define TCL_ARGV_HELP 22
2290
+#define TCL_ARGV_END 23
2291
+
2292
+/*
2293
+ * Types of callback functions for the TCL_ARGV_FUNC and TCL_ARGV_GENFUNC
2294
+ * argument types:
2295
+ */
2296
+
2297
+typedef int (Tcl_ArgvFuncProc)(ClientData clientData, Tcl_Obj *objPtr,
2298
+ void *dstPtr);
2299
+typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp,
2300
+ int objc, Tcl_Obj *const *objv, void *dstPtr);
2301
+
2302
+/*
2303
+ * Shorthand for commonly used argTable entries.
2304
+ */
2305
+
2306
+#define TCL_ARGV_AUTO_HELP \
2307
+ {TCL_ARGV_HELP, "-help", NULL, NULL, \
2308
+ "Print summary of command-line options and abort", NULL}
2309
+#define TCL_ARGV_AUTO_REST \
2310
+ {TCL_ARGV_REST, "--", NULL, NULL, \
2311
+ "Marks the end of the options", NULL}
2312
+#define TCL_ARGV_TABLE_END \
2313
+ {TCL_ARGV_END, NULL, NULL, NULL, NULL, NULL}
2314
+
2315
+/*
2316
+ *----------------------------------------------------------------------------
2317
+ * Definitions needed for Tcl_Zlib routines. [TIP #234]
2318
+ *
2319
+ * Constants for the format flags describing what sort of data format is
2320
+ * desired/expected for the Tcl_ZlibDeflate, Tcl_ZlibInflate and
2321
+ * Tcl_ZlibStreamInit functions.
2322
+ */
2323
+
2324
+#define TCL_ZLIB_FORMAT_RAW 1
2325
+#define TCL_ZLIB_FORMAT_ZLIB 2
2326
+#define TCL_ZLIB_FORMAT_GZIP 4
2327
+#define TCL_ZLIB_FORMAT_AUTO 8
2328
+
2329
+/*
2330
+ * Constants that describe whether the stream is to operate in compressing or
2331
+ * decompressing mode.
2332
+ */
2333
+
2334
+#define TCL_ZLIB_STREAM_DEFLATE 16
2335
+#define TCL_ZLIB_STREAM_INFLATE 32
2336
+
2337
+/*
2338
+ * Constants giving compression levels. Use of TCL_ZLIB_COMPRESS_DEFAULT is
2339
+ * recommended.
2340
+ */
2341
+
2342
+#define TCL_ZLIB_COMPRESS_NONE 0
2343
+#define TCL_ZLIB_COMPRESS_FAST 1
2344
+#define TCL_ZLIB_COMPRESS_BEST 9
2345
+#define TCL_ZLIB_COMPRESS_DEFAULT (-1)
2346
+
2347
+/*
2348
+ * Constants for types of flushing, used with Tcl_ZlibFlush.
2349
+ */
2350
+
2351
+#define TCL_ZLIB_NO_FLUSH 0
2352
+#define TCL_ZLIB_FLUSH 2
2353
+#define TCL_ZLIB_FULLFLUSH 3
2354
+#define ----------------------------------------------------------------------------
2355
+ * The following declarations either map ckalloc and ckfree to malloc and
2356
+ * free, or they map them to functions with all sorts of debugging hooks
2357
+ * defined in tclCkalloc.c.
2358
+ */
2359
+
2360
+#ifdef TCL_MEM_DEBUG
2361
+
2362
+# voidine ckalloc(x) \
2363
+ ((VOID *) Tcl_DbCkalloc((unsigned)(x), __FILE__, __LINE__))
2364
+# define ckfree(x) \
2365
+ Tcl_DbCkfree((char *)(x), __FILE__, __LINE__)
2366
+# defvoid *) Tcl_DbCkrealloc((char *)(x), (unsigned)(y), __FILE__, __LINE__))
2367
+# definevoid *) Tcl_AttemptDbCkalloc((unsigned)(x), __FILE__, __LINE__))
2368
+# define attvoidckrealloc(x,y) \
2369
+ ((VOID *) Tcl_AttemptDbCkrealloc((char *)(x), (unsigned)(y), __FILE__, __LINE__))
2370
+
2371
+#else /* !TCL_MEM_DEBUG */
2372
+
2373
+/*
2374
+ * If we are not using the debugging allocator, we should call the Tcl_Alloc,
2375
+ * et al. routines in order to guarantee that every module is using the same
2376
+ * memory allocator both inside and outside ovoid)()))
2377
+EXTERN void Tcl_MainEx(int argc, char **argv,
2378
+ Tcl_AppInitProc *appInitPrvoid const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp,
2379
+ const char *versionvoidvel) 2 LOC
2380
+ * macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC
2381
+ * macos/*
2382
+ se to access fields of hash entries:
2383
+ */
2384
+
2385
+#define Tcl_GetHashValue(h) ((h)->clientData)
2386
+#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
2387
+#define Tcl_GetHashKey(tablePtr, h) \
2388
+ ((void *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS || \
2389
+ (tablePtr)->keyType == TCL_CUSTOM_PTR_KEYS) \
2390
+ ? (h)->key.oneWordValue \
2391
+ : (h)->key.string))
2392
+
2393
+/*
2394
+ * Macros to use for clients to use to invoke find and create functions for
2395
+ * hash tables:
2396
+ */
2397
+
2398
+#undef Tcl_FindHashEntry
2399
+#define Tcl_FindHashEntry(tablePtr, key) \
2400
+ (*((tablePtr)->findProc))(tablePtr, (const char *)(key))
2401
+#undef Tcl_CreateHashEntry
2402
+#define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
2403
+ (*((tablePtr)->createProc))(tablePtr, (const char *)(key), newPtr)
2404
+
2405
+/*
2406
+ *----------------------------------------------------------------------------
2407
+ * Macros that eliminate the overhead of the thread synchronization functions
2408
+ * when c
--- a/compat/tcl-8.6/generic/tcl.h
+++ b/compat/tcl-8.6/generic/tcl.h
@@ -0,0 +1,2408 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/compat/tcl-8.6/generic/tcl.h
+++ b/compat/tcl-8.6/generic/tcl.h
@@ -0,0 +1,2408 @@
1 /*
2 * tcl.h --
3 *
4 * This header file describes the externally-visible facilities of the
5 * Tcl interpreter.
6 *
7 * Copyright (c) 1987-1994 The Regents of the University of California.
8 * Copyright (c) 1993-1996 Lucent Technologies.
9 * Copyright (c) 1994-1998 Sun Microsystems, Inc.
10 * Copyright (c) 1998-2000 by Scriptics Corporation.
11 * Copyright (c) 2002 by Kevin B. Kenny. All rights reserved.
12 *
13 * See the file "license.terms" for information on usage and redistribution of
14 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
15 */
16
17 #ifndef _TCL
18 #define _TCL
19
20 /*
21 * For C++ compilers, use extern "C"
22 */
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /*
29 * The following defines are used to indicate the various release levels.
30 */
31
32 #define TCL_ALPHA_RELEASE 0
33 #define TCL_BETA_RELEASE 1
34 #define TCL_FINAL_RELEASE 2
35
36 /*
37 * When version numbers change here, must also go into the following files and
38 * update the version numbers:
39 *
40 * library/init.tcl (1 LOC patch)
41 * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
42 * win/configure.in (as above)
43 * win/tcl.m4 (not patchlevel)
44 * win/makefile.bc (not patchlevel) 2 LOC
45 * README (sections 0 and 2, with and without separator)
46 * macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 1 LOC
47 * macosx/Tcl.pbproj/default.pbxuser (not patchlevel) 1 LOC
48 * macosx/Tcl.xcode/project.pbxproj (not patchlevel) 2 LOC
49 * macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC
50 * macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC
51 * win/README (not patchlevel) (sections 0 and 2)
52 * unix/tcl.spec (1 LOC patch)
53 * tools/tcl.hpj.in (not patchlevel, for windows installer)
54 */
55
56 #define TCL_MAJOR_VERSION 8
57 #define TCL_MINOR_VERSION 6
58 #define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
59 #define TCL_RELEASE_SERIAL 1eader file describes the external/*
60 * tcl.h --
61 *
62 * ThisBAL_ONLY 1
63 #define TCL_NAMESPACE_ONLY 2
64 #define TCL_APPEND_VALUE 4
65 #define TCL_LIST_der file describes the externally-visible facilities of the
66 * Tcl interpreter.
67 *
68 * Copyright (c) 1987-1994 The Regents of the University of California.
69 * Copyright (c) 1993-1996 Lucent Technologies.
70 * Copyright (c) 1994-1998 Sun Microsystems, Inc.
71 * Copyright (c) 1998-2000 by Scriptics Corporation.
72 * Copyright (c) 2002 by Kevin B. Kenny. All rights reserved.
73 *
74 * See the file "license.terms" for information on usage and redistribution of
75 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
76 */
77
78 #ifndef _TCL
79 #define _TCL
80
81 /*
82 * For C++ compilers, use extern "C"
83 */
84
85 #ifdef __cplusplus
86 extern "C" {
87 #endif
88
89 /*
90 * The following defines are used to indicate the various release levels.
91 */
92
93 #define TCL_ALPHA_RELEASE 0
94 #define TCL_BETA_RELEASE 1
95 #define TCL_FINAL_RELEASE 2
96
97 /*
98 * When version numbers change here, must also go into the following files and
99 * update the version numbers:
100 *
101 * library/init.tcl (1 LOC patch)
102 * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
103 * win/configure.in (as above)
104 * win/tcl.m4 (not patchlevel)
105 * win/makefile.bc (not patchlevel) 2 LOC
106 * README (sections 0 and 2, with and without separator)
107 * macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 1 LOC
108 * macosx/Tcl.pbproj/default.pbxuser (not patchlevel) 1 LOC
109 * macosx/Tcl.xcode/project.pbxproj (not patchlevel) 2 LOC
110 * macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC
111 * macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC
112 * win/README (not patchlevel) (sections 0 and 2)
113 * unix/tcl.spec (1 LOC patch)
114 * tools/tcl.hpj.in (not patchlevel, for windows installer)
115 */
116
117 #define TCL_MAJOR_VERSION 8
118 #define TCL_MINOR_VERSION 6
119 #define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
120 #define TCL_RELEASE_SERIAL 0
121
122 #define TCL_VERSION "8.6"
123 #define TCL_PATCH_LEVEL "8.6.0"
124
125
126 /*
127 *----------------------------------------------------------------------------
128 * The following definitions set up the proper options for Windows compilers.
129 * We use this method because there is no autoconf equivalent.
130 */
131
132 #ifndef __WIN32__
133 # if defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) || defined(__BORLANDC__) || (defined(__WATCOMC__) && defined(__WINDOWS_386__))
134 # define __WIN32__
135 # ifndef WIN32
136 # define WIN32
137 # endif
138 # ifndef _WIN32
139 # define _WIN32
140 # endif
141 # endif
142 #endif
143
144 /*
145 * STRICT: See MSDN Article Q83456
146 */
147
148 #ifdef __WIN32__
149 # ifndef STRICT
150 # define STRICT
151 # endif
152 #endif /* __WIN32__ */
153
154 /*
155 * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
156 * quotation marks), JOIN joins two arguments.
157 */
158
159 #ifndef STRINGIFY
160 # define STRINGIFY(x) STRINGIFY1(x)
161 # define STRINGIFY1(x) #x
162 #endif
163 #ifndef JOIN
164 # define JOIN(a,b) JOIN1(a,b)
165 # define JOIN1(a,b) a##b
166 #endif
167
168 /*
169 * A special definition used to allow this header file to be included from
170 * windows resource files so that they can obtain version information.
171 * RC_INVOKED is defined by default by the windows RC tool.
172 *
173 * Resource compilers don't like all the C stuff, like typedefs and function
174 * declarations, that occur below, so block them out.
175 */
176
177 #ifndef RC_INVOKED
178
179 /*
180 * Special macro to define mutexes, that doesn't do anything if we are not
181 * using threads.
182 */
183
184 #ifdef TCL_THREADS
185 #define TCL_DECLARE_MUTEX(name) static Tcl_Mutex name;
186 #else
187 #define TCL_DECLARE_MUTEX(name)
188 #endif
189
190 /*
191 * Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and
192 * SEEK_END, all #define'd by stdio.h .
193 *
194 * Also, many extensions need stdio.h, and they've grown accustomed to tcl.h
195 * providing it for them rather than #include-ing it themselves as they
196 * should, so also for their sake, we keep the #include to be consistent with
197 * prior Tcl releases.
198 */
199
200 #include <stdio.h>
201
202 /*
203 *----------------------------------------------------------------------------
204 * Support for functions with a variable number of arguments.
205 *
206 * The following TCL_VARARGS* macros are to support old extensions
207 * written for older versions of Tcl where the macros permitted
208 * support for the varargs.h system as well as stdarg.h .
209 *
210 * New code should just directly be written to use stdarg.h conventions.
211 */
212
213 #include <stdarg.h>
214 #ifndef TCL_NO_DEPRECATED
215 # define TCL_VARARGS(type, name) (type name, ...)
216 # define TCL_VARARGS_DEF(type, name) (type name, ...)
217 # define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
218 #endif
219 #if defined(__GNUC__) && (__GNUC__ > 2)
220 # define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b)))
221 #else
222 # define TCL_FORMAT_PRINTF(a,b)
223 #endif
224
225 /*
226 * Allow a part of Tcl's API to be explicitly marked as deprecated.
227 *
228 * Used to make TIP 330/336 generate moans even if people use the
229 * compatibility macros. Change your code, guys! We won't support you forever.
230 */
231
232 #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
233 # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC__MINOR__ >= 5))
234 # define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__ (msg)))
235 # else
236 # define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__))
237 # endif
238 #else
239 # define TCL_DEPRECATED_API(msg) /* nothing portable */
240 #endif
241
242 /*
243 *----------------------------------------------------------------------------
244 * Macros used to declare a function to be exported by a DLL. Used by Windows,
245 * maps to no-op declarations on non-Windows systems. The default build on
246 * windows is for a DLL, which causes the DLLIMPORT and DLLEXPORT macros to be
247 * nonempty. To build a static library, the macro STATIC_BUILD should be
248 * defined.
249 *
250 * Note: when building static but linking dynamically to MSVCRT we must still
251 * correctly decorate the C library imported function. Use CRTIMPORT
252 * for this purpose. _DLL is defined by the compiler when linking to
253 * MSVCRT.
254 */
255
256 #if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || defined(__/*
257 * tcl.h
258 # ifndef NO_VOID
259 # define VOID void
260 # ((__deprecated__VOID char/*
261 * tcl.h --
262 *
263 * Thiss header file describes the externally-visible facilities of the
264 * Tcl interpreter.
265 *
266 * Copyright (c) 1987-1994 The Regents of the University of California.
267 * Copyright (c) 1993-1996 Lucent Technologies.
268 * Copyright (c) 1994-1998 Sun Microsystems, Inc.
269 * Copyright (c) 1998-2000 by Scriptics Corporation.
270 * Copyright (c) 2002 by Kevin B. Kenny. All rights reserved.
271 *
272 * See the file "license.terms" for information on usage and redistribution of
273 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
274 */
275
276 #ifndef _TCL
277 #define _TCL
278
279 /*
280 * For C++ compilers, use extern "C"
281 */
282
283 #ifdef __cplusplus
284 extern "C" {
285 #endif
286
287 /*
288 * The following defines are used to indicate the various release levels.
289 */
290
291 #define TCL_ALPHA_RELEASE 0
292 #define TCL_BETA_RELEASE 1
293 #define TCL_FINAL_RELEASE 2
294
295 /*
296 * When version numbers change here, must also go into the following files and
297 * update the version numbers:
298 *
299 * library/init.tcl (1 LOC patch)
300 * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
301 * win/configure.in (as above)
302 * win/tcl.m4 (not patchlevel)
303 * win/makefile.bc (not patchlevel) 2 LOC
304 * README (sections 0 and 2, with and without separator)
305 * macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 1 LOC
306 * macosx/Tcl.pbproj/default.pbxuser (not patchlevel) 1 LOC
307 * macosx/Tcl.xcode/project.pbxproj (not patchlevel) 2 LOC
308 * macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC
309 * macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC
310 * win/README (not patchlevel) (sections 0 and 2)
311 * unix/tcl.spec (1 LOC patch)
312 * tools/tcl.hpj.in (not patchlevel, for windows installer)
313 */
314
315 #define TCL_MAJOR_VERSION 8
316 #define TCL_MINOR_VERSION 6
317 #define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
318 #define TCL_RELEASE_SERIAL 0
319
320 #define TCL_VERSION "8.6"
321 #define TCL_PATCH_LEVEL "8.6.0"
322
323
324 /*
325 *----------------------------------------------------------------------------
326 * The following definitions set up the proper options for Windows compilers.
327 * We use this method because there is no autoconf equivalent.
328 */
329
330 #ifndef __WIN32__
331 # if defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) || defined(__BORLANDC__) || (defined(__WATCOMC__) && defined(__WINDOWS_386__))
332 # define __WIN32__
333 # ifndef WIN32
334 # define WIN32
335 # endif
336 # ifndef _WIN32
337 # define _WIN32
338 # endif
339 # endif
340 #endif
341
342 /*
343 * STRICT: See MSDN Article Q83456
344 */
345
346 #ifdef __WIN32__
347 # ifndef STRICT
348 # define STRICT
349 # endif
350 #endif /* __WIN32__ */
351
352 /*
353 * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
354 * quotation marks), JOIN joins two arguments.
355 */
356
357 #ifndef STRINGIFY
358 # define STRINGIFY(x) STRINGIFY1(x)
359 # define STRINGIFY1(x) #x
360 #endif
361 #ifndef JOIN
362 # define JOIN(a,b) JOIN1(a,b)
363 # define JOIN1(a,b) a##b
364 #endif
365
366 /*
367 * A special definition used to allow this header file to be included from
368 * windows resource files so that they can obtain version information.
369 * RC_INVOKED is defined by default by the windows RC tool.
370 *
371 * Resource compilers don't like all the C stuff, like typedefs and function
372 * declarations, that occur below, so block them out.
373 */
374
375 #ifndef RC_INVOKED
376
377 /*
378 * Special macro to define mutexes, that doesn't do anything if we are not
379 * using threads.
380 */
381
382 #ifdef TCL_THREADS
383 #define TCL_DECLARE_MUTEX(name) static Tcl_Mutex name;
384 #else
385 #define TCL_DECLARE_MUTEX(name)
386 #endif
387
388 /*
389 * Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and
390 * SEEK_END, all #define'd by stdio.h .
391 *
392 * Also, many extensions need stdio.h, and they've grown accustomed to tcl.h
393 * providing it for them rather than #include-ing it themselves as they
394 * should, so also for their sake, we keep the #include to be consistent with
395 * prior Tcl releases.
396 */
397
398 #include <stdio.h>
399
400 /*
401 *----------------------------------------------------------------------------
402 * Support for functions with a variable number of arguments.
403 *
404 * The following TCL_VARARGS* macros are to support old extensions
405 * written for older versions of Tcl where the macros permitted
406 * support for the varargs.h system as well as stdarg.h .
407 *
408 * New code should just directly be written to use stdarg.h conventions.
409 */
410
411 #include <stdarg.h>
412 #ifndef TCL_NO_DEPRECATED
413 # define TCL_VARARGS(type, name) (type name, ...)
414 # define TCL_VARARGS_DEF(type, name) (type name, ...)
415 # defi && !defined(__APPLE__ defined(HAVE_STRUCT_STAT64)
416 typedef struct stat64 Tcl_StatBuf;
417 #else
418 typedef struct stat Tcl_StatBuf;
419 #endif
420
421
422 /*
423 *----------------------------------------------------------------------------
424 * Data structures defined opaquely in this module. The definitions below just
425 * provide dummy types. A few fields are made visible in Tcl_Interp
426 * structures, namely those used for returning a string result from commands.
427 * Direct access to the result field is discouraged in Tcl 8.0. The
428 * interpreter result is either an object or a string, and the two values are
429 * kept consistent unless some C code sets interp->result directly.
430 * Programmers should use either the function Tcl_GetObjResult() or
431 * Tcl_GetStringResult() to read the interpreter's result. See the SetResult
432 * man page for details.
433 *
434 * Note: any change to the Tcl_Interp definition below must be mirrored in the
435 * "real" definition in tclInt.h.
436 *
437 * Note: Tcl_ObjCmdProc functions do not directly set result and freeProc.
438 * Instead, they set a Tcl_Obj member in the "real" structure that can be
439 * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
440 */
441
442 typedef struct Tcl_Interp
443 #ifndef TCL_NO_DEPRECATED
444 {
445 /* TIP #330: Strongly discourage extensions from using the string
446 * result. */
447 #ifdef USE_INTERP_RStringe is a 4-byte gap */
448 long long;
449 unsigned short st_ino;
450 unsigned short st_mode;
451 short st_nlink;
452 short st_uid;
453 short st_gid;
454 /* Here is a 2-byte gap */
455 dev_t st_rdev;
456 /* HerStringe is a 4-byte gap */
457 long long st_size;
458 struct {long tv_sec;} st_atim;
459 struct {long tv_sec;} st_mtim;
460 struct {long tv_sec;} st_ctim;
461 /* Here is a 4-byte gap */
462 } Tcl_StatBuf;
463 #elif defined(HAVE_STRUCT_STAT64)
464 typedef struct stat64 Tcl_StatBuf;
465 #else
466 typedef struct stat Tcl_StatBuf;
467 #endif
468
469
470 /*
471 *----------------------------------------------------------------------------
472 * Data structures defined opaquely in this module. The definitions below just
473 * provide dummy types. A few fields are made visible in Tcl_Interp
474 * structures, namely those used for returning a string result from commands.
475 * Direct access to the result field is discouraged in Tcl 8.0. The
476 * interpreter result is either an object or a string, and the two values are
477 * kept consistent unless some C code sets interp->result directly.
478 * Programmers should use either the function Tcl_GetObjResult() or
479 * Tcl_GetStringResult() to read the interpreter's result. See the SetResult
480 * man page for details.
481 *
482 * Note: any change to the Tcl_Interp definition below must be mirrored in the
483 * "real" definition in tclInt.h.
484 *
485 * Note: Tcl_ObjCmdProc functions do not directly set result and freeProc.
486 * Instead, they set a Tcl_Obj member in the "real" structure that can be
487 * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
488 */
489
490 typedef struct Tcl_Interp
491 #ifndef TCL_NO_DEPRECATED
492 {
493 /* TIP #330: Strongly discourage extensions from using the string
494 * result. */
495 #ifdef USE_INTERP_RESULT
496 char *result TCL_DEPRECATED_API("use Tcl_GetResult/Tcl_SetResult");
497 /* If the last command returned a string
498 * result, this points to it. */
499 void (*freeProc) (char *blockPtr)
500 TCL_DEPRECATED_API("use Tcl_GetResult/Tcl_SetResult");
501 /* Zero means the string result is statically
502 * allocated. TCL_DYNAMIC means it was
503 * allocated with ckalloc and should be freed
504 * with ckfree. Other values give the address
505 * of function to invoke to free the result.
506 * Tcl_Eval must free it before executing next
507 * command. */
508 #else
509 char *resultDontUse; /* Don't use in extensions! */
510 void (*freeProcDontUse) (char *); /* Don't use in extensions! */
511 #endif
512 #ifdef USE_INTERP_ERRORLINE
513 int errorLine TCL_DEPRECATED_API("use Tcl_GetErrorLine/Tcl_SetErrorLine");
514 /* When TCL_ERROR is returned, this gives the
515 * line number within the command where the
516 * error occurred (1 if first line). */
517 #else
518 int errorLineDontUse; /* Don't use in extensions! */
519 #endif
520 }
521 #endif /* TCL_NO_DEPRECATED */
522 Tcl_Interp;
523
524 typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
525 typedef struct Tcl_Channel_ *Tcl_Channel;
526 typedef struct Tcl_ChannelTypeVersion_ *Tcl_ChannelTypeVersion;
527 typedef struct Tcl_Command_ *Tcl_Command;
528 typedef struct Tcl_Condition_ *Tcl_Condition;
529 typedef struct Tcl_Dict_ *Tcl_Dict;
530 typedef struct Tcl_EncodingState_ *Tcl_EncodingState;
531 typedef struct Tcl_Encoding_ *Tcl_Encoding;
532 typedef struct Tcl_Event Tcl_Event;
533 typedef struct Tcl_InterpState_ *Tcl_InterpState;
534 typedef struct Tcl_LoadHandle_ *Tcl_LoadHandle;
535 typedef struct Tcl_Mutex_ *Tcl_Mutex;
536 typedef struct Tcl_Pid_ *Tcl_Pid;
537 typedef struct Tcl_RegExp_ *Tcl_RegExp;
538 typedef struct Tcl_ThreadDataKey_ *Tcl_ThreadDataKey;
539 typedef struct Tcl_ThreadId_ *Tcl_ThreadId;
540 typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
541 typedef struct Tcl_Trace_ *Tcl_Trace;
542 typedef struct Tcl_Var_ *Tcl_Var;
543 typedef struct Tcl_ZLibStream_ *Tcl_ZlibStream;
544
545 /*
546 *----------------------------------------------------------------------------
547 * Definition of the interface to functions implementing threads. A function
548 * following this definition is given to each call of 'Tcl_CreateThread' and
549 * will be called as the main fuction of the new thread created by that call.
550 */
551
552 #if defined __WIN32__
553 typedef unsigned (__stdcall Tcl_ThreadCreateProc) (ClientData clientData);
554 #else
555 typedef void (Tcl_ThreadCreateProc) (ClientData clientData);
556 #endif
557
558 /*
559 * Threading function return types used for abstracting away platform
560 * differences when writing a Tcl_ThreadCreateProc. See the NewThread function
561 * in generic/tclThreadTest.c for it's usage.
562 */
563
564 #if defined __WIN32__
565 # define Tcl_ThreadCreateType unsigned __stdcall
566 # define TCL_THREAD_CREATE_RETURN return 0
567 #else
568 # define Tcl_ThreadCreateType void
569 # define TCL_THREAD_CREATE_RETURN
570 #endif
571
572 /*
573 * Definition of values for default stacksize and the possible flags to be
574 * given to Tcl_CreateThread.
575 */
576
577 #define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack. */
578 #define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default
579 * behaviour. */
580 #define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable. */
581
582 /*
583 * Flag values passed to Tcl_StringCaseMatch.
584 */
585
586 #define TCL_MATCH_NOCASE (1<<0)
587
588 /*
589 * Flag values passed to Tcl_GetRegExpFromObj.
590 */
591
592 #define TCL_REG_BASIC 000000 /* BREs (convenience). */
593 #define TCL_REG_EXTENDED 000001 /* EREs. */
594 #define TCL_REG_ADVF 000002 /* Advanced features in EREs. */
595 #define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs). */
596 #define TCL_REG_QUOTE 000004 /* No special characters, none. */
597 #define TCL_REG_NOCASE 000010 /* Ignore case. */
598 #define TCL_REG_NOSUB 000020 /* Don't care about subexpressions. */
599 #define TCL_REG_EXPANDED 000040 /* Expanded format, white space &
600 * comments. */
601 #define TCL_REG_NLSTOP 000100 /* \n doesn't match . or [^ ] */
602 #define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before. */
603 #define TCL_REG_NEWLINE 000300 /* Newlines are line terminators. */
604 #define TCL_REG_CANMATCH 001000 /* Report details on partial/limited
605 * matches. */
606
607 /*
608 * Flags values passed to Tcl_RegExpExecObj.
609 */
610
611 #define TCL_REG_NOTBOL 0001 /* Beginning of string does not match ^. */
612 #define TCL_REG_NOTEOL 0002 /* End of string does not match $. */
613
614 /*
615 * Structures filled in by Tcl_RegExpInfo. Note that all offset values are
616 * relative to the start of the match string, not the beginning of the entire
617 * string.
618 */
619
620 typedef struct Tcl_RegExpIndices {
621 long start; /* Character offset of first character in
622 * match. */
623 long end; /* Character offset of first character after
624 * the match. */
625 } Tcl_RegExpIndices;
626
627 typedef struct Tcl_RegExpInfo {
628 int nsubs; /* Number of subexpressions in the compiled
629 * expression. */
630 Tcl_RegExpIndices *matches; /* Array of nsubs match offset pairs. */
631 long extendStart; /* The offset at which a subsequent match
632 * might begin. */
633 long reserved; /* Reserved for later use. */
634 } Tcl_RegExpInfo;
635
636 /*
637 * Picky compilers complain if this typdef doesn't appear before the struct's
638 * reference in tclDecls.h.
639 */
640
641 typedef Tcl_StatBuf *Tcl_Stat_;
642 typedef struct stat *Tcl_OldStat_;
643
644 /*
645 *----------------------------------------------------------------------------
646 * When a TCL command returns, the interpreter contains a result from the
647 * command. Programmers are strongly encouraged to use one of the functions
648 * Tcl_GetObjResult() or Tcl_GetStringResult() to read the interpreter's
649 * result. See the SetResult man page for details. Besides this result, the
650 * command function returns an integer code, which is one of the following:
651 *
652 * TCL_OK Command completed normally; the interpreter's result
653 * contains the command's result.
654 * TCL_ERROR The command couldn't be completed successfully; the
655 * interpreter's result describes what went wrong.
656 * TCL_RETURN The command requests that the current function return;
657 * the interpreter's result contains the function's
658 * return value.
659 * TCL_BREAK The command requests that the innermost loop be
660 * exited; the interpreter's result is meaningless.
661 * TCL_CONTINUE Go on to the next iteration of the current loop; the
662 * interpreter's result is meaningless.
663 */
664
665 #define TCL_OK 0
666 #define TCL_ERROR 1
667 #define TCL_RETURN 2
668 #define TCL_BREAK 3
669 #define TCL_CONTINUE 4
670
671 #define TCL_RESULT_SIZE 200
672
673 /*
674 *----------------------------------------------------------------------------
675 * Flags to control what substitutions are performed by Tcl_SubstObj():
676 */
677
678 #define TCL_SUBST_COMMANDS 001
679 #define TCL_SUBST_VARIABLES 002
680 #define TCL_SUBST_BACKSLASHES 004
681 #define TCL_SUBST_ALL 007
682
683 /*
684 * Argument descriptors for math function callbacks in expressions:
685 */
686
687 typedef enum {
688 TCL_INT, TCL_DOUBLE, TCL_EITHER, TCL_WIDE_INT
689 } Tcl_ValueType;
690
691 typedef struct Tcl_Value {
692 Tcl_ValueType type; /* Indicates intValue or doubleValue is valid,
693 * or both. */
694 long intValue; /* Integer value. */
695 double doubleValue; /* Double-precision floating value. */
696 Tcl_WideInt wideValue; /* Wide (min. 64-bit) integer value. */
697 } Tcl_Value;
698
699 /*
700 * Forward declaration of Tcl_Obj to prevent an error when the forward
701 * reference to Tcl_Obj is encountered in the function types declared below.
702 */
703
704 struct Tcl_Obj;
705
706 /*
707 *----------------------------------------------------------------------------
708 * Function types defined by Tcl:
709 */
710
711 typedef int (Tcl_AppInitProc) (Tcl_Interp *interp);
712 typedef int (Tcl_AsyncProc) (ClientData clientData, Tcl_Interp *interp,
713 int code);
714 typedef void (Tcl_ChannelProc) (ClientData clientData, int mask);
715 typedef void (Tcl_CloseProc) (ClientData data);
716 typedef void (Tcl_CmdDeleteProc) (ClientData clientData);
717 typedef int (Tcl_CmdProc) (ClientData clientData, Tcl_Interp *interp,
718 int argc, CONST84 char *argv[]);
719 typedef void (Tcl_CmdTraceProc) (ClientData clientData, Tcl_Interp *interp,
720 int level, char *command, Tcl_CmdProc *proc,
721 ClientData cmdClientData, int argc, CONST84 char *argv[]);
722 typedef int (Tcl_CmdObjTraceProc) (ClientData clientData, Tcl_Interp *interp,
723 int level, const char *command, Tcl_Command commandInfo, int objc,
724 struct Tcl_Obj *const *objv);
725 typedef void (Tcl_CmdObjTraceDeleteProc) (ClientData clientData);
726 typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr,
727 struct Tcl_Obj *dupPtr);
728 typedef int (Tcl_EncodingConvertProc) (ClientData clientData, const char *src,
729 int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst,
730 int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr);
731 typedef void (Tcl_EncodingFreeProc) (ClientData clientData);
732 typedef int (Tcl_EventProc) (Tcl_Event *evPtr, int flags);
733 typedef void (Tcl_EventCheckProc) (ClientData clientData, int flags);
734 typedef int (Tcl_EventDeleteProc) (Tcl_Event *evPtr, ClientData clientData);
735 typedef void (Tcl_EventSetupProc) (ClientData clientData, int flags);
736 typedef void (Tcl_ExitProc) (ClientData clientData);
737 typedef void (Tcl_FileProc) (ClientData clientData, int mask);
738 typedef void (Tcl_FileFreeProc) (ClientData clientData);
739 typedef void (Tcl_FreeInternalRepProc) (struct Tcl_Obj *objPtr);
740 typedef void (Tcl_FreeProc) (char *blockPtr);
741 typedef void (Tcl_IdleProc) (ClientData clientData);
742 typedef void (Tcl_InterpDeleteProc) (ClientData clientData,
743 Tcl_Interp *interp);
744 typedef int (Tcl_MathProc) (ClientData clientData, Tcl_Interp *interp,
745 Tcl_Value *args, Tcl_Value *resultPtr);
746 typedef void (Tcl_NamespaceDeleteProc) (ClientData clientData);
747 typedef int (Tcl_ObjCmdProc) (ClientData clientData, Tcl_Interp *interp,
748 int objc, struct Tcl_Obj *const *objv);
749 typedef int (Tcl_PackageInitProc) (Tcl_Interp *interp);
750 typedef int (Tcl_PackageUnloadProc) (Tcl_Interp *interp, int flags);
751 typedef void (Tcl_PanicProc) (const char *format, ...);
752 typedef void (Tcl_TcpAcceptProc) (ClientData callbackData, Tcl_Channel chan,
753 char *address, int port);
754 typedef void (Tcl_TimerProc) (ClientData clientData);
755 typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *interp, struct Tcl_Obj *objPtr);
756 typedef void (Tcl_UpdateStringProc) (struct Tcl_Obj *objPtr);
757 typedef char * (Tcl_VarTraceProc) (ClientData clientData, Tcl_Interp *interp,
758 CONST84 char *part1, CONST84 char *part2, int flags);
759 typedef void (Tcl_CommandTraceProc) (ClientData clientData, Tcl_Interp *interp,
760 const char *oldName, const char *newName, int flags);
761 typedef void (Tcl_CreateFileHandlerProc) (int fd, int mask, Tcl_FileProc *proc,
762 ClientData clientData);
763 typedef void (Tcl_DeleteFileHandlerProc) (int fd);
764 typedef void (Tcl_AlertNotifierProc) (ClientData clientData);
765 typedef void (Tcl_ServiceModeHookProc) (int mode);
766 typedef ClientData (Tcl_InitNotifierProc) (void);
767 typedef void (Tcl_FinalizeNotifierProc) (ClientData clientData);
768 typedef void (Tcl_MainLoopProc) (void);
769
770
771 /*
772 *----------------------------------------------------------------------------
773 * The following structure represents a type of object, which is a particular
774 * internal representation for an object plus a set of functions that provide
775 * standard operations on objects of that type.
776 */
777
778 typedef struct Tcl_ObjType {
779 const char *name; /* Name of the type, e.g. "int". */
780 Tcl_FreeInternalRepProc *freeIntRepProc;
781 /* Called to free any storage for the type's
782 * internal rep. NULL if the internal rep does
783 * not need freeing. */
784 Tcl_DupInternalRepProc *dupIntRepProc;
785 /* Called to create a new object as a copy of
786 * an existing object. */
787 Tcl_UpdateStringProc *updateStringProc;
788 /* Called to update the string rep from the
789 * type's internal representation. */
790 Tcl_SetFromAnyProc *setFromAnyProc;
791 /* Called to convert the object's internal rep
792 * to this type. Frees the internal rep of the
793 * old type. Returns TCL_ERROR on failure. */
794 } Tcl_ObjType;
795
796 /*
797 * One of the following structures exists for each object in the Tcl system.
798 * An object stores a value as either a string, some internal representation,
799 * or both.
800 */
801
802 typedef struct Tcl_Obj {
803 int refCount; /* When 0 the object will be freed. */
804 char *bytes; /* This points to the first byte of the
805 * object's string representation. The array
806 * must be followed by a null byte (i.e., at
807 * offset length) but may also contain
808 * embedded null characters. The array's
809 * storage is allocated by ckalloc. NULL means
810 * the string rep is invalid and must be
811 * regenerated from the internal rep. Clients
812 * should use Tcl_GetStringFromObj or
813 * Tcl_GetString to get a pointer to the byte
814 * array as a readonly value. */
815 int length; /* The number of bytes at *bytes, not
816 * including the terminating null. */
817 const Tcl_ObjType *typePtr; /* Denotes the object's type. Always
818 * corresponds to the type of the object's
819 * internal rep. NULL indicates the object has
820 * no internal rep (has no type). */
821 union { /* The internal representation: */
822 long longValue; /* - an long integer value. */
823 double doubleValue; /* - a double-precision floating value. */
824 void *otherValuePtr; /* - another, type-specific value. */
825 Tcl_WideInt wideValue; /* - a long long value. */
826 struct { /* - internal rep as two pointers. */
827 void *ptr1;
828 void *ptr2;
829 } twoPtrValue;
830 struct { /* - internal rep as a pointer and a long,
831 * the main use of which is a bignum's
832 * tightly packed fields, where the alloc,
833 * used and signum flags are packed into a
834 * single word with everything else hung
835 * off the pointer. */
836 void *ptr;
837 unsigned long value;
838 } ptrAndLongRep;
839 } internalRep;
840 } Tcl_Obj;
841
842 /*
843 * Macros to increment and decrement a Tcl_Obj's reference count, and to test
844 * whether an object is shared (i.e. has reference count > 1). Note: clients
845 * should use Tcl_DecrRefCount() when they are finished using an object, and
846 * should never call TclFreeObj() directly. TclFreeObj() is only defined and
847 * made public in tcl.h to support Tcl_DecrRefCount's macro definition.
848 */
849
850 void Tcl_IncrRefCount(Tcl_Obj *objPtr);
851 void Tcl_DecrRefCount(Tcl_Obj *objPtr);
852 int Tcl_IsShared(Tcl_Obj *objPtr);
853
854
855 /*
856 *----------------------------------------------------------------------------
857 * The following structure contains the state needed by Tcl_SaveResult. No-one
858 * outside of Tcl should access any of these fields. This structure is
859 * typically allocated on the stack.
860 */
861
862 typedef struct Tcl_SavedResult {
863 char *result;
864 Tcl_FreeProc *freeProc;
865 Tcl_Obj *objResultPtr;
866 char *appendResult;
867 int appendAvl;
868 int appendUsed;
869 char resultSpace[TCL_RESULT_SIZE+1];
870 } Tcl_SavedResult;
871
872 /*
873 *----------------------------------------------------------------------------
874 * The following definitions support Tcl's namespace facility. Note: the first
875 * five fields must match exactly the fields in a Namespace structure (see
876 * tclInt.h).
877 */
878
879 typedef struct Tcl_Namespace {
880 char *name; /* The namespace's name within its parent
881 * namespace. This contains no ::'s. The name
882 * of the global namespace is "" although "::"
883 * is an synonym. */
884 char *fullName; /* The namespace's fully qualified name. This
885 * starts with ::. */
886 ClientData clientData; /* Arbitrary value associated with this
887 * namespace. */
888 Tcl_NamespaceDeleteProc *deleteProc;
889 /* Function invoked when deleting the
890 * namespace to, e.g., free clientData. */
891 struct Tcl_Namespace *parentPtr;
892 /* Points to the namespace that contains this
893 * one. NULL if this is the global
894 * namespace. */
895 } Tcl_Namespace;
896
897 /*
898 *----------------------------------------------------------------------------
899 * The following structure represents a call frame, or activation record. A
900 * call frame defines a naming context for a procedure call: its local scope
901 * (for local variables) and its namespace scope (used for non-local
902 * variables; often the global :: namespace). A call frame can also define the
903 * naming context for a namespace eval or namespace inscope command: the
904 * namespace in which the command's code should execute. The Tcl_CallFrame
905 * structures exist only while procedures or namespace eval/inscope's are
906 * being executed, and provide a Tcl call stack.
907 *
908 * A call frame is initialized and pushed using Tcl_PushCallFrame and popped
909 * using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be provided by the
910 * Tcl_PushCallFrame caller, and callers typically allocate them on the C call
911 * stack for efficiency. For this reason, Tcl_CallFrame is defined as a
912 * structure and not as an opaque token. However, most Tcl_CallFrame fields
913 * are hidden since applications should not access them directly; others are
914 * declared as "dummyX".
915 *
916 * WARNING!! The structure definition must be kept consistent with the
917 * CallFrame structure in tclInt.h. If you change one, change the other.
918 */
919
920 typedef struct Tcl_CallFrame {
921 Tcl_Namespace *nsPtr;
922 int dummy1;
923 int dummy2;
924 void *dummy3;
925 void *dummy4;
926 void *dummy5;
927 int dummy6;
928 void *dummy7;
929 void *dummy8;
930 int dummy9;
931 void *dummy10;
932 void *dummy11;
933 void *dummy12;
934 void *dummy13;
935 } Tcl_CallFrame;
936
937 /*
938 *----------------------------------------------------------------------------
939 * Information about commands that is returned by Tcl_GetCommandInfo and
940 * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based command
941 * function while proc is a traditional Tcl argc/argv string-based function.
942 * Tcl_CreateObjCommand and Tcl_CreateCommand ensure that both objProc and
943 * proc are non-NULL and can be called to execute the command. However, it may
944 * be faster to call one instead of the other. The member isNativeObjectProc
945 * is set to 1 if an object-based function was registered by
946 * Tcl_CreateObjCommand, and to 0 if a string-based function was registered by
947 * Tcl_CreateCommand. The other function is typically set to a compatibility
948 * wrapper that does string-to-object or object-to-string argument conversions
949 * then calls the other function.
950 */
951
952 typedef struct Tcl_CmdInfo {
953 int isNativeObjectProc; /* 1 if objProc was registered by a call to
954 * Tcl_CreateObjCommand; 0 otherwise.
955 * Tcl_SetCmdInfo does not modify this
956 * field. */
957 Tcl_ObjCmdProc *objProc; /* Command's object-based function. */
958 ClientData objClientData; /* ClientData for object proc. */
959 Tcl_CmdProc *proc; /* Command's string-based function. */
960 ClientData clientData; /* ClientData for string proc. */
961 Tcl_CmdDeleteProc *deleteProc;
962 /* Function to call when command is
963 * deleted. */
964 ClientData deleteData; /* Value to pass to deleteProc (usually the
965 * same as clientData). */
966 Tcl_Namespace *namespacePtr;/* Points to the namespace that contains this
967 * command. Note that Tcl_SetCmdInfo will not
968 * change a command's namespace; use
969 * TclRenameCommand or Tcl_Eval (of 'rename')
970 * to do that. */
971 } Tcl_CmdInfo;
972
973 /*
974 *----------------------------------------------------------------------------
975 * The structure defined below is used to hold dynamic strings. The only
976 * fields that clients should use are string and length, accessible via the
977 * macros Tcl_DStringValue and Tcl_DStringLength.
978 */
979
980 #define TCL_DSTRING_STATIC_SIZE 200
981 typedef struct Tcl_DString {
982 char *string; /* Points to beginning of string: either
983 * staticSpace below or a malloced array. */
984 int length; /* Number of non-NULL characters in the
985 * string. */
986 int spaceAvl; /* Total number of bytes available for the
987 * string and its terminating NULL char. */
988 char staticSpace[TCL_DSTRING_STATIC_SIZE];
989 /* Space to use in common case where string is
990 * small. */
991 } Tcl_DString;
992
993 #define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
994 #define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
995 #define Tcl_DStringTrunc Tcl_DStringSetLength
996
997 /*
998 * Definitions for the maximum number of digits of precision that may be
999 * specified in the "tcl_precision" variable, and the number of bytes of
1000 * buffer space required by Tcl_PrintDouble.
1001 */
1002
1003 #define TCL_MAX_PREC 17
1004 #define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
1005
1006 /*
1007 * Definition for a number of bytes of buffer space sufficient to hold the
1008 * string representation of an integer in base 10 (assuming the existence of
1009 * 64-bit integers).
1010 */
1011
1012 #define TCL_INTEGER_SPACE 24
1013
1014 /*
1015 * Flag values passed to Tcl_ConvertElement.
1016 * TCL_DONT_USE_BRACES forces it not to enclose the element in braces, but to
1017 * use backslash quoting instead.
1018 * TCL_DONT_QUOTE_HASH disables the default quoting of the '#' character. It
1019 * is safe to leave the hash unquoted when the element is not the first
1020 * element of a list, and this flag can be used by the caller to indicate
1021 * that condition.
1022 */
1023
1024 #define TCL_DONT_USE_BRACES 1
1025 #define TCL_DONT_QUOTE_HASH 8
1026
1027 /*
1028 * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
1029 * abbreviated strings.
1030 */
1031
1032 #define TCL_EXACT 1
1033
1034 /*
1035 *----------------------------------------------------------------------------
1036 * Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv.
1037 * WARNING: these bit choices must not conflict with the bit choices for
1038 * evalFlag bits in tclInt.h!
1039 *
1040 * Meanings:
1041 * TCL_NO_EVAL: Just record this command
1042 * TCL_EVAL_GLOBAL: Execute script in global namespace
1043 * TCL_EVAL_DIRECT: Do not compile this script
1044 * TCL_EVAL_INVOKE: Magical Tcl_EvalObjv mode for aliases/ensembles
1045 * o Run in iPtr->lookupNsPtr or global namespace
1046 * o Cut out of error traces
1047 * o Don't reset the flags controlling ensemble
1048 * error message rewriting.
1049 * TCL_CANCEL_UNWIND: Magical Tcl_CancelEval mode that causes the
1050 * stack for the script in progress to be
1051 * completely unwound.
1052 * TCL_EVAL_NOERR: Do no exception reporting at all, just return
1053 * as the caller will report.
1054 */
1055
1056 #define TCL_NO_EVAL 0x010000
1057 #define TCL_EVAL_GLOBAL 0x020000
1058 #define TCL_EVAL_DIRECT 0x040000
1059 #define TCL_EVAL_INVOKE 0x080000
1060 #define TCL_CANCEL_UNWIND 0x100000
1061 #define TCL_EVAL_NOERR 0x200000
1062
1063 /*
1064 * Special freeProc values that may be passed to Tcl_SetResult (see the man
1065 * page for details):
1066 */
1067
1068 #define TCL_VOLATILE ((Tcl_FreeProc *) 1)
1069 #define TCL_STATIC ((Tcl_FreeProc *) 0)
1070 #define TCL_DYNAMIC ((Tcl_FreeProc *) 3)
1071
1072 /*
1073 * Flag values passed to variable-related functions.
1074 * WARNING: these bit choices must not conflict with the bit choice for
1075 * TCL_CANCEL_UNWIND, above.
1076 */
1077
1078 #define TCL_GLOBAL_ONLY 1
1079 #define TCL_NAMESPACE_ONLY 2
1080 #define TCL_APPEND_VALUE 4
1081 #define TCL_LIST_ELEMENT 8
1082 #define TCL_TRACE_READS 0x10
1083 #define TCL_TRACE_WRITES 0x20
1084 #define TCL_TRACE_UNSETS 0x40
1085 #define TCL_TRACE_DESTROYED 0x80
1086 #define TCL_INTERP_DESTROYED 0x100
1087 #define TCL_LEAVE_ERR_MSG 0x200
1088 #define TCL_TRACE_ARRAY 0x800
1089 #ifndef TCL_REMOVE_OBSOLETE_TRACES
1090 /* Required to support old variable/vdelete/vinfo traces. */
1091 #define TCL_TRACE_OLD_STYLE 0x1000
1092 #endif
1093 /* Indicate the semantics of the result of a trace. */
1094 #define TCL_TRACE_RESULT_DYNAMIC 0x8000
1095 #define TCL_TRACE_RESULT_OBJECT 0x10000
1096
1097 /*
1098 * Flag values for ensemble commands.
1099 */
1100
1101 #define TCL_ENSEMBLE_PREFIX 0x02/* Flag value to say whether to allow
1102 * unambiguous prefixes of commands or to
1103 * require exact matches for command names. */
1104
1105 /*
1106 * Flag values passed to command-related functions.
1107 */
1108
1109 #define TCL_TRACE_RENAME 0x2000
1110 #define TCL_TRACE_DELETE 0x4000
1111
1112 #define TCL_ALLOW_INLINE_COMPILATION 0x20000
1113
1114 /*
1115 * The TCL_PARSE_PART1 flag is deprecated and has no effect. The part1 is now
1116 * always parsed whenever the part2 is NULL. (This is to avoid a common error
1117 * when converting code to use the new object based APIs and forgetting to
1118 * give the flag)
1119 */
1120
1121 #ifndef TCL_NO_DEPRECATED
1122 # define TCL_PARSE_PART1 0x400
1123 #endif
1124
1125 /*
1126 * Types for linked variables:
1127 */
1128
1129 #define TCL_LINK_INT 1
1130 #define TCL_LINK_DOUBLE 2
1131 #define TCL_LINK_BOOLEAN 3
1132 #define TCL_LINK_STRING 4
1133 #define TCL_LINK_WIDE_INT 5
1134 #define TCL_LINK_CHAR 6
1135 #define TCL_LINK_UCHAR 7
1136 #define TCL_LINK_SHORT 8
1137 #define TCL_LINK_USHORT 9
1138 #define TCL_LINK_UINT 10
1139 #define TCL_LINK_LONG 11
1140 #define TCL_LINK_ULONG 12
1141 #define TCL_LINK_FLOAT 13
1142 #define TCL_LINK_WIDE_UINT 14
1143 #define TCL_LINK_READ_ONLY 0x80
1144
1145
1146 /*
1147 *----------------------------------------------------------------------------
1148 * Forward declarations of Tcl_HashTable and related types.
1149 */
1150
1151 typedef struct Tcl_HashKeyType Tcl_HashKeyType;
1152 typedef struct Tcl_HashTable Tcl_HashTable;
1153 typedef struct Tcl_HashEntry Tcl_HashEntry;
1154
1155 typedef unsigned (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr);
1156 typedef int (Tcl_CompareHashKeysProc) (void *keyPtr, Tcl_HashEntry *hPtr);
1157 typedef Tcl_HashEntry * (Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr,
1158 void *keyPtr);
1159 typedef void (Tcl_FreeHashEntryProc) (Tcl_HashEntry *hPtr);
1160
1161 /*
1162 * This flag controls whether the hash table stores the hash of a key, or
1163 * recalculates it. There should be no reason for turning this flag off as it
1164 * is completely binary and source compatible unless you directly access the
1165 * bucketPtr member of the Tcl_HashTableEntry structure. This member has been
1166 * removed and the space used to store the hash value.
1167 */
1168
1169 #ifndef TCL_HASH_KEY_STORE_HASH
1170 # define TCL_HASH_KEY_STORE_HASH 1
1171 #endif
1172
1173 /*
1174 * Structure definition for an entry in a hash table. No-one outside Tcl
1175 * should access any of these fields directly; use the macros defined below.
1176 */
1177
1178 struct Tcl_HashEntry {
1179 Tcl_HashEntry *nextPtr; /* Pointer to next entry in this hash bucket,
1180 * or NULL for end of chain. */
1181 Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */
1182 #if TCL_HASH_KEY_STORE_HASH
1183 void *hash; /* Hash value, stored as pointer to ensure
1184 * that the offsets of the fields in this
1185 * structure are not changed. */
1186 #else
1187 Tcl_HashEntry **bucketPtr; /* Pointer to bucket that points to first
1188 * entry in this entry's chain: used for
1189 * deleting the entry. */
1190 #endif
1191 ClientData clientData; /* Application stores something here with
1192 * Tcl_SetHashValue. */
1193 union { /* Key has one of these forms: */
1194 char *oneWordValue; /* One-word value for key. */
1195 Tcl_Obj *objPtr; /* Tcl_Obj * key value. */
1196 int words[1]; /* Multiple integer words for key. The actual
1197 * size will be as large as necessary for this
1198 * table's keys. */
1199 char string[1]; /* String for key. The actual size will be as
1200 * large as needed to hold the key. */
1201 } key; /* MUST BE LAST FIELD IN RECORD!! */
1202 };
1203
1204 /*
1205 * Flags used in Tcl_HashKeyType.
1206 *
1207 * TCL_HASH_KEY_RANDOMIZE_HASH -
1208 * There are some things, pointers for example
1209 * which don't hash well because they do not use
1210 * the lower bits. If this flag is set then the
1211 * hash table will attempt to rectify this by
1212 * randomising the bits and then using the upper
1213 * N bits as the index into the table.
1214 * TCL_HASH_KEY_SYSTEM_HASH - If this flag is set then all memory internally
1215 * allocated for the hash table that is not for an
1216 * entry will use the system heap.
1217 */
1218
1219 #define TCL_HASH_KEY_RANDOMIZE_HASH 0x1
1220 #define TCL_HASH_KEY_SYSTEM_HASH 0x2
1221
1222 /*
1223 * Structure definition for the methods associated with a hash table key type.
1224 */
1225
1226 #define TCL_HASH_KEY_TYPE_VERSION 1
1227 struct Tcl_HashKeyType {
1228 int version; /* Version of the table. If this structure is
1229 * extended in future then the version can be
1230 * used to distinguish between different
1231 * structures. */
1232 int flags; /* Flags, see above for details. */
1233 Tcl_HashKeyProc *hashKeyProc;
1234 /* Calculates a hash value for the key. If
1235 * this is NULL then the pointer itself is
1236 * used as a hash value. */
1237 Tcl_CompareHashKeysProc *compareKeysProc;
1238 /* Compares two keys and returns zero if they
1239 * do not match, and non-zero if they do. If
1240 * this is NULL then the pointers are
1241 * compared. */
1242 Tcl_AllocHashEntryProc *allocEntryProc;
1243 /* Called to allocate memory for a new entry,
1244 * i.e. if the key is a string then this could
1245 * allocate a single block which contains
1246 * enough space for both the entry and the
1247 * string. Only the key field of the allocated
1248 * Tcl_HashEntry structure needs to be filled
1249 * in. If something else needs to be done to
1250 * the key, i.e. incrementing a reference
1251 * count then that should be done by this
1252 * function. If this is NULL then Tcl_Alloc is
1253 * used to allocate enough space for a
1254 * Tcl_HashEntry and the key pointer is
1255 * assigned to key.oneWordValue. */
1256 Tcl_FreeHashEntryProc *freeEntryProc;
1257 /* Called to free memory associated with an
1258 * entry. If something else needs to be done
1259 * to the key, i.e. decrementing a reference
1260 * count then that should be done by this
1261 * function. If this is NULL then Tcl_Free is
1262 * used to free the Tcl_HashEntry. */
1263 };
1264
1265 /*
1266 * Structure definition for a hash table. Must be in tcl.h so clients can
1267 * allocate space for these structures, but clients should never access any
1268 * fields in this structure.
1269 */
1270
1271 #define TCL_SMALL_HASH_TABLE 4
1272 struct Tcl_HashTable {
1273 Tcl_HashEntry **buckets; /* Pointer to bucket array. Each element
1274 * points to first entry in bucket's hash
1275 * chain, or NULL. */
1276 Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
1277 /* Bucket array used for small tables (to
1278 * avoid mallocs and frees). */
1279 int numBuckets; /* Total number of buckets allocated at
1280 * **bucketPtr. */
1281 int numEntries; /* Total number of entries present in
1282 * table. */
1283 int rebuildSize; /* Enlarge table when numEntries gets to be
1284 * this large. */
1285 int downShift; /* Shift count used in hashing function.
1286 * Designed to use high-order bits of
1287 * randomized keys. */
1288 int mask; /* Mask value used in hashing function. */
1289 int keyType; /* Type of keys used in this table. It's
1290 * either TCL_CUSTOM_KEYS, TCL_STRING_KEYS,
1291 * TCL_ONE_WORD_KEYS, or an integer giving the
1292 * number of ints that is the size of the
1293 * key. */
1294 Tcl_HashEntry *(*findProc) (Tcl_HashTable *tablePtr, const char *key);
1295 Tcl_HashEntry *(*createProc) (Tcl_HashTable *tablePtr, const char *key,
1296 int *newPtr);
1297 const Tcl_HashKeyType *typePtr;
1298 /* Type of the keys used in the
1299 * Tcl_HashTable. */
1300 };
1301
1302 /*
1303 * Structure definition for information used to keep track of searches through
1304 * hash tables:
1305 */
1306
1307 typedef struct Tcl_HashSearch {
1308 Tcl_HashTable *tablePtr; /* Table being searched. */
1309 int nextIndex; /* Index of next bucket to be enumerated after
1310 * present one. */
1311 Tcl_HashEntry *nextEntryPtr;/* Next entry to be enumerated in the current
1312 * bucket. */
1313 } Tcl_HashSearch;
1314
1315 /*
1316 * Acceptable key types for hash tables:
1317 *
1318 * TCL_STRING_KEYS: The keys are strings, they are copied into the
1319 * entry.
1320 * TCL_ONE_WORD_KEYS: The keys are pointers, the pointer is stored
1321 * in the entry.
1322 * TCL_CUSTOM_TYPE_KEYS: The keys are arbitrary types which are copied
1323 * into the entry.
1324 * TCL_CUSTOM_PTR_KEYS: The keys are pointers to arbitrary types, the
1325 * pointer is stored in the entry.
1326 *
1327 * While maintaining binary compatability the above have to be distinct values
1328 * as they are used to differentiate between old versions of the hash table
1329 * which don't have a typePtr and new ones which do. Once binary compatability
1330 * is discarded in favour of making more wide spread changes TCL_STRING_KEYS
1331 * can be the same as TCL_CUSTOM_TYPE_KEYS, and TCL_ONE_WORD_KEYS can be the
1332 * same as TCL_CUSTOM_PTR_KEYS because they simply determine how the key is
1333 * accessed from the entry and not the behaviour.
1334 */
1335
1336 #define TCL_STRING_KEYS (0)
1337 #define TCL_ONE_WORD_KEYS (1)
1338 #define TCL_CUSTOM_TYPE_KEYS (-2)
1339 #define TCL_CUSTOM_PTR_KEYS (-1)
1340
1341 /*
1342 * Structure definition for information used to keep track of searches through
1343 * dictionaries. These fields should not be accessed by code outside
1344 * tclDictObj.c
1345 */
1346
1347 typedef struct {
1348 void *next; /* Search position for underlying hash
1349 * table. */
1350 int epoch; /* Epoch marker for dictionary being searched,
1351 * or -1 if search has terminated. */
1352 Tcl_Dict dictionaryPtr; /* Reference to dictionary being searched. */
1353 } Tcl_DictSearch;
1354
1355
1356 /*
1357 *----------------------------------------------------------------------------
1358 * Flag values to pass to Tcl_DoOneEvent to disable searches for some kinds of
1359 * events:
1360 */
1361
1362 #define TCL_DONT_WAIT (1<<1)
1363 #define TCL_WINDOW_EVENTS (1<<2)
1364 #define TCL_FILE_EVENTS (1<<3)
1365 #define TCL_TIMER_EVENTS (1<<4)
1366 #define TCL_IDLE_EVENTS (1<<5) /* WAS 0x10 ???? */
1367 #define TCL_ALL_EVENTS (~TCL_DONT_WAIT)
1368
1369 /*
1370 * The following structure defines a generic event for the Tcl event system.
1371 * These are the things that are queued in calls to Tcl_QueueEvent and
1372 * serviced later by Tcl_DoOneEvent. There can be many different kinds of
1373 * events with different fields, corresponding to window events, timer events,
1374 * etc. The structure for a particular event consists of a Tcl_Event header
1375 * followed by additional information specific to that event.
1376 */
1377
1378 struct Tcl_Event {
1379 Tcl_EventProc *proc; /* Function to call to service this event. */
1380 struct Tcl_Event *nextPtr; /* Next in list of pending events, or NULL. */
1381 };
1382
1383 /*
1384 * Positions to pass to Tcl_QueueEvent:
1385 */
1386
1387 typedef enum {
1388 TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
1389 } Tcl_QueuePosition;
1390
1391 /*
1392 * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
1393 * event routines.
1394 */
1395
1396 #define TCL_SERVICE_NONE 0
1397 #define TCL_SERVICE_ALL 1
1398
1399 /*
1400 * The following structure keeps is used to hold a time value, either as an
1401 * absolute time (the number of seconds from the epoch) or as an elapsed time.
1402 * On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
1403 */
1404
1405 typedef struct Tcl_Time {
1406 long sec; /* Seconds. */
1407 long usec; /* Microseconds. */
1408 } Tcl_Time;
1409
1410 typedef void (Tcl_SetTimerProc) (CONST86 Tcl_Time *timePtr);
1411 typedef int (Tcl_WaitForEventProc) (CONST86 Tcl_Time *timePtr);
1412
1413 /*
1414 * TIP #233 (Virtualized Time)
1415 */
1416
1417 typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, ClientData clientData);
1418 typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData);
1419
1420 /*
1421 *----------------------------------------------------------------------------
1422 * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler to
1423 * indicate what sorts of events are of interest:
1424 */
1425
1426 #define TCL_READABLE (1<<1)
1427 #define TCL_WRITABLE (1<<2)
1428 #define TCL_EXCEPTION (1<<3)
1429
1430 /*
1431 * Flag values to pass to Tcl_OpenCommandChannel to indicate the disposition
1432 * of the stdio handles. TCL_STDIN, TCL_STDOUT, TCL_STDERR, are also used in
1433 * Tcl_GetStdChannel.
1434 */
1435
1436 #define TCL_STDIN (1<<1)
1437 #define TCL_STDOUT (1<<2)
1438 #define TCL_STDERR (1<<3)
1439 #define TCL_ENFORCE_MODE (1<<4)
1440
1441 /*
1442 * Bits passed to Tcl_DriverClose2Proc to indicate which side of a channel
1443 * should be closed.
1444 */
1445
1446 #define TCL_CLOSE_READ (1<<1)
1447 #define TCL_CLOSE_WRITE (1<<2)
1448
1449 /*
1450 * Value to use as the closeProc for a channel that supports the close2Proc
1451 * interface.
1452 */
1453
1454 #define TCL_CLOSE2PROC ((Tcl_DriverCloseProc *) 1)
1455
1456 /*
1457 * Channel version tag. This was introduced in 8.3.2/8.4.
1458 */
1459
1460 #define TCL_CHANNEL_VERSION_1 ((Tcl_ChannelTypeVersion) 0x1)
1461 #define TCL_CHANNEL_VERSION_2 ((Tcl_ChannelTypeVersion) 0x2)
1462 #define TCL_CHANNEL_VERSION_3 ((Tcl_ChannelTypeVersion) 0x3)
1463 #define TCL_CHANNEL_VERSION_4 ((Tcl_ChannelTypeVersion) 0x4)
1464 #define TCL_CHANNEL_VERSION_5 ((Tcl_ChannelTypeVersion) 0x5)
1465
1466 /*
1467 * TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc.
1468 */
1469
1470 #define TCL_CHANNEL_THREAD_INSERT (0)
1471 #define TCL_CHANNEL_THREAD_REMOVE (1)
1472
1473 /*
1474 * Typedefs for the various operations in a channel type:
1475 */
1476
1477 typedef int (Tcl_DriverBlockModeProc) (ClientData instanceData, int mode);
1478 typedef int (Tcl_DriverCloseProc) (ClientData instanceData,
1479 Tcl_Interp *interp);
1480 typedef int (Tcl_DriverClose2Proc) (ClientData instanceData,
1481 Tcl_Interp *interp, int flags);
1482 typedef int (Tcl_DriverInputProc) (ClientData instanceData, char *buf,
1483 int toRead, int *errorCodePtr);
1484 typedef int (Tcl_DriverOutputProc) (ClientData instanceData,
1485 CONST84 char *buf, int toWrite, int *errorCodePtr);
1486 typedef int (Tcl_DriverSeekProc) (ClientData instanceData, long offset,
1487 int mode, int *errorCodePtr);
1488 typedef int (Tcl_DriverSetOptionProc) (ClientData instanceData,
1489 Tcl_Interp *interp, const char *optionName,
1490 const char *value);
1491 typedef int (Tcl_DriverGetOptionProc) (ClientData instanceData,
1492 Tcl_Interp *interp, CONST84 char *optionName,
1493 Tcl_DString *dsPtr);
1494 typedef void (Tcl_DriverWatchProc) (ClientData instanceData, int mask);
1495 typedef int (Tcl_DriverGetHandleProc) (ClientData instanceData,
1496 int direction, ClientData *handlePtr);
1497 typedef int (Tcl_DriverFlushProc) (ClientData instanceData);
1498 typedef int (Tcl_DriverHandlerProc) (ClientData instanceData,
1499 int interestMask);
1500 typedef Tcl_WideInt (Tcl_DriverWideSeekProc) (ClientData instanceData,
1501 Tcl_WideInt offset, int mode, int *errorCodePtr);
1502 /*
1503 * TIP #218, Channel Thread Actions
1504 */
1505 typedef void (Tcl_DriverThreadActionProc) (ClientData instanceData,
1506 int action);
1507 /*
1508 * TIP #208, File Truncation (etc.)
1509 */
1510 typedef int (Tcl_DriverTruncateProc) (ClientData instanceData,
1511 Tcl_WideInt length);
1512
1513 /*
1514 * struct Tcl_ChannelType:
1515 *
1516 * One such structure exists for each type (kind) of channel. It collects
1517 * together in one place all the functions that are part of the specific
1518 * channel type.
1519 *
1520 * It is recommend that the Tcl_Channel* functions are used to access elements
1521 * of this structure, instead of direct accessing.
1522 */
1523
1524 typedef struct Tcl_ChannelType {
1525 const char *typeName; /* The name of the channel type in Tcl
1526 * commands. This storage is owned by channel
1527 * type. */
1528 Tcl_ChannelTypeVersion version;
1529 /* Version of the channel type. */
1530 Tcl_DriverCloseProc *closeProc;
1531 /* Function to call to close the channel, or
1532 * TCL_CLOSE2PROC if the close2Proc should be
1533 * used instead. */
1534 Tcl_DriverInputProc *inputProc;
1535 /* Function to call for input on channel. */
1536 Tcl_DriverOutputProc *outputProc;
1537 /* Function to call for output on channel. */
1538 Tcl_DriverSeekProc *seekProc;
1539 /* Function to call to seek on the channel.
1540 * May be NULL. */
1541 Tcl_DriverSetOptionProc *setOptionProc;
1542 /* Set an option on a channel. */
1543 Tcl_DriverGetOptionProc *getOptionProc;
1544 /* Get an option from a channel. */
1545 Tcl_DriverWatchProc *watchProc;
1546 /* Set up the notifier to watch for events on
1547 * this channel. */
1548 Tcl_DriverGetHandleProc *getHandleProc;
1549 /* Get an OS handle from the channel or NULL
1550 * if not supported. */
1551 Tcl_DriverClose2Proc *close2Proc;
1552 /* Function to call to close the channel if
1553 * the device supports closing the read &
1554 * write sides independently. */
1555 Tcl_DriverBlockModeProc *blockModeProc;
1556 /* Set blocking mode for the raw channel. May
1557 * be NULL. */
1558 /*
1559 * Only valid in TCL_CHANNEL_VERSION_2 channels or later.
1560 */
1561 Tcl_DriverFlushProc *flushProc;
1562 /* Function to call to flush a channel. May be
1563 * NULL. */
1564 Tcl_DriverHandlerProc *handlerProc;
1565 /* Function to call to handle a channel event.
1566 * This will be passed up the stacked channel
1567 * chain. */
1568 /*
1569 * Only valid in TCL_CHANNEL_VERSION_3 channels or later.
1570 */
1571 Tcl_DriverWideSeekProc *wideSeekProc;
1572 /* Function to call to seek on the channel
1573 * which can handle 64-bit offsets. May be
1574 * NULL, and must be NULL if seekProc is
1575 * NULL. */
1576 /*
1577 * Only valid in TCL_CHANNEL_VERSION_4 channels or later.
1578 * TIP #218, Channel Thread Actions.
1579 */
1580 Tcl_DriverThreadActionProc *threadActionProc;
1581 /* Function to call to notify the driver of
1582 * thread specific activity for a channel. May
1583 * be NULL. */
1584 /*
1585 * Only valid in TCL_CHANNEL_VERSION_5 channels or later.
1586 * TIP #208, File Truncation.
1587 */
1588 Tcl_DriverTruncateProc *truncateProc;
1589 /* Function to call to truncate the underlying
1590 * file to a particular length. May be NULL if
1591 * the channel does not support truncation. */
1592 } Tcl_ChannelType;
1593
1594 /*
1595 * The following flags determine whether the blockModeProc above should set
1596 * the channel into blocking or nonblocking mode. They are passed as arguments
1597 * to the blockModeProc function in the above structure.
1598 */
1599
1600 #define TCL_MODE_BLOCKING 0 /* Put channel into blocking mode. */
1601 #define TCL_MODE_NONBLOCKING 1 /* Put channel into nonblocking
1602 * mode. */
1603
1604 /*
1605 *----------------------------------------------------------------------------
1606 * Enum for different types of file paths.
1607 */
1608
1609 typedef enum Tcl_PathType {
1610 TCL_PATH_ABSOLUTE,
1611 TCL_PATH_RELATIVE,
1612 TCL_PATH_VOLUME_RELATIVE
1613 } Tcl_PathType;
1614
1615 /*
1616 * The following structure is used to pass glob type data amongst the various
1617 * glob routines and Tcl_FSMatchInDirectory.
1618 */
1619
1620 typedef struct Tcl_GlobTypeData {
1621 int type; /* Corresponds to bcdpfls as in 'find -t'. */
1622 int perm; /* Corresponds to file permissions. */
1623 Tcl_Obj *macType; /* Acceptable Mac type. */
1624 Tcl_Obj *macCreator; /* Acceptable Mac creator. */
1625 } Tcl_GlobTypeData;
1626
1627 /*
1628 * Type and permission definitions for glob command.
1629 */
1630
1631 #define TCL_GLOB_TYPE_BLOCK (1<<0)
1632 #define TCL_GLOB_TYPE_CHAR (1<<1)
1633 #define TCL_GLOB_TYPE_DIR (1<<2)
1634 #define TCL_GLOB_TYPE_PIPE (1<<3)
1635 #define TCL_GLOB_TYPE_FILE (1<<4)
1636 #define TCL_GLOB_TYPE_LINK (1<<5)
1637 #define TCL_GLOB_TYPE_SOCK (1<<6)
1638 #define TCL_GLOB_TYPE_MOUNT (1<<7)
1639
1640 #define TCL_GLOB_PERM_RONLY (1<<0)
1641 #define TCL_GLOB_PERM_HIDDEN (1<<1)
1642 #define TCL_GLOB_PERM_R (1<<2)
1643 #define TCL_GLOB_PERM_W (1<<3)
1644 #define TCL_GLOB_PERM_X (1<<4)
1645
1646 /*
1647 * Flags for the unload callback function.
1648 */
1649
1650 #define TCL_UNLOAD_DETACH_FROM_INTERPRETER (1<<0)
1651 #define TCL_UNLOAD_DETACH_FROM_PROCESS (1<<1)
1652
1653 /*
1654 * Typedefs for the various filesystem operations:
1655 */
1656
1657 typedef int (Tcl_FSStatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1658 typedef int (Tcl_FSAccessProc) (Tcl_Obj *pathPtr, int mode);
1659 typedef Tcl_Channel (Tcl_FSOpenFileChannelProc) (Tcl_Interp *interp,
1660 Tcl_Obj *pathPtr, int mode, int permissions);
1661 typedef int (Tcl_FSMatchInDirectoryProc) (Tcl_Interp *interp, Tcl_Obj *result,
1662 Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types);
1663 typedef Tcl_Obj * (Tcl_FSGetCwdProc) (Tcl_Interp *interp);
1664 typedef int (Tcl_FSChdirProc) (Tcl_Obj *pathPtr);
1665 typedef int (Tcl_FSLstatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1666 typedef int (Tcl_FSCreateDirectoryProc) (Tcl_Obj *pathPtr);
1667 typedef int (Tcl_FSDeleteFileProc) (Tcl_Obj *pathPtr);
1668 typedef int (Tcl_FSCopyDirectoryProc) (Tcl_Obj *srcPathPtr,
1669 Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr);
1670 typedef int (Tcl_FSCopyFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr);
1671 typedef int (Tcl_FSRemoveDirectoryProc) (Tcl_Obj *pathPtr, int recursive,
1672 Tcl_Obj **errorPtr);
1673 typedef int (Tcl_FSRenameFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr);
1674 typedef void (Tcl_FSUnloadFileProc) (Tcl_LoadHandle loadHandle);
1675 typedef Tcl_Obj * (Tcl_FSListVolumesProc) (void);
1676 /* We have to declare the utime structure here. */
1677 struct utimbuf;
1678 typedef int (Tcl_FSUtimeProc) (Tcl_Obj *pathPtr, struct utimbuf *tval);
1679 typedef int (Tcl_FSNormalizePathProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
1680 int nextCheckpoint);
1681 typedef int (Tcl_FSFileAttrsGetProc) (Tcl_Interp *interp, int index,
1682 Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef);
1683 typedef const char *CONST86 * (Tcl_FSFileAttrStringsProc) (Tcl_Obj *pathPtr,
1684 Tcl_Obj **objPtrRef);
1685 typedef int (Tcl_FSFileAttrsSetProc) (Tcl_Interp *interp, int index,
1686 Tcl_Obj *pathPtr, Tcl_Obj *objPtr);
1687 typedef Tcl_Obj * (Tcl_FSLinkProc) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr,
1688 int linkType);
1689 typedef int (Tcl_FSLoadFileProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
1690 Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr);
1691 typedef int (Tcl_FSPathInFilesystemProc) (Tcl_Obj *pathPtr,
1692 ClientData *clientDataPtr);
1693 typedef Tcl_Obj * (Tcl_FSFilesystemPathTypeProc) (Tcl_Obj *pathPtr);
1694 typedef Tcl_Obj * (Tcl_FSFilesystemSeparatorProc) (Tcl_Obj *pathPtr);
1695 typedef void (Tcl_FSFreeInternalRepProc) (ClientData clientData);
1696 typedef ClientData (Tcl_FSDupInternalRepProc) (ClientData clientData);
1697 typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) (ClientData clientData);
1698 typedef ClientData (Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr);
1699
1700 typedef struct Tcl_FSVersion_ *Tcl_FSVersion;
1701
1702 /*
1703 *----------------------------------------------------------------------------
1704 * Data structures related to hooking into the filesystem
1705 */
1706
1707 /*
1708 * Filesystem version tag. This was introduced in 8.4.
1709 */
1710
1711 #define TCL_FILESYSTEM_VERSION_1 ((Tcl_FSVersion) 0x1)
1712
1713 /*
1714 * struct Tcl_Filesystem:
1715 *
1716 * One such structure exists for each type (kind) of filesystem. It collects
1717 * together in one place all the functions that are part of the specific
1718 * filesystem. Tcl always accesses the filesystem through one of these
1719 * structures.
1720 *
1721 * Not all entries need be non-NULL; any which are NULL are simply ignored.
1722 * However, a complete filesystem should provide all of these functions. The
1723 * explanations in the structure show the importance of each function.
1724 */
1725
1726 typedef struct Tcl_Filesystem {
1727 const char *typeName; /* The name of the filesystem. */
1728 int structureLength; /* Length of this structure, so future binary
1729 * compatibility can be assured. */
1730 Tcl_FSVersion version; /* Version of the filesystem type. */
1731 Tcl_FSPathInFilesystemProc *pathInFilesystemProc;
1732 /* Function to check whether a path is in this
1733 * filesystem. This is the most important
1734 * filesystem function. */
1735 Tcl_FSDupInternalRepProc *dupInternalRepProc;
1736 /* Function to duplicate internal fs rep. May
1737 * be NULL (but then fs is less efficient). */
1738 Tcl_FSFreeInternalRepProc *freeInternalRepProc;
1739 /* Function to free internal fs rep. Must be
1740 * implemented if internal representations
1741 * need freeing, otherwise it can be NULL. */
1742 Tcl_FSInternalToNormalizedProc *internalToNormalizedProc;
1743 /* Function to convert internal representation
1744 * to a normalized path. Only required if the
1745 * fs creates pure path objects with no
1746 * string/path representation. */
1747 Tcl_FSCreateInternalRepProc *createInternalRepProc;
1748 /* Function to create a filesystem-specific
1749 * internal representation. May be NULL if
1750 * paths have no internal representation, or
1751 * if the Tcl_FSPathInFilesystemProc for this
1752 * filesystem always immediately creates an
1753 * internal representation for paths it
1754 * accepts. */
1755 Tcl_FSNormalizePathProc *normalizePathProc;
1756 /* Function to normalize a path. Should be
1757 * implemented for all filesystems which can
1758 * have multiple string representations for
1759 * the same path object. */
1760 Tcl_FSFilesystemPathTypeProc *filesystemPathTypeProc;
1761 /* Function to determine the type of a path in
1762 * this filesystem. May be NULL. */
1763 Tcl_FSFilesystemSeparatorProc *filesystemSeparatorProc;
1764 /* Function to return the separator
1765 * character(s) for this filesystem. Must be
1766 * implemented. */
1767 Tcl_FSStatProc *statProc; /* Function to process a 'Tcl_FSStat()' call.
1768 * Must be implemented for any reasonable
1769 * filesystem. */
1770 Tcl_FSAccessProc *accessProc;
1771 /* Function to process a 'Tcl_FSAccess()'
1772 * call. Must be implemented for any
1773 * reasonable filesystem. */
1774 Tcl_FSOpenFileChannelProc *openFileChannelProc;
1775 /* Function to process a
1776 * 'Tcl_FSOpenFileChannel()' call. Must be
1777 * implemented for any reasonable
1778 * filesystem. */
1779 Tcl_FSMatchInDirectoryProc *matchInDirectoryProc;
1780 /* Function to process a
1781 * 'Tcl_FSMatchInDirectory()'. If not
1782 * implemented, then glob and recursive copy
1783 * functionality will be lacking in the
1784 * filesystem. */
1785 Tcl_FSUtimeProc *utimeProc; /* Function to process a 'Tcl_FSUtime()' call.
1786 * Required to allow setting (not reading) of
1787 * times with 'file mtime', 'file atime' and
1788 * the open-r/open-w/fcopy implementation of
1789 * 'file copy'. */
1790 Tcl_FSLinkProc *linkProc; /* Function to process a 'Tcl_FSLink()' call.
1791 * Should be implemented only if the
1792 * filesystem supports links (reading or
1793 * creating). */
1794 Tcl_FSListVolumesProc *listVolumesProc;
1795 /* Function to list any filesystem volumes
1796 * added by this filesystem. Should be
1797 * implemented only if the filesystem adds
1798 * volumes at the head of the filesystem. */
1799 Tcl_FSFileAttrStringsProc *fileAttrStringsProc;
1800 /* Function to list all attributes strings
1801 * which are valid for this filesystem. If not
1802 * implemented the filesystem will not support
1803 * the 'file attributes' command. This allows
1804 * arbitrary additional information to be
1805 * attached to files in the filesystem. */
1806 Tcl_FSFileAttrsGetProc *fileAttrsGetProc;
1807 /* Function to process a
1808 * 'Tcl_FSFileAttrsGet()' call, used by 'file
1809 * attributes'. */
1810 Tcl_FSFileAttrsSetProc *fileAttrsSetProc;
1811 /* Function to process a
1812 * 'Tcl_FSFileAttrsSet()' call, used by 'file
1813 * attributes'. */
1814 Tcl_FSCreateDirectoryProc *createDirectoryProc;
1815 /* Function to process a
1816 * 'Tcl_FSCreateDirectory()' call. Should be
1817 * implemented unless the FS is read-only. */
1818 Tcl_FSRemoveDirectoryProc *removeDirectoryProc;
1819 /* Function to process a
1820 * 'Tcl_FSRemoveDirectory()' call. Should be
1821 * implemented unless the FS is read-only. */
1822 Tcl_FSDeleteFileProc *deleteFileProc;
1823 /* Function to process a 'Tcl_FSDeleteFile()'
1824 * call. Should be implemented unless the FS
1825 * is read-only. */
1826 Tcl_FSCopyFileProc *copyFileProc;
1827 /* Function to process a 'Tcl_FSCopyFile()'
1828 * call. If not implemented Tcl will fall back
1829 * on open-r, open-w and fcopy as a copying
1830 * mechanism, for copying actions initiated in
1831 * Tcl (not C). */
1832 Tcl_FSRenameFileProc *renameFileProc;
1833 /* Function to process a 'Tcl_FSRenameFile()'
1834 * call. If not implemented, Tcl will fall
1835 * back on a copy and delete mechanism, for
1836 * rename actions initiated in Tcl (not C). */
1837 Tcl_FSCopyDirectoryProc *copyDirectoryProc;
1838 /* Function to process a
1839 * 'Tcl_FSCopyDirectory()' call. If not
1840 * implemented, Tcl will fall back on a
1841 * recursive create-dir, file copy mechanism,
1842 * for copying actions initiated in Tcl (not
1843 * C). */
1844 Tcl_FSLstatProc *lstatProc; /* Function to process a 'Tcl_FSLstat()' call.
1845 * If not implemented, Tcl will attempt to use
1846 * the 'statProc' defined above instead. */
1847 Tcl_FSLoadFileProc *loadFileProc;
1848 /* Function to process a 'Tcl_FSLoadFile()'
1849 * call. If not implemented, Tcl will fall
1850 * back on a copy to native-temp followed by a
1851 * Tcl_FSLoadFile on that temporary copy. */
1852 Tcl_FSGetCwdProc *getCwdProc;
1853 /* Function to process a 'Tcl_FSGetCwd()'
1854 * call. Most filesystems need not implement
1855 * this. It will usually only be called once,
1856 * if 'getcwd' is called before 'chdir'. May
1857 * be NULL. */
1858 Tcl_FSChdirProc *chdirProc; /* Function to process a 'Tcl_FSChdir()' call.
1859 * If filesystems do not implement this, it
1860 * will be emulated by a series of directory
1861 * access checks. Otherwise, virtual
1862 * filesystems which do implement it need only
1863 * respond with a positive return result if
1864 * the dirName is a valid directory in their
1865 * filesystem. They need not remember the
1866 * result, since that will be automatically
1867 * remembered for use by GetCwd. Real
1868 * filesystems should carry out the correct
1869 * action (i.e. call the correct system
1870 * 'chdir' api). If not implemented, then 'cd'
1871 * and 'pwd' will fail inside the
1872 * filesystem. */
1873 } Tcl_Filesystem;
1874
1875 /*
1876 * The following definitions are used as values for the 'linkAction' flag to
1877 * Tcl_FSLink, or the linkProc of any filesystem. Any combination of flags can
1878 * be given. For link creation, the linkProc should create a link which
1879 * matches any of the types given.
1880 *
1881 * TCL_CREATE_SYMBOLIC_LINK - Create a symbolic or soft link.
1882 * TCL_CREATE_HARD_LINK - Create a hard link.
1883 */
1884
1885 #define TCL_CREATE_SYMBOLIC_LINK 0x01
1886 #define TCL_CREATE_HARD_LINK 0x02
1887
1888 /*
1889 *----------------------------------------------------------------------------
1890 * The following structure represents the Notifier functions that you can
1891 * override with the Tcl_SetNotifier call.
1892 */
1893
1894 typedef struct Tcl_NotifierProcs {
1895 Tcl_SetTimerProc *setTimerProc;
1896 Tcl_WaitForEventProc *waitForEventProc;
1897 Tcl_CreateFileHandlerProc *createFileHandlerProc;
1898 Tcl_DeleteFileHandlerProc *deleteFileHandlerProc;
1899 Tcl_InitNotifierProc *initNotifierProc;
1900 Tcl_FinalizeNotifierProc *finalizeNotifierProc;
1901 Tcl_AlertNotifierProc *alertNotifierProc;
1902 Tcl_ServiceModeHookProc *serviceModeHookProc;
1903 } Tcl_NotifierProcs;
1904
1905
1906 /*
1907 *----------------------------------------------------------------------------
1908 * The following data structures and declarations are for the new Tcl parser.
1909 *
1910 * For each word of a command, and for each piece of a word such as a variable
1911 * reference, one of the following structures is created to describe the
1912 * token.
1913 */
1914
1915 typedef struct Tcl_Token {
1916 int type; /* Type of token, such as TCL_TOKEN_WORD; see
1917 * below for valid types. */
1918 const char *start; /* First character in token. */
1919 int size; /* Number of bytes in token. */
1920 int numComponents; /* If this token is composed of other tokens,
1921 * this field tells how many of them there are
1922 * (including components of components, etc.).
1923 * The component tokens immediately follow
1924 * this one. */
1925 } Tcl_Token;
1926
1927 /*
1928 * Type values defined for Tcl_Token structures. These values are defined as
1929 * mask bits so that it's easy to check for collections of types.
1930 *
1931 * TCL_TOKEN_WORD - The token describes one word of a command,
1932 * from the first non-blank character of the word
1933 * (which may be " or {) up to but not including
1934 * the space, semicolon, or bracket that
1935 * terminates the word. NumComponents counts the
1936 * total number of sub-tokens that make up the
1937 * word. This includes, for example, sub-tokens
1938 * of TCL_TOKEN_VARIABLE tokens.
1939 * TCL_TOKEN_SIMPLE_WORD - This token is just like TCL_TOKEN_WORD except
1940 * that the word is guaranteed to consist of a
1941 * single TCL_TOKEN_TEXT sub-token.
1942 * TCL_TOKEN_TEXT - The token describes a range of literal text
1943 * that is part of a word. NumComponents is
1944 * always 0.
1945 * TCL_TOKEN_BS - The token describes a backslash sequence that
1946 * must be collapsed. NumComponents is always 0.
1947 * TCL_TOKEN_COMMAND - The token describes a command whose result
1948 * must be substituted into the word. The token
1949 * includes the enclosing brackets. NumComponents
1950 * is always 0.
1951 * TCL_TOKEN_VARIABLE - The token describes a variable substitution,
1952 * including the dollar sign, variable name, and
1953 * array index (if there is one) up through the
1954 * right parentheses. NumComponents tells how
1955 * many additional tokens follow to represent the
1956 * variable name. The first token will be a
1957 * TCL_TOKEN_TEXT token that describes the
1958 * variable name. If the variable is an array
1959 * reference then there will be one or more
1960 * additional tokens, of type TCL_TOKEN_TEXT,
1961 * TCL_TOKEN_BS, TCL_TOKEN_COMMAND, and
1962 * TCL_TOKEN_VARIABLE, that describe the array
1963 * index; numComponents counts the total number
1964 * of nested tokens that make up the variable
1965 * reference, including sub-tokens of
1966 * TCL_TOKEN_VARIABLE tokens.
1967 * TCL_TOKEN_SUB_EXPR - The token describes one subexpression of an
1968 * expression, from the first non-blank character
1969 * of the subexpression up to but not including
1970 * the space, brace, or bracket that terminates
1971 * the subexpression. NumComponents counts the
1972 * total number of following subtokens that make
1973 * up the subexpression; this includes all
1974 * subtokens for any nested TCL_TOKEN_SUB_EXPR
1975 * tokens. For example, a numeric value used as a
1976 * primitive operand is described by a
1977 * TCL_TOKEN_SUB_EXPR token followed by a
1978 * TCL_TOKEN_TEXT token. A binary subexpression
1979 * is described by a TCL_TOKEN_SUB_EXPR token
1980 * followed by the TCL_TOKEN_OPERATOR token for
1981 * the operator, then TCL_TOKEN_SUB_EXPR tokens
1982 * for the left then the right operands.
1983 * TCL_TOKEN_OPERATOR - The token describes one expression operator.
1984 * An operator might be the name of a math
1985 * function such as "abs". A TCL_TOKEN_OPERATOR
1986 * token is always preceeded by one
1987 * TCL_TOKEN_SUB_EXPR token for the operator's
1988 * subexpression, and is followed by zero or more
1989 * TCL_TOKEN_SUB_EXPR tokens for the operator's
1990 * operands. NumComponents is always 0.
1991 * TCL_TOKEN_EXPAND_WORD - This token is just like TCL_TOKEN_WORD except
1992 * that it marks a word that began with the
1993 * literal character prefix "{*}". This word is
1994 * marked to be expanded - that is, broken into
1995 * words after substitution is complete.
1996 */
1997
1998 #define TCL_TOKEN_WORD 1
1999 #define TCL_TOKEN_SIMPLE_WORD 2
2000 #define TCL_TOKEN_TEXT 4
2001 #define TCL_TOKEN_BS 8
2002 #define TCL_TOKEN_COMMAND 16
2003 #define TCL_TOKEN_VARIABLE 32
2004 #define TCL_TOKEN_SUB_EXPR 64
2005 #define TCL_TOKEN_OPERATOR 128
2006 #define TCL_TOKEN_EXPAND_WORD 256
2007
2008 /*
2009 * Parsing error types. On any parsing error, one of these values will be
2010 * stored in the error field of the Tcl_Parse structure defined below.
2011 */
2012
2013 #define TCL_PARSE_SUCCESS 0
2014 #define TCL_PARSE_QUOTE_EXTRA 1
2015 #define TCL_PARSE_BRACE_EXTRA 2
2016 #define TCL_PARSE_MISSING_BRACE 3
2017 #define TCL_PARSE_MISSING_BRACKET 4
2018 #define TCL_PARSE_MISSING_PAREN 5
2019 #define TCL_PARSE_MISSING_QUOTE 6
2020 #define TCL_PARSE_MISSING_VAR_BRACE 7
2021 #define TCL_PARSE_SYNTAX 8
2022 #define TCL_PARSE_BAD_NUMBER 9
2023
2024 /*
2025 * A structure of the following type is filled in by Tcl_ParseCommand. It
2026 * describes a single command parsed from an input string.
2027 */
2028
2029 #define NUM_STATIC_TOKENS 20
2030
2031 typedef struct Tcl_Parse {
2032 const char *commentStart; /* Pointer to # that begins the first of one
2033 * or more comments preceding the command. */
2034 int commentSize; /* Number of bytes in comments (up through
2035 * newline character that terminates the last
2036 * comment). If there were no comments, this
2037 * field is 0. */
2038 const char *commandStart; /* First character in first word of
2039 * command. */
2040 int commandSize; /* Number of bytes in command, including first
2041 * character of first word, up through the
2042 * terminating newline, close bracket, or
2043 * semicolon. */
2044 int numWords; /* Total number of words in command. May be
2045 * 0. */
2046 Tcl_Token *tokenPtr; /* Pointer to first token representing the
2047 * words of the command. Initially points to
2048 * staticTokens, but may change to point to
2049 * malloc-ed space if command exceeds space in
2050 * staticTokens. */
2051 int numTokens; /* Total number of tokens in command. */
2052 int tokensAvailable; /* Total number of tokens available at
2053 * *tokenPtr. */
2054 int errorType; /* One of the parsing error types defined
2055 * above. */
2056
2057 /*
2058 * The fields below are intended only for the private use of the parser.
2059 * They should not be used by functions that invoke Tcl_ParseCommand.
2060 */
2061
2062 const char *string; /* The original command string passed to
2063 * Tcl_ParseCommand. */
2064 const char *end; /* Points to the character just after the last
2065 * one in the command string. */
2066 Tcl_Interp *interp; /* Interpreter to use for error reporting, or
2067 * NULL. */
2068 const char *term; /* Points to character in string that
2069 * terminated most recent token. Filled in by
2070 * ParseTokens. If an error occurs, points to
2071 * beginning of region where the error
2072 * occurred (e.g. the open brace if the close
2073 * brace is missing). */
2074 int incomplete; /* This field is set to 1 by Tcl_ParseCommand
2075 * if the command appears to be incomplete.
2076 * This information is used by
2077 * Tcl_CommandComplete. */
2078 Tcl_Token staticTokens[NUM_STATIC_TOKENS];
2079 /* Initial space for tokens for command. This
2080 * space should be large enough to accommodate
2081 * most commands; dynamic space is allocated
2082 * for very large commands that don't fit
2083 * here. */
2084 } Tcl_Parse;
2085
2086
2087 /*
2088 *----------------------------------------------------------------------------
2089 * The following structure represents a user-defined encoding. It collects
2090 * together all the functions that are used by the specific encoding.
2091 */
2092
2093 typedef struct Tcl_EncodingType {
2094 const char *encodingName; /* The name of the encoding, e.g. "euc-jp".
2095 * This name is the unique key for this
2096 * encoding type. */
2097 Tcl_EncodingConvertProc *toUtfProc;
2098 /* Function to convert from external encoding
2099 * into UTF-8. */
2100 Tcl_EncodingConvertProc *fromUtfProc;
2101 /* Function to convert from UTF-8 into
2102 * external encoding. */
2103 Tcl_EncodingFreeProc *freeProc;
2104 /* If non-NULL, function to call when this
2105 * encoding is deleted. */
2106 ClientData clientData; /* Arbitrary value associated with encoding
2107 * type. Passed to conversion functions. */
2108 int nullSize; /* Number of zero bytes that signify
2109 * end-of-string in this encoding. This number
2110 * is used to determine the source string
2111 * length when the srcLen argument is
2112 * negative. Must be 1 or 2. */
2113 } Tcl_EncodingType;
2114
2115 /*
2116 * The following definitions are used as values for the conversion control
2117 * flags argument when converting text from one character set to another:
2118 *
2119 * TCL_ENCODING_START - Signifies that the source buffer is the first
2120 * block in a (potentially multi-block) input
2121 * stream. Tells the conversion function to reset
2122 * to an initial state and perform any
2123 * initialization that needs to occur before the
2124 * first byte is converted. If the source buffer
2125 * contains the entire input stream to be
2126 * converted, this flag should be set.
2127 * TCL_ENCODING_END - Signifies that the source buffer is the last
2128 * block in a (potentially multi-block) input
2129 * stream. Tells the conversion routine to
2130 * perform any finalization that needs to occur
2131 * after the last byte is converted and then to
2132 * reset to an initial state. If the source
2133 * buffer contains the entire input stream to be
2134 * converted, this flag should be set.
2135 * TCL_ENCODING_STOPONERROR - If set, then the converter will return
2136 * immediately upon encountering an invalid byte
2137 * sequence or a source character that has no
2138 * mapping in the target encoding. If clear, then
2139 * the converter will skip the problem,
2140 * substituting one or more "close" characters in
2141 * the destination buffer and then continue to
2142 * convert the source.
2143 */
2144
2145 #define TCL_ENCODING_START 0x01
2146 #define TCL_ENCODING_END 0x02
2147 #define TCL_ENCODING_STOPONERROR 0x04
2148
2149 /*
2150 * The following definitions are the error codes returned by the conversion
2151 * routines:
2152 *
2153 * TCL_OK - All characters were converted.
2154 * TCL_CONVERT_NOSPACE - The output buffer would not have been large
2155 * enough for all of the converted data; as many
2156 * characters as could fit were converted though.
2157 * TCL_CONVERT_MULTIBYTE - The last few bytes in the source string were
2158 * the beginning of a multibyte sequence, but
2159 * more bytes were needed to complete this
2160 * sequence. A subsequent call to the conversion
2161 * routine should pass the beginning of this
2162 * unconverted sequence plus additional bytes
2163 * from the source stream to properly convert the
2164 * formerly split-up multibyte sequence.
2165 * TCL_CONVERT_SYNTAX - The source stream contained an invalid
2166 * character sequence. This may occur if the
2167 * input stream has been damaged or if the input
2168 * encoding method was misidentified. This error
2169 * is reported only if TCL_ENCODING_STOPONERROR
2170 * was specified.
2171 * TCL_CONVERT_UNKNOWN - The source string contained a character that
2172 * could not be represented in the target
2173 * encoding. This error is reported only if
2174 * TCL_ENCODING_STOPONERROR was specified.
2175 */
2176
2177 #define TCL_CONVERT_MULTIBYTE (-1)
2178 #define TCL_CONVERT_SYNTAX (-2)
2179 #define TCL_CONVERT_UNKNOWN (-3)
2180 #define TCL_CONVERT_NOSPACE (-4)
2181
2182 /*
2183 * The maximum number of bytes that are necessary to represent a single
2184 * Unicode character in UTF-8. The valid values should be 3, 4 or 6
2185 * (or perhaps 1 if we want to support a non-unicode enabled core). If 3 or
2186 * 4, then Tcl_UniChar must be 2-bytes in size (UCS-2) (the default). If 6,
2187 * then Tcl_UniChar must be 4-bytes in size (UCS-4). At this time UCS-2 mode
2188 * is the default and recommended mode. UCS-4 is experimental and not
2189 * recommended. It works for the core, but most extensions expect UCS-2.
2190 */
2191
2192 #ifndef TCL_UTF_MAX
2193 #define TCL_UTF_MAX 3
2194 #endif
2195
2196 /*
2197 * This represents a Unicode character. Any changes to this should also be
2198 * reflected in regcustom.h.
2199 */
2200
2201 #if TCL_UTF_MAX > 4
2202 /*
2203 * unsigned int isn't 100% accurate as it should be a strict 4-byte value
2204 * (perhaps wchar_t). 64-bit systems may have troubles. The size of this
2205 * value must be reflected correctly in regcustom.h and
2206 * in tclEncoding.c.
2207 * XXX: Tcl is currently UCS-2 and planning UTF-16 for the Unicode
2208 * XXX: string rep that Tcl_UniChar represents. Changing the size
2209 * XXX: of Tcl_UniChar is /not/ supported.
2210 */
2211 typedef unsigned int Tcl_UniChar;
2212 #else
2213 typedef unsigned short Tcl_UniChar;
2214 #endif
2215
2216
2217 /*
2218 *----------------------------------------------------------------------------
2219 * TIP #59: The following structure is used in calls 'Tcl_RegisterConfig' to
2220 * provide the system with the embedded configuration data.
2221 */
2222
2223 typedef struct Tcl_Config {
2224 const char *key; /* Configuration key to register. ASCII
2225 * encoded, thus UTF-8. */
2226 const char *value; /* The value associated with the key. System
2227 * encoding. */
2228 } Tcl_Config;
2229
2230 /*
2231 *----------------------------------------------------------------------------
2232 * Flags for TIP#143 limits, detailing which limits are active in an
2233 * interpreter. Used for Tcl_{Add,Remove}LimitHandler type argument.
2234 */
2235
2236 #define TCL_LIMIT_COMMANDS 0x01
2237 #define TCL_LIMIT_TIME 0x02
2238
2239 /*
2240 * Structure containing information about a limit handler to be called when a
2241 * command- or time-limit is exceeded by an interpreter.
2242 */
2243
2244 typedef void (Tcl_LimitHandlerProc) (ClientData clientData, Tcl_Interp *interp);
2245 typedef void (Tcl_LimitHandlerDeleteProc) (ClientData clientData);
2246
2247 /*
2248 *----------------------------------------------------------------------------
2249 * Override definitions for libtommath.
2250 */
2251
2252 typedef struct mp_int mp_int;
2253 #define MP_INT_DECLARED
2254 typedef unsigned int mp_digit;
2255 #define MP_DIGIT_DECLARED
2256
2257 /*
2258 *----------------------------------------------------------------------------
2259 * Definitions needed for Tcl_ParseArgvObj routines.
2260 * Based on tkArgv.c.
2261 * Modifications from the original are copyright (c) Sam Bromley 2006
2262 */
2263
2264 typedef struct {
2265 int type; /* Indicates the option type; see below. */
2266 const char *keyStr; /* The key string that flags the option in the
2267 * argv array. */
2268 void *srcPtr; /* Value to be used in setting dst; usage
2269 * depends on type.*/
2270 void *dstPtr; /* Address of value to be modified; usage
2271 * depends on type.*/
2272 const char *helpStr; /* Documentation message describing this
2273 * option. */
2274 ClientData clientData; /* Word to pass to function callbacks. */
2275 } Tcl_ArgvInfo;
2276
2277 /*
2278 * Legal values for the type field of a Tcl_ArgInfo: see the user
2279 * documentation for details.
2280 */
2281
2282 #define TCL_ARGV_CONSTANT 15
2283 #define TCL_ARGV_INT 16
2284 #define TCL_ARGV_STRING 17
2285 #define TCL_ARGV_REST 18
2286 #define TCL_ARGV_FLOAT 19
2287 #define TCL_ARGV_FUNC 20
2288 #define TCL_ARGV_GENFUNC 21
2289 #define TCL_ARGV_HELP 22
2290 #define TCL_ARGV_END 23
2291
2292 /*
2293 * Types of callback functions for the TCL_ARGV_FUNC and TCL_ARGV_GENFUNC
2294 * argument types:
2295 */
2296
2297 typedef int (Tcl_ArgvFuncProc)(ClientData clientData, Tcl_Obj *objPtr,
2298 void *dstPtr);
2299 typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp,
2300 int objc, Tcl_Obj *const *objv, void *dstPtr);
2301
2302 /*
2303 * Shorthand for commonly used argTable entries.
2304 */
2305
2306 #define TCL_ARGV_AUTO_HELP \
2307 {TCL_ARGV_HELP, "-help", NULL, NULL, \
2308 "Print summary of command-line options and abort", NULL}
2309 #define TCL_ARGV_AUTO_REST \
2310 {TCL_ARGV_REST, "--", NULL, NULL, \
2311 "Marks the end of the options", NULL}
2312 #define TCL_ARGV_TABLE_END \
2313 {TCL_ARGV_END, NULL, NULL, NULL, NULL, NULL}
2314
2315 /*
2316 *----------------------------------------------------------------------------
2317 * Definitions needed for Tcl_Zlib routines. [TIP #234]
2318 *
2319 * Constants for the format flags describing what sort of data format is
2320 * desired/expected for the Tcl_ZlibDeflate, Tcl_ZlibInflate and
2321 * Tcl_ZlibStreamInit functions.
2322 */
2323
2324 #define TCL_ZLIB_FORMAT_RAW 1
2325 #define TCL_ZLIB_FORMAT_ZLIB 2
2326 #define TCL_ZLIB_FORMAT_GZIP 4
2327 #define TCL_ZLIB_FORMAT_AUTO 8
2328
2329 /*
2330 * Constants that describe whether the stream is to operate in compressing or
2331 * decompressing mode.
2332 */
2333
2334 #define TCL_ZLIB_STREAM_DEFLATE 16
2335 #define TCL_ZLIB_STREAM_INFLATE 32
2336
2337 /*
2338 * Constants giving compression levels. Use of TCL_ZLIB_COMPRESS_DEFAULT is
2339 * recommended.
2340 */
2341
2342 #define TCL_ZLIB_COMPRESS_NONE 0
2343 #define TCL_ZLIB_COMPRESS_FAST 1
2344 #define TCL_ZLIB_COMPRESS_BEST 9
2345 #define TCL_ZLIB_COMPRESS_DEFAULT (-1)
2346
2347 /*
2348 * Constants for types of flushing, used with Tcl_ZlibFlush.
2349 */
2350
2351 #define TCL_ZLIB_NO_FLUSH 0
2352 #define TCL_ZLIB_FLUSH 2
2353 #define TCL_ZLIB_FULLFLUSH 3
2354 #define ----------------------------------------------------------------------------
2355 * The following declarations either map ckalloc and ckfree to malloc and
2356 * free, or they map them to functions with all sorts of debugging hooks
2357 * defined in tclCkalloc.c.
2358 */
2359
2360 #ifdef TCL_MEM_DEBUG
2361
2362 # voidine ckalloc(x) \
2363 ((VOID *) Tcl_DbCkalloc((unsigned)(x), __FILE__, __LINE__))
2364 # define ckfree(x) \
2365 Tcl_DbCkfree((char *)(x), __FILE__, __LINE__)
2366 # defvoid *) Tcl_DbCkrealloc((char *)(x), (unsigned)(y), __FILE__, __LINE__))
2367 # definevoid *) Tcl_AttemptDbCkalloc((unsigned)(x), __FILE__, __LINE__))
2368 # define attvoidckrealloc(x,y) \
2369 ((VOID *) Tcl_AttemptDbCkrealloc((char *)(x), (unsigned)(y), __FILE__, __LINE__))
2370
2371 #else /* !TCL_MEM_DEBUG */
2372
2373 /*
2374 * If we are not using the debugging allocator, we should call the Tcl_Alloc,
2375 * et al. routines in order to guarantee that every module is using the same
2376 * memory allocator both inside and outside ovoid)()))
2377 EXTERN void Tcl_MainEx(int argc, char **argv,
2378 Tcl_AppInitProc *appInitPrvoid const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp,
2379 const char *versionvoidvel) 2 LOC
2380 * macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC
2381 * macos/*
2382 se to access fields of hash entries:
2383 */
2384
2385 #define Tcl_GetHashValue(h) ((h)->clientData)
2386 #define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
2387 #define Tcl_GetHashKey(tablePtr, h) \
2388 ((void *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS || \
2389 (tablePtr)->keyType == TCL_CUSTOM_PTR_KEYS) \
2390 ? (h)->key.oneWordValue \
2391 : (h)->key.string))
2392
2393 /*
2394 * Macros to use for clients to use to invoke find and create functions for
2395 * hash tables:
2396 */
2397
2398 #undef Tcl_FindHashEntry
2399 #define Tcl_FindHashEntry(tablePtr, key) \
2400 (*((tablePtr)->findProc))(tablePtr, (const char *)(key))
2401 #undef Tcl_CreateHashEntry
2402 #define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
2403 (*((tablePtr)->createProc))(tablePtr, (const char *)(key), newPtr)
2404
2405 /*
2406 *----------------------------------------------------------------------------
2407 * Macros that eliminate the overhead of the thread synchronization functions
2408 * when c
--- a/compat/tcl-8.6/generic/tclDecls.h
+++ b/compat/tcl-8.6/generic/tclDecls.h
@@ -0,0 +1,1787 @@
1
+/*
2
+ * tclDecls.h --
3
+ *
4
+ * Declarations of functions in the platform independent public Tcl API.
5
+ *
6
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
7
+ *
8
+ * See the file "license.terms" for information on usage and redistribution
9
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10
+ */
11
+
12
+#ifndef _TCLDECLS
13
+#define _TCLDECLS
14
+
15
+#undef TCL_STORAGE_CLASS
16
+#ifdef BUILD_tcl
17
+# define TCL_STORAGE_CLASS DLLEXPORT
18
+#else
19
+# ifdef USE_TCL_STUBS
20
+# define TCL_STORAGE_CLASS
21
+# else
22
+# define TCL_STORAGE_CLASS DLLIMPORT
23
+# endif
24
+#endif
25
+
26
+/*
27
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
28
+ * script. Any modifications to the function declarations below should be made
29
+ * in the generic/tcl.decls script.
30
+ */
31
+
32
+/* !BEGIN!: Do not edit below this line. */
33
+
34
+/*
35
+ * Exported function declarations:
36
+ */
37
+
38
+/* 0 */
39
+EXTERN int Tcl_PkgProvideEx(Tcl_Interp *interp,
40
+ const char *name, const char *version,
41
+ const void *clientData);
42
+/* 1 */
43
+EXTERN CONST84_RETURN char * Tcl_PkgRequireEx(Tcl_Interp *interp,
44
+ const char *name, const char *version,
45
+ int exact, void *clientDataPtr);
46
+/* 2 */
47
+EXTERN void Tcl_Panic(const char *format, ...) TCL_FORMAT_PRINTF(1, 2);
48
+/* 3 */
49
+EXTERN char * Tcl_Alloc(unsigned int size);
50
+/* 4 */
51
+EXTERN void Tcl_Free(char *ptr);
52
+/* 5 */
53
+EXTERN char * Tcl_Realloc(char *ptr, unsigned int size);
54
+/* 6 */
55
+EXTERN char * Tcl_DbCkalloc(unsigned int size, const char *file,
56
+ int line);
57
+/* 7 */
58
+EXTERN void Tcl_DbCkfree(char *ptr, const char *file, int line);
59
+/* 8 */
60
+EXTERN char * Tcl_DbCkrealloc(char *ptr, unsigned int size,
61
+ const char *file, int line);
62
+#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
63
+/* 9 */
64
+EXTERN void Tcl_CreateFileHandler(int fd, int mask,
65
+ Tcl_FileProc *proc, ClientData clientData);
66
+#endif /* UNIX */
67
+#ifdef MAC_OSX_TCL /* MACOSX */
68
+/* 9 */
69
+EXTERN void Tcl_CreateFileHandler(int fd, int mask,
70
+ Tcl_FileProc *proc, ClientData clientData);
71
+#endif /* MACOSX */
72
+#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
73
+/* 10 */
74
+EXTERN void Tcl_DeleteFileHandler(int fd);
75
+#endif /* UNIX */
76
+#ifdef MAC_OSX_TCL /* MACOSX */
77
+/* 10 */
78
+EXTERN void Tcl_DeleteFileHandler(int fd);
79
+#endif /* MACOSX */
80
+/* 11 */
81
+EXTERN void Tcl_SetTimer(const Tcl_Time *timePtr);
82
+/* 12 */
83
+EXTERN void Tcl_Sleep(int ms);
84
+/* 13 */
85
+EXTERN int Tcl_WaitForEvent(const Tcl_Time *timePtr);
86
+/* 14 */
87
+EXTERN int Tcl_AppendAllObjTypes(Tcl_Interp *interp,
88
+ Tcl_Obj *objPtr);
89
+/* 15 */
90
+EXTERN void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...);
91
+/* 16 */
92
+EXTERN void Tcl_AppendToObj(Tcl_Obj *objPtr, const char *bytes,
93
+ int length);
94
+/* 17 */
95
+EXTERN Tcl_Obj * Tcl_ConcatObj(int objc, Tcl_Obj *const objv[]);
96
+/* 18 */
97
+EXTERN int Tcl_ConvertToType(Tcl_Interp *interp,
98
+ Tcl_Obj *objPtr, const Tcl_ObjType *typePtr);
99
+/* 19 */
100
+EXTERN void Tcl_DbDecrRefCount(Tcl_Obj *objPtr, const char *file,
101
+ int line);
102
+/* 20 */
103
+EXTERN void Tcl_DbIncrRefCount(Tcl_Obj *objPtr, const char *file,
104
+ int line);
105
+/* 21 */
106
+EXTERN int Tcl_DbIsShared(Tcl_Obj *objPtr, const char *file,
107
+ int line);
108
+/* 22 */
109
+EXTERN Tcl_Obj * Tcl_DbNewBooleanObj(int boolValue, const char *file,
110
+ int line);
111
+/* 23 */
112
+EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj(const unsigned char *bytes,
113
+ int length, const char *file, int line);
114
+/* 24 */
115
+EXTERN Tcl_Obj * Tcl_DbNewDoubleObj(double doubleValue,
116
+ const char *file, int line);
117
+/* 25 */
118
+EXTERN Tcl_Obj * Tcl_DbNewListObj(int objc, Tcl_Obj *const *objv,
119
+ const char *file, int line);
120
+/* 26 */
121
+EXTERN Tcl_Obj * Tcl_DbNewLongObj(long longValue, const char *file,
122
+ int line);
123
+/* 27 */
124
+EXTERN Tcl_Obj * Tcl_DbNewObj(const char *file, int line);
125
+/* 28 */
126
+EXTERN Tcl_Obj * Tcl_DbNewStringObj(const char *bytes, int length,
127
+ const char *file, int line);
128
+/* 29 */
129
+EXTERN Tcl_Obj * Tcl_DuplicateObj(Tcl_Obj *objPtr);
130
+/* 30 */
131
+EXTERN void TclFreeObj(Tcl_Obj *objPtr);
132
+/* 31 */
133
+EXTERN int Tcl_GetBoolean(Tcl_Interp *interp, const char *src,
134
+ int *boolPtr);
135
+/* 32 */
136
+EXTERN int Tcl_GetBooleanFromObj(Tcl_Interp *interp,
137
+ Tcl_Obj *objPtr, int *boolPtr);
138
+/* 33 */
139
+EXTERN unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr,
140
+ int *lengthPtr);
141
+/* 34 */
142
+EXTERN int Tcl_GetDouble(Tcl_Interp *interp, const char *src,
143
+ double *doublePtr);
144
+/* 35 */
145
+EXTERN int Tcl_GetDoubleFromObj(Tcl_Interp *interp,
146
+ Tcl_Obj *objPtr, double *doublePtr);
147
+/* 36 */
148
+EXTERN int Tcl_GetIndexFromObj(Tcl_Interp *interp,
149
+ Tcl_Obj *objPtr,
150
+ CONST84 char *const *tablePtr,
151
+ const char *msg, int flags, int *indexPtr);
152
+/* 37 */
153
+EXTERN int Tcl_GetInt(Tcl_Interp *interp, const char *src,
154
+ int *intPtr);
155
+/* 38 */
156
+EXTERN int Tcl_GetIntFromObj(Tcl_Interp *interp,
157
+ Tcl_Obj *objPtr, int *intPtr);
158
+/* 39 */
159
+EXTERN int Tcl_GetLongFromObj(Tcl_Interp *interp,
160
+ Tcl_Obj *objPtr, long *longPtr);
161
+/* 40 */
162
+EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType(const char *typeName);
163
+/* 41 */
164
+EXTERN char * Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr);
165
+/* 42 */
166
+EXTERN void Tcl_InvalidateStringRep(Tcl_Obj *objPtr);
167
+/* 43 */
168
+EXTERN int Tcl_ListObjAppendList(Tcl_Interp *interp,
169
+ Tcl_Obj *listPtr, Tcl_Obj *elemListPtr);
170
+/* 44 */
171
+EXTERN int Tcl_ListObjAppendElement(Tcl_Interp *interp,
172
+ Tcl_Obj *listPtr, Tcl_Obj *objPtr);
173
+/* 45 */
174
+EXTERN int Tcl_ListObjGetElements(Tcl_Interp *interp,
175
+ Tcl_Obj *listPtr, int *objcPtr,
176
+ Tcl_Obj ***objvPtr);
177
+/* 46 */
178
+EXTERN int Tcl_ListObjIndex(Tcl_Interp *interp,
179
+ Tcl_Obj *listPtr, int index,
180
+ Tcl_Obj **objPtrPtr);
181
+/* 47 */
182
+EXTERN int Tcl_ListObjLength(Tcl_Interp *interp,
183
+ Tcl_Obj *listPtr, int *lengthPtr);
184
+/* 48 */
185
+EXTERN int Tcl_ListObjReplace(Tcl_Interp *interp,
186
+ Tcl_Obj *listPtr, int first, int count,
187
+ int objc, Tcl_Obj *const objv[]);
188
+/* 49 */
189
+EXTERN Tcl_Obj * Tcl_NewBooleanObj(int boolValue);
190
+/* 50 */
191
+EXTERN Tcl_Obj * Tcl_NewByteArrayObj(const unsigned char *bytes,
192
+ int length);
193
+/* 51 */
194
+EXTERN Tcl_Obj * Tcl_NewDoubleObj(double doubleValue);
195
+/* 52 */
196
+EXTERN Tcl_Obj * Tcl_NewIntObj(int intValue);
197
+/* 53 */
198
+EXTERN Tcl_Obj * Tcl_NewListObj(int objc, Tcl_Obj *const objv[]);
199
+/* 54 */
200
+EXTERN Tcl_Obj * Tcl_NewLongObj(long longValue);
201
+/* 55 */
202
+EXTERN Tcl_Obj * Tcl_NewObj(void);
203
+/* 56 */
204
+EXTERN Tcl_Obj * Tcl_NewStringObj(const char *bytes, int length);
205
+/* 57 */
206
+EXTERN void Tcl_SetBooleanObj(Tcl_Obj *objPtr, int boolValue);
207
+/* 58 */
208
+EXTERN unsigned char * Tcl_SetByteArrayLength(Tcl_Obj *objPtr, int length);
209
+/* 59 */
210
+EXTERN void Tcl_SetByteArrayObj(Tcl_Obj *objPtr,
211
+ const unsigned char *bytes, int length);
212
+/* 60 */
213
+EXTERN void Tcl_SetDoubleObj(Tcl_Obj *objPtr, double doubleValue);
214
+/* 61 */
215
+EXTERN void Tcl_SetIntObj(Tcl_Obj *objPtr, int intValue);
216
+/* 62 */
217
+EXTERN void Tcl_SetListObj(Tcl_Obj *objPtr, int objc,
218
+ Tcl_Obj *const objv[]);
219
+/* 63 */
220
+EXTERN void Tcl_SetLongObj(Tcl_Obj *objPtr, long longValue);
221
+/* 64 */
222
+EXTERN void Tcl_SetObjLength(Tcl_Obj *objPtr, int length);
223
+/* 65 */
224
+EXTERN void Tcl_SetStringObj(Tcl_Obj *objPtr, const char *bytes,
225
+ int length);
226
+/* 66 */
227
+EXTERN void Tcl_AddErrorInfo(Tcl_Interp *interp,
228
+ const char *message);
229
+/* 67 */
230
+EXTERN void Tcl_AddObjErrorInfo(Tcl_Interp *interp,
231
+ const char *message, int length);
232
+/* 68 */
233
+EXTERN void Tcl_AllowExceptions(Tcl_Interp *interp);
234
+/* 69 */
235
+EXTERN void Tcl_AppendElement(Tcl_Interp *interp,
236
+ const char *element);
237
+/* 70 */
238
+EXTERN void Tcl_AppendResult(Tcl_Interp *interp, ...);
239
+/* 71 */
240
+EXTERN Tcl_AsyncHandler Tcl_AsyncCreate(Tcl_AsyncProc *proc,
241
+ ClientData clientData);
242
+/* 72 */
243
+EXTERN void Tcl_AsyncDelete(Tcl_AsyncHandler async);
244
+/* 73 */
245
+EXTERN int Tcl_AsyncInvoke(Tcl_Interp *interp, int code);
246
+/* 74 */
247
+EXTERN void Tcl_AsyncMark(Tcl_AsyncHandler async);
248
+/* 75 */
249
+EXTERN int Tcl_AsyncReady(void);
250
+/* 76 */
251
+EXTERN void Tcl_BackgroundError(Tcl_Interp *interp);
252
+/* 77 */
253
+EXTERN char Tcl_Backslash(const char *src, int *readPtr);
254
+/* 78 */
255
+EXTERN int Tcl_BadChannelOption(Tcl_Interp *interp,
256
+ const char *optionName,
257
+ const char *optionList);
258
+/* 79 */
259
+EXTERN void Tcl_CallWhenDeleted(Tcl_Interp *interp,
260
+ Tcl_InterpDeleteProc *proc,
261
+ ClientData clientData);
262
+/* 80 */
263
+EXTERN void Tcl_CancelIdleCall(Tcl_IdleProc *idleProc,
264
+ ClientData clientData);
265
+/* 81 */
266
+EXTERN int Tcl_Close(Tcl_Interp *interp, Tcl_Channel chan);
267
+/* 82 */
268
+EXTERN int Tcl_CommandComplete(const char *cmd);
269
+/* 83 */
270
+EXTERN char * Tcl_Concat(int argc, CONST84 char *const *argv);
271
+/* 84 */
272
+EXTERN int Tcl_ConvertElement(const char *src, char *dst,
273
+ int flags);
274
+/* 85 */
275
+EXTERN int Tcl_ConvertCountedElement(const char *src,
276
+ int length, char *dst, int flags);
277
+/* 86 */
278
+EXTERN int Tcl_CreateAlias(Tcl_Interp *slave,
279
+ const char *slaveCmd, Tcl_Interp *target,
280
+ const char *targetCmd, int argc,
281
+ CONST84 char *const *argv);
282
+/* 87 */
283
+EXTERN int Tcl_CreateAliasObj(Tcl_Interp *slave,
284
+ const char *slaveCmd, Tcl_Interp *target,
285
+ const char *targetCmd, int objc,
286
+ Tcl_Obj *const objv[]);
287
+/* 88 */
288
+EXTERN Tcl_Channel Tcl_CreateChannel(const Tcl_ChannelType *typePtr,
289
+ const char *chanName,
290
+ ClientData instanceData, int mask);
291
+/* 89 */
292
+EXTERN void Tcl_CreateChannelHandler(Tcl_Channel chan, int mask,
293
+ Tcl_ChannelProc *proc, ClientData clientData);
294
+/* 90 */
295
+EXTERN void Tcl_CreateCloseHandler(Tcl_Channel chan,
296
+ Tcl_CloseProc *proc, ClientData clientData);
297
+/* 91 */
298
+EXTERN Tcl_Command Tcl_CreateCommand(Tcl_Interp *interp,
299
+ const char *cmdName, Tcl_CmdProc *proc,
300
+ ClientData clientData,
301
+ Tcl_CmdDeleteProc *deleteProc);
302
+/* 92 */
303
+EXTERN void Tcl_CreateEventSource(Tcl_EventSetupProc *setupProc,
304
+ Tcl_EventCheckProc *checkProc,
305
+ ClientData clientData);
306
+/* 93 */
307
+EXTERN void Tcl_CreateExitHandler(Tcl_ExitProc *proc,
308
+ ClientData clientData);
309
+/* 94 */
310
+EXTERN Tcl_Interp * Tcl_CreateInterp(void);
311
+/* 95 */
312
+EXTERN void Tcl_CreateMathFunc(Tcl_Interp *interp,
313
+ const char *name, int numArgs,
314
+ Tcl_ValueType *argTypes, Tcl_MathProc *proc,
315
+ ClientData clientData);
316
+/* 96 */
317
+EXTERN Tcl_Command Tcl_CreateObjCommand(Tcl_Interp *interp,
318
+ const char *cmdName, Tcl_ObjCmdProc *proc,
319
+ ClientData clientData,
320
+ Tcl_CmdDeleteProc *deleteProc);
321
+/* 97 */
322
+EXTERN Tcl_Interp * Tcl_CreateSlave(Tcl_Interp *interp,
323
+ const char *slaveName, int isSafe);
324
+/* 98 */
325
+EXTERN Tcl_TimerToken Tcl_CreateTimerHandler(int milliseconds,
326
+ Tcl_TimerProc *proc, ClientData clientData);
327
+/* 99 */
328
+EXTERN Tcl_Trace Tcl_CreateTrace(Tcl_Interp *interp, int level,
329
+ Tcl_CmdTraceProc *proc,
330
+ ClientData clientData);
331
+/* 100 */
332
+EXTERN void Tcl_DeleteAssocData(Tcl_Interp *interp,
333
+ const char *name);
334
+/* 101 */
335
+EXTERN void Tcl_DeleteChannelHandler(Tcl_Channel chan,
336
+ Tcl_ChannelProc *proc, ClientData clientData);
337
+/* 102 */
338
+EXTERN void Tcl_DeleteCloseHandler(Tcl_Channel chan,
339
+ Tcl_CloseProc *proc, ClientData clientData);
340
+/* 103 */
341
+EXTERN int Tcl_DeleteCommand(Tcl_Interp *interp,
342
+ const char *cmdName);
343
+/* 104 */
344
+EXTERN int Tcl_DeleteCommandFromToken(Tcl_Interp *interp,
345
+ Tcl_Command command);
346
+/* 105 */
347
+EXTERN void Tcl_DeleteEvents(Tcl_EventDeleteProc *proc,
348
+ ClientData clientData);
349
+/* 106 */
350
+EXTERN void Tcl_DeleteEventSource(Tcl_EventSetupProc *setupProc,
351
+ Tcl_EventCheckProc *checkProc,
352
+ ClientData clientData);
353
+/* 107 */
354
+EXTERN void Tcl_DeleteExitHandler(Tcl_ExitProc *proc,
355
+ ClientData clientData);
356
+/* 108 */
357
+EXTERN void Tcl_DeleteHashEntry(Tcl_HashEntry *entryPtr);
358
+/* 109 */
359
+EXTERN void Tcl_DeleteHashTable(Tcl_HashTable *tablePtr);
360
+/* 110 */
361
+EXTERN void Tcl_DeleteInterp(Tcl_Interp *interp);
362
+/* 111 */
363
+EXTERN void Tcl_DetachPids(int numPids, Tcl_Pid *pidPtr);
364
+/* 112 */
365
+EXTERN void Tcl_DeleteTimerHandler(Tcl_TimerToken token);
366
+/* 113 */
367
+EXTERN void Tcl_DeleteTrace(Tcl_Interp *interp, Tcl_Trace trace);
368
+/* 114 */
369
+EXTERN void Tcl_DontCallWhenDeleted(Tcl_Interp *interp,
370
+ Tcl_InterpDeleteProc *proc,
371
+ ClientData clientData);
372
+/* 115 */
373
+EXTERN int Tcl_DoOneEvent(int flags);
374
+/* 116 */
375
+EXTERN void Tcl_DoWhenIdle(Tcl_IdleProc *proc,
376
+ ClientData clientData);
377
+/* 117 */
378
+EXTERN char * Tcl_DStringAppend(Tcl_DString *dsPtr,
379
+ const char *bytes, int length);
380
+/* 118 */
381
+EXTERN char * Tcl_DStringAppendElement(Tcl_DString *dsPtr,
382
+ const char *element);
383
+/* 119 */
384
+EXTERN void Tcl_DStringEndSublist(Tcl_DString *dsPtr);
385
+/* 120 */
386
+EXTERN void Tcl_DStringFree(Tcl_DString *dsPtr);
387
+/* 121 */
388
+EXTERN void Tcl_DStringGetResult(Tcl_Interp *interp,
389
+ Tcl_DString *dsPtr);
390
+/* 122 */
391
+EXTERN void Tcl_DStringInit(Tcl_DString *dsPtr);
392
+/* 123 */
393
+EXTERN void Tcl_DStringResult(Tcl_Interp *interp,
394
+ Tcl_DString *dsPtr);
395
+/* 124 */
396
+EXTERN void Tcl_DStringSetLength(Tcl_DString *dsPtr, int length);
397
+/* 125 */
398
+EXTERN void Tcl_DStringStartSublist(Tcl_DString *dsPtr);
399
+/* 126 */
400
+EXTERN int Tcl_Eof(Tcl_Channel chan);
401
+/* 127 */
402
+EXTERN CONST84_RETURN char * Tcl_ErrnoId(void);
403
+/* 128 */
404
+EXTERN CONST84_RETURN char * Tcl_ErrnoMsg(int err);
405
+/* 129 */
406
+EXTERN int Tcl_Eval(Tcl_Interp *interp, const char *script);
407
+/* 130 */
408
+EXTERN int Tcl_EvalFile(Tcl_Interp *interp,
409
+ const char *fileName);
410
+/* 131 */
411
+EXTERN int Tcl_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr);
412
+/* 132 */
413
+EXTERN void Tcl_EventuallyFree(ClientData clientData,
414
+ Tcl_FreeProc *freeProc);
415
+/* 133 */
416
+EXTERN void Tcl_Exit(int status);
417
+/* 134 */
418
+EXTERN int Tcl_ExposeCommand(Tcl_Interp *interp,
419
+ const char *hiddenCmdToken,
420
+ const char *cmdName);
421
+/* 135 */
422
+EXTERN int Tcl_ExprBoolean(Tcl_Interp *interp, const char *expr,
423
+ int *ptr);
424
+/* 136 */
425
+EXTERN int Tcl_ExprBooleanObj(Tcl_Interp *interp,
426
+ Tcl_Obj *objPtr, int *ptr);
427
+/* 137 */
428
+EXTERN int Tcl_ExprDouble(Tcl_Interp *interp, const char *expr,
429
+ double *ptr);
430
+/* 138 */
431
+EXTERN int Tcl_ExprDoubleObj(Tcl_Interp *interp,
432
+ Tcl_Obj *objPtr, double *ptr);
433
+/* 139 */
434
+EXTERN int Tcl_ExprLong(Tcl_Interp *interp, const char *expr,
435
+ long *ptr);
436
+/* 140 */
437
+EXTERN int Tcl_ExprLongObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
438
+ long *ptr);
439
+/* 141 */
440
+EXTERN int Tcl_ExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
441
+ Tcl_Obj **resultPtrPtr);
442
+/* 142 */
443
+EXTERN int Tcl_ExprString(Tcl_Interp *interp, const char *expr);
444
+/* 143 */
445
+EXTERN void Tcl_Finalize(void);
446
+/* 144 */
447
+EXTERN void Tcl_FindExecutable(const char *argv0);
448
+/* 145 */
449
+EXTERN Tcl_HashEntry * Tcl_FirstHashEntry(Tcl_HashTable *tablePtr,
450
+ Tcl_HashSearch *searchPtr);
451
+/* 146 */
452
+EXTERN int Tcl_Flush(Tcl_Channel chan);
453
+/* 147 */
454
+EXTERN void Tcl_FreeResult(Tcl_Interp *interp);
455
+/* 148 */
456
+EXTERN int Tcl_GetAlias(Tcl_Interp *interp,
457
+ const char *slaveCmd,
458
+ Tcl_Interp **targetInterpPtr,
459
+ CONST84 char **targetCmdPtr, int *argcPtr,
460
+ CONST84 char ***argvPtr);
461
+/* 149 */
462
+EXTERN int Tcl_GetAliasObj(Tcl_Interp *interp,
463
+ const char *slaveCmd,
464
+ Tcl_Interp **targetInterpPtr,
465
+ CONST84 char **targetCmdPtr, int *objcPtr,
466
+ Tcl_Obj ***objv);
467
+/* 150 */
468
+EXTERN ClientData Tcl_GetAssocData(Tcl_Interp *interp,
469
+ const char *name,
470
+ Tcl_InterpDeleteProc **procPtr);
471
+/* 151 */
472
+EXTERN Tcl_Channel Tcl_GetChannel(Tcl_Interp *interp,
473
+ const char *chanName, int *modePtr);
474
+/* 152 */
475
+EXTERN int Tcl_GetChannelBufferSize(Tcl_Channel chan);
476
+/* 153 */
477
+EXTERN int Tcl_GetChannelHandle(Tcl_Channel chan, int direction,
478
+ ClientData *handlePtr);
479
+/* 154 */
480
+EXTERN ClientData Tcl_GetChannelInstanceData(Tcl_Channel chan);
481
+/* 155 */
482
+EXTERN int Tcl_GetChannelMode(Tcl_Channel chan);
483
+/* 156 */
484
+EXTERN CONST84_RETURN char * Tcl_GetChannelName(Tcl_Channel chan);
485
+/* 157 */
486
+EXTERN int Tcl_GetChannelOption(Tcl_Interp *interp,
487
+ Tcl_Channel chan, const char *optionName,
488
+ Tcl_DString *dsPtr);
489
+/* 158 */
490
+EXTERN CONST86 Tcl_ChannelType * Tcl_GetChannelType(Tcl_Channel chan);
491
+/* 159 */
492
+EXTERN int Tcl_GetCommandInfo(Tcl_Interp *interp,
493
+ const char *cmdName, Tcl_CmdInfo *infoPtr);
494
+/* 160 */
495
+EXTERN CONST84_RETURN char * Tcl_GetCommandName(Tcl_Interp *interp,
496
+ Tcl_Command command);
497
+/* 161 */
498
+EXTERN int Tcl_GetErrno(void);
499
+/* 162 */
500
+EXTERN CONST84_RETURN char * Tcl_GetHostName(void);
501
+/* 163 */
502
+EXTERN int Tcl_GetInterpPath(Tcl_Interp *askInterp,
503
+ Tcl_Interp *slaveInterp);
504
+/* 164 */
505
+EXTERN Tcl_Interp * Tcl_GetMaster(Tcl_Interp *interp);
506
+/* 165 */
507
+EXTERN const char * Tcl_GetNameOfExecutable(void);
508
+/* 166 */
509
+EXTERN Tcl_Obj * Tcl_GetObjResult(Tcl_Interp *interp);
510
+#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
511
+/* 167 */
512
+EXTERN int Tcl_GetOpenFile(Tcl_Interp *interp,
513
+ const char *chanID, int forWriting,
514
+ int checkUsage, ClientData *filePtr);
515
+#endif /* UNIX */
516
+#ifdef MAC_OSX_TCL /* MACOSX */
517
+/* 167 */
518
+EXTERN int Tcl_GetOpenFile(Tcl_Interp *interp,
519
+ const char *chanID, int forWriting,
520
+ int checkUsage, ClientData *filePtr);
521
+#endif /* MACOSX */
522
+/* 168 */
523
+EXTERN Tcl_PathType Tcl_GetPathType(const char *path);
524
+/* 169 */
525
+EXTERN int Tcl_Gets(Tcl_Channel chan, Tcl_DString *dsPtr);
526
+/* 170 */
527
+EXTERN int Tcl_GetsObj(Tcl_Channel chan, Tcl_Obj *objPtr);
528
+/* 171 */
529
+EXTERN int Tcl_GetServiceMode(void);
530
+/* 172 */
531
+EXTERN Tcl_Interp * Tcl_GetSlave(Tcl_Interp *interp,
532
+ const char *slaveName);
533
+/* 173 */
534
+EXTERN Tcl_Channel Tcl_GetStdChannel(int type);
535
+/* 174 */
536
+EXTERN CONST84_RETURN char * Tcl_GetStringResult(Tcl_Interp *interp);
537
+/* 175 */
538
+EXTERN CONST84_RETURN char * Tcl_GetVar(Tcl_Interp *interp,
539
+ const char *varName, int flags);
540
+/* 176 */
541
+EXTERN CONST84_RETURN char * Tcl_GetVar2(Tcl_Interp *interp,
542
+ const char *part1, const char *part2,
543
+ int flags);
544
+/* 177 */
545
+EXTERN int Tcl_GlobalEval(Tcl_Interp *interp,
546
+ const char *command);
547
+/* 178 */
548
+EXTERN int Tcl_GlobalEvalObj(Tcl_Interp *interp,
549
+ Tcl_Obj *objPtr);
550
+/* 179 */
551
+EXTERN int Tcl_HideCommand(Tcl_Interp *interp,
552
+ const char *cmdName,
553
+ const char *hiddenCmdToken);
554
+/* 180 */
555
+EXTERN int Tcl_Init(Tcl_Interp *interp);
556
+/* 181 */
557
+EXTERN void Tcl_InitHashTable(Tcl_HashTable *tablePtr,
558
+ int keyType);
559
+/* 182 */
560
+EXTERN int Tcl_InputBlocked(Tcl_Channel chan);
561
+/* 183 */
562
+EXTERN int Tcl_InputBuffered(Tcl_Channel chan);
563
+/* 184 */
564
+EXTERN int Tcl_InterpDeleted(Tcl_Interp *interp);
565
+/* 185 */
566
+EXTERN int Tcl_IsSafe(Tcl_Interp *interp);
567
+/* 186 */
568
+EXTERN char * Tcl_JoinPath(int argc, CONST84 char *const *argv,
569
+ Tcl_DString *resultPtr);
570
+/* 187 */
571
+EXTERN int Tcl_LinkVar(Tcl_Interp *interp, const char *varName,
572
+ char *addr, int type);
573
+/* Slot 188 is reserved */
574
+/* 189 */
575
+EXTERN Tcl_Channel Tcl_MakeFileChannel(ClientData handle, int mode);
576
+/* 190 */
577
+EXTERN int Tcl_MakeSafe(Tcl_Interp *interp);
578
+/* 191 */
579
+EXTERN Tcl_Channel Tcl_MakeTcpClientChannel(ClientData tcpSocket);
580
+/* 192 */
581
+EXTERN char * Tcl_Merge(int argc, CONST84 char *const *argv);
582
+/* 193 */
583
+EXTERN Tcl_HashEntry * Tcl_NextHashEntry(Tcl_HashSearch *searchPtr);
584
+/* 194 */
585
+EXTERN void Tcl_NotifyChannel(Tcl_Channel channel, int mask);
586
+/* 195 */
587
+EXTERN Tcl_Obj * Tcl_ObjGetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
588
+ Tcl_Obj *part2Ptr, int flags);
589
+/* 196 */
590
+EXTERN Tcl_Obj * Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
591
+ Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr,
592
+ int flags);
593
+/* 197 */
594
+EXTERN Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp, int argc,
595
+ CONST84 char **argv, int flags);
596
+/* 198 */
597
+EXTERN Tcl_Channel Tcl_OpenFileChannel(Tcl_Interp *interp,
598
+ const char *fileName, const char *modeString,
599
+ int permissions);
600
+/* 199 */
601
+EXTERN Tcl_Channel Tcl_OpenTcpClient(Tcl_Interp *interp, int port,
602
+ const char *address, const char *myaddr,
603
+ int myport, int async);
604
+/* 200 */
605
+EXTERN Tcl_Channel Tcl_OpenTcpServer(Tcl_Interp *interp, int port,
606
+ const char *host,
607
+ Tcl_TcpAcceptProc *acceptProc,
608
+ ClientData callbackData);
609
+/* 201 */
610
+EXTERN void Tcl_Preserve(ClientData data);
611
+/* 202 */
612
+EXTERN void Tcl_PrintDouble(Tcl_Interp *interp, double value,
613
+ char *dst);
614
+/* 203 */
615
+EXTERN int Tcl_PutEnv(const char *assignment);
616
+/* 204 */
617
+EXTERN CONST84_RETURN char * Tcl_PosixError(Tcl_Interp *interp);
618
+/* 205 */
619
+EXTERN void Tcl_QueueEvent(Tcl_Event *evPtr,
620
+ Tcl_QueuePosition position);
621
+/* 206 */
622
+EXTERN int Tcl_Read(Tcl_Channel chan, char *bufPtr, int toRead);
623
+/* 207 */
624
+EXTERN void Tcl_ReapDetachedProcs(void);
625
+/* 208 */
626
+EXTERN int Tcl_RecordAndEval(Tcl_Interp *interp,
627
+ const char *cmd, int flags);
628
+/* 209 */
629
+EXTERN int Tcl_RecordAndEvalObj(Tcl_Interp *interp,
630
+ Tcl_Obj *cmdPtr, int flags);
631
+/* 210 */
632
+EXTERN void Tcl_RegisterChannel(Tcl_Interp *interp,
633
+ Tcl_Channel chan);
634
+/* 211 */
635
+EXTERN void Tcl_RegisterObjType(const Tcl_ObjType *typePtr);
636
+/* 212 */
637
+EXTERN Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp,
638
+ const char *pattern);
639
+/* 213 */
640
+EXTERN int Tcl_RegExpExec(Tcl_Interp *interp, Tcl_RegExp regexp,
641
+ const char *text, const char *start);
642
+/* 214 */
643
+EXTERN int Tcl_RegExpMatch(Tcl_Interp *interp, const char *text,
644
+ const char *pattern);
645
+/* 215 */
646
+EXTERN void Tcl_RegExpRange(Tcl_RegExp regexp, int index,
647
+ CONST84 char **startPtr,
648
+ CONST84 char **endPtr);
649
+/* 216 */
650
+EXTERN void Tcl_Release(ClientData clientData);
651
+/* 217 */
652
+EXTERN void Tcl_ResetResult(Tcl_Interp *interp);
653
+/* 218 */
654
+EXTERN int Tcl_ScanElement(const char *src, int *flagPtr);
655
+/* 219 */
656
+EXTERN int Tcl_ScanCountedElement(const char *src, int length,
657
+ int *flagPtr);
658
+/* 220 */
659
+EXTERN int Tcl_SeekOld(Tcl_Channel chan, int offset, int mode);
660
+/* 221 */
661
+EXTERN int Tcl_ServiceAll(void);
662
+/* 222 */
663
+EXTERN int Tcl_ServiceEvent(int flags);
664
+/* 223 */
665
+EXTERN void Tcl_SetAssocData(Tcl_Interp *interp,
666
+ const char *name, Tcl_InterpDeleteProc *proc,
667
+ ClientData clientData);
668
+/* 224 */
669
+EXTERN void Tcl_SetChannelBufferSize(Tcl_Channel chan, int sz);
670
+/* 225 */
671
+EXTERN int Tcl_SetChannelOption(Tcl_Interp *interp,
672
+ Tcl_Channel chan, const char *optionName,
673
+ const char *newValue);
674
+/* 226 */
675
+EXTERN int Tcl_SetCommandInfo(Tcl_Interp *interp,
676
+ const char *cmdName,
677
+ const Tcl_CmdInfo *infoPtr);
678
+/* 227 */
679
+EXTERN void Tcl_SetErrno(int err);
680
+/* 228 */
681
+EXTERN void Tcl_SetErrorCode(Tcl_Interp *interp, ...);
682
+/* 229 */
683
+EXTERN void Tcl_SetMaxBlockTime(const Tcl_Time *timePtr);
684
+/* 230 */
685
+EXTERN void Tcl_SetPanicProc(Tcl_PanicProc *panicProc);
686
+/* 231 */
687
+EXTERN int Tcl_SetRecursionLimit(Tcl_Interp *interp, int depth);
688
+/* 232 */
689
+EXTERN void Tcl_SetResult(Tcl_Interp *interp, char *result,
690
+ Tcl_FreeProc *freeProc);
691
+/* 233 */
692
+EXTERN int Tcl_SetServiceMode(int mode);
693
+/* 234 */
694
+EXTERN void Tcl_SetObjErrorCode(Tcl_Interp *interp,
695
+ Tcl_Obj *errorObjPtr);
696
+/* 235 */
697
+EXTERN void Tcl_SetObjResult(Tcl_Interp *interp,
698
+ Tcl_Obj *resultObjPtr);
699
+/* 236 */
700
+EXTERN void Tcl_SetStdChannel(Tcl_Channel channel, int type);
701
+/* 237 */
702
+EXTERN CONST84_RETURN char * Tcl_SetVar(Tcl_Interp *interp,
703
+ const char *varName, const char *newValue,
704
+ int flags);
705
+/* 238 */
706
+EXTERN CONST84_RETURN char * Tcl_SetVar2(Tcl_Interp *interp,
707
+ const char *part1, const char *part2,
708
+ const char *newValue, int flags);
709
+/* 239 */
710
+EXTERN CONST84_RETURN char * Tcl_SignalId(int sig);
711
+/* 240 */
712
+EXTERN CONST84_RETURN char * Tcl_SignalMsg(int sig);
713
+/* 241 */
714
+EXTERN void Tcl_SourceRCFile(Tcl_Interp *interp);
715
+/* 242 */
716
+EXTERN int Tcl_SplitList(Tcl_Interp *interp,
717
+ const char *listStr, int *argcPtr,
718
+ CONST84 char ***argvPtr);
719
+/* 243 */
720
+EXTERN void Tcl_SplitPath(const char *path, int *argcPtr,
721
+ CONST84 char ***argvPtr);
722
+/* 244 */
723
+EXTERN void Tcl_StaticPackage(Tcl_Interp *interp,
724
+ const char *pkgName,
725
+ Tcl_PackageInitProc *initProc,
726
+ Tcl_PackageInitProc *safeInitProc);
727
+/* 245 */
728
+EXTERN int Tcl_StringMatch(const char *str, const char *pattern);
729
+/* 246 */
730
+EXTERN int Tcl_TellOld(Tcl_Channel chan);
731
+/* 247 */
732
+EXTERN int Tcl_TraceVar(Tcl_Interp *interp, const char *varName,
733
+ int flags, Tcl_VarTraceProc *proc,
734
+ ClientData clientData);
735
+/* 248 */
736
+EXTERN int Tcl_TraceVar2(Tcl_Interp *interp, const char *part1,
737
+ const char *part2, int flags,
738
+ Tcl_VarTraceProc *proc,
739
+ ClientData clientData);
740
+/* 249 */
741
+EXTERN char * Tcl_TranslateFileName(Tcl_Interp *interp,
742
+ const char *name, Tcl_DString *bufferPtr);
743
+/* 250 */
744
+EXTERN int Tcl_Ungets(Tcl_Channel chan, const char *str,
745
+ int len, int atHead);
746
+/* 251 */
747
+EXTERN void Tcl_UnlinkVar(Tcl_Interp *interp,
748
+ const char *varName);
749
+/* 252 */
750
+EXTERN int Tcl_UnregisterChannel(Tcl_Interp *interp,
751
+ Tcl_Channel chan);
752
+/* 253 */
753
+EXTERN int Tcl_UnsetVar(Tcl_Interp *interp, const char *varName,
754
+ int flags);
755
+/* 254 */
756
+EXTERN int Tcl_UnsetVar2(Tcl_Interp *interp, const char *part1,
757
+ const char *part2, int flags);
758
+/* 255 */
759
+EXTERN void Tcl_UntraceVar(Tcl_Interp *interp,
760
+ const char *varName, int flags,
761
+ Tcl_VarTraceProc *proc,
762
+ ClientData clientData);
763
+/* 256 */
764
+EXTERN void Tcl_UntraceVar2(Tcl_Interp *interp,
765
+ const char *part1, const char *part2,
766
+ int flags, Tcl_VarTraceProc *proc,
767
+ ClientData clientData);
768
+/* 257 */
769
+EXTERN void Tcl_UpdateLinkedVar(Tcl_Interp *interp,
770
+ const char *varName);
771
+/* 258 */
772
+EXTERN int Tcl_UpVar(Tcl_Interp *interp, const char *frameName,
773
+ const char *varName, const char *localName,
774
+ int flags);
775
+/* 259 */
776
+EXTERN int Tcl_UpVar2(Tcl_Interp *interp, const char *frameName,
777
+ const char *part1, const char *part2,
778
+ const char *localName, int flags);
779
+/* 260 */
780
+EXTERN int Tcl_VarEval(Tcl_Interp *interp, ...);
781
+/* 261 */
782
+EXTERN ClientData Tcl_VarTraceInfo(Tcl_Interp *interp,
783
+ const char *varName, int flags,
784
+ Tcl_VarTraceProc *procPtr,
785
+ ClientData prevClientData);
786
+/* 262 */
787
+EXTERN ClientData Tcl_VarTraceInfo2(Tcl_Interp *interp,
788
+ const char *part1, const char *part2,
789
+ int flags, Tcl_VarTraceProc *procPtr,
790
+ ClientData prevClientData);
791
+/* 263 */
792
+EXTERN int Tcl_Write(Tcl_Channel chan, const char *s, int slen);
793
+/* 264 */
794
+EXTERN void Tcl_WrongNumArgs(Tcl_Interp *interp, int objc,
795
+ Tcl_Obj *const objv[], const char *message);
796
+/* 265 */
797
+EXTERN int Tcl_DumpActiveMemory(const char *fileName);
798
+/* 266 */
799
+EXTERN void Tcl_ValidateAllMemory(const char *file, int line);
800
+/* 267 */
801
+EXTERN void Tcl_AppendResultVA(Tcl_Interp *interp,
802
+ va_list argList);
803
+/* 268 */
804
+EXTERN void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr,
805
+ va_list argList);
806
+/* 269 */
807
+EXTERN char * Tcl_HashStats(Tcl_HashTable *tablePtr);
808
+/* 270 */
809
+EXTERN CONST84_RETURN char * Tcl_ParseVar(Tcl_Interp *interp,
810
+ const char *start, CONST84 char **termPtr);
811
+/* 271 */
812
+EXTERN CONST84_RETURN char * Tcl_PkgPresent(Tcl_Interp *interp,
813
+ const char *name, const char *version,
814
+ int exact);
815
+/* 272 */
816
+EXTERN CONST84_RETURN char * Tcl_PkgPresentEx(Tcl_Interp *interp,
817
+ const char *name, const char *version,
818
+ int exact, void *clientDataPtr);
819
+/* 273 */
820
+EXTERN int Tcl_PkgProvide(Tcl_Interp *interp, const char *name,
821
+ const char *version);
822
+/* 274 */
823
+EXTERN CONST84_RETURN char * Tcl_PkgRequire(Tcl_Interp *interp,
824
+ const char *name, const char *version,
825
+ int exact);
826
+/* 275 */
827
+EXTERN void Tcl_SetErrorCodeVA(Tcl_Interp *interp,
828
+ va_list argList);
829
+/* 276 */
830
+EXTERN int Tcl_VarEvalVA(Tcl_Interp *interp, va_list argList);
831
+/* 277 */
832
+EXTERN Tcl_Pid Tcl_WaitPid(Tcl_Pid pid, int *statPtr, int options);
833
+/* 278 */
834
+EXTERN void Tcl_PanicVA(const char *format, va_list argList);
835
+/* 279 */
836
+EXTERN void Tcl_GetVersion(int *major, int *minor,
837
+ int *patchLevel, int *type);
838
+/* 280 */
839
+EXTERN void Tcl_InitMemory(Tcl_Interp *interp);
840
+/* 281 */
841
+EXTERN Tcl_Channel Tcl_StackChannel(Tcl_Interp *interp,
842
+ const Tcl_ChannelType *typePtr,
843
+ ClientData instanceData, int mask,
844
+ Tcl_Channel prevChan);
845
+/* 282 */
846
+EXTERN int Tcl_UnstackChannel(Tcl_Interp *interp,
847
+ Tcl_Channel chan);
848
+/* 283 */
849
+EXTERN Tcl_Channel Tcl_GetStackedChannel(Tcl_Channel chan);
850
+/* 284 */
851
+EXTERN void Tcl_SetMainLoop(Tcl_MainLoopProc *proc);
852
+/* Slot 285 is reserved */
853
+/* 286 */
854
+EXTERN void Tcl_AppendObjToObj(Tcl_Obj *objPtr,
855
+ Tcl_Obj *appendObjPtr);
856
+/* 287 */
857
+EXTERN Tcl_Encoding Tcl_CreateEncoding(const Tcl_EncodingType *typePtr);
858
+/* 288 */
859
+EXTERN void Tcl_CreateThreadExitHandler(Tcl_ExitProc *proc,
860
+ ClientData clientData);
861
+/* 289 */
862
+EXTERN void Tcl_DeleteThreadExitHandler(Tcl_ExitProc *proc,
863
+ ClientData clientData);
864
+/* 290 */
865
+EXTERN void Tcl_DiscardResult(Tcl_SavedResult *statePtr);
866
+/* 291 */
867
+EXTERN int Tcl_EvalEx(Tcl_Interp *interp, const char *script,
868
+ int numBytes, int flags);
869
+/* 292 */
870
+EXTERN int Tcl_EvalObjv(Tcl_Interp *interp, int objc,
871
+ Tcl_Obj *const objv[], int flags);
872
+/* 293 */
873
+EXTERN int Tcl_EvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr,
874
+ int flags);
875
+/* 294 */
876
+EXTERN void Tcl_ExitThread(int status);
877
+/* 295 */
878
+EXTERN int Tcl_ExternalToUtf(Tcl_Interp *interp,
879
+ Tcl_Encoding encoding, const char *src,
880
+ int srcLen, int flags,
881
+ Tcl_EncodingState *statePtr, char *dst,
882
+ int dstLen, int *srcReadPtr,
883
+ int *dstWrotePtr, int *dstCharsPtr);
884
+/* 296 */
885
+EXTERN char * Tcl_ExternalToUtfDString(Tcl_Encoding encoding,
886
+ const char *src, int srcLen,
887
+ Tcl_DString *dsPtr);
888
+/* 297 */
889
+EXTERN void Tcl_FinalizeThread(void);
890
+/* 298 */
891
+EXTERN void Tcl_FinalizeNotifier(ClientData clientData);
892
+/* 299 */
893
+EXTERN void Tcl_FreeEncoding(Tcl_Encoding encoding);
894
+/* 300 */
895
+EXTERN Tcl_ThreadId Tcl_GetCurrentThread(void);
896
+/* 301 */
897
+EXTERN Tcl_Encoding Tcl_GetEncoding(Tcl_Interp *interp, const char *name);
898
+/* 302 */
899
+EXTERN CONST84_RETURN char * Tcl_GetEncodingName(Tcl_Encoding encoding);
900
+/* 303 */
901
+EXTERN void Tcl_GetEncodingNames(Tcl_Interp *interp);
902
+/* 304 */
903
+EXTERN int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp,
904
+ Tcl_Obj *objPtr, const void *tablePtr,
905
+ int offset, const char *msg, int flags,
906
+ int *indexPtr);
907
+/* 305 */
908
+EXTERN void * Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr,
909
+ int size);
910
+/* 306 */
911
+EXTERN Tcl_Obj * Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1,
912
+ const char *part2, int flags);
913
+/* 307 */
914
+EXTERN ClientData Tcl_InitNotifier(void);
915
+/* 308 */
916
+EXTERN void Tcl_MutexLock(Tcl_Mutex *mutexPtr);
917
+/* 309 */
918
+EXTERN void Tcl_MutexUnlock(Tcl_Mutex *mutexPtr);
919
+/* 310 */
920
+EXTERN void Tcl_ConditionNotify(Tcl_Condition *condPtr);
921
+/* 311 */
922
+EXTERN void Tcl_ConditionWait(Tcl_Condition *condPtr,
923
+ Tcl_Mutex *mutexPtr, const Tcl_Time *timePtr);
924
+/* 312 */
925
+EXTERN int Tcl_NumUtfChars(const char *src, int length);
926
+/* 313 */
927
+EXTERN int Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr,
928
+ int charsToRead, int appendFlag);
929
+/* 314 */
930
+EXTERN void Tcl_RestoreResult(Tcl_Interp *interp,
931
+ Tcl_SavedResult *statePtr);
932
+/* 315 */
933
+EXTERN void Tcl_SaveResult(Tcl_Interp *interp,
934
+ Tcl_SavedResult *statePtr);
935
+/* 316 */
936
+EXTERN int Tcl_SetSystemEncoding(Tcl_Interp *interp,
937
+ const char *name);
938
+/* 317 */
939
+EXTERN Tcl_Obj * Tcl_SetVar2Ex(Tcl_Interp *interp, const char *part1,
940
+ const char *part2, Tcl_Obj *newValuePtr,
941
+ int flags);
942
+/* 318 */
943
+EXTERN void Tcl_ThreadAlert(Tcl_ThreadId threadId);
944
+/* 319 */
945
+EXTERN void Tcl_ThreadQueueEvent(Tcl_ThreadId threadId,
946
+ Tcl_Event *evPtr, Tcl_QueuePosition position);
947
+/* 320 */
948
+EXTERN Tcl_UniChar Tcl_UniCharAtIndex(const char *src, int index);
949
+/* 321 */
950
+EXTERN Tcl_UniChar Tcl_UniCharToLower(int ch);
951
+/* 322 */
952
+EXTERN Tcl_UniChar Tcl_UniCharToTitle(int ch);
953
+/* 323 */
954
+EXTERN Tcl_UniChar Tcl_UniCharToUpper(int ch);
955
+/* 324 */
956
+EXTERN int Tcl_UniCharToUtf(int ch, char *buf);
957
+/* 325 */
958
+EXTERN CONST84_RETURN char * Tcl_UtfAtIndex(const char *src, int index);
959
+/* 326 */
960
+EXTERN int Tcl_UtfCharComplete(const char *src, int length);
961
+/* 327 */
962
+EXTERN int Tcl_UtfBackslash(const char *src, int *readPtr,
963
+ char *dst);
964
+/* 328 */
965
+EXTERN CONST84_RETURN char * Tcl_UtfFindFirst(const char *src, int ch);
966
+/* 329 */
967
+EXTERN CONST84_RETURN char * Tcl_UtfFindLast(const char *src, int ch);
968
+/* 330 */
969
+EXTERN CONST84_RETURN char * Tcl_UtfNext(const char *src);
970
+/* 331 */
971
+EXTERN CONST84_RETURN char * Tcl_UtfPrev(const char *src, const char *start);
972
+/* 332 */
973
+EXTERN int Tcl_UtfToExternal(Tcl_Interp *interp,
974
+ Tcl_Encoding encoding, const char *src,
975
+ int srcLen, int flags,
976
+ Tcl_EncodingState *statePtr, char *dst,
977
+ int dstLen, int *srcReadPtr,
978
+ int *dstWrotePtr, int *dstCharsPtr);
979
+/* 333 */
980
+EXTERN char * Tcl_UtfToExternalDString(Tcl_Encoding encoding,
981
+ const char *src, int srcLen,
982
+ Tcl_DString *dsPtr);
983
+/* 334 */
984
+EXTERN int Tcl_UtfToLower(char *src);
985
+/* 335 */
986
+EXTERN int Tcl_UtfToTitle(char *src);
987
+/* 336 */
988
+EXTERN int Tcl_UtfToUniChar(const char *src, Tcl_UniChar *chPtr);
989
+/* 337 */
990
+EXTERN int Tcl_UtfToUpper(char *src);
991
+/* 338 */
992
+EXTERN int Tcl_WriteChars(Tcl_Channel chan, const char *src,
993
+ int srcLen);
994
+/* 339 */
995
+EXTERN int Tcl_WriteObj(Tcl_Channel chan, Tcl_Obj *objPtr);
996
+/* 340 */
997
+EXTERN char * Tcl_GetString(Tcl_Obj *objPtr);
998
+/* 341 */
999
+EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir(void);
1000
+/* 342 */
1001
+EXTERN void Tcl_SetDefaultEncodingDir(const char *path);
1002
+/* 343 */
1003
+EXTERN void Tcl_AlertNotifier(ClientData clientData);
1004
+/* 344 */
1005
+EXTERN void Tcl_ServiceModeHook(int mode);
1006
+/* 345 */
1007
+EXTERN int Tcl_UniCharIsAlnum(int ch);
1008
+/* 346 */
1009
+EXTERN int Tcl_UniCharIsAlpha(int ch);
1010
+/* 347 */
1011
+EXTERN int Tcl_UniCharIsDigit(int ch);
1012
+/* 348 */
1013
+EXTERN int Tcl_UniCharIsLower(int ch);
1014
+/* 349 */
1015
+EXTERN int Tcl_UniCharIsSpace(int ch);
1016
+/* 350 */
1017
+EXTERN int Tcl_UniCharIsUpper(int ch);
1018
+/* 351 */
1019
+EXTERN int Tcl_UniCharIsWordChar(int ch);
1020
+/* 352 */
1021
+EXTERN int Tcl_UniCharLen(const Tcl_UniChar *uniStr);
1022
+/* 353 */
1023
+EXTERN int Tcl_UniCharNcmp(const Tcl_UniChar *ucs,
1024
+ const Tcl_UniChar *uct,
1025
+ unsigned long numChars);
1026
+/* 354 */
1027
+EXTERN char * Tcl_UniCharToUtfDString(const Tcl_UniChar *uniStr,
1028
+ int uniLength, Tcl_DString *dsPtr);
1029
+/* 355 */
1030
+EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString(const char *src, int length,
1031
+ Tcl_DString *dsPtr);
1032
+/* 356 */
1033
+EXTERN Tcl_RegExp Tcl_GetRegExpFromObj(Tcl_Interp *interp,
1034
+ Tcl_Obj *patObj, int flags);
1035
+/* 357 */
1036
+EXTERN Tcl_Obj * Tcl_EvalTokens(Tcl_Interp *interp,
1037
+ Tcl_Token *tokenPtr, int count);
1038
+/* 358 */
1039
+EXTERN void Tcl_FreeParse(Tcl_Parse *parsePtr);
1040
+/* 359 */
1041
+EXTERN void Tcl_LogCommandInfo(Tcl_Interp *interp,
1042
+ const char *script, const char *command,
1043
+ int length);
1044
+/* 360 */
1045
+EXTERN int Tcl_ParseBraces(Tcl_Interp *interp,
1046
+ const char *start, int numBytes,
1047
+ Tcl_Parse *parsePtr, int append,
1048
+ CONST84 char **termPtr);
1049
+/* 361 */
1050
+EXTERN int Tcl_ParseCommand(Tcl_Interp *interp,
1051
+ const char *start, int numBytes, int nested,
1052
+ Tcl_Parse *parsePtr);
1053
+/* 362 */
1054
+EXTERN int Tcl_ParseExpr(Tcl_Interp *interp, const char *start,
1055
+ int numBytes, Tcl_Parse *parsePtr);
1056
+/* 363 */
1057
+EXTERN int Tcl_ParseQuotedString(Tcl_Interp *interp,
1058
+ const char *start, int numBytes,
1059
+ Tcl_Parse *parsePtr, int append,
1060
+ CONST84 char **termPtr);
1061
+/* 364 */
1062
+EXTERN int Tcl_ParseVarName(Tcl_Interp *interp,
1063
+ const char *start, int numBytes,
1064
+ Tcl_Parse *parsePtr, int append);
1065
+/* 365 */
1066
+EXTERN char * Tcl_GetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr);
1067
+/* 366 */
1068
+EXTERN int Tcl_Chdir(const char *dirName);
1069
+/* 367 */
1070
+EXTERN int Tcl_Access(const char *path, int mode);
1071
+/* 368 */
1072
+EXTERN int Tcl_Stat(const char *path, struct stat *bufPtr);
1073
+/* 369 */
1074
+EXTERN int Tcl_UtfNcmp(const char *s1, const char *s2,
1075
+ unsigned long n);
1076
+/* 370 */
1077
+EXTERN int Tcl_UtfNcasecmp(const char *s1, const char *s2,
1078
+ unsigned long n);
1079
+/* 371 */
1080
+EXTERN int Tcl_StringCaseMatch(const char *str,
1081
+ const char *pattern, int nocase);
1082
+/* 372 */
1083
+EXTERN int Tcl_UniCharIsControl(int ch);
1084
+/* 373 */
1085
+EXTERN int Tcl_UniCharIsGraph(int ch);
1086
+/* 374 */
1087
+EXTERN int Tcl_UniCharIsPrint(int ch);
1088
+/* 375 */
1089
+EXTERN int Tcl_UniCharIsPunct(int ch);
1090
+/* 376 */
1091
+EXTERN int Tcl_RegExpExecObj(Tcl_Interp *interp,
1092
+ Tcl_RegExp regexp, Tcl_Obj *textObj,
1093
+ int offset, int nmatches, int flags);
1094
+/* 377 */
1095
+EXTERN void Tcl_RegExpGetInfo(Tcl_RegExp regexp,
1096
+ Tcl_RegExpInfo *infoPtr);
1097
+/* 378 */
1098
+EXTERN Tcl_Obj * Tcl_NewUnicodeObj(const Tcl_UniChar *unicode,
1099
+ int numChars);
1100
+/* 379 */
1101
+EXTERN void Tcl_SetUnicodeObj(Tcl_Obj *objPtr,
1102
+ const Tcl_UniChar *unicode, int numChars);
1103
+/* 380 */
1104
+EXTERN int Tcl_GetCharLength(Tcl_Obj *objPtr);
1105
+/* 381 */
1106
+EXTERN Tcl_UniChar Tcl_GetUniChar(Tcl_Obj *objPtr, int index);
1107
+/* 382 */
1108
+EXTERN Tcl_UniChar * Tcl_GetUnicode(Tcl_Obj *objPtr);
1109
+/* 383 */
1110
+EXTERN Tcl_Obj * Tcl_GetRange(Tcl_Obj *objPtr, int first, int last);
1111
+/* 384 */
1112
+EXTERN void Tcl_AppendUnicodeToObj(Tcl_Obj *objPtr,
1113
+ const Tcl_UniChar *unicode, int length);
1114
+/* 385 */
1115
+EXTERN int Tcl_RegExpMatchObj(Tcl_Interp *interp,
1116
+ Tcl_Obj *textObj, Tcl_Obj *patternObj);
1117
+/* 386 */
1118
+EXTERN void Tcl_SetNotifier(Tcl_NotifierProcs *notifierProcPtr);
1119
+/* 387 */
1120
+EXTERN Tcl_Mutex * Tcl_GetAllocMutex(void);
1121
+/* 388 */
1122
+EXTERN int Tcl_GetChannelNames(Tcl_Interp *interp);
1123
+/* 389 */
1124
+EXTERN int Tcl_GetChannelNamesEx(Tcl_Interp *interp,
1125
+ const char *pattern);
1126
+/* 390 */
1127
+EXTERN int Tcl_ProcObjCmd(ClientData clientData,
1128
+ Tcl_Interp *interp, int objc,
1129
+ Tcl_Obj *const objv[]);
1130
+/* 391 */
1131
+EXTERN void Tcl_ConditionFinalize(Tcl_Condition *condPtr);
1132
+/* 392 */
1133
+EXTERN void Tcl_MutexFinalize(Tcl_Mutex *mutex);
1134
+/* 393 */
1135
+EXTERN int Tcl_CreateThread(Tcl_ThreadId *idPtr,
1136
+ Tcl_ThreadCreateProc *proc,
1137
+ ClientData clientData, int stackSize,
1138
+ int flags);
1139
+/* 394 */
1140
+EXTERN int Tcl_ReadRaw(Tcl_Channel chan, char *dst,
1141
+ int bytesToRead);
1142
+/* 395 */
1143
+EXTERN int Tcl_WriteRaw(Tcl_Channel chan, const char *src,
1144
+ int srcLen);
1145
+/* 396 */
1146
+EXTERN Tcl_Channel Tcl_GetTopChannel(Tcl_Channel chan);
1147
+/* 397 */
1148
+EXTERN int Tcl_ChannelBuffered(Tcl_Channel chan);
1149
+/* 398 */
1150
+EXTERN CONST84_RETURN char * Tcl_ChannelName(
1151
+ const Tcl_ChannelType *chanTypePtr);
1152
+/* 399 */
1153
+EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion(
1154
+ const Tcl_ChannelType *chanTypePtr);
1155
+/* 400 */
1156
+EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc(
1157
+ const Tcl_ChannelType *chanTypePtr);
1158
+/* 401 */
1159
+EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc(
1160
+ const Tcl_ChannelType *chanTypePtr);
1161
+/* 402 */
1162
+EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc(
1163
+ const Tcl_ChannelType *chanTypePtr);
1164
+/* 403 */
1165
+EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc(
1166
+ const Tcl_ChannelType *chanTypePtr);
1167
+/* 404 */
1168
+EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc(
1169
+ const Tcl_ChannelType *chanTypePtr);
1170
+/* 405 */
1171
+EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc(
1172
+ const Tcl_ChannelType *chanTypePtr);
1173
+/* 406 */
1174
+EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc(
1175
+ const Tcl_ChannelType *chanTypePtr);
1176
+/* 407 */
1177
+EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc(
1178
+ const Tcl_ChannelType *chanTypePtr);
1179
+/* 408 */
1180
+EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc(
1181
+ const Tcl_ChannelType *chanTypePtr);
1182
+/* 409 */
1183
+EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc(
1184
+ const Tcl_ChannelType *chanTypePtr);
1185
+/* 410 */
1186
+EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc(
1187
+ const Tcl_ChannelType *chanTypePtr);
1188
+/* 411 */
1189
+EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc(
1190
+ const Tcl_ChannelType *chanTypePtr);
1191
+/* 412 */
1192
+EXTERN int Tcl_JoinThread(Tcl_ThreadId threadId, int *result);
1193
+/* 413 */
1194
+EXTERN int Tcl_IsChannelShared(Tcl_Channel channel);
1195
+/* 414 */
1196
+EXTERN int Tcl_IsChannelRegistered(Tcl_Interp *interp,
1197
+ Tcl_Channel channel);
1198
+/* 415 */
1199
+EXTERN void Tcl_CutChannel(Tcl_Channel channel);
1200
+/* 416 */
1201
+EXTERN void Tcl_SpliceChannel(Tcl_Channel channel);
1202
+/* 417 */
1203
+EXTERN void Tcl_ClearChannelHandlers(Tcl_Channel channel);
1204
+/* 418 */
1205
+EXTERN int Tcl_IsChannelExisting(const char *channelName);
1206
+/* 419 */
1207
+EXTERN int Tcl_UniCharNcasecmp(const Tcl_UniChar *ucs,
1208
+ const Tcl_UniChar *uct,
1209
+ unsigned long numChars);
1210
+/* 420 */
1211
+EXTERN int Tcl_UniCharCaseMatch(const Tcl_UniChar *uniStr,
1212
+ const Tcl_UniChar *uniPattern, int nocase);
1213
+/* 421 */
1214
+EXTERN Tcl_HashEntry * Tcl_FindHashEntry(Tcl_HashTable *tablePtr,
1215
+ const void *key);
1216
+/* 422 */
1217
+EXTERN Tcl_HashEntry * Tcl_CreateHashEntry(Tcl_HashTable *tablePtr,
1218
+ const void *key, int *newPtr);
1219
+/* 423 */
1220
+EXTERN void Tcl_InitCustomHashTable(Tcl_HashTable *tablePtr,
1221
+ int keyType, const Tcl_HashKeyType *typePtr);
1222
+/* 424 */
1223
+EXTERN void Tcl_InitObjHashTable(Tcl_HashTable *tablePtr);
1224
+/* 425 */
1225
+EXTERN ClientData Tcl_CommandTraceInfo(Tcl_Interp *interp,
1226
+ const char *varName, int flags,
1227
+ Tcl_CommandTraceProc *procPtr,
1228
+ ClientData prevClientData);
1229
+/* 426 */
1230
+EXTERN int Tcl_TraceCommand(Tcl_Interp *interp,
1231
+ const char *varName, int flags,
1232
+ Tcl_CommandTraceProc *proc,
1233
+ ClientData clientData);
1234
+/* 427 */
1235
+EXTERN void Tcl_UntraceCommand(Tcl_Interp *interp,
1236
+ const char *varName, int flags,
1237
+ Tcl_CommandTraceProc *proc,
1238
+ ClientData clientData);
1239
+/* 428 */
1240
+EXTERN char * Tcl_AttemptAlloc(unsigned int size);
1241
+/* 429 */
1242
+EXTERN char * Tcl_AttemptDbCkalloc(unsigned int size,
1243
+ const char *file, int line);
1244
+/* 430 */
1245
+EXTERN char * Tcl_AttemptRealloc(char *ptr, unsigned int size);
1246
+/* 431 */
1247
+EXTERN char * Tcl_AttemptDbCkrealloc(char *ptr, unsigned int size,
1248
+ const char *file, int line);
1249
+/* 432 */
1250
+EXTERN int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, int length);
1251
+/* 433 */
1252
+EXTERN Tcl_ThreadId Tcl_GetChannelThread(Tcl_Channel channel);
1253
+/* 434 */
1254
+EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr,
1255
+ int *lengthPtr);
1256
+/* 435 */
1257
+EXTERN int Tcl_GetMathFuncInfo(Tcl_Interp *interp,
1258
+ const char *name, int *numArgsPtr,
1259
+ Tcl_ValueType **argTypesPtr,
1260
+ Tcl_MathProc **procPtr,
1261
+ ClientData *clientDataPtr);
1262
+/* 436 */
1263
+EXTERN Tcl_Obj * Tcl_ListMathFuncs(Tcl_Interp *interp,
1264
+ const char *pattern);
1265
+/* 437 */
1266
+EXTERN Tcl_Obj * Tcl_SubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
1267
+ int flags);
1268
+/* 438 */
1269
+EXTERN int Tcl_DetachChannel(Tcl_Interp *interp,
1270
+ Tcl_Channel channel);
1271
+/* 439 */
1272
+EXTERN int Tcl_IsStandardChannel(Tcl_Channel channel);
1273
+/* 440 */
1274
+EXTERN int Tcl_FSCopyFile(Tcl_Obj *srcPathPtr,
1275
+ Tcl_Obj *destPathPtr);
1276
+/* 441 */
1277
+EXTERN int Tcl_FSCopyDirectory(Tcl_Obj *srcPathPtr,
1278
+ Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr);
1279
+/* 442 */
1280
+EXTERN int Tcl_FSCreateDirectory(Tcl_Obj *pathPtr);
1281
+/* 443 */
1282
+EXTERN int Tcl_FSDeleteFile(Tcl_Obj *pathPtr);
1283
+/* 444 */
1284
+EXTERN int Tcl_FSLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr,
1285
+ const char *sym1, const char *sym2,
1286
+ Tcl_PackageInitProc **proc1Ptr,
1287
+ Tcl_PackageInitProc **proc2Ptr,
1288
+ Tcl_LoadHandle *handlePtr,
1289
+ Tcl_FSUnloadFileProc **unloadProcPtr);
1290
+/* 445 */
1291
+EXTERN int Tcl_FSMatchInDirectory(Tcl_Interp *interp,
1292
+ Tcl_Obj *result, Tcl_Obj *pathPtr,
1293
+ const char *pattern, Tcl_GlobTypeData *types);
1294
+/* 446 */
1295
+EXTERN Tcl_Obj * Tcl_FSLink(Tcl_Obj *pathPtr, Tcl_Obj *toPtr,
1296
+ int linkAction);
1297
+/* 447 */
1298
+EXTERN int Tcl_FSRemoveDirectory(Tcl_Obj *pathPtr,
1299
+ int recursive, Tcl_Obj **errorPtr);
1300
+/* 448 */
1301
+EXTERN int Tcl_FSRenameFile(Tcl_Obj *srcPathPtr,
1302
+ Tcl_Obj *destPathPtr);
1303
+/* 449 */
1304
+EXTERN int Tcl_FSLstat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1305
+/* 450 */
1306
+EXTERN int Tcl_FSUtime(Tcl_Obj *pathPtr, struct utimbuf *tval);
1307
+/* 451 */
1308
+EXTERN int Tcl_FSFileAttrsGet(Tcl_Interp *interp, int index,
1309
+ Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef);
1310
+/* 452 */
1311
+EXTERN int Tcl_FSFileAttrsSet(Tcl_Interp *interp, int index,
1312
+ Tcl_Obj *pathPtr, Tcl_Obj *objPtr);
1313
+/* 453 */
1314
+EXTERN const char *CONST86 * Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr,
1315
+ Tcl_Obj **objPtrRef);
1316
+/* 454 */
1317
+EXTERN int Tcl_FSStat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1318
+/* 455 */
1319
+EXTERN int Tcl_FSAccess(Tcl_Obj *pathPtr, int mode);
1320
+/* 456 */
1321
+EXTERN Tcl_Channel Tcl_FSOpenFileChannel(Tcl_Interp *interp,
1322
+ Tcl_Obj *pathPtr, const char *modeString,
1323
+ int permissions);
1324
+/* 457 */
1325
+EXTERN Tcl_Obj * Tcl_FSGetCwd(Tcl_Interp *interp);
1326
+/* 458 */
1327
+EXTERN int Tcl_FSChdir(Tcl_Obj *pathPtr);
1328
+/* 459 */
1329
+EXTERN int Tcl_FSConvertToPathType(Tcl_Interp *interp,
1330
+ Tcl_Obj *pathPtr);
1331
+/* 460 */
1332
+EXTERN Tcl_Obj * Tcl_FSJoinPath(Tcl_Obj *listObj, int elements);
1333
+/* 461 */
1334
+EXTERN Tcl_Obj * Tcl_FSSplitPath(Tcl_Obj *pathPtr, int *lenPtr);
1335
+/* 462 */
1336
+EXTERN int Tcl_FSEqualPaths(Tcl_Obj *firstPtr,
1337
+ Tcl_Obj *secondPtr);
1338
+/* 463 */
1339
+EXTERN Tcl_Obj * Tcl_FSGetNormalizedPath(Tcl_Interp *interp,
1340
+ Tcl_Obj *pathPtr);
1341
+/* 464 */
1342
+EXTERN Tcl_Obj * Tcl_FSJoinToPath(Tcl_Obj *pathPtr, int objc,
1343
+ Tcl_Obj *const objv[]);
1344
+/* 465 */
1345
+EXTERN ClientData Tcl_FSGetInternalRep(Tcl_Obj *pathPtr,
1346
+ const Tcl_Filesystem *fsPtr);
1347
+/* 466 */
1348
+EXTERN Tcl_Obj * Tcl_FSGetTranslatedPath(Tcl_Interp *interp,
1349
+ Tcl_Obj *pathPtr);
1350
+/* 467 */
1351
+EXTERN int Tcl_FSEvalFile(Tcl_Interp *interp, Tcl_Obj *fileName);
1352
+/* 468 */
1353
+EXTERN Tcl_Obj * Tcl_FSNewNativePath(
1354
+ const Tcl_Filesystem *fromFilesystem,
1355
+ ClientData clientData);
1356
+/* 469 */
1357
+EXTERN const void * Tcl_FSGetNativePath(Tcl_Obj *pathPtr);
1358
+/* 470 */
1359
+EXTERN Tcl_Obj * Tcl_FSFileSystemInfo(Tcl_Obj *pathPtr);
1360
+/* 471 */
1361
+EXTERN Tcl_Obj * Tcl_FSPathSeparator(Tcl_Obj *pathPtr);
1362
+/* 472 */
1363
+EXTERN Tcl_Obj * Tcl_FSListVolumes(void);
1364
+/* 473 */
1365
+EXTERN int Tcl_FSRegister(ClientData clientData,
1366
+ const Tcl_Filesystem *fsPtr);
1367
+/* 474 */
1368
+EXTERN int Tcl_FSUnregister(const Tcl_Filesystem *fsPtr);
1369
+/* 475 */
1370
+EXTERN ClientData Tcl_FSData(const Tcl_Filesystem *fsPtr);
1371
+/* 476 */
1372
+EXTERN const char * Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp,
1373
+ Tcl_Obj *pathPtr);
1374
+/* 477 */
1375
+EXTERN CONST86 Tcl_Filesystem * Tcl_FSGetFileSystemForPath(Tcl_Obj *pathPtr);
1376
+/* 478 */
1377
+EXTERN Tcl_PathType Tcl_FSGetPathType(Tcl_Obj *pathPtr);
1378
+/* 479 */
1379
+EXTERN int Tcl_OutputBuffered(Tcl_Channel chan);
1380
+/* 480 */
1381
+EXTERN void Tcl_FSMountsChanged(const Tcl_Filesystem *fsPtr);
1382
+/* 481 */
1383
+EXTERN int Tcl_EvalTokensStandard(Tcl_Interp *interp,
1384
+ Tcl_Token *tokenPtr, int count);
1385
+/* 482 */
1386
+EXTERN void Tcl_GetTime(Tcl_Time *timeBuf);
1387
+/* 483 */
1388
+EXTERN Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp *interp, int level,
1389
+ int flags, Tcl_CmdObjTraceProc *objProc,
1390
+ ClientData clientData,
1391
+ Tcl_CmdObjTraceDeleteProc *delProc);
1392
+/* 484 */
1393
+EXTERN int Tcl_GetCommandInfoFromToken(Tcl_Command token,
1394
+ Tcl_CmdInfo *infoPtr);
1395
+/* 485 */
1396
+EXTERN int Tcl_SetCommandInfoFromToken(Tcl_Command token,
1397
+ const Tcl_CmdInfo *infoPtr);
1398
+/* 486 */
1399
+EXTERN Tcl_Obj * Tcl_DbNewWideIntObj(Tcl_WideInt wideValue,
1400
+ const char *file, int line);
1401
+/* 487 */
1402
+EXTERN int Tcl_GetWideIntFromObj(Tcl_Interp *interp,
1403
+ Tcl_Obj *objPtr, Tcl_WideInt *widePtr);
1404
+/* 488 */
1405
+EXTERN Tcl_Obj * Tcl_NewWideIntObj(Tcl_WideInt wideValue);
1406
+/* 489 */
1407
+EXTERN void Tcl_SetWideIntObj(Tcl_Obj *objPtr,
1408
+ Tcl_WideInt wideValue);
1409
+/* 490 */
1410
+EXTERN Tcl_StatBuf * Tcl_AllocStatBuf(void);
1411
+/* 491 */
1412
+EXTERN Tcl_WideInt Tcl_Seek(Tcl_Channel chan, Tcl_WideInt offset,
1413
+ int mode);
1414
+/* 492 */
1415
+EXTERN Tcl_WideInt Tcl_Tell(Tcl_Channel chan);
1416
+/* 493 */
1417
+EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc(
1418
+ const Tcl_ChannelType *chanTypePtr);
1419
+/* 494 */
1420
+EXTERN int Tcl_DictObjPut(Tcl_Interp *interp, Tcl_Obj *dictPtr,
1421
+ Tcl_Obj *keyPtr, Tcl_Obj *valuePtr);
1422
+/* 495 */
1423
+EXTERN int Tcl_DictObjGet(Tcl_Interp *interp, Tcl_Obj *dictPtr,
1424
+ Tcl_Obj *keyPtr, Tcl_Obj **valuePtrPtr);
1425
+/* 496 */
1426
+EXTERN int Tcl_DictObjRemove(Tcl_Interp *interp,
1427
+ Tcl_Obj *dictPtr, Tcl_Obj *keyPtr);
1428
+/* 497 */
1429
+EXTERN int Tcl_DictObjSize(Tcl_Interp *interp, Tcl_Obj *dictPtr,
1430
+ int *sizePtr);
1431
+/* 498 */
1432
+EXTERN int Tcl_DictObjFirst(Tcl_Interp *interp,
1433
+ Tcl_Obj *dictPtr, Tcl_DictSearch *searchPtr,
1434
+ Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr,
1435
+ int *donePtr);
1436
+/* 499 */
1437
+EXTERN void Tcl_DictObjNext(Tcl_DictSearch *searchPtr,
1438
+ Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr,
1439
+ int *donePtr);
1440
+/* 500 */
1441
+EXTERN void Tcl_DictObjDone(Tcl_DictSearch *searchPtr);
1442
+/* 501 */
1443
+EXTERN int Tcl_DictObjPutKeyList(Tcl_Interp *interp,
1444
+ Tcl_Obj *dictPtr, int keyc,
1445
+ Tcl_Obj *const *keyv, Tcl_Obj *valuePtr);
1446
+/* 502 */
1447
+EXTERN int Tcl_DictObjRemoveKeyList(Tcl_Interp *interp,
1448
+ Tcl_Obj *dictPtr, int keyc,
1449
+ Tcl_Obj *const *keyv);
1450
+/* 503 */
1451
+EXTERN Tcl_Obj * Tcl_NewDictObj(void);
1452
+/* 504 */
1453
+EXTERN Tcl_Obj * Tcl_DbNewDictObj(const char *file, int line);
1454
+/* 505 */
1455
+EXTERN void Tcl_RegisterConfig(Tcl_Interp *interp,
1456
+ const char *pkgName,
1457
+ const Tcl_Config *configuration,
1458
+ const char *valEncoding);
1459
+/* 506 */
1460
+EXTERN Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp,
1461
+ const char *name, ClientData clientData,
1462
+ Tcl_NamespaceDeleteProc *deleteProc);
1463
+/* 507 */
1464
+EXTERN void Tcl_DeleteNamespace(Tcl_Namespace *nsPtr);
1465
+/* 508 */
1466
+EXTERN int Tcl_AppendExportList(Tcl_Interp *interp,
1467
+ Tcl_Namespace *nsPtr, Tcl_Obj *objPtr);
1468
+/* 509 */
1469
+EXTERN int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
1470
+ const char *pattern, int resetListFirst);
1471
+/* 510 */
1472
+EXTERN int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
1473
+ const char *pattern, int allowOverwrite);
1474
+/* 511 */
1475
+EXTERN int Tcl_ForgetImport(Tcl_Interp *interp,
1476
+ Tcl_Namespace *nsPtr, const char *pattern);
1477
+/* 512 */
1478
+EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace(Tcl_Interp *interp);
1479
+/* 513 */
1480
+EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace(Tcl_Interp *interp);
1481
+/* 514 */
1482
+EXTERN Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp,
1483
+ const char *name,
1484
+ Tcl_Namespace *contextNsPtr, int flags);
1485
+/* 515 */
1486
+EXTERN Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name,
1487
+ Tcl_Namespace *contextNsPtr, int flags);
1488
+/* 516 */
1489
+EXTERN Tcl_Command Tcl_GetCommandFromObj(Tcl_Interp *interp,
1490
+ Tcl_Obj *objPtr);
1491
+/* 517 */
1492
+EXTERN void Tcl_GetCommandFullName(Tcl_Interp *interp,
1493
+ Tcl_Command command, Tcl_Obj *objPtr);
1494
+/* 518 */
1495
+EXTERN int Tcl_FSEvalFileEx(Tcl_Interp *interp,
1496
+ Tcl_Obj *fileName, const char *encodingName);
1497
+/* 519 */
1498
+EXTERN Tcl_ExitProc * Tcl_SetExitProc(Tcl_ExitProc *proc);
1499
+/* 520 */
1500
+EXTERN void Tcl_LimitAddHandler(Tcl_Interp *interp, int type,
1501
+ Tcl_LimitHandlerProc *handlerProc,
1502
+ ClientData clientData,
1503
+ Tcl_LimitHandlerDeleteProc *deleteProc);
1504
+/* 521 */
1505
+EXTERN void Tcl_LimitRemoveHandler(Tcl_Interp *interp, int type,
1506
+ Tcl_LimitHandlerProc *handlerProc,
1507
+ ClientData clientData);
1508
+/* 522 */
1509
+EXTERN int Tcl_LimitReady(Tcl_Interp *interp);
1510
+/* 523 */
1511
+EXTERN int Tcl_LimitCheck(Tcl_Interp *interp);
1512
+/* 524 */
1513
+EXTERN int Tcl_LimitExceeded(Tcl_Interp *interp);
1514
+/* 525 */
1515
+EXTERN void Tcl_LimitSetCommands(Tcl_Interp *interp,
1516
+ int commandLimit);
1517
+/* 526 */
1518
+EXTERN void Tcl_LimitSetTime(Tcl_Interp *interp,
1519
+ Tcl_Time *timeLimitPtr);
1520
+/* 527 */
1521
+EXTERN void Tcl_LimitSetGranularity(Tcl_Interp *interp, int type,
1522
+ int granularity);
1523
+/* 528 */
1524
+EXTERN int Tcl_LimitTypeEnabled(Tcl_Interp *interp, int type);
1525
+/* 529 */
1526
+EXTERN int Tcl_LimitTypeExceeded(Tcl_Interp *interp, int type);
1527
+/* 530 */
1528
+EXTERN void Tcl_LimitTypeSet(Tcl_Interp *interp, int type);
1529
+/* 531 */
1530
+EXTERN void Tcl_LimitTypeReset(Tcl_Interp *interp, int type);
1531
+/* 532 */
1532
+EXTERN int Tcl_LimitGetCommands(Tcl_Interp *interp);
1533
+/* 533 */
1534
+EXTERN void Tcl_LimitGetTime(Tcl_Interp *interp,
1535
+ Tcl_Time *timeLimitPtr);
1536
+/* 534 */
1537
+EXTERN int Tcl_LimitGetGranularity(Tcl_Interp *interp, int type);
1538
+/* 535 */
1539
+EXTERN Tcl_InterpState Tcl_SaveInterpState(Tcl_Interp *interp, int status);
1540
+/* 536 */
1541
+EXTERN int Tcl_RestoreInterpState(Tcl_Interp *interp,
1542
+ Tcl_InterpState state);
1543
+/* 537 */
1544
+EXTERN void Tcl_DiscardInterpState(Tcl_InterpState state);
1545
+/* 538 */
1546
+EXTERN int Tcl_SetReturnOptions(Tcl_Interp *interp,
1547
+ Tcl_Obj *options);
1548
+/* 539 */
1549
+EXTERN Tcl_Obj * Tcl_GetReturnOptions(Tcl_Interp *interp, int result);
1550
+/* 540 */
1551
+EXTERN int Tcl_IsEnsemble(Tcl_Command token);
1552
+/* 541 */
1553
+EXTERN Tcl_Command Tcl_CreateEnsemble(Tcl_Interp *interp,
1554
+ const char *name,
1555
+ Tcl_Namespace *namespacePtr, int flags);
1556
+/* 542 */
1557
+EXTERN Tcl_Command Tcl_FindEnsemble(Tcl_Interp *interp,
1558
+ Tcl_Obj *cmdNameObj, int flags);
1559
+/* 543 */
1560
+EXTERN int Tcl_SetEnsembleSubcommandList(Tcl_Interp *interp,
1561
+ Tcl_Command token, Tcl_Obj *subcmdList);
1562
+/* 544 */
1563
+EXTERN int Tcl_SetEnsembleMappingDict(Tcl_Interp *interp,
1564
+ Tcl_Command token, Tcl_Obj *mapDict);
1565
+/* 545 */
1566
+EXTERN int Tcl_SetEnsembleUnknownHandler(Tcl_Interp *interp,
1567
+ Tcl_Command token, Tcl_Obj *unknownList);
1568
+/* 546 */
1569
+EXTERN int Tcl_SetEnsembleFlags(Tcl_Interp *interp,
1570
+ Tcl_Command token, int flags);
1571
+/* 547 */
1572
+EXTERN int Tcl_GetEnsembleSubcommandList(Tcl_Interp *interp,
1573
+ Tcl_Command token, Tcl_Obj **subcmdListPtr);
1574
+/* 548 */
1575
+EXTERN int Tcl_GetEnsembleMappingDict(Tcl_Interp *interp,
1576
+ Tcl_Command token, Tcl_Obj **mapDictPtr);
1577
+/* 549 */
1578
+EXTERN int Tcl_GetEnsembleUnknownHandler(Tcl_Interp *interp,
1579
+ Tcl_Command token, Tcl_Obj **unknownListPtr);
1580
+/* 550 */
1581
+EXTERN int Tcl_GetEnsembleFlags(Tcl_Interp *interp,
1582
+ Tcl_Command token, int *flagsPtr);
1583
+/* 551 */
1584
+EXTERN int Tcl_GetEnsembleNamespace(Tcl_Interp *interp,
1585
+ Tcl_Command token,
1586
+ Tcl_Namespace **namespacePtrPtr);
1587
+/* 552 */
1588
+EXTERN void Tcl_SetTimeProc(Tcl_GetTimeProc *getProc,
1589
+ Tcl_ScaleTimeProc *scaleProc,
1590
+ ClientData clientData);
1591
+/* 553 */
1592
+EXTERN void Tcl_QueryTimeProc(Tcl_GetTimeProc **getProc,
1593
+ Tcl_ScaleTimeProc **scaleProc,
1594
+ ClientData *clientData);
1595
+/* 554 */
1596
+EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc(
1597
+ const Tcl_ChannelType *chanTypePtr);
1598
+/* 555 */
1599
+EXTERN Tcl_Obj * Tcl_NewBignumObj(mp_int *value);
1600
+/* 556 */
1601
+EXTERN Tcl_Obj * Tcl_DbNewBignumObj(mp_int *value, const char *file,
1602
+ int line);
1603
+/* 557 */
1604
+EXTERN void Tcl_SetBignumObj(Tcl_Obj *obj, mp_int *value);
1605
+/* 558 */
1606
+EXTERN int Tcl_GetBignumFromObj(Tcl_Interp *interp,
1607
+ Tcl_Obj *obj, mp_int *value);
1608
+/* 559 */
1609
+EXTERN int Tcl_TakeBignumFromObj(Tcl_Interp *interp,
1610
+ Tcl_Obj *obj, mp_int *value);
1611
+/* 560 */
1612
+EXTERN int Tcl_TruncateChannel(Tcl_Channel chan,
1613
+ Tcl_WideInt length);
1614
+/* 561 */
1615
+EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc(
1616
+ const Tcl_ChannelType *chanTypePtr);
1617
+/* 562 */
1618
+EXTERN void Tcl_SetChannelErrorInterp(Tcl_Interp *interp,
1619
+ Tcl_Obj *msg);
1620
+/* 563 */
1621
+EXTERN void Tcl_GetChannelErrorInterp(Tcl_Interp *interp,
1622
+ Tcl_Obj **msg);
1623
+/* 564 */
1624
+EXTERN void Tcl_SetChannelError(Tcl_Channel chan, Tcl_Obj *msg);
1625
+/* 565 */
1626
+EXTERN void Tcl_GetChannelError(Tcl_Channel chan, Tcl_Obj **msg);
1627
+/* 566 */
1628
+EXTERN int Tcl_InitBignumFromDouble(Tcl_Interp *interp,
1629
+ double initval, mp_int *toInit);
1630
+/* 567 */
1631
+EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler(Tcl_Interp *interp,
1632
+ Tcl_Namespace *nsPtr);
1633
+/* 568 */
1634
+EXTERN int Tcl_SetNamespaceUnknownHandler(Tcl_Interp *interp,
1635
+ Tcl_NamespObjSetVar2
1636
+ Tcl_Namespace *nsPtr, Tcl_Obj *handlerPtr);
1637
+/* 569 */
1638
+EXTERN int Tcl_GetEncodingFromObj(Tcl_Interp *interp,
1639
+ Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr);
1640
+/* 570 */
1641
+EXTERN Tcl_Obj * Tcl_GetEncodingSearchPath(void);
1642
+/* 571 */
1643
+EXTERN int Tcl_SetEncodingSearchPath(Tcl_Obj *searchPath);
1644
+/* 572 */
1645
+EXTERN const char * Tcl_GetEncodingNameFromEnvironment(
1646
+ Tcl_DString *bufPtr);
1647
+/* 573 */
1648
+EXTERN int Tcl_PkgRequireProc(Tcl_Interp *interp,
1649
+ const char define Tcl_ObjSEnvironment(
1650
+ Tcl_DString *bufPtr);
1651
+/* 573 */
1652
+EXTERN int Tcl_PkgRequireProc(Tcl_Interp *interp,
1653
+ const char *name, int objc,
1654
+ Tcl_Obj *const objv[], void *clientDataPtr);
1655
+/* 574 */
1656
+EXTERN void Tcl_AppendObjToErrorInfo(Tcl_Interp *interp,
1657
+ Tcl_Obj *objPtr);
1658
+/* 575 */
1659
+EXTERN void Tcl_AppendLimitedToObj(Tcl_Obj *objPtr,
1660
+ const char *bytes, int length, int limit,
1661
+ const char *ellipsis);
1662
+/* 576 */
1663
+EXTERN Tcl_Obj * Tcl_Format(Tcl_Interp *interp, const char *format,
1664
+ int objc, Tcl_Obj *const objv[]);
1665
+/* 577 */
1666
+EXTERN int Tcl_AppendFormatToObj(Tcl_Interp *interp,
1667
+ Tcl_Obj *objPtr, const char *format,
1668
+ int objc, Tcl_Obj *const objv[]);
1669
+/* 578 */
1670
+EXTERN Tcl_Obj * Tcl_ObjPrintf(const char *format, ...) TCL_FORMAT_PRINTF(1, 2);
1671
+/* 579 */
1672
+EXTERN void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr,
1673
+ const char *format, ...) TCL_FORMAT_PRINTF(2, 3);
1674
+/* 580 */
1675
+EXTERN int Tcl_CancelEval(Tcl_Interp *interp,
1676
+ Tcl_Obj *resultObjPtr, ClientData clientData,
1677
+ int flags);
1678
+/* 581 */
1679
+EXTERN int Tcl_Canceled(Tcl_Interp *interp, int flags);
1680
+/* 582 */
1681
+EXTERN int Tcl_CreatePipe(Tcl_Interp *interp,
1682
+ Tcl_Channel *rchan, Tcl_Channel *wchan,
1683
+ int flags);
1684
+/* 583 */
1685
+EXTERN Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp,
1686
+ const char *cmdName, Tcl_ObjCmdProc *proc,
1687
+ Tcl_ObjCmdProc *nreProc,
1688
+ ClientData clientData,
1689
+ Tcl_CmdDeleteProc *deleteProc);
1690
+/* 584 */
1691
+EXTERN int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
1692
+ int flags);
1693
+/* 585 */
1694
+EXTERN int Tcl_NREvalObjv(Tcl_Interp *interp, int objc,
1695
+ Tcl_Obj *const objv[], int flags);
1696
+/* 586 */
1697
+EXTERN int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd,
1698
+ int objc, Tcl_Obj *const objv[], int flags);
1699
+/* 587 */
1700
+EXTERN void Tcl_NRAddCallback(Tcl_Interp *interp,
1701
+ Tcl_NRPostProc *postProcPtr,
1702
+ ClientData data0, ClientData data1,
1703
+ ClientData data2, ClientData data3);
1704
+/* 588 */
1705
+EXTERN int Tcl_NRCallObjProc(Tcl_Interp *interp,
1706
+ Tcl_ObjCmdProc *objProc,
1707
+ ClientData clientData, int objc,
1708
+ Tcl_Obj *const objv[]);
1709
+/* 589 */
1710
+EXTERN unsigned Tcl_GetFSDeviceFromStat(const Tcl_StatBuf *statPtr);
1711
+/* 590 */
1712
+EXTERN unsigned Tcl_GetFSInodeFromStat(const Tcl_StatBuf *statPtr);
1713
+/* 591 */
1714
+EXTERN unsigned Tcl_GetModeFromStat(const Tcl_StatBuf *statPtr);
1715
+/* 592 */
1716
+EXTERN int Tcl_GetLinkCountFromStat(const Tcl_StatBuf *statPtr);
1717
+/* 593 */
1718
+EXTERN int Tcl_GetUserIdFromStat(const Tcl_StatBuf *statPtr);
1719
+/* 594 */
1720
+EXTERN int Tcl_GetGroupIdFromStat(const Tcl_StatBuf *statPtr);
1721
+/* 595 */
1722
+EXTERN int Tcl_GetDeviceTypeFromStat(const Tcl_StatBuf *statPtr);
1723
+/* 596 */
1724
+EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr);
1725
+/* 597 */
1726
+EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat(
1727
+ const Tcl_StatBuf *statPtr);
1728
+/* 598 */
1729
+EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr);
1730
+/* 599 */
1731
+EXTERN Tcl_WideUInt Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr);
1732
+/* 600 */
1733
+EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr);
1734
+/* 601 */
1735
+EXTERN unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr);
1736
+/* 602 */
1737
+EXTERN int Tcl_SetEnsembleParameterList(Tcl_Interp *interp,
1738
+ Tcl_Command token, Tcl_Obj *paramList);
1739
+/* 603 */
1740
+EXTERN int Tcl_GetEnsembleParameterList(Tcl_Interp *interp,
1741
+ Tcl_Command token, Tcl_Obj **paramListPtr);
1742
+/* 604 */
1743
+EXTERN int Tcl_ParseArgsObjv(Tcl_Interp *interp,
1744
+ const Tcl_ArgvInfo *argTable, int *objcPtr,
1745
+ Tcl_Obj *const *objv, Tcl_Obj ***remObjv);
1746
+/* 605 */
1747
+EXTERN int Tcl_GetErrorLine(Tcl_Interp *interp);
1748
+/* 606 */
1749
+EXTERN void Tcl_SetErrorLine(Tcl_Interp *interp, int lineNum);
1750
+/* 607 */
1751
+EXTERN void Tcl_TransferResult(Tcl_Interp *sourceInterp,
1752
+ int result, Tcl_Interp *targetInterp);
1753
+/* 608 */
1754
+EXTERN int Tcl_InterpActive(Tcl_Interp *interp);
1755
+/* 609 */
1756
+EXTERN void Tcl_BackgroundException(Tcl_Interp *interp, int code);
1757
+/* 610 */
1758
+EXTERN int Tcl_ZlibDeflate(Tcl_Interp *interp, int format,
1759
+ Tcl_Obj *data, int level,
1760
+ Tcl_Obj *gzipHeaderDictObj);
1761
+/* 611 */
1762
+EXTERN int Tcl_ZlibInflate(Tcl_Interp *interp, int format,
1763
+ Tcl_Obj *data, int buffersize,
1764
+ Tcl_Obj *gzipHeaderDictObj);
1765
+/* 612 */
1766
+EXTERN unsigned int Tcl_ZlibCRC32(unsigned int crc,
1767
+ const unsigned char *buf, int len);
1768
+/* 613 */
1769
+EXTERN unsigned int Tcl_ZlibAdler32(unsigned int adler,
1770
+ const unsigned char *buf, int len);
1771
+/* 614 */
1772
+EXTERN int Tcl_ZlibStreamInit(Tcl_Interp *interp, int mode,
1773
+ int format, int level, Tcl_Obj *dictObj,
1774
+ Tcl_ZlibStream *zshandle);
1775
+/* 615 */
1776
+EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName(Tcl_ZlibStream zshandle);
1777
+/* 616 */
1778
+EXTERN int Tcl_ZlibStreamEof(Tcl_ZlibStream zshandle);
1779
+/* 617 */
1780
+EXTERN int Tcl_ZlibStreamChecksum(Tcl_ZlibStream zshandle);
1781
+/* 618 */
1782
+EXTERN int Tcl_ZlibStreamPut(Tcl_ZlibStream zshandle,
1783
+ Tcl_Obj *data, int flush);
1784
+/* 619 */
1785
+EXTERN int Tcl_ZlibStreamGet(Tcl_ZlibStream zshandle,
1786
+ Tcl_Obj *data, int count);
1787
+/*
--- a/compat/tcl-8.6/generic/tclDecls.h
+++ b/compat/tcl-8.6/generic/tclDecls.h
@@ -0,0 +1,1787 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/compat/tcl-8.6/generic/tclDecls.h
+++ b/compat/tcl-8.6/generic/tclDecls.h
@@ -0,0 +1,1787 @@
1 /*
2 * tclDecls.h --
3 *
4 * Declarations of functions in the platform independent public Tcl API.
5 *
6 * Copyright (c) 1998-1999 by Scriptics Corporation.
7 *
8 * See the file "license.terms" for information on usage and redistribution
9 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10 */
11
12 #ifndef _TCLDECLS
13 #define _TCLDECLS
14
15 #undef TCL_STORAGE_CLASS
16 #ifdef BUILD_tcl
17 # define TCL_STORAGE_CLASS DLLEXPORT
18 #else
19 # ifdef USE_TCL_STUBS
20 # define TCL_STORAGE_CLASS
21 # else
22 # define TCL_STORAGE_CLASS DLLIMPORT
23 # endif
24 #endif
25
26 /*
27 * WARNING: This file is automatically generated by the tools/genStubs.tcl
28 * script. Any modifications to the function declarations below should be made
29 * in the generic/tcl.decls script.
30 */
31
32 /* !BEGIN!: Do not edit below this line. */
33
34 /*
35 * Exported function declarations:
36 */
37
38 /* 0 */
39 EXTERN int Tcl_PkgProvideEx(Tcl_Interp *interp,
40 const char *name, const char *version,
41 const void *clientData);
42 /* 1 */
43 EXTERN CONST84_RETURN char * Tcl_PkgRequireEx(Tcl_Interp *interp,
44 const char *name, const char *version,
45 int exact, void *clientDataPtr);
46 /* 2 */
47 EXTERN void Tcl_Panic(const char *format, ...) TCL_FORMAT_PRINTF(1, 2);
48 /* 3 */
49 EXTERN char * Tcl_Alloc(unsigned int size);
50 /* 4 */
51 EXTERN void Tcl_Free(char *ptr);
52 /* 5 */
53 EXTERN char * Tcl_Realloc(char *ptr, unsigned int size);
54 /* 6 */
55 EXTERN char * Tcl_DbCkalloc(unsigned int size, const char *file,
56 int line);
57 /* 7 */
58 EXTERN void Tcl_DbCkfree(char *ptr, const char *file, int line);
59 /* 8 */
60 EXTERN char * Tcl_DbCkrealloc(char *ptr, unsigned int size,
61 const char *file, int line);
62 #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
63 /* 9 */
64 EXTERN void Tcl_CreateFileHandler(int fd, int mask,
65 Tcl_FileProc *proc, ClientData clientData);
66 #endif /* UNIX */
67 #ifdef MAC_OSX_TCL /* MACOSX */
68 /* 9 */
69 EXTERN void Tcl_CreateFileHandler(int fd, int mask,
70 Tcl_FileProc *proc, ClientData clientData);
71 #endif /* MACOSX */
72 #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
73 /* 10 */
74 EXTERN void Tcl_DeleteFileHandler(int fd);
75 #endif /* UNIX */
76 #ifdef MAC_OSX_TCL /* MACOSX */
77 /* 10 */
78 EXTERN void Tcl_DeleteFileHandler(int fd);
79 #endif /* MACOSX */
80 /* 11 */
81 EXTERN void Tcl_SetTimer(const Tcl_Time *timePtr);
82 /* 12 */
83 EXTERN void Tcl_Sleep(int ms);
84 /* 13 */
85 EXTERN int Tcl_WaitForEvent(const Tcl_Time *timePtr);
86 /* 14 */
87 EXTERN int Tcl_AppendAllObjTypes(Tcl_Interp *interp,
88 Tcl_Obj *objPtr);
89 /* 15 */
90 EXTERN void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...);
91 /* 16 */
92 EXTERN void Tcl_AppendToObj(Tcl_Obj *objPtr, const char *bytes,
93 int length);
94 /* 17 */
95 EXTERN Tcl_Obj * Tcl_ConcatObj(int objc, Tcl_Obj *const objv[]);
96 /* 18 */
97 EXTERN int Tcl_ConvertToType(Tcl_Interp *interp,
98 Tcl_Obj *objPtr, const Tcl_ObjType *typePtr);
99 /* 19 */
100 EXTERN void Tcl_DbDecrRefCount(Tcl_Obj *objPtr, const char *file,
101 int line);
102 /* 20 */
103 EXTERN void Tcl_DbIncrRefCount(Tcl_Obj *objPtr, const char *file,
104 int line);
105 /* 21 */
106 EXTERN int Tcl_DbIsShared(Tcl_Obj *objPtr, const char *file,
107 int line);
108 /* 22 */
109 EXTERN Tcl_Obj * Tcl_DbNewBooleanObj(int boolValue, const char *file,
110 int line);
111 /* 23 */
112 EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj(const unsigned char *bytes,
113 int length, const char *file, int line);
114 /* 24 */
115 EXTERN Tcl_Obj * Tcl_DbNewDoubleObj(double doubleValue,
116 const char *file, int line);
117 /* 25 */
118 EXTERN Tcl_Obj * Tcl_DbNewListObj(int objc, Tcl_Obj *const *objv,
119 const char *file, int line);
120 /* 26 */
121 EXTERN Tcl_Obj * Tcl_DbNewLongObj(long longValue, const char *file,
122 int line);
123 /* 27 */
124 EXTERN Tcl_Obj * Tcl_DbNewObj(const char *file, int line);
125 /* 28 */
126 EXTERN Tcl_Obj * Tcl_DbNewStringObj(const char *bytes, int length,
127 const char *file, int line);
128 /* 29 */
129 EXTERN Tcl_Obj * Tcl_DuplicateObj(Tcl_Obj *objPtr);
130 /* 30 */
131 EXTERN void TclFreeObj(Tcl_Obj *objPtr);
132 /* 31 */
133 EXTERN int Tcl_GetBoolean(Tcl_Interp *interp, const char *src,
134 int *boolPtr);
135 /* 32 */
136 EXTERN int Tcl_GetBooleanFromObj(Tcl_Interp *interp,
137 Tcl_Obj *objPtr, int *boolPtr);
138 /* 33 */
139 EXTERN unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr,
140 int *lengthPtr);
141 /* 34 */
142 EXTERN int Tcl_GetDouble(Tcl_Interp *interp, const char *src,
143 double *doublePtr);
144 /* 35 */
145 EXTERN int Tcl_GetDoubleFromObj(Tcl_Interp *interp,
146 Tcl_Obj *objPtr, double *doublePtr);
147 /* 36 */
148 EXTERN int Tcl_GetIndexFromObj(Tcl_Interp *interp,
149 Tcl_Obj *objPtr,
150 CONST84 char *const *tablePtr,
151 const char *msg, int flags, int *indexPtr);
152 /* 37 */
153 EXTERN int Tcl_GetInt(Tcl_Interp *interp, const char *src,
154 int *intPtr);
155 /* 38 */
156 EXTERN int Tcl_GetIntFromObj(Tcl_Interp *interp,
157 Tcl_Obj *objPtr, int *intPtr);
158 /* 39 */
159 EXTERN int Tcl_GetLongFromObj(Tcl_Interp *interp,
160 Tcl_Obj *objPtr, long *longPtr);
161 /* 40 */
162 EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType(const char *typeName);
163 /* 41 */
164 EXTERN char * Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr);
165 /* 42 */
166 EXTERN void Tcl_InvalidateStringRep(Tcl_Obj *objPtr);
167 /* 43 */
168 EXTERN int Tcl_ListObjAppendList(Tcl_Interp *interp,
169 Tcl_Obj *listPtr, Tcl_Obj *elemListPtr);
170 /* 44 */
171 EXTERN int Tcl_ListObjAppendElement(Tcl_Interp *interp,
172 Tcl_Obj *listPtr, Tcl_Obj *objPtr);
173 /* 45 */
174 EXTERN int Tcl_ListObjGetElements(Tcl_Interp *interp,
175 Tcl_Obj *listPtr, int *objcPtr,
176 Tcl_Obj ***objvPtr);
177 /* 46 */
178 EXTERN int Tcl_ListObjIndex(Tcl_Interp *interp,
179 Tcl_Obj *listPtr, int index,
180 Tcl_Obj **objPtrPtr);
181 /* 47 */
182 EXTERN int Tcl_ListObjLength(Tcl_Interp *interp,
183 Tcl_Obj *listPtr, int *lengthPtr);
184 /* 48 */
185 EXTERN int Tcl_ListObjReplace(Tcl_Interp *interp,
186 Tcl_Obj *listPtr, int first, int count,
187 int objc, Tcl_Obj *const objv[]);
188 /* 49 */
189 EXTERN Tcl_Obj * Tcl_NewBooleanObj(int boolValue);
190 /* 50 */
191 EXTERN Tcl_Obj * Tcl_NewByteArrayObj(const unsigned char *bytes,
192 int length);
193 /* 51 */
194 EXTERN Tcl_Obj * Tcl_NewDoubleObj(double doubleValue);
195 /* 52 */
196 EXTERN Tcl_Obj * Tcl_NewIntObj(int intValue);
197 /* 53 */
198 EXTERN Tcl_Obj * Tcl_NewListObj(int objc, Tcl_Obj *const objv[]);
199 /* 54 */
200 EXTERN Tcl_Obj * Tcl_NewLongObj(long longValue);
201 /* 55 */
202 EXTERN Tcl_Obj * Tcl_NewObj(void);
203 /* 56 */
204 EXTERN Tcl_Obj * Tcl_NewStringObj(const char *bytes, int length);
205 /* 57 */
206 EXTERN void Tcl_SetBooleanObj(Tcl_Obj *objPtr, int boolValue);
207 /* 58 */
208 EXTERN unsigned char * Tcl_SetByteArrayLength(Tcl_Obj *objPtr, int length);
209 /* 59 */
210 EXTERN void Tcl_SetByteArrayObj(Tcl_Obj *objPtr,
211 const unsigned char *bytes, int length);
212 /* 60 */
213 EXTERN void Tcl_SetDoubleObj(Tcl_Obj *objPtr, double doubleValue);
214 /* 61 */
215 EXTERN void Tcl_SetIntObj(Tcl_Obj *objPtr, int intValue);
216 /* 62 */
217 EXTERN void Tcl_SetListObj(Tcl_Obj *objPtr, int objc,
218 Tcl_Obj *const objv[]);
219 /* 63 */
220 EXTERN void Tcl_SetLongObj(Tcl_Obj *objPtr, long longValue);
221 /* 64 */
222 EXTERN void Tcl_SetObjLength(Tcl_Obj *objPtr, int length);
223 /* 65 */
224 EXTERN void Tcl_SetStringObj(Tcl_Obj *objPtr, const char *bytes,
225 int length);
226 /* 66 */
227 EXTERN void Tcl_AddErrorInfo(Tcl_Interp *interp,
228 const char *message);
229 /* 67 */
230 EXTERN void Tcl_AddObjErrorInfo(Tcl_Interp *interp,
231 const char *message, int length);
232 /* 68 */
233 EXTERN void Tcl_AllowExceptions(Tcl_Interp *interp);
234 /* 69 */
235 EXTERN void Tcl_AppendElement(Tcl_Interp *interp,
236 const char *element);
237 /* 70 */
238 EXTERN void Tcl_AppendResult(Tcl_Interp *interp, ...);
239 /* 71 */
240 EXTERN Tcl_AsyncHandler Tcl_AsyncCreate(Tcl_AsyncProc *proc,
241 ClientData clientData);
242 /* 72 */
243 EXTERN void Tcl_AsyncDelete(Tcl_AsyncHandler async);
244 /* 73 */
245 EXTERN int Tcl_AsyncInvoke(Tcl_Interp *interp, int code);
246 /* 74 */
247 EXTERN void Tcl_AsyncMark(Tcl_AsyncHandler async);
248 /* 75 */
249 EXTERN int Tcl_AsyncReady(void);
250 /* 76 */
251 EXTERN void Tcl_BackgroundError(Tcl_Interp *interp);
252 /* 77 */
253 EXTERN char Tcl_Backslash(const char *src, int *readPtr);
254 /* 78 */
255 EXTERN int Tcl_BadChannelOption(Tcl_Interp *interp,
256 const char *optionName,
257 const char *optionList);
258 /* 79 */
259 EXTERN void Tcl_CallWhenDeleted(Tcl_Interp *interp,
260 Tcl_InterpDeleteProc *proc,
261 ClientData clientData);
262 /* 80 */
263 EXTERN void Tcl_CancelIdleCall(Tcl_IdleProc *idleProc,
264 ClientData clientData);
265 /* 81 */
266 EXTERN int Tcl_Close(Tcl_Interp *interp, Tcl_Channel chan);
267 /* 82 */
268 EXTERN int Tcl_CommandComplete(const char *cmd);
269 /* 83 */
270 EXTERN char * Tcl_Concat(int argc, CONST84 char *const *argv);
271 /* 84 */
272 EXTERN int Tcl_ConvertElement(const char *src, char *dst,
273 int flags);
274 /* 85 */
275 EXTERN int Tcl_ConvertCountedElement(const char *src,
276 int length, char *dst, int flags);
277 /* 86 */
278 EXTERN int Tcl_CreateAlias(Tcl_Interp *slave,
279 const char *slaveCmd, Tcl_Interp *target,
280 const char *targetCmd, int argc,
281 CONST84 char *const *argv);
282 /* 87 */
283 EXTERN int Tcl_CreateAliasObj(Tcl_Interp *slave,
284 const char *slaveCmd, Tcl_Interp *target,
285 const char *targetCmd, int objc,
286 Tcl_Obj *const objv[]);
287 /* 88 */
288 EXTERN Tcl_Channel Tcl_CreateChannel(const Tcl_ChannelType *typePtr,
289 const char *chanName,
290 ClientData instanceData, int mask);
291 /* 89 */
292 EXTERN void Tcl_CreateChannelHandler(Tcl_Channel chan, int mask,
293 Tcl_ChannelProc *proc, ClientData clientData);
294 /* 90 */
295 EXTERN void Tcl_CreateCloseHandler(Tcl_Channel chan,
296 Tcl_CloseProc *proc, ClientData clientData);
297 /* 91 */
298 EXTERN Tcl_Command Tcl_CreateCommand(Tcl_Interp *interp,
299 const char *cmdName, Tcl_CmdProc *proc,
300 ClientData clientData,
301 Tcl_CmdDeleteProc *deleteProc);
302 /* 92 */
303 EXTERN void Tcl_CreateEventSource(Tcl_EventSetupProc *setupProc,
304 Tcl_EventCheckProc *checkProc,
305 ClientData clientData);
306 /* 93 */
307 EXTERN void Tcl_CreateExitHandler(Tcl_ExitProc *proc,
308 ClientData clientData);
309 /* 94 */
310 EXTERN Tcl_Interp * Tcl_CreateInterp(void);
311 /* 95 */
312 EXTERN void Tcl_CreateMathFunc(Tcl_Interp *interp,
313 const char *name, int numArgs,
314 Tcl_ValueType *argTypes, Tcl_MathProc *proc,
315 ClientData clientData);
316 /* 96 */
317 EXTERN Tcl_Command Tcl_CreateObjCommand(Tcl_Interp *interp,
318 const char *cmdName, Tcl_ObjCmdProc *proc,
319 ClientData clientData,
320 Tcl_CmdDeleteProc *deleteProc);
321 /* 97 */
322 EXTERN Tcl_Interp * Tcl_CreateSlave(Tcl_Interp *interp,
323 const char *slaveName, int isSafe);
324 /* 98 */
325 EXTERN Tcl_TimerToken Tcl_CreateTimerHandler(int milliseconds,
326 Tcl_TimerProc *proc, ClientData clientData);
327 /* 99 */
328 EXTERN Tcl_Trace Tcl_CreateTrace(Tcl_Interp *interp, int level,
329 Tcl_CmdTraceProc *proc,
330 ClientData clientData);
331 /* 100 */
332 EXTERN void Tcl_DeleteAssocData(Tcl_Interp *interp,
333 const char *name);
334 /* 101 */
335 EXTERN void Tcl_DeleteChannelHandler(Tcl_Channel chan,
336 Tcl_ChannelProc *proc, ClientData clientData);
337 /* 102 */
338 EXTERN void Tcl_DeleteCloseHandler(Tcl_Channel chan,
339 Tcl_CloseProc *proc, ClientData clientData);
340 /* 103 */
341 EXTERN int Tcl_DeleteCommand(Tcl_Interp *interp,
342 const char *cmdName);
343 /* 104 */
344 EXTERN int Tcl_DeleteCommandFromToken(Tcl_Interp *interp,
345 Tcl_Command command);
346 /* 105 */
347 EXTERN void Tcl_DeleteEvents(Tcl_EventDeleteProc *proc,
348 ClientData clientData);
349 /* 106 */
350 EXTERN void Tcl_DeleteEventSource(Tcl_EventSetupProc *setupProc,
351 Tcl_EventCheckProc *checkProc,
352 ClientData clientData);
353 /* 107 */
354 EXTERN void Tcl_DeleteExitHandler(Tcl_ExitProc *proc,
355 ClientData clientData);
356 /* 108 */
357 EXTERN void Tcl_DeleteHashEntry(Tcl_HashEntry *entryPtr);
358 /* 109 */
359 EXTERN void Tcl_DeleteHashTable(Tcl_HashTable *tablePtr);
360 /* 110 */
361 EXTERN void Tcl_DeleteInterp(Tcl_Interp *interp);
362 /* 111 */
363 EXTERN void Tcl_DetachPids(int numPids, Tcl_Pid *pidPtr);
364 /* 112 */
365 EXTERN void Tcl_DeleteTimerHandler(Tcl_TimerToken token);
366 /* 113 */
367 EXTERN void Tcl_DeleteTrace(Tcl_Interp *interp, Tcl_Trace trace);
368 /* 114 */
369 EXTERN void Tcl_DontCallWhenDeleted(Tcl_Interp *interp,
370 Tcl_InterpDeleteProc *proc,
371 ClientData clientData);
372 /* 115 */
373 EXTERN int Tcl_DoOneEvent(int flags);
374 /* 116 */
375 EXTERN void Tcl_DoWhenIdle(Tcl_IdleProc *proc,
376 ClientData clientData);
377 /* 117 */
378 EXTERN char * Tcl_DStringAppend(Tcl_DString *dsPtr,
379 const char *bytes, int length);
380 /* 118 */
381 EXTERN char * Tcl_DStringAppendElement(Tcl_DString *dsPtr,
382 const char *element);
383 /* 119 */
384 EXTERN void Tcl_DStringEndSublist(Tcl_DString *dsPtr);
385 /* 120 */
386 EXTERN void Tcl_DStringFree(Tcl_DString *dsPtr);
387 /* 121 */
388 EXTERN void Tcl_DStringGetResult(Tcl_Interp *interp,
389 Tcl_DString *dsPtr);
390 /* 122 */
391 EXTERN void Tcl_DStringInit(Tcl_DString *dsPtr);
392 /* 123 */
393 EXTERN void Tcl_DStringResult(Tcl_Interp *interp,
394 Tcl_DString *dsPtr);
395 /* 124 */
396 EXTERN void Tcl_DStringSetLength(Tcl_DString *dsPtr, int length);
397 /* 125 */
398 EXTERN void Tcl_DStringStartSublist(Tcl_DString *dsPtr);
399 /* 126 */
400 EXTERN int Tcl_Eof(Tcl_Channel chan);
401 /* 127 */
402 EXTERN CONST84_RETURN char * Tcl_ErrnoId(void);
403 /* 128 */
404 EXTERN CONST84_RETURN char * Tcl_ErrnoMsg(int err);
405 /* 129 */
406 EXTERN int Tcl_Eval(Tcl_Interp *interp, const char *script);
407 /* 130 */
408 EXTERN int Tcl_EvalFile(Tcl_Interp *interp,
409 const char *fileName);
410 /* 131 */
411 EXTERN int Tcl_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr);
412 /* 132 */
413 EXTERN void Tcl_EventuallyFree(ClientData clientData,
414 Tcl_FreeProc *freeProc);
415 /* 133 */
416 EXTERN void Tcl_Exit(int status);
417 /* 134 */
418 EXTERN int Tcl_ExposeCommand(Tcl_Interp *interp,
419 const char *hiddenCmdToken,
420 const char *cmdName);
421 /* 135 */
422 EXTERN int Tcl_ExprBoolean(Tcl_Interp *interp, const char *expr,
423 int *ptr);
424 /* 136 */
425 EXTERN int Tcl_ExprBooleanObj(Tcl_Interp *interp,
426 Tcl_Obj *objPtr, int *ptr);
427 /* 137 */
428 EXTERN int Tcl_ExprDouble(Tcl_Interp *interp, const char *expr,
429 double *ptr);
430 /* 138 */
431 EXTERN int Tcl_ExprDoubleObj(Tcl_Interp *interp,
432 Tcl_Obj *objPtr, double *ptr);
433 /* 139 */
434 EXTERN int Tcl_ExprLong(Tcl_Interp *interp, const char *expr,
435 long *ptr);
436 /* 140 */
437 EXTERN int Tcl_ExprLongObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
438 long *ptr);
439 /* 141 */
440 EXTERN int Tcl_ExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
441 Tcl_Obj **resultPtrPtr);
442 /* 142 */
443 EXTERN int Tcl_ExprString(Tcl_Interp *interp, const char *expr);
444 /* 143 */
445 EXTERN void Tcl_Finalize(void);
446 /* 144 */
447 EXTERN void Tcl_FindExecutable(const char *argv0);
448 /* 145 */
449 EXTERN Tcl_HashEntry * Tcl_FirstHashEntry(Tcl_HashTable *tablePtr,
450 Tcl_HashSearch *searchPtr);
451 /* 146 */
452 EXTERN int Tcl_Flush(Tcl_Channel chan);
453 /* 147 */
454 EXTERN void Tcl_FreeResult(Tcl_Interp *interp);
455 /* 148 */
456 EXTERN int Tcl_GetAlias(Tcl_Interp *interp,
457 const char *slaveCmd,
458 Tcl_Interp **targetInterpPtr,
459 CONST84 char **targetCmdPtr, int *argcPtr,
460 CONST84 char ***argvPtr);
461 /* 149 */
462 EXTERN int Tcl_GetAliasObj(Tcl_Interp *interp,
463 const char *slaveCmd,
464 Tcl_Interp **targetInterpPtr,
465 CONST84 char **targetCmdPtr, int *objcPtr,
466 Tcl_Obj ***objv);
467 /* 150 */
468 EXTERN ClientData Tcl_GetAssocData(Tcl_Interp *interp,
469 const char *name,
470 Tcl_InterpDeleteProc **procPtr);
471 /* 151 */
472 EXTERN Tcl_Channel Tcl_GetChannel(Tcl_Interp *interp,
473 const char *chanName, int *modePtr);
474 /* 152 */
475 EXTERN int Tcl_GetChannelBufferSize(Tcl_Channel chan);
476 /* 153 */
477 EXTERN int Tcl_GetChannelHandle(Tcl_Channel chan, int direction,
478 ClientData *handlePtr);
479 /* 154 */
480 EXTERN ClientData Tcl_GetChannelInstanceData(Tcl_Channel chan);
481 /* 155 */
482 EXTERN int Tcl_GetChannelMode(Tcl_Channel chan);
483 /* 156 */
484 EXTERN CONST84_RETURN char * Tcl_GetChannelName(Tcl_Channel chan);
485 /* 157 */
486 EXTERN int Tcl_GetChannelOption(Tcl_Interp *interp,
487 Tcl_Channel chan, const char *optionName,
488 Tcl_DString *dsPtr);
489 /* 158 */
490 EXTERN CONST86 Tcl_ChannelType * Tcl_GetChannelType(Tcl_Channel chan);
491 /* 159 */
492 EXTERN int Tcl_GetCommandInfo(Tcl_Interp *interp,
493 const char *cmdName, Tcl_CmdInfo *infoPtr);
494 /* 160 */
495 EXTERN CONST84_RETURN char * Tcl_GetCommandName(Tcl_Interp *interp,
496 Tcl_Command command);
497 /* 161 */
498 EXTERN int Tcl_GetErrno(void);
499 /* 162 */
500 EXTERN CONST84_RETURN char * Tcl_GetHostName(void);
501 /* 163 */
502 EXTERN int Tcl_GetInterpPath(Tcl_Interp *askInterp,
503 Tcl_Interp *slaveInterp);
504 /* 164 */
505 EXTERN Tcl_Interp * Tcl_GetMaster(Tcl_Interp *interp);
506 /* 165 */
507 EXTERN const char * Tcl_GetNameOfExecutable(void);
508 /* 166 */
509 EXTERN Tcl_Obj * Tcl_GetObjResult(Tcl_Interp *interp);
510 #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
511 /* 167 */
512 EXTERN int Tcl_GetOpenFile(Tcl_Interp *interp,
513 const char *chanID, int forWriting,
514 int checkUsage, ClientData *filePtr);
515 #endif /* UNIX */
516 #ifdef MAC_OSX_TCL /* MACOSX */
517 /* 167 */
518 EXTERN int Tcl_GetOpenFile(Tcl_Interp *interp,
519 const char *chanID, int forWriting,
520 int checkUsage, ClientData *filePtr);
521 #endif /* MACOSX */
522 /* 168 */
523 EXTERN Tcl_PathType Tcl_GetPathType(const char *path);
524 /* 169 */
525 EXTERN int Tcl_Gets(Tcl_Channel chan, Tcl_DString *dsPtr);
526 /* 170 */
527 EXTERN int Tcl_GetsObj(Tcl_Channel chan, Tcl_Obj *objPtr);
528 /* 171 */
529 EXTERN int Tcl_GetServiceMode(void);
530 /* 172 */
531 EXTERN Tcl_Interp * Tcl_GetSlave(Tcl_Interp *interp,
532 const char *slaveName);
533 /* 173 */
534 EXTERN Tcl_Channel Tcl_GetStdChannel(int type);
535 /* 174 */
536 EXTERN CONST84_RETURN char * Tcl_GetStringResult(Tcl_Interp *interp);
537 /* 175 */
538 EXTERN CONST84_RETURN char * Tcl_GetVar(Tcl_Interp *interp,
539 const char *varName, int flags);
540 /* 176 */
541 EXTERN CONST84_RETURN char * Tcl_GetVar2(Tcl_Interp *interp,
542 const char *part1, const char *part2,
543 int flags);
544 /* 177 */
545 EXTERN int Tcl_GlobalEval(Tcl_Interp *interp,
546 const char *command);
547 /* 178 */
548 EXTERN int Tcl_GlobalEvalObj(Tcl_Interp *interp,
549 Tcl_Obj *objPtr);
550 /* 179 */
551 EXTERN int Tcl_HideCommand(Tcl_Interp *interp,
552 const char *cmdName,
553 const char *hiddenCmdToken);
554 /* 180 */
555 EXTERN int Tcl_Init(Tcl_Interp *interp);
556 /* 181 */
557 EXTERN void Tcl_InitHashTable(Tcl_HashTable *tablePtr,
558 int keyType);
559 /* 182 */
560 EXTERN int Tcl_InputBlocked(Tcl_Channel chan);
561 /* 183 */
562 EXTERN int Tcl_InputBuffered(Tcl_Channel chan);
563 /* 184 */
564 EXTERN int Tcl_InterpDeleted(Tcl_Interp *interp);
565 /* 185 */
566 EXTERN int Tcl_IsSafe(Tcl_Interp *interp);
567 /* 186 */
568 EXTERN char * Tcl_JoinPath(int argc, CONST84 char *const *argv,
569 Tcl_DString *resultPtr);
570 /* 187 */
571 EXTERN int Tcl_LinkVar(Tcl_Interp *interp, const char *varName,
572 char *addr, int type);
573 /* Slot 188 is reserved */
574 /* 189 */
575 EXTERN Tcl_Channel Tcl_MakeFileChannel(ClientData handle, int mode);
576 /* 190 */
577 EXTERN int Tcl_MakeSafe(Tcl_Interp *interp);
578 /* 191 */
579 EXTERN Tcl_Channel Tcl_MakeTcpClientChannel(ClientData tcpSocket);
580 /* 192 */
581 EXTERN char * Tcl_Merge(int argc, CONST84 char *const *argv);
582 /* 193 */
583 EXTERN Tcl_HashEntry * Tcl_NextHashEntry(Tcl_HashSearch *searchPtr);
584 /* 194 */
585 EXTERN void Tcl_NotifyChannel(Tcl_Channel channel, int mask);
586 /* 195 */
587 EXTERN Tcl_Obj * Tcl_ObjGetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
588 Tcl_Obj *part2Ptr, int flags);
589 /* 196 */
590 EXTERN Tcl_Obj * Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
591 Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr,
592 int flags);
593 /* 197 */
594 EXTERN Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp, int argc,
595 CONST84 char **argv, int flags);
596 /* 198 */
597 EXTERN Tcl_Channel Tcl_OpenFileChannel(Tcl_Interp *interp,
598 const char *fileName, const char *modeString,
599 int permissions);
600 /* 199 */
601 EXTERN Tcl_Channel Tcl_OpenTcpClient(Tcl_Interp *interp, int port,
602 const char *address, const char *myaddr,
603 int myport, int async);
604 /* 200 */
605 EXTERN Tcl_Channel Tcl_OpenTcpServer(Tcl_Interp *interp, int port,
606 const char *host,
607 Tcl_TcpAcceptProc *acceptProc,
608 ClientData callbackData);
609 /* 201 */
610 EXTERN void Tcl_Preserve(ClientData data);
611 /* 202 */
612 EXTERN void Tcl_PrintDouble(Tcl_Interp *interp, double value,
613 char *dst);
614 /* 203 */
615 EXTERN int Tcl_PutEnv(const char *assignment);
616 /* 204 */
617 EXTERN CONST84_RETURN char * Tcl_PosixError(Tcl_Interp *interp);
618 /* 205 */
619 EXTERN void Tcl_QueueEvent(Tcl_Event *evPtr,
620 Tcl_QueuePosition position);
621 /* 206 */
622 EXTERN int Tcl_Read(Tcl_Channel chan, char *bufPtr, int toRead);
623 /* 207 */
624 EXTERN void Tcl_ReapDetachedProcs(void);
625 /* 208 */
626 EXTERN int Tcl_RecordAndEval(Tcl_Interp *interp,
627 const char *cmd, int flags);
628 /* 209 */
629 EXTERN int Tcl_RecordAndEvalObj(Tcl_Interp *interp,
630 Tcl_Obj *cmdPtr, int flags);
631 /* 210 */
632 EXTERN void Tcl_RegisterChannel(Tcl_Interp *interp,
633 Tcl_Channel chan);
634 /* 211 */
635 EXTERN void Tcl_RegisterObjType(const Tcl_ObjType *typePtr);
636 /* 212 */
637 EXTERN Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp,
638 const char *pattern);
639 /* 213 */
640 EXTERN int Tcl_RegExpExec(Tcl_Interp *interp, Tcl_RegExp regexp,
641 const char *text, const char *start);
642 /* 214 */
643 EXTERN int Tcl_RegExpMatch(Tcl_Interp *interp, const char *text,
644 const char *pattern);
645 /* 215 */
646 EXTERN void Tcl_RegExpRange(Tcl_RegExp regexp, int index,
647 CONST84 char **startPtr,
648 CONST84 char **endPtr);
649 /* 216 */
650 EXTERN void Tcl_Release(ClientData clientData);
651 /* 217 */
652 EXTERN void Tcl_ResetResult(Tcl_Interp *interp);
653 /* 218 */
654 EXTERN int Tcl_ScanElement(const char *src, int *flagPtr);
655 /* 219 */
656 EXTERN int Tcl_ScanCountedElement(const char *src, int length,
657 int *flagPtr);
658 /* 220 */
659 EXTERN int Tcl_SeekOld(Tcl_Channel chan, int offset, int mode);
660 /* 221 */
661 EXTERN int Tcl_ServiceAll(void);
662 /* 222 */
663 EXTERN int Tcl_ServiceEvent(int flags);
664 /* 223 */
665 EXTERN void Tcl_SetAssocData(Tcl_Interp *interp,
666 const char *name, Tcl_InterpDeleteProc *proc,
667 ClientData clientData);
668 /* 224 */
669 EXTERN void Tcl_SetChannelBufferSize(Tcl_Channel chan, int sz);
670 /* 225 */
671 EXTERN int Tcl_SetChannelOption(Tcl_Interp *interp,
672 Tcl_Channel chan, const char *optionName,
673 const char *newValue);
674 /* 226 */
675 EXTERN int Tcl_SetCommandInfo(Tcl_Interp *interp,
676 const char *cmdName,
677 const Tcl_CmdInfo *infoPtr);
678 /* 227 */
679 EXTERN void Tcl_SetErrno(int err);
680 /* 228 */
681 EXTERN void Tcl_SetErrorCode(Tcl_Interp *interp, ...);
682 /* 229 */
683 EXTERN void Tcl_SetMaxBlockTime(const Tcl_Time *timePtr);
684 /* 230 */
685 EXTERN void Tcl_SetPanicProc(Tcl_PanicProc *panicProc);
686 /* 231 */
687 EXTERN int Tcl_SetRecursionLimit(Tcl_Interp *interp, int depth);
688 /* 232 */
689 EXTERN void Tcl_SetResult(Tcl_Interp *interp, char *result,
690 Tcl_FreeProc *freeProc);
691 /* 233 */
692 EXTERN int Tcl_SetServiceMode(int mode);
693 /* 234 */
694 EXTERN void Tcl_SetObjErrorCode(Tcl_Interp *interp,
695 Tcl_Obj *errorObjPtr);
696 /* 235 */
697 EXTERN void Tcl_SetObjResult(Tcl_Interp *interp,
698 Tcl_Obj *resultObjPtr);
699 /* 236 */
700 EXTERN void Tcl_SetStdChannel(Tcl_Channel channel, int type);
701 /* 237 */
702 EXTERN CONST84_RETURN char * Tcl_SetVar(Tcl_Interp *interp,
703 const char *varName, const char *newValue,
704 int flags);
705 /* 238 */
706 EXTERN CONST84_RETURN char * Tcl_SetVar2(Tcl_Interp *interp,
707 const char *part1, const char *part2,
708 const char *newValue, int flags);
709 /* 239 */
710 EXTERN CONST84_RETURN char * Tcl_SignalId(int sig);
711 /* 240 */
712 EXTERN CONST84_RETURN char * Tcl_SignalMsg(int sig);
713 /* 241 */
714 EXTERN void Tcl_SourceRCFile(Tcl_Interp *interp);
715 /* 242 */
716 EXTERN int Tcl_SplitList(Tcl_Interp *interp,
717 const char *listStr, int *argcPtr,
718 CONST84 char ***argvPtr);
719 /* 243 */
720 EXTERN void Tcl_SplitPath(const char *path, int *argcPtr,
721 CONST84 char ***argvPtr);
722 /* 244 */
723 EXTERN void Tcl_StaticPackage(Tcl_Interp *interp,
724 const char *pkgName,
725 Tcl_PackageInitProc *initProc,
726 Tcl_PackageInitProc *safeInitProc);
727 /* 245 */
728 EXTERN int Tcl_StringMatch(const char *str, const char *pattern);
729 /* 246 */
730 EXTERN int Tcl_TellOld(Tcl_Channel chan);
731 /* 247 */
732 EXTERN int Tcl_TraceVar(Tcl_Interp *interp, const char *varName,
733 int flags, Tcl_VarTraceProc *proc,
734 ClientData clientData);
735 /* 248 */
736 EXTERN int Tcl_TraceVar2(Tcl_Interp *interp, const char *part1,
737 const char *part2, int flags,
738 Tcl_VarTraceProc *proc,
739 ClientData clientData);
740 /* 249 */
741 EXTERN char * Tcl_TranslateFileName(Tcl_Interp *interp,
742 const char *name, Tcl_DString *bufferPtr);
743 /* 250 */
744 EXTERN int Tcl_Ungets(Tcl_Channel chan, const char *str,
745 int len, int atHead);
746 /* 251 */
747 EXTERN void Tcl_UnlinkVar(Tcl_Interp *interp,
748 const char *varName);
749 /* 252 */
750 EXTERN int Tcl_UnregisterChannel(Tcl_Interp *interp,
751 Tcl_Channel chan);
752 /* 253 */
753 EXTERN int Tcl_UnsetVar(Tcl_Interp *interp, const char *varName,
754 int flags);
755 /* 254 */
756 EXTERN int Tcl_UnsetVar2(Tcl_Interp *interp, const char *part1,
757 const char *part2, int flags);
758 /* 255 */
759 EXTERN void Tcl_UntraceVar(Tcl_Interp *interp,
760 const char *varName, int flags,
761 Tcl_VarTraceProc *proc,
762 ClientData clientData);
763 /* 256 */
764 EXTERN void Tcl_UntraceVar2(Tcl_Interp *interp,
765 const char *part1, const char *part2,
766 int flags, Tcl_VarTraceProc *proc,
767 ClientData clientData);
768 /* 257 */
769 EXTERN void Tcl_UpdateLinkedVar(Tcl_Interp *interp,
770 const char *varName);
771 /* 258 */
772 EXTERN int Tcl_UpVar(Tcl_Interp *interp, const char *frameName,
773 const char *varName, const char *localName,
774 int flags);
775 /* 259 */
776 EXTERN int Tcl_UpVar2(Tcl_Interp *interp, const char *frameName,
777 const char *part1, const char *part2,
778 const char *localName, int flags);
779 /* 260 */
780 EXTERN int Tcl_VarEval(Tcl_Interp *interp, ...);
781 /* 261 */
782 EXTERN ClientData Tcl_VarTraceInfo(Tcl_Interp *interp,
783 const char *varName, int flags,
784 Tcl_VarTraceProc *procPtr,
785 ClientData prevClientData);
786 /* 262 */
787 EXTERN ClientData Tcl_VarTraceInfo2(Tcl_Interp *interp,
788 const char *part1, const char *part2,
789 int flags, Tcl_VarTraceProc *procPtr,
790 ClientData prevClientData);
791 /* 263 */
792 EXTERN int Tcl_Write(Tcl_Channel chan, const char *s, int slen);
793 /* 264 */
794 EXTERN void Tcl_WrongNumArgs(Tcl_Interp *interp, int objc,
795 Tcl_Obj *const objv[], const char *message);
796 /* 265 */
797 EXTERN int Tcl_DumpActiveMemory(const char *fileName);
798 /* 266 */
799 EXTERN void Tcl_ValidateAllMemory(const char *file, int line);
800 /* 267 */
801 EXTERN void Tcl_AppendResultVA(Tcl_Interp *interp,
802 va_list argList);
803 /* 268 */
804 EXTERN void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr,
805 va_list argList);
806 /* 269 */
807 EXTERN char * Tcl_HashStats(Tcl_HashTable *tablePtr);
808 /* 270 */
809 EXTERN CONST84_RETURN char * Tcl_ParseVar(Tcl_Interp *interp,
810 const char *start, CONST84 char **termPtr);
811 /* 271 */
812 EXTERN CONST84_RETURN char * Tcl_PkgPresent(Tcl_Interp *interp,
813 const char *name, const char *version,
814 int exact);
815 /* 272 */
816 EXTERN CONST84_RETURN char * Tcl_PkgPresentEx(Tcl_Interp *interp,
817 const char *name, const char *version,
818 int exact, void *clientDataPtr);
819 /* 273 */
820 EXTERN int Tcl_PkgProvide(Tcl_Interp *interp, const char *name,
821 const char *version);
822 /* 274 */
823 EXTERN CONST84_RETURN char * Tcl_PkgRequire(Tcl_Interp *interp,
824 const char *name, const char *version,
825 int exact);
826 /* 275 */
827 EXTERN void Tcl_SetErrorCodeVA(Tcl_Interp *interp,
828 va_list argList);
829 /* 276 */
830 EXTERN int Tcl_VarEvalVA(Tcl_Interp *interp, va_list argList);
831 /* 277 */
832 EXTERN Tcl_Pid Tcl_WaitPid(Tcl_Pid pid, int *statPtr, int options);
833 /* 278 */
834 EXTERN void Tcl_PanicVA(const char *format, va_list argList);
835 /* 279 */
836 EXTERN void Tcl_GetVersion(int *major, int *minor,
837 int *patchLevel, int *type);
838 /* 280 */
839 EXTERN void Tcl_InitMemory(Tcl_Interp *interp);
840 /* 281 */
841 EXTERN Tcl_Channel Tcl_StackChannel(Tcl_Interp *interp,
842 const Tcl_ChannelType *typePtr,
843 ClientData instanceData, int mask,
844 Tcl_Channel prevChan);
845 /* 282 */
846 EXTERN int Tcl_UnstackChannel(Tcl_Interp *interp,
847 Tcl_Channel chan);
848 /* 283 */
849 EXTERN Tcl_Channel Tcl_GetStackedChannel(Tcl_Channel chan);
850 /* 284 */
851 EXTERN void Tcl_SetMainLoop(Tcl_MainLoopProc *proc);
852 /* Slot 285 is reserved */
853 /* 286 */
854 EXTERN void Tcl_AppendObjToObj(Tcl_Obj *objPtr,
855 Tcl_Obj *appendObjPtr);
856 /* 287 */
857 EXTERN Tcl_Encoding Tcl_CreateEncoding(const Tcl_EncodingType *typePtr);
858 /* 288 */
859 EXTERN void Tcl_CreateThreadExitHandler(Tcl_ExitProc *proc,
860 ClientData clientData);
861 /* 289 */
862 EXTERN void Tcl_DeleteThreadExitHandler(Tcl_ExitProc *proc,
863 ClientData clientData);
864 /* 290 */
865 EXTERN void Tcl_DiscardResult(Tcl_SavedResult *statePtr);
866 /* 291 */
867 EXTERN int Tcl_EvalEx(Tcl_Interp *interp, const char *script,
868 int numBytes, int flags);
869 /* 292 */
870 EXTERN int Tcl_EvalObjv(Tcl_Interp *interp, int objc,
871 Tcl_Obj *const objv[], int flags);
872 /* 293 */
873 EXTERN int Tcl_EvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr,
874 int flags);
875 /* 294 */
876 EXTERN void Tcl_ExitThread(int status);
877 /* 295 */
878 EXTERN int Tcl_ExternalToUtf(Tcl_Interp *interp,
879 Tcl_Encoding encoding, const char *src,
880 int srcLen, int flags,
881 Tcl_EncodingState *statePtr, char *dst,
882 int dstLen, int *srcReadPtr,
883 int *dstWrotePtr, int *dstCharsPtr);
884 /* 296 */
885 EXTERN char * Tcl_ExternalToUtfDString(Tcl_Encoding encoding,
886 const char *src, int srcLen,
887 Tcl_DString *dsPtr);
888 /* 297 */
889 EXTERN void Tcl_FinalizeThread(void);
890 /* 298 */
891 EXTERN void Tcl_FinalizeNotifier(ClientData clientData);
892 /* 299 */
893 EXTERN void Tcl_FreeEncoding(Tcl_Encoding encoding);
894 /* 300 */
895 EXTERN Tcl_ThreadId Tcl_GetCurrentThread(void);
896 /* 301 */
897 EXTERN Tcl_Encoding Tcl_GetEncoding(Tcl_Interp *interp, const char *name);
898 /* 302 */
899 EXTERN CONST84_RETURN char * Tcl_GetEncodingName(Tcl_Encoding encoding);
900 /* 303 */
901 EXTERN void Tcl_GetEncodingNames(Tcl_Interp *interp);
902 /* 304 */
903 EXTERN int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp,
904 Tcl_Obj *objPtr, const void *tablePtr,
905 int offset, const char *msg, int flags,
906 int *indexPtr);
907 /* 305 */
908 EXTERN void * Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr,
909 int size);
910 /* 306 */
911 EXTERN Tcl_Obj * Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1,
912 const char *part2, int flags);
913 /* 307 */
914 EXTERN ClientData Tcl_InitNotifier(void);
915 /* 308 */
916 EXTERN void Tcl_MutexLock(Tcl_Mutex *mutexPtr);
917 /* 309 */
918 EXTERN void Tcl_MutexUnlock(Tcl_Mutex *mutexPtr);
919 /* 310 */
920 EXTERN void Tcl_ConditionNotify(Tcl_Condition *condPtr);
921 /* 311 */
922 EXTERN void Tcl_ConditionWait(Tcl_Condition *condPtr,
923 Tcl_Mutex *mutexPtr, const Tcl_Time *timePtr);
924 /* 312 */
925 EXTERN int Tcl_NumUtfChars(const char *src, int length);
926 /* 313 */
927 EXTERN int Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr,
928 int charsToRead, int appendFlag);
929 /* 314 */
930 EXTERN void Tcl_RestoreResult(Tcl_Interp *interp,
931 Tcl_SavedResult *statePtr);
932 /* 315 */
933 EXTERN void Tcl_SaveResult(Tcl_Interp *interp,
934 Tcl_SavedResult *statePtr);
935 /* 316 */
936 EXTERN int Tcl_SetSystemEncoding(Tcl_Interp *interp,
937 const char *name);
938 /* 317 */
939 EXTERN Tcl_Obj * Tcl_SetVar2Ex(Tcl_Interp *interp, const char *part1,
940 const char *part2, Tcl_Obj *newValuePtr,
941 int flags);
942 /* 318 */
943 EXTERN void Tcl_ThreadAlert(Tcl_ThreadId threadId);
944 /* 319 */
945 EXTERN void Tcl_ThreadQueueEvent(Tcl_ThreadId threadId,
946 Tcl_Event *evPtr, Tcl_QueuePosition position);
947 /* 320 */
948 EXTERN Tcl_UniChar Tcl_UniCharAtIndex(const char *src, int index);
949 /* 321 */
950 EXTERN Tcl_UniChar Tcl_UniCharToLower(int ch);
951 /* 322 */
952 EXTERN Tcl_UniChar Tcl_UniCharToTitle(int ch);
953 /* 323 */
954 EXTERN Tcl_UniChar Tcl_UniCharToUpper(int ch);
955 /* 324 */
956 EXTERN int Tcl_UniCharToUtf(int ch, char *buf);
957 /* 325 */
958 EXTERN CONST84_RETURN char * Tcl_UtfAtIndex(const char *src, int index);
959 /* 326 */
960 EXTERN int Tcl_UtfCharComplete(const char *src, int length);
961 /* 327 */
962 EXTERN int Tcl_UtfBackslash(const char *src, int *readPtr,
963 char *dst);
964 /* 328 */
965 EXTERN CONST84_RETURN char * Tcl_UtfFindFirst(const char *src, int ch);
966 /* 329 */
967 EXTERN CONST84_RETURN char * Tcl_UtfFindLast(const char *src, int ch);
968 /* 330 */
969 EXTERN CONST84_RETURN char * Tcl_UtfNext(const char *src);
970 /* 331 */
971 EXTERN CONST84_RETURN char * Tcl_UtfPrev(const char *src, const char *start);
972 /* 332 */
973 EXTERN int Tcl_UtfToExternal(Tcl_Interp *interp,
974 Tcl_Encoding encoding, const char *src,
975 int srcLen, int flags,
976 Tcl_EncodingState *statePtr, char *dst,
977 int dstLen, int *srcReadPtr,
978 int *dstWrotePtr, int *dstCharsPtr);
979 /* 333 */
980 EXTERN char * Tcl_UtfToExternalDString(Tcl_Encoding encoding,
981 const char *src, int srcLen,
982 Tcl_DString *dsPtr);
983 /* 334 */
984 EXTERN int Tcl_UtfToLower(char *src);
985 /* 335 */
986 EXTERN int Tcl_UtfToTitle(char *src);
987 /* 336 */
988 EXTERN int Tcl_UtfToUniChar(const char *src, Tcl_UniChar *chPtr);
989 /* 337 */
990 EXTERN int Tcl_UtfToUpper(char *src);
991 /* 338 */
992 EXTERN int Tcl_WriteChars(Tcl_Channel chan, const char *src,
993 int srcLen);
994 /* 339 */
995 EXTERN int Tcl_WriteObj(Tcl_Channel chan, Tcl_Obj *objPtr);
996 /* 340 */
997 EXTERN char * Tcl_GetString(Tcl_Obj *objPtr);
998 /* 341 */
999 EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir(void);
1000 /* 342 */
1001 EXTERN void Tcl_SetDefaultEncodingDir(const char *path);
1002 /* 343 */
1003 EXTERN void Tcl_AlertNotifier(ClientData clientData);
1004 /* 344 */
1005 EXTERN void Tcl_ServiceModeHook(int mode);
1006 /* 345 */
1007 EXTERN int Tcl_UniCharIsAlnum(int ch);
1008 /* 346 */
1009 EXTERN int Tcl_UniCharIsAlpha(int ch);
1010 /* 347 */
1011 EXTERN int Tcl_UniCharIsDigit(int ch);
1012 /* 348 */
1013 EXTERN int Tcl_UniCharIsLower(int ch);
1014 /* 349 */
1015 EXTERN int Tcl_UniCharIsSpace(int ch);
1016 /* 350 */
1017 EXTERN int Tcl_UniCharIsUpper(int ch);
1018 /* 351 */
1019 EXTERN int Tcl_UniCharIsWordChar(int ch);
1020 /* 352 */
1021 EXTERN int Tcl_UniCharLen(const Tcl_UniChar *uniStr);
1022 /* 353 */
1023 EXTERN int Tcl_UniCharNcmp(const Tcl_UniChar *ucs,
1024 const Tcl_UniChar *uct,
1025 unsigned long numChars);
1026 /* 354 */
1027 EXTERN char * Tcl_UniCharToUtfDString(const Tcl_UniChar *uniStr,
1028 int uniLength, Tcl_DString *dsPtr);
1029 /* 355 */
1030 EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString(const char *src, int length,
1031 Tcl_DString *dsPtr);
1032 /* 356 */
1033 EXTERN Tcl_RegExp Tcl_GetRegExpFromObj(Tcl_Interp *interp,
1034 Tcl_Obj *patObj, int flags);
1035 /* 357 */
1036 EXTERN Tcl_Obj * Tcl_EvalTokens(Tcl_Interp *interp,
1037 Tcl_Token *tokenPtr, int count);
1038 /* 358 */
1039 EXTERN void Tcl_FreeParse(Tcl_Parse *parsePtr);
1040 /* 359 */
1041 EXTERN void Tcl_LogCommandInfo(Tcl_Interp *interp,
1042 const char *script, const char *command,
1043 int length);
1044 /* 360 */
1045 EXTERN int Tcl_ParseBraces(Tcl_Interp *interp,
1046 const char *start, int numBytes,
1047 Tcl_Parse *parsePtr, int append,
1048 CONST84 char **termPtr);
1049 /* 361 */
1050 EXTERN int Tcl_ParseCommand(Tcl_Interp *interp,
1051 const char *start, int numBytes, int nested,
1052 Tcl_Parse *parsePtr);
1053 /* 362 */
1054 EXTERN int Tcl_ParseExpr(Tcl_Interp *interp, const char *start,
1055 int numBytes, Tcl_Parse *parsePtr);
1056 /* 363 */
1057 EXTERN int Tcl_ParseQuotedString(Tcl_Interp *interp,
1058 const char *start, int numBytes,
1059 Tcl_Parse *parsePtr, int append,
1060 CONST84 char **termPtr);
1061 /* 364 */
1062 EXTERN int Tcl_ParseVarName(Tcl_Interp *interp,
1063 const char *start, int numBytes,
1064 Tcl_Parse *parsePtr, int append);
1065 /* 365 */
1066 EXTERN char * Tcl_GetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr);
1067 /* 366 */
1068 EXTERN int Tcl_Chdir(const char *dirName);
1069 /* 367 */
1070 EXTERN int Tcl_Access(const char *path, int mode);
1071 /* 368 */
1072 EXTERN int Tcl_Stat(const char *path, struct stat *bufPtr);
1073 /* 369 */
1074 EXTERN int Tcl_UtfNcmp(const char *s1, const char *s2,
1075 unsigned long n);
1076 /* 370 */
1077 EXTERN int Tcl_UtfNcasecmp(const char *s1, const char *s2,
1078 unsigned long n);
1079 /* 371 */
1080 EXTERN int Tcl_StringCaseMatch(const char *str,
1081 const char *pattern, int nocase);
1082 /* 372 */
1083 EXTERN int Tcl_UniCharIsControl(int ch);
1084 /* 373 */
1085 EXTERN int Tcl_UniCharIsGraph(int ch);
1086 /* 374 */
1087 EXTERN int Tcl_UniCharIsPrint(int ch);
1088 /* 375 */
1089 EXTERN int Tcl_UniCharIsPunct(int ch);
1090 /* 376 */
1091 EXTERN int Tcl_RegExpExecObj(Tcl_Interp *interp,
1092 Tcl_RegExp regexp, Tcl_Obj *textObj,
1093 int offset, int nmatches, int flags);
1094 /* 377 */
1095 EXTERN void Tcl_RegExpGetInfo(Tcl_RegExp regexp,
1096 Tcl_RegExpInfo *infoPtr);
1097 /* 378 */
1098 EXTERN Tcl_Obj * Tcl_NewUnicodeObj(const Tcl_UniChar *unicode,
1099 int numChars);
1100 /* 379 */
1101 EXTERN void Tcl_SetUnicodeObj(Tcl_Obj *objPtr,
1102 const Tcl_UniChar *unicode, int numChars);
1103 /* 380 */
1104 EXTERN int Tcl_GetCharLength(Tcl_Obj *objPtr);
1105 /* 381 */
1106 EXTERN Tcl_UniChar Tcl_GetUniChar(Tcl_Obj *objPtr, int index);
1107 /* 382 */
1108 EXTERN Tcl_UniChar * Tcl_GetUnicode(Tcl_Obj *objPtr);
1109 /* 383 */
1110 EXTERN Tcl_Obj * Tcl_GetRange(Tcl_Obj *objPtr, int first, int last);
1111 /* 384 */
1112 EXTERN void Tcl_AppendUnicodeToObj(Tcl_Obj *objPtr,
1113 const Tcl_UniChar *unicode, int length);
1114 /* 385 */
1115 EXTERN int Tcl_RegExpMatchObj(Tcl_Interp *interp,
1116 Tcl_Obj *textObj, Tcl_Obj *patternObj);
1117 /* 386 */
1118 EXTERN void Tcl_SetNotifier(Tcl_NotifierProcs *notifierProcPtr);
1119 /* 387 */
1120 EXTERN Tcl_Mutex * Tcl_GetAllocMutex(void);
1121 /* 388 */
1122 EXTERN int Tcl_GetChannelNames(Tcl_Interp *interp);
1123 /* 389 */
1124 EXTERN int Tcl_GetChannelNamesEx(Tcl_Interp *interp,
1125 const char *pattern);
1126 /* 390 */
1127 EXTERN int Tcl_ProcObjCmd(ClientData clientData,
1128 Tcl_Interp *interp, int objc,
1129 Tcl_Obj *const objv[]);
1130 /* 391 */
1131 EXTERN void Tcl_ConditionFinalize(Tcl_Condition *condPtr);
1132 /* 392 */
1133 EXTERN void Tcl_MutexFinalize(Tcl_Mutex *mutex);
1134 /* 393 */
1135 EXTERN int Tcl_CreateThread(Tcl_ThreadId *idPtr,
1136 Tcl_ThreadCreateProc *proc,
1137 ClientData clientData, int stackSize,
1138 int flags);
1139 /* 394 */
1140 EXTERN int Tcl_ReadRaw(Tcl_Channel chan, char *dst,
1141 int bytesToRead);
1142 /* 395 */
1143 EXTERN int Tcl_WriteRaw(Tcl_Channel chan, const char *src,
1144 int srcLen);
1145 /* 396 */
1146 EXTERN Tcl_Channel Tcl_GetTopChannel(Tcl_Channel chan);
1147 /* 397 */
1148 EXTERN int Tcl_ChannelBuffered(Tcl_Channel chan);
1149 /* 398 */
1150 EXTERN CONST84_RETURN char * Tcl_ChannelName(
1151 const Tcl_ChannelType *chanTypePtr);
1152 /* 399 */
1153 EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion(
1154 const Tcl_ChannelType *chanTypePtr);
1155 /* 400 */
1156 EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc(
1157 const Tcl_ChannelType *chanTypePtr);
1158 /* 401 */
1159 EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc(
1160 const Tcl_ChannelType *chanTypePtr);
1161 /* 402 */
1162 EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc(
1163 const Tcl_ChannelType *chanTypePtr);
1164 /* 403 */
1165 EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc(
1166 const Tcl_ChannelType *chanTypePtr);
1167 /* 404 */
1168 EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc(
1169 const Tcl_ChannelType *chanTypePtr);
1170 /* 405 */
1171 EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc(
1172 const Tcl_ChannelType *chanTypePtr);
1173 /* 406 */
1174 EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc(
1175 const Tcl_ChannelType *chanTypePtr);
1176 /* 407 */
1177 EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc(
1178 const Tcl_ChannelType *chanTypePtr);
1179 /* 408 */
1180 EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc(
1181 const Tcl_ChannelType *chanTypePtr);
1182 /* 409 */
1183 EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc(
1184 const Tcl_ChannelType *chanTypePtr);
1185 /* 410 */
1186 EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc(
1187 const Tcl_ChannelType *chanTypePtr);
1188 /* 411 */
1189 EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc(
1190 const Tcl_ChannelType *chanTypePtr);
1191 /* 412 */
1192 EXTERN int Tcl_JoinThread(Tcl_ThreadId threadId, int *result);
1193 /* 413 */
1194 EXTERN int Tcl_IsChannelShared(Tcl_Channel channel);
1195 /* 414 */
1196 EXTERN int Tcl_IsChannelRegistered(Tcl_Interp *interp,
1197 Tcl_Channel channel);
1198 /* 415 */
1199 EXTERN void Tcl_CutChannel(Tcl_Channel channel);
1200 /* 416 */
1201 EXTERN void Tcl_SpliceChannel(Tcl_Channel channel);
1202 /* 417 */
1203 EXTERN void Tcl_ClearChannelHandlers(Tcl_Channel channel);
1204 /* 418 */
1205 EXTERN int Tcl_IsChannelExisting(const char *channelName);
1206 /* 419 */
1207 EXTERN int Tcl_UniCharNcasecmp(const Tcl_UniChar *ucs,
1208 const Tcl_UniChar *uct,
1209 unsigned long numChars);
1210 /* 420 */
1211 EXTERN int Tcl_UniCharCaseMatch(const Tcl_UniChar *uniStr,
1212 const Tcl_UniChar *uniPattern, int nocase);
1213 /* 421 */
1214 EXTERN Tcl_HashEntry * Tcl_FindHashEntry(Tcl_HashTable *tablePtr,
1215 const void *key);
1216 /* 422 */
1217 EXTERN Tcl_HashEntry * Tcl_CreateHashEntry(Tcl_HashTable *tablePtr,
1218 const void *key, int *newPtr);
1219 /* 423 */
1220 EXTERN void Tcl_InitCustomHashTable(Tcl_HashTable *tablePtr,
1221 int keyType, const Tcl_HashKeyType *typePtr);
1222 /* 424 */
1223 EXTERN void Tcl_InitObjHashTable(Tcl_HashTable *tablePtr);
1224 /* 425 */
1225 EXTERN ClientData Tcl_CommandTraceInfo(Tcl_Interp *interp,
1226 const char *varName, int flags,
1227 Tcl_CommandTraceProc *procPtr,
1228 ClientData prevClientData);
1229 /* 426 */
1230 EXTERN int Tcl_TraceCommand(Tcl_Interp *interp,
1231 const char *varName, int flags,
1232 Tcl_CommandTraceProc *proc,
1233 ClientData clientData);
1234 /* 427 */
1235 EXTERN void Tcl_UntraceCommand(Tcl_Interp *interp,
1236 const char *varName, int flags,
1237 Tcl_CommandTraceProc *proc,
1238 ClientData clientData);
1239 /* 428 */
1240 EXTERN char * Tcl_AttemptAlloc(unsigned int size);
1241 /* 429 */
1242 EXTERN char * Tcl_AttemptDbCkalloc(unsigned int size,
1243 const char *file, int line);
1244 /* 430 */
1245 EXTERN char * Tcl_AttemptRealloc(char *ptr, unsigned int size);
1246 /* 431 */
1247 EXTERN char * Tcl_AttemptDbCkrealloc(char *ptr, unsigned int size,
1248 const char *file, int line);
1249 /* 432 */
1250 EXTERN int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, int length);
1251 /* 433 */
1252 EXTERN Tcl_ThreadId Tcl_GetChannelThread(Tcl_Channel channel);
1253 /* 434 */
1254 EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr,
1255 int *lengthPtr);
1256 /* 435 */
1257 EXTERN int Tcl_GetMathFuncInfo(Tcl_Interp *interp,
1258 const char *name, int *numArgsPtr,
1259 Tcl_ValueType **argTypesPtr,
1260 Tcl_MathProc **procPtr,
1261 ClientData *clientDataPtr);
1262 /* 436 */
1263 EXTERN Tcl_Obj * Tcl_ListMathFuncs(Tcl_Interp *interp,
1264 const char *pattern);
1265 /* 437 */
1266 EXTERN Tcl_Obj * Tcl_SubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
1267 int flags);
1268 /* 438 */
1269 EXTERN int Tcl_DetachChannel(Tcl_Interp *interp,
1270 Tcl_Channel channel);
1271 /* 439 */
1272 EXTERN int Tcl_IsStandardChannel(Tcl_Channel channel);
1273 /* 440 */
1274 EXTERN int Tcl_FSCopyFile(Tcl_Obj *srcPathPtr,
1275 Tcl_Obj *destPathPtr);
1276 /* 441 */
1277 EXTERN int Tcl_FSCopyDirectory(Tcl_Obj *srcPathPtr,
1278 Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr);
1279 /* 442 */
1280 EXTERN int Tcl_FSCreateDirectory(Tcl_Obj *pathPtr);
1281 /* 443 */
1282 EXTERN int Tcl_FSDeleteFile(Tcl_Obj *pathPtr);
1283 /* 444 */
1284 EXTERN int Tcl_FSLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr,
1285 const char *sym1, const char *sym2,
1286 Tcl_PackageInitProc **proc1Ptr,
1287 Tcl_PackageInitProc **proc2Ptr,
1288 Tcl_LoadHandle *handlePtr,
1289 Tcl_FSUnloadFileProc **unloadProcPtr);
1290 /* 445 */
1291 EXTERN int Tcl_FSMatchInDirectory(Tcl_Interp *interp,
1292 Tcl_Obj *result, Tcl_Obj *pathPtr,
1293 const char *pattern, Tcl_GlobTypeData *types);
1294 /* 446 */
1295 EXTERN Tcl_Obj * Tcl_FSLink(Tcl_Obj *pathPtr, Tcl_Obj *toPtr,
1296 int linkAction);
1297 /* 447 */
1298 EXTERN int Tcl_FSRemoveDirectory(Tcl_Obj *pathPtr,
1299 int recursive, Tcl_Obj **errorPtr);
1300 /* 448 */
1301 EXTERN int Tcl_FSRenameFile(Tcl_Obj *srcPathPtr,
1302 Tcl_Obj *destPathPtr);
1303 /* 449 */
1304 EXTERN int Tcl_FSLstat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1305 /* 450 */
1306 EXTERN int Tcl_FSUtime(Tcl_Obj *pathPtr, struct utimbuf *tval);
1307 /* 451 */
1308 EXTERN int Tcl_FSFileAttrsGet(Tcl_Interp *interp, int index,
1309 Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef);
1310 /* 452 */
1311 EXTERN int Tcl_FSFileAttrsSet(Tcl_Interp *interp, int index,
1312 Tcl_Obj *pathPtr, Tcl_Obj *objPtr);
1313 /* 453 */
1314 EXTERN const char *CONST86 * Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr,
1315 Tcl_Obj **objPtrRef);
1316 /* 454 */
1317 EXTERN int Tcl_FSStat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1318 /* 455 */
1319 EXTERN int Tcl_FSAccess(Tcl_Obj *pathPtr, int mode);
1320 /* 456 */
1321 EXTERN Tcl_Channel Tcl_FSOpenFileChannel(Tcl_Interp *interp,
1322 Tcl_Obj *pathPtr, const char *modeString,
1323 int permissions);
1324 /* 457 */
1325 EXTERN Tcl_Obj * Tcl_FSGetCwd(Tcl_Interp *interp);
1326 /* 458 */
1327 EXTERN int Tcl_FSChdir(Tcl_Obj *pathPtr);
1328 /* 459 */
1329 EXTERN int Tcl_FSConvertToPathType(Tcl_Interp *interp,
1330 Tcl_Obj *pathPtr);
1331 /* 460 */
1332 EXTERN Tcl_Obj * Tcl_FSJoinPath(Tcl_Obj *listObj, int elements);
1333 /* 461 */
1334 EXTERN Tcl_Obj * Tcl_FSSplitPath(Tcl_Obj *pathPtr, int *lenPtr);
1335 /* 462 */
1336 EXTERN int Tcl_FSEqualPaths(Tcl_Obj *firstPtr,
1337 Tcl_Obj *secondPtr);
1338 /* 463 */
1339 EXTERN Tcl_Obj * Tcl_FSGetNormalizedPath(Tcl_Interp *interp,
1340 Tcl_Obj *pathPtr);
1341 /* 464 */
1342 EXTERN Tcl_Obj * Tcl_FSJoinToPath(Tcl_Obj *pathPtr, int objc,
1343 Tcl_Obj *const objv[]);
1344 /* 465 */
1345 EXTERN ClientData Tcl_FSGetInternalRep(Tcl_Obj *pathPtr,
1346 const Tcl_Filesystem *fsPtr);
1347 /* 466 */
1348 EXTERN Tcl_Obj * Tcl_FSGetTranslatedPath(Tcl_Interp *interp,
1349 Tcl_Obj *pathPtr);
1350 /* 467 */
1351 EXTERN int Tcl_FSEvalFile(Tcl_Interp *interp, Tcl_Obj *fileName);
1352 /* 468 */
1353 EXTERN Tcl_Obj * Tcl_FSNewNativePath(
1354 const Tcl_Filesystem *fromFilesystem,
1355 ClientData clientData);
1356 /* 469 */
1357 EXTERN const void * Tcl_FSGetNativePath(Tcl_Obj *pathPtr);
1358 /* 470 */
1359 EXTERN Tcl_Obj * Tcl_FSFileSystemInfo(Tcl_Obj *pathPtr);
1360 /* 471 */
1361 EXTERN Tcl_Obj * Tcl_FSPathSeparator(Tcl_Obj *pathPtr);
1362 /* 472 */
1363 EXTERN Tcl_Obj * Tcl_FSListVolumes(void);
1364 /* 473 */
1365 EXTERN int Tcl_FSRegister(ClientData clientData,
1366 const Tcl_Filesystem *fsPtr);
1367 /* 474 */
1368 EXTERN int Tcl_FSUnregister(const Tcl_Filesystem *fsPtr);
1369 /* 475 */
1370 EXTERN ClientData Tcl_FSData(const Tcl_Filesystem *fsPtr);
1371 /* 476 */
1372 EXTERN const char * Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp,
1373 Tcl_Obj *pathPtr);
1374 /* 477 */
1375 EXTERN CONST86 Tcl_Filesystem * Tcl_FSGetFileSystemForPath(Tcl_Obj *pathPtr);
1376 /* 478 */
1377 EXTERN Tcl_PathType Tcl_FSGetPathType(Tcl_Obj *pathPtr);
1378 /* 479 */
1379 EXTERN int Tcl_OutputBuffered(Tcl_Channel chan);
1380 /* 480 */
1381 EXTERN void Tcl_FSMountsChanged(const Tcl_Filesystem *fsPtr);
1382 /* 481 */
1383 EXTERN int Tcl_EvalTokensStandard(Tcl_Interp *interp,
1384 Tcl_Token *tokenPtr, int count);
1385 /* 482 */
1386 EXTERN void Tcl_GetTime(Tcl_Time *timeBuf);
1387 /* 483 */
1388 EXTERN Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp *interp, int level,
1389 int flags, Tcl_CmdObjTraceProc *objProc,
1390 ClientData clientData,
1391 Tcl_CmdObjTraceDeleteProc *delProc);
1392 /* 484 */
1393 EXTERN int Tcl_GetCommandInfoFromToken(Tcl_Command token,
1394 Tcl_CmdInfo *infoPtr);
1395 /* 485 */
1396 EXTERN int Tcl_SetCommandInfoFromToken(Tcl_Command token,
1397 const Tcl_CmdInfo *infoPtr);
1398 /* 486 */
1399 EXTERN Tcl_Obj * Tcl_DbNewWideIntObj(Tcl_WideInt wideValue,
1400 const char *file, int line);
1401 /* 487 */
1402 EXTERN int Tcl_GetWideIntFromObj(Tcl_Interp *interp,
1403 Tcl_Obj *objPtr, Tcl_WideInt *widePtr);
1404 /* 488 */
1405 EXTERN Tcl_Obj * Tcl_NewWideIntObj(Tcl_WideInt wideValue);
1406 /* 489 */
1407 EXTERN void Tcl_SetWideIntObj(Tcl_Obj *objPtr,
1408 Tcl_WideInt wideValue);
1409 /* 490 */
1410 EXTERN Tcl_StatBuf * Tcl_AllocStatBuf(void);
1411 /* 491 */
1412 EXTERN Tcl_WideInt Tcl_Seek(Tcl_Channel chan, Tcl_WideInt offset,
1413 int mode);
1414 /* 492 */
1415 EXTERN Tcl_WideInt Tcl_Tell(Tcl_Channel chan);
1416 /* 493 */
1417 EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc(
1418 const Tcl_ChannelType *chanTypePtr);
1419 /* 494 */
1420 EXTERN int Tcl_DictObjPut(Tcl_Interp *interp, Tcl_Obj *dictPtr,
1421 Tcl_Obj *keyPtr, Tcl_Obj *valuePtr);
1422 /* 495 */
1423 EXTERN int Tcl_DictObjGet(Tcl_Interp *interp, Tcl_Obj *dictPtr,
1424 Tcl_Obj *keyPtr, Tcl_Obj **valuePtrPtr);
1425 /* 496 */
1426 EXTERN int Tcl_DictObjRemove(Tcl_Interp *interp,
1427 Tcl_Obj *dictPtr, Tcl_Obj *keyPtr);
1428 /* 497 */
1429 EXTERN int Tcl_DictObjSize(Tcl_Interp *interp, Tcl_Obj *dictPtr,
1430 int *sizePtr);
1431 /* 498 */
1432 EXTERN int Tcl_DictObjFirst(Tcl_Interp *interp,
1433 Tcl_Obj *dictPtr, Tcl_DictSearch *searchPtr,
1434 Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr,
1435 int *donePtr);
1436 /* 499 */
1437 EXTERN void Tcl_DictObjNext(Tcl_DictSearch *searchPtr,
1438 Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr,
1439 int *donePtr);
1440 /* 500 */
1441 EXTERN void Tcl_DictObjDone(Tcl_DictSearch *searchPtr);
1442 /* 501 */
1443 EXTERN int Tcl_DictObjPutKeyList(Tcl_Interp *interp,
1444 Tcl_Obj *dictPtr, int keyc,
1445 Tcl_Obj *const *keyv, Tcl_Obj *valuePtr);
1446 /* 502 */
1447 EXTERN int Tcl_DictObjRemoveKeyList(Tcl_Interp *interp,
1448 Tcl_Obj *dictPtr, int keyc,
1449 Tcl_Obj *const *keyv);
1450 /* 503 */
1451 EXTERN Tcl_Obj * Tcl_NewDictObj(void);
1452 /* 504 */
1453 EXTERN Tcl_Obj * Tcl_DbNewDictObj(const char *file, int line);
1454 /* 505 */
1455 EXTERN void Tcl_RegisterConfig(Tcl_Interp *interp,
1456 const char *pkgName,
1457 const Tcl_Config *configuration,
1458 const char *valEncoding);
1459 /* 506 */
1460 EXTERN Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp,
1461 const char *name, ClientData clientData,
1462 Tcl_NamespaceDeleteProc *deleteProc);
1463 /* 507 */
1464 EXTERN void Tcl_DeleteNamespace(Tcl_Namespace *nsPtr);
1465 /* 508 */
1466 EXTERN int Tcl_AppendExportList(Tcl_Interp *interp,
1467 Tcl_Namespace *nsPtr, Tcl_Obj *objPtr);
1468 /* 509 */
1469 EXTERN int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
1470 const char *pattern, int resetListFirst);
1471 /* 510 */
1472 EXTERN int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
1473 const char *pattern, int allowOverwrite);
1474 /* 511 */
1475 EXTERN int Tcl_ForgetImport(Tcl_Interp *interp,
1476 Tcl_Namespace *nsPtr, const char *pattern);
1477 /* 512 */
1478 EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace(Tcl_Interp *interp);
1479 /* 513 */
1480 EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace(Tcl_Interp *interp);
1481 /* 514 */
1482 EXTERN Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp,
1483 const char *name,
1484 Tcl_Namespace *contextNsPtr, int flags);
1485 /* 515 */
1486 EXTERN Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name,
1487 Tcl_Namespace *contextNsPtr, int flags);
1488 /* 516 */
1489 EXTERN Tcl_Command Tcl_GetCommandFromObj(Tcl_Interp *interp,
1490 Tcl_Obj *objPtr);
1491 /* 517 */
1492 EXTERN void Tcl_GetCommandFullName(Tcl_Interp *interp,
1493 Tcl_Command command, Tcl_Obj *objPtr);
1494 /* 518 */
1495 EXTERN int Tcl_FSEvalFileEx(Tcl_Interp *interp,
1496 Tcl_Obj *fileName, const char *encodingName);
1497 /* 519 */
1498 EXTERN Tcl_ExitProc * Tcl_SetExitProc(Tcl_ExitProc *proc);
1499 /* 520 */
1500 EXTERN void Tcl_LimitAddHandler(Tcl_Interp *interp, int type,
1501 Tcl_LimitHandlerProc *handlerProc,
1502 ClientData clientData,
1503 Tcl_LimitHandlerDeleteProc *deleteProc);
1504 /* 521 */
1505 EXTERN void Tcl_LimitRemoveHandler(Tcl_Interp *interp, int type,
1506 Tcl_LimitHandlerProc *handlerProc,
1507 ClientData clientData);
1508 /* 522 */
1509 EXTERN int Tcl_LimitReady(Tcl_Interp *interp);
1510 /* 523 */
1511 EXTERN int Tcl_LimitCheck(Tcl_Interp *interp);
1512 /* 524 */
1513 EXTERN int Tcl_LimitExceeded(Tcl_Interp *interp);
1514 /* 525 */
1515 EXTERN void Tcl_LimitSetCommands(Tcl_Interp *interp,
1516 int commandLimit);
1517 /* 526 */
1518 EXTERN void Tcl_LimitSetTime(Tcl_Interp *interp,
1519 Tcl_Time *timeLimitPtr);
1520 /* 527 */
1521 EXTERN void Tcl_LimitSetGranularity(Tcl_Interp *interp, int type,
1522 int granularity);
1523 /* 528 */
1524 EXTERN int Tcl_LimitTypeEnabled(Tcl_Interp *interp, int type);
1525 /* 529 */
1526 EXTERN int Tcl_LimitTypeExceeded(Tcl_Interp *interp, int type);
1527 /* 530 */
1528 EXTERN void Tcl_LimitTypeSet(Tcl_Interp *interp, int type);
1529 /* 531 */
1530 EXTERN void Tcl_LimitTypeReset(Tcl_Interp *interp, int type);
1531 /* 532 */
1532 EXTERN int Tcl_LimitGetCommands(Tcl_Interp *interp);
1533 /* 533 */
1534 EXTERN void Tcl_LimitGetTime(Tcl_Interp *interp,
1535 Tcl_Time *timeLimitPtr);
1536 /* 534 */
1537 EXTERN int Tcl_LimitGetGranularity(Tcl_Interp *interp, int type);
1538 /* 535 */
1539 EXTERN Tcl_InterpState Tcl_SaveInterpState(Tcl_Interp *interp, int status);
1540 /* 536 */
1541 EXTERN int Tcl_RestoreInterpState(Tcl_Interp *interp,
1542 Tcl_InterpState state);
1543 /* 537 */
1544 EXTERN void Tcl_DiscardInterpState(Tcl_InterpState state);
1545 /* 538 */
1546 EXTERN int Tcl_SetReturnOptions(Tcl_Interp *interp,
1547 Tcl_Obj *options);
1548 /* 539 */
1549 EXTERN Tcl_Obj * Tcl_GetReturnOptions(Tcl_Interp *interp, int result);
1550 /* 540 */
1551 EXTERN int Tcl_IsEnsemble(Tcl_Command token);
1552 /* 541 */
1553 EXTERN Tcl_Command Tcl_CreateEnsemble(Tcl_Interp *interp,
1554 const char *name,
1555 Tcl_Namespace *namespacePtr, int flags);
1556 /* 542 */
1557 EXTERN Tcl_Command Tcl_FindEnsemble(Tcl_Interp *interp,
1558 Tcl_Obj *cmdNameObj, int flags);
1559 /* 543 */
1560 EXTERN int Tcl_SetEnsembleSubcommandList(Tcl_Interp *interp,
1561 Tcl_Command token, Tcl_Obj *subcmdList);
1562 /* 544 */
1563 EXTERN int Tcl_SetEnsembleMappingDict(Tcl_Interp *interp,
1564 Tcl_Command token, Tcl_Obj *mapDict);
1565 /* 545 */
1566 EXTERN int Tcl_SetEnsembleUnknownHandler(Tcl_Interp *interp,
1567 Tcl_Command token, Tcl_Obj *unknownList);
1568 /* 546 */
1569 EXTERN int Tcl_SetEnsembleFlags(Tcl_Interp *interp,
1570 Tcl_Command token, int flags);
1571 /* 547 */
1572 EXTERN int Tcl_GetEnsembleSubcommandList(Tcl_Interp *interp,
1573 Tcl_Command token, Tcl_Obj **subcmdListPtr);
1574 /* 548 */
1575 EXTERN int Tcl_GetEnsembleMappingDict(Tcl_Interp *interp,
1576 Tcl_Command token, Tcl_Obj **mapDictPtr);
1577 /* 549 */
1578 EXTERN int Tcl_GetEnsembleUnknownHandler(Tcl_Interp *interp,
1579 Tcl_Command token, Tcl_Obj **unknownListPtr);
1580 /* 550 */
1581 EXTERN int Tcl_GetEnsembleFlags(Tcl_Interp *interp,
1582 Tcl_Command token, int *flagsPtr);
1583 /* 551 */
1584 EXTERN int Tcl_GetEnsembleNamespace(Tcl_Interp *interp,
1585 Tcl_Command token,
1586 Tcl_Namespace **namespacePtrPtr);
1587 /* 552 */
1588 EXTERN void Tcl_SetTimeProc(Tcl_GetTimeProc *getProc,
1589 Tcl_ScaleTimeProc *scaleProc,
1590 ClientData clientData);
1591 /* 553 */
1592 EXTERN void Tcl_QueryTimeProc(Tcl_GetTimeProc **getProc,
1593 Tcl_ScaleTimeProc **scaleProc,
1594 ClientData *clientData);
1595 /* 554 */
1596 EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc(
1597 const Tcl_ChannelType *chanTypePtr);
1598 /* 555 */
1599 EXTERN Tcl_Obj * Tcl_NewBignumObj(mp_int *value);
1600 /* 556 */
1601 EXTERN Tcl_Obj * Tcl_DbNewBignumObj(mp_int *value, const char *file,
1602 int line);
1603 /* 557 */
1604 EXTERN void Tcl_SetBignumObj(Tcl_Obj *obj, mp_int *value);
1605 /* 558 */
1606 EXTERN int Tcl_GetBignumFromObj(Tcl_Interp *interp,
1607 Tcl_Obj *obj, mp_int *value);
1608 /* 559 */
1609 EXTERN int Tcl_TakeBignumFromObj(Tcl_Interp *interp,
1610 Tcl_Obj *obj, mp_int *value);
1611 /* 560 */
1612 EXTERN int Tcl_TruncateChannel(Tcl_Channel chan,
1613 Tcl_WideInt length);
1614 /* 561 */
1615 EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc(
1616 const Tcl_ChannelType *chanTypePtr);
1617 /* 562 */
1618 EXTERN void Tcl_SetChannelErrorInterp(Tcl_Interp *interp,
1619 Tcl_Obj *msg);
1620 /* 563 */
1621 EXTERN void Tcl_GetChannelErrorInterp(Tcl_Interp *interp,
1622 Tcl_Obj **msg);
1623 /* 564 */
1624 EXTERN void Tcl_SetChannelError(Tcl_Channel chan, Tcl_Obj *msg);
1625 /* 565 */
1626 EXTERN void Tcl_GetChannelError(Tcl_Channel chan, Tcl_Obj **msg);
1627 /* 566 */
1628 EXTERN int Tcl_InitBignumFromDouble(Tcl_Interp *interp,
1629 double initval, mp_int *toInit);
1630 /* 567 */
1631 EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler(Tcl_Interp *interp,
1632 Tcl_Namespace *nsPtr);
1633 /* 568 */
1634 EXTERN int Tcl_SetNamespaceUnknownHandler(Tcl_Interp *interp,
1635 Tcl_NamespObjSetVar2
1636 Tcl_Namespace *nsPtr, Tcl_Obj *handlerPtr);
1637 /* 569 */
1638 EXTERN int Tcl_GetEncodingFromObj(Tcl_Interp *interp,
1639 Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr);
1640 /* 570 */
1641 EXTERN Tcl_Obj * Tcl_GetEncodingSearchPath(void);
1642 /* 571 */
1643 EXTERN int Tcl_SetEncodingSearchPath(Tcl_Obj *searchPath);
1644 /* 572 */
1645 EXTERN const char * Tcl_GetEncodingNameFromEnvironment(
1646 Tcl_DString *bufPtr);
1647 /* 573 */
1648 EXTERN int Tcl_PkgRequireProc(Tcl_Interp *interp,
1649 const char define Tcl_ObjSEnvironment(
1650 Tcl_DString *bufPtr);
1651 /* 573 */
1652 EXTERN int Tcl_PkgRequireProc(Tcl_Interp *interp,
1653 const char *name, int objc,
1654 Tcl_Obj *const objv[], void *clientDataPtr);
1655 /* 574 */
1656 EXTERN void Tcl_AppendObjToErrorInfo(Tcl_Interp *interp,
1657 Tcl_Obj *objPtr);
1658 /* 575 */
1659 EXTERN void Tcl_AppendLimitedToObj(Tcl_Obj *objPtr,
1660 const char *bytes, int length, int limit,
1661 const char *ellipsis);
1662 /* 576 */
1663 EXTERN Tcl_Obj * Tcl_Format(Tcl_Interp *interp, const char *format,
1664 int objc, Tcl_Obj *const objv[]);
1665 /* 577 */
1666 EXTERN int Tcl_AppendFormatToObj(Tcl_Interp *interp,
1667 Tcl_Obj *objPtr, const char *format,
1668 int objc, Tcl_Obj *const objv[]);
1669 /* 578 */
1670 EXTERN Tcl_Obj * Tcl_ObjPrintf(const char *format, ...) TCL_FORMAT_PRINTF(1, 2);
1671 /* 579 */
1672 EXTERN void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr,
1673 const char *format, ...) TCL_FORMAT_PRINTF(2, 3);
1674 /* 580 */
1675 EXTERN int Tcl_CancelEval(Tcl_Interp *interp,
1676 Tcl_Obj *resultObjPtr, ClientData clientData,
1677 int flags);
1678 /* 581 */
1679 EXTERN int Tcl_Canceled(Tcl_Interp *interp, int flags);
1680 /* 582 */
1681 EXTERN int Tcl_CreatePipe(Tcl_Interp *interp,
1682 Tcl_Channel *rchan, Tcl_Channel *wchan,
1683 int flags);
1684 /* 583 */
1685 EXTERN Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp,
1686 const char *cmdName, Tcl_ObjCmdProc *proc,
1687 Tcl_ObjCmdProc *nreProc,
1688 ClientData clientData,
1689 Tcl_CmdDeleteProc *deleteProc);
1690 /* 584 */
1691 EXTERN int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
1692 int flags);
1693 /* 585 */
1694 EXTERN int Tcl_NREvalObjv(Tcl_Interp *interp, int objc,
1695 Tcl_Obj *const objv[], int flags);
1696 /* 586 */
1697 EXTERN int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd,
1698 int objc, Tcl_Obj *const objv[], int flags);
1699 /* 587 */
1700 EXTERN void Tcl_NRAddCallback(Tcl_Interp *interp,
1701 Tcl_NRPostProc *postProcPtr,
1702 ClientData data0, ClientData data1,
1703 ClientData data2, ClientData data3);
1704 /* 588 */
1705 EXTERN int Tcl_NRCallObjProc(Tcl_Interp *interp,
1706 Tcl_ObjCmdProc *objProc,
1707 ClientData clientData, int objc,
1708 Tcl_Obj *const objv[]);
1709 /* 589 */
1710 EXTERN unsigned Tcl_GetFSDeviceFromStat(const Tcl_StatBuf *statPtr);
1711 /* 590 */
1712 EXTERN unsigned Tcl_GetFSInodeFromStat(const Tcl_StatBuf *statPtr);
1713 /* 591 */
1714 EXTERN unsigned Tcl_GetModeFromStat(const Tcl_StatBuf *statPtr);
1715 /* 592 */
1716 EXTERN int Tcl_GetLinkCountFromStat(const Tcl_StatBuf *statPtr);
1717 /* 593 */
1718 EXTERN int Tcl_GetUserIdFromStat(const Tcl_StatBuf *statPtr);
1719 /* 594 */
1720 EXTERN int Tcl_GetGroupIdFromStat(const Tcl_StatBuf *statPtr);
1721 /* 595 */
1722 EXTERN int Tcl_GetDeviceTypeFromStat(const Tcl_StatBuf *statPtr);
1723 /* 596 */
1724 EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr);
1725 /* 597 */
1726 EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat(
1727 const Tcl_StatBuf *statPtr);
1728 /* 598 */
1729 EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr);
1730 /* 599 */
1731 EXTERN Tcl_WideUInt Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr);
1732 /* 600 */
1733 EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr);
1734 /* 601 */
1735 EXTERN unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr);
1736 /* 602 */
1737 EXTERN int Tcl_SetEnsembleParameterList(Tcl_Interp *interp,
1738 Tcl_Command token, Tcl_Obj *paramList);
1739 /* 603 */
1740 EXTERN int Tcl_GetEnsembleParameterList(Tcl_Interp *interp,
1741 Tcl_Command token, Tcl_Obj **paramListPtr);
1742 /* 604 */
1743 EXTERN int Tcl_ParseArgsObjv(Tcl_Interp *interp,
1744 const Tcl_ArgvInfo *argTable, int *objcPtr,
1745 Tcl_Obj *const *objv, Tcl_Obj ***remObjv);
1746 /* 605 */
1747 EXTERN int Tcl_GetErrorLine(Tcl_Interp *interp);
1748 /* 606 */
1749 EXTERN void Tcl_SetErrorLine(Tcl_Interp *interp, int lineNum);
1750 /* 607 */
1751 EXTERN void Tcl_TransferResult(Tcl_Interp *sourceInterp,
1752 int result, Tcl_Interp *targetInterp);
1753 /* 608 */
1754 EXTERN int Tcl_InterpActive(Tcl_Interp *interp);
1755 /* 609 */
1756 EXTERN void Tcl_BackgroundException(Tcl_Interp *interp, int code);
1757 /* 610 */
1758 EXTERN int Tcl_ZlibDeflate(Tcl_Interp *interp, int format,
1759 Tcl_Obj *data, int level,
1760 Tcl_Obj *gzipHeaderDictObj);
1761 /* 611 */
1762 EXTERN int Tcl_ZlibInflate(Tcl_Interp *interp, int format,
1763 Tcl_Obj *data, int buffersize,
1764 Tcl_Obj *gzipHeaderDictObj);
1765 /* 612 */
1766 EXTERN unsigned int Tcl_ZlibCRC32(unsigned int crc,
1767 const unsigned char *buf, int len);
1768 /* 613 */
1769 EXTERN unsigned int Tcl_ZlibAdler32(unsigned int adler,
1770 const unsigned char *buf, int len);
1771 /* 614 */
1772 EXTERN int Tcl_ZlibStreamInit(Tcl_Interp *interp, int mode,
1773 int format, int level, Tcl_Obj *dictObj,
1774 Tcl_ZlibStream *zshandle);
1775 /* 615 */
1776 EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName(Tcl_ZlibStream zshandle);
1777 /* 616 */
1778 EXTERN int Tcl_ZlibStreamEof(Tcl_ZlibStream zshandle);
1779 /* 617 */
1780 EXTERN int Tcl_ZlibStreamChecksum(Tcl_ZlibStream zshandle);
1781 /* 618 */
1782 EXTERN int Tcl_ZlibStreamPut(Tcl_ZlibStream zshandle,
1783 Tcl_Obj *data, int flush);
1784 /* 619 */
1785 EXTERN int Tcl_ZlibStreamGet(Tcl_ZlibStream zshandle,
1786 Tcl_Obj *data, int count);
1787 /*
--- a/compat/tcl-8.6/generic/tclStubLib.c
+++ b/compat/tcl-8.6/generic/tclStubLib.c
@@ -0,0 +1,75 @@
1
+/*
2
+ * tclStubLib.c --
3
+ *
4
+ * Stub object that will be statically linked into extensions that want
5
+ * to access Tcl.
6
+ *
7
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
8
+ * Copyright (c) 1998 Paul Duffin.
9
+ *
10
+ * See the file "license.terms" for information on usage and redistribution of
11
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
12
+ */
13
+
14
+#include "tcl.h"
15
+#include <assert.h>
16
+
17
+const TclStubs *tclStubsPtr = NULL;
18
+
19
+
20
+
21
+/*
22
+ *----------------------------------------------------------------------
23
+ *
24
+ * Tcl_InitStubs --
25
+ *
26
+ * Tries to initialise the stub table pointers and ensures that the
27
+ * correct version of Tcl is loaded.
28
+ *
29
+ * Results:
30
+ * The actual version of Tcl that satisfies the request, or NULL to
31
+ * indicate that an error occurred.
32
+ *
33
+ * FOSSIL MODIFICATION!!!!!!!!!!!!!!!
34
+ *
35
+ * Because Fossil only uses public functions, and the "exact" parameter
36
+ * is always 0, everything not needed is stripped off.
37
+ *
38
+ * FOSSIL MODIFICATION!!!!!!!!!!!!!!!
39
+ *
40
+ * Side effects:
41
+ * Sets the stub table pointers.
42
+ *
43
+ *----------------------------------------------------------------------
44
+ */
45
+#undef Tcl_InitStubs
46
+
47
+typedef struct {
48
+ char *unused1;
49
+ Tcl_FreeProc *unused2;
50
+ int unused3;
51
+ const TclStubs *stubTable;
52
+} Interp;
53
+
54
+const char *
55
+Tcl_InitStubs(
56
+ Tcl_Interp *interp,
57
+ const char *version,
58
+ int exact)
59
+{
60
+ tclStubsPtr = ((Interp *) interp)->stubTable;
61
+
62
+ assert(tclStubsPtr && (tclStubsPtr->magic == TCL_STUB_MAGIC));
63
+
64
+ return Tcl_PkgRequireEx(interp, "Tcl", version, exact,
65
+ (void *)&tclStubsPtr);
66
+}
67
+
68
+
69
+/*
70
+ * Local Variables:
71
+ * mode: c
72
+ * c-basic-offset: 4
73
+ * fill-column: 78
74
+ * End:
75
+ */
--- a/compat/tcl-8.6/generic/tclStubLib.c
+++ b/compat/tcl-8.6/generic/tclStubLib.c
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/compat/tcl-8.6/generic/tclStubLib.c
+++ b/compat/tcl-8.6/generic/tclStubLib.c
@@ -0,0 +1,75 @@
1 /*
2 * tclStubLib.c --
3 *
4 * Stub object that will be statically linked into extensions that want
5 * to access Tcl.
6 *
7 * Copyright (c) 1998-1999 by Scriptics Corporation.
8 * Copyright (c) 1998 Paul Duffin.
9 *
10 * See the file "license.terms" for information on usage and redistribution of
11 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
12 */
13
14 #include "tcl.h"
15 #include <assert.h>
16
17 const TclStubs *tclStubsPtr = NULL;
18
19
20
21 /*
22 *----------------------------------------------------------------------
23 *
24 * Tcl_InitStubs --
25 *
26 * Tries to initialise the stub table pointers and ensures that the
27 * correct version of Tcl is loaded.
28 *
29 * Results:
30 * The actual version of Tcl that satisfies the request, or NULL to
31 * indicate that an error occurred.
32 *
33 * FOSSIL MODIFICATION!!!!!!!!!!!!!!!
34 *
35 * Because Fossil only uses public functions, and the "exact" parameter
36 * is always 0, everything not needed is stripped off.
37 *
38 * FOSSIL MODIFICATION!!!!!!!!!!!!!!!
39 *
40 * Side effects:
41 * Sets the stub table pointers.
42 *
43 *----------------------------------------------------------------------
44 */
45 #undef Tcl_InitStubs
46
47 typedef struct {
48 char *unused1;
49 Tcl_FreeProc *unused2;
50 int unused3;
51 const TclStubs *stubTable;
52 } Interp;
53
54 const char *
55 Tcl_InitStubs(
56 Tcl_Interp *interp,
57 const char *version,
58 int exact)
59 {
60 tclStubsPtr = ((Interp *) interp)->stubTable;
61
62 assert(tclStubsPtr && (tclStubsPtr->magic == TCL_STUB_MAGIC));
63
64 return Tcl_PkgRequireEx(interp, "Tcl", version, exact,
65 (void *)&tclStubsPtr);
66 }
67
68
69 /*
70 * Local Variables:
71 * mode: c
72 * c-basic-offset: 4
73 * fill-column: 78
74 * End:
75 */
--- a/compat/tcl-8.6/win/Makefile
+++ b/compat/tcl-8.6/win/Makefile
@@ -0,0 +1,9 @@
1
+
2
+libtclstub86.a:
3
+ $(PREFIX)gcc -c -O2 -fomit-frame-pointer -DUSE_TCL_STUBS ../generic/tclStubLib.c -o tclStubLib.o
4
+ $(PREFIX)ar cr libtclstub86.a tclStubLib.o
5
+ $(PREFIX)ranlib libtclstub86.a
6
+
7
+binaries:
8
+ @echo "Please copy the Tcl distribution you want to use to $(TCLSRCDIR),"
9
+ @echo "or compile Fossil with FOSSIL_ENABLE_TCL_STUBS"
--- a/compat/tcl-8.6/win/Makefile
+++ b/compat/tcl-8.6/win/Makefile
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
--- a/compat/tcl-8.6/win/Makefile
+++ b/compat/tcl-8.6/win/Makefile
@@ -0,0 +1,9 @@
1
2 libtclstub86.a:
3 $(PREFIX)gcc -c -O2 -fomit-frame-pointer -DUSE_TCL_STUBS ../generic/tclStubLib.c -o tclStubLib.o
4 $(PREFIX)ar cr libtclstub86.a tclStubLib.o
5 $(PREFIX)ranlib libtclstub86.a
6
7 binaries:
8 @echo "Please copy the Tcl distribution you want to use to $(TCLSRCDIR),"
9 @echo "or compile Fossil with FOSSIL_ENABLE_TCL_STUBS"
--- a/compat/tcl-8.6/win/configure
+++ b/compat/tcl-8.6/win/configure
@@ -0,0 +1 @@
1
+# Just do nothing
--- a/compat/tcl-8.6/win/configure
+++ b/compat/tcl-8.6/win/configure
@@ -0,0 +1 @@
 
--- a/compat/tcl-8.6/win/configure
+++ b/compat/tcl-8.6/win/configure
@@ -0,0 +1 @@
1 # Just do nothing
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -698,12 +698,12 @@
698698
openssl: zlib
699699
cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
700700
$(MAKE) -C $(OPENSSLLIBDIR) build_libs
701701
702702
tcl:
703
- cd $(TCLSRCDIR)/win;./configure
704
- $(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET)
703
+ @cd $(TCLSRCDIR)/win;./configure
704
+ @$(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET) PREFIX=$(PREFIX) TCLSRCDIR=`cd $(PWD)/$(TCLSRCDIR);echo $$PWD`
705705
706706
$(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
707707
$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
708708
709709
# This rule prevents make from using its default rules to try build
710710
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -698,12 +698,12 @@
698 openssl: zlib
699 cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
700 $(MAKE) -C $(OPENSSLLIBDIR) build_libs
701
702 tcl:
703 cd $(TCLSRCDIR)/win;./configure
704 $(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET)
705
706 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
707 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
708
709 # This rule prevents make from using its default rules to try build
710
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -698,12 +698,12 @@
698 openssl: zlib
699 cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
700 $(MAKE) -C $(OPENSSLLIBDIR) build_libs
701
702 tcl:
703 @cd $(TCLSRCDIR)/win;./configure
704 @$(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET) PREFIX=$(PREFIX) TCLSRCDIR=`cd $(PWD)/$(TCLSRCDIR);echo $$PWD`
705
706 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
707 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
708
709 # This rule prevents make from using its default rules to try build
710
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -665,12 +665,12 @@
665665
openssl: zlib
666666
cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
667667
$(MAKE) -C $(OPENSSLLIBDIR) build_libs
668668
669669
tcl:
670
- cd $(TCLSRCDIR)/win;./configure
671
- $(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET)
670
+ @cd $(TCLSRCDIR)/win;./configure
671
+ @$(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET) PREFIX=$(PREFIX) TCLSRCDIR=`cd $(PWD)/$(TCLSRCDIR);echo $$PWD`
672672
673673
$(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
674674
$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
675675
676676
# This rule prevents make from using its default rules to try build
677677
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -665,12 +665,12 @@
665 openssl: zlib
666 cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
667 $(MAKE) -C $(OPENSSLLIBDIR) build_libs
668
669 tcl:
670 cd $(TCLSRCDIR)/win;./configure
671 $(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET)
672
673 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
674 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
675
676 # This rule prevents make from using its default rules to try build
677
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -665,12 +665,12 @@
665 openssl: zlib
666 cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
667 $(MAKE) -C $(OPENSSLLIBDIR) build_libs
668
669 tcl:
670 @cd $(TCLSRCDIR)/win;./configure
671 @$(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET) PREFIX=$(PREFIX) TCLSRCDIR=`cd $(PWD)/$(TCLSRCDIR);echo $$PWD`
672
673 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
674 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
675
676 # This rule prevents make from using its default rules to try build
677
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -665,12 +665,12 @@
665665
openssl: zlib
666666
cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
667667
$(MAKE) -C $(OPENSSLLIBDIR) build_libs
668668
669669
tcl:
670
- cd $(TCLSRCDIR)/win;./configure
671
- $(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET)
670
+ @cd $(TCLSRCDIR)/win;./configure
671
+ @$(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET) PREFIX=$(PREFIX) TCLSRCDIR=`cd $(PWD)/$(TCLSRCDIR);echo $$PWD`
672672
673673
$(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
674674
$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
675675
676676
# This rule prevents make from using its default rules to try build
677677
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -665,12 +665,12 @@
665 openssl: zlib
666 cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
667 $(MAKE) -C $(OPENSSLLIBDIR) build_libs
668
669 tcl:
670 cd $(TCLSRCDIR)/win;./configure
671 $(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET)
672
673 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
674 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
675
676 # This rule prevents make from using its default rules to try build
677
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -665,12 +665,12 @@
665 openssl: zlib
666 cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw
667 $(MAKE) -C $(OPENSSLLIBDIR) build_libs
668
669 tcl:
670 @cd $(TCLSRCDIR)/win;./configure
671 @$(MAKE) -C $(TCLSRCDIR)/win $(TCLTARGET) PREFIX=$(PREFIX) TCLSRCDIR=`cd $(PWD)/$(TCLSRCDIR);echo $$PWD`
672
673 $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o zlib
674 $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o
675
676 # This rule prevents make from using its default rules to try build
677

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button