Fossil SCM

Sync with trunk.

florian 2026-01-10 14:02 UTC timeline-keyboard-navigation merge
Commit c50c8ed9d79c9d90375fbc4d740e94e43bb4b10d1b59e4b67404130cd57b64f9
214 files changed +2 -2 +1 -1 +8 -2 +2639 +4369 +7 -7 +1 -1 +152 +7530 -4844 +5247 -2778 +162 -35 +6 -1 +4 -4 +1 -1 +12 -8 +18 -5 +1 -1 +1 -1 +6 -6 +98 -31 +21 -29 +1 -1 +2 -2 +3 -3 +35 -34 +26 -2 +38 -17 +222 +7 -27 +1 -1 +3 -3 +1 -1 +1 -1 +4 -4 +27 -15 +39 -7 +39 -7 +2 -2 +18 -3 +2 -3 +7 -6 +7 -7 +152 -86 +3 -3 +1 -1 +10 -7 +4 +88 -20 +4 -4 +24 -10 +3 -3 +1 -1 +4 -4 +1 -1 +1 -1 +58 -8 +1 -1 +31 +1 -1 +1 -1 +2 -2 +1 -1 +2 -2 +5 -3 +17 -7 +17 -7 +1 -1 +1 -1 +62 -25 +12 -1 +26 -80 +7 -5 +21 -30 +5 -5 +2 -1 +1 -1 +1 -1 +21 -15 +3 -1 +16 -10 +27 -12 +15 +3 -4 +4 -4 +1 -1 +3 -3 +3 -3 +2 -2 +1 -1 +1 +1 -1 +8 -8 +3 -3 +4 -3 +146 -89 +1 -1 +157 -25 +6 -4 +12 -10 +46 -11 +159 -56 +1 -1 +1 -1 +3 +3 -3 +1 -1 +2 -2 +4 -4 +2 -2 +10 -5 +23 -1 +17 -5 +21 -23 +562 -40 +1 -15 +1 -1 +7 -7 +52 -10 +292 -174 +292 -174 +6 -2 +11 -7 +2 -2 +200 -170 +4 -4 +7 -1 +1 -1 +7 -28 +1 -1 +5 -5 +1 -1 +18 -7 +463 +35 -26 -139 +1 -1 +1 -1 -138 +138 +1 -1 +1 -1 +31 -7 +2 -1 +2 -2 +2 +61 -23 +12 -6 +15 +14 +3 -3 +11 -11 +13 -14 +147 -31 +5 -5 +2 -2 +7 -7 +6 -6 +5 -5 +2 -2 +6 -6 +1 -1 +3 -3 +2 -2 +403 -344 +8 -8 +1 -1 +1 -1 +1 -1 +2 -2 +4 -4 +1 -2 +1 -1 +4 -4 +6 -6 +5 -5 +2 -2 +1 -1 +1 -1 +1 -1 +1 -1 +9 -9 +12 -54 +22 -22 +24 -24 +18 -18 +5 +2 -2 +1 -1 +7 -7 +4 -4 +1 -1 +2 -2 +4 -4 +1 -1 +1 -1 +4 -4 +1 -1 +1 -1 +3 -3 +1 -1 +1 -1 +1 -1 +5 -5 +1 -1 +1 -1 +7 -7 +2 -2 +10 -3 +8 -8 +7 -7 +1 -1 +1 -1 +6 -6
~ Makefile.in ~ VERSION ~ auto.def ~ compat/tcl-9.0/generic/tcl.h ~ compat/tcl-9.0/generic/tclDecls.h ~ extsrc/cson_amalgamation.c ~ extsrc/pikchr.c ~ extsrc/qrf.h ~ extsrc/shell.c ~ extsrc/sqlite3.c ~ extsrc/sqlite3.h ~ src/accordion.js ~ src/add.c ~ src/ajax.c ~ src/alerts.c ~ src/allrepo.c ~ src/backlink.c ~ src/bisect.c ~ src/blob.c ~ src/branch.c ~ src/browse.c ~ src/builtin.c ~ src/cache.c ~ src/captcha.c ~ src/cgi.c ~ src/chat.c ~ src/checkin.c ~ src/checkout.c ~ src/clone.c ~ src/color.c ~ src/comformat.c ~ src/config.h ~ src/configure.c ~ src/content.c ~ src/db.c ~ src/default.css ~ src/default.css ~ src/delta.c ~ src/deltafunc.c ~ src/descendants.c ~ src/diff.c ~ src/diffcmd.c ~ src/dispatch.c ~ src/doc.c ~ src/event.c ~ src/export.c ~ src/extcgi.c ~ src/file.c ~ src/fileedit.c ~ src/finfo.c ~ src/forum.c ~ src/fossil.confirmer.js ~ src/fossil.diff.js ~ src/fossil.dom.js ~ src/fossil.fetch.js ~ src/fossil.page.chat.js ~ src/fossil.page.fileedit.js ~ src/fossil.page.ticket.js ~ src/fossil.page.wikiedit.js ~ src/fossil.pikchr.js ~ src/fossil.wikiedit-wysiwyg.js ~ src/fshell.c ~ src/glob.c ~ src/graph.c ~ src/graph.js ~ src/graph.js ~ src/hname.c ~ src/hook.c ~ src/http.c ~ src/http_socket.c ~ src/http_ssl.c ~ src/import.c ~ src/info.c ~ src/json.c ~ src/json_branch.c ~ src/json_login.c ~ src/json_report.c ~ src/json_status.c ~ src/leaf.c ~ src/login.c ~ src/main.c ~ src/main.mk ~ src/manifest.c ~ src/markdown.c ~ src/markdown.md ~ src/match.c ~ src/merge.c ~ src/merge3.c ~ src/name.c ~ src/path.c ~ src/piechart.c ~ src/printf.c ~ src/purge.c ~ src/rebuild.c ~ src/regexp.c ~ src/report.c ~ src/robot.c ~ src/schema.c ~ src/search.c ~ src/security_audit.c ~ src/setup.c ~ src/setupuser.c ~ src/sha1.c ~ src/sitemap.c ~ src/skins.c ~ src/smtp.c ~ src/sqlcmd.c ~ src/stash.c ~ src/stat.c ~ src/style.c ~ src/style.chat.css ~ src/sync.c ~ src/tag.c ~ src/tar.c ~ src/terminal.c ~ src/th.c ~ src/th_main.c ~ src/th_tcl.c ~ src/timeline.c ~ src/timeline.c ~ src/tkt.c ~ src/tktsetup.c ~ src/undo.c ~ src/unicode.c ~ src/update.c ~ src/url.c ~ src/user.c ~ src/util.c ~ src/wiki.c ~ src/wikiformat.c ~ src/winhttp.c ~ src/xfer.c ~ src/xsystem.c ~ src/zip.c ~ test/commit-warning.test ~ test/json.test ~ test/set-manifest.test - test/settings.test ~ test/settings.test.off + test/settings.test.off ~ test/tester.tcl ~ tools/codecheck1.c ~ tools/email-sender.tcl ~ tools/fossil-autocomplete.zsh ~ tools/makeheaders.c ~ tools/makemake.tcl ~ tools/mkindex.c ~ win/Makefile.dmc ~ win/Makefile.mingw ~ win/Makefile.msc ~ www/aboutcgi.wiki ~ www/aboutdownload.wiki ~ www/alerts.md ~ www/antibot.wiki ~ www/backoffice.md ~ www/backup.md ~ www/blame.wiki ~ www/blockchain.md ~ www/branching.wiki ~ www/build.wiki ~ www/caps/admin-v-setup.md ~ www/caps/login-groups.md ~ www/caps/ref.html ~ www/cgi.wiki ~ www/changes.wiki ~ www/chat.md ~ www/childprojects.wiki ~ www/chroot.md ~ www/ckout-workflows.md ~ www/co-vs-up.md ~ www/concepts.wiki ~ www/containers.md ~ www/contribute.wiki ~ www/customskin.md ~ www/defcsp.md ~ www/delta_format.wiki ~ www/embeddeddoc.wiki ~ www/env-opts.md ~ www/event.wiki ~ www/fileedit-page.md ~ www/forum.wiki ~ www/fossil-v-git.wiki ~ www/fossil_prompt.sh ~ www/gitusers.md ~ www/globs.md ~ www/glossary.md ~ www/grep.md ~ www/hashes.md ~ www/hashpolicy.wiki ~ www/hints.wiki ~ www/index.wiki ~ www/inout.wiki ~ www/interwiki.md ~ www/javascript.md ~ www/json-api/intro.md ~ www/loadmgmt.md ~ www/makefile.wiki ~ www/mdtest/test1.md ~ www/mirrorlimitations.md ~ www/mirrortogithub.md ~ www/password.wiki ~ www/patchcmd.md ~ www/private.wiki ~ www/quickstart.wiki ~ www/rebaseharm.md ~ www/selfhost.wiki ~ www/server/index.html ~ www/server/windows/service.md ~ www/serverext.wiki ~ www/ssl-server.md ~ www/sync.wiki ~ www/tech_overview.wiki ~ www/th1.md ~ www/unvers.wiki
+2 -2
--- Makefile.in
+++ Makefile.in
@@ -75,11 +75,11 @@
7575
#
7676
# APPNAME = fossil-fuzz
7777
# may be more appropriate for fuzzing.
7878
7979
#### Emscripten stuff for optionally doing in-tree builds
80
-# of any WASM components. We store precompiled WASM in the the SCM, so
80
+# of any WASM components. We store precompiled WASM in the SCM, so
8181
# this is only useful for people who actively work on WASM
8282
# components. EMSDK_ENV refers to the "environment" script which comes
8383
# with the Emscripten SDK package:
8484
# https://emscripten.org/docs/getting_started/downloads.html
8585
EMSDK_HOME = @EMSDK_HOME@
@@ -114,11 +114,11 @@
114114
#
115115
# The "touch" is necessary to avoid a make loop due to a new upstream
116116
# feature in autosetup (GH 0a71e3c3b7) which rewrites *.in outputs only
117117
# if doing so will write different contents; otherwise, it leaves them
118118
# alone so the mtime doesn't change. This means that if you change one
119
-# our depdendencies besides Makefile.in, we'll reconfigure but Makefile
119
+# of our dependencies besides Makefile.in, we'll reconfigure but Makefile
120120
# won't change, so this rule will remain out of date, so we'll reconfig
121121
# but Makefile won't change, so we'll reconfig but... endlessly.
122122
#
123123
# This is also why we repeat the reconfig target's command here instead
124124
# of delegating to it with "$(MAKE) reconfig": having children running
125125
--- Makefile.in
+++ Makefile.in
@@ -75,11 +75,11 @@
75 #
76 # APPNAME = fossil-fuzz
77 # may be more appropriate for fuzzing.
78
79 #### Emscripten stuff for optionally doing in-tree builds
80 # of any WASM components. We store precompiled WASM in the the SCM, so
81 # this is only useful for people who actively work on WASM
82 # components. EMSDK_ENV refers to the "environment" script which comes
83 # with the Emscripten SDK package:
84 # https://emscripten.org/docs/getting_started/downloads.html
85 EMSDK_HOME = @EMSDK_HOME@
@@ -114,11 +114,11 @@
114 #
115 # The "touch" is necessary to avoid a make loop due to a new upstream
116 # feature in autosetup (GH 0a71e3c3b7) which rewrites *.in outputs only
117 # if doing so will write different contents; otherwise, it leaves them
118 # alone so the mtime doesn't change. This means that if you change one
119 # our depdendencies besides Makefile.in, we'll reconfigure but Makefile
120 # won't change, so this rule will remain out of date, so we'll reconfig
121 # but Makefile won't change, so we'll reconfig but... endlessly.
122 #
123 # This is also why we repeat the reconfig target's command here instead
124 # of delegating to it with "$(MAKE) reconfig": having children running
125
--- Makefile.in
+++ Makefile.in
@@ -75,11 +75,11 @@
75 #
76 # APPNAME = fossil-fuzz
77 # may be more appropriate for fuzzing.
78
79 #### Emscripten stuff for optionally doing in-tree builds
80 # of any WASM components. We store precompiled WASM in the SCM, so
81 # this is only useful for people who actively work on WASM
82 # components. EMSDK_ENV refers to the "environment" script which comes
83 # with the Emscripten SDK package:
84 # https://emscripten.org/docs/getting_started/downloads.html
85 EMSDK_HOME = @EMSDK_HOME@
@@ -114,11 +114,11 @@
114 #
115 # The "touch" is necessary to avoid a make loop due to a new upstream
116 # feature in autosetup (GH 0a71e3c3b7) which rewrites *.in outputs only
117 # if doing so will write different contents; otherwise, it leaves them
118 # alone so the mtime doesn't change. This means that if you change one
119 # of our dependencies besides Makefile.in, we'll reconfigure but Makefile
120 # won't change, so this rule will remain out of date, so we'll reconfig
121 # but Makefile won't change, so we'll reconfig but... endlessly.
122 #
123 # This is also why we repeat the reconfig target's command here instead
124 # of delegating to it with "$(MAKE) reconfig": having children running
125
+1 -1
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1
-2.27
1
+2.28
22
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1 2.27
2
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1 2.28
2
+8 -2
--- auto.def
+++ auto.def
@@ -95,13 +95,14 @@
9595
# or a version of tclsh that we find unsuitable below!
9696
cc-check-progs tclsh
9797
set hbtd /usr/local/Cellar/tcl-tk
9898
if {[string equal false [get-define TCLSH]]} {
9999
msg-result "WARNING: 'make test' will not run here."
100
+ set v 8.6
100101
} else {
101102
set v [exec sh -c "echo 'puts \$tcl_version' | tclsh"]
102
- if {[expr {$v >= 8.6}]} {
103
+ if {$v >= 8.6} {
103104
msg-result "Found Tclsh version $v in the PATH."
104105
define TCLSH tclsh
105106
} elseif {[file isdirectory $hbtd]} {
106107
# This is a macOS system with the Homebrew version of Tcl/Tk
107108
# installed. Select the newest version. It won't normally be
@@ -626,18 +627,23 @@
626627
627628
#
628629
# Handle the --with-tcl flag.
629630
#
630631
proc handle-with-tcl {} {
632
+ global v
631633
set tclpath [opt-val with-tcl]
632634
if {$tclpath eq ""} {
633635
return
634636
}
635637
set tclprivatestubs [opt-bool with-tcl-private-stubs]
636638
# Note parse-tclconfig-sh is in autosetup/local.tcl
637639
if {$tclpath eq "1"} {
638
- set tcldir [file dirname $::autosetup(dir)]/compat/tcl-8.6
640
+ if {$v >= 9.0} {
641
+ set tcldir [file dirname $::autosetup(dir)]/compat/tcl-9.0
642
+ } else {
643
+ set tcldir [file dirname $::autosetup(dir)]/compat/tcl-8.6
644
+ }
639645
if {$tclprivatestubs} {
640646
set tclconfig(TCL_INCLUDE_SPEC) -I$tcldir/generic
641647
set tclconfig(TCL_VERSION) {Private Stubs}
642648
set tclconfig(TCL_PATCH_LEVEL) {}
643649
set tclconfig(TCL_PREFIX) $tcldir
644650
645651
ADDED compat/tcl-9.0/generic/tcl.h
646652
ADDED compat/tcl-9.0/generic/tclDecls.h
--- auto.def
+++ auto.def
@@ -95,13 +95,14 @@
95 # or a version of tclsh that we find unsuitable below!
96 cc-check-progs tclsh
97 set hbtd /usr/local/Cellar/tcl-tk
98 if {[string equal false [get-define TCLSH]]} {
99 msg-result "WARNING: 'make test' will not run here."
 
100 } else {
101 set v [exec sh -c "echo 'puts \$tcl_version' | tclsh"]
102 if {[expr {$v >= 8.6}]} {
103 msg-result "Found Tclsh version $v in the PATH."
104 define TCLSH tclsh
105 } elseif {[file isdirectory $hbtd]} {
106 # This is a macOS system with the Homebrew version of Tcl/Tk
107 # installed. Select the newest version. It won't normally be
@@ -626,18 +627,23 @@
626
627 #
628 # Handle the --with-tcl flag.
629 #
630 proc handle-with-tcl {} {
 
631 set tclpath [opt-val with-tcl]
632 if {$tclpath eq ""} {
633 return
634 }
635 set tclprivatestubs [opt-bool with-tcl-private-stubs]
636 # Note parse-tclconfig-sh is in autosetup/local.tcl
637 if {$tclpath eq "1"} {
638 set tcldir [file dirname $::autosetup(dir)]/compat/tcl-8.6
 
 
 
 
639 if {$tclprivatestubs} {
640 set tclconfig(TCL_INCLUDE_SPEC) -I$tcldir/generic
641 set tclconfig(TCL_VERSION) {Private Stubs}
642 set tclconfig(TCL_PATCH_LEVEL) {}
643 set tclconfig(TCL_PREFIX) $tcldir
644
645 DDED compat/tcl-9.0/generic/tcl.h
646 DDED compat/tcl-9.0/generic/tclDecls.h
--- auto.def
+++ auto.def
@@ -95,13 +95,14 @@
95 # or a version of tclsh that we find unsuitable below!
96 cc-check-progs tclsh
97 set hbtd /usr/local/Cellar/tcl-tk
98 if {[string equal false [get-define TCLSH]]} {
99 msg-result "WARNING: 'make test' will not run here."
100 set v 8.6
101 } else {
102 set v [exec sh -c "echo 'puts \$tcl_version' | tclsh"]
103 if {$v >= 8.6} {
104 msg-result "Found Tclsh version $v in the PATH."
105 define TCLSH tclsh
106 } elseif {[file isdirectory $hbtd]} {
107 # This is a macOS system with the Homebrew version of Tcl/Tk
108 # installed. Select the newest version. It won't normally be
@@ -626,18 +627,23 @@
627
628 #
629 # Handle the --with-tcl flag.
630 #
631 proc handle-with-tcl {} {
632 global v
633 set tclpath [opt-val with-tcl]
634 if {$tclpath eq ""} {
635 return
636 }
637 set tclprivatestubs [opt-bool with-tcl-private-stubs]
638 # Note parse-tclconfig-sh is in autosetup/local.tcl
639 if {$tclpath eq "1"} {
640 if {$v >= 9.0} {
641 set tcldir [file dirname $::autosetup(dir)]/compat/tcl-9.0
642 } else {
643 set tcldir [file dirname $::autosetup(dir)]/compat/tcl-8.6
644 }
645 if {$tclprivatestubs} {
646 set tclconfig(TCL_INCLUDE_SPEC) -I$tcldir/generic
647 set tclconfig(TCL_VERSION) {Private Stubs}
648 set tclconfig(TCL_PATCH_LEVEL) {}
649 set tclconfig(TCL_PREFIX) $tcldir
650
651 DDED compat/tcl-9.0/generic/tcl.h
652 DDED compat/tcl-9.0/generic/tclDecls.h
--- a/compat/tcl-9.0/generic/tcl.h
+++ b/compat/tcl-9.0/generic/tcl.h
@@ -0,0 +1,2639 @@
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.ac (2 LOC Major, 2 LOC minor, 1 LOC patch)
42
+ * win/configure.ac (as above)
43
+ * win/tcl.m4 (not patchlevel)
44
+ * README.md (sections 0 and 2, with and without separator)
45
+ * win/README (not patchlevel) (sections 0 and 2)
46
+ * unix/tcl.spec (1 LOC patch)
47
+ */
48
+
49
+#if !defined(TCL_MAJOR_VERSION)
50
+# define TCL_MAJOR_VERSION 9
51
+#endif
52
+#if TCL_MAJOR_VERSION == 9
53
+# define TCL_MINOR_VERSION 0
54
+# define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
55
+# define TCL_RELEASE_SERIAL 0
56
+
57
+# define TCL_VERSION "9.0"
58
+# define TCL_PATCH_LEVEL "9.0.0"
59
+#endif /* TCL_MAJOR_VERSION */
60
+
61
+
62
+#if defined(RC_INVOKED)
63
+/*
64
+ * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
65
+ * quotation marks), JOIN joins two arguments.
66
+ */
67
+
68
+#ifndef STRINGIFY
69
+# define STRINGIFY(x) STRINGIFY1(x)
70
+# define STRINGIFY1(x) #x
71
+#endif
72
+#ifndef JOIN
73
+# define JOIN(a,b) JOIN1(a,b)
74
+# define JOIN1(a,b) a##b
75
+#endif
76
+#endif /* RC_INVOKED */
77
+
78
+/*
79
+ * A special definition used to allow this header file to be included from
80
+ * windows resource files so that they can obtain version information.
81
+ * RC_INVOKED is defined by default by the windows RC tool.
82
+ *
83
+ * Resource compilers don't like all the C stuff, like typedefs and function
84
+ * declarations, that occur below, so block them out.
85
+ */
86
+
87
+#ifndef RC_INVOKED
88
+
89
+/*
90
+ * Special macro to define mutexes.
91
+ */
92
+
93
+#define TCL_DECLARE_MUTEX(name) \
94
+ static Tcl_Mutex name;
95
+
96
+/*
97
+ * Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and
98
+ * SEEK_END, all #define'd by stdio.h .
99
+ *
100
+ * Also, many extensions need stdio.h, and they've grown accustomed to tcl.h
101
+ * providing it for them rather than #include-ing it themselves as they
102
+ * should, so also for their sake, we keep the #include to be consistent with
103
+ * prior Tcl releases.
104
+ */
105
+
106
+#include <stdio.h>
107
+#include <stddef.h>
108
+
109
+#if defined(__GNUC__) && (__GNUC__ > 2)
110
+# if defined(_WIN32) && defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO
111
+# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__MINGW_PRINTF_FORMAT, a, b)))
112
+# else
113
+# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b)))
114
+# endif
115
+# define TCL_NORETURN __attribute__ ((__noreturn__))
116
+# define TCL_NOINLINE __attribute__ ((__noinline__))
117
+# define TCL_NORETURN1 __attribute__ ((__noreturn__))
118
+#else
119
+# define TCL_FORMAT_PRINTF(a,b)
120
+# if defined(_MSC_VER)
121
+# define TCL_NORETURN __declspec(noreturn)
122
+# define TCL_NOINLINE __declspec(noinline)
123
+# else
124
+# define TCL_NORETURN /* nothing */
125
+# define TCL_NOINLINE /* nothing */
126
+# endif
127
+# define TCL_NORETURN1 /* nothing */
128
+#endif
129
+
130
+/*
131
+ * Allow a part of Tcl's API to be explicitly marked as deprecated.
132
+ *
133
+ * Used to make TIP 330/336 generate moans even if people use the
134
+ * compatibility macros. Change your code, guys! We won't support you forever.
135
+ */
136
+
137
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
138
+# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))
139
+# define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__ (msg)))
140
+# else
141
+# define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__))
142
+# endif
143
+#else
144
+# define TCL_DEPRECATED_API(msg) /* nothing portable */
145
+#endif
146
+
147
+/*
148
+ *----------------------------------------------------------------------------
149
+ * Macros used to declare a function to be exported by a DLL. Used by Windows,
150
+ * maps to no-op declarations on non-Windows systems. The default build on
151
+ * windows is for a DLL, which causes the DLLIMPORT and DLLEXPORT macros to be
152
+ * nonempty. To build a static library, the macro STATIC_BUILD should be
153
+ * defined.
154
+ *
155
+ * Note: when building static but linking dynamically to MSVCRT we must still
156
+ * correctly decorate the C library imported function. Use CRTIMPORT
157
+ * for this purpose. _DLL is defined by the compiler when linking to
158
+ * MSVCRT.
159
+ */
160
+
161
+#ifdef _WIN32
162
+# ifdef STATIC_BUILD
163
+# define DLLIMPORT
164
+# define DLLEXPORT
165
+# ifdef _DLL
166
+# define CRTIMPORT __declspec(dllimport)
167
+# else
168
+# define CRTIMPORT
169
+# endif
170
+# else
171
+# define DLLIMPORT __declspec(dllimport)
172
+# define DLLEXPORT __declspec(dllexport)
173
+# define CRTIMPORT __declspec(dllimport)
174
+# endif
175
+#else
176
+# define DLLIMPORT
177
+# if defined(__GNUC__) && __GNUC__ > 3
178
+# define DLLEXPORT __attribute__ ((visibility("default")))
179
+# else
180
+# define DLLEXPORT
181
+# endif
182
+# define CRTIMPORT
183
+#endif
184
+
185
+/*
186
+ * These macros are used to control whether functions are being declared for
187
+ * import or export. If a function is being declared while it is being built
188
+ * to be included in a shared library, then it should have the DLLEXPORT
189
+ * storage class. If is being declared for use by a module that is going to
190
+ * link against the shared library, then it should have the DLLIMPORT storage
191
+ * class. If the symbol is being declared for a static build or for use from a
192
+ * stub library, then the storage class should be empty.
193
+ *
194
+ * The convention is that a macro called BUILD_xxxx, where xxxx is the name of
195
+ * a library we are building, is set on the compile line for sources that are
196
+ * to be placed in the library. When this macro is set, the storage class will
197
+ * be set to DLLEXPORT. At the end of the header file, the storage class will
198
+ * be reset to DLLIMPORT.
199
+ */
200
+
201
+#undef TCL_STORAGE_CLASS
202
+#ifdef BUILD_tcl
203
+# define TCL_STORAGE_CLASS DLLEXPORT
204
+#else
205
+# ifdef USE_TCL_STUBS
206
+# define TCL_STORAGE_CLASS
207
+# else
208
+# define TCL_STORAGE_CLASS DLLIMPORT
209
+# endif
210
+#endif
211
+
212
+#if !defined(CONST86) && !defined(TCL_NO_DEPRECATED)
213
+# define CONST86 const
214
+#endif
215
+
216
+/*
217
+ * Make sure EXTERN isn't defined elsewhere.
218
+ */
219
+
220
+#ifdef EXTERN
221
+# undef EXTERN
222
+#endif /* EXTERN */
223
+
224
+#ifdef __cplusplus
225
+# define EXTERN extern "C" TCL_STORAGE_CLASS
226
+#else
227
+# define EXTERN extern TCL_STORAGE_CLASS
228
+#endif
229
+
230
+/*
231
+ * Miscellaneous declarations.
232
+ */
233
+
234
+typedef void *ClientData;
235
+
236
+/*
237
+ * Darwin specific configure overrides (to support fat compiles, where
238
+ * configure runs only once for multiple architectures):
239
+ */
240
+
241
+#ifdef __APPLE__
242
+# ifdef __LP64__
243
+# define TCL_WIDE_INT_IS_LONG 1
244
+# define TCL_CFG_DO64BIT 1
245
+# else /* !__LP64__ */
246
+# undef TCL_WIDE_INT_IS_LONG
247
+# undef TCL_CFG_DO64BIT
248
+# endif /* __LP64__ */
249
+# undef HAVE_STRUCT_STAT64
250
+#endif /* __APPLE__ */
251
+
252
+/* Cross-compiling 32-bit on a 64-bit platform? Then our
253
+ * configure script does the wrong thing. Correct that here.
254
+ */
255
+#if defined(__GNUC__) && !defined(_WIN32) && !defined(__LP64__)
256
+# undef TCL_WIDE_INT_IS_LONG
257
+#endif
258
+
259
+/*
260
+ * Define Tcl_WideInt to be a type that is (at least) 64-bits wide, and define
261
+ * Tcl_WideUInt to be the unsigned variant of that type (assuming that where
262
+ * we have one, we can have the other.)
263
+ *
264
+ * Also defines the following macros:
265
+ * TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on a
266
+ * LP64 system such as modern Solaris or Linux ... not including Win64)
267
+ * Tcl_WideAsLong - forgetful converter from wideInt to long.
268
+ * Tcl_LongAsWide - sign-extending converter from long to wideInt.
269
+ * Tcl_WideAsDouble - converter from wideInt to double.
270
+ * Tcl_DoubleAsWide - converter from double to wideInt.
271
+ *
272
+ * The following invariant should hold for any long value 'longVal':
273
+ * longVal == Tcl_WideAsLong(Tcl_LongAsWide(longVal))
274
+ */
275
+
276
+#if !defined(TCL_WIDE_INT_TYPE) && !defined(TCL_WIDE_INT_IS_LONG) && !defined(_WIN32) && !defined(__GNUC__)
277
+/*
278
+ * Don't know what platform it is and configure hasn't discovered what is
279
+ * going on for us. Try to guess...
280
+ */
281
+# include <limits.h>
282
+# if defined(LLONG_MAX) && (LLONG_MAX == LONG_MAX)
283
+# define TCL_WIDE_INT_IS_LONG 1
284
+# endif
285
+#endif
286
+
287
+#ifndef TCL_WIDE_INT_TYPE
288
+# define TCL_WIDE_INT_TYPE long long
289
+#endif /* !TCL_WIDE_INT_TYPE */
290
+
291
+typedef TCL_WIDE_INT_TYPE Tcl_WideInt;
292
+typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
293
+
294
+#ifndef TCL_LL_MODIFIER
295
+# if defined(_WIN32) && (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO)
296
+# define TCL_LL_MODIFIER "I64"
297
+# else
298
+# define TCL_LL_MODIFIER "ll"
299
+# endif
300
+#endif /* !TCL_LL_MODIFIER */
301
+#ifndef TCL_Z_MODIFIER
302
+# if defined(__GNUC__) && !defined(_WIN32)
303
+# define TCL_Z_MODIFIER "z"
304
+# elif defined(_WIN64)
305
+# define TCL_Z_MODIFIER TCL_LL_MODIFIER
306
+# else
307
+# define TCL_Z_MODIFIER ""
308
+# endif
309
+#endif /* !TCL_Z_MODIFIER */
310
+#ifndef TCL_T_MODIFIER
311
+# if defined(__GNUC__) && !defined(_WIN32)
312
+# define TCL_T_MODIFIER "t"
313
+# elif defined(_WIN64)
314
+# define TCL_T_MODIFIER TCL_LL_MODIFIER
315
+# else
316
+# define TCL_T_MODIFIER TCL_Z_MODIFIER
317
+# endif
318
+#endif /* !TCL_T_MODIFIER */
319
+
320
+#define Tcl_WideAsLong(val) ((long)((Tcl_WideInt)(val)))
321
+#define Tcl_LongAsWide(val) ((Tcl_WideInt)((long)(val)))
322
+#define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val)))
323
+#define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val)))
324
+
325
+#if TCL_MAJOR_VERSION < 9
326
+# ifndef Tcl_Size
327
+ typedef int Tcl_Size;
328
+# endif
329
+# ifndef TCL_SIZE_MAX
330
+# define TCL_SIZE_MAX ((int)(((unsigned int)-1)>>1))
331
+# endif
332
+# ifndef TCL_SIZE_MODIFIER
333
+# define TCL_SIZE_MODIFIER ""
334
+#endif
335
+#else
336
+ typedef ptrdiff_t Tcl_Size;
337
+# define TCL_SIZE_MAX ((Tcl_Size)(((size_t)-1)>>1))
338
+# define TCL_SIZE_MODIFIER TCL_T_MODIFIER
339
+#endif /* TCL_MAJOR_VERSION */
340
+
341
+#ifdef _WIN32
342
+# if TCL_MAJOR_VERSION > 8 || defined(_WIN64) || defined(_USE_64BIT_TIME_T)
343
+ typedef struct __stat64 Tcl_StatBuf;
344
+# elif defined(_USE_32BIT_TIME_T)
345
+ typedef struct _stati64 Tcl_StatBuf;
346
+# else
347
+ typedef struct _stat32i64 Tcl_StatBuf;
348
+# endif
349
+#elif defined(__CYGWIN__)
350
+ typedef struct {
351
+ unsigned st_dev;
352
+ unsigned short st_ino;
353
+ unsigned short st_mode;
354
+ short st_nlink;
355
+ short st_uid;
356
+ short st_gid;
357
+ /* Here is a 2-byte gap */
358
+ unsigned st_rdev;
359
+ /* Here is a 4-byte gap */
360
+ long long st_size;
361
+ struct {long tv_sec;} st_atim;
362
+ struct {long tv_sec;} st_mtim;
363
+ struct {long tv_sec;} st_ctim;
364
+ } Tcl_StatBuf;
365
+#else
366
+ typedef struct stat Tcl_StatBuf;
367
+#endif
368
+
369
+
370
+/*
371
+ *----------------------------------------------------------------------------
372
+ * Data structures defined opaquely in this module. The definitions below just
373
+ * provide dummy types.
374
+ */
375
+
376
+typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
377
+typedef struct Tcl_Channel_ *Tcl_Channel;
378
+typedef struct Tcl_ChannelTypeVersion_ *Tcl_ChannelTypeVersion;
379
+typedef struct Tcl_Command_ *Tcl_Command;
380
+typedef struct Tcl_Condition_ *Tcl_Condition;
381
+typedef struct Tcl_Dict_ *Tcl_Dict;
382
+typedef struct Tcl_EncodingState_ *Tcl_EncodingState;
383
+typedef struct Tcl_Encoding_ *Tcl_Encoding;
384
+typedef struct Tcl_Event Tcl_Event;
385
+typedef struct Tcl_Interp Tcl_Interp;
386
+typedef struct Tcl_InterpState_ *Tcl_InterpState;
387
+typedef struct Tcl_LoadHandle_ *Tcl_LoadHandle;
388
+typedef struct Tcl_Mutex_ *Tcl_Mutex;
389
+typedef struct Tcl_Pid_ *Tcl_Pid;
390
+typedef struct Tcl_RegExp_ *Tcl_RegExp;
391
+typedef struct Tcl_ThreadDataKey_ *Tcl_ThreadDataKey;
392
+typedef struct Tcl_ThreadId_ *Tcl_ThreadId;
393
+typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
394
+typedef struct Tcl_Trace_ *Tcl_Trace;
395
+typedef struct Tcl_Var_ *Tcl_Var;
396
+typedef struct Tcl_ZLibStream_ *Tcl_ZlibStream;
397
+
398
+/*
399
+ *----------------------------------------------------------------------------
400
+ * Definition of the interface to functions implementing threads. A function
401
+ * following this definition is given to each call of 'Tcl_CreateThread' and
402
+ * will be called as the main fuction of the new thread created by that call.
403
+ */
404
+
405
+#if defined _WIN32
406
+typedef unsigned (__stdcall Tcl_ThreadCreateProc) (void *clientData);
407
+#else
408
+typedef void (Tcl_ThreadCreateProc) (void *clientData);
409
+#endif
410
+
411
+/*
412
+ * Threading function return types used for abstracting away platform
413
+ * differences when writing a Tcl_ThreadCreateProc. See the NewThread function
414
+ * in generic/tclThreadTest.c for it's usage.
415
+ */
416
+
417
+#if defined _WIN32
418
+# define Tcl_ThreadCreateType unsigned __stdcall
419
+# define TCL_THREAD_CREATE_RETURN return 0
420
+#else
421
+# define Tcl_ThreadCreateType void
422
+# define TCL_THREAD_CREATE_RETURN
423
+#endif
424
+
425
+/*
426
+ * Definition of values for default stacksize and the possible flags to be
427
+ * given to Tcl_CreateThread.
428
+ */
429
+
430
+#define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack. */
431
+#define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default
432
+ * behaviour. */
433
+#define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable. */
434
+
435
+/*
436
+ * Flag values passed to Tcl_StringCaseMatch.
437
+ */
438
+
439
+#define TCL_MATCH_NOCASE (1<<0)
440
+
441
+/*
442
+ * Flag values passed to Tcl_GetRegExpFromObj.
443
+ */
444
+
445
+#define TCL_REG_BASIC 000000 /* BREs (convenience). */
446
+#define TCL_REG_EXTENDED 000001 /* EREs. */
447
+#define TCL_REG_ADVF 000002 /* Advanced features in EREs. */
448
+#define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs). */
449
+#define TCL_REG_QUOTE 000004 /* No special characters, none. */
450
+#define TCL_REG_NOCASE 000010 /* Ignore case. */
451
+#define TCL_REG_NOSUB 000020 /* Don't care about subexpressions. */
452
+#define TCL_REG_EXPANDED 000040 /* Expanded format, white space &
453
+ * comments. */
454
+#define TCL_REG_NLSTOP 000100 /* \n doesn't match . or [^ ] */
455
+#define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before. */
456
+#define TCL_REG_NEWLINE 000300 /* Newlines are line terminators. */
457
+#define TCL_REG_CANMATCH 001000 /* Report details on partial/limited
458
+ * matches. */
459
+
460
+/*
461
+ * Flags values passed to Tcl_RegExpExecObj.
462
+ */
463
+
464
+#define TCL_REG_NOTBOL 0001 /* Beginning of string does not match ^. */
465
+#define TCL_REG_NOTEOL 0002 /* End of string does not match $. */
466
+
467
+/*
468
+ * Structures filled in by Tcl_RegExpInfo. Note that all offset values are
469
+ * relative to the start of the match string, not the beginning of the entire
470
+ * string.
471
+ */
472
+
473
+typedef struct Tcl_RegExpIndices {
474
+#if TCL_MAJOR_VERSION > 8
475
+ Tcl_Size start; /* Character offset of first character in
476
+ * match. */
477
+ Tcl_Size end; /* Character offset of first character after
478
+ * the match. */
479
+#else
480
+ long start;
481
+ long end;
482
+#endif
483
+} Tcl_RegExpIndices;
484
+
485
+typedef struct Tcl_RegExpInfo {
486
+ Tcl_Size nsubs; /* Number of subexpressions in the compiled
487
+ * expression. */
488
+ Tcl_RegExpIndices *matches; /* Array of nsubs match offset pairs. */
489
+#if TCL_MAJOR_VERSION > 8
490
+ Tcl_Size extendStart; /* The offset at which a subsequent match
491
+ * might begin. */
492
+#else
493
+ long extendStart;
494
+ long reserved; /* Reserved for later use. */
495
+#endif
496
+} Tcl_RegExpInfo;
497
+
498
+/*
499
+ * Picky compilers complain if this typdef doesn't appear before the struct's
500
+ * reference in tclDecls.h.
501
+ */
502
+
503
+typedef Tcl_StatBuf *Tcl_Stat_;
504
+typedef struct stat *Tcl_OldStat_;
505
+
506
+/*
507
+ *----------------------------------------------------------------------------
508
+ * When a TCL command returns, the interpreter contains a result from the
509
+ * command. Programmers are strongly encouraged to use one of the functions
510
+ * Tcl_GetObjResult() or Tcl_GetStringResult() to read the interpreter's
511
+ * result. See the SetResult man page for details. Besides this result, the
512
+ * command function returns an integer code, which is one of the following:
513
+ *
514
+ * TCL_OK Command completed normally; the interpreter's result
515
+ * contains the command's result.
516
+ * TCL_ERROR The command couldn't be completed successfully; the
517
+ * interpreter's result describes what went wrong.
518
+ * TCL_RETURN The command requests that the current function return;
519
+ * the interpreter's result contains the function's
520
+ * return value.
521
+ * TCL_BREAK The command requests that the innermost loop be
522
+ * exited; the interpreter's result is meaningless.
523
+ * TCL_CONTINUE Go on to the next iteration of the current loop; the
524
+ * interpreter's result is meaningless.
525
+ * Integer return codes in the range TCL_CODE_USER_MIN to TCL_CODE_USER_MAX are
526
+ * reserved for the use of packages.
527
+ */
528
+
529
+#define TCL_OK 0
530
+#define TCL_ERROR 1
531
+#define TCL_RETURN 2
532
+#define TCL_BREAK 3
533
+#define TCL_CONTINUE 4
534
+#define TCL_CODE_USER_MIN 5
535
+#define TCL_CODE_USER_MAX 0x3fffffff /* 1073741823 */
536
+
537
+/*
538
+ *----------------------------------------------------------------------------
539
+ * Flags to control what substitutions are performed by Tcl_SubstObj():
540
+ */
541
+
542
+#define TCL_SUBST_COMMANDS 001
543
+#define TCL_SUBST_VARIABLES 002
544
+#define TCL_SUBST_BACKSLASHES 004
545
+#define TCL_SUBST_ALL 007
546
+
547
+/*
548
+ * Forward declaration of Tcl_Obj to prevent an error when the forward
549
+ * reference to Tcl_Obj is encountered in the function types declared below.
550
+ */
551
+
552
+struct Tcl_Obj;
553
+
554
+/*
555
+ *----------------------------------------------------------------------------
556
+ * Function types defined by Tcl:
557
+ */
558
+
559
+typedef int (Tcl_AppInitProc) (Tcl_Interp *interp);
560
+typedef int (Tcl_AsyncProc) (void *clientData, Tcl_Interp *interp,
561
+ int code);
562
+typedef void (Tcl_ChannelProc) (void *clientData, int mask);
563
+typedef void (Tcl_CloseProc) (void *data);
564
+typedef void (Tcl_CmdDeleteProc) (void *clientData);
565
+typedef int (Tcl_CmdProc) (void *clientData, Tcl_Interp *interp,
566
+ int argc, const char *argv[]);
567
+typedef void (Tcl_CmdTraceProc) (void *clientData, Tcl_Interp *interp,
568
+ int level, char *command, Tcl_CmdProc *proc,
569
+ void *cmdClientData, int argc, const char *argv[]);
570
+typedef int (Tcl_CmdObjTraceProc) (void *clientData, Tcl_Interp *interp,
571
+ int level, const char *command, Tcl_Command commandInfo, int objc,
572
+ struct Tcl_Obj *const *objv);
573
+typedef void (Tcl_CmdObjTraceDeleteProc) (void *clientData);
574
+typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr,
575
+ struct Tcl_Obj *dupPtr);
576
+typedef int (Tcl_EncodingConvertProc) (void *clientData, const char *src,
577
+ int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst,
578
+ int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr);
579
+typedef void (Tcl_EncodingFreeProc) (void *clientData);
580
+typedef int (Tcl_EventProc) (Tcl_Event *evPtr, int flags);
581
+typedef void (Tcl_EventCheckProc) (void *clientData, int flags);
582
+typedef int (Tcl_EventDeleteProc) (Tcl_Event *evPtr, void *clientData);
583
+typedef void (Tcl_EventSetupProc) (void *clientData, int flags);
584
+typedef void (Tcl_ExitProc) (void *clientData);
585
+typedef void (Tcl_FileProc) (void *clientData, int mask);
586
+typedef void (Tcl_FileFreeProc) (void *clientData);
587
+typedef void (Tcl_FreeInternalRepProc) (struct Tcl_Obj *objPtr);
588
+typedef void (Tcl_IdleProc) (void *clientData);
589
+typedef void (Tcl_InterpDeleteProc) (void *clientData,
590
+ Tcl_Interp *interp);
591
+typedef void (Tcl_NamespaceDeleteProc) (void *clientData);
592
+typedef int (Tcl_ObjCmdProc) (void *clientData, Tcl_Interp *interp,
593
+ int objc, struct Tcl_Obj *const *objv);
594
+#if TCL_MAJOR_VERSION > 8
595
+typedef int (Tcl_ObjCmdProc2) (void *clientData, Tcl_Interp *interp,
596
+ Tcl_Size objc, struct Tcl_Obj *const *objv);
597
+typedef int (Tcl_CmdObjTraceProc2) (void *clientData, Tcl_Interp *interp,
598
+ Tcl_Size level, const char *command, Tcl_Command commandInfo, Tcl_Size objc,
599
+ struct Tcl_Obj *const *objv);
600
+typedef void (Tcl_FreeProc) (void *blockPtr);
601
+#define Tcl_ExitProc Tcl_FreeProc
602
+#define Tcl_FileFreeProc Tcl_FreeProc
603
+#define Tcl_FileFreeProc Tcl_FreeProc
604
+#define Tcl_EncodingFreeProc Tcl_FreeProc
605
+#else
606
+#define Tcl_ObjCmdProc2 Tcl_ObjCmdProc
607
+#define Tcl_CmdObjTraceProc2 Tcl_CmdObjTraceProc
608
+typedef void (Tcl_FreeProc) (char *blockPtr);
609
+#endif
610
+typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp);
611
+typedef int (Tcl_LibraryUnloadProc) (Tcl_Interp *interp, int flags);
612
+typedef void (Tcl_PanicProc) (const char *format, ...);
613
+typedef void (Tcl_TcpAcceptProc) (void *callbackData, Tcl_Channel chan,
614
+ char *address, int port);
615
+typedef void (Tcl_TimerProc) (void *clientData);
616
+typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *interp, struct Tcl_Obj *objPtr);
617
+typedef void (Tcl_UpdateStringProc) (struct Tcl_Obj *objPtr);
618
+typedef char * (Tcl_VarTraceProc) (void *clientData, Tcl_Interp *interp,
619
+ const char *part1, const char *part2, int flags);
620
+typedef void (Tcl_CommandTraceProc) (void *clientData, Tcl_Interp *interp,
621
+ const char *oldName, const char *newName, int flags);
622
+typedef void (Tcl_CreateFileHandlerProc) (int fd, int mask, Tcl_FileProc *proc,
623
+ void *clientData);
624
+typedef void (Tcl_DeleteFileHandlerProc) (int fd);
625
+typedef void (Tcl_AlertNotifierProc) (void *clientData);
626
+typedef void (Tcl_ServiceModeHookProc) (int mode);
627
+typedef void *(Tcl_InitNotifierProc) (void);
628
+typedef void (Tcl_FinalizeNotifierProc) (void *clientData);
629
+typedef void (Tcl_MainLoopProc) (void);
630
+
631
+
632
+/* Abstract List functions */
633
+typedef Tcl_Size (Tcl_ObjTypeLengthProc) (struct Tcl_Obj *listPtr);
634
+typedef int (Tcl_ObjTypeIndexProc) (Tcl_Interp *interp, struct Tcl_Obj *listPtr,
635
+ Tcl_Size index, struct Tcl_Obj** elemObj);
636
+typedef int (Tcl_ObjTypeSliceProc) (Tcl_Interp *interp, struct Tcl_Obj *listPtr,
637
+ Tcl_Size fromIdx, Tcl_Size toIdx, struct Tcl_Obj **newObjPtr);
638
+typedef int (Tcl_ObjTypeReverseProc) (Tcl_Interp *interp,
639
+ struct Tcl_Obj *listPtr, struct Tcl_Obj **newObjPtr);
640
+typedef int (Tcl_ObjTypeGetElements) (Tcl_Interp *interp,
641
+ struct Tcl_Obj *listPtr, Tcl_Size *objcptr, struct Tcl_Obj ***objvptr);
642
+typedef struct Tcl_Obj *(Tcl_ObjTypeSetElement) (Tcl_Interp *interp,
643
+ struct Tcl_Obj *listPtr, Tcl_Size indexCount,
644
+ struct Tcl_Obj *const indexArray[], struct Tcl_Obj *valueObj);
645
+typedef int (Tcl_ObjTypeReplaceProc) (Tcl_Interp *interp,
646
+ struct Tcl_Obj *listObj, Tcl_Size first, Tcl_Size numToDelete,
647
+ Tcl_Size numToInsert, struct Tcl_Obj *const insertObjs[]);
648
+typedef int (Tcl_ObjTypeInOperatorProc) (Tcl_Interp *interp,
649
+ struct Tcl_Obj *valueObj, struct Tcl_Obj *listObj, int *boolResult);
650
+
651
+#ifndef TCL_NO_DEPRECATED
652
+# define Tcl_PackageInitProc Tcl_LibraryInitProc
653
+# define Tcl_PackageUnloadProc Tcl_LibraryUnloadProc
654
+#endif
655
+
656
+/*
657
+ *----------------------------------------------------------------------------
658
+ * The following structure represents a type of object, which is a particular
659
+ * internal representation for an object plus a set of functions that provide
660
+ * standard operations on objects of that type.
661
+ */
662
+
663
+typedef struct Tcl_ObjType {
664
+ const char *name; /* Name of the type, e.g. "int". */
665
+ Tcl_FreeInternalRepProc *freeIntRepProc;
666
+ /* Called to free any storage for the type's
667
+ * internal rep. NULL if the internal rep does
668
+ * not need freeing. */
669
+ Tcl_DupInternalRepProc *dupIntRepProc;
670
+ /* Called to create a new object as a copy of
671
+ * an existing object. */
672
+ Tcl_UpdateStringProc *updateStringProc;
673
+ /* Called to update the string rep from the
674
+ * type's internal representation. */
675
+ Tcl_SetFromAnyProc *setFromAnyProc;
676
+ /* Called to convert the object's internal rep
677
+ * to this type. Frees the internal rep of the
678
+ * old type. Returns TCL_ERROR on failure. */
679
+#if TCL_MAJOR_VERSION > 8
680
+ size_t version; /* Version field for future-proofing. */
681
+
682
+ /* List emulation functions - ObjType Version 1 */
683
+ Tcl_ObjTypeLengthProc *lengthProc;
684
+ /* Return the [llength] of the AbstractList */
685
+ Tcl_ObjTypeIndexProc *indexProc;
686
+ /* Return a value (Tcl_Obj) at a given index */
687
+ Tcl_ObjTypeSliceProc *sliceProc;
688
+ /* Return an AbstractList for
689
+ * [lrange $al $start $end] */
690
+ Tcl_ObjTypeReverseProc *reverseProc;
691
+ /* Return an AbstractList for [lreverse $al] */
692
+ Tcl_ObjTypeGetElements *getElementsProc;
693
+ /* Return an objv[] of all elements in the list */
694
+ Tcl_ObjTypeSetElement *setElementProc;
695
+ /* Replace the element at the indicies with the
696
+ * given valueObj. */
697
+ Tcl_ObjTypeReplaceProc *replaceProc;
698
+ /* Replace sublist with another sublist */
699
+ Tcl_ObjTypeInOperatorProc *inOperProc;
700
+ /* "in" and "ni" expr list operation.
701
+ * Determine if the given string value matches
702
+ * an element in the list. */
703
+#endif
704
+} Tcl_ObjType;
705
+
706
+#if TCL_MAJOR_VERSION > 8
707
+# define TCL_OBJTYPE_V0 0, \
708
+ 0,0,0,0,0,0,0,0 /* Pre-Tcl 9 */
709
+# define TCL_OBJTYPE_V1(a) offsetof(Tcl_ObjType, indexProc), \
710
+ a,0,0,0,0,0,0,0 /* Tcl 9 Version 1 */
711
+# define TCL_OBJTYPE_V2(a,b,c,d,e,f,g,h) sizeof(Tcl_ObjType), \
712
+ a,b,c,d,e,f,g,h /* Tcl 9 - AbstractLists */
713
+#else
714
+# define TCL_OBJTYPE_V0 /* just empty */
715
+# define TCL_OBJTYPE_V1(a) /* just empty */
716
+# define TCL_OBJTYPE_V2(a,b,c,d,e,f,g,h) /* just empty */
717
+#endif
718
+
719
+/*
720
+ * The following structure stores an internal representation (internalrep) for
721
+ * a Tcl value. An internalrep is associated with an Tcl_ObjType when both
722
+ * are stored in the same Tcl_Obj. The routines of the Tcl_ObjType govern
723
+ * the handling of the internalrep.
724
+ */
725
+
726
+typedef union Tcl_ObjInternalRep { /* The internal representation: */
727
+ long longValue; /* - an long integer value. */
728
+ double doubleValue; /* - a double-precision floating value. */
729
+ void *otherValuePtr; /* - another, type-specific value, */
730
+ /* not used internally any more. */
731
+ Tcl_WideInt wideValue; /* - an integer value >= 64bits */
732
+ struct { /* - internal rep as two pointers. */
733
+ void *ptr1;
734
+ void *ptr2;
735
+ } twoPtrValue;
736
+ struct { /* - internal rep as a pointer and a long, */
737
+ void *ptr; /* not used internally any more. */
738
+ unsigned long value;
739
+ } ptrAndLongRep;
740
+ struct { /* - use for pointer and length reps */
741
+ void *ptr;
742
+ Tcl_Size size;
743
+ } ptrAndSize;
744
+} Tcl_ObjInternalRep;
745
+
746
+/*
747
+ * One of the following structures exists for each object in the Tcl system.
748
+ * An object stores a value as either a string, some internal representation,
749
+ * or both.
750
+ */
751
+
752
+typedef struct Tcl_Obj {
753
+ Tcl_Size refCount; /* When 0 the object will be freed. */
754
+ char *bytes; /* This points to the first byte of the
755
+ * object's string representation. The array
756
+ * must be followed by a null byte (i.e., at
757
+ * offset length) but may also contain
758
+ * embedded null characters. The array's
759
+ * storage is allocated by Tcl_Alloc. NULL means
760
+ * the string rep is invalid and must be
761
+ * regenerated from the internal rep. Clients
762
+ * should use Tcl_GetStringFromObj or
763
+ * Tcl_GetString to get a pointer to the byte
764
+ * array as a readonly value. */
765
+ Tcl_Size length; /* The number of bytes at *bytes, not
766
+ * including the terminating null. */
767
+ const Tcl_ObjType *typePtr; /* Denotes the object's type. Always
768
+ * corresponds to the type of the object's
769
+ * internal rep. NULL indicates the object has
770
+ * no internal rep (has no type). */
771
+ Tcl_ObjInternalRep internalRep;
772
+ /* The internal representation: */
773
+} Tcl_Obj;
774
+
775
+
776
+/*
777
+ *----------------------------------------------------------------------------
778
+ * The following definitions support Tcl's namespace facility. Note: the first
779
+ * five fields must match exactly the fields in a Namespace structure (see
780
+ * tclInt.h).
781
+ */
782
+
783
+typedef struct Tcl_Namespace {
784
+ char *name; /* The namespace's name within its parent
785
+ * namespace. This contains no ::'s. The name
786
+ * of the global namespace is "" although "::"
787
+ * is an synonym. */
788
+ char *fullName; /* The namespace's fully qualified name. This
789
+ * starts with ::. */
790
+ void *clientData; /* Arbitrary value associated with this
791
+ * namespace. */
792
+ Tcl_NamespaceDeleteProc *deleteProc;
793
+ /* Function invoked when deleting the
794
+ * namespace to, e.g., free clientData. */
795
+ struct Tcl_Namespace *parentPtr;
796
+ /* Points to the namespace that contains this
797
+ * one. NULL if this is the global
798
+ * namespace. */
799
+} Tcl_Namespace;
800
+
801
+/*
802
+ *----------------------------------------------------------------------------
803
+ * The following structure represents a call frame, or activation record. A
804
+ * call frame defines a naming context for a procedure call: its local scope
805
+ * (for local variables) and its namespace scope (used for non-local
806
+ * variables; often the global :: namespace). A call frame can also define the
807
+ * naming context for a namespace eval or namespace inscope command: the
808
+ * namespace in which the command's code should execute. The Tcl_CallFrame
809
+ * structures exist only while procedures or namespace eval/inscope's are
810
+ * being executed, and provide a Tcl call stack.
811
+ *
812
+ * A call frame is initialized and pushed using Tcl_PushCallFrame and popped
813
+ * using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be provided by the
814
+ * Tcl_PushCallFrame caller, and callers typically allocate them on the C call
815
+ * stack for efficiency. For this reason, Tcl_CallFrame is defined as a
816
+ * structure and not as an opaque token. However, most Tcl_CallFrame fields
817
+ * are hidden since applications should not access them directly; others are
818
+ * declared as "dummyX".
819
+ *
820
+ * WARNING!! The structure definition must be kept consistent with the
821
+ * CallFrame structure in tclInt.h. If you change one, change the other.
822
+ */
823
+
824
+typedef struct Tcl_CallFrame {
825
+ Tcl_Namespace *nsPtr; /* Current namespace for the call frame. */
826
+ int dummy1;
827
+ Tcl_Size dummy2;
828
+ void *dummy3;
829
+ void *dummy4;
830
+ void *dummy5;
831
+ Tcl_Size dummy6;
832
+ void *dummy7;
833
+ void *dummy8;
834
+ Tcl_Size dummy9;
835
+ void *dummy10;
836
+ void *dummy11;
837
+ void *dummy12;
838
+ void *dummy13;
839
+} Tcl_CallFrame;
840
+
841
+/*
842
+ *----------------------------------------------------------------------------
843
+ * Information about commands that is returned by Tcl_GetCommandInfo and
844
+ * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based command
845
+ * function while proc is a traditional Tcl argc/argv string-based function.
846
+ * Tcl_CreateObjCommand and Tcl_CreateCommand ensure that both objProc and
847
+ * proc are non-NULL and can be called to execute the command. However, it may
848
+ * be faster to call one instead of the other. The member isNativeObjectProc
849
+ * is set to 1 if an object-based function was registered by
850
+ * Tcl_CreateObjCommand, and to 0 if a string-based function was registered by
851
+ * Tcl_CreateCommand. The other function is typically set to a compatibility
852
+ * wrapper that does string-to-object or object-to-string argument conversions
853
+ * then calls the other function.
854
+ */
855
+
856
+typedef struct {
857
+ int isNativeObjectProc; /* 1 if objProc was registered by a call to
858
+ * Tcl_CreateObjCommand; 2 if objProc was registered by
859
+ * a call to Tcl_CreateObjCommand2; 0 otherwise.
860
+ * Tcl_SetCmdInfo does not modify this field. */
861
+ Tcl_ObjCmdProc *objProc; /* Command's object-based function. */
862
+ void *objClientData; /* ClientData for object proc. */
863
+ Tcl_CmdProc *proc; /* Command's string-based function. */
864
+ void *clientData; /* ClientData for string proc. */
865
+ Tcl_CmdDeleteProc *deleteProc;
866
+ /* Function to call when command is
867
+ * deleted. */
868
+ void *deleteData; /* Value to pass to deleteProc (usually the
869
+ * same as clientData). */
870
+ Tcl_Namespace *namespacePtr;/* Points to the namespace that contains this
871
+ * command. Note that Tcl_SetCmdInfo will not
872
+ * change a command's namespace; use
873
+ * TclRenameCommand or Tcl_Eval (of 'rename')
874
+ * to do that. */
875
+ Tcl_ObjCmdProc2 *objProc2; /* Command's object2-based function. */
876
+ void *objClientData2; /* ClientData for object2 proc. */
877
+} Tcl_CmdInfo;
878
+
879
+/*
880
+ *----------------------------------------------------------------------------
881
+ * The structure defined below is used to hold dynamic strings. The only
882
+ * fields that clients should use are string and length, accessible via the
883
+ * macros Tcl_DStringValue and Tcl_DStringLength.
884
+ */
885
+
886
+#define TCL_DSTRING_STATIC_SIZE 200
887
+typedef struct Tcl_DString {
888
+ char *string; /* Points to beginning of string: either
889
+ * staticSpace below or a malloced array. */
890
+ Tcl_Size length; /* Number of bytes in string excluding
891
+ * terminating nul */
892
+ Tcl_Size spaceAvl; /* Total number of bytes available for the
893
+ * string and its terminating NULL char. */
894
+ char staticSpace[TCL_DSTRING_STATIC_SIZE];
895
+ /* Space to use in common case where string is
896
+ * small. */
897
+} Tcl_DString;
898
+
899
+#define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
900
+#define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
901
+
902
+/*
903
+ * Definitions for the maximum number of digits of precision that may be
904
+ * produced by Tcl_PrintDouble, and the number of bytes of buffer space
905
+ * required by Tcl_PrintDouble.
906
+ */
907
+
908
+#define TCL_MAX_PREC 17
909
+#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
910
+
911
+/*
912
+ * Definition for a number of bytes of buffer space sufficient to hold the
913
+ * string representation of an integer in base 10 (assuming the existence of
914
+ * 64-bit integers).
915
+ */
916
+
917
+#define TCL_INTEGER_SPACE (3*(int)sizeof(Tcl_WideInt))
918
+
919
+/*
920
+ *----------------------------------------------------------------------------
921
+ * Type values returned by Tcl_GetNumberFromObj
922
+ * TCL_NUMBER_INT Representation is a Tcl_WideInt
923
+ * TCL_NUMBER_BIG Representation is an mp_int
924
+ * TCL_NUMBER_DOUBLE Representation is a double
925
+ * TCL_NUMBER_NAN Value is NaN.
926
+ */
927
+
928
+#define TCL_NUMBER_INT 2
929
+#define TCL_NUMBER_BIG 3
930
+#define TCL_NUMBER_DOUBLE 4
931
+#define TCL_NUMBER_NAN 5
932
+
933
+/*
934
+ * Flag values passed to Tcl_ConvertElement.
935
+ * TCL_DONT_USE_BRACES forces it not to enclose the element in braces, but to
936
+ * use backslash quoting instead.
937
+ * TCL_DONT_QUOTE_HASH disables the default quoting of the '#' character. It
938
+ * is safe to leave the hash unquoted when the element is not the first
939
+ * element of a list, and this flag can be used by the caller to indicate
940
+ * that condition.
941
+ */
942
+
943
+#define TCL_DONT_USE_BRACES 1
944
+#define TCL_DONT_QUOTE_HASH 8
945
+
946
+/*
947
+ * Flags that may be passed to Tcl_GetIndexFromObj.
948
+ * TCL_EXACT disallows abbreviated strings.
949
+ * TCL_NULL_OK allows the empty string or NULL to return TCL_OK.
950
+ * The returned value will be -1;
951
+ * TCL_INDEX_TEMP_TABLE disallows caching of lookups. A possible use case is
952
+ * a table that will not live long enough to make it worthwhile.
953
+ */
954
+
955
+#define TCL_EXACT 1
956
+#define TCL_NULL_OK 32
957
+#define TCL_INDEX_TEMP_TABLE 64
958
+
959
+/*
960
+ * Flags that may be passed to Tcl_UniCharToUtf.
961
+ * TCL_COMBINE Combine surrogates
962
+ */
963
+
964
+#if TCL_MAJOR_VERSION > 8
965
+# define TCL_COMBINE 0x1000000
966
+#else
967
+# define TCL_COMBINE 0
968
+#endif
969
+/*
970
+ *----------------------------------------------------------------------------
971
+ * Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv.
972
+ * WARNING: these bit choices must not conflict with the bit choices for
973
+ * evalFlag bits in tclInt.h!
974
+ *
975
+ * Meanings:
976
+ * TCL_NO_EVAL: Just record this command
977
+ * TCL_EVAL_GLOBAL: Execute script in global namespace
978
+ * TCL_EVAL_DIRECT: Do not compile this script
979
+ * TCL_EVAL_INVOKE: Magical Tcl_EvalObjv mode for aliases/ensembles
980
+ * o Run in iPtr->lookupNsPtr or global namespace
981
+ * o Cut out of error traces
982
+ * o Don't reset the flags controlling ensemble
983
+ * error message rewriting.
984
+ * TCL_CANCEL_UNWIND: Magical Tcl_CancelEval mode that causes the
985
+ * stack for the script in progress to be
986
+ * completely unwound.
987
+ * TCL_EVAL_NOERR: Do no exception reporting at all, just return
988
+ * as the caller will report.
989
+ */
990
+
991
+#define TCL_NO_EVAL 0x010000
992
+#define TCL_EVAL_GLOBAL 0x020000
993
+#define TCL_EVAL_DIRECT 0x040000
994
+#define TCL_EVAL_INVOKE 0x080000
995
+#define TCL_CANCEL_UNWIND 0x100000
996
+#define TCL_EVAL_NOERR 0x200000
997
+
998
+/*
999
+ * Special freeProc values that may be passed to Tcl_SetResult (see the man
1000
+ * page for details):
1001
+ */
1002
+
1003
+#define TCL_VOLATILE ((Tcl_FreeProc *) 1)
1004
+#define TCL_STATIC ((Tcl_FreeProc *) 0)
1005
+#define TCL_DYNAMIC ((Tcl_FreeProc *) 3)
1006
+
1007
+/*
1008
+ * Flag values passed to variable-related functions.
1009
+ * WARNING: these bit choices must not conflict with the bit choice for
1010
+ * TCL_CANCEL_UNWIND, above.
1011
+ */
1012
+
1013
+#define TCL_GLOBAL_ONLY 1
1014
+#define TCL_NAMESPACE_ONLY 2
1015
+#define TCL_APPEND_VALUE 4
1016
+#define TCL_LIST_ELEMENT 8
1017
+#define TCL_TRACE_READS 0x10
1018
+#define TCL_TRACE_WRITES 0x20
1019
+#define TCL_TRACE_UNSETS 0x40
1020
+#define TCL_TRACE_DESTROYED 0x80
1021
+
1022
+#define TCL_LEAVE_ERR_MSG 0x200
1023
+#define TCL_TRACE_ARRAY 0x800
1024
+/* Indicate the semantics of the result of a trace. */
1025
+#define TCL_TRACE_RESULT_DYNAMIC 0x8000
1026
+#define TCL_TRACE_RESULT_OBJECT 0x10000
1027
+
1028
+/*
1029
+ * Flag values for ensemble commands.
1030
+ */
1031
+
1032
+#define TCL_ENSEMBLE_PREFIX 0x02/* Flag value to say whether to allow
1033
+ * unambiguous prefixes of commands or to
1034
+ * require exact matches for command names. */
1035
+
1036
+/*
1037
+ * Flag values passed to command-related functions.
1038
+ */
1039
+
1040
+#define TCL_TRACE_RENAME 0x2000
1041
+#define TCL_TRACE_DELETE 0x4000
1042
+
1043
+#define TCL_ALLOW_INLINE_COMPILATION 0x20000
1044
+
1045
+/*
1046
+ * Types for linked variables:
1047
+ */
1048
+
1049
+#define TCL_LINK_INT 1
1050
+#define TCL_LINK_DOUBLE 2
1051
+#define TCL_LINK_BOOLEAN 3
1052
+#define TCL_LINK_STRING 4
1053
+#define TCL_LINK_WIDE_INT 5
1054
+#define TCL_LINK_CHAR 6
1055
+#define TCL_LINK_UCHAR 7
1056
+#define TCL_LINK_SHORT 8
1057
+#define TCL_LINK_USHORT 9
1058
+#define TCL_LINK_UINT 10
1059
+#define TCL_LINK_LONG ((sizeof(long) != sizeof(int)) ? TCL_LINK_WIDE_INT : TCL_LINK_INT)
1060
+#define TCL_LINK_ULONG ((sizeof(long) != sizeof(int)) ? TCL_LINK_WIDE_UINT : TCL_LINK_UINT)
1061
+#define TCL_LINK_FLOAT 13
1062
+#define TCL_LINK_WIDE_UINT 14
1063
+#define TCL_LINK_CHARS 15
1064
+#define TCL_LINK_BINARY 16
1065
+#define TCL_LINK_READ_ONLY 0x80
1066
+
1067
+/*
1068
+ *----------------------------------------------------------------------------
1069
+ * Forward declarations of Tcl_HashTable and related types.
1070
+ */
1071
+
1072
+#ifndef TCL_HASH_TYPE
1073
+#if TCL_MAJOR_VERSION > 8
1074
+# define TCL_HASH_TYPE size_t
1075
+#else
1076
+# define TCL_HASH_TYPE unsigned
1077
+#endif
1078
+#endif
1079
+
1080
+typedef struct Tcl_HashKeyType Tcl_HashKeyType;
1081
+typedef struct Tcl_HashTable Tcl_HashTable;
1082
+typedef struct Tcl_HashEntry Tcl_HashEntry;
1083
+
1084
+typedef TCL_HASH_TYPE (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr);
1085
+typedef int (Tcl_CompareHashKeysProc) (void *keyPtr, Tcl_HashEntry *hPtr);
1086
+typedef Tcl_HashEntry * (Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr,
1087
+ void *keyPtr);
1088
+typedef void (Tcl_FreeHashEntryProc) (Tcl_HashEntry *hPtr);
1089
+
1090
+/*
1091
+ * Structure definition for an entry in a hash table. No-one outside Tcl
1092
+ * should access any of these fields directly; use the macros defined below.
1093
+ */
1094
+
1095
+struct Tcl_HashEntry {
1096
+ Tcl_HashEntry *nextPtr; /* Pointer to next entry in this hash bucket,
1097
+ * or NULL for end of chain. */
1098
+ Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */
1099
+ size_t hash; /* Hash value. */
1100
+ void *clientData; /* Application stores something here with
1101
+ * Tcl_SetHashValue. */
1102
+ union { /* Key has one of these forms: */
1103
+ char *oneWordValue; /* One-word value for key. */
1104
+ Tcl_Obj *objPtr; /* Tcl_Obj * key value. */
1105
+ int words[1]; /* Multiple integer words for key. The actual
1106
+ * size will be as large as necessary for this
1107
+ * table's keys. */
1108
+ char string[1]; /* String for key. The actual size will be as
1109
+ * large as needed to hold the key. */
1110
+ } key; /* MUST BE LAST FIELD IN RECORD!! */
1111
+};
1112
+
1113
+/*
1114
+ * Flags used in Tcl_HashKeyType.
1115
+ *
1116
+ * TCL_HASH_KEY_RANDOMIZE_HASH -
1117
+ * There are some things, pointers for example
1118
+ * which don't hash well because they do not use
1119
+ * the lower bits. If this flag is set then the
1120
+ * hash table will attempt to rectify this by
1121
+ * randomising the bits and then using the upper
1122
+ * N bits as the index into the table.
1123
+ * TCL_HASH_KEY_SYSTEM_HASH - If this flag is set then all memory internally
1124
+ * allocated for the hash table that is not for an
1125
+ * entry will use the system heap.
1126
+ * TCL_HASH_KEY_DIRECT_COMPARE -
1127
+ * Allows fast comparison for hash keys directly
1128
+ * by compare of their key.oneWordValue values,
1129
+ * before call of compareKeysProc (much slower
1130
+ * than a direct compare, so it is speed-up only
1131
+ * flag). Don't use it if keys contain values rather
1132
+ * than pointers.
1133
+ */
1134
+
1135
+#define TCL_HASH_KEY_RANDOMIZE_HASH 0x1
1136
+#define TCL_HASH_KEY_SYSTEM_HASH 0x2
1137
+#define TCL_HASH_KEY_DIRECT_COMPARE 0x4
1138
+
1139
+/*
1140
+ * Structure definition for the methods associated with a hash table key type.
1141
+ */
1142
+
1143
+#define TCL_HASH_KEY_TYPE_VERSION 1
1144
+struct Tcl_HashKeyType {
1145
+ int version; /* Version of the table. If this structure is
1146
+ * extended in future then the version can be
1147
+ * used to distinguish between different
1148
+ * structures. */
1149
+ int flags; /* Flags, see above for details. */
1150
+ Tcl_HashKeyProc *hashKeyProc;
1151
+ /* Calculates a hash value for the key. If
1152
+ * this is NULL then the pointer itself is
1153
+ * used as a hash value. */
1154
+ Tcl_CompareHashKeysProc *compareKeysProc;
1155
+ /* Compares two keys and returns zero if they
1156
+ * do not match, and non-zero if they do. If
1157
+ * this is NULL then the pointers are
1158
+ * compared. */
1159
+ Tcl_AllocHashEntryProc *allocEntryProc;
1160
+ /* Called to allocate memory for a new entry,
1161
+ * i.e. if the key is a string then this could
1162
+ * allocate a single block which contains
1163
+ * enough space for both the entry and the
1164
+ * string. Only the key field of the allocated
1165
+ * Tcl_HashEntry structure needs to be filled
1166
+ * in. If something else needs to be done to
1167
+ * the key, i.e. incrementing a reference
1168
+ * count then that should be done by this
1169
+ * function. If this is NULL then Tcl_Alloc is
1170
+ * used to allocate enough space for a
1171
+ * Tcl_HashEntry and the key pointer is
1172
+ * assigned to key.oneWordValue. */
1173
+ Tcl_FreeHashEntryProc *freeEntryProc;
1174
+ /* Called to free memory associated with an
1175
+ * entry. If something else needs to be done
1176
+ * to the key, i.e. decrementing a reference
1177
+ * count then that should be done by this
1178
+ * function. If this is NULL then Tcl_Free is
1179
+ * used to free the Tcl_HashEntry. */
1180
+};
1181
+
1182
+/*
1183
+ * Structure definition for a hash table. Must be in tcl.h so clients can
1184
+ * allocate space for these structures, but clients should never access any
1185
+ * fields in this structure.
1186
+ */
1187
+
1188
+#define TCL_SMALL_HASH_TABLE 4
1189
+struct Tcl_HashTable {
1190
+ Tcl_HashEntry **buckets; /* Pointer to bucket array. Each element
1191
+ * points to first entry in bucket's hash
1192
+ * chain, or NULL. */
1193
+ Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
1194
+ /* Bucket array used for small tables (to
1195
+ * avoid mallocs and frees). */
1196
+ Tcl_Size numBuckets; /* Total number of buckets allocated at
1197
+ * **bucketPtr. */
1198
+ Tcl_Size numEntries; /* Total number of entries present in
1199
+ * table. */
1200
+ Tcl_Size rebuildSize; /* Enlarge table when numEntries gets to be
1201
+ * this large. */
1202
+#if TCL_MAJOR_VERSION > 8
1203
+ size_t mask; /* Mask value used in hashing function. */
1204
+#endif
1205
+ int downShift; /* Shift count used in hashing function.
1206
+ * Designed to use high-order bits of
1207
+ * randomized keys. */
1208
+#if TCL_MAJOR_VERSION < 9
1209
+ int mask; /* Mask value used in hashing function. */
1210
+#endif
1211
+ int keyType; /* Type of keys used in this table. It's
1212
+ * either TCL_CUSTOM_KEYS, TCL_STRING_KEYS,
1213
+ * TCL_ONE_WORD_KEYS, or an integer giving the
1214
+ * number of ints that is the size of the
1215
+ * key. */
1216
+ Tcl_HashEntry *(*findProc) (Tcl_HashTable *tablePtr, const char *key);
1217
+ Tcl_HashEntry *(*createProc) (Tcl_HashTable *tablePtr, const char *key,
1218
+ int *newPtr);
1219
+ const Tcl_HashKeyType *typePtr;
1220
+ /* Type of the keys used in the
1221
+ * Tcl_HashTable. */
1222
+};
1223
+
1224
+/*
1225
+ * Structure definition for information used to keep track of searches through
1226
+ * hash tables:
1227
+ */
1228
+
1229
+typedef struct Tcl_HashSearch {
1230
+ Tcl_HashTable *tablePtr; /* Table being searched. */
1231
+ Tcl_Size nextIndex; /* Index of next bucket to be enumerated after
1232
+ * present one. */
1233
+ Tcl_HashEntry *nextEntryPtr;/* Next entry to be enumerated in the current
1234
+ * bucket. */
1235
+} Tcl_HashSearch;
1236
+
1237
+/*
1238
+ * Acceptable key types for hash tables:
1239
+ *
1240
+ * TCL_STRING_KEYS: The keys are strings, they are copied into the
1241
+ * entry.
1242
+ * TCL_ONE_WORD_KEYS: The keys are pointers, the pointer is stored
1243
+ * in the entry.
1244
+ * TCL_CUSTOM_TYPE_KEYS: The keys are arbitrary types which are copied
1245
+ * into the entry.
1246
+ * TCL_CUSTOM_PTR_KEYS: The keys are pointers to arbitrary types, the
1247
+ * pointer is stored in the entry.
1248
+ *
1249
+ * While maintaining binary compatibility the above have to be distinct values
1250
+ * as they are used to differentiate between old versions of the hash table
1251
+ * which don't have a typePtr and new ones which do. Once binary compatibility
1252
+ * is discarded in favour of making more wide spread changes TCL_STRING_KEYS
1253
+ * can be the same as TCL_CUSTOM_TYPE_KEYS, and TCL_ONE_WORD_KEYS can be the
1254
+ * same as TCL_CUSTOM_PTR_KEYS because they simply determine how the key is
1255
+ * accessed from the entry and not the behaviour.
1256
+ */
1257
+
1258
+#define TCL_STRING_KEYS (0)
1259
+#define TCL_ONE_WORD_KEYS (1)
1260
+#define TCL_CUSTOM_TYPE_KEYS (-2)
1261
+#define TCL_CUSTOM_PTR_KEYS (-1)
1262
+
1263
+/*
1264
+ * Structure definition for information used to keep track of searches through
1265
+ * dictionaries. These fields should not be accessed by code outside
1266
+ * tclDictObj.c
1267
+ */
1268
+
1269
+typedef struct {
1270
+ void *next; /* Search position for underlying hash
1271
+ * table. */
1272
+ TCL_HASH_TYPE epoch; /* Epoch marker for dictionary being searched,
1273
+ * or 0 if search has terminated. */
1274
+ Tcl_Dict dictionaryPtr; /* Reference to dictionary being searched. */
1275
+} Tcl_DictSearch;
1276
+
1277
+
1278
+/*
1279
+ *----------------------------------------------------------------------------
1280
+ * Flag values to pass to Tcl_DoOneEvent to disable searches for some kinds of
1281
+ * events:
1282
+ */
1283
+
1284
+#define TCL_DONT_WAIT (1<<1)
1285
+#define TCL_WINDOW_EVENTS (1<<2)
1286
+#define TCL_FILE_EVENTS (1<<3)
1287
+#define TCL_TIMER_EVENTS (1<<4)
1288
+#define TCL_IDLE_EVENTS (1<<5) /* WAS 0x10 ???? */
1289
+#define TCL_ALL_EVENTS (~TCL_DONT_WAIT)
1290
+
1291
+/*
1292
+ * The following structure defines a generic event for the Tcl event system.
1293
+ * These are the things that are queued in calls to Tcl_QueueEvent and
1294
+ * serviced later by Tcl_DoOneEvent. There can be many different kinds of
1295
+ * events with different fields, corresponding to window events, timer events,
1296
+ * etc. The structure for a particular event consists of a Tcl_Event header
1297
+ * followed by additional information specific to that event.
1298
+ */
1299
+
1300
+struct Tcl_Event {
1301
+ Tcl_EventProc *proc; /* Function to call to service this event. */
1302
+ struct Tcl_Event *nextPtr; /* Next in list of pending events, or NULL. */
1303
+};
1304
+
1305
+/*
1306
+ * Positions to pass to Tcl_QueueEvent/Tcl_ThreadQueueEvent:
1307
+ */
1308
+
1309
+typedef enum {
1310
+ TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK,
1311
+ TCL_QUEUE_ALERT_IF_EMPTY=4
1312
+} Tcl_QueuePosition;
1313
+
1314
+/*
1315
+ * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
1316
+ * event routines.
1317
+ */
1318
+
1319
+#define TCL_SERVICE_NONE 0
1320
+#define TCL_SERVICE_ALL 1
1321
+
1322
+/*
1323
+ * The following structure keeps is used to hold a time value, either as an
1324
+ * absolute time (the number of seconds from the epoch) or as an elapsed time.
1325
+ * On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
1326
+ */
1327
+
1328
+typedef struct Tcl_Time {
1329
+#if TCL_MAJOR_VERSION > 8
1330
+ long long sec; /* Seconds. */
1331
+#else
1332
+ long sec; /* Seconds. */
1333
+#endif
1334
+#if defined(_CYGWIN_) && TCL_MAJOR_VERSION > 8
1335
+ int usec; /* Microseconds. */
1336
+#else
1337
+ long usec; /* Microseconds. */
1338
+#endif
1339
+} Tcl_Time;
1340
+
1341
+typedef void (Tcl_SetTimerProc) (const Tcl_Time *timePtr);
1342
+typedef int (Tcl_WaitForEventProc) (const Tcl_Time *timePtr);
1343
+
1344
+/*
1345
+ * TIP #233 (Virtualized Time)
1346
+ */
1347
+
1348
+typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, void *clientData);
1349
+typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, void *clientData);
1350
+
1351
+/*
1352
+ *----------------------------------------------------------------------------
1353
+ * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler to
1354
+ * indicate what sorts of events are of interest:
1355
+ */
1356
+
1357
+#define TCL_READABLE (1<<1)
1358
+#define TCL_WRITABLE (1<<2)
1359
+#define TCL_EXCEPTION (1<<3)
1360
+
1361
+/*
1362
+ * Flag values to pass to Tcl_OpenCommandChannel to indicate the disposition
1363
+ * of the stdio handles. TCL_STDIN, TCL_STDOUT, TCL_STDERR, are also used in
1364
+ * Tcl_GetStdChannel.
1365
+ */
1366
+
1367
+#define TCL_STDIN (1<<1)
1368
+#define TCL_STDOUT (1<<2)
1369
+#define TCL_STDERR (1<<3)
1370
+#define TCL_ENFORCE_MODE (1<<4)
1371
+
1372
+/*
1373
+ * Bits passed to Tcl_DriverClose2Proc to indicate which side of a channel
1374
+ * should be closed.
1375
+ */
1376
+
1377
+#define TCL_CLOSE_READ (1<<1)
1378
+#define TCL_CLOSE_WRITE (1<<2)
1379
+
1380
+/*
1381
+ * Value to use as the closeProc for a channel that supports the close2Proc
1382
+ * interface.
1383
+ */
1384
+
1385
+#if TCL_MAJOR_VERSION > 8
1386
+# define TCL_CLOSE2PROC NULL
1387
+#else
1388
+# define TCL_CLOSE2PROC ((void *) 1)
1389
+#endif
1390
+
1391
+/*
1392
+ * Channel version tag. This was introduced in 8.3.2/8.4.
1393
+ */
1394
+
1395
+#define TCL_CHANNEL_VERSION_5 ((Tcl_ChannelTypeVersion) 0x5)
1396
+
1397
+/*
1398
+ * TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc.
1399
+ */
1400
+
1401
+#define TCL_CHANNEL_THREAD_INSERT (0)
1402
+#define TCL_CHANNEL_THREAD_REMOVE (1)
1403
+
1404
+/*
1405
+ * Typedefs for the various operations in a channel type:
1406
+ */
1407
+
1408
+typedef int (Tcl_DriverBlockModeProc) (void *instanceData, int mode);
1409
+typedef void Tcl_DriverCloseProc;
1410
+typedef int (Tcl_DriverClose2Proc) (void *instanceData,
1411
+ Tcl_Interp *interp, int flags);
1412
+typedef int (Tcl_DriverInputProc) (void *instanceData, char *buf,
1413
+ int toRead, int *errorCodePtr);
1414
+typedef int (Tcl_DriverOutputProc) (void *instanceData,
1415
+ const char *buf, int toWrite, int *errorCodePtr);
1416
+typedef void Tcl_DriverSeekProc;
1417
+typedef int (Tcl_DriverSetOptionProc) (void *instanceData,
1418
+ Tcl_Interp *interp, const char *optionName,
1419
+ const char *value);
1420
+typedef int (Tcl_DriverGetOptionProc) (void *instanceData,
1421
+ Tcl_Interp *interp, const char *optionName,
1422
+ Tcl_DString *dsPtr);
1423
+typedef void (Tcl_DriverWatchProc) (void *instanceData, int mask);
1424
+typedef int (Tcl_DriverGetHandleProc) (void *instanceData,
1425
+ int direction, void **handlePtr);
1426
+typedef int (Tcl_DriverFlushProc) (void *instanceData);
1427
+typedef int (Tcl_DriverHandlerProc) (void *instanceData,
1428
+ int interestMask);
1429
+typedef long long (Tcl_DriverWideSeekProc) (void *instanceData,
1430
+ long long offset, int mode, int *errorCodePtr);
1431
+/*
1432
+ * TIP #218, Channel Thread Actions
1433
+ */
1434
+typedef void (Tcl_DriverThreadActionProc) (void *instanceData,
1435
+ int action);
1436
+/*
1437
+ * TIP #208, File Truncation (etc.)
1438
+ */
1439
+typedef int (Tcl_DriverTruncateProc) (void *instanceData,
1440
+ long long length);
1441
+
1442
+/*
1443
+ * struct Tcl_ChannelType:
1444
+ *
1445
+ * One such structure exists for each type (kind) of channel. It collects
1446
+ * together in one place all the functions that are part of the specific
1447
+ * channel type.
1448
+ *
1449
+ * It is recommend that the Tcl_Channel* functions are used to access elements
1450
+ * of this structure, instead of direct accessing.
1451
+ */
1452
+
1453
+typedef struct Tcl_ChannelType {
1454
+ const char *typeName; /* The name of the channel type in Tcl
1455
+ * commands. This storage is owned by channel
1456
+ * type. */
1457
+ Tcl_ChannelTypeVersion version;
1458
+ /* Version of the channel type. */
1459
+ void *closeProc; /* Not used any more. */
1460
+ Tcl_DriverInputProc *inputProc;
1461
+ /* Function to call for input on channel. */
1462
+ Tcl_DriverOutputProc *outputProc;
1463
+ /* Function to call for output on channel. */
1464
+ void *seekProc; /* Not used any more. */
1465
+ Tcl_DriverSetOptionProc *setOptionProc;
1466
+ /* Set an option on a channel. */
1467
+ Tcl_DriverGetOptionProc *getOptionProc;
1468
+ /* Get an option from a channel. */
1469
+ Tcl_DriverWatchProc *watchProc;
1470
+ /* Set up the notifier to watch for events on
1471
+ * this channel. */
1472
+ Tcl_DriverGetHandleProc *getHandleProc;
1473
+ /* Get an OS handle from the channel or NULL
1474
+ * if not supported. */
1475
+ Tcl_DriverClose2Proc *close2Proc;
1476
+ /* Function to call to close the channel if
1477
+ * the device supports closing the read &
1478
+ * write sides independently. */
1479
+ Tcl_DriverBlockModeProc *blockModeProc;
1480
+ /* Set blocking mode for the raw channel. May
1481
+ * be NULL. */
1482
+ Tcl_DriverFlushProc *flushProc;
1483
+ /* Function to call to flush a channel. May be
1484
+ * NULL. */
1485
+ Tcl_DriverHandlerProc *handlerProc;
1486
+ /* Function to call to handle a channel event.
1487
+ * This will be passed up the stacked channel
1488
+ * chain. */
1489
+ Tcl_DriverWideSeekProc *wideSeekProc;
1490
+ /* Function to call to seek on the channel
1491
+ * which can handle 64-bit offsets. May be
1492
+ * NULL, and must be NULL if seekProc is
1493
+ * NULL. */
1494
+ Tcl_DriverThreadActionProc *threadActionProc;
1495
+ /* Function to call to notify the driver of
1496
+ * thread specific activity for a channel. May
1497
+ * be NULL. */
1498
+ Tcl_DriverTruncateProc *truncateProc;
1499
+ /* Function to call to truncate the underlying
1500
+ * file to a particular length. May be NULL if
1501
+ * the channel does not support truncation. */
1502
+} Tcl_ChannelType;
1503
+
1504
+/*
1505
+ * The following flags determine whether the blockModeProc above should set
1506
+ * the channel into blocking or nonblocking mode. They are passed as arguments
1507
+ * to the blockModeProc function in the above structure.
1508
+ */
1509
+
1510
+#define TCL_MODE_BLOCKING 0 /* Put channel into blocking mode. */
1511
+#define TCL_MODE_NONBLOCKING 1 /* Put channel into nonblocking
1512
+ * mode. */
1513
+
1514
+/*
1515
+ *----------------------------------------------------------------------------
1516
+ * Enum for different types of file paths.
1517
+ */
1518
+
1519
+typedef enum Tcl_PathType {
1520
+ TCL_PATH_ABSOLUTE,
1521
+ TCL_PATH_RELATIVE,
1522
+ TCL_PATH_VOLUME_RELATIVE
1523
+} Tcl_PathType;
1524
+
1525
+/*
1526
+ * The following structure is used to pass glob type data amongst the various
1527
+ * glob routines and Tcl_FSMatchInDirectory.
1528
+ */
1529
+
1530
+typedef struct Tcl_GlobTypeData {
1531
+ int type; /* Corresponds to bcdpfls as in 'find -t'. */
1532
+ int perm; /* Corresponds to file permissions. */
1533
+ Tcl_Obj *macType; /* Acceptable Mac type. */
1534
+ Tcl_Obj *macCreator; /* Acceptable Mac creator. */
1535
+} Tcl_GlobTypeData;
1536
+
1537
+/*
1538
+ * Type and permission definitions for glob command.
1539
+ */
1540
+
1541
+#define TCL_GLOB_TYPE_BLOCK (1<<0)
1542
+#define TCL_GLOB_TYPE_CHAR (1<<1)
1543
+#define TCL_GLOB_TYPE_DIR (1<<2)
1544
+#define TCL_GLOB_TYPE_PIPE (1<<3)
1545
+#define TCL_GLOB_TYPE_FILE (1<<4)
1546
+#define TCL_GLOB_TYPE_LINK (1<<5)
1547
+#define TCL_GLOB_TYPE_SOCK (1<<6)
1548
+#define TCL_GLOB_TYPE_MOUNT (1<<7)
1549
+
1550
+#define TCL_GLOB_PERM_RONLY (1<<0)
1551
+#define TCL_GLOB_PERM_HIDDEN (1<<1)
1552
+#define TCL_GLOB_PERM_R (1<<2)
1553
+#define TCL_GLOB_PERM_W (1<<3)
1554
+#define TCL_GLOB_PERM_X (1<<4)
1555
+
1556
+/*
1557
+ * Flags for the unload callback function.
1558
+ */
1559
+
1560
+#define TCL_UNLOAD_DETACH_FROM_INTERPRETER (1<<0)
1561
+#define TCL_UNLOAD_DETACH_FROM_PROCESS (1<<1)
1562
+
1563
+/*
1564
+ * Typedefs for the various filesystem operations:
1565
+ */
1566
+
1567
+typedef int (Tcl_FSStatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1568
+typedef int (Tcl_FSAccessProc) (Tcl_Obj *pathPtr, int mode);
1569
+typedef Tcl_Channel (Tcl_FSOpenFileChannelProc) (Tcl_Interp *interp,
1570
+ Tcl_Obj *pathPtr, int mode, int permissions);
1571
+typedef int (Tcl_FSMatchInDirectoryProc) (Tcl_Interp *interp, Tcl_Obj *result,
1572
+ Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types);
1573
+typedef Tcl_Obj * (Tcl_FSGetCwdProc) (Tcl_Interp *interp);
1574
+typedef int (Tcl_FSChdirProc) (Tcl_Obj *pathPtr);
1575
+typedef int (Tcl_FSLstatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1576
+typedef int (Tcl_FSCreateDirectoryProc) (Tcl_Obj *pathPtr);
1577
+typedef int (Tcl_FSDeleteFileProc) (Tcl_Obj *pathPtr);
1578
+typedef int (Tcl_FSCopyDirectoryProc) (Tcl_Obj *srcPathPtr,
1579
+ Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr);
1580
+typedef int (Tcl_FSCopyFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr);
1581
+typedef int (Tcl_FSRemoveDirectoryProc) (Tcl_Obj *pathPtr, int recursive,
1582
+ Tcl_Obj **errorPtr);
1583
+typedef int (Tcl_FSRenameFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr);
1584
+typedef void (Tcl_FSUnloadFileProc) (Tcl_LoadHandle loadHandle);
1585
+typedef Tcl_Obj * (Tcl_FSListVolumesProc) (void);
1586
+/* We have to declare the utime structure here. */
1587
+struct utimbuf;
1588
+typedef int (Tcl_FSUtimeProc) (Tcl_Obj *pathPtr, struct utimbuf *tval);
1589
+typedef int (Tcl_FSNormalizePathProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
1590
+ int nextCheckpoint);
1591
+typedef int (Tcl_FSFileAttrsGetProc) (Tcl_Interp *interp, int index,
1592
+ Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef);
1593
+typedef const char *const * (Tcl_FSFileAttrStringsProc) (Tcl_Obj *pathPtr,
1594
+ Tcl_Obj **objPtrRef);
1595
+typedef int (Tcl_FSFileAttrsSetProc) (Tcl_Interp *interp, int index,
1596
+ Tcl_Obj *pathPtr, Tcl_Obj *objPtr);
1597
+typedef Tcl_Obj * (Tcl_FSLinkProc) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr,
1598
+ int linkType);
1599
+typedef int (Tcl_FSLoadFileProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
1600
+ Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr);
1601
+typedef int (Tcl_FSPathInFilesystemProc) (Tcl_Obj *pathPtr,
1602
+ void **clientDataPtr);
1603
+typedef Tcl_Obj * (Tcl_FSFilesystemPathTypeProc) (Tcl_Obj *pathPtr);
1604
+typedef Tcl_Obj * (Tcl_FSFilesystemSeparatorProc) (Tcl_Obj *pathPtr);
1605
+#define Tcl_FSFreeInternalRepProc Tcl_FreeProc
1606
+typedef void *(Tcl_FSDupInternalRepProc) (void *clientData);
1607
+typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) (void *clientData);
1608
+typedef void *(Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr);
1609
+
1610
+typedef struct Tcl_FSVersion_ *Tcl_FSVersion;
1611
+
1612
+/*
1613
+ *----------------------------------------------------------------------------
1614
+ * Data structures related to hooking into the filesystem
1615
+ */
1616
+
1617
+/*
1618
+ * Filesystem version tag. This was introduced in 8.4.
1619
+ */
1620
+
1621
+#define TCL_FILESYSTEM_VERSION_1 ((Tcl_FSVersion) 0x1)
1622
+
1623
+/*
1624
+ * struct Tcl_Filesystem:
1625
+ *
1626
+ * One such structure exists for each type (kind) of filesystem. It collects
1627
+ * together the functions that form the interface for a particulr the
1628
+ * filesystem. Tcl always accesses the filesystem through one of these
1629
+ * structures.
1630
+ *
1631
+ * Not all entries need be non-NULL; any which are NULL are simply ignored.
1632
+ * However, a complete filesystem should provide all of these functions. The
1633
+ * explanations in the structure show the importance of each function.
1634
+ */
1635
+
1636
+typedef struct Tcl_Filesystem {
1637
+ const char *typeName; /* The name of the filesystem. */
1638
+ Tcl_Size structureLength; /* Length of this structure, so future binary
1639
+ * compatibility can be assured. */
1640
+ Tcl_FSVersion version; /* Version of the filesystem type. */
1641
+ Tcl_FSPathInFilesystemProc *pathInFilesystemProc;
1642
+ /* Determines whether the pathname is in this
1643
+ * filesystem. This is the most important
1644
+ * filesystem function. */
1645
+ Tcl_FSDupInternalRepProc *dupInternalRepProc;
1646
+ /* Duplicates the internal handle of the node.
1647
+ * If it is NULL, the filesystem is less
1648
+ * performant. */
1649
+ Tcl_FSFreeInternalRepProc *freeInternalRepProc;
1650
+ /* Frees the internal handle of the node. NULL
1651
+ * only if there is no need to free resources
1652
+ * used for the internal handle. */
1653
+ Tcl_FSInternalToNormalizedProc *internalToNormalizedProc;
1654
+ /* Converts the internal handle to a normalized
1655
+ * path. NULL if the filesystem creates nodes
1656
+ * having no pathname. */
1657
+ Tcl_FSCreateInternalRepProc *createInternalRepProc;
1658
+ /* Creates an internal handle for a pathname.
1659
+ * May be NULL if pathnames have no internal
1660
+ * handle or if pathInFilesystemProc always
1661
+ * immediately creates an internal
1662
+ * representation for pathnames in the
1663
+ * filesystem. */
1664
+ Tcl_FSNormalizePathProc *normalizePathProc;
1665
+ /* Normalizes a path. Should be implemented if
1666
+ * the filesystems supports multiple paths to
1667
+ * the same node. */
1668
+ Tcl_FSFilesystemPathTypeProc *filesystemPathTypeProc;
1669
+ /* Determines the type of a path in this
1670
+ * filesystem. May be NULL. */
1671
+ Tcl_FSFilesystemSeparatorProc *filesystemSeparatorProc;
1672
+ /* Produces the separator character(s) for this
1673
+ * filesystem. Must not be NULL. */
1674
+ Tcl_FSStatProc *statProc; /* Called by 'Tcl_FSStat()'. Provided by any
1675
+ * reasonable filesystem. */
1676
+ Tcl_FSAccessProc *accessProc;
1677
+ /* Called by 'Tcl_FSAccess()'. Implemented by
1678
+ * any reasonable filesystem. */
1679
+ Tcl_FSOpenFileChannelProc *openFileChannelProc;
1680
+ /* Called by 'Tcl_FSOpenFileChannel()'.
1681
+ * Provided by any reasonable filesystem. */
1682
+ Tcl_FSMatchInDirectoryProc *matchInDirectoryProc;
1683
+ /* Called by 'Tcl_FSMatchInDirectory()'. NULL
1684
+ * if the filesystem does not support glob or
1685
+ * recursive copy. */
1686
+ Tcl_FSUtimeProc *utimeProc; /* Called by 'Tcl_FSUtime()', by 'file
1687
+ * mtime' to set (not read) times, 'file
1688
+ * atime', and the open-r/open-w/fcopy variant
1689
+ * of 'file copy'. */
1690
+ Tcl_FSLinkProc *linkProc; /* Called by 'Tcl_FSLink()'. NULL if reading or
1691
+ * creating links is not supported. */
1692
+ Tcl_FSListVolumesProc *listVolumesProc;
1693
+ /* Lists filesystem volumes added by this
1694
+ * filesystem. NULL if the filesystem does not
1695
+ * use volumes. */
1696
+ Tcl_FSFileAttrStringsProc *fileAttrStringsProc;
1697
+ /* List all valid attributes strings. NULL if
1698
+ * the filesystem does not support the 'file
1699
+ * attributes' command. Can be used to attach
1700
+ * arbitrary additional data to files in a
1701
+ * filesystem. */
1702
+ Tcl_FSFileAttrsGetProc *fileAttrsGetProc;
1703
+ /* Called by 'Tcl_FSFileAttrsGet()' and by
1704
+ * 'file attributes'. */
1705
+ Tcl_FSFileAttrsSetProc *fileAttrsSetProc;
1706
+ /* Called by 'Tcl_FSFileAttrsSet()' and by
1707
+ * 'file attributes'. */
1708
+ Tcl_FSCreateDirectoryProc *createDirectoryProc;
1709
+ /* Called by 'Tcl_FSCreateDirectory()'. May be
1710
+ * NULL if the filesystem is read-only. */
1711
+ Tcl_FSRemoveDirectoryProc *removeDirectoryProc;
1712
+ /* Called by 'Tcl_FSRemoveDirectory()'. May be
1713
+ * NULL if the filesystem is read-only. */
1714
+ Tcl_FSDeleteFileProc *deleteFileProc;
1715
+ /* Called by 'Tcl_FSDeleteFile()' May be NULL
1716
+ * if the filesystem is is read-only. */
1717
+ Tcl_FSCopyFileProc *copyFileProc;
1718
+ /* Called by 'Tcl_FSCopyFile()'. If NULL, for
1719
+ * a copy operation at the script level (not
1720
+ * C) Tcl uses open-r, open-w and fcopy. */
1721
+ Tcl_FSRenameFileProc *renameFileProc;
1722
+ /* Called by 'Tcl_FSRenameFile()'. If NULL, for
1723
+ * a rename operation at the script level (not
1724
+ * C) Tcl performs a copy operation followed
1725
+ * by a delete operation. */
1726
+ Tcl_FSCopyDirectoryProc *copyDirectoryProc;
1727
+ /* Called by 'Tcl_FSCopyDirectory()'. If NULL,
1728
+ * for a copy operation at the script level
1729
+ * (not C) Tcl recursively creates directories
1730
+ * and copies files. */
1731
+ Tcl_FSLstatProc *lstatProc; /* Called by 'Tcl_FSLstat()'. If NULL, Tcl
1732
+ * attempts to use 'statProc' instead. */
1733
+ Tcl_FSLoadFileProc *loadFileProc;
1734
+ /* Called by 'Tcl_FSLoadFile()'. If NULL, Tcl
1735
+ * performs a copy to a temporary file in the
1736
+ * native filesystem and then calls
1737
+ * Tcl_FSLoadFile() on that temporary copy. */
1738
+ Tcl_FSGetCwdProc *getCwdProc;
1739
+ /* Called by 'Tcl_FSGetCwd()'. Normally NULL.
1740
+ * Usually only called once: If 'getcwd' is
1741
+ * called before 'chdir' is ever called. */
1742
+ Tcl_FSChdirProc *chdirProc; /* Called by 'Tcl_FSChdir()'. For a virtual
1743
+ * filesystem, chdirProc just returns zero
1744
+ * (success) if the pathname is a valid
1745
+ * directory, and some other value otherwise.
1746
+ * For A real filesystem, chdirProc performs
1747
+ * the correct action, e.g. calls the system
1748
+ * 'chdir' function. If not implemented, then
1749
+ * 'cd' and 'pwd' fail for a pathname in this
1750
+ * filesystem. On success Tcl stores the
1751
+ * pathname for use by GetCwd. If NULL, Tcl
1752
+ * performs records the pathname as the new
1753
+ * current directory if it passes a series of
1754
+ * directory access checks. */
1755
+} Tcl_Filesystem;
1756
+
1757
+/*
1758
+ * The following definitions are used as values for the 'linkAction' flag to
1759
+ * Tcl_FSLink, or the linkProc of any filesystem. Any combination of flags can
1760
+ * be given. For link creation, the linkProc should create a link which
1761
+ * matches any of the types given.
1762
+ *
1763
+ * TCL_CREATE_SYMBOLIC_LINK - Create a symbolic or soft link.
1764
+ * TCL_CREATE_HARD_LINK - Create a hard link.
1765
+ */
1766
+
1767
+#define TCL_CREATE_SYMBOLIC_LINK 0x01
1768
+#define TCL_CREATE_HARD_LINK 0x02
1769
+
1770
+/*
1771
+ *----------------------------------------------------------------------------
1772
+ * The following structure represents the Notifier functions that you can
1773
+ * override with the Tcl_SetNotifier call.
1774
+ */
1775
+
1776
+typedef struct Tcl_NotifierProcs {
1777
+ Tcl_SetTimerProc *setTimerProc;
1778
+ Tcl_WaitForEventProc *waitForEventProc;
1779
+ Tcl_CreateFileHandlerProc *createFileHandlerProc;
1780
+ Tcl_DeleteFileHandlerProc *deleteFileHandlerProc;
1781
+ Tcl_InitNotifierProc *initNotifierProc;
1782
+ Tcl_FinalizeNotifierProc *finalizeNotifierProc;
1783
+ Tcl_AlertNotifierProc *alertNotifierProc;
1784
+ Tcl_ServiceModeHookProc *serviceModeHookProc;
1785
+} Tcl_NotifierProcs;
1786
+
1787
+
1788
+/*
1789
+ *----------------------------------------------------------------------------
1790
+ * The following data structures and declarations are for the new Tcl parser.
1791
+ *
1792
+ * For each word of a command, and for each piece of a word such as a variable
1793
+ * reference, one of the following structures is created to describe the
1794
+ * token.
1795
+ */
1796
+
1797
+typedef struct Tcl_Token {
1798
+ int type; /* Type of token, such as TCL_TOKEN_WORD; see
1799
+ * below for valid types. */
1800
+ const char *start; /* First character in token. */
1801
+ Tcl_Size size; /* Number of bytes in token. */
1802
+ Tcl_Size numComponents; /* If this token is composed of other tokens,
1803
+ * this field tells how many of them there are
1804
+ * (including components of components, etc.).
1805
+ * The component tokens immediately follow
1806
+ * this one. */
1807
+} Tcl_Token;
1808
+
1809
+/*
1810
+ * Type values defined for Tcl_Token structures. These values are defined as
1811
+ * mask bits so that it's easy to check for collections of types.
1812
+ *
1813
+ * TCL_TOKEN_WORD - The token describes one word of a command,
1814
+ * from the first non-blank character of the word
1815
+ * (which may be " or {) up to but not including
1816
+ * the space, semicolon, or bracket that
1817
+ * terminates the word. NumComponents counts the
1818
+ * total number of sub-tokens that make up the
1819
+ * word. This includes, for example, sub-tokens
1820
+ * of TCL_TOKEN_VARIABLE tokens.
1821
+ * TCL_TOKEN_SIMPLE_WORD - This token is just like TCL_TOKEN_WORD except
1822
+ * that the word is guaranteed to consist of a
1823
+ * single TCL_TOKEN_TEXT sub-token.
1824
+ * TCL_TOKEN_TEXT - The token describes a range of literal text
1825
+ * that is part of a word. NumComponents is
1826
+ * always 0.
1827
+ * TCL_TOKEN_BS - The token describes a backslash sequence that
1828
+ * must be collapsed. NumComponents is always 0.
1829
+ * TCL_TOKEN_COMMAND - The token describes a command whose result
1830
+ * must be substituted into the word. The token
1831
+ * includes the enclosing brackets. NumComponents
1832
+ * is always 0.
1833
+ * TCL_TOKEN_VARIABLE - The token describes a variable substitution,
1834
+ * including the dollar sign, variable name, and
1835
+ * array index (if there is one) up through the
1836
+ * right parentheses. NumComponents tells how
1837
+ * many additional tokens follow to represent the
1838
+ * variable name. The first token will be a
1839
+ * TCL_TOKEN_TEXT token that describes the
1840
+ * variable name. If the variable is an array
1841
+ * reference then there will be one or more
1842
+ * additional tokens, of type TCL_TOKEN_TEXT,
1843
+ * TCL_TOKEN_BS, TCL_TOKEN_COMMAND, and
1844
+ * TCL_TOKEN_VARIABLE, that describe the array
1845
+ * index; numComponents counts the total number
1846
+ * of nested tokens that make up the variable
1847
+ * reference, including sub-tokens of
1848
+ * TCL_TOKEN_VARIABLE tokens.
1849
+ * TCL_TOKEN_SUB_EXPR - The token describes one subexpression of an
1850
+ * expression, from the first non-blank character
1851
+ * of the subexpression up to but not including
1852
+ * the space, brace, or bracket that terminates
1853
+ * the subexpression. NumComponents counts the
1854
+ * total number of following subtokens that make
1855
+ * up the subexpression; this includes all
1856
+ * subtokens for any nested TCL_TOKEN_SUB_EXPR
1857
+ * tokens. For example, a numeric value used as a
1858
+ * primitive operand is described by a
1859
+ * TCL_TOKEN_SUB_EXPR token followed by a
1860
+ * TCL_TOKEN_TEXT token. A binary subexpression
1861
+ * is described by a TCL_TOKEN_SUB_EXPR token
1862
+ * followed by the TCL_TOKEN_OPERATOR token for
1863
+ * the operator, then TCL_TOKEN_SUB_EXPR tokens
1864
+ * for the left then the right operands.
1865
+ * TCL_TOKEN_OPERATOR - The token describes one expression operator.
1866
+ * An operator might be the name of a math
1867
+ * function such as "abs". A TCL_TOKEN_OPERATOR
1868
+ * token is always preceded by one
1869
+ * TCL_TOKEN_SUB_EXPR token for the operator's
1870
+ * subexpression, and is followed by zero or more
1871
+ * TCL_TOKEN_SUB_EXPR tokens for the operator's
1872
+ * operands. NumComponents is always 0.
1873
+ * TCL_TOKEN_EXPAND_WORD - This token is just like TCL_TOKEN_WORD except
1874
+ * that it marks a word that began with the
1875
+ * literal character prefix "{*}". This word is
1876
+ * marked to be expanded - that is, broken into
1877
+ * words after substitution is complete.
1878
+ */
1879
+
1880
+#define TCL_TOKEN_WORD 1
1881
+#define TCL_TOKEN_SIMPLE_WORD 2
1882
+#define TCL_TOKEN_TEXT 4
1883
+#define TCL_TOKEN_BS 8
1884
+#define TCL_TOKEN_COMMAND 16
1885
+#define TCL_TOKEN_VARIABLE 32
1886
+#define TCL_TOKEN_SUB_EXPR 64
1887
+#define TCL_TOKEN_OPERATOR 128
1888
+#define TCL_TOKEN_EXPAND_WORD 256
1889
+
1890
+/*
1891
+ * Parsing error types. On any parsing error, one of these values will be
1892
+ * stored in the error field of the Tcl_Parse structure defined below.
1893
+ */
1894
+
1895
+#define TCL_PARSE_SUCCESS 0
1896
+#define TCL_PARSE_QUOTE_EXTRA 1
1897
+#define TCL_PARSE_BRACE_EXTRA 2
1898
+#define TCL_PARSE_MISSING_BRACE 3
1899
+#define TCL_PARSE_MISSING_BRACKET 4
1900
+#define TCL_PARSE_MISSING_PAREN 5
1901
+#define TCL_PARSE_MISSING_QUOTE 6
1902
+#define TCL_PARSE_MISSING_VAR_BRACE 7
1903
+#define TCL_PARSE_SYNTAX 8
1904
+#define TCL_PARSE_BAD_NUMBER 9
1905
+
1906
+/*
1907
+ * A structure of the following type is filled in by Tcl_ParseCommand. It
1908
+ * describes a single command parsed from an input string.
1909
+ */
1910
+
1911
+#define NUM_STATIC_TOKENS 20
1912
+
1913
+typedef struct Tcl_Parse {
1914
+ const char *commentStart; /* Pointer to # that begins the first of one
1915
+ * or more comments preceding the command. */
1916
+ Tcl_Size commentSize; /* Number of bytes in comments (up through
1917
+ * newline character that terminates the last
1918
+ * comment). If there were no comments, this
1919
+ * field is 0. */
1920
+ const char *commandStart; /* First character in first word of
1921
+ * command. */
1922
+ Tcl_Size commandSize; /* Number of bytes in command, including first
1923
+ * character of first word, up through the
1924
+ * terminating newline, close bracket, or
1925
+ * semicolon. */
1926
+ Tcl_Size numWords; /* Total number of words in command. May be
1927
+ * 0. */
1928
+ Tcl_Token *tokenPtr; /* Pointer to first token representing the
1929
+ * words of the command. Initially points to
1930
+ * staticTokens, but may change to point to
1931
+ * malloc-ed space if command exceeds space in
1932
+ * staticTokens. */
1933
+ Tcl_Size numTokens; /* Total number of tokens in command. */
1934
+ Tcl_Size tokensAvailable; /* Total number of tokens available at
1935
+ * *tokenPtr. */
1936
+ int errorType; /* One of the parsing error types defined
1937
+ * above. */
1938
+#if TCL_MAJOR_VERSION > 8
1939
+ int incomplete; /* This field is set to 1 by Tcl_ParseCommand
1940
+ * if the command appears to be incomplete.
1941
+ * This information is used by
1942
+ * Tcl_CommandComplete. */
1943
+#endif
1944
+
1945
+ /*
1946
+ * The fields below are intended only for the private use of the parser.
1947
+ * They should not be used by functions that invoke Tcl_ParseCommand.
1948
+ */
1949
+
1950
+ const char *string; /* The original command string passed to
1951
+ * Tcl_ParseCommand. */
1952
+ const char *end; /* Points to the character just after the last
1953
+ * one in the command string. */
1954
+ Tcl_Interp *interp; /* Interpreter to use for error reporting, or
1955
+ * NULL. */
1956
+ const char *term; /* Points to character in string that
1957
+ * terminated most recent token. Filled in by
1958
+ * ParseTokens. If an error occurs, points to
1959
+ * beginning of region where the error
1960
+ * occurred (e.g. the open brace if the close
1961
+ * brace is missing). */
1962
+#if TCL_MAJOR_VERSION < 9
1963
+ int incomplete;
1964
+#endif
1965
+ Tcl_Token staticTokens[NUM_STATIC_TOKENS];
1966
+ /* Initial space for tokens for command. This
1967
+ * space should be large enough to accommodate
1968
+ * most commands; dynamic space is allocated
1969
+ * for very large commands that don't fit
1970
+ * here. */
1971
+} Tcl_Parse;
1972
+
1973
+
1974
+/*
1975
+ *----------------------------------------------------------------------------
1976
+ * The following structure represents a user-defined encoding. It collects
1977
+ * together all the functions that are used by the specific encoding.
1978
+ */
1979
+
1980
+typedef struct Tcl_EncodingType {
1981
+ const char *encodingName; /* The name of the encoding, e.g. "euc-jp".
1982
+ * This name is the unique key for this
1983
+ * encoding type. */
1984
+ Tcl_EncodingConvertProc *toUtfProc;
1985
+ /* Function to convert from external encoding
1986
+ * into UTF-8. */
1987
+ Tcl_EncodingConvertProc *fromUtfProc;
1988
+ /* Function to convert from UTF-8 into
1989
+ * external encoding. */
1990
+ Tcl_FreeProc *freeProc; /* If non-NULL, function to call when this
1991
+ * encoding is deleted. */
1992
+ void *clientData; /* Arbitrary value associated with encoding
1993
+ * type. Passed to conversion functions. */
1994
+ Tcl_Size nullSize; /* Number of zero bytes that signify
1995
+ * end-of-string in this encoding. This number
1996
+ * is used to determine the source string
1997
+ * length when the srcLen argument is
1998
+ * negative. Must be 1, 2, or 4. */
1999
+} Tcl_EncodingType;
2000
+
2001
+/*
2002
+ * The following definitions are used as values for the conversion control
2003
+ * flags argument when converting text from one character set to another:
2004
+ *
2005
+ * TCL_ENCODING_START - Signifies that the source buffer is the first
2006
+ * block in a (potentially multi-block) input
2007
+ * stream. Tells the conversion function to reset
2008
+ * to an initial state and perform any
2009
+ * initialization that needs to occur before the
2010
+ * first byte is converted. If the source buffer
2011
+ * contains the entire input stream to be
2012
+ * converted, this flag should be set.
2013
+ * TCL_ENCODING_END - Signifies that the source buffer is the last
2014
+ * block in a (potentially multi-block) input
2015
+ * stream. Tells the conversion routine to
2016
+ * perform any finalization that needs to occur
2017
+ * after the last byte is converted and then to
2018
+ * reset to an initial state. If the source
2019
+ * buffer contains the entire input stream to be
2020
+ * converted, this flag should be set.
2021
+ * TCL_ENCODING_STOPONERROR - Not used any more.
2022
+ * TCL_ENCODING_NO_TERMINATE - If set, Tcl_ExternalToUtf does not append a
2023
+ * terminating NUL byte. Since it does not need
2024
+ * an extra byte for a terminating NUL, it fills
2025
+ * all dstLen bytes with encoded UTF-8 content if
2026
+ * needed. If clear, a byte is reserved in the
2027
+ * dst space for NUL termination, and a
2028
+ * terminating NUL is appended.
2029
+ * TCL_ENCODING_CHAR_LIMIT - If set and dstCharsPtr is not NULL, then
2030
+ * Tcl_ExternalToUtf takes the initial value of
2031
+ * *dstCharsPtr as a limit of the maximum number
2032
+ * of chars to produce in the encoded UTF-8
2033
+ * content. Otherwise, the number of chars
2034
+ * produced is controlled only by other limiting
2035
+ * factors.
2036
+ * TCL_ENCODING_PROFILE_* - Mutually exclusive encoding profile ids. Note
2037
+ * these are bit masks.
2038
+ *
2039
+ * NOTE: THESE BIT DEFINITIONS SHOULD NOT OVERLAP WITH INTERNAL USE BITS
2040
+ * DEFINED IN tclEncoding.c (ENCODING_INPUT et al). Be cognizant of this
2041
+ * when adding bits.
2042
+ */
2043
+
2044
+#define TCL_ENCODING_START 0x01
2045
+#define TCL_ENCODING_END 0x02
2046
+#if TCL_MAJOR_VERSION > 8
2047
+# define TCL_ENCODING_STOPONERROR 0x0 /* Not used any more */
2048
+#else
2049
+# define TCL_ENCODING_STOPONERROR 0x04
2050
+#endif
2051
+#define TCL_ENCODING_NO_TERMINATE 0x08
2052
+#define TCL_ENCODING_CHAR_LIMIT 0x10
2053
+/* Internal use bits, do not define bits in this space. See above comment */
2054
+#define TCL_ENCODING_INTERNAL_USE_MASK 0xFF00
2055
+/*
2056
+ * Reserve top byte for profile values (disjoint, not a mask). In case of
2057
+ * changes, ensure ENCODING_PROFILE_* macros in tclInt.h are modified if
2058
+ * necessary.
2059
+ */
2060
+#define TCL_ENCODING_PROFILE_STRICT TCL_ENCODING_STOPONERROR
2061
+#define TCL_ENCODING_PROFILE_TCL8 0x01000000
2062
+#define TCL_ENCODING_PROFILE_REPLACE 0x02000000
2063
+
2064
+/*
2065
+ * The following definitions are the error codes returned by the conversion
2066
+ * routines:
2067
+ *
2068
+ * TCL_OK - All characters were converted.
2069
+ * TCL_CONVERT_NOSPACE - The output buffer would not have been large
2070
+ * enough for all of the converted data; as many
2071
+ * characters as could fit were converted though.
2072
+ * TCL_CONVERT_MULTIBYTE - The last few bytes in the source string were
2073
+ * the beginning of a multibyte sequence, but
2074
+ * more bytes were needed to complete this
2075
+ * sequence. A subsequent call to the conversion
2076
+ * routine should pass the beginning of this
2077
+ * unconverted sequence plus additional bytes
2078
+ * from the source stream to properly convert the
2079
+ * formerly split-up multibyte sequence.
2080
+ * TCL_CONVERT_SYNTAX - The source stream contained an invalid
2081
+ * character sequence. This may occur if the
2082
+ * input stream has been damaged or if the input
2083
+ * encoding method was misidentified.
2084
+ * TCL_CONVERT_UNKNOWN - The source string contained a character that
2085
+ * could not be represented in the target
2086
+ * encoding.
2087
+ */
2088
+
2089
+#define TCL_CONVERT_MULTIBYTE (-1)
2090
+#define TCL_CONVERT_SYNTAX (-2)
2091
+#define TCL_CONVERT_UNKNOWN (-3)
2092
+#define TCL_CONVERT_NOSPACE (-4)
2093
+
2094
+/*
2095
+ * The maximum number of bytes that are necessary to represent a single
2096
+ * Unicode character in UTF-8. The valid values are 3 and 4. If > 3,
2097
+ * then Tcl_UniChar must be 4-bytes in size (UCS-4) (the default). If == 3,
2098
+ * then Tcl_UniChar must be 2-bytes in size (UTF-16). Since Tcl 9.0, UCS-4
2099
+ * mode is the default and recommended mode.
2100
+ */
2101
+
2102
+#ifndef TCL_UTF_MAX
2103
+# if defined(BUILD_tcl) || TCL_MAJOR_VERSION > 8
2104
+# define TCL_UTF_MAX 4
2105
+# else
2106
+# define TCL_UTF_MAX 3
2107
+# endif
2108
+#endif
2109
+
2110
+/*
2111
+ * This represents a Unicode character. Any changes to this should also be
2112
+ * reflected in regcustom.h.
2113
+ */
2114
+
2115
+#if TCL_UTF_MAX == 4 && TCL_MAJOR_VERSION > 8
2116
+ /*
2117
+ * int isn't 100% accurate as it should be a strict 4-byte value
2118
+ * (perhaps int32_t). ILP64/SILP64 systems may have troubles. The
2119
+ * size of this value must be reflected correctly in regcustom.h.
2120
+ */
2121
+typedef int Tcl_UniChar;
2122
+#elif TCL_UTF_MAX == 3 && !defined(BUILD_tcl)
2123
+typedef unsigned short Tcl_UniChar;
2124
+#else
2125
+# error "This TCL_UTF_MAX value is not supported"
2126
+#endif
2127
+
2128
+
2129
+/*
2130
+ *----------------------------------------------------------------------------
2131
+ * TIP #59: The following structure is used in calls 'Tcl_RegisterConfig' to
2132
+ * provide the system with the embedded configuration data.
2133
+ */
2134
+
2135
+typedef struct Tcl_Config {
2136
+ const char *key; /* Configuration key to register. ASCII
2137
+ * encoded, thus UTF-8. */
2138
+ const char *value; /* The value associated with the key. System
2139
+ * encoding. */
2140
+} Tcl_Config;
2141
+
2142
+/*
2143
+ *----------------------------------------------------------------------------
2144
+ * Flags for TIP#143 limits, detailing which limits are active in an
2145
+ * interpreter. Used for Tcl_{Add,Remove}LimitHandler type argument.
2146
+ */
2147
+
2148
+#define TCL_LIMIT_COMMANDS 0x01
2149
+#define TCL_LIMIT_TIME 0x02
2150
+
2151
+/*
2152
+ * Structure containing information about a limit handler to be called when a
2153
+ * command- or time-limit is exceeded by an interpreter.
2154
+ */
2155
+
2156
+typedef void (Tcl_LimitHandlerProc) (void *clientData, Tcl_Interp *interp);
2157
+#if TCL_MAJOR_VERSION > 8
2158
+#define Tcl_LimitHandlerDeleteProc Tcl_FreeProc
2159
+#else
2160
+typedef void (Tcl_LimitHandlerDeleteProc) (void *clientData);
2161
+#endif
2162
+
2163
+#if 0
2164
+/*
2165
+ *----------------------------------------------------------------------------
2166
+ * We would like to provide an anonymous structure "mp_int" here, which is
2167
+ * compatible with libtommath's "mp_int", but without duplicating anything
2168
+ * from <tommath.h> or including <tommath.h> here. But the libtommath project
2169
+ * didn't honor our request. See: <https://github.com/libtom/libtommath/pull/473>
2170
+ *
2171
+ * That's why this part is commented out, and we are using (void *) in
2172
+ * various API's in stead of the more correct (mp_int *).
2173
+ */
2174
+
2175
+#ifndef MP_INT_DECLARED
2176
+#define MP_INT_DECLARED
2177
+typedef struct mp_int mp_int;
2178
+#endif
2179
+
2180
+#endif
2181
+
2182
+/*
2183
+ *----------------------------------------------------------------------------
2184
+ * Definitions needed for Tcl_ParseArgvObj routines.
2185
+ * Based on tkArgv.c.
2186
+ * Modifications from the original are copyright (c) Sam Bromley 2006
2187
+ */
2188
+
2189
+typedef struct {
2190
+ int type; /* Indicates the option type; see below. */
2191
+ const char *keyStr; /* The key string that flags the option in the
2192
+ * argv array. */
2193
+ void *srcPtr; /* Value to be used in setting dst; usage
2194
+ * depends on type.*/
2195
+ void *dstPtr; /* Address of value to be modified; usage
2196
+ * depends on type.*/
2197
+ const char *helpStr; /* Documentation message describing this
2198
+ * option. */
2199
+ void *clientData; /* Word to pass to function callbacks. */
2200
+} Tcl_ArgvInfo;
2201
+
2202
+/*
2203
+ * Legal values for the type field of a Tcl_ArgInfo: see the user
2204
+ * documentation for details.
2205
+ */
2206
+
2207
+#define TCL_ARGV_CONSTANT 15
2208
+#define TCL_ARGV_INT 16
2209
+#define TCL_ARGV_STRING 17
2210
+#define TCL_ARGV_REST 18
2211
+#define TCL_ARGV_FLOAT 19
2212
+#define TCL_ARGV_FUNC 20
2213
+#define TCL_ARGV_GENFUNC 21
2214
+#define TCL_ARGV_HELP 22
2215
+#define TCL_ARGV_END 23
2216
+
2217
+/*
2218
+ * Types of callback functions for the TCL_ARGV_FUNC and TCL_ARGV_GENFUNC
2219
+ * argument types:
2220
+ */
2221
+
2222
+typedef int (Tcl_ArgvFuncProc)(void *clientData, Tcl_Obj *objPtr,
2223
+ void *dstPtr);
2224
+typedef Tcl_Size (Tcl_ArgvGenFuncProc)(void *clientData, Tcl_Interp *interp,
2225
+ Tcl_Size objc, Tcl_Obj *const *objv, void *dstPtr);
2226
+
2227
+/*
2228
+ * Shorthand for commonly used argTable entries.
2229
+ */
2230
+
2231
+#define TCL_ARGV_AUTO_HELP \
2232
+ {TCL_ARGV_HELP, "-help", NULL, NULL, \
2233
+ "Print summary of command-line options and abort", NULL}
2234
+#define TCL_ARGV_AUTO_REST \
2235
+ {TCL_ARGV_REST, "--", NULL, NULL, \
2236
+ "Marks the end of the options", NULL}
2237
+#define TCL_ARGV_TABLE_END \
2238
+ {TCL_ARGV_END, NULL, NULL, NULL, NULL, NULL}
2239
+
2240
+/*
2241
+ *----------------------------------------------------------------------------
2242
+ * Definitions needed for Tcl_Zlib routines. [TIP #234]
2243
+ *
2244
+ * Constants for the format flags describing what sort of data format is
2245
+ * desired/expected for the Tcl_ZlibDeflate, Tcl_ZlibInflate and
2246
+ * Tcl_ZlibStreamInit functions.
2247
+ */
2248
+
2249
+#define TCL_ZLIB_FORMAT_RAW 1
2250
+#define TCL_ZLIB_FORMAT_ZLIB 2
2251
+#define TCL_ZLIB_FORMAT_GZIP 4
2252
+#define TCL_ZLIB_FORMAT_AUTO 8
2253
+
2254
+/*
2255
+ * Constants that describe whether the stream is to operate in compressing or
2256
+ * decompressing mode.
2257
+ */
2258
+
2259
+#define TCL_ZLIB_STREAM_DEFLATE 16
2260
+#define TCL_ZLIB_STREAM_INFLATE 32
2261
+
2262
+/*
2263
+ * Constants giving compression levels. Use of TCL_ZLIB_COMPRESS_DEFAULT is
2264
+ * recommended.
2265
+ */
2266
+
2267
+#define TCL_ZLIB_COMPRESS_NONE 0
2268
+#define TCL_ZLIB_COMPRESS_FAST 1
2269
+#define TCL_ZLIB_COMPRESS_BEST 9
2270
+#define TCL_ZLIB_COMPRESS_DEFAULT (-1)
2271
+
2272
+/*
2273
+ * Constants for types of flushing, used with Tcl_ZlibFlush.
2274
+ */
2275
+
2276
+#define TCL_ZLIB_NO_FLUSH 0
2277
+#define TCL_ZLIB_FLUSH 2
2278
+#define TCL_ZLIB_FULLFLUSH 3
2279
+#define TCL_ZLIB_FINALIZE 4
2280
+
2281
+/*
2282
+ *----------------------------------------------------------------------------
2283
+ * Definitions needed for the Tcl_LoadFile function. [TIP #416]
2284
+ */
2285
+
2286
+#define TCL_LOAD_GLOBAL 1
2287
+#define TCL_LOAD_LAZY 2
2288
+
2289
+/*
2290
+ *----------------------------------------------------------------------------
2291
+ * Definitions needed for the Tcl_OpenTcpServerEx function. [TIP #456]
2292
+ */
2293
+#define TCL_TCPSERVER_REUSEADDR (1<<0)
2294
+#define TCL_TCPSERVER_REUSEPORT (1<<1)
2295
+
2296
+/*
2297
+ * Constants for special Tcl_Size-typed values, see TIP #494
2298
+ */
2299
+
2300
+#define TCL_IO_FAILURE ((Tcl_Size)-1)
2301
+#define TCL_AUTO_LENGTH ((Tcl_Size)-1)
2302
+#define TCL_INDEX_NONE ((Tcl_Size)-1)
2303
+
2304
+/*
2305
+ *----------------------------------------------------------------------------
2306
+ * Single public declaration for NRE.
2307
+ */
2308
+
2309
+typedef int (Tcl_NRPostProc) (void *data[], Tcl_Interp *interp,
2310
+ int result);
2311
+
2312
+/*
2313
+ *----------------------------------------------------------------------------
2314
+ * The following constant is used to test for older versions of Tcl in the
2315
+ * stubs tables.
2316
+ */
2317
+
2318
+#if TCL_MAJOR_VERSION > 8
2319
+# define TCL_STUB_MAGIC ((int) 0xFCA3BACB + (int) sizeof(void *))
2320
+#else
2321
+# define TCL_STUB_MAGIC ((int) 0xFCA3BACF)
2322
+#endif
2323
+
2324
+/*
2325
+ * The following function is required to be defined in all stubs aware
2326
+ * extensions. The function is actually implemented in the stub library, not
2327
+ * the main Tcl library, although there is a trivial implementation in the
2328
+ * main library in case an extension is statically linked into an application.
2329
+ */
2330
+
2331
+const char * Tcl_InitStubs(Tcl_Interp *interp, const char *version,
2332
+ int exact, int magic);
2333
+const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
2334
+ const char *version, int epoch, int revision);
2335
+const char * TclInitStubTable(const char *version);
2336
+void * TclStubCall(void *arg);
2337
+#if defined(_WIN32)
2338
+ TCL_NORETURN void Tcl_ConsolePanic(const char *format, ...);
2339
+#else
2340
+# define Tcl_ConsolePanic ((Tcl_PanicProc *)NULL)
2341
+#endif
2342
+
2343
+#ifdef USE_TCL_STUBS
2344
+#if TCL_MAJOR_VERSION < 9
2345
+# define Tcl_InitStubs(interp, version, exact) \
2346
+ (Tcl_InitStubs)(interp, version, \
2347
+ (exact)|(TCL_MAJOR_VERSION<<8)|(0xFF<<16), \
2348
+ TCL_STUB_MAGIC)
2349
+#else
2350
+# define Tcl_InitStubs(interp, version, exact) \
2351
+ (Tcl_InitStubs)(interp, version, \
2352
+ (exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16), \
2353
+ TCL_STUB_MAGIC)
2354
+#endif
2355
+#else
2356
+#if TCL_MAJOR_VERSION < 9
2357
+# define Tcl_InitStubs(interp, version, exact) \
2358
+ Tcl_Panic(((void)interp, (void)version, \
2359
+ (void)exact, "Please define -DUSE_TCL_STUBS"))
2360
+#else
2361
+# define Tcl_InitStubs(interp, version, exact) \
2362
+ Tcl_PkgInitStubsCheck(interp, version, \
2363
+ (exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16))
2364
+#endif
2365
+#endif
2366
+
2367
+/*
2368
+ * Public functions that are not accessible via the stubs table.
2369
+ * Tcl_GetMemoryInfo is needed for AOLserver. [Bug 1868171]
2370
+ */
2371
+
2372
+#define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \
2373
+ ((Tcl_SetPanicProc(Tcl_ConsolePanic), Tcl_CreateInterp())))
2374
+EXTERN TCL_NORETURN void Tcl_MainEx(Tcl_Size argc, char **argv,
2375
+ Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
2376
+EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp,
2377
+ const char *version, int exact);
2378
+EXTERN const char * Tcl_InitSubsystems(void);
2379
+EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
2380
+EXTERN const char * Tcl_FindExecutable(const char *argv0);
2381
+EXTERN const char * Tcl_SetPreInitScript(const char *string);
2382
+EXTERN const char * Tcl_SetPanicProc(
2383
+ Tcl_PanicProc *panicProc);
2384
+EXTERN void Tcl_StaticLibrary(Tcl_Interp *interp,
2385
+ const char *prefix,
2386
+ Tcl_LibraryInitProc *initProc,
2387
+ Tcl_LibraryInitProc *safeInitProc);
2388
+#ifndef TCL_NO_DEPRECATED
2389
+# define Tcl_StaticPackage Tcl_StaticLibrary
2390
+#endif
2391
+EXTERN Tcl_ExitProc * Tcl_SetExitProc(Tcl_ExitProc *proc);
2392
+#ifdef _WIN32
2393
+EXTERN const char *TclZipfs_AppHook(int *argc, unsigned short ***argv);
2394
+#else
2395
+EXTERN const char *TclZipfs_AppHook(int *argc, char ***argv);
2396
+#endif
2397
+#if defined(_WIN32) && defined(UNICODE)
2398
+#ifndef USE_TCL_STUBS
2399
+# define Tcl_FindExecutable(arg) ((Tcl_FindExecutable)((const char *)(arg)))
2400
+#endif
2401
+# define Tcl_MainEx Tcl_MainExW
2402
+ EXTERN TCL_NORETURN void Tcl_MainExW(Tcl_Size argc, unsigned short **argv,
2403
+ Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
2404
+#endif
2405
+#if defined(USE_TCL_STUBS) && (TCL_MAJOR_VERSION > 8)
2406
+#define Tcl_SetPanicProc(panicProc) \
2407
+ TclInitStubTable(((const char *(*)(Tcl_PanicProc *))TclStubCall((void *)panicProc))(panicProc))
2408
+#define Tcl_InitSubsystems() \
2409
+ TclInitStubTable(((const char *(*)(void))TclStubCall((void *)1))())
2410
+#define Tcl_FindExecutable(argv0) \
2411
+ TclInitStubTable(((const char *(*)(const char *))TclStubCall((void *)2))(argv0))
2412
+#define TclZipfs_AppHook(argcp, argvp) \
2413
+ TclInitStubTable(((const char *(*)(int *, void *))TclStubCall((void *)3))(argcp, argvp))
2414
+#define Tcl_MainExW(argc, argv, appInitProc, interp) \
2415
+ (void)((const char *(*)(Tcl_Size, const void *, Tcl_AppInitProc *, Tcl_Interp *)) \
2416
+ TclStubCall((void *)4))(argc, argv, appInitProc, interp)
2417
+#if !defined(_WIN32) || !defined(UNICODE)
2418
+#define Tcl_MainEx(argc, argv, appInitProc, interp) \
2419
+ (void)((const char *(*)(Tcl_Size, const void *, Tcl_AppInitProc *, Tcl_Interp *)) \
2420
+ TclStubCall((void *)5))(argc, argv, appInitProc, interp)
2421
+#endif
2422
+#define Tcl_StaticLibrary(interp, pkgName, initProc, safeInitProc) \
2423
+ (void)((const char *(*)(Tcl_Interp *, const char *, Tcl_LibraryInitProc *, Tcl_LibraryInitProc *)) \
2424
+ TclStubCall((void *)6))(interp, pkgName, initProc, safeInitProc)
2425
+#define Tcl_SetExitProc(proc) \
2426
+ ((Tcl_ExitProc *(*)(Tcl_ExitProc *))TclStubCall((void *)7))(proc)
2427
+#define Tcl_GetMemoryInfo(dsPtr) \
2428
+ (void)((const char *(*)(Tcl_DString *))TclStubCall((void *)8))(dsPtr)
2429
+#define Tcl_SetPreInitScript(string) \
2430
+ ((const char *(*)(const char *))TclStubCall((void *)9))(string)
2431
+#endif
2432
+
2433
+
2434
+/*
2435
+ *----------------------------------------------------------------------------
2436
+ * Include the public function declarations that are accessible via the stubs
2437
+ * table.
2438
+ */
2439
+
2440
+#include "tclDecls.h"
2441
+
2442
+/*
2443
+ * Include platform specific public function declarations that are accessible
2444
+ * via the stubs table. Make all TclOO symbols MODULE_SCOPE (which only
2445
+ * has effect on building it as a shared library). See ticket [3010352].
2446
+ */
2447
+
2448
+#if defined(BUILD_tcl)
2449
+# undef TCLAPI
2450
+# define TCLAPI MODULE_SCOPE
2451
+#endif
2452
+
2453
+/*
2454
+ *----------------------------------------------------------------------------
2455
+ * The following declarations map ckalloc and ckfree to Tcl_Alloc and
2456
+ * Tcl_Free for use in Tcl-8.x-compatible extensions.
2457
+ */
2458
+
2459
+#ifndef BUILD_tcl
2460
+# define ckalloc Tcl_Alloc
2461
+# define attemptckalloc Tcl_AttemptAlloc
2462
+# ifdef _MSC_VER
2463
+ /* Silence invalid C4090 warnings */
2464
+# define ckfree(a) Tcl_Free((void *)(a))
2465
+# define ckrealloc(a,b) Tcl_Realloc((void *)(a),(b))
2466
+# define attemptckrealloc(a,b) Tcl_AttemptRealloc((void *)(a),(b))
2467
+# else
2468
+# define ckfree Tcl_Free
2469
+# define ckrealloc Tcl_Realloc
2470
+# define attemptckrealloc Tcl_AttemptRealloc
2471
+# endif
2472
+#endif
2473
+
2474
+#ifndef TCL_MEM_DEBUG
2475
+
2476
+/*
2477
+ * If we are not using the debugging allocator, we should call the Tcl_Alloc,
2478
+ * et al. routines in order to guarantee that every module is using the same
2479
+ * memory allocator both inside and outside of the Tcl library.
2480
+ */
2481
+
2482
+# undef Tcl_InitMemory
2483
+# define Tcl_InitMemory(x)
2484
+# undef Tcl_DumpActiveMemory
2485
+# define Tcl_DumpActiveMemory(x)
2486
+# undef Tcl_ValidateAllMemory
2487
+# define Tcl_ValidateAllMemory(x,y)
2488
+
2489
+#endif /* !TCL_MEM_DEBUG */
2490
+
2491
+#ifdef TCL_MEM_DEBUG
2492
+# undef Tcl_IncrRefCount
2493
+# define Tcl_IncrRefCount(objPtr) \
2494
+ Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__)
2495
+# undef Tcl_DecrRefCount
2496
+# define Tcl_DecrRefCount(objPtr) \
2497
+ Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__)
2498
+# undef Tcl_IsShared
2499
+# define Tcl_IsShared(objPtr) \
2500
+ Tcl_DbIsShared(objPtr, __FILE__, __LINE__)
2501
+/*
2502
+ * Free the Obj by effectively doing:
2503
+ *
2504
+ * Tcl_IncrRefCount(objPtr);
2505
+ * Tcl_DecrRefCount(objPtr);
2506
+ *
2507
+ * This will free the obj if there are no references to the obj.
2508
+ */
2509
+# define Tcl_BounceRefCount(objPtr) \
2510
+ TclBounceRefCount(objPtr, __FILE__, __LINE__)
2511
+
2512
+static inline void
2513
+TclBounceRefCount(
2514
+ Tcl_Obj* objPtr,
2515
+ const char* fn,
2516
+ int line)
2517
+{
2518
+ if (objPtr) {
2519
+ if ((objPtr)->refCount == 0) {
2520
+ Tcl_DbDecrRefCount(objPtr, fn, line);
2521
+ }
2522
+ }
2523
+}
2524
+#else
2525
+# undef Tcl_IncrRefCount
2526
+# define Tcl_IncrRefCount(objPtr) \
2527
+ ((void)++(objPtr)->refCount)
2528
+ /*
2529
+ * Use do/while0 idiom for optimum correctness without compiler warnings.
2530
+ * https://wiki.c2.com/?TrivialDoWhileLoop
2531
+ */
2532
+# undef Tcl_DecrRefCount
2533
+# define Tcl_DecrRefCount(objPtr) \
2534
+ do { \
2535
+ Tcl_Obj *_objPtr = (objPtr); \
2536
+ if (_objPtr->refCount-- <= 1) { \
2537
+ TclFreeObj(_objPtr); \
2538
+ } \
2539
+ } while(0)
2540
+# undef Tcl_IsShared
2541
+# define Tcl_IsShared(objPtr) \
2542
+ ((objPtr)->refCount > 1)
2543
+
2544
+/*
2545
+ * Declare that obj will no longer be used or referenced.
2546
+ * This will free the obj if there are no references to the obj.
2547
+ */
2548
+# define Tcl_BounceRefCount(objPtr) \
2549
+ TclBounceRefCount(objPtr);
2550
+
2551
+static inline void
2552
+TclBounceRefCount(
2553
+ Tcl_Obj* objPtr)
2554
+{
2555
+ if (objPtr) {
2556
+ if ((objPtr)->refCount == 0) {
2557
+ Tcl_DecrRefCount(objPtr);
2558
+ }
2559
+ }
2560
+}
2561
+
2562
+#endif
2563
+
2564
+/*
2565
+ * Macros and definitions that help to debug the use of Tcl objects. When
2566
+ * TCL_MEM_DEBUG is defined, the Tcl_New declarations are overridden to call
2567
+ * debugging versions of the object creation functions.
2568
+ */
2569
+
2570
+#ifdef TCL_MEM_DEBUG
2571
+# undef Tcl_NewBignumObj
2572
+# define Tcl_NewBignumObj(val) \
2573
+ Tcl_DbNewBignumObj(val, __FILE__, __LINE__)
2574
+# undef Tcl_NewBooleanObj
2575
+# define Tcl_NewBooleanObj(val) \
2576
+ Tcl_DbNewWideIntObj((val)!=0, __FILE__, __LINE__)
2577
+# undef Tcl_NewByteArrayObj
2578
+# define Tcl_NewByteArrayObj(bytes, len) \
2579
+ Tcl_DbNewByteArrayObj(bytes, len, __FILE__, __LINE__)
2580
+# undef Tcl_NewDoubleObj
2581
+# define Tcl_NewDoubleObj(val) \
2582
+ Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)
2583
+# undef Tcl_NewListObj
2584
+# define Tcl_NewListObj(objc, objv) \
2585
+ Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__)
2586
+# undef Tcl_NewObj
2587
+# define Tcl_NewObj() \
2588
+ Tcl_DbNewObj(__FILE__, __LINE__)
2589
+# undef Tcl_NewStringObj
2590
+# define Tcl_NewStringObj(bytes, len) \
2591
+ Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__)
2592
+# undef Tcl_NewWideIntObj
2593
+# define Tcl_NewWideIntObj(val) \
2594
+ Tcl_DbNewWideIntObj(val, __FILE__, __LINE__)
2595
+#endif /* TCL_MEM_DEBUG */
2596
+
2597
+/*
2598
+ *----------------------------------------------------------------------------
2599
+ * Macros for clients to use to access fields of hash entries:
2600
+ */
2601
+
2602
+#define Tcl_GetHashValue(h) ((h)->clientData)
2603
+#define Tcl_SetHashValue(h, value) ((h)->clientData = (void *)(value))
2604
+#define Tcl_GetHashKey(tablePtr, h) \
2605
+ ((void *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS || \
2606
+ (tablePtr)->keyType == TCL_CUSTOM_PTR_KEYS) \
2607
+ ? (h)->key.oneWordValue \
2608
+ : (h)->key.string))
2609
+
2610
+/*
2611
+ * Macros to use for clients to use to invoke find and create functions for
2612
+ * hash tables:
2613
+ */
2614
+
2615
+#define Tcl_FindHashEntry(tablePtr, key) \
2616
+ (*((tablePtr)->findProc))(tablePtr, (const char *)(key))
2617
+#define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
2618
+ (*((tablePtr)->createProc))(tablePtr, (const char *)(key), newPtr)
2619
+
2620
+#endif /* RC_INVOKED */
2621
+
2622
+/*
2623
+ * end block for C++
2624
+ */
2625
+
2626
+#ifdef __cplusplus
2627
+}
2628
+#endif
2629
+
2630
+#endif /* _TCL */
2631
+
2632
+
2633
+/*
2634
+ * Local Variables:
2635
+ * mode: c
2636
+ * c-basic-offset: 4
2637
+ * fill-column: 78
2638
+ * End:
2639
+ */
--- a/compat/tcl-9.0/generic/tcl.h
+++ b/compat/tcl-9.0/generic/tcl.h
@@ -0,0 +1,2639 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/compat/tcl-9.0/generic/tcl.h
+++ b/compat/tcl-9.0/generic/tcl.h
@@ -0,0 +1,2639 @@
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.ac (2 LOC Major, 2 LOC minor, 1 LOC patch)
42 * win/configure.ac (as above)
43 * win/tcl.m4 (not patchlevel)
44 * README.md (sections 0 and 2, with and without separator)
45 * win/README (not patchlevel) (sections 0 and 2)
46 * unix/tcl.spec (1 LOC patch)
47 */
48
49 #if !defined(TCL_MAJOR_VERSION)
50 # define TCL_MAJOR_VERSION 9
51 #endif
52 #if TCL_MAJOR_VERSION == 9
53 # define TCL_MINOR_VERSION 0
54 # define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
55 # define TCL_RELEASE_SERIAL 0
56
57 # define TCL_VERSION "9.0"
58 # define TCL_PATCH_LEVEL "9.0.0"
59 #endif /* TCL_MAJOR_VERSION */
60
61
62 #if defined(RC_INVOKED)
63 /*
64 * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
65 * quotation marks), JOIN joins two arguments.
66 */
67
68 #ifndef STRINGIFY
69 # define STRINGIFY(x) STRINGIFY1(x)
70 # define STRINGIFY1(x) #x
71 #endif
72 #ifndef JOIN
73 # define JOIN(a,b) JOIN1(a,b)
74 # define JOIN1(a,b) a##b
75 #endif
76 #endif /* RC_INVOKED */
77
78 /*
79 * A special definition used to allow this header file to be included from
80 * windows resource files so that they can obtain version information.
81 * RC_INVOKED is defined by default by the windows RC tool.
82 *
83 * Resource compilers don't like all the C stuff, like typedefs and function
84 * declarations, that occur below, so block them out.
85 */
86
87 #ifndef RC_INVOKED
88
89 /*
90 * Special macro to define mutexes.
91 */
92
93 #define TCL_DECLARE_MUTEX(name) \
94 static Tcl_Mutex name;
95
96 /*
97 * Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and
98 * SEEK_END, all #define'd by stdio.h .
99 *
100 * Also, many extensions need stdio.h, and they've grown accustomed to tcl.h
101 * providing it for them rather than #include-ing it themselves as they
102 * should, so also for their sake, we keep the #include to be consistent with
103 * prior Tcl releases.
104 */
105
106 #include <stdio.h>
107 #include <stddef.h>
108
109 #if defined(__GNUC__) && (__GNUC__ > 2)
110 # if defined(_WIN32) && defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO
111 # define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__MINGW_PRINTF_FORMAT, a, b)))
112 # else
113 # define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b)))
114 # endif
115 # define TCL_NORETURN __attribute__ ((__noreturn__))
116 # define TCL_NOINLINE __attribute__ ((__noinline__))
117 # define TCL_NORETURN1 __attribute__ ((__noreturn__))
118 #else
119 # define TCL_FORMAT_PRINTF(a,b)
120 # if defined(_MSC_VER)
121 # define TCL_NORETURN __declspec(noreturn)
122 # define TCL_NOINLINE __declspec(noinline)
123 # else
124 # define TCL_NORETURN /* nothing */
125 # define TCL_NOINLINE /* nothing */
126 # endif
127 # define TCL_NORETURN1 /* nothing */
128 #endif
129
130 /*
131 * Allow a part of Tcl's API to be explicitly marked as deprecated.
132 *
133 * Used to make TIP 330/336 generate moans even if people use the
134 * compatibility macros. Change your code, guys! We won't support you forever.
135 */
136
137 #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
138 # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))
139 # define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__ (msg)))
140 # else
141 # define TCL_DEPRECATED_API(msg) __attribute__ ((__deprecated__))
142 # endif
143 #else
144 # define TCL_DEPRECATED_API(msg) /* nothing portable */
145 #endif
146
147 /*
148 *----------------------------------------------------------------------------
149 * Macros used to declare a function to be exported by a DLL. Used by Windows,
150 * maps to no-op declarations on non-Windows systems. The default build on
151 * windows is for a DLL, which causes the DLLIMPORT and DLLEXPORT macros to be
152 * nonempty. To build a static library, the macro STATIC_BUILD should be
153 * defined.
154 *
155 * Note: when building static but linking dynamically to MSVCRT we must still
156 * correctly decorate the C library imported function. Use CRTIMPORT
157 * for this purpose. _DLL is defined by the compiler when linking to
158 * MSVCRT.
159 */
160
161 #ifdef _WIN32
162 # ifdef STATIC_BUILD
163 # define DLLIMPORT
164 # define DLLEXPORT
165 # ifdef _DLL
166 # define CRTIMPORT __declspec(dllimport)
167 # else
168 # define CRTIMPORT
169 # endif
170 # else
171 # define DLLIMPORT __declspec(dllimport)
172 # define DLLEXPORT __declspec(dllexport)
173 # define CRTIMPORT __declspec(dllimport)
174 # endif
175 #else
176 # define DLLIMPORT
177 # if defined(__GNUC__) && __GNUC__ > 3
178 # define DLLEXPORT __attribute__ ((visibility("default")))
179 # else
180 # define DLLEXPORT
181 # endif
182 # define CRTIMPORT
183 #endif
184
185 /*
186 * These macros are used to control whether functions are being declared for
187 * import or export. If a function is being declared while it is being built
188 * to be included in a shared library, then it should have the DLLEXPORT
189 * storage class. If is being declared for use by a module that is going to
190 * link against the shared library, then it should have the DLLIMPORT storage
191 * class. If the symbol is being declared for a static build or for use from a
192 * stub library, then the storage class should be empty.
193 *
194 * The convention is that a macro called BUILD_xxxx, where xxxx is the name of
195 * a library we are building, is set on the compile line for sources that are
196 * to be placed in the library. When this macro is set, the storage class will
197 * be set to DLLEXPORT. At the end of the header file, the storage class will
198 * be reset to DLLIMPORT.
199 */
200
201 #undef TCL_STORAGE_CLASS
202 #ifdef BUILD_tcl
203 # define TCL_STORAGE_CLASS DLLEXPORT
204 #else
205 # ifdef USE_TCL_STUBS
206 # define TCL_STORAGE_CLASS
207 # else
208 # define TCL_STORAGE_CLASS DLLIMPORT
209 # endif
210 #endif
211
212 #if !defined(CONST86) && !defined(TCL_NO_DEPRECATED)
213 # define CONST86 const
214 #endif
215
216 /*
217 * Make sure EXTERN isn't defined elsewhere.
218 */
219
220 #ifdef EXTERN
221 # undef EXTERN
222 #endif /* EXTERN */
223
224 #ifdef __cplusplus
225 # define EXTERN extern "C" TCL_STORAGE_CLASS
226 #else
227 # define EXTERN extern TCL_STORAGE_CLASS
228 #endif
229
230 /*
231 * Miscellaneous declarations.
232 */
233
234 typedef void *ClientData;
235
236 /*
237 * Darwin specific configure overrides (to support fat compiles, where
238 * configure runs only once for multiple architectures):
239 */
240
241 #ifdef __APPLE__
242 # ifdef __LP64__
243 # define TCL_WIDE_INT_IS_LONG 1
244 # define TCL_CFG_DO64BIT 1
245 # else /* !__LP64__ */
246 # undef TCL_WIDE_INT_IS_LONG
247 # undef TCL_CFG_DO64BIT
248 # endif /* __LP64__ */
249 # undef HAVE_STRUCT_STAT64
250 #endif /* __APPLE__ */
251
252 /* Cross-compiling 32-bit on a 64-bit platform? Then our
253 * configure script does the wrong thing. Correct that here.
254 */
255 #if defined(__GNUC__) && !defined(_WIN32) && !defined(__LP64__)
256 # undef TCL_WIDE_INT_IS_LONG
257 #endif
258
259 /*
260 * Define Tcl_WideInt to be a type that is (at least) 64-bits wide, and define
261 * Tcl_WideUInt to be the unsigned variant of that type (assuming that where
262 * we have one, we can have the other.)
263 *
264 * Also defines the following macros:
265 * TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on a
266 * LP64 system such as modern Solaris or Linux ... not including Win64)
267 * Tcl_WideAsLong - forgetful converter from wideInt to long.
268 * Tcl_LongAsWide - sign-extending converter from long to wideInt.
269 * Tcl_WideAsDouble - converter from wideInt to double.
270 * Tcl_DoubleAsWide - converter from double to wideInt.
271 *
272 * The following invariant should hold for any long value 'longVal':
273 * longVal == Tcl_WideAsLong(Tcl_LongAsWide(longVal))
274 */
275
276 #if !defined(TCL_WIDE_INT_TYPE) && !defined(TCL_WIDE_INT_IS_LONG) && !defined(_WIN32) && !defined(__GNUC__)
277 /*
278 * Don't know what platform it is and configure hasn't discovered what is
279 * going on for us. Try to guess...
280 */
281 # include <limits.h>
282 # if defined(LLONG_MAX) && (LLONG_MAX == LONG_MAX)
283 # define TCL_WIDE_INT_IS_LONG 1
284 # endif
285 #endif
286
287 #ifndef TCL_WIDE_INT_TYPE
288 # define TCL_WIDE_INT_TYPE long long
289 #endif /* !TCL_WIDE_INT_TYPE */
290
291 typedef TCL_WIDE_INT_TYPE Tcl_WideInt;
292 typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
293
294 #ifndef TCL_LL_MODIFIER
295 # if defined(_WIN32) && (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO)
296 # define TCL_LL_MODIFIER "I64"
297 # else
298 # define TCL_LL_MODIFIER "ll"
299 # endif
300 #endif /* !TCL_LL_MODIFIER */
301 #ifndef TCL_Z_MODIFIER
302 # if defined(__GNUC__) && !defined(_WIN32)
303 # define TCL_Z_MODIFIER "z"
304 # elif defined(_WIN64)
305 # define TCL_Z_MODIFIER TCL_LL_MODIFIER
306 # else
307 # define TCL_Z_MODIFIER ""
308 # endif
309 #endif /* !TCL_Z_MODIFIER */
310 #ifndef TCL_T_MODIFIER
311 # if defined(__GNUC__) && !defined(_WIN32)
312 # define TCL_T_MODIFIER "t"
313 # elif defined(_WIN64)
314 # define TCL_T_MODIFIER TCL_LL_MODIFIER
315 # else
316 # define TCL_T_MODIFIER TCL_Z_MODIFIER
317 # endif
318 #endif /* !TCL_T_MODIFIER */
319
320 #define Tcl_WideAsLong(val) ((long)((Tcl_WideInt)(val)))
321 #define Tcl_LongAsWide(val) ((Tcl_WideInt)((long)(val)))
322 #define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val)))
323 #define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val)))
324
325 #if TCL_MAJOR_VERSION < 9
326 # ifndef Tcl_Size
327 typedef int Tcl_Size;
328 # endif
329 # ifndef TCL_SIZE_MAX
330 # define TCL_SIZE_MAX ((int)(((unsigned int)-1)>>1))
331 # endif
332 # ifndef TCL_SIZE_MODIFIER
333 # define TCL_SIZE_MODIFIER ""
334 #endif
335 #else
336 typedef ptrdiff_t Tcl_Size;
337 # define TCL_SIZE_MAX ((Tcl_Size)(((size_t)-1)>>1))
338 # define TCL_SIZE_MODIFIER TCL_T_MODIFIER
339 #endif /* TCL_MAJOR_VERSION */
340
341 #ifdef _WIN32
342 # if TCL_MAJOR_VERSION > 8 || defined(_WIN64) || defined(_USE_64BIT_TIME_T)
343 typedef struct __stat64 Tcl_StatBuf;
344 # elif defined(_USE_32BIT_TIME_T)
345 typedef struct _stati64 Tcl_StatBuf;
346 # else
347 typedef struct _stat32i64 Tcl_StatBuf;
348 # endif
349 #elif defined(__CYGWIN__)
350 typedef struct {
351 unsigned st_dev;
352 unsigned short st_ino;
353 unsigned short st_mode;
354 short st_nlink;
355 short st_uid;
356 short st_gid;
357 /* Here is a 2-byte gap */
358 unsigned st_rdev;
359 /* Here is a 4-byte gap */
360 long long st_size;
361 struct {long tv_sec;} st_atim;
362 struct {long tv_sec;} st_mtim;
363 struct {long tv_sec;} st_ctim;
364 } Tcl_StatBuf;
365 #else
366 typedef struct stat Tcl_StatBuf;
367 #endif
368
369
370 /*
371 *----------------------------------------------------------------------------
372 * Data structures defined opaquely in this module. The definitions below just
373 * provide dummy types.
374 */
375
376 typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
377 typedef struct Tcl_Channel_ *Tcl_Channel;
378 typedef struct Tcl_ChannelTypeVersion_ *Tcl_ChannelTypeVersion;
379 typedef struct Tcl_Command_ *Tcl_Command;
380 typedef struct Tcl_Condition_ *Tcl_Condition;
381 typedef struct Tcl_Dict_ *Tcl_Dict;
382 typedef struct Tcl_EncodingState_ *Tcl_EncodingState;
383 typedef struct Tcl_Encoding_ *Tcl_Encoding;
384 typedef struct Tcl_Event Tcl_Event;
385 typedef struct Tcl_Interp Tcl_Interp;
386 typedef struct Tcl_InterpState_ *Tcl_InterpState;
387 typedef struct Tcl_LoadHandle_ *Tcl_LoadHandle;
388 typedef struct Tcl_Mutex_ *Tcl_Mutex;
389 typedef struct Tcl_Pid_ *Tcl_Pid;
390 typedef struct Tcl_RegExp_ *Tcl_RegExp;
391 typedef struct Tcl_ThreadDataKey_ *Tcl_ThreadDataKey;
392 typedef struct Tcl_ThreadId_ *Tcl_ThreadId;
393 typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
394 typedef struct Tcl_Trace_ *Tcl_Trace;
395 typedef struct Tcl_Var_ *Tcl_Var;
396 typedef struct Tcl_ZLibStream_ *Tcl_ZlibStream;
397
398 /*
399 *----------------------------------------------------------------------------
400 * Definition of the interface to functions implementing threads. A function
401 * following this definition is given to each call of 'Tcl_CreateThread' and
402 * will be called as the main fuction of the new thread created by that call.
403 */
404
405 #if defined _WIN32
406 typedef unsigned (__stdcall Tcl_ThreadCreateProc) (void *clientData);
407 #else
408 typedef void (Tcl_ThreadCreateProc) (void *clientData);
409 #endif
410
411 /*
412 * Threading function return types used for abstracting away platform
413 * differences when writing a Tcl_ThreadCreateProc. See the NewThread function
414 * in generic/tclThreadTest.c for it's usage.
415 */
416
417 #if defined _WIN32
418 # define Tcl_ThreadCreateType unsigned __stdcall
419 # define TCL_THREAD_CREATE_RETURN return 0
420 #else
421 # define Tcl_ThreadCreateType void
422 # define TCL_THREAD_CREATE_RETURN
423 #endif
424
425 /*
426 * Definition of values for default stacksize and the possible flags to be
427 * given to Tcl_CreateThread.
428 */
429
430 #define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack. */
431 #define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default
432 * behaviour. */
433 #define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable. */
434
435 /*
436 * Flag values passed to Tcl_StringCaseMatch.
437 */
438
439 #define TCL_MATCH_NOCASE (1<<0)
440
441 /*
442 * Flag values passed to Tcl_GetRegExpFromObj.
443 */
444
445 #define TCL_REG_BASIC 000000 /* BREs (convenience). */
446 #define TCL_REG_EXTENDED 000001 /* EREs. */
447 #define TCL_REG_ADVF 000002 /* Advanced features in EREs. */
448 #define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs). */
449 #define TCL_REG_QUOTE 000004 /* No special characters, none. */
450 #define TCL_REG_NOCASE 000010 /* Ignore case. */
451 #define TCL_REG_NOSUB 000020 /* Don't care about subexpressions. */
452 #define TCL_REG_EXPANDED 000040 /* Expanded format, white space &
453 * comments. */
454 #define TCL_REG_NLSTOP 000100 /* \n doesn't match . or [^ ] */
455 #define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before. */
456 #define TCL_REG_NEWLINE 000300 /* Newlines are line terminators. */
457 #define TCL_REG_CANMATCH 001000 /* Report details on partial/limited
458 * matches. */
459
460 /*
461 * Flags values passed to Tcl_RegExpExecObj.
462 */
463
464 #define TCL_REG_NOTBOL 0001 /* Beginning of string does not match ^. */
465 #define TCL_REG_NOTEOL 0002 /* End of string does not match $. */
466
467 /*
468 * Structures filled in by Tcl_RegExpInfo. Note that all offset values are
469 * relative to the start of the match string, not the beginning of the entire
470 * string.
471 */
472
473 typedef struct Tcl_RegExpIndices {
474 #if TCL_MAJOR_VERSION > 8
475 Tcl_Size start; /* Character offset of first character in
476 * match. */
477 Tcl_Size end; /* Character offset of first character after
478 * the match. */
479 #else
480 long start;
481 long end;
482 #endif
483 } Tcl_RegExpIndices;
484
485 typedef struct Tcl_RegExpInfo {
486 Tcl_Size nsubs; /* Number of subexpressions in the compiled
487 * expression. */
488 Tcl_RegExpIndices *matches; /* Array of nsubs match offset pairs. */
489 #if TCL_MAJOR_VERSION > 8
490 Tcl_Size extendStart; /* The offset at which a subsequent match
491 * might begin. */
492 #else
493 long extendStart;
494 long reserved; /* Reserved for later use. */
495 #endif
496 } Tcl_RegExpInfo;
497
498 /*
499 * Picky compilers complain if this typdef doesn't appear before the struct's
500 * reference in tclDecls.h.
501 */
502
503 typedef Tcl_StatBuf *Tcl_Stat_;
504 typedef struct stat *Tcl_OldStat_;
505
506 /*
507 *----------------------------------------------------------------------------
508 * When a TCL command returns, the interpreter contains a result from the
509 * command. Programmers are strongly encouraged to use one of the functions
510 * Tcl_GetObjResult() or Tcl_GetStringResult() to read the interpreter's
511 * result. See the SetResult man page for details. Besides this result, the
512 * command function returns an integer code, which is one of the following:
513 *
514 * TCL_OK Command completed normally; the interpreter's result
515 * contains the command's result.
516 * TCL_ERROR The command couldn't be completed successfully; the
517 * interpreter's result describes what went wrong.
518 * TCL_RETURN The command requests that the current function return;
519 * the interpreter's result contains the function's
520 * return value.
521 * TCL_BREAK The command requests that the innermost loop be
522 * exited; the interpreter's result is meaningless.
523 * TCL_CONTINUE Go on to the next iteration of the current loop; the
524 * interpreter's result is meaningless.
525 * Integer return codes in the range TCL_CODE_USER_MIN to TCL_CODE_USER_MAX are
526 * reserved for the use of packages.
527 */
528
529 #define TCL_OK 0
530 #define TCL_ERROR 1
531 #define TCL_RETURN 2
532 #define TCL_BREAK 3
533 #define TCL_CONTINUE 4
534 #define TCL_CODE_USER_MIN 5
535 #define TCL_CODE_USER_MAX 0x3fffffff /* 1073741823 */
536
537 /*
538 *----------------------------------------------------------------------------
539 * Flags to control what substitutions are performed by Tcl_SubstObj():
540 */
541
542 #define TCL_SUBST_COMMANDS 001
543 #define TCL_SUBST_VARIABLES 002
544 #define TCL_SUBST_BACKSLASHES 004
545 #define TCL_SUBST_ALL 007
546
547 /*
548 * Forward declaration of Tcl_Obj to prevent an error when the forward
549 * reference to Tcl_Obj is encountered in the function types declared below.
550 */
551
552 struct Tcl_Obj;
553
554 /*
555 *----------------------------------------------------------------------------
556 * Function types defined by Tcl:
557 */
558
559 typedef int (Tcl_AppInitProc) (Tcl_Interp *interp);
560 typedef int (Tcl_AsyncProc) (void *clientData, Tcl_Interp *interp,
561 int code);
562 typedef void (Tcl_ChannelProc) (void *clientData, int mask);
563 typedef void (Tcl_CloseProc) (void *data);
564 typedef void (Tcl_CmdDeleteProc) (void *clientData);
565 typedef int (Tcl_CmdProc) (void *clientData, Tcl_Interp *interp,
566 int argc, const char *argv[]);
567 typedef void (Tcl_CmdTraceProc) (void *clientData, Tcl_Interp *interp,
568 int level, char *command, Tcl_CmdProc *proc,
569 void *cmdClientData, int argc, const char *argv[]);
570 typedef int (Tcl_CmdObjTraceProc) (void *clientData, Tcl_Interp *interp,
571 int level, const char *command, Tcl_Command commandInfo, int objc,
572 struct Tcl_Obj *const *objv);
573 typedef void (Tcl_CmdObjTraceDeleteProc) (void *clientData);
574 typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr,
575 struct Tcl_Obj *dupPtr);
576 typedef int (Tcl_EncodingConvertProc) (void *clientData, const char *src,
577 int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst,
578 int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr);
579 typedef void (Tcl_EncodingFreeProc) (void *clientData);
580 typedef int (Tcl_EventProc) (Tcl_Event *evPtr, int flags);
581 typedef void (Tcl_EventCheckProc) (void *clientData, int flags);
582 typedef int (Tcl_EventDeleteProc) (Tcl_Event *evPtr, void *clientData);
583 typedef void (Tcl_EventSetupProc) (void *clientData, int flags);
584 typedef void (Tcl_ExitProc) (void *clientData);
585 typedef void (Tcl_FileProc) (void *clientData, int mask);
586 typedef void (Tcl_FileFreeProc) (void *clientData);
587 typedef void (Tcl_FreeInternalRepProc) (struct Tcl_Obj *objPtr);
588 typedef void (Tcl_IdleProc) (void *clientData);
589 typedef void (Tcl_InterpDeleteProc) (void *clientData,
590 Tcl_Interp *interp);
591 typedef void (Tcl_NamespaceDeleteProc) (void *clientData);
592 typedef int (Tcl_ObjCmdProc) (void *clientData, Tcl_Interp *interp,
593 int objc, struct Tcl_Obj *const *objv);
594 #if TCL_MAJOR_VERSION > 8
595 typedef int (Tcl_ObjCmdProc2) (void *clientData, Tcl_Interp *interp,
596 Tcl_Size objc, struct Tcl_Obj *const *objv);
597 typedef int (Tcl_CmdObjTraceProc2) (void *clientData, Tcl_Interp *interp,
598 Tcl_Size level, const char *command, Tcl_Command commandInfo, Tcl_Size objc,
599 struct Tcl_Obj *const *objv);
600 typedef void (Tcl_FreeProc) (void *blockPtr);
601 #define Tcl_ExitProc Tcl_FreeProc
602 #define Tcl_FileFreeProc Tcl_FreeProc
603 #define Tcl_FileFreeProc Tcl_FreeProc
604 #define Tcl_EncodingFreeProc Tcl_FreeProc
605 #else
606 #define Tcl_ObjCmdProc2 Tcl_ObjCmdProc
607 #define Tcl_CmdObjTraceProc2 Tcl_CmdObjTraceProc
608 typedef void (Tcl_FreeProc) (char *blockPtr);
609 #endif
610 typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp);
611 typedef int (Tcl_LibraryUnloadProc) (Tcl_Interp *interp, int flags);
612 typedef void (Tcl_PanicProc) (const char *format, ...);
613 typedef void (Tcl_TcpAcceptProc) (void *callbackData, Tcl_Channel chan,
614 char *address, int port);
615 typedef void (Tcl_TimerProc) (void *clientData);
616 typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *interp, struct Tcl_Obj *objPtr);
617 typedef void (Tcl_UpdateStringProc) (struct Tcl_Obj *objPtr);
618 typedef char * (Tcl_VarTraceProc) (void *clientData, Tcl_Interp *interp,
619 const char *part1, const char *part2, int flags);
620 typedef void (Tcl_CommandTraceProc) (void *clientData, Tcl_Interp *interp,
621 const char *oldName, const char *newName, int flags);
622 typedef void (Tcl_CreateFileHandlerProc) (int fd, int mask, Tcl_FileProc *proc,
623 void *clientData);
624 typedef void (Tcl_DeleteFileHandlerProc) (int fd);
625 typedef void (Tcl_AlertNotifierProc) (void *clientData);
626 typedef void (Tcl_ServiceModeHookProc) (int mode);
627 typedef void *(Tcl_InitNotifierProc) (void);
628 typedef void (Tcl_FinalizeNotifierProc) (void *clientData);
629 typedef void (Tcl_MainLoopProc) (void);
630
631
632 /* Abstract List functions */
633 typedef Tcl_Size (Tcl_ObjTypeLengthProc) (struct Tcl_Obj *listPtr);
634 typedef int (Tcl_ObjTypeIndexProc) (Tcl_Interp *interp, struct Tcl_Obj *listPtr,
635 Tcl_Size index, struct Tcl_Obj** elemObj);
636 typedef int (Tcl_ObjTypeSliceProc) (Tcl_Interp *interp, struct Tcl_Obj *listPtr,
637 Tcl_Size fromIdx, Tcl_Size toIdx, struct Tcl_Obj **newObjPtr);
638 typedef int (Tcl_ObjTypeReverseProc) (Tcl_Interp *interp,
639 struct Tcl_Obj *listPtr, struct Tcl_Obj **newObjPtr);
640 typedef int (Tcl_ObjTypeGetElements) (Tcl_Interp *interp,
641 struct Tcl_Obj *listPtr, Tcl_Size *objcptr, struct Tcl_Obj ***objvptr);
642 typedef struct Tcl_Obj *(Tcl_ObjTypeSetElement) (Tcl_Interp *interp,
643 struct Tcl_Obj *listPtr, Tcl_Size indexCount,
644 struct Tcl_Obj *const indexArray[], struct Tcl_Obj *valueObj);
645 typedef int (Tcl_ObjTypeReplaceProc) (Tcl_Interp *interp,
646 struct Tcl_Obj *listObj, Tcl_Size first, Tcl_Size numToDelete,
647 Tcl_Size numToInsert, struct Tcl_Obj *const insertObjs[]);
648 typedef int (Tcl_ObjTypeInOperatorProc) (Tcl_Interp *interp,
649 struct Tcl_Obj *valueObj, struct Tcl_Obj *listObj, int *boolResult);
650
651 #ifndef TCL_NO_DEPRECATED
652 # define Tcl_PackageInitProc Tcl_LibraryInitProc
653 # define Tcl_PackageUnloadProc Tcl_LibraryUnloadProc
654 #endif
655
656 /*
657 *----------------------------------------------------------------------------
658 * The following structure represents a type of object, which is a particular
659 * internal representation for an object plus a set of functions that provide
660 * standard operations on objects of that type.
661 */
662
663 typedef struct Tcl_ObjType {
664 const char *name; /* Name of the type, e.g. "int". */
665 Tcl_FreeInternalRepProc *freeIntRepProc;
666 /* Called to free any storage for the type's
667 * internal rep. NULL if the internal rep does
668 * not need freeing. */
669 Tcl_DupInternalRepProc *dupIntRepProc;
670 /* Called to create a new object as a copy of
671 * an existing object. */
672 Tcl_UpdateStringProc *updateStringProc;
673 /* Called to update the string rep from the
674 * type's internal representation. */
675 Tcl_SetFromAnyProc *setFromAnyProc;
676 /* Called to convert the object's internal rep
677 * to this type. Frees the internal rep of the
678 * old type. Returns TCL_ERROR on failure. */
679 #if TCL_MAJOR_VERSION > 8
680 size_t version; /* Version field for future-proofing. */
681
682 /* List emulation functions - ObjType Version 1 */
683 Tcl_ObjTypeLengthProc *lengthProc;
684 /* Return the [llength] of the AbstractList */
685 Tcl_ObjTypeIndexProc *indexProc;
686 /* Return a value (Tcl_Obj) at a given index */
687 Tcl_ObjTypeSliceProc *sliceProc;
688 /* Return an AbstractList for
689 * [lrange $al $start $end] */
690 Tcl_ObjTypeReverseProc *reverseProc;
691 /* Return an AbstractList for [lreverse $al] */
692 Tcl_ObjTypeGetElements *getElementsProc;
693 /* Return an objv[] of all elements in the list */
694 Tcl_ObjTypeSetElement *setElementProc;
695 /* Replace the element at the indicies with the
696 * given valueObj. */
697 Tcl_ObjTypeReplaceProc *replaceProc;
698 /* Replace sublist with another sublist */
699 Tcl_ObjTypeInOperatorProc *inOperProc;
700 /* "in" and "ni" expr list operation.
701 * Determine if the given string value matches
702 * an element in the list. */
703 #endif
704 } Tcl_ObjType;
705
706 #if TCL_MAJOR_VERSION > 8
707 # define TCL_OBJTYPE_V0 0, \
708 0,0,0,0,0,0,0,0 /* Pre-Tcl 9 */
709 # define TCL_OBJTYPE_V1(a) offsetof(Tcl_ObjType, indexProc), \
710 a,0,0,0,0,0,0,0 /* Tcl 9 Version 1 */
711 # define TCL_OBJTYPE_V2(a,b,c,d,e,f,g,h) sizeof(Tcl_ObjType), \
712 a,b,c,d,e,f,g,h /* Tcl 9 - AbstractLists */
713 #else
714 # define TCL_OBJTYPE_V0 /* just empty */
715 # define TCL_OBJTYPE_V1(a) /* just empty */
716 # define TCL_OBJTYPE_V2(a,b,c,d,e,f,g,h) /* just empty */
717 #endif
718
719 /*
720 * The following structure stores an internal representation (internalrep) for
721 * a Tcl value. An internalrep is associated with an Tcl_ObjType when both
722 * are stored in the same Tcl_Obj. The routines of the Tcl_ObjType govern
723 * the handling of the internalrep.
724 */
725
726 typedef union Tcl_ObjInternalRep { /* The internal representation: */
727 long longValue; /* - an long integer value. */
728 double doubleValue; /* - a double-precision floating value. */
729 void *otherValuePtr; /* - another, type-specific value, */
730 /* not used internally any more. */
731 Tcl_WideInt wideValue; /* - an integer value >= 64bits */
732 struct { /* - internal rep as two pointers. */
733 void *ptr1;
734 void *ptr2;
735 } twoPtrValue;
736 struct { /* - internal rep as a pointer and a long, */
737 void *ptr; /* not used internally any more. */
738 unsigned long value;
739 } ptrAndLongRep;
740 struct { /* - use for pointer and length reps */
741 void *ptr;
742 Tcl_Size size;
743 } ptrAndSize;
744 } Tcl_ObjInternalRep;
745
746 /*
747 * One of the following structures exists for each object in the Tcl system.
748 * An object stores a value as either a string, some internal representation,
749 * or both.
750 */
751
752 typedef struct Tcl_Obj {
753 Tcl_Size refCount; /* When 0 the object will be freed. */
754 char *bytes; /* This points to the first byte of the
755 * object's string representation. The array
756 * must be followed by a null byte (i.e., at
757 * offset length) but may also contain
758 * embedded null characters. The array's
759 * storage is allocated by Tcl_Alloc. NULL means
760 * the string rep is invalid and must be
761 * regenerated from the internal rep. Clients
762 * should use Tcl_GetStringFromObj or
763 * Tcl_GetString to get a pointer to the byte
764 * array as a readonly value. */
765 Tcl_Size length; /* The number of bytes at *bytes, not
766 * including the terminating null. */
767 const Tcl_ObjType *typePtr; /* Denotes the object's type. Always
768 * corresponds to the type of the object's
769 * internal rep. NULL indicates the object has
770 * no internal rep (has no type). */
771 Tcl_ObjInternalRep internalRep;
772 /* The internal representation: */
773 } Tcl_Obj;
774
775
776 /*
777 *----------------------------------------------------------------------------
778 * The following definitions support Tcl's namespace facility. Note: the first
779 * five fields must match exactly the fields in a Namespace structure (see
780 * tclInt.h).
781 */
782
783 typedef struct Tcl_Namespace {
784 char *name; /* The namespace's name within its parent
785 * namespace. This contains no ::'s. The name
786 * of the global namespace is "" although "::"
787 * is an synonym. */
788 char *fullName; /* The namespace's fully qualified name. This
789 * starts with ::. */
790 void *clientData; /* Arbitrary value associated with this
791 * namespace. */
792 Tcl_NamespaceDeleteProc *deleteProc;
793 /* Function invoked when deleting the
794 * namespace to, e.g., free clientData. */
795 struct Tcl_Namespace *parentPtr;
796 /* Points to the namespace that contains this
797 * one. NULL if this is the global
798 * namespace. */
799 } Tcl_Namespace;
800
801 /*
802 *----------------------------------------------------------------------------
803 * The following structure represents a call frame, or activation record. A
804 * call frame defines a naming context for a procedure call: its local scope
805 * (for local variables) and its namespace scope (used for non-local
806 * variables; often the global :: namespace). A call frame can also define the
807 * naming context for a namespace eval or namespace inscope command: the
808 * namespace in which the command's code should execute. The Tcl_CallFrame
809 * structures exist only while procedures or namespace eval/inscope's are
810 * being executed, and provide a Tcl call stack.
811 *
812 * A call frame is initialized and pushed using Tcl_PushCallFrame and popped
813 * using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be provided by the
814 * Tcl_PushCallFrame caller, and callers typically allocate them on the C call
815 * stack for efficiency. For this reason, Tcl_CallFrame is defined as a
816 * structure and not as an opaque token. However, most Tcl_CallFrame fields
817 * are hidden since applications should not access them directly; others are
818 * declared as "dummyX".
819 *
820 * WARNING!! The structure definition must be kept consistent with the
821 * CallFrame structure in tclInt.h. If you change one, change the other.
822 */
823
824 typedef struct Tcl_CallFrame {
825 Tcl_Namespace *nsPtr; /* Current namespace for the call frame. */
826 int dummy1;
827 Tcl_Size dummy2;
828 void *dummy3;
829 void *dummy4;
830 void *dummy5;
831 Tcl_Size dummy6;
832 void *dummy7;
833 void *dummy8;
834 Tcl_Size dummy9;
835 void *dummy10;
836 void *dummy11;
837 void *dummy12;
838 void *dummy13;
839 } Tcl_CallFrame;
840
841 /*
842 *----------------------------------------------------------------------------
843 * Information about commands that is returned by Tcl_GetCommandInfo and
844 * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based command
845 * function while proc is a traditional Tcl argc/argv string-based function.
846 * Tcl_CreateObjCommand and Tcl_CreateCommand ensure that both objProc and
847 * proc are non-NULL and can be called to execute the command. However, it may
848 * be faster to call one instead of the other. The member isNativeObjectProc
849 * is set to 1 if an object-based function was registered by
850 * Tcl_CreateObjCommand, and to 0 if a string-based function was registered by
851 * Tcl_CreateCommand. The other function is typically set to a compatibility
852 * wrapper that does string-to-object or object-to-string argument conversions
853 * then calls the other function.
854 */
855
856 typedef struct {
857 int isNativeObjectProc; /* 1 if objProc was registered by a call to
858 * Tcl_CreateObjCommand; 2 if objProc was registered by
859 * a call to Tcl_CreateObjCommand2; 0 otherwise.
860 * Tcl_SetCmdInfo does not modify this field. */
861 Tcl_ObjCmdProc *objProc; /* Command's object-based function. */
862 void *objClientData; /* ClientData for object proc. */
863 Tcl_CmdProc *proc; /* Command's string-based function. */
864 void *clientData; /* ClientData for string proc. */
865 Tcl_CmdDeleteProc *deleteProc;
866 /* Function to call when command is
867 * deleted. */
868 void *deleteData; /* Value to pass to deleteProc (usually the
869 * same as clientData). */
870 Tcl_Namespace *namespacePtr;/* Points to the namespace that contains this
871 * command. Note that Tcl_SetCmdInfo will not
872 * change a command's namespace; use
873 * TclRenameCommand or Tcl_Eval (of 'rename')
874 * to do that. */
875 Tcl_ObjCmdProc2 *objProc2; /* Command's object2-based function. */
876 void *objClientData2; /* ClientData for object2 proc. */
877 } Tcl_CmdInfo;
878
879 /*
880 *----------------------------------------------------------------------------
881 * The structure defined below is used to hold dynamic strings. The only
882 * fields that clients should use are string and length, accessible via the
883 * macros Tcl_DStringValue and Tcl_DStringLength.
884 */
885
886 #define TCL_DSTRING_STATIC_SIZE 200
887 typedef struct Tcl_DString {
888 char *string; /* Points to beginning of string: either
889 * staticSpace below or a malloced array. */
890 Tcl_Size length; /* Number of bytes in string excluding
891 * terminating nul */
892 Tcl_Size spaceAvl; /* Total number of bytes available for the
893 * string and its terminating NULL char. */
894 char staticSpace[TCL_DSTRING_STATIC_SIZE];
895 /* Space to use in common case where string is
896 * small. */
897 } Tcl_DString;
898
899 #define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
900 #define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
901
902 /*
903 * Definitions for the maximum number of digits of precision that may be
904 * produced by Tcl_PrintDouble, and the number of bytes of buffer space
905 * required by Tcl_PrintDouble.
906 */
907
908 #define TCL_MAX_PREC 17
909 #define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
910
911 /*
912 * Definition for a number of bytes of buffer space sufficient to hold the
913 * string representation of an integer in base 10 (assuming the existence of
914 * 64-bit integers).
915 */
916
917 #define TCL_INTEGER_SPACE (3*(int)sizeof(Tcl_WideInt))
918
919 /*
920 *----------------------------------------------------------------------------
921 * Type values returned by Tcl_GetNumberFromObj
922 * TCL_NUMBER_INT Representation is a Tcl_WideInt
923 * TCL_NUMBER_BIG Representation is an mp_int
924 * TCL_NUMBER_DOUBLE Representation is a double
925 * TCL_NUMBER_NAN Value is NaN.
926 */
927
928 #define TCL_NUMBER_INT 2
929 #define TCL_NUMBER_BIG 3
930 #define TCL_NUMBER_DOUBLE 4
931 #define TCL_NUMBER_NAN 5
932
933 /*
934 * Flag values passed to Tcl_ConvertElement.
935 * TCL_DONT_USE_BRACES forces it not to enclose the element in braces, but to
936 * use backslash quoting instead.
937 * TCL_DONT_QUOTE_HASH disables the default quoting of the '#' character. It
938 * is safe to leave the hash unquoted when the element is not the first
939 * element of a list, and this flag can be used by the caller to indicate
940 * that condition.
941 */
942
943 #define TCL_DONT_USE_BRACES 1
944 #define TCL_DONT_QUOTE_HASH 8
945
946 /*
947 * Flags that may be passed to Tcl_GetIndexFromObj.
948 * TCL_EXACT disallows abbreviated strings.
949 * TCL_NULL_OK allows the empty string or NULL to return TCL_OK.
950 * The returned value will be -1;
951 * TCL_INDEX_TEMP_TABLE disallows caching of lookups. A possible use case is
952 * a table that will not live long enough to make it worthwhile.
953 */
954
955 #define TCL_EXACT 1
956 #define TCL_NULL_OK 32
957 #define TCL_INDEX_TEMP_TABLE 64
958
959 /*
960 * Flags that may be passed to Tcl_UniCharToUtf.
961 * TCL_COMBINE Combine surrogates
962 */
963
964 #if TCL_MAJOR_VERSION > 8
965 # define TCL_COMBINE 0x1000000
966 #else
967 # define TCL_COMBINE 0
968 #endif
969 /*
970 *----------------------------------------------------------------------------
971 * Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv.
972 * WARNING: these bit choices must not conflict with the bit choices for
973 * evalFlag bits in tclInt.h!
974 *
975 * Meanings:
976 * TCL_NO_EVAL: Just record this command
977 * TCL_EVAL_GLOBAL: Execute script in global namespace
978 * TCL_EVAL_DIRECT: Do not compile this script
979 * TCL_EVAL_INVOKE: Magical Tcl_EvalObjv mode for aliases/ensembles
980 * o Run in iPtr->lookupNsPtr or global namespace
981 * o Cut out of error traces
982 * o Don't reset the flags controlling ensemble
983 * error message rewriting.
984 * TCL_CANCEL_UNWIND: Magical Tcl_CancelEval mode that causes the
985 * stack for the script in progress to be
986 * completely unwound.
987 * TCL_EVAL_NOERR: Do no exception reporting at all, just return
988 * as the caller will report.
989 */
990
991 #define TCL_NO_EVAL 0x010000
992 #define TCL_EVAL_GLOBAL 0x020000
993 #define TCL_EVAL_DIRECT 0x040000
994 #define TCL_EVAL_INVOKE 0x080000
995 #define TCL_CANCEL_UNWIND 0x100000
996 #define TCL_EVAL_NOERR 0x200000
997
998 /*
999 * Special freeProc values that may be passed to Tcl_SetResult (see the man
1000 * page for details):
1001 */
1002
1003 #define TCL_VOLATILE ((Tcl_FreeProc *) 1)
1004 #define TCL_STATIC ((Tcl_FreeProc *) 0)
1005 #define TCL_DYNAMIC ((Tcl_FreeProc *) 3)
1006
1007 /*
1008 * Flag values passed to variable-related functions.
1009 * WARNING: these bit choices must not conflict with the bit choice for
1010 * TCL_CANCEL_UNWIND, above.
1011 */
1012
1013 #define TCL_GLOBAL_ONLY 1
1014 #define TCL_NAMESPACE_ONLY 2
1015 #define TCL_APPEND_VALUE 4
1016 #define TCL_LIST_ELEMENT 8
1017 #define TCL_TRACE_READS 0x10
1018 #define TCL_TRACE_WRITES 0x20
1019 #define TCL_TRACE_UNSETS 0x40
1020 #define TCL_TRACE_DESTROYED 0x80
1021
1022 #define TCL_LEAVE_ERR_MSG 0x200
1023 #define TCL_TRACE_ARRAY 0x800
1024 /* Indicate the semantics of the result of a trace. */
1025 #define TCL_TRACE_RESULT_DYNAMIC 0x8000
1026 #define TCL_TRACE_RESULT_OBJECT 0x10000
1027
1028 /*
1029 * Flag values for ensemble commands.
1030 */
1031
1032 #define TCL_ENSEMBLE_PREFIX 0x02/* Flag value to say whether to allow
1033 * unambiguous prefixes of commands or to
1034 * require exact matches for command names. */
1035
1036 /*
1037 * Flag values passed to command-related functions.
1038 */
1039
1040 #define TCL_TRACE_RENAME 0x2000
1041 #define TCL_TRACE_DELETE 0x4000
1042
1043 #define TCL_ALLOW_INLINE_COMPILATION 0x20000
1044
1045 /*
1046 * Types for linked variables:
1047 */
1048
1049 #define TCL_LINK_INT 1
1050 #define TCL_LINK_DOUBLE 2
1051 #define TCL_LINK_BOOLEAN 3
1052 #define TCL_LINK_STRING 4
1053 #define TCL_LINK_WIDE_INT 5
1054 #define TCL_LINK_CHAR 6
1055 #define TCL_LINK_UCHAR 7
1056 #define TCL_LINK_SHORT 8
1057 #define TCL_LINK_USHORT 9
1058 #define TCL_LINK_UINT 10
1059 #define TCL_LINK_LONG ((sizeof(long) != sizeof(int)) ? TCL_LINK_WIDE_INT : TCL_LINK_INT)
1060 #define TCL_LINK_ULONG ((sizeof(long) != sizeof(int)) ? TCL_LINK_WIDE_UINT : TCL_LINK_UINT)
1061 #define TCL_LINK_FLOAT 13
1062 #define TCL_LINK_WIDE_UINT 14
1063 #define TCL_LINK_CHARS 15
1064 #define TCL_LINK_BINARY 16
1065 #define TCL_LINK_READ_ONLY 0x80
1066
1067 /*
1068 *----------------------------------------------------------------------------
1069 * Forward declarations of Tcl_HashTable and related types.
1070 */
1071
1072 #ifndef TCL_HASH_TYPE
1073 #if TCL_MAJOR_VERSION > 8
1074 # define TCL_HASH_TYPE size_t
1075 #else
1076 # define TCL_HASH_TYPE unsigned
1077 #endif
1078 #endif
1079
1080 typedef struct Tcl_HashKeyType Tcl_HashKeyType;
1081 typedef struct Tcl_HashTable Tcl_HashTable;
1082 typedef struct Tcl_HashEntry Tcl_HashEntry;
1083
1084 typedef TCL_HASH_TYPE (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr);
1085 typedef int (Tcl_CompareHashKeysProc) (void *keyPtr, Tcl_HashEntry *hPtr);
1086 typedef Tcl_HashEntry * (Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr,
1087 void *keyPtr);
1088 typedef void (Tcl_FreeHashEntryProc) (Tcl_HashEntry *hPtr);
1089
1090 /*
1091 * Structure definition for an entry in a hash table. No-one outside Tcl
1092 * should access any of these fields directly; use the macros defined below.
1093 */
1094
1095 struct Tcl_HashEntry {
1096 Tcl_HashEntry *nextPtr; /* Pointer to next entry in this hash bucket,
1097 * or NULL for end of chain. */
1098 Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */
1099 size_t hash; /* Hash value. */
1100 void *clientData; /* Application stores something here with
1101 * Tcl_SetHashValue. */
1102 union { /* Key has one of these forms: */
1103 char *oneWordValue; /* One-word value for key. */
1104 Tcl_Obj *objPtr; /* Tcl_Obj * key value. */
1105 int words[1]; /* Multiple integer words for key. The actual
1106 * size will be as large as necessary for this
1107 * table's keys. */
1108 char string[1]; /* String for key. The actual size will be as
1109 * large as needed to hold the key. */
1110 } key; /* MUST BE LAST FIELD IN RECORD!! */
1111 };
1112
1113 /*
1114 * Flags used in Tcl_HashKeyType.
1115 *
1116 * TCL_HASH_KEY_RANDOMIZE_HASH -
1117 * There are some things, pointers for example
1118 * which don't hash well because they do not use
1119 * the lower bits. If this flag is set then the
1120 * hash table will attempt to rectify this by
1121 * randomising the bits and then using the upper
1122 * N bits as the index into the table.
1123 * TCL_HASH_KEY_SYSTEM_HASH - If this flag is set then all memory internally
1124 * allocated for the hash table that is not for an
1125 * entry will use the system heap.
1126 * TCL_HASH_KEY_DIRECT_COMPARE -
1127 * Allows fast comparison for hash keys directly
1128 * by compare of their key.oneWordValue values,
1129 * before call of compareKeysProc (much slower
1130 * than a direct compare, so it is speed-up only
1131 * flag). Don't use it if keys contain values rather
1132 * than pointers.
1133 */
1134
1135 #define TCL_HASH_KEY_RANDOMIZE_HASH 0x1
1136 #define TCL_HASH_KEY_SYSTEM_HASH 0x2
1137 #define TCL_HASH_KEY_DIRECT_COMPARE 0x4
1138
1139 /*
1140 * Structure definition for the methods associated with a hash table key type.
1141 */
1142
1143 #define TCL_HASH_KEY_TYPE_VERSION 1
1144 struct Tcl_HashKeyType {
1145 int version; /* Version of the table. If this structure is
1146 * extended in future then the version can be
1147 * used to distinguish between different
1148 * structures. */
1149 int flags; /* Flags, see above for details. */
1150 Tcl_HashKeyProc *hashKeyProc;
1151 /* Calculates a hash value for the key. If
1152 * this is NULL then the pointer itself is
1153 * used as a hash value. */
1154 Tcl_CompareHashKeysProc *compareKeysProc;
1155 /* Compares two keys and returns zero if they
1156 * do not match, and non-zero if they do. If
1157 * this is NULL then the pointers are
1158 * compared. */
1159 Tcl_AllocHashEntryProc *allocEntryProc;
1160 /* Called to allocate memory for a new entry,
1161 * i.e. if the key is a string then this could
1162 * allocate a single block which contains
1163 * enough space for both the entry and the
1164 * string. Only the key field of the allocated
1165 * Tcl_HashEntry structure needs to be filled
1166 * in. If something else needs to be done to
1167 * the key, i.e. incrementing a reference
1168 * count then that should be done by this
1169 * function. If this is NULL then Tcl_Alloc is
1170 * used to allocate enough space for a
1171 * Tcl_HashEntry and the key pointer is
1172 * assigned to key.oneWordValue. */
1173 Tcl_FreeHashEntryProc *freeEntryProc;
1174 /* Called to free memory associated with an
1175 * entry. If something else needs to be done
1176 * to the key, i.e. decrementing a reference
1177 * count then that should be done by this
1178 * function. If this is NULL then Tcl_Free is
1179 * used to free the Tcl_HashEntry. */
1180 };
1181
1182 /*
1183 * Structure definition for a hash table. Must be in tcl.h so clients can
1184 * allocate space for these structures, but clients should never access any
1185 * fields in this structure.
1186 */
1187
1188 #define TCL_SMALL_HASH_TABLE 4
1189 struct Tcl_HashTable {
1190 Tcl_HashEntry **buckets; /* Pointer to bucket array. Each element
1191 * points to first entry in bucket's hash
1192 * chain, or NULL. */
1193 Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
1194 /* Bucket array used for small tables (to
1195 * avoid mallocs and frees). */
1196 Tcl_Size numBuckets; /* Total number of buckets allocated at
1197 * **bucketPtr. */
1198 Tcl_Size numEntries; /* Total number of entries present in
1199 * table. */
1200 Tcl_Size rebuildSize; /* Enlarge table when numEntries gets to be
1201 * this large. */
1202 #if TCL_MAJOR_VERSION > 8
1203 size_t mask; /* Mask value used in hashing function. */
1204 #endif
1205 int downShift; /* Shift count used in hashing function.
1206 * Designed to use high-order bits of
1207 * randomized keys. */
1208 #if TCL_MAJOR_VERSION < 9
1209 int mask; /* Mask value used in hashing function. */
1210 #endif
1211 int keyType; /* Type of keys used in this table. It's
1212 * either TCL_CUSTOM_KEYS, TCL_STRING_KEYS,
1213 * TCL_ONE_WORD_KEYS, or an integer giving the
1214 * number of ints that is the size of the
1215 * key. */
1216 Tcl_HashEntry *(*findProc) (Tcl_HashTable *tablePtr, const char *key);
1217 Tcl_HashEntry *(*createProc) (Tcl_HashTable *tablePtr, const char *key,
1218 int *newPtr);
1219 const Tcl_HashKeyType *typePtr;
1220 /* Type of the keys used in the
1221 * Tcl_HashTable. */
1222 };
1223
1224 /*
1225 * Structure definition for information used to keep track of searches through
1226 * hash tables:
1227 */
1228
1229 typedef struct Tcl_HashSearch {
1230 Tcl_HashTable *tablePtr; /* Table being searched. */
1231 Tcl_Size nextIndex; /* Index of next bucket to be enumerated after
1232 * present one. */
1233 Tcl_HashEntry *nextEntryPtr;/* Next entry to be enumerated in the current
1234 * bucket. */
1235 } Tcl_HashSearch;
1236
1237 /*
1238 * Acceptable key types for hash tables:
1239 *
1240 * TCL_STRING_KEYS: The keys are strings, they are copied into the
1241 * entry.
1242 * TCL_ONE_WORD_KEYS: The keys are pointers, the pointer is stored
1243 * in the entry.
1244 * TCL_CUSTOM_TYPE_KEYS: The keys are arbitrary types which are copied
1245 * into the entry.
1246 * TCL_CUSTOM_PTR_KEYS: The keys are pointers to arbitrary types, the
1247 * pointer is stored in the entry.
1248 *
1249 * While maintaining binary compatibility the above have to be distinct values
1250 * as they are used to differentiate between old versions of the hash table
1251 * which don't have a typePtr and new ones which do. Once binary compatibility
1252 * is discarded in favour of making more wide spread changes TCL_STRING_KEYS
1253 * can be the same as TCL_CUSTOM_TYPE_KEYS, and TCL_ONE_WORD_KEYS can be the
1254 * same as TCL_CUSTOM_PTR_KEYS because they simply determine how the key is
1255 * accessed from the entry and not the behaviour.
1256 */
1257
1258 #define TCL_STRING_KEYS (0)
1259 #define TCL_ONE_WORD_KEYS (1)
1260 #define TCL_CUSTOM_TYPE_KEYS (-2)
1261 #define TCL_CUSTOM_PTR_KEYS (-1)
1262
1263 /*
1264 * Structure definition for information used to keep track of searches through
1265 * dictionaries. These fields should not be accessed by code outside
1266 * tclDictObj.c
1267 */
1268
1269 typedef struct {
1270 void *next; /* Search position for underlying hash
1271 * table. */
1272 TCL_HASH_TYPE epoch; /* Epoch marker for dictionary being searched,
1273 * or 0 if search has terminated. */
1274 Tcl_Dict dictionaryPtr; /* Reference to dictionary being searched. */
1275 } Tcl_DictSearch;
1276
1277
1278 /*
1279 *----------------------------------------------------------------------------
1280 * Flag values to pass to Tcl_DoOneEvent to disable searches for some kinds of
1281 * events:
1282 */
1283
1284 #define TCL_DONT_WAIT (1<<1)
1285 #define TCL_WINDOW_EVENTS (1<<2)
1286 #define TCL_FILE_EVENTS (1<<3)
1287 #define TCL_TIMER_EVENTS (1<<4)
1288 #define TCL_IDLE_EVENTS (1<<5) /* WAS 0x10 ???? */
1289 #define TCL_ALL_EVENTS (~TCL_DONT_WAIT)
1290
1291 /*
1292 * The following structure defines a generic event for the Tcl event system.
1293 * These are the things that are queued in calls to Tcl_QueueEvent and
1294 * serviced later by Tcl_DoOneEvent. There can be many different kinds of
1295 * events with different fields, corresponding to window events, timer events,
1296 * etc. The structure for a particular event consists of a Tcl_Event header
1297 * followed by additional information specific to that event.
1298 */
1299
1300 struct Tcl_Event {
1301 Tcl_EventProc *proc; /* Function to call to service this event. */
1302 struct Tcl_Event *nextPtr; /* Next in list of pending events, or NULL. */
1303 };
1304
1305 /*
1306 * Positions to pass to Tcl_QueueEvent/Tcl_ThreadQueueEvent:
1307 */
1308
1309 typedef enum {
1310 TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK,
1311 TCL_QUEUE_ALERT_IF_EMPTY=4
1312 } Tcl_QueuePosition;
1313
1314 /*
1315 * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
1316 * event routines.
1317 */
1318
1319 #define TCL_SERVICE_NONE 0
1320 #define TCL_SERVICE_ALL 1
1321
1322 /*
1323 * The following structure keeps is used to hold a time value, either as an
1324 * absolute time (the number of seconds from the epoch) or as an elapsed time.
1325 * On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
1326 */
1327
1328 typedef struct Tcl_Time {
1329 #if TCL_MAJOR_VERSION > 8
1330 long long sec; /* Seconds. */
1331 #else
1332 long sec; /* Seconds. */
1333 #endif
1334 #if defined(_CYGWIN_) && TCL_MAJOR_VERSION > 8
1335 int usec; /* Microseconds. */
1336 #else
1337 long usec; /* Microseconds. */
1338 #endif
1339 } Tcl_Time;
1340
1341 typedef void (Tcl_SetTimerProc) (const Tcl_Time *timePtr);
1342 typedef int (Tcl_WaitForEventProc) (const Tcl_Time *timePtr);
1343
1344 /*
1345 * TIP #233 (Virtualized Time)
1346 */
1347
1348 typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, void *clientData);
1349 typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, void *clientData);
1350
1351 /*
1352 *----------------------------------------------------------------------------
1353 * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler to
1354 * indicate what sorts of events are of interest:
1355 */
1356
1357 #define TCL_READABLE (1<<1)
1358 #define TCL_WRITABLE (1<<2)
1359 #define TCL_EXCEPTION (1<<3)
1360
1361 /*
1362 * Flag values to pass to Tcl_OpenCommandChannel to indicate the disposition
1363 * of the stdio handles. TCL_STDIN, TCL_STDOUT, TCL_STDERR, are also used in
1364 * Tcl_GetStdChannel.
1365 */
1366
1367 #define TCL_STDIN (1<<1)
1368 #define TCL_STDOUT (1<<2)
1369 #define TCL_STDERR (1<<3)
1370 #define TCL_ENFORCE_MODE (1<<4)
1371
1372 /*
1373 * Bits passed to Tcl_DriverClose2Proc to indicate which side of a channel
1374 * should be closed.
1375 */
1376
1377 #define TCL_CLOSE_READ (1<<1)
1378 #define TCL_CLOSE_WRITE (1<<2)
1379
1380 /*
1381 * Value to use as the closeProc for a channel that supports the close2Proc
1382 * interface.
1383 */
1384
1385 #if TCL_MAJOR_VERSION > 8
1386 # define TCL_CLOSE2PROC NULL
1387 #else
1388 # define TCL_CLOSE2PROC ((void *) 1)
1389 #endif
1390
1391 /*
1392 * Channel version tag. This was introduced in 8.3.2/8.4.
1393 */
1394
1395 #define TCL_CHANNEL_VERSION_5 ((Tcl_ChannelTypeVersion) 0x5)
1396
1397 /*
1398 * TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc.
1399 */
1400
1401 #define TCL_CHANNEL_THREAD_INSERT (0)
1402 #define TCL_CHANNEL_THREAD_REMOVE (1)
1403
1404 /*
1405 * Typedefs for the various operations in a channel type:
1406 */
1407
1408 typedef int (Tcl_DriverBlockModeProc) (void *instanceData, int mode);
1409 typedef void Tcl_DriverCloseProc;
1410 typedef int (Tcl_DriverClose2Proc) (void *instanceData,
1411 Tcl_Interp *interp, int flags);
1412 typedef int (Tcl_DriverInputProc) (void *instanceData, char *buf,
1413 int toRead, int *errorCodePtr);
1414 typedef int (Tcl_DriverOutputProc) (void *instanceData,
1415 const char *buf, int toWrite, int *errorCodePtr);
1416 typedef void Tcl_DriverSeekProc;
1417 typedef int (Tcl_DriverSetOptionProc) (void *instanceData,
1418 Tcl_Interp *interp, const char *optionName,
1419 const char *value);
1420 typedef int (Tcl_DriverGetOptionProc) (void *instanceData,
1421 Tcl_Interp *interp, const char *optionName,
1422 Tcl_DString *dsPtr);
1423 typedef void (Tcl_DriverWatchProc) (void *instanceData, int mask);
1424 typedef int (Tcl_DriverGetHandleProc) (void *instanceData,
1425 int direction, void **handlePtr);
1426 typedef int (Tcl_DriverFlushProc) (void *instanceData);
1427 typedef int (Tcl_DriverHandlerProc) (void *instanceData,
1428 int interestMask);
1429 typedef long long (Tcl_DriverWideSeekProc) (void *instanceData,
1430 long long offset, int mode, int *errorCodePtr);
1431 /*
1432 * TIP #218, Channel Thread Actions
1433 */
1434 typedef void (Tcl_DriverThreadActionProc) (void *instanceData,
1435 int action);
1436 /*
1437 * TIP #208, File Truncation (etc.)
1438 */
1439 typedef int (Tcl_DriverTruncateProc) (void *instanceData,
1440 long long length);
1441
1442 /*
1443 * struct Tcl_ChannelType:
1444 *
1445 * One such structure exists for each type (kind) of channel. It collects
1446 * together in one place all the functions that are part of the specific
1447 * channel type.
1448 *
1449 * It is recommend that the Tcl_Channel* functions are used to access elements
1450 * of this structure, instead of direct accessing.
1451 */
1452
1453 typedef struct Tcl_ChannelType {
1454 const char *typeName; /* The name of the channel type in Tcl
1455 * commands. This storage is owned by channel
1456 * type. */
1457 Tcl_ChannelTypeVersion version;
1458 /* Version of the channel type. */
1459 void *closeProc; /* Not used any more. */
1460 Tcl_DriverInputProc *inputProc;
1461 /* Function to call for input on channel. */
1462 Tcl_DriverOutputProc *outputProc;
1463 /* Function to call for output on channel. */
1464 void *seekProc; /* Not used any more. */
1465 Tcl_DriverSetOptionProc *setOptionProc;
1466 /* Set an option on a channel. */
1467 Tcl_DriverGetOptionProc *getOptionProc;
1468 /* Get an option from a channel. */
1469 Tcl_DriverWatchProc *watchProc;
1470 /* Set up the notifier to watch for events on
1471 * this channel. */
1472 Tcl_DriverGetHandleProc *getHandleProc;
1473 /* Get an OS handle from the channel or NULL
1474 * if not supported. */
1475 Tcl_DriverClose2Proc *close2Proc;
1476 /* Function to call to close the channel if
1477 * the device supports closing the read &
1478 * write sides independently. */
1479 Tcl_DriverBlockModeProc *blockModeProc;
1480 /* Set blocking mode for the raw channel. May
1481 * be NULL. */
1482 Tcl_DriverFlushProc *flushProc;
1483 /* Function to call to flush a channel. May be
1484 * NULL. */
1485 Tcl_DriverHandlerProc *handlerProc;
1486 /* Function to call to handle a channel event.
1487 * This will be passed up the stacked channel
1488 * chain. */
1489 Tcl_DriverWideSeekProc *wideSeekProc;
1490 /* Function to call to seek on the channel
1491 * which can handle 64-bit offsets. May be
1492 * NULL, and must be NULL if seekProc is
1493 * NULL. */
1494 Tcl_DriverThreadActionProc *threadActionProc;
1495 /* Function to call to notify the driver of
1496 * thread specific activity for a channel. May
1497 * be NULL. */
1498 Tcl_DriverTruncateProc *truncateProc;
1499 /* Function to call to truncate the underlying
1500 * file to a particular length. May be NULL if
1501 * the channel does not support truncation. */
1502 } Tcl_ChannelType;
1503
1504 /*
1505 * The following flags determine whether the blockModeProc above should set
1506 * the channel into blocking or nonblocking mode. They are passed as arguments
1507 * to the blockModeProc function in the above structure.
1508 */
1509
1510 #define TCL_MODE_BLOCKING 0 /* Put channel into blocking mode. */
1511 #define TCL_MODE_NONBLOCKING 1 /* Put channel into nonblocking
1512 * mode. */
1513
1514 /*
1515 *----------------------------------------------------------------------------
1516 * Enum for different types of file paths.
1517 */
1518
1519 typedef enum Tcl_PathType {
1520 TCL_PATH_ABSOLUTE,
1521 TCL_PATH_RELATIVE,
1522 TCL_PATH_VOLUME_RELATIVE
1523 } Tcl_PathType;
1524
1525 /*
1526 * The following structure is used to pass glob type data amongst the various
1527 * glob routines and Tcl_FSMatchInDirectory.
1528 */
1529
1530 typedef struct Tcl_GlobTypeData {
1531 int type; /* Corresponds to bcdpfls as in 'find -t'. */
1532 int perm; /* Corresponds to file permissions. */
1533 Tcl_Obj *macType; /* Acceptable Mac type. */
1534 Tcl_Obj *macCreator; /* Acceptable Mac creator. */
1535 } Tcl_GlobTypeData;
1536
1537 /*
1538 * Type and permission definitions for glob command.
1539 */
1540
1541 #define TCL_GLOB_TYPE_BLOCK (1<<0)
1542 #define TCL_GLOB_TYPE_CHAR (1<<1)
1543 #define TCL_GLOB_TYPE_DIR (1<<2)
1544 #define TCL_GLOB_TYPE_PIPE (1<<3)
1545 #define TCL_GLOB_TYPE_FILE (1<<4)
1546 #define TCL_GLOB_TYPE_LINK (1<<5)
1547 #define TCL_GLOB_TYPE_SOCK (1<<6)
1548 #define TCL_GLOB_TYPE_MOUNT (1<<7)
1549
1550 #define TCL_GLOB_PERM_RONLY (1<<0)
1551 #define TCL_GLOB_PERM_HIDDEN (1<<1)
1552 #define TCL_GLOB_PERM_R (1<<2)
1553 #define TCL_GLOB_PERM_W (1<<3)
1554 #define TCL_GLOB_PERM_X (1<<4)
1555
1556 /*
1557 * Flags for the unload callback function.
1558 */
1559
1560 #define TCL_UNLOAD_DETACH_FROM_INTERPRETER (1<<0)
1561 #define TCL_UNLOAD_DETACH_FROM_PROCESS (1<<1)
1562
1563 /*
1564 * Typedefs for the various filesystem operations:
1565 */
1566
1567 typedef int (Tcl_FSStatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1568 typedef int (Tcl_FSAccessProc) (Tcl_Obj *pathPtr, int mode);
1569 typedef Tcl_Channel (Tcl_FSOpenFileChannelProc) (Tcl_Interp *interp,
1570 Tcl_Obj *pathPtr, int mode, int permissions);
1571 typedef int (Tcl_FSMatchInDirectoryProc) (Tcl_Interp *interp, Tcl_Obj *result,
1572 Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types);
1573 typedef Tcl_Obj * (Tcl_FSGetCwdProc) (Tcl_Interp *interp);
1574 typedef int (Tcl_FSChdirProc) (Tcl_Obj *pathPtr);
1575 typedef int (Tcl_FSLstatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1576 typedef int (Tcl_FSCreateDirectoryProc) (Tcl_Obj *pathPtr);
1577 typedef int (Tcl_FSDeleteFileProc) (Tcl_Obj *pathPtr);
1578 typedef int (Tcl_FSCopyDirectoryProc) (Tcl_Obj *srcPathPtr,
1579 Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr);
1580 typedef int (Tcl_FSCopyFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr);
1581 typedef int (Tcl_FSRemoveDirectoryProc) (Tcl_Obj *pathPtr, int recursive,
1582 Tcl_Obj **errorPtr);
1583 typedef int (Tcl_FSRenameFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr);
1584 typedef void (Tcl_FSUnloadFileProc) (Tcl_LoadHandle loadHandle);
1585 typedef Tcl_Obj * (Tcl_FSListVolumesProc) (void);
1586 /* We have to declare the utime structure here. */
1587 struct utimbuf;
1588 typedef int (Tcl_FSUtimeProc) (Tcl_Obj *pathPtr, struct utimbuf *tval);
1589 typedef int (Tcl_FSNormalizePathProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
1590 int nextCheckpoint);
1591 typedef int (Tcl_FSFileAttrsGetProc) (Tcl_Interp *interp, int index,
1592 Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef);
1593 typedef const char *const * (Tcl_FSFileAttrStringsProc) (Tcl_Obj *pathPtr,
1594 Tcl_Obj **objPtrRef);
1595 typedef int (Tcl_FSFileAttrsSetProc) (Tcl_Interp *interp, int index,
1596 Tcl_Obj *pathPtr, Tcl_Obj *objPtr);
1597 typedef Tcl_Obj * (Tcl_FSLinkProc) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr,
1598 int linkType);
1599 typedef int (Tcl_FSLoadFileProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
1600 Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr);
1601 typedef int (Tcl_FSPathInFilesystemProc) (Tcl_Obj *pathPtr,
1602 void **clientDataPtr);
1603 typedef Tcl_Obj * (Tcl_FSFilesystemPathTypeProc) (Tcl_Obj *pathPtr);
1604 typedef Tcl_Obj * (Tcl_FSFilesystemSeparatorProc) (Tcl_Obj *pathPtr);
1605 #define Tcl_FSFreeInternalRepProc Tcl_FreeProc
1606 typedef void *(Tcl_FSDupInternalRepProc) (void *clientData);
1607 typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) (void *clientData);
1608 typedef void *(Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr);
1609
1610 typedef struct Tcl_FSVersion_ *Tcl_FSVersion;
1611
1612 /*
1613 *----------------------------------------------------------------------------
1614 * Data structures related to hooking into the filesystem
1615 */
1616
1617 /*
1618 * Filesystem version tag. This was introduced in 8.4.
1619 */
1620
1621 #define TCL_FILESYSTEM_VERSION_1 ((Tcl_FSVersion) 0x1)
1622
1623 /*
1624 * struct Tcl_Filesystem:
1625 *
1626 * One such structure exists for each type (kind) of filesystem. It collects
1627 * together the functions that form the interface for a particulr the
1628 * filesystem. Tcl always accesses the filesystem through one of these
1629 * structures.
1630 *
1631 * Not all entries need be non-NULL; any which are NULL are simply ignored.
1632 * However, a complete filesystem should provide all of these functions. The
1633 * explanations in the structure show the importance of each function.
1634 */
1635
1636 typedef struct Tcl_Filesystem {
1637 const char *typeName; /* The name of the filesystem. */
1638 Tcl_Size structureLength; /* Length of this structure, so future binary
1639 * compatibility can be assured. */
1640 Tcl_FSVersion version; /* Version of the filesystem type. */
1641 Tcl_FSPathInFilesystemProc *pathInFilesystemProc;
1642 /* Determines whether the pathname is in this
1643 * filesystem. This is the most important
1644 * filesystem function. */
1645 Tcl_FSDupInternalRepProc *dupInternalRepProc;
1646 /* Duplicates the internal handle of the node.
1647 * If it is NULL, the filesystem is less
1648 * performant. */
1649 Tcl_FSFreeInternalRepProc *freeInternalRepProc;
1650 /* Frees the internal handle of the node. NULL
1651 * only if there is no need to free resources
1652 * used for the internal handle. */
1653 Tcl_FSInternalToNormalizedProc *internalToNormalizedProc;
1654 /* Converts the internal handle to a normalized
1655 * path. NULL if the filesystem creates nodes
1656 * having no pathname. */
1657 Tcl_FSCreateInternalRepProc *createInternalRepProc;
1658 /* Creates an internal handle for a pathname.
1659 * May be NULL if pathnames have no internal
1660 * handle or if pathInFilesystemProc always
1661 * immediately creates an internal
1662 * representation for pathnames in the
1663 * filesystem. */
1664 Tcl_FSNormalizePathProc *normalizePathProc;
1665 /* Normalizes a path. Should be implemented if
1666 * the filesystems supports multiple paths to
1667 * the same node. */
1668 Tcl_FSFilesystemPathTypeProc *filesystemPathTypeProc;
1669 /* Determines the type of a path in this
1670 * filesystem. May be NULL. */
1671 Tcl_FSFilesystemSeparatorProc *filesystemSeparatorProc;
1672 /* Produces the separator character(s) for this
1673 * filesystem. Must not be NULL. */
1674 Tcl_FSStatProc *statProc; /* Called by 'Tcl_FSStat()'. Provided by any
1675 * reasonable filesystem. */
1676 Tcl_FSAccessProc *accessProc;
1677 /* Called by 'Tcl_FSAccess()'. Implemented by
1678 * any reasonable filesystem. */
1679 Tcl_FSOpenFileChannelProc *openFileChannelProc;
1680 /* Called by 'Tcl_FSOpenFileChannel()'.
1681 * Provided by any reasonable filesystem. */
1682 Tcl_FSMatchInDirectoryProc *matchInDirectoryProc;
1683 /* Called by 'Tcl_FSMatchInDirectory()'. NULL
1684 * if the filesystem does not support glob or
1685 * recursive copy. */
1686 Tcl_FSUtimeProc *utimeProc; /* Called by 'Tcl_FSUtime()', by 'file
1687 * mtime' to set (not read) times, 'file
1688 * atime', and the open-r/open-w/fcopy variant
1689 * of 'file copy'. */
1690 Tcl_FSLinkProc *linkProc; /* Called by 'Tcl_FSLink()'. NULL if reading or
1691 * creating links is not supported. */
1692 Tcl_FSListVolumesProc *listVolumesProc;
1693 /* Lists filesystem volumes added by this
1694 * filesystem. NULL if the filesystem does not
1695 * use volumes. */
1696 Tcl_FSFileAttrStringsProc *fileAttrStringsProc;
1697 /* List all valid attributes strings. NULL if
1698 * the filesystem does not support the 'file
1699 * attributes' command. Can be used to attach
1700 * arbitrary additional data to files in a
1701 * filesystem. */
1702 Tcl_FSFileAttrsGetProc *fileAttrsGetProc;
1703 /* Called by 'Tcl_FSFileAttrsGet()' and by
1704 * 'file attributes'. */
1705 Tcl_FSFileAttrsSetProc *fileAttrsSetProc;
1706 /* Called by 'Tcl_FSFileAttrsSet()' and by
1707 * 'file attributes'. */
1708 Tcl_FSCreateDirectoryProc *createDirectoryProc;
1709 /* Called by 'Tcl_FSCreateDirectory()'. May be
1710 * NULL if the filesystem is read-only. */
1711 Tcl_FSRemoveDirectoryProc *removeDirectoryProc;
1712 /* Called by 'Tcl_FSRemoveDirectory()'. May be
1713 * NULL if the filesystem is read-only. */
1714 Tcl_FSDeleteFileProc *deleteFileProc;
1715 /* Called by 'Tcl_FSDeleteFile()' May be NULL
1716 * if the filesystem is is read-only. */
1717 Tcl_FSCopyFileProc *copyFileProc;
1718 /* Called by 'Tcl_FSCopyFile()'. If NULL, for
1719 * a copy operation at the script level (not
1720 * C) Tcl uses open-r, open-w and fcopy. */
1721 Tcl_FSRenameFileProc *renameFileProc;
1722 /* Called by 'Tcl_FSRenameFile()'. If NULL, for
1723 * a rename operation at the script level (not
1724 * C) Tcl performs a copy operation followed
1725 * by a delete operation. */
1726 Tcl_FSCopyDirectoryProc *copyDirectoryProc;
1727 /* Called by 'Tcl_FSCopyDirectory()'. If NULL,
1728 * for a copy operation at the script level
1729 * (not C) Tcl recursively creates directories
1730 * and copies files. */
1731 Tcl_FSLstatProc *lstatProc; /* Called by 'Tcl_FSLstat()'. If NULL, Tcl
1732 * attempts to use 'statProc' instead. */
1733 Tcl_FSLoadFileProc *loadFileProc;
1734 /* Called by 'Tcl_FSLoadFile()'. If NULL, Tcl
1735 * performs a copy to a temporary file in the
1736 * native filesystem and then calls
1737 * Tcl_FSLoadFile() on that temporary copy. */
1738 Tcl_FSGetCwdProc *getCwdProc;
1739 /* Called by 'Tcl_FSGetCwd()'. Normally NULL.
1740 * Usually only called once: If 'getcwd' is
1741 * called before 'chdir' is ever called. */
1742 Tcl_FSChdirProc *chdirProc; /* Called by 'Tcl_FSChdir()'. For a virtual
1743 * filesystem, chdirProc just returns zero
1744 * (success) if the pathname is a valid
1745 * directory, and some other value otherwise.
1746 * For A real filesystem, chdirProc performs
1747 * the correct action, e.g. calls the system
1748 * 'chdir' function. If not implemented, then
1749 * 'cd' and 'pwd' fail for a pathname in this
1750 * filesystem. On success Tcl stores the
1751 * pathname for use by GetCwd. If NULL, Tcl
1752 * performs records the pathname as the new
1753 * current directory if it passes a series of
1754 * directory access checks. */
1755 } Tcl_Filesystem;
1756
1757 /*
1758 * The following definitions are used as values for the 'linkAction' flag to
1759 * Tcl_FSLink, or the linkProc of any filesystem. Any combination of flags can
1760 * be given. For link creation, the linkProc should create a link which
1761 * matches any of the types given.
1762 *
1763 * TCL_CREATE_SYMBOLIC_LINK - Create a symbolic or soft link.
1764 * TCL_CREATE_HARD_LINK - Create a hard link.
1765 */
1766
1767 #define TCL_CREATE_SYMBOLIC_LINK 0x01
1768 #define TCL_CREATE_HARD_LINK 0x02
1769
1770 /*
1771 *----------------------------------------------------------------------------
1772 * The following structure represents the Notifier functions that you can
1773 * override with the Tcl_SetNotifier call.
1774 */
1775
1776 typedef struct Tcl_NotifierProcs {
1777 Tcl_SetTimerProc *setTimerProc;
1778 Tcl_WaitForEventProc *waitForEventProc;
1779 Tcl_CreateFileHandlerProc *createFileHandlerProc;
1780 Tcl_DeleteFileHandlerProc *deleteFileHandlerProc;
1781 Tcl_InitNotifierProc *initNotifierProc;
1782 Tcl_FinalizeNotifierProc *finalizeNotifierProc;
1783 Tcl_AlertNotifierProc *alertNotifierProc;
1784 Tcl_ServiceModeHookProc *serviceModeHookProc;
1785 } Tcl_NotifierProcs;
1786
1787
1788 /*
1789 *----------------------------------------------------------------------------
1790 * The following data structures and declarations are for the new Tcl parser.
1791 *
1792 * For each word of a command, and for each piece of a word such as a variable
1793 * reference, one of the following structures is created to describe the
1794 * token.
1795 */
1796
1797 typedef struct Tcl_Token {
1798 int type; /* Type of token, such as TCL_TOKEN_WORD; see
1799 * below for valid types. */
1800 const char *start; /* First character in token. */
1801 Tcl_Size size; /* Number of bytes in token. */
1802 Tcl_Size numComponents; /* If this token is composed of other tokens,
1803 * this field tells how many of them there are
1804 * (including components of components, etc.).
1805 * The component tokens immediately follow
1806 * this one. */
1807 } Tcl_Token;
1808
1809 /*
1810 * Type values defined for Tcl_Token structures. These values are defined as
1811 * mask bits so that it's easy to check for collections of types.
1812 *
1813 * TCL_TOKEN_WORD - The token describes one word of a command,
1814 * from the first non-blank character of the word
1815 * (which may be " or {) up to but not including
1816 * the space, semicolon, or bracket that
1817 * terminates the word. NumComponents counts the
1818 * total number of sub-tokens that make up the
1819 * word. This includes, for example, sub-tokens
1820 * of TCL_TOKEN_VARIABLE tokens.
1821 * TCL_TOKEN_SIMPLE_WORD - This token is just like TCL_TOKEN_WORD except
1822 * that the word is guaranteed to consist of a
1823 * single TCL_TOKEN_TEXT sub-token.
1824 * TCL_TOKEN_TEXT - The token describes a range of literal text
1825 * that is part of a word. NumComponents is
1826 * always 0.
1827 * TCL_TOKEN_BS - The token describes a backslash sequence that
1828 * must be collapsed. NumComponents is always 0.
1829 * TCL_TOKEN_COMMAND - The token describes a command whose result
1830 * must be substituted into the word. The token
1831 * includes the enclosing brackets. NumComponents
1832 * is always 0.
1833 * TCL_TOKEN_VARIABLE - The token describes a variable substitution,
1834 * including the dollar sign, variable name, and
1835 * array index (if there is one) up through the
1836 * right parentheses. NumComponents tells how
1837 * many additional tokens follow to represent the
1838 * variable name. The first token will be a
1839 * TCL_TOKEN_TEXT token that describes the
1840 * variable name. If the variable is an array
1841 * reference then there will be one or more
1842 * additional tokens, of type TCL_TOKEN_TEXT,
1843 * TCL_TOKEN_BS, TCL_TOKEN_COMMAND, and
1844 * TCL_TOKEN_VARIABLE, that describe the array
1845 * index; numComponents counts the total number
1846 * of nested tokens that make up the variable
1847 * reference, including sub-tokens of
1848 * TCL_TOKEN_VARIABLE tokens.
1849 * TCL_TOKEN_SUB_EXPR - The token describes one subexpression of an
1850 * expression, from the first non-blank character
1851 * of the subexpression up to but not including
1852 * the space, brace, or bracket that terminates
1853 * the subexpression. NumComponents counts the
1854 * total number of following subtokens that make
1855 * up the subexpression; this includes all
1856 * subtokens for any nested TCL_TOKEN_SUB_EXPR
1857 * tokens. For example, a numeric value used as a
1858 * primitive operand is described by a
1859 * TCL_TOKEN_SUB_EXPR token followed by a
1860 * TCL_TOKEN_TEXT token. A binary subexpression
1861 * is described by a TCL_TOKEN_SUB_EXPR token
1862 * followed by the TCL_TOKEN_OPERATOR token for
1863 * the operator, then TCL_TOKEN_SUB_EXPR tokens
1864 * for the left then the right operands.
1865 * TCL_TOKEN_OPERATOR - The token describes one expression operator.
1866 * An operator might be the name of a math
1867 * function such as "abs". A TCL_TOKEN_OPERATOR
1868 * token is always preceded by one
1869 * TCL_TOKEN_SUB_EXPR token for the operator's
1870 * subexpression, and is followed by zero or more
1871 * TCL_TOKEN_SUB_EXPR tokens for the operator's
1872 * operands. NumComponents is always 0.
1873 * TCL_TOKEN_EXPAND_WORD - This token is just like TCL_TOKEN_WORD except
1874 * that it marks a word that began with the
1875 * literal character prefix "{*}". This word is
1876 * marked to be expanded - that is, broken into
1877 * words after substitution is complete.
1878 */
1879
1880 #define TCL_TOKEN_WORD 1
1881 #define TCL_TOKEN_SIMPLE_WORD 2
1882 #define TCL_TOKEN_TEXT 4
1883 #define TCL_TOKEN_BS 8
1884 #define TCL_TOKEN_COMMAND 16
1885 #define TCL_TOKEN_VARIABLE 32
1886 #define TCL_TOKEN_SUB_EXPR 64
1887 #define TCL_TOKEN_OPERATOR 128
1888 #define TCL_TOKEN_EXPAND_WORD 256
1889
1890 /*
1891 * Parsing error types. On any parsing error, one of these values will be
1892 * stored in the error field of the Tcl_Parse structure defined below.
1893 */
1894
1895 #define TCL_PARSE_SUCCESS 0
1896 #define TCL_PARSE_QUOTE_EXTRA 1
1897 #define TCL_PARSE_BRACE_EXTRA 2
1898 #define TCL_PARSE_MISSING_BRACE 3
1899 #define TCL_PARSE_MISSING_BRACKET 4
1900 #define TCL_PARSE_MISSING_PAREN 5
1901 #define TCL_PARSE_MISSING_QUOTE 6
1902 #define TCL_PARSE_MISSING_VAR_BRACE 7
1903 #define TCL_PARSE_SYNTAX 8
1904 #define TCL_PARSE_BAD_NUMBER 9
1905
1906 /*
1907 * A structure of the following type is filled in by Tcl_ParseCommand. It
1908 * describes a single command parsed from an input string.
1909 */
1910
1911 #define NUM_STATIC_TOKENS 20
1912
1913 typedef struct Tcl_Parse {
1914 const char *commentStart; /* Pointer to # that begins the first of one
1915 * or more comments preceding the command. */
1916 Tcl_Size commentSize; /* Number of bytes in comments (up through
1917 * newline character that terminates the last
1918 * comment). If there were no comments, this
1919 * field is 0. */
1920 const char *commandStart; /* First character in first word of
1921 * command. */
1922 Tcl_Size commandSize; /* Number of bytes in command, including first
1923 * character of first word, up through the
1924 * terminating newline, close bracket, or
1925 * semicolon. */
1926 Tcl_Size numWords; /* Total number of words in command. May be
1927 * 0. */
1928 Tcl_Token *tokenPtr; /* Pointer to first token representing the
1929 * words of the command. Initially points to
1930 * staticTokens, but may change to point to
1931 * malloc-ed space if command exceeds space in
1932 * staticTokens. */
1933 Tcl_Size numTokens; /* Total number of tokens in command. */
1934 Tcl_Size tokensAvailable; /* Total number of tokens available at
1935 * *tokenPtr. */
1936 int errorType; /* One of the parsing error types defined
1937 * above. */
1938 #if TCL_MAJOR_VERSION > 8
1939 int incomplete; /* This field is set to 1 by Tcl_ParseCommand
1940 * if the command appears to be incomplete.
1941 * This information is used by
1942 * Tcl_CommandComplete. */
1943 #endif
1944
1945 /*
1946 * The fields below are intended only for the private use of the parser.
1947 * They should not be used by functions that invoke Tcl_ParseCommand.
1948 */
1949
1950 const char *string; /* The original command string passed to
1951 * Tcl_ParseCommand. */
1952 const char *end; /* Points to the character just after the last
1953 * one in the command string. */
1954 Tcl_Interp *interp; /* Interpreter to use for error reporting, or
1955 * NULL. */
1956 const char *term; /* Points to character in string that
1957 * terminated most recent token. Filled in by
1958 * ParseTokens. If an error occurs, points to
1959 * beginning of region where the error
1960 * occurred (e.g. the open brace if the close
1961 * brace is missing). */
1962 #if TCL_MAJOR_VERSION < 9
1963 int incomplete;
1964 #endif
1965 Tcl_Token staticTokens[NUM_STATIC_TOKENS];
1966 /* Initial space for tokens for command. This
1967 * space should be large enough to accommodate
1968 * most commands; dynamic space is allocated
1969 * for very large commands that don't fit
1970 * here. */
1971 } Tcl_Parse;
1972
1973
1974 /*
1975 *----------------------------------------------------------------------------
1976 * The following structure represents a user-defined encoding. It collects
1977 * together all the functions that are used by the specific encoding.
1978 */
1979
1980 typedef struct Tcl_EncodingType {
1981 const char *encodingName; /* The name of the encoding, e.g. "euc-jp".
1982 * This name is the unique key for this
1983 * encoding type. */
1984 Tcl_EncodingConvertProc *toUtfProc;
1985 /* Function to convert from external encoding
1986 * into UTF-8. */
1987 Tcl_EncodingConvertProc *fromUtfProc;
1988 /* Function to convert from UTF-8 into
1989 * external encoding. */
1990 Tcl_FreeProc *freeProc; /* If non-NULL, function to call when this
1991 * encoding is deleted. */
1992 void *clientData; /* Arbitrary value associated with encoding
1993 * type. Passed to conversion functions. */
1994 Tcl_Size nullSize; /* Number of zero bytes that signify
1995 * end-of-string in this encoding. This number
1996 * is used to determine the source string
1997 * length when the srcLen argument is
1998 * negative. Must be 1, 2, or 4. */
1999 } Tcl_EncodingType;
2000
2001 /*
2002 * The following definitions are used as values for the conversion control
2003 * flags argument when converting text from one character set to another:
2004 *
2005 * TCL_ENCODING_START - Signifies that the source buffer is the first
2006 * block in a (potentially multi-block) input
2007 * stream. Tells the conversion function to reset
2008 * to an initial state and perform any
2009 * initialization that needs to occur before the
2010 * first byte is converted. If the source buffer
2011 * contains the entire input stream to be
2012 * converted, this flag should be set.
2013 * TCL_ENCODING_END - Signifies that the source buffer is the last
2014 * block in a (potentially multi-block) input
2015 * stream. Tells the conversion routine to
2016 * perform any finalization that needs to occur
2017 * after the last byte is converted and then to
2018 * reset to an initial state. If the source
2019 * buffer contains the entire input stream to be
2020 * converted, this flag should be set.
2021 * TCL_ENCODING_STOPONERROR - Not used any more.
2022 * TCL_ENCODING_NO_TERMINATE - If set, Tcl_ExternalToUtf does not append a
2023 * terminating NUL byte. Since it does not need
2024 * an extra byte for a terminating NUL, it fills
2025 * all dstLen bytes with encoded UTF-8 content if
2026 * needed. If clear, a byte is reserved in the
2027 * dst space for NUL termination, and a
2028 * terminating NUL is appended.
2029 * TCL_ENCODING_CHAR_LIMIT - If set and dstCharsPtr is not NULL, then
2030 * Tcl_ExternalToUtf takes the initial value of
2031 * *dstCharsPtr as a limit of the maximum number
2032 * of chars to produce in the encoded UTF-8
2033 * content. Otherwise, the number of chars
2034 * produced is controlled only by other limiting
2035 * factors.
2036 * TCL_ENCODING_PROFILE_* - Mutually exclusive encoding profile ids. Note
2037 * these are bit masks.
2038 *
2039 * NOTE: THESE BIT DEFINITIONS SHOULD NOT OVERLAP WITH INTERNAL USE BITS
2040 * DEFINED IN tclEncoding.c (ENCODING_INPUT et al). Be cognizant of this
2041 * when adding bits.
2042 */
2043
2044 #define TCL_ENCODING_START 0x01
2045 #define TCL_ENCODING_END 0x02
2046 #if TCL_MAJOR_VERSION > 8
2047 # define TCL_ENCODING_STOPONERROR 0x0 /* Not used any more */
2048 #else
2049 # define TCL_ENCODING_STOPONERROR 0x04
2050 #endif
2051 #define TCL_ENCODING_NO_TERMINATE 0x08
2052 #define TCL_ENCODING_CHAR_LIMIT 0x10
2053 /* Internal use bits, do not define bits in this space. See above comment */
2054 #define TCL_ENCODING_INTERNAL_USE_MASK 0xFF00
2055 /*
2056 * Reserve top byte for profile values (disjoint, not a mask). In case of
2057 * changes, ensure ENCODING_PROFILE_* macros in tclInt.h are modified if
2058 * necessary.
2059 */
2060 #define TCL_ENCODING_PROFILE_STRICT TCL_ENCODING_STOPONERROR
2061 #define TCL_ENCODING_PROFILE_TCL8 0x01000000
2062 #define TCL_ENCODING_PROFILE_REPLACE 0x02000000
2063
2064 /*
2065 * The following definitions are the error codes returned by the conversion
2066 * routines:
2067 *
2068 * TCL_OK - All characters were converted.
2069 * TCL_CONVERT_NOSPACE - The output buffer would not have been large
2070 * enough for all of the converted data; as many
2071 * characters as could fit were converted though.
2072 * TCL_CONVERT_MULTIBYTE - The last few bytes in the source string were
2073 * the beginning of a multibyte sequence, but
2074 * more bytes were needed to complete this
2075 * sequence. A subsequent call to the conversion
2076 * routine should pass the beginning of this
2077 * unconverted sequence plus additional bytes
2078 * from the source stream to properly convert the
2079 * formerly split-up multibyte sequence.
2080 * TCL_CONVERT_SYNTAX - The source stream contained an invalid
2081 * character sequence. This may occur if the
2082 * input stream has been damaged or if the input
2083 * encoding method was misidentified.
2084 * TCL_CONVERT_UNKNOWN - The source string contained a character that
2085 * could not be represented in the target
2086 * encoding.
2087 */
2088
2089 #define TCL_CONVERT_MULTIBYTE (-1)
2090 #define TCL_CONVERT_SYNTAX (-2)
2091 #define TCL_CONVERT_UNKNOWN (-3)
2092 #define TCL_CONVERT_NOSPACE (-4)
2093
2094 /*
2095 * The maximum number of bytes that are necessary to represent a single
2096 * Unicode character in UTF-8. The valid values are 3 and 4. If > 3,
2097 * then Tcl_UniChar must be 4-bytes in size (UCS-4) (the default). If == 3,
2098 * then Tcl_UniChar must be 2-bytes in size (UTF-16). Since Tcl 9.0, UCS-4
2099 * mode is the default and recommended mode.
2100 */
2101
2102 #ifndef TCL_UTF_MAX
2103 # if defined(BUILD_tcl) || TCL_MAJOR_VERSION > 8
2104 # define TCL_UTF_MAX 4
2105 # else
2106 # define TCL_UTF_MAX 3
2107 # endif
2108 #endif
2109
2110 /*
2111 * This represents a Unicode character. Any changes to this should also be
2112 * reflected in regcustom.h.
2113 */
2114
2115 #if TCL_UTF_MAX == 4 && TCL_MAJOR_VERSION > 8
2116 /*
2117 * int isn't 100% accurate as it should be a strict 4-byte value
2118 * (perhaps int32_t). ILP64/SILP64 systems may have troubles. The
2119 * size of this value must be reflected correctly in regcustom.h.
2120 */
2121 typedef int Tcl_UniChar;
2122 #elif TCL_UTF_MAX == 3 && !defined(BUILD_tcl)
2123 typedef unsigned short Tcl_UniChar;
2124 #else
2125 # error "This TCL_UTF_MAX value is not supported"
2126 #endif
2127
2128
2129 /*
2130 *----------------------------------------------------------------------------
2131 * TIP #59: The following structure is used in calls 'Tcl_RegisterConfig' to
2132 * provide the system with the embedded configuration data.
2133 */
2134
2135 typedef struct Tcl_Config {
2136 const char *key; /* Configuration key to register. ASCII
2137 * encoded, thus UTF-8. */
2138 const char *value; /* The value associated with the key. System
2139 * encoding. */
2140 } Tcl_Config;
2141
2142 /*
2143 *----------------------------------------------------------------------------
2144 * Flags for TIP#143 limits, detailing which limits are active in an
2145 * interpreter. Used for Tcl_{Add,Remove}LimitHandler type argument.
2146 */
2147
2148 #define TCL_LIMIT_COMMANDS 0x01
2149 #define TCL_LIMIT_TIME 0x02
2150
2151 /*
2152 * Structure containing information about a limit handler to be called when a
2153 * command- or time-limit is exceeded by an interpreter.
2154 */
2155
2156 typedef void (Tcl_LimitHandlerProc) (void *clientData, Tcl_Interp *interp);
2157 #if TCL_MAJOR_VERSION > 8
2158 #define Tcl_LimitHandlerDeleteProc Tcl_FreeProc
2159 #else
2160 typedef void (Tcl_LimitHandlerDeleteProc) (void *clientData);
2161 #endif
2162
2163 #if 0
2164 /*
2165 *----------------------------------------------------------------------------
2166 * We would like to provide an anonymous structure "mp_int" here, which is
2167 * compatible with libtommath's "mp_int", but without duplicating anything
2168 * from <tommath.h> or including <tommath.h> here. But the libtommath project
2169 * didn't honor our request. See: <https://github.com/libtom/libtommath/pull/473>
2170 *
2171 * That's why this part is commented out, and we are using (void *) in
2172 * various API's in stead of the more correct (mp_int *).
2173 */
2174
2175 #ifndef MP_INT_DECLARED
2176 #define MP_INT_DECLARED
2177 typedef struct mp_int mp_int;
2178 #endif
2179
2180 #endif
2181
2182 /*
2183 *----------------------------------------------------------------------------
2184 * Definitions needed for Tcl_ParseArgvObj routines.
2185 * Based on tkArgv.c.
2186 * Modifications from the original are copyright (c) Sam Bromley 2006
2187 */
2188
2189 typedef struct {
2190 int type; /* Indicates the option type; see below. */
2191 const char *keyStr; /* The key string that flags the option in the
2192 * argv array. */
2193 void *srcPtr; /* Value to be used in setting dst; usage
2194 * depends on type.*/
2195 void *dstPtr; /* Address of value to be modified; usage
2196 * depends on type.*/
2197 const char *helpStr; /* Documentation message describing this
2198 * option. */
2199 void *clientData; /* Word to pass to function callbacks. */
2200 } Tcl_ArgvInfo;
2201
2202 /*
2203 * Legal values for the type field of a Tcl_ArgInfo: see the user
2204 * documentation for details.
2205 */
2206
2207 #define TCL_ARGV_CONSTANT 15
2208 #define TCL_ARGV_INT 16
2209 #define TCL_ARGV_STRING 17
2210 #define TCL_ARGV_REST 18
2211 #define TCL_ARGV_FLOAT 19
2212 #define TCL_ARGV_FUNC 20
2213 #define TCL_ARGV_GENFUNC 21
2214 #define TCL_ARGV_HELP 22
2215 #define TCL_ARGV_END 23
2216
2217 /*
2218 * Types of callback functions for the TCL_ARGV_FUNC and TCL_ARGV_GENFUNC
2219 * argument types:
2220 */
2221
2222 typedef int (Tcl_ArgvFuncProc)(void *clientData, Tcl_Obj *objPtr,
2223 void *dstPtr);
2224 typedef Tcl_Size (Tcl_ArgvGenFuncProc)(void *clientData, Tcl_Interp *interp,
2225 Tcl_Size objc, Tcl_Obj *const *objv, void *dstPtr);
2226
2227 /*
2228 * Shorthand for commonly used argTable entries.
2229 */
2230
2231 #define TCL_ARGV_AUTO_HELP \
2232 {TCL_ARGV_HELP, "-help", NULL, NULL, \
2233 "Print summary of command-line options and abort", NULL}
2234 #define TCL_ARGV_AUTO_REST \
2235 {TCL_ARGV_REST, "--", NULL, NULL, \
2236 "Marks the end of the options", NULL}
2237 #define TCL_ARGV_TABLE_END \
2238 {TCL_ARGV_END, NULL, NULL, NULL, NULL, NULL}
2239
2240 /*
2241 *----------------------------------------------------------------------------
2242 * Definitions needed for Tcl_Zlib routines. [TIP #234]
2243 *
2244 * Constants for the format flags describing what sort of data format is
2245 * desired/expected for the Tcl_ZlibDeflate, Tcl_ZlibInflate and
2246 * Tcl_ZlibStreamInit functions.
2247 */
2248
2249 #define TCL_ZLIB_FORMAT_RAW 1
2250 #define TCL_ZLIB_FORMAT_ZLIB 2
2251 #define TCL_ZLIB_FORMAT_GZIP 4
2252 #define TCL_ZLIB_FORMAT_AUTO 8
2253
2254 /*
2255 * Constants that describe whether the stream is to operate in compressing or
2256 * decompressing mode.
2257 */
2258
2259 #define TCL_ZLIB_STREAM_DEFLATE 16
2260 #define TCL_ZLIB_STREAM_INFLATE 32
2261
2262 /*
2263 * Constants giving compression levels. Use of TCL_ZLIB_COMPRESS_DEFAULT is
2264 * recommended.
2265 */
2266
2267 #define TCL_ZLIB_COMPRESS_NONE 0
2268 #define TCL_ZLIB_COMPRESS_FAST 1
2269 #define TCL_ZLIB_COMPRESS_BEST 9
2270 #define TCL_ZLIB_COMPRESS_DEFAULT (-1)
2271
2272 /*
2273 * Constants for types of flushing, used with Tcl_ZlibFlush.
2274 */
2275
2276 #define TCL_ZLIB_NO_FLUSH 0
2277 #define TCL_ZLIB_FLUSH 2
2278 #define TCL_ZLIB_FULLFLUSH 3
2279 #define TCL_ZLIB_FINALIZE 4
2280
2281 /*
2282 *----------------------------------------------------------------------------
2283 * Definitions needed for the Tcl_LoadFile function. [TIP #416]
2284 */
2285
2286 #define TCL_LOAD_GLOBAL 1
2287 #define TCL_LOAD_LAZY 2
2288
2289 /*
2290 *----------------------------------------------------------------------------
2291 * Definitions needed for the Tcl_OpenTcpServerEx function. [TIP #456]
2292 */
2293 #define TCL_TCPSERVER_REUSEADDR (1<<0)
2294 #define TCL_TCPSERVER_REUSEPORT (1<<1)
2295
2296 /*
2297 * Constants for special Tcl_Size-typed values, see TIP #494
2298 */
2299
2300 #define TCL_IO_FAILURE ((Tcl_Size)-1)
2301 #define TCL_AUTO_LENGTH ((Tcl_Size)-1)
2302 #define TCL_INDEX_NONE ((Tcl_Size)-1)
2303
2304 /*
2305 *----------------------------------------------------------------------------
2306 * Single public declaration for NRE.
2307 */
2308
2309 typedef int (Tcl_NRPostProc) (void *data[], Tcl_Interp *interp,
2310 int result);
2311
2312 /*
2313 *----------------------------------------------------------------------------
2314 * The following constant is used to test for older versions of Tcl in the
2315 * stubs tables.
2316 */
2317
2318 #if TCL_MAJOR_VERSION > 8
2319 # define TCL_STUB_MAGIC ((int) 0xFCA3BACB + (int) sizeof(void *))
2320 #else
2321 # define TCL_STUB_MAGIC ((int) 0xFCA3BACF)
2322 #endif
2323
2324 /*
2325 * The following function is required to be defined in all stubs aware
2326 * extensions. The function is actually implemented in the stub library, not
2327 * the main Tcl library, although there is a trivial implementation in the
2328 * main library in case an extension is statically linked into an application.
2329 */
2330
2331 const char * Tcl_InitStubs(Tcl_Interp *interp, const char *version,
2332 int exact, int magic);
2333 const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
2334 const char *version, int epoch, int revision);
2335 const char * TclInitStubTable(const char *version);
2336 void * TclStubCall(void *arg);
2337 #if defined(_WIN32)
2338 TCL_NORETURN void Tcl_ConsolePanic(const char *format, ...);
2339 #else
2340 # define Tcl_ConsolePanic ((Tcl_PanicProc *)NULL)
2341 #endif
2342
2343 #ifdef USE_TCL_STUBS
2344 #if TCL_MAJOR_VERSION < 9
2345 # define Tcl_InitStubs(interp, version, exact) \
2346 (Tcl_InitStubs)(interp, version, \
2347 (exact)|(TCL_MAJOR_VERSION<<8)|(0xFF<<16), \
2348 TCL_STUB_MAGIC)
2349 #else
2350 # define Tcl_InitStubs(interp, version, exact) \
2351 (Tcl_InitStubs)(interp, version, \
2352 (exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16), \
2353 TCL_STUB_MAGIC)
2354 #endif
2355 #else
2356 #if TCL_MAJOR_VERSION < 9
2357 # define Tcl_InitStubs(interp, version, exact) \
2358 Tcl_Panic(((void)interp, (void)version, \
2359 (void)exact, "Please define -DUSE_TCL_STUBS"))
2360 #else
2361 # define Tcl_InitStubs(interp, version, exact) \
2362 Tcl_PkgInitStubsCheck(interp, version, \
2363 (exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16))
2364 #endif
2365 #endif
2366
2367 /*
2368 * Public functions that are not accessible via the stubs table.
2369 * Tcl_GetMemoryInfo is needed for AOLserver. [Bug 1868171]
2370 */
2371
2372 #define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \
2373 ((Tcl_SetPanicProc(Tcl_ConsolePanic), Tcl_CreateInterp())))
2374 EXTERN TCL_NORETURN void Tcl_MainEx(Tcl_Size argc, char **argv,
2375 Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
2376 EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp,
2377 const char *version, int exact);
2378 EXTERN const char * Tcl_InitSubsystems(void);
2379 EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
2380 EXTERN const char * Tcl_FindExecutable(const char *argv0);
2381 EXTERN const char * Tcl_SetPreInitScript(const char *string);
2382 EXTERN const char * Tcl_SetPanicProc(
2383 Tcl_PanicProc *panicProc);
2384 EXTERN void Tcl_StaticLibrary(Tcl_Interp *interp,
2385 const char *prefix,
2386 Tcl_LibraryInitProc *initProc,
2387 Tcl_LibraryInitProc *safeInitProc);
2388 #ifndef TCL_NO_DEPRECATED
2389 # define Tcl_StaticPackage Tcl_StaticLibrary
2390 #endif
2391 EXTERN Tcl_ExitProc * Tcl_SetExitProc(Tcl_ExitProc *proc);
2392 #ifdef _WIN32
2393 EXTERN const char *TclZipfs_AppHook(int *argc, unsigned short ***argv);
2394 #else
2395 EXTERN const char *TclZipfs_AppHook(int *argc, char ***argv);
2396 #endif
2397 #if defined(_WIN32) && defined(UNICODE)
2398 #ifndef USE_TCL_STUBS
2399 # define Tcl_FindExecutable(arg) ((Tcl_FindExecutable)((const char *)(arg)))
2400 #endif
2401 # define Tcl_MainEx Tcl_MainExW
2402 EXTERN TCL_NORETURN void Tcl_MainExW(Tcl_Size argc, unsigned short **argv,
2403 Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
2404 #endif
2405 #if defined(USE_TCL_STUBS) && (TCL_MAJOR_VERSION > 8)
2406 #define Tcl_SetPanicProc(panicProc) \
2407 TclInitStubTable(((const char *(*)(Tcl_PanicProc *))TclStubCall((void *)panicProc))(panicProc))
2408 #define Tcl_InitSubsystems() \
2409 TclInitStubTable(((const char *(*)(void))TclStubCall((void *)1))())
2410 #define Tcl_FindExecutable(argv0) \
2411 TclInitStubTable(((const char *(*)(const char *))TclStubCall((void *)2))(argv0))
2412 #define TclZipfs_AppHook(argcp, argvp) \
2413 TclInitStubTable(((const char *(*)(int *, void *))TclStubCall((void *)3))(argcp, argvp))
2414 #define Tcl_MainExW(argc, argv, appInitProc, interp) \
2415 (void)((const char *(*)(Tcl_Size, const void *, Tcl_AppInitProc *, Tcl_Interp *)) \
2416 TclStubCall((void *)4))(argc, argv, appInitProc, interp)
2417 #if !defined(_WIN32) || !defined(UNICODE)
2418 #define Tcl_MainEx(argc, argv, appInitProc, interp) \
2419 (void)((const char *(*)(Tcl_Size, const void *, Tcl_AppInitProc *, Tcl_Interp *)) \
2420 TclStubCall((void *)5))(argc, argv, appInitProc, interp)
2421 #endif
2422 #define Tcl_StaticLibrary(interp, pkgName, initProc, safeInitProc) \
2423 (void)((const char *(*)(Tcl_Interp *, const char *, Tcl_LibraryInitProc *, Tcl_LibraryInitProc *)) \
2424 TclStubCall((void *)6))(interp, pkgName, initProc, safeInitProc)
2425 #define Tcl_SetExitProc(proc) \
2426 ((Tcl_ExitProc *(*)(Tcl_ExitProc *))TclStubCall((void *)7))(proc)
2427 #define Tcl_GetMemoryInfo(dsPtr) \
2428 (void)((const char *(*)(Tcl_DString *))TclStubCall((void *)8))(dsPtr)
2429 #define Tcl_SetPreInitScript(string) \
2430 ((const char *(*)(const char *))TclStubCall((void *)9))(string)
2431 #endif
2432
2433
2434 /*
2435 *----------------------------------------------------------------------------
2436 * Include the public function declarations that are accessible via the stubs
2437 * table.
2438 */
2439
2440 #include "tclDecls.h"
2441
2442 /*
2443 * Include platform specific public function declarations that are accessible
2444 * via the stubs table. Make all TclOO symbols MODULE_SCOPE (which only
2445 * has effect on building it as a shared library). See ticket [3010352].
2446 */
2447
2448 #if defined(BUILD_tcl)
2449 # undef TCLAPI
2450 # define TCLAPI MODULE_SCOPE
2451 #endif
2452
2453 /*
2454 *----------------------------------------------------------------------------
2455 * The following declarations map ckalloc and ckfree to Tcl_Alloc and
2456 * Tcl_Free for use in Tcl-8.x-compatible extensions.
2457 */
2458
2459 #ifndef BUILD_tcl
2460 # define ckalloc Tcl_Alloc
2461 # define attemptckalloc Tcl_AttemptAlloc
2462 # ifdef _MSC_VER
2463 /* Silence invalid C4090 warnings */
2464 # define ckfree(a) Tcl_Free((void *)(a))
2465 # define ckrealloc(a,b) Tcl_Realloc((void *)(a),(b))
2466 # define attemptckrealloc(a,b) Tcl_AttemptRealloc((void *)(a),(b))
2467 # else
2468 # define ckfree Tcl_Free
2469 # define ckrealloc Tcl_Realloc
2470 # define attemptckrealloc Tcl_AttemptRealloc
2471 # endif
2472 #endif
2473
2474 #ifndef TCL_MEM_DEBUG
2475
2476 /*
2477 * If we are not using the debugging allocator, we should call the Tcl_Alloc,
2478 * et al. routines in order to guarantee that every module is using the same
2479 * memory allocator both inside and outside of the Tcl library.
2480 */
2481
2482 # undef Tcl_InitMemory
2483 # define Tcl_InitMemory(x)
2484 # undef Tcl_DumpActiveMemory
2485 # define Tcl_DumpActiveMemory(x)
2486 # undef Tcl_ValidateAllMemory
2487 # define Tcl_ValidateAllMemory(x,y)
2488
2489 #endif /* !TCL_MEM_DEBUG */
2490
2491 #ifdef TCL_MEM_DEBUG
2492 # undef Tcl_IncrRefCount
2493 # define Tcl_IncrRefCount(objPtr) \
2494 Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__)
2495 # undef Tcl_DecrRefCount
2496 # define Tcl_DecrRefCount(objPtr) \
2497 Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__)
2498 # undef Tcl_IsShared
2499 # define Tcl_IsShared(objPtr) \
2500 Tcl_DbIsShared(objPtr, __FILE__, __LINE__)
2501 /*
2502 * Free the Obj by effectively doing:
2503 *
2504 * Tcl_IncrRefCount(objPtr);
2505 * Tcl_DecrRefCount(objPtr);
2506 *
2507 * This will free the obj if there are no references to the obj.
2508 */
2509 # define Tcl_BounceRefCount(objPtr) \
2510 TclBounceRefCount(objPtr, __FILE__, __LINE__)
2511
2512 static inline void
2513 TclBounceRefCount(
2514 Tcl_Obj* objPtr,
2515 const char* fn,
2516 int line)
2517 {
2518 if (objPtr) {
2519 if ((objPtr)->refCount == 0) {
2520 Tcl_DbDecrRefCount(objPtr, fn, line);
2521 }
2522 }
2523 }
2524 #else
2525 # undef Tcl_IncrRefCount
2526 # define Tcl_IncrRefCount(objPtr) \
2527 ((void)++(objPtr)->refCount)
2528 /*
2529 * Use do/while0 idiom for optimum correctness without compiler warnings.
2530 * https://wiki.c2.com/?TrivialDoWhileLoop
2531 */
2532 # undef Tcl_DecrRefCount
2533 # define Tcl_DecrRefCount(objPtr) \
2534 do { \
2535 Tcl_Obj *_objPtr = (objPtr); \
2536 if (_objPtr->refCount-- <= 1) { \
2537 TclFreeObj(_objPtr); \
2538 } \
2539 } while(0)
2540 # undef Tcl_IsShared
2541 # define Tcl_IsShared(objPtr) \
2542 ((objPtr)->refCount > 1)
2543
2544 /*
2545 * Declare that obj will no longer be used or referenced.
2546 * This will free the obj if there are no references to the obj.
2547 */
2548 # define Tcl_BounceRefCount(objPtr) \
2549 TclBounceRefCount(objPtr);
2550
2551 static inline void
2552 TclBounceRefCount(
2553 Tcl_Obj* objPtr)
2554 {
2555 if (objPtr) {
2556 if ((objPtr)->refCount == 0) {
2557 Tcl_DecrRefCount(objPtr);
2558 }
2559 }
2560 }
2561
2562 #endif
2563
2564 /*
2565 * Macros and definitions that help to debug the use of Tcl objects. When
2566 * TCL_MEM_DEBUG is defined, the Tcl_New declarations are overridden to call
2567 * debugging versions of the object creation functions.
2568 */
2569
2570 #ifdef TCL_MEM_DEBUG
2571 # undef Tcl_NewBignumObj
2572 # define Tcl_NewBignumObj(val) \
2573 Tcl_DbNewBignumObj(val, __FILE__, __LINE__)
2574 # undef Tcl_NewBooleanObj
2575 # define Tcl_NewBooleanObj(val) \
2576 Tcl_DbNewWideIntObj((val)!=0, __FILE__, __LINE__)
2577 # undef Tcl_NewByteArrayObj
2578 # define Tcl_NewByteArrayObj(bytes, len) \
2579 Tcl_DbNewByteArrayObj(bytes, len, __FILE__, __LINE__)
2580 # undef Tcl_NewDoubleObj
2581 # define Tcl_NewDoubleObj(val) \
2582 Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)
2583 # undef Tcl_NewListObj
2584 # define Tcl_NewListObj(objc, objv) \
2585 Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__)
2586 # undef Tcl_NewObj
2587 # define Tcl_NewObj() \
2588 Tcl_DbNewObj(__FILE__, __LINE__)
2589 # undef Tcl_NewStringObj
2590 # define Tcl_NewStringObj(bytes, len) \
2591 Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__)
2592 # undef Tcl_NewWideIntObj
2593 # define Tcl_NewWideIntObj(val) \
2594 Tcl_DbNewWideIntObj(val, __FILE__, __LINE__)
2595 #endif /* TCL_MEM_DEBUG */
2596
2597 /*
2598 *----------------------------------------------------------------------------
2599 * Macros for clients to use to access fields of hash entries:
2600 */
2601
2602 #define Tcl_GetHashValue(h) ((h)->clientData)
2603 #define Tcl_SetHashValue(h, value) ((h)->clientData = (void *)(value))
2604 #define Tcl_GetHashKey(tablePtr, h) \
2605 ((void *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS || \
2606 (tablePtr)->keyType == TCL_CUSTOM_PTR_KEYS) \
2607 ? (h)->key.oneWordValue \
2608 : (h)->key.string))
2609
2610 /*
2611 * Macros to use for clients to use to invoke find and create functions for
2612 * hash tables:
2613 */
2614
2615 #define Tcl_FindHashEntry(tablePtr, key) \
2616 (*((tablePtr)->findProc))(tablePtr, (const char *)(key))
2617 #define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
2618 (*((tablePtr)->createProc))(tablePtr, (const char *)(key), newPtr)
2619
2620 #endif /* RC_INVOKED */
2621
2622 /*
2623 * end block for C++
2624 */
2625
2626 #ifdef __cplusplus
2627 }
2628 #endif
2629
2630 #endif /* _TCL */
2631
2632
2633 /*
2634 * Local Variables:
2635 * mode: c
2636 * c-basic-offset: 4
2637 * fill-column: 78
2638 * End:
2639 */
--- a/compat/tcl-9.0/generic/tclDecls.h
+++ b/compat/tcl-9.0/generic/tclDecls.h
@@ -0,0 +1,4369 @@
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
+#include <stddef.h> /* for size_t */
16
+
17
+#undef TCL_STORAGE_CLASS
18
+#ifdef BUILD_tcl
19
+# define TCL_STORAGE_CLASS DLLEXPORT
20
+#else
21
+# ifdef USE_TCL_STUBS
22
+# define TCL_STORAGE_CLASS
23
+# else
24
+# define TCL_STORAGE_CLASS DLLIMPORT
25
+# endif
26
+#endif
27
+
28
+#if !defined(BUILD_tcl)
29
+# define TCL_DEPRECATED(msg) EXTERN TCL_DEPRECATED_API(msg)
30
+#elif defined(TCL_NO_DEPRECATED)
31
+# define TCL_DEPRECATED(msg) MODULE_SCOPE
32
+#else
33
+# define TCL_DEPRECATED(msg) EXTERN
34
+#endif
35
+
36
+
37
+/*
38
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
39
+ * script. Any modifications to the function declarations below should be made
40
+ * in the generic/tcl.decls script.
41
+ */
42
+
43
+/* !BEGIN!: Do not edit below this line. */
44
+
45
+#ifdef __cplusplus
46
+extern "C" {
47
+#endif
48
+
49
+/*
50
+ * Exported function declarations:
51
+ */
52
+
53
+/* 0 */
54
+EXTERN int Tcl_PkgProvideEx(Tcl_Interp *interp,
55
+ const char *name, const char *version,
56
+ const void *clientData);
57
+/* 1 */
58
+EXTERN const char * Tcl_PkgRequireEx(Tcl_Interp *interp,
59
+ const char *name, const char *version,
60
+ int exact, void *clientDataPtr);
61
+/* 2 */
62
+EXTERN TCL_NORETURN void Tcl_Panic(const char *format, ...) TCL_FORMAT_PRINTF(1, 2);
63
+/* 3 */
64
+EXTERN void * Tcl_Alloc(TCL_HASH_TYPE size);
65
+/* 4 */
66
+EXTERN void Tcl_Free(void *ptr);
67
+/* 5 */
68
+EXTERN void * Tcl_Realloc(void *ptr, TCL_HASH_TYPE size);
69
+/* 6 */
70
+EXTERN void * Tcl_DbCkalloc(TCL_HASH_TYPE size, const char *file,
71
+ int line);
72
+/* 7 */
73
+EXTERN void Tcl_DbCkfree(void *ptr, const char *file, int line);
74
+/* 8 */
75
+EXTERN void * Tcl_DbCkrealloc(void *ptr, TCL_HASH_TYPE size,
76
+ const char *file, int line);
77
+/* 9 */
78
+EXTERN void Tcl_CreateFileHandler(int fd, int mask,
79
+ Tcl_FileProc *proc, void *clientData);
80
+/* 10 */
81
+EXTERN void Tcl_DeleteFileHandler(int fd);
82
+/* 11 */
83
+EXTERN void Tcl_SetTimer(const Tcl_Time *timePtr);
84
+/* 12 */
85
+EXTERN void Tcl_Sleep(int ms);
86
+/* 13 */
87
+EXTERN int Tcl_WaitForEvent(const Tcl_Time *timePtr);
88
+/* 14 */
89
+EXTERN int Tcl_AppendAllObjTypes(Tcl_Interp *interp,
90
+ Tcl_Obj *objPtr);
91
+/* 15 */
92
+EXTERN void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...);
93
+/* 16 */
94
+EXTERN void Tcl_AppendToObj(Tcl_Obj *objPtr, const char *bytes,
95
+ Tcl_Size length);
96
+/* 17 */
97
+EXTERN Tcl_Obj * Tcl_ConcatObj(Tcl_Size objc, Tcl_Obj *const objv[]);
98
+/* 18 */
99
+EXTERN int Tcl_ConvertToType(Tcl_Interp *interp,
100
+ Tcl_Obj *objPtr, const Tcl_ObjType *typePtr);
101
+/* 19 */
102
+EXTERN void Tcl_DbDecrRefCount(Tcl_Obj *objPtr, const char *file,
103
+ int line);
104
+/* 20 */
105
+EXTERN void Tcl_DbIncrRefCount(Tcl_Obj *objPtr, const char *file,
106
+ int line);
107
+/* 21 */
108
+EXTERN int Tcl_DbIsShared(Tcl_Obj *objPtr, const char *file,
109
+ int line);
110
+/* Slot 22 is reserved */
111
+/* 23 */
112
+EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj(const unsigned char *bytes,
113
+ Tcl_Size numBytes, const char *file,
114
+ int line);
115
+/* 24 */
116
+EXTERN Tcl_Obj * Tcl_DbNewDoubleObj(double doubleValue,
117
+ const char *file, int line);
118
+/* 25 */
119
+EXTERN Tcl_Obj * Tcl_DbNewListObj(Tcl_Size objc, Tcl_Obj *const *objv,
120
+ const char *file, int line);
121
+/* Slot 26 is reserved */
122
+/* 27 */
123
+EXTERN Tcl_Obj * Tcl_DbNewObj(const char *file, int line);
124
+/* 28 */
125
+EXTERN Tcl_Obj * Tcl_DbNewStringObj(const char *bytes,
126
+ Tcl_Size length, const char *file, int line);
127
+/* 29 */
128
+EXTERN Tcl_Obj * Tcl_DuplicateObj(Tcl_Obj *objPtr);
129
+/* 30 */
130
+EXTERN void TclFreeObj(Tcl_Obj *objPtr);
131
+/* 31 */
132
+EXTERN int Tcl_GetBoolean(Tcl_Interp *interp, const char *src,
133
+ int *intPtr);
134
+/* 32 */
135
+EXTERN int Tcl_GetBooleanFromObj(Tcl_Interp *interp,
136
+ Tcl_Obj *objPtr, int *intPtr);
137
+/* 33 */
138
+EXTERN unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr,
139
+ Tcl_Size *numBytesPtr);
140
+/* 34 */
141
+EXTERN int Tcl_GetDouble(Tcl_Interp *interp, const char *src,
142
+ double *doublePtr);
143
+/* 35 */
144
+EXTERN int Tcl_GetDoubleFromObj(Tcl_Interp *interp,
145
+ Tcl_Obj *objPtr, double *doublePtr);
146
+/* Slot 36 is reserved */
147
+/* 37 */
148
+EXTERN int Tcl_GetInt(Tcl_Interp *interp, const char *src,
149
+ int *intPtr);
150
+/* 38 */
151
+EXTERN int Tcl_GetIntFromObj(Tcl_Interp *interp,
152
+ Tcl_Obj *objPtr, int *intPtr);
153
+/* 39 */
154
+EXTERN int Tcl_GetLongFromObj(Tcl_Interp *interp,
155
+ Tcl_Obj *objPtr, long *longPtr);
156
+/* 40 */
157
+EXTERN const Tcl_ObjType * Tcl_GetObjType(const char *typeName);
158
+/* 41 */
159
+EXTERN char * TclGetStringFromObj(Tcl_Obj *objPtr, void *lengthPtr);
160
+/* 42 */
161
+EXTERN void Tcl_InvalidateStringRep(Tcl_Obj *objPtr);
162
+/* 43 */
163
+EXTERN int Tcl_ListObjAppendList(Tcl_Interp *interp,
164
+ Tcl_Obj *listPtr, Tcl_Obj *elemListPtr);
165
+/* 44 */
166
+EXTERN int Tcl_ListObjAppendElement(Tcl_Interp *interp,
167
+ Tcl_Obj *listPtr, Tcl_Obj *objPtr);
168
+/* 45 */
169
+EXTERN int TclListObjGetElements(Tcl_Interp *interp,
170
+ Tcl_Obj *listPtr, void *objcPtr,
171
+ Tcl_Obj ***objvPtr);
172
+/* 46 */
173
+EXTERN int Tcl_ListObjIndex(Tcl_Interp *interp,
174
+ Tcl_Obj *listPtr, Tcl_Size index,
175
+ Tcl_Obj **objPtrPtr);
176
+/* 47 */
177
+EXTERN int TclListObjLength(Tcl_Interp *interp,
178
+ Tcl_Obj *listPtr, void *lengthPtr);
179
+/* 48 */
180
+EXTERN int Tcl_ListObjReplace(Tcl_Interp *interp,
181
+ Tcl_Obj *listPtr, Tcl_Size first,
182
+ Tcl_Size count, Tcl_Size objc,
183
+ Tcl_Obj *const objv[]);
184
+/* Slot 49 is reserved */
185
+/* 50 */
186
+EXTERN Tcl_Obj * Tcl_NewByteArrayObj(const unsigned char *bytes,
187
+ Tcl_Size numBytes);
188
+/* 51 */
189
+EXTERN Tcl_Obj * Tcl_NewDoubleObj(double doubleValue);
190
+/* Slot 52 is reserved */
191
+/* 53 */
192
+EXTERN Tcl_Obj * Tcl_NewListObj(Tcl_Size objc, Tcl_Obj *const objv[]);
193
+/* Slot 54 is reserved */
194
+/* 55 */
195
+EXTERN Tcl_Obj * Tcl_NewObj(void);
196
+/* 56 */
197
+EXTERN Tcl_Obj * Tcl_NewStringObj(const char *bytes, Tcl_Size length);
198
+/* Slot 57 is reserved */
199
+/* 58 */
200
+EXTERN unsigned char * Tcl_SetByteArrayLength(Tcl_Obj *objPtr,
201
+ Tcl_Size numBytes);
202
+/* 59 */
203
+EXTERN void Tcl_SetByteArrayObj(Tcl_Obj *objPtr,
204
+ const unsigned char *bytes,
205
+ Tcl_Size numBytes);
206
+/* 60 */
207
+EXTERN void Tcl_SetDoubleObj(Tcl_Obj *objPtr, double doubleValue);
208
+/* Slot 61 is reserved */
209
+/* 62 */
210
+EXTERN void Tcl_SetListObj(Tcl_Obj *objPtr, Tcl_Size objc,
211
+ Tcl_Obj *const objv[]);
212
+/* Slot 63 is reserved */
213
+/* 64 */
214
+EXTERN void Tcl_SetObjLength(Tcl_Obj *objPtr, Tcl_Size length);
215
+/* 65 */
216
+EXTERN void Tcl_SetStringObj(Tcl_Obj *objPtr, const char *bytes,
217
+ Tcl_Size length);
218
+/* Slot 66 is reserved */
219
+/* Slot 67 is reserved */
220
+/* 68 */
221
+EXTERN void Tcl_AllowExceptions(Tcl_Interp *interp);
222
+/* 69 */
223
+EXTERN void Tcl_AppendElement(Tcl_Interp *interp,
224
+ const char *element);
225
+/* 70 */
226
+EXTERN void Tcl_AppendResult(Tcl_Interp *interp, ...);
227
+/* 71 */
228
+EXTERN Tcl_AsyncHandler Tcl_AsyncCreate(Tcl_AsyncProc *proc,
229
+ void *clientData);
230
+/* 72 */
231
+EXTERN void Tcl_AsyncDelete(Tcl_AsyncHandler async);
232
+/* 73 */
233
+EXTERN int Tcl_AsyncInvoke(Tcl_Interp *interp, int code);
234
+/* 74 */
235
+EXTERN void Tcl_AsyncMark(Tcl_AsyncHandler async);
236
+/* 75 */
237
+EXTERN int Tcl_AsyncReady(void);
238
+/* Slot 76 is reserved */
239
+/* Slot 77 is reserved */
240
+/* 78 */
241
+EXTERN int Tcl_BadChannelOption(Tcl_Interp *interp,
242
+ const char *optionName,
243
+ const char *optionList);
244
+/* 79 */
245
+EXTERN void Tcl_CallWhenDeleted(Tcl_Interp *interp,
246
+ Tcl_InterpDeleteProc *proc, void *clientData);
247
+/* 80 */
248
+EXTERN void Tcl_CancelIdleCall(Tcl_IdleProc *idleProc,
249
+ void *clientData);
250
+/* 81 */
251
+EXTERN int Tcl_Close(Tcl_Interp *interp, Tcl_Channel chan);
252
+/* 82 */
253
+EXTERN int Tcl_CommandComplete(const char *cmd);
254
+/* 83 */
255
+EXTERN char * Tcl_Concat(Tcl_Size argc, const char *const *argv);
256
+/* 84 */
257
+EXTERN Tcl_Size Tcl_ConvertElement(const char *src, char *dst,
258
+ int flags);
259
+/* 85 */
260
+EXTERN Tcl_Size Tcl_ConvertCountedElement(const char *src,
261
+ Tcl_Size length, char *dst, int flags);
262
+/* 86 */
263
+EXTERN int Tcl_CreateAlias(Tcl_Interp *childInterp,
264
+ const char *childCmd, Tcl_Interp *target,
265
+ const char *targetCmd, Tcl_Size argc,
266
+ const char *const *argv);
267
+/* 87 */
268
+EXTERN int Tcl_CreateAliasObj(Tcl_Interp *childInterp,
269
+ const char *childCmd, Tcl_Interp *target,
270
+ const char *targetCmd, Tcl_Size objc,
271
+ Tcl_Obj *const objv[]);
272
+/* 88 */
273
+EXTERN Tcl_Channel Tcl_CreateChannel(const Tcl_ChannelType *typePtr,
274
+ const char *chanName, void *instanceData,
275
+ int mask);
276
+/* 89 */
277
+EXTERN void Tcl_CreateChannelHandler(Tcl_Channel chan, int mask,
278
+ Tcl_ChannelProc *proc, void *clientData);
279
+/* 90 */
280
+EXTERN void Tcl_CreateCloseHandler(Tcl_Channel chan,
281
+ Tcl_CloseProc *proc, void *clientData);
282
+/* 91 */
283
+EXTERN Tcl_Command Tcl_CreateCommand(Tcl_Interp *interp,
284
+ const char *cmdName, Tcl_CmdProc *proc,
285
+ void *clientData,
286
+ Tcl_CmdDeleteProc *deleteProc);
287
+/* 92 */
288
+EXTERN void Tcl_CreateEventSource(Tcl_EventSetupProc *setupProc,
289
+ Tcl_EventCheckProc *checkProc,
290
+ void *clientData);
291
+/* 93 */
292
+EXTERN void Tcl_CreateExitHandler(Tcl_ExitProc *proc,
293
+ void *clientData);
294
+/* 94 */
295
+EXTERN Tcl_Interp * Tcl_CreateInterp(void);
296
+/* Slot 95 is reserved */
297
+/* 96 */
298
+EXTERN Tcl_Command Tcl_CreateObjCommand(Tcl_Interp *interp,
299
+ const char *cmdName, Tcl_ObjCmdProc *proc,
300
+ void *clientData,
301
+ Tcl_CmdDeleteProc *deleteProc);
302
+/* 97 */
303
+EXTERN Tcl_Interp * Tcl_CreateChild(Tcl_Interp *interp, const char *name,
304
+ int isSafe);
305
+/* 98 */
306
+EXTERN Tcl_TimerToken Tcl_CreateTimerHandler(int milliseconds,
307
+ Tcl_TimerProc *proc, void *clientData);
308
+/* 99 */
309
+EXTERN Tcl_Trace Tcl_CreateTrace(Tcl_Interp *interp, Tcl_Size level,
310
+ Tcl_CmdTraceProc *proc, void *clientData);
311
+/* 100 */
312
+EXTERN void Tcl_DeleteAssocData(Tcl_Interp *interp,
313
+ const char *name);
314
+/* 101 */
315
+EXTERN void Tcl_DeleteChannelHandler(Tcl_Channel chan,
316
+ Tcl_ChannelProc *proc, void *clientData);
317
+/* 102 */
318
+EXTERN void Tcl_DeleteCloseHandler(Tcl_Channel chan,
319
+ Tcl_CloseProc *proc, void *clientData);
320
+/* 103 */
321
+EXTERN int Tcl_DeleteCommand(Tcl_Interp *interp,
322
+ const char *cmdName);
323
+/* 104 */
324
+EXTERN int Tcl_DeleteCommandFromToken(Tcl_Interp *interp,
325
+ Tcl_Command command);
326
+/* 105 */
327
+EXTERN void Tcl_DeleteEvents(Tcl_EventDeleteProc *proc,
328
+ void *clientData);
329
+/* 106 */
330
+EXTERN void Tcl_DeleteEventSource(Tcl_EventSetupProc *setupProc,
331
+ Tcl_EventCheckProc *checkProc,
332
+ void *clientData);
333
+/* 107 */
334
+EXTERN void Tcl_DeleteExitHandler(Tcl_ExitProc *proc,
335
+ void *clientData);
336
+/* 108 */
337
+EXTERN void Tcl_DeleteHashEntry(Tcl_HashEntry *entryPtr);
338
+/* 109 */
339
+EXTERN void Tcl_DeleteHashTable(Tcl_HashTable *tablePtr);
340
+/* 110 */
341
+EXTERN void Tcl_DeleteInterp(Tcl_Interp *interp);
342
+/* 111 */
343
+EXTERN void Tcl_DetachPids(Tcl_Size numPids, Tcl_Pid *pidPtr);
344
+/* 112 */
345
+EXTERN void Tcl_DeleteTimerHandler(Tcl_TimerToken token);
346
+/* 113 */
347
+EXTERN void Tcl_DeleteTrace(Tcl_Interp *interp, Tcl_Trace trace);
348
+/* 114 */
349
+EXTERN void Tcl_DontCallWhenDeleted(Tcl_Interp *interp,
350
+ Tcl_InterpDeleteProc *proc, void *clientData);
351
+/* 115 */
352
+EXTERN int Tcl_DoOneEvent(int flags);
353
+/* 116 */
354
+EXTERN void Tcl_DoWhenIdle(Tcl_IdleProc *proc, void *clientData);
355
+/* 117 */
356
+EXTERN char * Tcl_DStringAppend(Tcl_DString *dsPtr,
357
+ const char *bytes, Tcl_Size length);
358
+/* 118 */
359
+EXTERN char * Tcl_DStringAppendElement(Tcl_DString *dsPtr,
360
+ const char *element);
361
+/* 119 */
362
+EXTERN void Tcl_DStringEndSublist(Tcl_DString *dsPtr);
363
+/* 120 */
364
+EXTERN void Tcl_DStringFree(Tcl_DString *dsPtr);
365
+/* 121 */
366
+EXTERN void Tcl_DStringGetResult(Tcl_Interp *interp,
367
+ Tcl_DString *dsPtr);
368
+/* 122 */
369
+EXTERN void Tcl_DStringInit(Tcl_DString *dsPtr);
370
+/* 123 */
371
+EXTERN void Tcl_DStringResult(Tcl_Interp *interp,
372
+ Tcl_DString *dsPtr);
373
+/* 124 */
374
+EXTERN void Tcl_DStringSetLength(Tcl_DString *dsPtr,
375
+ Tcl_Size length);
376
+/* 125 */
377
+EXTERN void Tcl_DStringStartSublist(Tcl_DString *dsPtr);
378
+/* 126 */
379
+EXTERN int Tcl_Eof(Tcl_Channel chan);
380
+/* 127 */
381
+EXTERN const char * Tcl_ErrnoId(void);
382
+/* 128 */
383
+EXTERN const char * Tcl_ErrnoMsg(int err);
384
+/* Slot 129 is reserved */
385
+/* 130 */
386
+EXTERN int Tcl_EvalFile(Tcl_Interp *interp,
387
+ const char *fileName);
388
+/* Slot 131 is reserved */
389
+/* 132 */
390
+EXTERN void Tcl_EventuallyFree(void *clientData,
391
+ Tcl_FreeProc *freeProc);
392
+/* 133 */
393
+EXTERN TCL_NORETURN void Tcl_Exit(int status);
394
+/* 134 */
395
+EXTERN int Tcl_ExposeCommand(Tcl_Interp *interp,
396
+ const char *hiddenCmdToken,
397
+ const char *cmdName);
398
+/* 135 */
399
+EXTERN int Tcl_ExprBoolean(Tcl_Interp *interp, const char *expr,
400
+ int *ptr);
401
+/* 136 */
402
+EXTERN int Tcl_ExprBooleanObj(Tcl_Interp *interp,
403
+ Tcl_Obj *objPtr, int *ptr);
404
+/* 137 */
405
+EXTERN int Tcl_ExprDouble(Tcl_Interp *interp, const char *expr,
406
+ double *ptr);
407
+/* 138 */
408
+EXTERN int Tcl_ExprDoubleObj(Tcl_Interp *interp,
409
+ Tcl_Obj *objPtr, double *ptr);
410
+/* 139 */
411
+EXTERN int Tcl_ExprLong(Tcl_Interp *interp, const char *expr,
412
+ long *ptr);
413
+/* 140 */
414
+EXTERN int Tcl_ExprLongObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
415
+ long *ptr);
416
+/* 141 */
417
+EXTERN int Tcl_ExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
418
+ Tcl_Obj **resultPtrPtr);
419
+/* 142 */
420
+EXTERN int Tcl_ExprString(Tcl_Interp *interp, const char *expr);
421
+/* 143 */
422
+EXTERN void Tcl_Finalize(void);
423
+/* Slot 144 is reserved */
424
+/* 145 */
425
+EXTERN Tcl_HashEntry * Tcl_FirstHashEntry(Tcl_HashTable *tablePtr,
426
+ Tcl_HashSearch *searchPtr);
427
+/* 146 */
428
+EXTERN int Tcl_Flush(Tcl_Channel chan);
429
+/* Slot 147 is reserved */
430
+/* Slot 148 is reserved */
431
+/* 149 */
432
+EXTERN int TclGetAliasObj(Tcl_Interp *interp,
433
+ const char *childCmd,
434
+ Tcl_Interp **targetInterpPtr,
435
+ const char **targetCmdPtr, int *objcPtr,
436
+ Tcl_Obj ***objvPtr);
437
+/* 150 */
438
+EXTERN void * Tcl_GetAssocData(Tcl_Interp *interp,
439
+ const char *name,
440
+ Tcl_InterpDeleteProc **procPtr);
441
+/* 151 */
442
+EXTERN Tcl_Channel Tcl_GetChannel(Tcl_Interp *interp,
443
+ const char *chanName, int *modePtr);
444
+/* 152 */
445
+EXTERN Tcl_Size Tcl_GetChannelBufferSize(Tcl_Channel chan);
446
+/* 153 */
447
+EXTERN int Tcl_GetChannelHandle(Tcl_Channel chan, int direction,
448
+ void **handlePtr);
449
+/* 154 */
450
+EXTERN void * Tcl_GetChannelInstanceData(Tcl_Channel chan);
451
+/* 155 */
452
+EXTERN int Tcl_GetChannelMode(Tcl_Channel chan);
453
+/* 156 */
454
+EXTERN const char * Tcl_GetChannelName(Tcl_Channel chan);
455
+/* 157 */
456
+EXTERN int Tcl_GetChannelOption(Tcl_Interp *interp,
457
+ Tcl_Channel chan, const char *optionName,
458
+ Tcl_DString *dsPtr);
459
+/* 158 */
460
+EXTERN const Tcl_ChannelType * Tcl_GetChannelType(Tcl_Channel chan);
461
+/* 159 */
462
+EXTERN int Tcl_GetCommandInfo(Tcl_Interp *interp,
463
+ const char *cmdName, Tcl_CmdInfo *infoPtr);
464
+/* 160 */
465
+EXTERN const char * Tcl_GetCommandName(Tcl_Interp *interp,
466
+ Tcl_Command command);
467
+/* 161 */
468
+EXTERN int Tcl_GetErrno(void);
469
+/* 162 */
470
+EXTERN const char * Tcl_GetHostName(void);
471
+/* 163 */
472
+EXTERN int Tcl_GetInterpPath(Tcl_Interp *interp,
473
+ Tcl_Interp *childInterp);
474
+/* 164 */
475
+EXTERN Tcl_Interp * Tcl_GetParent(Tcl_Interp *interp);
476
+/* 165 */
477
+EXTERN const char * Tcl_GetNameOfExecutable(void);
478
+/* 166 */
479
+EXTERN Tcl_Obj * Tcl_GetObjResult(Tcl_Interp *interp);
480
+/* 167 */
481
+EXTERN int Tcl_GetOpenFile(Tcl_Interp *interp,
482
+ const char *chanID, int forWriting,
483
+ int checkUsage, void **filePtr);
484
+/* 168 */
485
+EXTERN Tcl_PathType Tcl_GetPathType(const char *path);
486
+/* 169 */
487
+EXTERN Tcl_Size Tcl_Gets(Tcl_Channel chan, Tcl_DString *dsPtr);
488
+/* 170 */
489
+EXTERN Tcl_Size Tcl_GetsObj(Tcl_Channel chan, Tcl_Obj *objPtr);
490
+/* 171 */
491
+EXTERN int Tcl_GetServiceMode(void);
492
+/* 172 */
493
+EXTERN Tcl_Interp * Tcl_GetChild(Tcl_Interp *interp, const char *name);
494
+/* 173 */
495
+EXTERN Tcl_Channel Tcl_GetStdChannel(int type);
496
+/* Slot 174 is reserved */
497
+/* Slot 175 is reserved */
498
+/* 176 */
499
+EXTERN const char * Tcl_GetVar2(Tcl_Interp *interp, const char *part1,
500
+ const char *part2, int flags);
501
+/* Slot 177 is reserved */
502
+/* Slot 178 is reserved */
503
+/* 179 */
504
+EXTERN int Tcl_HideCommand(Tcl_Interp *interp,
505
+ const char *cmdName,
506
+ const char *hiddenCmdToken);
507
+/* 180 */
508
+EXTERN int Tcl_Init(Tcl_Interp *interp);
509
+/* 181 */
510
+EXTERN void Tcl_InitHashTable(Tcl_HashTable *tablePtr,
511
+ int keyType);
512
+/* 182 */
513
+EXTERN int Tcl_InputBlocked(Tcl_Channel chan);
514
+/* 183 */
515
+EXTERN int Tcl_InputBuffered(Tcl_Channel chan);
516
+/* 184 */
517
+EXTERN int Tcl_InterpDeleted(Tcl_Interp *interp);
518
+/* 185 */
519
+EXTERN int Tcl_IsSafe(Tcl_Interp *interp);
520
+/* 186 */
521
+EXTERN char * Tcl_JoinPath(Tcl_Size argc, const char *const *argv,
522
+ Tcl_DString *resultPtr);
523
+/* 187 */
524
+EXTERN int Tcl_LinkVar(Tcl_Interp *interp, const char *varName,
525
+ void *addr, int type);
526
+/* Slot 188 is reserved */
527
+/* 189 */
528
+EXTERN Tcl_Channel Tcl_MakeFileChannel(void *handle, int mode);
529
+/* Slot 190 is reserved */
530
+/* 191 */
531
+EXTERN Tcl_Channel Tcl_MakeTcpClientChannel(void *tcpSocket);
532
+/* 192 */
533
+EXTERN char * Tcl_Merge(Tcl_Size argc, const char *const *argv);
534
+/* 193 */
535
+EXTERN Tcl_HashEntry * Tcl_NextHashEntry(Tcl_HashSearch *searchPtr);
536
+/* 194 */
537
+EXTERN void Tcl_NotifyChannel(Tcl_Channel channel, int mask);
538
+/* 195 */
539
+EXTERN Tcl_Obj * Tcl_ObjGetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
540
+ Tcl_Obj *part2Ptr, int flags);
541
+/* 196 */
542
+EXTERN Tcl_Obj * Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
543
+ Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr,
544
+ int flags);
545
+/* 197 */
546
+EXTERN Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp,
547
+ Tcl_Size argc, const char **argv, int flags);
548
+/* 198 */
549
+EXTERN Tcl_Channel Tcl_OpenFileChannel(Tcl_Interp *interp,
550
+ const char *fileName, const char *modeString,
551
+ int permissions);
552
+/* 199 */
553
+EXTERN Tcl_Channel Tcl_OpenTcpClient(Tcl_Interp *interp, int port,
554
+ const char *address, const char *myaddr,
555
+ int myport, int flags);
556
+/* 200 */
557
+EXTERN Tcl_Channel Tcl_OpenTcpServer(Tcl_Interp *interp, int port,
558
+ const char *host,
559
+ Tcl_TcpAcceptProc *acceptProc,
560
+ void *callbackData);
561
+/* 201 */
562
+EXTERN void Tcl_Preserve(void *data);
563
+/* 202 */
564
+EXTERN void Tcl_PrintDouble(Tcl_Interp *interp, double value,
565
+ char *dst);
566
+/* 203 */
567
+EXTERN int Tcl_PutEnv(const char *assignment);
568
+/* 204 */
569
+EXTERN const char * Tcl_PosixError(Tcl_Interp *interp);
570
+/* 205 */
571
+EXTERN void Tcl_QueueEvent(Tcl_Event *evPtr, int position);
572
+/* 206 */
573
+EXTERN Tcl_Size Tcl_Read(Tcl_Channel chan, char *bufPtr,
574
+ Tcl_Size toRead);
575
+/* 207 */
576
+EXTERN void Tcl_ReapDetachedProcs(void);
577
+/* 208 */
578
+EXTERN int Tcl_RecordAndEval(Tcl_Interp *interp,
579
+ const char *cmd, int flags);
580
+/* 209 */
581
+EXTERN int Tcl_RecordAndEvalObj(Tcl_Interp *interp,
582
+ Tcl_Obj *cmdPtr, int flags);
583
+/* 210 */
584
+EXTERN void Tcl_RegisterChannel(Tcl_Interp *interp,
585
+ Tcl_Channel chan);
586
+/* 211 */
587
+EXTERN void Tcl_RegisterObjType(const Tcl_ObjType *typePtr);
588
+/* 212 */
589
+EXTERN Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp,
590
+ const char *pattern);
591
+/* 213 */
592
+EXTERN int Tcl_RegExpExec(Tcl_Interp *interp, Tcl_RegExp regexp,
593
+ const char *text, const char *start);
594
+/* 214 */
595
+EXTERN int Tcl_RegExpMatch(Tcl_Interp *interp, const char *text,
596
+ const char *pattern);
597
+/* 215 */
598
+EXTERN void Tcl_RegExpRange(Tcl_RegExp regexp, Tcl_Size index,
599
+ const char **startPtr, const char **endPtr);
600
+/* 216 */
601
+EXTERN void Tcl_Release(void *clientData);
602
+/* 217 */
603
+EXTERN void Tcl_ResetResult(Tcl_Interp *interp);
604
+/* 218 */
605
+EXTERN Tcl_Size Tcl_ScanElement(const char *src, int *flagPtr);
606
+/* 219 */
607
+EXTERN Tcl_Size Tcl_ScanCountedElement(const char *src,
608
+ Tcl_Size length, int *flagPtr);
609
+/* Slot 220 is reserved */
610
+/* 221 */
611
+EXTERN int Tcl_ServiceAll(void);
612
+/* 222 */
613
+EXTERN int Tcl_ServiceEvent(int flags);
614
+/* 223 */
615
+EXTERN void Tcl_SetAssocData(Tcl_Interp *interp,
616
+ const char *name, Tcl_InterpDeleteProc *proc,
617
+ void *clientData);
618
+/* 224 */
619
+EXTERN void Tcl_SetChannelBufferSize(Tcl_Channel chan,
620
+ Tcl_Size sz);
621
+/* 225 */
622
+EXTERN int Tcl_SetChannelOption(Tcl_Interp *interp,
623
+ Tcl_Channel chan, const char *optionName,
624
+ const char *newValue);
625
+/* 226 */
626
+EXTERN int Tcl_SetCommandInfo(Tcl_Interp *interp,
627
+ const char *cmdName,
628
+ const Tcl_CmdInfo *infoPtr);
629
+/* 227 */
630
+EXTERN void Tcl_SetErrno(int err);
631
+/* 228 */
632
+EXTERN void Tcl_SetErrorCode(Tcl_Interp *interp, ...);
633
+/* 229 */
634
+EXTERN void Tcl_SetMaxBlockTime(const Tcl_Time *timePtr);
635
+/* Slot 230 is reserved */
636
+/* 231 */
637
+EXTERN Tcl_Size Tcl_SetRecursionLimit(Tcl_Interp *interp,
638
+ Tcl_Size depth);
639
+/* Slot 232 is reserved */
640
+/* 233 */
641
+EXTERN int Tcl_SetServiceMode(int mode);
642
+/* 234 */
643
+EXTERN void Tcl_SetObjErrorCode(Tcl_Interp *interp,
644
+ Tcl_Obj *errorObjPtr);
645
+/* 235 */
646
+EXTERN void Tcl_SetObjResult(Tcl_Interp *interp,
647
+ Tcl_Obj *resultObjPtr);
648
+/* 236 */
649
+EXTERN void Tcl_SetStdChannel(Tcl_Channel channel, int type);
650
+/* Slot 237 is reserved */
651
+/* 238 */
652
+EXTERN const char * Tcl_SetVar2(Tcl_Interp *interp, const char *part1,
653
+ const char *part2, const char *newValue,
654
+ int flags);
655
+/* 239 */
656
+EXTERN const char * Tcl_SignalId(int sig);
657
+/* 240 */
658
+EXTERN const char * Tcl_SignalMsg(int sig);
659
+/* 241 */
660
+EXTERN void Tcl_SourceRCFile(Tcl_Interp *interp);
661
+/* 242 */
662
+EXTERN int TclSplitList(Tcl_Interp *interp, const char *listStr,
663
+ void *argcPtr, const char ***argvPtr);
664
+/* 243 */
665
+EXTERN void TclSplitPath(const char *path, void *argcPtr,
666
+ const char ***argvPtr);
667
+/* Slot 244 is reserved */
668
+/* Slot 245 is reserved */
669
+/* Slot 246 is reserved */
670
+/* Slot 247 is reserved */
671
+/* 248 */
672
+EXTERN int Tcl_TraceVar2(Tcl_Interp *interp, const char *part1,
673
+ const char *part2, int flags,
674
+ Tcl_VarTraceProc *proc, void *clientData);
675
+/* 249 */
676
+EXTERN char * Tcl_TranslateFileName(Tcl_Interp *interp,
677
+ const char *name, Tcl_DString *bufferPtr);
678
+/* 250 */
679
+EXTERN Tcl_Size Tcl_Ungets(Tcl_Channel chan, const char *str,
680
+ Tcl_Size len, int atHead);
681
+/* 251 */
682
+EXTERN void Tcl_UnlinkVar(Tcl_Interp *interp,
683
+ const char *varName);
684
+/* 252 */
685
+EXTERN int Tcl_UnregisterChannel(Tcl_Interp *interp,
686
+ Tcl_Channel chan);
687
+/* Slot 253 is reserved */
688
+/* 254 */
689
+EXTERN int Tcl_UnsetVar2(Tcl_Interp *interp, const char *part1,
690
+ const char *part2, int flags);
691
+/* Slot 255 is reserved */
692
+/* 256 */
693
+EXTERN void Tcl_UntraceVar2(Tcl_Interp *interp,
694
+ const char *part1, const char *part2,
695
+ int flags, Tcl_VarTraceProc *proc,
696
+ void *clientData);
697
+/* 257 */
698
+EXTERN void Tcl_UpdateLinkedVar(Tcl_Interp *interp,
699
+ const char *varName);
700
+/* Slot 258 is reserved */
701
+/* 259 */
702
+EXTERN int Tcl_UpVar2(Tcl_Interp *interp, const char *frameName,
703
+ const char *part1, const char *part2,
704
+ const char *localName, int flags);
705
+/* 260 */
706
+EXTERN int Tcl_VarEval(Tcl_Interp *interp, ...);
707
+/* Slot 261 is reserved */
708
+/* 262 */
709
+EXTERN void * Tcl_VarTraceInfo2(Tcl_Interp *interp,
710
+ const char *part1, const char *part2,
711
+ int flags, Tcl_VarTraceProc *procPtr,
712
+ void *prevClientData);
713
+/* 263 */
714
+EXTERN Tcl_Size Tcl_Write(Tcl_Channel chan, const char *s,
715
+ Tcl_Size slen);
716
+/* 264 */
717
+EXTERN void Tcl_WrongNumArgs(Tcl_Interp *interp, Tcl_Size objc,
718
+ Tcl_Obj *const objv[], const char *message);
719
+/* 265 */
720
+EXTERN int Tcl_DumpActiveMemory(const char *fileName);
721
+/* 266 */
722
+EXTERN void Tcl_ValidateAllMemory(const char *file, int line);
723
+/* Slot 267 is reserved */
724
+/* Slot 268 is reserved */
725
+/* 269 */
726
+EXTERN char * Tcl_HashStats(Tcl_HashTable *tablePtr);
727
+/* 270 */
728
+EXTERN const char * Tcl_ParseVar(Tcl_Interp *interp, const char *start,
729
+ const char **termPtr);
730
+/* Slot 271 is reserved */
731
+/* 272 */
732
+EXTERN const char * Tcl_PkgPresentEx(Tcl_Interp *interp,
733
+ const char *name, const char *version,
734
+ int exact, void *clientDataPtr);
735
+/* Slot 273 is reserved */
736
+/* Slot 274 is reserved */
737
+/* Slot 275 is reserved */
738
+/* Slot 276 is reserved */
739
+/* 277 */
740
+EXTERN Tcl_Pid Tcl_WaitPid(Tcl_Pid pid, int *statPtr, int options);
741
+/* Slot 278 is reserved */
742
+/* 279 */
743
+EXTERN void Tcl_GetVersion(int *major, int *minor,
744
+ int *patchLevel, int *type);
745
+/* 280 */
746
+EXTERN void Tcl_InitMemory(Tcl_Interp *interp);
747
+/* 281 */
748
+EXTERN Tcl_Channel Tcl_StackChannel(Tcl_Interp *interp,
749
+ const Tcl_ChannelType *typePtr,
750
+ void *instanceData, int mask,
751
+ Tcl_Channel prevChan);
752
+/* 282 */
753
+EXTERN int Tcl_UnstackChannel(Tcl_Interp *interp,
754
+ Tcl_Channel chan);
755
+/* 283 */
756
+EXTERN Tcl_Channel Tcl_GetStackedChannel(Tcl_Channel chan);
757
+/* 284 */
758
+EXTERN void Tcl_SetMainLoop(Tcl_MainLoopProc *proc);
759
+/* 285 */
760
+EXTERN int Tcl_GetAliasObj(Tcl_Interp *interp,
761
+ const char *childCmd,
762
+ Tcl_Interp **targetInterpPtr,
763
+ const char **targetCmdPtr, Tcl_Size *objcPtr,
764
+ Tcl_Obj ***objvPtr);
765
+/* 286 */
766
+EXTERN void Tcl_AppendObjToObj(Tcl_Obj *objPtr,
767
+ Tcl_Obj *appendObjPtr);
768
+/* 287 */
769
+EXTERN Tcl_Encoding Tcl_CreateEncoding(const Tcl_EncodingType *typePtr);
770
+/* 288 */
771
+EXTERN void Tcl_CreateThreadExitHandler(Tcl_ExitProc *proc,
772
+ void *clientData);
773
+/* 289 */
774
+EXTERN void Tcl_DeleteThreadExitHandler(Tcl_ExitProc *proc,
775
+ void *clientData);
776
+/* Slot 290 is reserved */
777
+/* 291 */
778
+EXTERN int Tcl_EvalEx(Tcl_Interp *interp, const char *script,
779
+ Tcl_Size numBytes, int flags);
780
+/* 292 */
781
+EXTERN int Tcl_EvalObjv(Tcl_Interp *interp, Tcl_Size objc,
782
+ Tcl_Obj *const objv[], int flags);
783
+/* 293 */
784
+EXTERN int Tcl_EvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr,
785
+ int flags);
786
+/* 294 */
787
+EXTERN TCL_NORETURN void Tcl_ExitThread(int status);
788
+/* 295 */
789
+EXTERN int Tcl_ExternalToUtf(Tcl_Interp *interp,
790
+ Tcl_Encoding encoding, const char *src,
791
+ Tcl_Size srcLen, int flags,
792
+ Tcl_EncodingState *statePtr, char *dst,
793
+ Tcl_Size dstLen, int *srcReadPtr,
794
+ int *dstWrotePtr, int *dstCharsPtr);
795
+/* 296 */
796
+EXTERN char * Tcl_ExternalToUtfDString(Tcl_Encoding encoding,
797
+ const char *src, Tcl_Size srcLen,
798
+ Tcl_DString *dsPtr);
799
+/* 297 */
800
+EXTERN void Tcl_FinalizeThread(void);
801
+/* 298 */
802
+EXTERN void Tcl_FinalizeNotifier(void *clientData);
803
+/* 299 */
804
+EXTERN void Tcl_FreeEncoding(Tcl_Encoding encoding);
805
+/* 300 */
806
+EXTERN Tcl_ThreadId Tcl_GetCurrentThread(void);
807
+/* 301 */
808
+EXTERN Tcl_Encoding Tcl_GetEncoding(Tcl_Interp *interp, const char *name);
809
+/* 302 */
810
+EXTERN const char * Tcl_GetEncodingName(Tcl_Encoding encoding);
811
+/* 303 */
812
+EXTERN void Tcl_GetEncodingNames(Tcl_Interp *interp);
813
+/* 304 */
814
+EXTERN int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp,
815
+ Tcl_Obj *objPtr, const void *tablePtr,
816
+ Tcl_Size offset, const char *msg, int flags,
817
+ void *indexPtr);
818
+/* 305 */
819
+EXTERN void * Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr,
820
+ Tcl_Size size);
821
+/* 306 */
822
+EXTERN Tcl_Obj * Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1,
823
+ const char *part2, int flags);
824
+/* 307 */
825
+EXTERN void * Tcl_InitNotifier(void);
826
+/* 308 */
827
+EXTERN void Tcl_MutexLock(Tcl_Mutex *mutexPtr);
828
+/* 309 */
829
+EXTERN void Tcl_MutexUnlock(Tcl_Mutex *mutexPtr);
830
+/* 310 */
831
+EXTERN void Tcl_ConditionNotify(Tcl_Condition *condPtr);
832
+/* 311 */
833
+EXTERN void Tcl_ConditionWait(Tcl_Condition *condPtr,
834
+ Tcl_Mutex *mutexPtr, const Tcl_Time *timePtr);
835
+/* 312 */
836
+EXTERN Tcl_Size TclNumUtfChars(const char *src, Tcl_Size length);
837
+/* 313 */
838
+EXTERN Tcl_Size Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr,
839
+ Tcl_Size charsToRead, int appendFlag);
840
+/* Slot 314 is reserved */
841
+/* Slot 315 is reserved */
842
+/* 316 */
843
+EXTERN int Tcl_SetSystemEncoding(Tcl_Interp *interp,
844
+ const char *name);
845
+/* 317 */
846
+EXTERN Tcl_Obj * Tcl_SetVar2Ex(Tcl_Interp *interp, const char *part1,
847
+ const char *part2, Tcl_Obj *newValuePtr,
848
+ int flags);
849
+/* 318 */
850
+EXTERN void Tcl_ThreadAlert(Tcl_ThreadId threadId);
851
+/* 319 */
852
+EXTERN void Tcl_ThreadQueueEvent(Tcl_ThreadId threadId,
853
+ Tcl_Event *evPtr, int position);
854
+/* 320 */
855
+EXTERN int Tcl_UniCharAtIndex(const char *src, Tcl_Size index);
856
+/* 321 */
857
+EXTERN int Tcl_UniCharToLower(int ch);
858
+/* 322 */
859
+EXTERN int Tcl_UniCharToTitle(int ch);
860
+/* 323 */
861
+EXTERN int Tcl_UniCharToUpper(int ch);
862
+/* 324 */
863
+EXTERN Tcl_Size Tcl_UniCharToUtf(int ch, char *buf);
864
+/* 325 */
865
+EXTERN const char * TclUtfAtIndex(const char *src, Tcl_Size index);
866
+/* 326 */
867
+EXTERN int TclUtfCharComplete(const char *src, Tcl_Size length);
868
+/* 327 */
869
+EXTERN Tcl_Size Tcl_UtfBackslash(const char *src, int *readPtr,
870
+ char *dst);
871
+/* 328 */
872
+EXTERN const char * Tcl_UtfFindFirst(const char *src, int ch);
873
+/* 329 */
874
+EXTERN const char * Tcl_UtfFindLast(const char *src, int ch);
875
+/* 330 */
876
+EXTERN const char * TclUtfNext(const char *src);
877
+/* 331 */
878
+EXTERN const char * TclUtfPrev(const char *src, const char *start);
879
+/* 332 */
880
+EXTERN int Tcl_UtfToExternal(Tcl_Interp *interp,
881
+ Tcl_Encoding encoding, const char *src,
882
+ Tcl_Size srcLen, int flags,
883
+ Tcl_EncodingState *statePtr, char *dst,
884
+ Tcl_Size dstLen, int *srcReadPtr,
885
+ int *dstWrotePtr, int *dstCharsPtr);
886
+/* 333 */
887
+EXTERN char * Tcl_UtfToExternalDString(Tcl_Encoding encoding,
888
+ const char *src, Tcl_Size srcLen,
889
+ Tcl_DString *dsPtr);
890
+/* 334 */
891
+EXTERN Tcl_Size Tcl_UtfToLower(char *src);
892
+/* 335 */
893
+EXTERN Tcl_Size Tcl_UtfToTitle(char *src);
894
+/* 336 */
895
+EXTERN Tcl_Size Tcl_UtfToChar16(const char *src,
896
+ unsigned short *chPtr);
897
+/* 337 */
898
+EXTERN Tcl_Size Tcl_UtfToUpper(char *src);
899
+/* 338 */
900
+EXTERN Tcl_Size Tcl_WriteChars(Tcl_Channel chan, const char *src,
901
+ Tcl_Size srcLen);
902
+/* 339 */
903
+EXTERN Tcl_Size Tcl_WriteObj(Tcl_Channel chan, Tcl_Obj *objPtr);
904
+/* 340 */
905
+EXTERN char * Tcl_GetString(Tcl_Obj *objPtr);
906
+/* Slot 341 is reserved */
907
+/* Slot 342 is reserved */
908
+/* 343 */
909
+EXTERN void Tcl_AlertNotifier(void *clientData);
910
+/* 344 */
911
+EXTERN void Tcl_ServiceModeHook(int mode);
912
+/* 345 */
913
+EXTERN int Tcl_UniCharIsAlnum(int ch);
914
+/* 346 */
915
+EXTERN int Tcl_UniCharIsAlpha(int ch);
916
+/* 347 */
917
+EXTERN int Tcl_UniCharIsDigit(int ch);
918
+/* 348 */
919
+EXTERN int Tcl_UniCharIsLower(int ch);
920
+/* 349 */
921
+EXTERN int Tcl_UniCharIsSpace(int ch);
922
+/* 350 */
923
+EXTERN int Tcl_UniCharIsUpper(int ch);
924
+/* 351 */
925
+EXTERN int Tcl_UniCharIsWordChar(int ch);
926
+/* 352 */
927
+EXTERN Tcl_Size Tcl_Char16Len(const unsigned short *uniStr);
928
+/* Slot 353 is reserved */
929
+/* 354 */
930
+EXTERN char * Tcl_Char16ToUtfDString(const unsigned short *uniStr,
931
+ Tcl_Size uniLength, Tcl_DString *dsPtr);
932
+/* 355 */
933
+EXTERN unsigned short * Tcl_UtfToChar16DString(const char *src,
934
+ Tcl_Size length, Tcl_DString *dsPtr);
935
+/* 356 */
936
+EXTERN Tcl_RegExp Tcl_GetRegExpFromObj(Tcl_Interp *interp,
937
+ Tcl_Obj *patObj, int flags);
938
+/* Slot 357 is reserved */
939
+/* 358 */
940
+EXTERN void Tcl_FreeParse(Tcl_Parse *parsePtr);
941
+/* 359 */
942
+EXTERN void Tcl_LogCommandInfo(Tcl_Interp *interp,
943
+ const char *script, const char *command,
944
+ Tcl_Size length);
945
+/* 360 */
946
+EXTERN int Tcl_ParseBraces(Tcl_Interp *interp,
947
+ const char *start, Tcl_Size numBytes,
948
+ Tcl_Parse *parsePtr, int append,
949
+ const char **termPtr);
950
+/* 361 */
951
+EXTERN int Tcl_ParseCommand(Tcl_Interp *interp,
952
+ const char *start, Tcl_Size numBytes,
953
+ int nested, Tcl_Parse *parsePtr);
954
+/* 362 */
955
+EXTERN int Tcl_ParseExpr(Tcl_Interp *interp, const char *start,
956
+ Tcl_Size numBytes, Tcl_Parse *parsePtr);
957
+/* 363 */
958
+EXTERN int Tcl_ParseQuotedString(Tcl_Interp *interp,
959
+ const char *start, Tcl_Size numBytes,
960
+ Tcl_Parse *parsePtr, int append,
961
+ const char **termPtr);
962
+/* 364 */
963
+EXTERN int Tcl_ParseVarName(Tcl_Interp *interp,
964
+ const char *start, Tcl_Size numBytes,
965
+ Tcl_Parse *parsePtr, int append);
966
+/* 365 */
967
+EXTERN char * Tcl_GetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr);
968
+/* 366 */
969
+EXTERN int Tcl_Chdir(const char *dirName);
970
+/* 367 */
971
+EXTERN int Tcl_Access(const char *path, int mode);
972
+/* 368 */
973
+EXTERN int Tcl_Stat(const char *path, struct stat *bufPtr);
974
+/* 369 */
975
+EXTERN int TclUtfNcmp(const char *s1, const char *s2, size_t n);
976
+/* 370 */
977
+EXTERN int TclUtfNcasecmp(const char *s1, const char *s2,
978
+ size_t n);
979
+/* 371 */
980
+EXTERN int Tcl_StringCaseMatch(const char *str,
981
+ const char *pattern, int nocase);
982
+/* 372 */
983
+EXTERN int Tcl_UniCharIsControl(int ch);
984
+/* 373 */
985
+EXTERN int Tcl_UniCharIsGraph(int ch);
986
+/* 374 */
987
+EXTERN int Tcl_UniCharIsPrint(int ch);
988
+/* 375 */
989
+EXTERN int Tcl_UniCharIsPunct(int ch);
990
+/* 376 */
991
+EXTERN int Tcl_RegExpExecObj(Tcl_Interp *interp,
992
+ Tcl_RegExp regexp, Tcl_Obj *textObj,
993
+ Tcl_Size offset, Tcl_Size nmatches,
994
+ int flags);
995
+/* 377 */
996
+EXTERN void Tcl_RegExpGetInfo(Tcl_RegExp regexp,
997
+ Tcl_RegExpInfo *infoPtr);
998
+/* 378 */
999
+EXTERN Tcl_Obj * Tcl_NewUnicodeObj(const Tcl_UniChar *unicode,
1000
+ Tcl_Size numChars);
1001
+/* 379 */
1002
+EXTERN void Tcl_SetUnicodeObj(Tcl_Obj *objPtr,
1003
+ const Tcl_UniChar *unicode,
1004
+ Tcl_Size numChars);
1005
+/* 380 */
1006
+EXTERN Tcl_Size TclGetCharLength(Tcl_Obj *objPtr);
1007
+/* 381 */
1008
+EXTERN int TclGetUniChar(Tcl_Obj *objPtr, Tcl_Size index);
1009
+/* Slot 382 is reserved */
1010
+/* 383 */
1011
+EXTERN Tcl_Obj * TclGetRange(Tcl_Obj *objPtr, Tcl_Size first,
1012
+ Tcl_Size last);
1013
+/* 384 */
1014
+EXTERN void Tcl_AppendUnicodeToObj(Tcl_Obj *objPtr,
1015
+ const Tcl_UniChar *unicode, Tcl_Size length);
1016
+/* 385 */
1017
+EXTERN int Tcl_RegExpMatchObj(Tcl_Interp *interp,
1018
+ Tcl_Obj *textObj, Tcl_Obj *patternObj);
1019
+/* 386 */
1020
+EXTERN void Tcl_SetNotifier(
1021
+ const Tcl_NotifierProcs *notifierProcPtr);
1022
+/* 387 */
1023
+EXTERN Tcl_Mutex * Tcl_GetAllocMutex(void);
1024
+/* 388 */
1025
+EXTERN int Tcl_GetChannelNames(Tcl_Interp *interp);
1026
+/* 389 */
1027
+EXTERN int Tcl_GetChannelNamesEx(Tcl_Interp *interp,
1028
+ const char *pattern);
1029
+/* 390 */
1030
+EXTERN int Tcl_ProcObjCmd(void *clientData, Tcl_Interp *interp,
1031
+ Tcl_Size objc, Tcl_Obj *const objv[]);
1032
+/* 391 */
1033
+EXTERN void Tcl_ConditionFinalize(Tcl_Condition *condPtr);
1034
+/* 392 */
1035
+EXTERN void Tcl_MutexFinalize(Tcl_Mutex *mutex);
1036
+/* 393 */
1037
+EXTERN int Tcl_CreateThread(Tcl_ThreadId *idPtr,
1038
+ Tcl_ThreadCreateProc *proc, void *clientData,
1039
+ TCL_HASH_TYPE stackSize, int flags);
1040
+/* 394 */
1041
+EXTERN Tcl_Size Tcl_ReadRaw(Tcl_Channel chan, char *dst,
1042
+ Tcl_Size bytesToRead);
1043
+/* 395 */
1044
+EXTERN Tcl_Size Tcl_WriteRaw(Tcl_Channel chan, const char *src,
1045
+ Tcl_Size srcLen);
1046
+/* 396 */
1047
+EXTERN Tcl_Channel Tcl_GetTopChannel(Tcl_Channel chan);
1048
+/* 397 */
1049
+EXTERN int Tcl_ChannelBuffered(Tcl_Channel chan);
1050
+/* 398 */
1051
+EXTERN const char * Tcl_ChannelName(const Tcl_ChannelType *chanTypePtr);
1052
+/* 399 */
1053
+EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion(
1054
+ const Tcl_ChannelType *chanTypePtr);
1055
+/* 400 */
1056
+EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc(
1057
+ const Tcl_ChannelType *chanTypePtr);
1058
+/* Slot 401 is reserved */
1059
+/* 402 */
1060
+EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc(
1061
+ const Tcl_ChannelType *chanTypePtr);
1062
+/* 403 */
1063
+EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc(
1064
+ const Tcl_ChannelType *chanTypePtr);
1065
+/* 404 */
1066
+EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc(
1067
+ const Tcl_ChannelType *chanTypePtr);
1068
+/* Slot 405 is reserved */
1069
+/* 406 */
1070
+EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc(
1071
+ const Tcl_ChannelType *chanTypePtr);
1072
+/* 407 */
1073
+EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc(
1074
+ const Tcl_ChannelType *chanTypePtr);
1075
+/* 408 */
1076
+EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc(
1077
+ const Tcl_ChannelType *chanTypePtr);
1078
+/* 409 */
1079
+EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc(
1080
+ const Tcl_ChannelType *chanTypePtr);
1081
+/* 410 */
1082
+EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc(
1083
+ const Tcl_ChannelType *chanTypePtr);
1084
+/* 411 */
1085
+EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc(
1086
+ const Tcl_ChannelType *chanTypePtr);
1087
+/* 412 */
1088
+EXTERN int Tcl_JoinThread(Tcl_ThreadId threadId, int *result);
1089
+/* 413 */
1090
+EXTERN int Tcl_IsChannelShared(Tcl_Channel channel);
1091
+/* 414 */
1092
+EXTERN int Tcl_IsChannelRegistered(Tcl_Interp *interp,
1093
+ Tcl_Channel channel);
1094
+/* 415 */
1095
+EXTERN void Tcl_CutChannel(Tcl_Channel channel);
1096
+/* 416 */
1097
+EXTERN void Tcl_SpliceChannel(Tcl_Channel channel);
1098
+/* 417 */
1099
+EXTERN void Tcl_ClearChannelHandlers(Tcl_Channel channel);
1100
+/* 418 */
1101
+EXTERN int Tcl_IsChannelExisting(const char *channelName);
1102
+/* Slot 419 is reserved */
1103
+/* Slot 420 is reserved */
1104
+/* Slot 421 is reserved */
1105
+/* 422 */
1106
+EXTERN Tcl_HashEntry * Tcl_CreateHashEntry(Tcl_HashTable *tablePtr,
1107
+ const void *key, int *newPtr);
1108
+/* 423 */
1109
+EXTERN void Tcl_InitCustomHashTable(Tcl_HashTable *tablePtr,
1110
+ int keyType, const Tcl_HashKeyType *typePtr);
1111
+/* 424 */
1112
+EXTERN void Tcl_InitObjHashTable(Tcl_HashTable *tablePtr);
1113
+/* 425 */
1114
+EXTERN void * Tcl_CommandTraceInfo(Tcl_Interp *interp,
1115
+ const char *varName, int flags,
1116
+ Tcl_CommandTraceProc *procPtr,
1117
+ void *prevClientData);
1118
+/* 426 */
1119
+EXTERN int Tcl_TraceCommand(Tcl_Interp *interp,
1120
+ const char *varName, int flags,
1121
+ Tcl_CommandTraceProc *proc, void *clientData);
1122
+/* 427 */
1123
+EXTERN void Tcl_UntraceCommand(Tcl_Interp *interp,
1124
+ const char *varName, int flags,
1125
+ Tcl_CommandTraceProc *proc, void *clientData);
1126
+/* 428 */
1127
+EXTERN void * Tcl_AttemptAlloc(TCL_HASH_TYPE size);
1128
+/* 429 */
1129
+EXTERN void * Tcl_AttemptDbCkalloc(TCL_HASH_TYPE size,
1130
+ const char *file, int line);
1131
+/* 430 */
1132
+EXTERN void * Tcl_AttemptRealloc(void *ptr, TCL_HASH_TYPE size);
1133
+/* 431 */
1134
+EXTERN void * Tcl_AttemptDbCkrealloc(void *ptr, TCL_HASH_TYPE size,
1135
+ const char *file, int line);
1136
+/* 432 */
1137
+EXTERN int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr,
1138
+ Tcl_Size length);
1139
+/* 433 */
1140
+EXTERN Tcl_ThreadId Tcl_GetChannelThread(Tcl_Channel channel);
1141
+/* 434 */
1142
+EXTERN Tcl_UniChar * TclGetUnicodeFromObj(Tcl_Obj *objPtr,
1143
+ void *lengthPtr);
1144
+/* Slot 435 is reserved */
1145
+/* Slot 436 is reserved */
1146
+/* 437 */
1147
+EXTERN Tcl_Obj * Tcl_SubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
1148
+ int flags);
1149
+/* 438 */
1150
+EXTERN int Tcl_DetachChannel(Tcl_Interp *interp,
1151
+ Tcl_Channel channel);
1152
+/* 439 */
1153
+EXTERN int Tcl_IsStandardChannel(Tcl_Channel channel);
1154
+/* 440 */
1155
+EXTERN int Tcl_FSCopyFile(Tcl_Obj *srcPathPtr,
1156
+ Tcl_Obj *destPathPtr);
1157
+/* 441 */
1158
+EXTERN int Tcl_FSCopyDirectory(Tcl_Obj *srcPathPtr,
1159
+ Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr);
1160
+/* 442 */
1161
+EXTERN int Tcl_FSCreateDirectory(Tcl_Obj *pathPtr);
1162
+/* 443 */
1163
+EXTERN int Tcl_FSDeleteFile(Tcl_Obj *pathPtr);
1164
+/* 444 */
1165
+EXTERN int Tcl_FSLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr,
1166
+ const char *sym1, const char *sym2,
1167
+ Tcl_LibraryInitProc **proc1Ptr,
1168
+ Tcl_LibraryInitProc **proc2Ptr,
1169
+ Tcl_LoadHandle *handlePtr,
1170
+ Tcl_FSUnloadFileProc **unloadProcPtr);
1171
+/* 445 */
1172
+EXTERN int Tcl_FSMatchInDirectory(Tcl_Interp *interp,
1173
+ Tcl_Obj *result, Tcl_Obj *pathPtr,
1174
+ const char *pattern, Tcl_GlobTypeData *types);
1175
+/* 446 */
1176
+EXTERN Tcl_Obj * Tcl_FSLink(Tcl_Obj *pathPtr, Tcl_Obj *toPtr,
1177
+ int linkAction);
1178
+/* 447 */
1179
+EXTERN int Tcl_FSRemoveDirectory(Tcl_Obj *pathPtr,
1180
+ int recursive, Tcl_Obj **errorPtr);
1181
+/* 448 */
1182
+EXTERN int Tcl_FSRenameFile(Tcl_Obj *srcPathPtr,
1183
+ Tcl_Obj *destPathPtr);
1184
+/* 449 */
1185
+EXTERN int Tcl_FSLstat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1186
+/* 450 */
1187
+EXTERN int Tcl_FSUtime(Tcl_Obj *pathPtr, struct utimbuf *tval);
1188
+/* 451 */
1189
+EXTERN int Tcl_FSFileAttrsGet(Tcl_Interp *interp, int index,
1190
+ Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef);
1191
+/* 452 */
1192
+EXTERN int Tcl_FSFileAttrsSet(Tcl_Interp *interp, int index,
1193
+ Tcl_Obj *pathPtr, Tcl_Obj *objPtr);
1194
+/* 453 */
1195
+EXTERN const char *const * Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr,
1196
+ Tcl_Obj **objPtrRef);
1197
+/* 454 */
1198
+EXTERN int Tcl_FSStat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
1199
+/* 455 */
1200
+EXTERN int Tcl_FSAccess(Tcl_Obj *pathPtr, int mode);
1201
+/* 456 */
1202
+EXTERN Tcl_Channel Tcl_FSOpenFileChannel(Tcl_Interp *interp,
1203
+ Tcl_Obj *pathPtr, const char *modeString,
1204
+ int permissions);
1205
+/* 457 */
1206
+EXTERN Tcl_Obj * Tcl_FSGetCwd(Tcl_Interp *interp);
1207
+/* 458 */
1208
+EXTERN int Tcl_FSChdir(Tcl_Obj *pathPtr);
1209
+/* 459 */
1210
+EXTERN int Tcl_FSConvertToPathType(Tcl_Interp *interp,
1211
+ Tcl_Obj *pathPtr);
1212
+/* 460 */
1213
+EXTERN Tcl_Obj * Tcl_FSJoinPath(Tcl_Obj *listObj, Tcl_Size elements);
1214
+/* 461 */
1215
+EXTERN Tcl_Obj * TclFSSplitPath(Tcl_Obj *pathPtr, void *lenPtr);
1216
+/* 462 */
1217
+EXTERN int Tcl_FSEqualPaths(Tcl_Obj *firstPtr,
1218
+ Tcl_Obj *secondPtr);
1219
+/* 463 */
1220
+EXTERN Tcl_Obj * Tcl_FSGetNormalizedPath(Tcl_Interp *interp,
1221
+ Tcl_Obj *pathPtr);
1222
+/* 464 */
1223
+EXTERN Tcl_Obj * Tcl_FSJoinToPath(Tcl_Obj *pathPtr, Tcl_Size objc,
1224
+ Tcl_Obj *const objv[]);
1225
+/* 465 */
1226
+EXTERN void * Tcl_FSGetInternalRep(Tcl_Obj *pathPtr,
1227
+ const Tcl_Filesystem *fsPtr);
1228
+/* 466 */
1229
+EXTERN Tcl_Obj * Tcl_FSGetTranslatedPath(Tcl_Interp *interp,
1230
+ Tcl_Obj *pathPtr);
1231
+/* 467 */
1232
+EXTERN int Tcl_FSEvalFile(Tcl_Interp *interp, Tcl_Obj *fileName);
1233
+/* 468 */
1234
+EXTERN Tcl_Obj * Tcl_FSNewNativePath(
1235
+ const Tcl_Filesystem *fromFilesystem,
1236
+ void *clientData);
1237
+/* 469 */
1238
+EXTERN const void * Tcl_FSGetNativePath(Tcl_Obj *pathPtr);
1239
+/* 470 */
1240
+EXTERN Tcl_Obj * Tcl_FSFileSystemInfo(Tcl_Obj *pathPtr);
1241
+/* 471 */
1242
+EXTERN Tcl_Obj * Tcl_FSPathSeparator(Tcl_Obj *pathPtr);
1243
+/* 472 */
1244
+EXTERN Tcl_Obj * Tcl_FSListVolumes(void);
1245
+/* 473 */
1246
+EXTERN int Tcl_FSRegister(void *clientData,
1247
+ const Tcl_Filesystem *fsPtr);
1248
+/* 474 */
1249
+EXTERN int Tcl_FSUnregister(const Tcl_Filesystem *fsPtr);
1250
+/* 475 */
1251
+EXTERN void * Tcl_FSData(const Tcl_Filesystem *fsPtr);
1252
+/* 476 */
1253
+EXTERN const char * Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp,
1254
+ Tcl_Obj *pathPtr);
1255
+/* 477 */
1256
+EXTERN const Tcl_Filesystem * Tcl_FSGetFileSystemForPath(Tcl_Obj *pathPtr);
1257
+/* 478 */
1258
+EXTERN Tcl_PathType Tcl_FSGetPathType(Tcl_Obj *pathPtr);
1259
+/* 479 */
1260
+EXTERN int Tcl_OutputBuffered(Tcl_Channel chan);
1261
+/* 480 */
1262
+EXTERN void Tcl_FSMountsChanged(const Tcl_Filesystem *fsPtr);
1263
+/* 481 */
1264
+EXTERN int Tcl_EvalTokensStandard(Tcl_Interp *interp,
1265
+ Tcl_Token *tokenPtr, Tcl_Size count);
1266
+/* 482 */
1267
+EXTERN void Tcl_GetTime(Tcl_Time *timeBuf);
1268
+/* 483 */
1269
+EXTERN Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp *interp,
1270
+ Tcl_Size level, int flags,
1271
+ Tcl_CmdObjTraceProc *objProc,
1272
+ void *clientData,
1273
+ Tcl_CmdObjTraceDeleteProc *delProc);
1274
+/* 484 */
1275
+EXTERN int Tcl_GetCommandInfoFromToken(Tcl_Command token,
1276
+ Tcl_CmdInfo *infoPtr);
1277
+/* 485 */
1278
+EXTERN int Tcl_SetCommandInfoFromToken(Tcl_Command token,
1279
+ const Tcl_CmdInfo *infoPtr);
1280
+/* 486 */
1281
+EXTERN Tcl_Obj * Tcl_DbNewWideIntObj(Tcl_WideInt wideValue,
1282
+ const char *file, int line);
1283
+/* 487 */
1284
+EXTERN int Tcl_GetWideIntFromObj(Tcl_Interp *interp,
1285
+ Tcl_Obj *objPtr, Tcl_WideInt *widePtr);
1286
+/* 488 */
1287
+EXTERN Tcl_Obj * Tcl_NewWideIntObj(Tcl_WideInt wideValue);
1288
+/* 489 */
1289
+EXTERN void Tcl_SetWideIntObj(Tcl_Obj *objPtr,
1290
+ Tcl_WideInt wideValue);
1291
+/* 490 */
1292
+EXTERN Tcl_StatBuf * Tcl_AllocStatBuf(void);
1293
+/* 491 */
1294
+EXTERN long long Tcl_Seek(Tcl_Channel chan, long long offset,
1295
+ int mode);
1296
+/* 492 */
1297
+EXTERN long long Tcl_Tell(Tcl_Channel chan);
1298
+/* 493 */
1299
+EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc(
1300
+ const Tcl_ChannelType *chanTypePtr);
1301
+/* 494 */
1302
+EXTERN int Tcl_DictObjPut(Tcl_Interp *interp, Tcl_Obj *dictPtr,
1303
+ Tcl_Obj *keyPtr, Tcl_Obj *valuePtr);
1304
+/* 495 */
1305
+EXTERN int Tcl_DictObjGet(Tcl_Interp *interp, Tcl_Obj *dictPtr,
1306
+ Tcl_Obj *keyPtr, Tcl_Obj **valuePtrPtr);
1307
+/* 496 */
1308
+EXTERN int Tcl_DictObjRemove(Tcl_Interp *interp,
1309
+ Tcl_Obj *dictPtr, Tcl_Obj *keyPtr);
1310
+/* 497 */
1311
+EXTERN int TclDictObjSize(Tcl_Interp *interp, Tcl_Obj *dictPtr,
1312
+ void *sizePtr);
1313
+/* 498 */
1314
+EXTERN int Tcl_DictObjFirst(Tcl_Interp *interp,
1315
+ Tcl_Obj *dictPtr, Tcl_DictSearch *searchPtr,
1316
+ Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr,
1317
+ int *donePtr);
1318
+/* 499 */
1319
+EXTERN void Tcl_DictObjNext(Tcl_DictSearch *searchPtr,
1320
+ Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr,
1321
+ int *donePtr);
1322
+/* 500 */
1323
+EXTERN void Tcl_DictObjDone(Tcl_DictSearch *searchPtr);
1324
+/* 501 */
1325
+EXTERN int Tcl_DictObjPutKeyList(Tcl_Interp *interp,
1326
+ Tcl_Obj *dictPtr, Tcl_Size keyc,
1327
+ Tcl_Obj *const *keyv, Tcl_Obj *valuePtr);
1328
+/* 502 */
1329
+EXTERN int Tcl_DictObjRemoveKeyList(Tcl_Interp *interp,
1330
+ Tcl_Obj *dictPtr, Tcl_Size keyc,
1331
+ Tcl_Obj *const *keyv);
1332
+/* 503 */
1333
+EXTERN Tcl_Obj * Tcl_NewDictObj(void);
1334
+/* 504 */
1335
+EXTERN Tcl_Obj * Tcl_DbNewDictObj(const char *file, int line);
1336
+/* 505 */
1337
+EXTERN void Tcl_RegisterConfig(Tcl_Interp *interp,
1338
+ const char *pkgName,
1339
+ const Tcl_Config *configuration,
1340
+ const char *valEncoding);
1341
+/* 506 */
1342
+EXTERN Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp,
1343
+ const char *name, void *clientData,
1344
+ Tcl_NamespaceDeleteProc *deleteProc);
1345
+/* 507 */
1346
+EXTERN void Tcl_DeleteNamespace(Tcl_Namespace *nsPtr);
1347
+/* 508 */
1348
+EXTERN int Tcl_AppendExportList(Tcl_Interp *interp,
1349
+ Tcl_Namespace *nsPtr, Tcl_Obj *objPtr);
1350
+/* 509 */
1351
+EXTERN int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
1352
+ const char *pattern, int resetListFirst);
1353
+/* 510 */
1354
+EXTERN int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
1355
+ const char *pattern, int allowOverwrite);
1356
+/* 511 */
1357
+EXTERN int Tcl_ForgetImport(Tcl_Interp *interp,
1358
+ Tcl_Namespace *nsPtr, const char *pattern);
1359
+/* 512 */
1360
+EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace(Tcl_Interp *interp);
1361
+/* 513 */
1362
+EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace(Tcl_Interp *interp);
1363
+/* 514 */
1364
+EXTERN Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp,
1365
+ const char *name,
1366
+ Tcl_Namespace *contextNsPtr, int flags);
1367
+/* 515 */
1368
+EXTERN Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name,
1369
+ Tcl_Namespace *contextNsPtr, int flags);
1370
+/* 516 */
1371
+EXTERN Tcl_Command Tcl_GetCommandFromObj(Tcl_Interp *interp,
1372
+ Tcl_Obj *objPtr);
1373
+/* 517 */
1374
+EXTERN void Tcl_GetCommandFullName(Tcl_Interp *interp,
1375
+ Tcl_Command command, Tcl_Obj *objPtr);
1376
+/* 518 */
1377
+EXTERN int Tcl_FSEvalFileEx(Tcl_Interp *interp,
1378
+ Tcl_Obj *fileName, const char *encodingName);
1379
+/* Slot 519 is reserved */
1380
+/* 520 */
1381
+EXTERN void Tcl_LimitAddHandler(Tcl_Interp *interp, int type,
1382
+ Tcl_LimitHandlerProc *handlerProc,
1383
+ void *clientData,
1384
+ Tcl_LimitHandlerDeleteProc *deleteProc);
1385
+/* 521 */
1386
+EXTERN void Tcl_LimitRemoveHandler(Tcl_Interp *interp, int type,
1387
+ Tcl_LimitHandlerProc *handlerProc,
1388
+ void *clientData);
1389
+/* 522 */
1390
+EXTERN int Tcl_LimitReady(Tcl_Interp *interp);
1391
+/* 523 */
1392
+EXTERN int Tcl_LimitCheck(Tcl_Interp *interp);
1393
+/* 524 */
1394
+EXTERN int Tcl_LimitExceeded(Tcl_Interp *interp);
1395
+/* 525 */
1396
+EXTERN void Tcl_LimitSetCommands(Tcl_Interp *interp,
1397
+ Tcl_Size commandLimit);
1398
+/* 526 */
1399
+EXTERN void Tcl_LimitSetTime(Tcl_Interp *interp,
1400
+ Tcl_Time *timeLimitPtr);
1401
+/* 527 */
1402
+EXTERN void Tcl_LimitSetGranularity(Tcl_Interp *interp, int type,
1403
+ int granularity);
1404
+/* 528 */
1405
+EXTERN int Tcl_LimitTypeEnabled(Tcl_Interp *interp, int type);
1406
+/* 529 */
1407
+EXTERN int Tcl_LimitTypeExceeded(Tcl_Interp *interp, int type);
1408
+/* 530 */
1409
+EXTERN void Tcl_LimitTypeSet(Tcl_Interp *interp, int type);
1410
+/* 531 */
1411
+EXTERN void Tcl_LimitTypeReset(Tcl_Interp *interp, int type);
1412
+/* 532 */
1413
+EXTERN Tcl_Size Tcl_LimitGetCommands(Tcl_Interp *interp);
1414
+/* 533 */
1415
+EXTERN void Tcl_LimitGetTime(Tcl_Interp *interp,
1416
+ Tcl_Time *timeLimitPtr);
1417
+/* 534 */
1418
+EXTERN int Tcl_LimitGetGranularity(Tcl_Interp *interp, int type);
1419
+/* 535 */
1420
+EXTERN Tcl_InterpState Tcl_SaveInterpState(Tcl_Interp *interp, int status);
1421
+/* 536 */
1422
+EXTERN int Tcl_RestoreInterpState(Tcl_Interp *interp,
1423
+ Tcl_InterpState state);
1424
+/* 537 */
1425
+EXTERN void Tcl_DiscardInterpState(Tcl_InterpState state);
1426
+/* 538 */
1427
+EXTERN int Tcl_SetReturnOptions(Tcl_Interp *interp,
1428
+ Tcl_Obj *options);
1429
+/* 539 */
1430
+EXTERN Tcl_Obj * Tcl_GetReturnOptions(Tcl_Interp *interp, int result);
1431
+/* 540 */
1432
+EXTERN int Tcl_IsEnsemble(Tcl_Command token);
1433
+/* 541 */
1434
+EXTERN Tcl_Command Tcl_CreateEnsemble(Tcl_Interp *interp,
1435
+ const char *name,
1436
+ Tcl_Namespace *namespacePtr, int flags);
1437
+/* 542 */
1438
+EXTERN Tcl_Command Tcl_FindEnsemble(Tcl_Interp *interp,
1439
+ Tcl_Obj *cmdNameObj, int flags);
1440
+/* 543 */
1441
+EXTERN int Tcl_SetEnsembleSubcommandList(Tcl_Interp *interp,
1442
+ Tcl_Command token, Tcl_Obj *subcmdList);
1443
+/* 544 */
1444
+EXTERN int Tcl_SetEnsembleMappingDict(Tcl_Interp *interp,
1445
+ Tcl_Command token, Tcl_Obj *mapDict);
1446
+/* 545 */
1447
+EXTERN int Tcl_SetEnsembleUnknownHandler(Tcl_Interp *interp,
1448
+ Tcl_Command token, Tcl_Obj *unknownList);
1449
+/* 546 */
1450
+EXTERN int Tcl_SetEnsembleFlags(Tcl_Interp *interp,
1451
+ Tcl_Command token, int flags);
1452
+/* 547 */
1453
+EXTERN int Tcl_GetEnsembleSubcommandList(Tcl_Interp *interp,
1454
+ Tcl_Command token, Tcl_Obj **subcmdListPtr);
1455
+/* 548 */
1456
+EXTERN int Tcl_GetEnsembleMappingDict(Tcl_Interp *interp,
1457
+ Tcl_Command token, Tcl_Obj **mapDictPtr);
1458
+/* 549 */
1459
+EXTERN int Tcl_GetEnsembleUnknownHandler(Tcl_Interp *interp,
1460
+ Tcl_Command token, Tcl_Obj **unknownListPtr);
1461
+/* 550 */
1462
+EXTERN int Tcl_GetEnsembleFlags(Tcl_Interp *interp,
1463
+ Tcl_Command token, int *flagsPtr);
1464
+/* 551 */
1465
+EXTERN int Tcl_GetEnsembleNamespace(Tcl_Interp *interp,
1466
+ Tcl_Command token,
1467
+ Tcl_Namespace **namespacePtrPtr);
1468
+/* 552 */
1469
+EXTERN void Tcl_SetTimeProc(Tcl_GetTimeProc *getProc,
1470
+ Tcl_ScaleTimeProc *scaleProc,
1471
+ void *clientData);
1472
+/* 553 */
1473
+EXTERN void Tcl_QueryTimeProc(Tcl_GetTimeProc **getProc,
1474
+ Tcl_ScaleTimeProc **scaleProc,
1475
+ void **clientData);
1476
+/* 554 */
1477
+EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc(
1478
+ const Tcl_ChannelType *chanTypePtr);
1479
+/* 555 */
1480
+EXTERN Tcl_Obj * Tcl_NewBignumObj(void *value);
1481
+/* 556 */
1482
+EXTERN Tcl_Obj * Tcl_DbNewBignumObj(void *value, const char *file,
1483
+ int line);
1484
+/* 557 */
1485
+EXTERN void Tcl_SetBignumObj(Tcl_Obj *obj, void *value);
1486
+/* 558 */
1487
+EXTERN int Tcl_GetBignumFromObj(Tcl_Interp *interp,
1488
+ Tcl_Obj *obj, void *value);
1489
+/* 559 */
1490
+EXTERN int Tcl_TakeBignumFromObj(Tcl_Interp *interp,
1491
+ Tcl_Obj *obj, void *value);
1492
+/* 560 */
1493
+EXTERN int Tcl_TruncateChannel(Tcl_Channel chan,
1494
+ long long length);
1495
+/* 561 */
1496
+EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc(
1497
+ const Tcl_ChannelType *chanTypePtr);
1498
+/* 562 */
1499
+EXTERN void Tcl_SetChannelErrorInterp(Tcl_Interp *interp,
1500
+ Tcl_Obj *msg);
1501
+/* 563 */
1502
+EXTERN void Tcl_GetChannelErrorInterp(Tcl_Interp *interp,
1503
+ Tcl_Obj **msg);
1504
+/* 564 */
1505
+EXTERN void Tcl_SetChannelError(Tcl_Channel chan, Tcl_Obj *msg);
1506
+/* 565 */
1507
+EXTERN void Tcl_GetChannelError(Tcl_Channel chan, Tcl_Obj **msg);
1508
+/* 566 */
1509
+EXTERN int Tcl_InitBignumFromDouble(Tcl_Interp *interp,
1510
+ double initval, void *toInit);
1511
+/* 567 */
1512
+EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler(Tcl_Interp *interp,
1513
+ Tcl_Namespace *nsPtr);
1514
+/* 568 */
1515
+EXTERN int Tcl_SetNamespaceUnknownHandler(Tcl_Interp *interp,
1516
+ Tcl_Namespace *nsPtr, Tcl_Obj *handlerPtr);
1517
+/* 569 */
1518
+EXTERN int Tcl_GetEncodingFromObj(Tcl_Interp *interp,
1519
+ Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr);
1520
+/* 570 */
1521
+EXTERN Tcl_Obj * Tcl_GetEncodingSearchPath(void);
1522
+/* 571 */
1523
+EXTERN int Tcl_SetEncodingSearchPath(Tcl_Obj *searchPath);
1524
+/* 572 */
1525
+EXTERN const char * Tcl_GetEncodingNameFromEnvironment(
1526
+ Tcl_DString *bufPtr);
1527
+/* 573 */
1528
+EXTERN int Tcl_PkgRequireProc(Tcl_Interp *interp,
1529
+ const char *name, Tcl_Size objc,
1530
+ Tcl_Obj *const objv[], void *clientDataPtr);
1531
+/* 574 */
1532
+EXTERN void Tcl_AppendObjToErrorInfo(Tcl_Interp *interp,
1533
+ Tcl_Obj *objPtr);
1534
+/* 575 */
1535
+EXTERN void Tcl_AppendLimitedToObj(Tcl_Obj *objPtr,
1536
+ const char *bytes, Tcl_Size length,
1537
+ Tcl_Size limit, const char *ellipsis);
1538
+/* 576 */
1539
+EXTERN Tcl_Obj * Tcl_Format(Tcl_Interp *interp, const char *format,
1540
+ Tcl_Size objc, Tcl_Obj *const objv[]);
1541
+/* 577 */
1542
+EXTERN int Tcl_AppendFormatToObj(Tcl_Interp *interp,
1543
+ Tcl_Obj *objPtr, const char *format,
1544
+ Tcl_Size objc, Tcl_Obj *const objv[]);
1545
+/* 578 */
1546
+EXTERN Tcl_Obj * Tcl_ObjPrintf(const char *format, ...) TCL_FORMAT_PRINTF(1, 2);
1547
+/* 579 */
1548
+EXTERN void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr,
1549
+ const char *format, ...) TCL_FORMAT_PRINTF(2, 3);
1550
+/* 580 */
1551
+EXTERN int Tcl_CancelEval(Tcl_Interp *interp,
1552
+ Tcl_Obj *resultObjPtr, void *clientData,
1553
+ int flags);
1554
+/* 581 */
1555
+EXTERN int Tcl_Canceled(Tcl_Interp *interp, int flags);
1556
+/* 582 */
1557
+EXTERN int Tcl_CreatePipe(Tcl_Interp *interp,
1558
+ Tcl_Channel *rchan, Tcl_Channel *wchan,
1559
+ int flags);
1560
+/* 583 */
1561
+EXTERN Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp,
1562
+ const char *cmdName, Tcl_ObjCmdProc *proc,
1563
+ Tcl_ObjCmdProc *nreProc, void *clientData,
1564
+ Tcl_CmdDeleteProc *deleteProc);
1565
+/* 584 */
1566
+EXTERN int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
1567
+ int flags);
1568
+/* 585 */
1569
+EXTERN int Tcl_NREvalObjv(Tcl_Interp *interp, Tcl_Size objc,
1570
+ Tcl_Obj *const objv[], int flags);
1571
+/* 586 */
1572
+EXTERN int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd,
1573
+ Tcl_Size objc, Tcl_Obj *const objv[],
1574
+ int flags);
1575
+/* 587 */
1576
+EXTERN void Tcl_NRAddCallback(Tcl_Interp *interp,
1577
+ Tcl_NRPostProc *postProcPtr, void *data0,
1578
+ void *data1, void *data2, void *data3);
1579
+/* 588 */
1580
+EXTERN int Tcl_NRCallObjProc(Tcl_Interp *interp,
1581
+ Tcl_ObjCmdProc *objProc, void *clientData,
1582
+ Tcl_Size objc, Tcl_Obj *const objv[]);
1583
+/* 589 */
1584
+EXTERN unsigned Tcl_GetFSDeviceFromStat(const Tcl_StatBuf *statPtr);
1585
+/* 590 */
1586
+EXTERN unsigned Tcl_GetFSInodeFromStat(const Tcl_StatBuf *statPtr);
1587
+/* 591 */
1588
+EXTERN unsigned Tcl_GetModeFromStat(const Tcl_StatBuf *statPtr);
1589
+/* 592 */
1590
+EXTERN int Tcl_GetLinkCountFromStat(const Tcl_StatBuf *statPtr);
1591
+/* 593 */
1592
+EXTERN int Tcl_GetUserIdFromStat(const Tcl_StatBuf *statPtr);
1593
+/* 594 */
1594
+EXTERN int Tcl_GetGroupIdFromStat(const Tcl_StatBuf *statPtr);
1595
+/* 595 */
1596
+EXTERN int Tcl_GetDeviceTypeFromStat(const Tcl_StatBuf *statPtr);
1597
+/* 596 */
1598
+EXTERN long long Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr);
1599
+/* 597 */
1600
+EXTERN long long Tcl_GetModificationTimeFromStat(
1601
+ const Tcl_StatBuf *statPtr);
1602
+/* 598 */
1603
+EXTERN long long Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr);
1604
+/* 599 */
1605
+EXTERN unsigned long long Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr);
1606
+/* 600 */
1607
+EXTERN unsigned long long Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr);
1608
+/* 601 */
1609
+EXTERN unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr);
1610
+/* 602 */
1611
+EXTERN int Tcl_SetEnsembleParameterList(Tcl_Interp *interp,
1612
+ Tcl_Command token, Tcl_Obj *paramList);
1613
+/* 603 */
1614
+EXTERN int Tcl_GetEnsembleParameterList(Tcl_Interp *interp,
1615
+ Tcl_Command token, Tcl_Obj **paramListPtr);
1616
+/* 604 */
1617
+EXTERN int TclParseArgsObjv(Tcl_Interp *interp,
1618
+ const Tcl_ArgvInfo *argTable, void *objcPtr,
1619
+ Tcl_Obj *const *objv, Tcl_Obj ***remObjv);
1620
+/* 605 */
1621
+EXTERN int Tcl_GetErrorLine(Tcl_Interp *interp);
1622
+/* 606 */
1623
+EXTERN void Tcl_SetErrorLine(Tcl_Interp *interp, int lineNum);
1624
+/* 607 */
1625
+EXTERN void Tcl_TransferResult(Tcl_Interp *sourceInterp,
1626
+ int code, Tcl_Interp *targetInterp);
1627
+/* 608 */
1628
+EXTERN int Tcl_InterpActive(Tcl_Interp *interp);
1629
+/* 609 */
1630
+EXTERN void Tcl_BackgroundException(Tcl_Interp *interp, int code);
1631
+/* 610 */
1632
+EXTERN int Tcl_ZlibDeflate(Tcl_Interp *interp, int format,
1633
+ Tcl_Obj *data, int level,
1634
+ Tcl_Obj *gzipHeaderDictObj);
1635
+/* 611 */
1636
+EXTERN int Tcl_ZlibInflate(Tcl_Interp *interp, int format,
1637
+ Tcl_Obj *data, Tcl_Size buffersize,
1638
+ Tcl_Obj *gzipHeaderDictObj);
1639
+/* 612 */
1640
+EXTERN unsigned int Tcl_ZlibCRC32(unsigned int crc,
1641
+ const unsigned char *buf, Tcl_Size len);
1642
+/* 613 */
1643
+EXTERN unsigned int Tcl_ZlibAdler32(unsigned int adler,
1644
+ const unsigned char *buf, Tcl_Size len);
1645
+/* 614 */
1646
+EXTERN int Tcl_ZlibStreamInit(Tcl_Interp *interp, int mode,
1647
+ int format, int level, Tcl_Obj *dictObj,
1648
+ Tcl_ZlibStream *zshandle);
1649
+/* 615 */
1650
+EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName(Tcl_ZlibStream zshandle);
1651
+/* 616 */
1652
+EXTERN int Tcl_ZlibStreamEof(Tcl_ZlibStream zshandle);
1653
+/* 617 */
1654
+EXTERN int Tcl_ZlibStreamChecksum(Tcl_ZlibStream zshandle);
1655
+/* 618 */
1656
+EXTERN int Tcl_ZlibStreamPut(Tcl_ZlibStream zshandle,
1657
+ Tcl_Obj *data, int flush);
1658
+/* 619 */
1659
+EXTERN int Tcl_ZlibStreamGet(Tcl_ZlibStream zshandle,
1660
+ Tcl_Obj *data, Tcl_Size count);
1661
+/* 620 */
1662
+EXTERN int Tcl_ZlibStreamClose(Tcl_ZlibStream zshandle);
1663
+/* 621 */
1664
+EXTERN int Tcl_ZlibStreamReset(Tcl_ZlibStream zshandle);
1665
+/* 622 */
1666
+EXTERN void Tcl_SetStartupScript(Tcl_Obj *path,
1667
+ const char *encoding);
1668
+/* 623 */
1669
+EXTERN Tcl_Obj * Tcl_GetStartupScript(const char **encodingPtr);
1670
+/* 624 */
1671
+EXTERN int Tcl_CloseEx(Tcl_Interp *interp, Tcl_Channel chan,
1672
+ int flags);
1673
+/* 625 */
1674
+EXTERN int Tcl_NRExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
1675
+ Tcl_Obj *resultPtr);
1676
+/* 626 */
1677
+EXTERN int Tcl_NRSubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
1678
+ int flags);
1679
+/* 627 */
1680
+EXTERN int Tcl_LoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr,
1681
+ const char *const symv[], int flags,
1682
+ void *procPtrs, Tcl_LoadHandle *handlePtr);
1683
+/* 628 */
1684
+EXTERN void * Tcl_FindSymbol(Tcl_Interp *interp,
1685
+ Tcl_LoadHandle handle, const char *symbol);
1686
+/* 629 */
1687
+EXTERN int Tcl_FSUnloadFile(Tcl_Interp *interp,
1688
+ Tcl_LoadHandle handlePtr);
1689
+/* 630 */
1690
+EXTERN void Tcl_ZlibStreamSetCompressionDictionary(
1691
+ Tcl_ZlibStream zhandle,
1692
+ Tcl_Obj *compressionDictionaryObj);
1693
+/* 631 */
1694
+EXTERN Tcl_Channel Tcl_OpenTcpServerEx(Tcl_Interp *interp,
1695
+ const char *service, const char *host,
1696
+ unsigned int flags, int backlog,
1697
+ Tcl_TcpAcceptProc *acceptProc,
1698
+ void *callbackData);
1699
+/* 632 */
1700
+EXTERN int TclZipfs_Mount(Tcl_Interp *interp,
1701
+ const char *zipname, const char *mountPoint,
1702
+ const char *passwd);
1703
+/* 633 */
1704
+EXTERN int TclZipfs_Unmount(Tcl_Interp *interp,
1705
+ const char *mountPoint);
1706
+/* 634 */
1707
+EXTERN Tcl_Obj * TclZipfs_TclLibrary(void);
1708
+/* 635 */
1709
+EXTERN int TclZipfs_MountBuffer(Tcl_Interp *interp,
1710
+ const void *data, size_t datalen,
1711
+ const char *mountPoint, int copy);
1712
+/* 636 */
1713
+EXTERN void Tcl_FreeInternalRep(Tcl_Obj *objPtr);
1714
+/* 637 */
1715
+EXTERN char * Tcl_InitStringRep(Tcl_Obj *objPtr, const char *bytes,
1716
+ TCL_HASH_TYPE numBytes);
1717
+/* 638 */
1718
+EXTERN Tcl_ObjInternalRep * Tcl_FetchInternalRep(Tcl_Obj *objPtr,
1719
+ const Tcl_ObjType *typePtr);
1720
+/* 639 */
1721
+EXTERN void Tcl_StoreInternalRep(Tcl_Obj *objPtr,
1722
+ const Tcl_ObjType *typePtr,
1723
+ const Tcl_ObjInternalRep *irPtr);
1724
+/* 640 */
1725
+EXTERN int Tcl_HasStringRep(Tcl_Obj *objPtr);
1726
+/* 641 */
1727
+EXTERN void Tcl_IncrRefCount(Tcl_Obj *objPtr);
1728
+/* 642 */
1729
+EXTERN void Tcl_DecrRefCount(Tcl_Obj *objPtr);
1730
+/* 643 */
1731
+EXTERN int Tcl_IsShared(Tcl_Obj *objPtr);
1732
+/* 644 */
1733
+EXTERN int Tcl_LinkArray(Tcl_Interp *interp,
1734
+ const char *varName, void *addr, int type,
1735
+ Tcl_Size size);
1736
+/* 645 */
1737
+EXTERN int Tcl_GetIntForIndex(Tcl_Interp *interp,
1738
+ Tcl_Obj *objPtr, Tcl_Size endValue,
1739
+ Tcl_Size *indexPtr);
1740
+/* 646 */
1741
+EXTERN Tcl_Size Tcl_UtfToUniChar(const char *src, int *chPtr);
1742
+/* 647 */
1743
+EXTERN char * Tcl_UniCharToUtfDString(const int *uniStr,
1744
+ Tcl_Size uniLength, Tcl_DString *dsPtr);
1745
+/* 648 */
1746
+EXTERN int * Tcl_UtfToUniCharDString(const char *src,
1747
+ Tcl_Size length, Tcl_DString *dsPtr);
1748
+/* 649 */
1749
+EXTERN unsigned char * TclGetBytesFromObj(Tcl_Interp *interp,
1750
+ Tcl_Obj *objPtr, void *numBytesPtr);
1751
+/* 650 */
1752
+EXTERN unsigned char * Tcl_GetBytesFromObj(Tcl_Interp *interp,
1753
+ Tcl_Obj *objPtr, Tcl_Size *numBytesPtr);
1754
+/* 651 */
1755
+EXTERN char * Tcl_GetStringFromObj(Tcl_Obj *objPtr,
1756
+ Tcl_Size *lengthPtr);
1757
+/* 652 */
1758
+EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr,
1759
+ Tcl_Size *lengthPtr);
1760
+/* 653 */
1761
+EXTERN int Tcl_GetSizeIntFromObj(Tcl_Interp *interp,
1762
+ Tcl_Obj *objPtr, Tcl_Size *sizePtr);
1763
+/* 654 */
1764
+EXTERN int Tcl_UtfCharComplete(const char *src, Tcl_Size length);
1765
+/* 655 */
1766
+EXTERN const char * Tcl_UtfNext(const char *src);
1767
+/* 656 */
1768
+EXTERN const char * Tcl_UtfPrev(const char *src, const char *start);
1769
+/* 657 */
1770
+EXTERN int Tcl_FSTildeExpand(Tcl_Interp *interp,
1771
+ const char *path, Tcl_DString *dsPtr);
1772
+/* 658 */
1773
+EXTERN int Tcl_ExternalToUtfDStringEx(Tcl_Interp *interp,
1774
+ Tcl_Encoding encoding, const char *src,
1775
+ Tcl_Size srcLen, int flags,
1776
+ Tcl_DString *dsPtr,
1777
+ Tcl_Size *errorLocationPtr);
1778
+/* 659 */
1779
+EXTERN int Tcl_UtfToExternalDStringEx(Tcl_Interp *interp,
1780
+ Tcl_Encoding encoding, const char *src,
1781
+ Tcl_Size srcLen, int flags,
1782
+ Tcl_DString *dsPtr,
1783
+ Tcl_Size *errorLocationPtr);
1784
+/* 660 */
1785
+EXTERN int Tcl_AsyncMarkFromSignal(Tcl_AsyncHandler async,
1786
+ int sigNumber);
1787
+/* 661 */
1788
+EXTERN int Tcl_ListObjGetElements(Tcl_Interp *interp,
1789
+ Tcl_Obj *listPtr, Tcl_Size *objcPtr,
1790
+ Tcl_Obj ***objvPtr);
1791
+/* 662 */
1792
+EXTERN int Tcl_ListObjLength(Tcl_Interp *interp,
1793
+ Tcl_Obj *listPtr, Tcl_Size *lengthPtr);
1794
+/* 663 */
1795
+EXTERN int Tcl_DictObjSize(Tcl_Interp *interp, Tcl_Obj *dictPtr,
1796
+ Tcl_Size *sizePtr);
1797
+/* 664 */
1798
+EXTERN int Tcl_SplitList(Tcl_Interp *interp,
1799
+ const char *listStr, Tcl_Size *argcPtr,
1800
+ const char ***argvPtr);
1801
+/* 665 */
1802
+EXTERN void Tcl_SplitPath(const char *path, Tcl_Size *argcPtr,
1803
+ const char ***argvPtr);
1804
+/* 666 */
1805
+EXTERN Tcl_Obj * Tcl_FSSplitPath(Tcl_Obj *pathPtr, Tcl_Size *lenPtr);
1806
+/* 667 */
1807
+EXTERN int Tcl_ParseArgsObjv(Tcl_Interp *interp,
1808
+ const Tcl_ArgvInfo *argTable,
1809
+ Tcl_Size *objcPtr, Tcl_Obj *const *objv,
1810
+ Tcl_Obj ***remObjv);
1811
+/* 668 */
1812
+EXTERN Tcl_Size Tcl_UniCharLen(const int *uniStr);
1813
+/* 669 */
1814
+EXTERN Tcl_Size Tcl_NumUtfChars(const char *src, Tcl_Size length);
1815
+/* 670 */
1816
+EXTERN Tcl_Size Tcl_GetCharLength(Tcl_Obj *objPtr);
1817
+/* 671 */
1818
+EXTERN const char * Tcl_UtfAtIndex(const char *src, Tcl_Size index);
1819
+/* 672 */
1820
+EXTERN Tcl_Obj * Tcl_GetRange(Tcl_Obj *objPtr, Tcl_Size first,
1821
+ Tcl_Size last);
1822
+/* 673 */
1823
+EXTERN int Tcl_GetUniChar(Tcl_Obj *objPtr, Tcl_Size index);
1824
+/* 674 */
1825
+EXTERN int Tcl_GetBool(Tcl_Interp *interp, const char *src,
1826
+ int flags, char *charPtr);
1827
+/* 675 */
1828
+EXTERN int Tcl_GetBoolFromObj(Tcl_Interp *interp,
1829
+ Tcl_Obj *objPtr, int flags, char *charPtr);
1830
+/* 676 */
1831
+EXTERN Tcl_Command Tcl_CreateObjCommand2(Tcl_Interp *interp,
1832
+ const char *cmdName, Tcl_ObjCmdProc2 *proc2,
1833
+ void *clientData,
1834
+ Tcl_CmdDeleteProc *deleteProc);
1835
+/* 677 */
1836
+EXTERN Tcl_Trace Tcl_CreateObjTrace2(Tcl_Interp *interp,
1837
+ Tcl_Size level, int flags,
1838
+ Tcl_CmdObjTraceProc2 *objProc2,
1839
+ void *clientData,
1840
+ Tcl_CmdObjTraceDeleteProc *delProc);
1841
+/* 678 */
1842
+EXTERN Tcl_Command Tcl_NRCreateCommand2(Tcl_Interp *interp,
1843
+ const char *cmdName, Tcl_ObjCmdProc2 *proc,
1844
+ Tcl_ObjCmdProc2 *nreProc2, void *clientData,
1845
+ Tcl_CmdDeleteProc *deleteProc);
1846
+/* 679 */
1847
+EXTERN int Tcl_NRCallObjProc2(Tcl_Interp *interp,
1848
+ Tcl_ObjCmdProc2 *objProc2, void *clientData,
1849
+ Tcl_Size objc, Tcl_Obj *const objv[]);
1850
+/* 680 */
1851
+EXTERN int Tcl_GetNumberFromObj(Tcl_Interp *interp,
1852
+ Tcl_Obj *objPtr, void **clientDataPtr,
1853
+ int *typePtr);
1854
+/* 681 */
1855
+EXTERN int Tcl_GetNumber(Tcl_Interp *interp, const char *bytes,
1856
+ Tcl_Size numBytes, void **clientDataPtr,
1857
+ int *typePtr);
1858
+/* 682 */
1859
+EXTERN int Tcl_RemoveChannelMode(Tcl_Interp *interp,
1860
+ Tcl_Channel chan, int mode);
1861
+/* 683 */
1862
+EXTERN Tcl_Size Tcl_GetEncodingNulLength(Tcl_Encoding encoding);
1863
+/* 684 */
1864
+EXTERN int Tcl_GetWideUIntFromObj(Tcl_Interp *interp,
1865
+ Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr);
1866
+/* 685 */
1867
+EXTERN Tcl_Obj * Tcl_DStringToObj(Tcl_DString *dsPtr);
1868
+/* 686 */
1869
+EXTERN int Tcl_UtfNcmp(const char *s1, const char *s2, size_t n);
1870
+/* 687 */
1871
+EXTERN int Tcl_UtfNcasecmp(const char *s1, const char *s2,
1872
+ size_t n);
1873
+/* 688 */
1874
+EXTERN Tcl_Obj * Tcl_NewWideUIntObj(Tcl_WideUInt wideValue);
1875
+/* 689 */
1876
+EXTERN void Tcl_SetWideUIntObj(Tcl_Obj *objPtr,
1877
+ Tcl_WideUInt uwideValue);
1878
+/* 690 */
1879
+EXTERN void TclUnusedStubEntry(void);
1880
+
1881
+typedef struct {
1882
+ const struct TclPlatStubs *tclPlatStubs;
1883
+ const struct TclIntStubs *tclIntStubs;
1884
+ const struct TclIntPlatStubs *tclIntPlatStubs;
1885
+} TclStubHooks;
1886
+
1887
+typedef struct TclStubs {
1888
+ int magic;
1889
+ const TclStubHooks *hooks;
1890
+
1891
+ int (*tcl_PkgProvideEx) (Tcl_Interp *interp, const char *name, const char *version, const void *clientData); /* 0 */
1892
+ const char * (*tcl_PkgRequireEx) (Tcl_Interp *interp, const char *name, const char *version, int exact, void *clientDataPtr); /* 1 */
1893
+ TCL_NORETURN1 void (*tcl_Panic) (const char *format, ...) TCL_FORMAT_PRINTF(1, 2); /* 2 */
1894
+ void * (*tcl_Alloc) (TCL_HASH_TYPE size); /* 3 */
1895
+ void (*tcl_Free) (void *ptr); /* 4 */
1896
+ void * (*tcl_Realloc) (void *ptr, TCL_HASH_TYPE size); /* 5 */
1897
+ void * (*tcl_DbCkalloc) (TCL_HASH_TYPE size, const char *file, int line); /* 6 */
1898
+ void (*tcl_DbCkfree) (void *ptr, const char *file, int line); /* 7 */
1899
+ void * (*tcl_DbCkrealloc) (void *ptr, TCL_HASH_TYPE size, const char *file, int line); /* 8 */
1900
+ void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc *proc, void *clientData); /* 9 */
1901
+ void (*tcl_DeleteFileHandler) (int fd); /* 10 */
1902
+ void (*tcl_SetTimer) (const Tcl_Time *timePtr); /* 11 */
1903
+ void (*tcl_Sleep) (int ms); /* 12 */
1904
+ int (*tcl_WaitForEvent) (const Tcl_Time *timePtr); /* 13 */
1905
+ int (*tcl_AppendAllObjTypes) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 14 */
1906
+ void (*tcl_AppendStringsToObj) (Tcl_Obj *objPtr, ...); /* 15 */
1907
+ void (*tcl_AppendToObj) (Tcl_Obj *objPtr, const char *bytes, Tcl_Size length); /* 16 */
1908
+ Tcl_Obj * (*tcl_ConcatObj) (Tcl_Size objc, Tcl_Obj *const objv[]); /* 17 */
1909
+ int (*tcl_ConvertToType) (Tcl_Interp *interp, Tcl_Obj *objPtr, const Tcl_ObjType *typePtr); /* 18 */
1910
+ void (*tcl_DbDecrRefCount) (Tcl_Obj *objPtr, const char *file, int line); /* 19 */
1911
+ void (*tcl_DbIncrRefCount) (Tcl_Obj *objPtr, const char *file, int line); /* 20 */
1912
+ int (*tcl_DbIsShared) (Tcl_Obj *objPtr, const char *file, int line); /* 21 */
1913
+ void (*reserved22)(void);
1914
+ Tcl_Obj * (*tcl_DbNewByteArrayObj) (const unsigned char *bytes, Tcl_Size numBytes, const char *file, int line); /* 23 */
1915
+ Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, const char *file, int line); /* 24 */
1916
+ Tcl_Obj * (*tcl_DbNewListObj) (Tcl_Size objc, Tcl_Obj *const *objv, const char *file, int line); /* 25 */
1917
+ void (*reserved26)(void);
1918
+ Tcl_Obj * (*tcl_DbNewObj) (const char *file, int line); /* 27 */
1919
+ Tcl_Obj * (*tcl_DbNewStringObj) (const char *bytes, Tcl_Size length, const char *file, int line); /* 28 */
1920
+ Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj *objPtr); /* 29 */
1921
+ void (*tclFreeObj) (Tcl_Obj *objPtr); /* 30 */
1922
+ int (*tcl_GetBoolean) (Tcl_Interp *interp, const char *src, int *intPtr); /* 31 */
1923
+ int (*tcl_GetBooleanFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr); /* 32 */
1924
+ unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj *objPtr, Tcl_Size *numBytesPtr); /* 33 */
1925
+ int (*tcl_GetDouble) (Tcl_Interp *interp, const char *src, double *doublePtr); /* 34 */
1926
+ int (*tcl_GetDoubleFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, double *doublePtr); /* 35 */
1927
+ void (*reserved36)(void);
1928
+ int (*tcl_GetInt) (Tcl_Interp *interp, const char *src, int *intPtr); /* 37 */
1929
+ int (*tcl_GetIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr); /* 38 */
1930
+ int (*tcl_GetLongFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, long *longPtr); /* 39 */
1931
+ const Tcl_ObjType * (*tcl_GetObjType) (const char *typeName); /* 40 */
1932
+ char * (*tclGetStringFromObj) (Tcl_Obj *objPtr, void *lengthPtr); /* 41 */
1933
+ void (*tcl_InvalidateStringRep) (Tcl_Obj *objPtr); /* 42 */
1934
+ int (*tcl_ListObjAppendList) (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *elemListPtr); /* 43 */
1935
+ int (*tcl_ListObjAppendElement) (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *objPtr); /* 44 */
1936
+ int (*tclListObjGetElements) (Tcl_Interp *interp, Tcl_Obj *listPtr, void *objcPtr, Tcl_Obj ***objvPtr); /* 45 */
1937
+ int (*tcl_ListObjIndex) (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Size index, Tcl_Obj **objPtrPtr); /* 46 */
1938
+ int (*tclListObjLength) (Tcl_Interp *interp, Tcl_Obj *listPtr, void *lengthPtr); /* 47 */
1939
+ int (*tcl_ListObjReplace) (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Size first, Tcl_Size count, Tcl_Size objc, Tcl_Obj *const objv[]); /* 48 */
1940
+ void (*reserved49)(void);
1941
+ Tcl_Obj * (*tcl_NewByteArrayObj) (const unsigned char *bytes, Tcl_Size numBytes); /* 50 */
1942
+ Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */
1943
+ void (*reserved52)(void);
1944
+ Tcl_Obj * (*tcl_NewListObj) (Tcl_Size objc, Tcl_Obj *const objv[]); /* 53 */
1945
+ void (*reserved54)(void);
1946
+ Tcl_Obj * (*tcl_NewObj) (void); /* 55 */
1947
+ Tcl_Obj * (*tcl_NewStringObj) (const char *bytes, Tcl_Size length); /* 56 */
1948
+ void (*reserved57)(void);
1949
+ unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj *objPtr, Tcl_Size numBytes); /* 58 */
1950
+ void (*tcl_SetByteArrayObj) (Tcl_Obj *objPtr, const unsigned char *bytes, Tcl_Size numBytes); /* 59 */
1951
+ void (*tcl_SetDoubleObj) (Tcl_Obj *objPtr, double doubleValue); /* 60 */
1952
+ void (*reserved61)(void);
1953
+ void (*tcl_SetListObj) (Tcl_Obj *objPtr, Tcl_Size objc, Tcl_Obj *const objv[]); /* 62 */
1954
+ void (*reserved63)(void);
1955
+ void (*tcl_SetObjLength) (Tcl_Obj *objPtr, Tcl_Size length); /* 64 */
1956
+ void (*tcl_SetStringObj) (Tcl_Obj *objPtr, const char *bytes, Tcl_Size length); /* 65 */
1957
+ void (*reserved66)(void);
1958
+ void (*reserved67)(void);
1959
+ void (*tcl_AllowExceptions) (Tcl_Interp *interp); /* 68 */
1960
+ void (*tcl_AppendElement) (Tcl_Interp *interp, const char *element); /* 69 */
1961
+ void (*tcl_AppendResult) (Tcl_Interp *interp, ...); /* 70 */
1962
+ Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc *proc, void *clientData); /* 71 */
1963
+ void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */
1964
+ int (*tcl_AsyncInvoke) (Tcl_Interp *interp, int code); /* 73 */
1965
+ void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */
1966
+ int (*tcl_AsyncReady) (void); /* 75 */
1967
+ void (*reserved76)(void);
1968
+ void (*reserved77)(void);
1969
+ int (*tcl_BadChannelOption) (Tcl_Interp *interp, const char *optionName, const char *optionList); /* 78 */
1970
+ void (*tcl_CallWhenDeleted) (Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, void *clientData); /* 79 */
1971
+ void (*tcl_CancelIdleCall) (Tcl_IdleProc *idleProc, void *clientData); /* 80 */
1972
+ int (*tcl_Close) (Tcl_Interp *interp, Tcl_Channel chan); /* 81 */
1973
+ int (*tcl_CommandComplete) (const char *cmd); /* 82 */
1974
+ char * (*tcl_Concat) (Tcl_Size argc, const char *const *argv); /* 83 */
1975
+ Tcl_Size (*tcl_ConvertElement) (const char *src, char *dst, int flags); /* 84 */
1976
+ Tcl_Size (*tcl_ConvertCountedElement) (const char *src, Tcl_Size length, char *dst, int flags); /* 85 */
1977
+ int (*tcl_CreateAlias) (Tcl_Interp *childInterp, const char *childCmd, Tcl_Interp *target, const char *targetCmd, Tcl_Size argc, const char *const *argv); /* 86 */
1978
+ int (*tcl_CreateAliasObj) (Tcl_Interp *childInterp, const char *childCmd, Tcl_Interp *target, const char *targetCmd, Tcl_Size objc, Tcl_Obj *const objv[]); /* 87 */
1979
+ Tcl_Channel (*tcl_CreateChannel) (const Tcl_ChannelType *typePtr, const char *chanName, void *instanceData, int mask); /* 88 */
1980
+ void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc *proc, void *clientData); /* 89 */
1981
+ void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc *proc, void *clientData); /* 90 */
1982
+ Tcl_Command (*tcl_CreateCommand) (Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 91 */
1983
+ void (*tcl_CreateEventSource) (Tcl_EventSetupProc *setupProc, Tcl_EventCheckProc *checkProc, void *clientData); /* 92 */
1984
+ void (*tcl_CreateExitHandler) (Tcl_ExitProc *proc, void *clientData); /* 93 */
1985
+ Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */
1986
+ void (*reserved95)(void);
1987
+ Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 96 */
1988
+ Tcl_Interp * (*tcl_CreateChild) (Tcl_Interp *interp, const char *name, int isSafe); /* 97 */
1989
+ Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc *proc, void *clientData); /* 98 */
1990
+ Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp *interp, Tcl_Size level, Tcl_CmdTraceProc *proc, void *clientData); /* 99 */
1991
+ void (*tcl_DeleteAssocData) (Tcl_Interp *interp, const char *name); /* 100 */
1992
+ void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc *proc, void *clientData); /* 101 */
1993
+ void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc *proc, void *clientData); /* 102 */
1994
+ int (*tcl_DeleteCommand) (Tcl_Interp *interp, const char *cmdName); /* 103 */
1995
+ int (*tcl_DeleteCommandFromToken) (Tcl_Interp *interp, Tcl_Command command); /* 104 */
1996
+ void (*tcl_DeleteEvents) (Tcl_EventDeleteProc *proc, void *clientData); /* 105 */
1997
+ void (*tcl_DeleteEventSource) (Tcl_EventSetupProc *setupProc, Tcl_EventCheckProc *checkProc, void *clientData); /* 106 */
1998
+ void (*tcl_DeleteExitHandler) (Tcl_ExitProc *proc, void *clientData); /* 107 */
1999
+ void (*tcl_DeleteHashEntry) (Tcl_HashEntry *entryPtr); /* 108 */
2000
+ void (*tcl_DeleteHashTable) (Tcl_HashTable *tablePtr); /* 109 */
2001
+ void (*tcl_DeleteInterp) (Tcl_Interp *interp); /* 110 */
2002
+ void (*tcl_DetachPids) (Tcl_Size numPids, Tcl_Pid *pidPtr); /* 111 */
2003
+ void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */
2004
+ void (*tcl_DeleteTrace) (Tcl_Interp *interp, Tcl_Trace trace); /* 113 */
2005
+ void (*tcl_DontCallWhenDeleted) (Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, void *clientData); /* 114 */
2006
+ int (*tcl_DoOneEvent) (int flags); /* 115 */
2007
+ void (*tcl_DoWhenIdle) (Tcl_IdleProc *proc, void *clientData); /* 116 */
2008
+ char * (*tcl_DStringAppend) (Tcl_DString *dsPtr, const char *bytes, Tcl_Size length); /* 117 */
2009
+ char * (*tcl_DStringAppendElement) (Tcl_DString *dsPtr, const char *element); /* 118 */
2010
+ void (*tcl_DStringEndSublist) (Tcl_DString *dsPtr); /* 119 */
2011
+ void (*tcl_DStringFree) (Tcl_DString *dsPtr); /* 120 */
2012
+ void (*tcl_DStringGetResult) (Tcl_Interp *interp, Tcl_DString *dsPtr); /* 121 */
2013
+ void (*tcl_DStringInit) (Tcl_DString *dsPtr); /* 122 */
2014
+ void (*tcl_DStringResult) (Tcl_Interp *interp, Tcl_DString *dsPtr); /* 123 */
2015
+ void (*tcl_DStringSetLength) (Tcl_DString *dsPtr, Tcl_Size length); /* 124 */
2016
+ void (*tcl_DStringStartSublist) (Tcl_DString *dsPtr); /* 125 */
2017
+ int (*tcl_Eof) (Tcl_Channel chan); /* 126 */
2018
+ const char * (*tcl_ErrnoId) (void); /* 127 */
2019
+ const char * (*tcl_ErrnoMsg) (int err); /* 128 */
2020
+ void (*reserved129)(void);
2021
+ int (*tcl_EvalFile) (Tcl_Interp *interp, const char *fileName); /* 130 */
2022
+ void (*reserved131)(void);
2023
+ void (*tcl_EventuallyFree) (void *clientData, Tcl_FreeProc *freeProc); /* 132 */
2024
+ TCL_NORETURN1 void (*tcl_Exit) (int status); /* 133 */
2025
+ int (*tcl_ExposeCommand) (Tcl_Interp *interp, const char *hiddenCmdToken, const char *cmdName); /* 134 */
2026
+ int (*tcl_ExprBoolean) (Tcl_Interp *interp, const char *expr, int *ptr); /* 135 */
2027
+ int (*tcl_ExprBooleanObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *ptr); /* 136 */
2028
+ int (*tcl_ExprDouble) (Tcl_Interp *interp, const char *expr, double *ptr); /* 137 */
2029
+ int (*tcl_ExprDoubleObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, double *ptr); /* 138 */
2030
+ int (*tcl_ExprLong) (Tcl_Interp *interp, const char *expr, long *ptr); /* 139 */
2031
+ int (*tcl_ExprLongObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, long *ptr); /* 140 */
2032
+ int (*tcl_ExprObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr); /* 141 */
2033
+ int (*tcl_ExprString) (Tcl_Interp *interp, const char *expr); /* 142 */
2034
+ void (*tcl_Finalize) (void); /* 143 */
2035
+ void (*reserved144)(void);
2036
+ Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable *tablePtr, Tcl_HashSearch *searchPtr); /* 145 */
2037
+ int (*tcl_Flush) (Tcl_Channel chan); /* 146 */
2038
+ void (*reserved147)(void);
2039
+ void (*reserved148)(void);
2040
+ int (*tclGetAliasObj) (Tcl_Interp *interp, const char *childCmd, Tcl_Interp **targetInterpPtr, const char **targetCmdPtr, int *objcPtr, Tcl_Obj ***objvPtr); /* 149 */
2041
+ void * (*tcl_GetAssocData) (Tcl_Interp *interp, const char *name, Tcl_InterpDeleteProc **procPtr); /* 150 */
2042
+ Tcl_Channel (*tcl_GetChannel) (Tcl_Interp *interp, const char *chanName, int *modePtr); /* 151 */
2043
+ Tcl_Size (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */
2044
+ int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, void **handlePtr); /* 153 */
2045
+ void * (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */
2046
+ int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */
2047
+ const char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */
2048
+ int (*tcl_GetChannelOption) (Tcl_Interp *interp, Tcl_Channel chan, const char *optionName, Tcl_DString *dsPtr); /* 157 */
2049
+ const Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */
2050
+ int (*tcl_GetCommandInfo) (Tcl_Interp *interp, const char *cmdName, Tcl_CmdInfo *infoPtr); /* 159 */
2051
+ const char * (*tcl_GetCommandName) (Tcl_Interp *interp, Tcl_Command command); /* 160 */
2052
+ int (*tcl_GetErrno) (void); /* 161 */
2053
+ const char * (*tcl_GetHostName) (void); /* 162 */
2054
+ int (*tcl_GetInterpPath) (Tcl_Interp *interp, Tcl_Interp *childInterp); /* 163 */
2055
+ Tcl_Interp * (*tcl_GetParent) (Tcl_Interp *interp); /* 164 */
2056
+ const char * (*tcl_GetNameOfExecutable) (void); /* 165 */
2057
+ Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp *interp); /* 166 */
2058
+ int (*tcl_GetOpenFile) (Tcl_Interp *interp, const char *chanID, int forWriting, int checkUsage, void **filePtr); /* 167 */
2059
+ Tcl_PathType (*tcl_GetPathType) (const char *path); /* 168 */
2060
+ Tcl_Size (*tcl_Gets) (Tcl_Channel chan, Tcl_DString *dsPtr); /* 169 */
2061
+ Tcl_Size (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj *objPtr); /* 170 */
2062
+ int (*tcl_GetServiceMode) (void); /* 171 */
2063
+ Tcl_Interp * (*tcl_GetChild) (Tcl_Interp *interp, const char *name); /* 172 */
2064
+ Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */
2065
+ void (*reserved174)(void);
2066
+ void (*reserved175)(void);
2067
+ const char * (*tcl_GetVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags); /* 176 */
2068
+ void (*reserved177)(void);
2069
+ void (*reserved178)(void);
2070
+ int (*tcl_HideCommand) (Tcl_Interp *interp, const char *cmdName, const char *hiddenCmdToken); /* 179 */
2071
+ int (*tcl_Init) (Tcl_Interp *interp); /* 180 */
2072
+ void (*tcl_InitHashTable) (Tcl_HashTable *tablePtr, int keyType); /* 181 */
2073
+ int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */
2074
+ int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */
2075
+ int (*tcl_InterpDeleted) (Tcl_Interp *interp); /* 184 */
2076
+ int (*tcl_IsSafe) (Tcl_Interp *interp); /* 185 */
2077
+ char * (*tcl_JoinPath) (Tcl_Size argc, const char *const *argv, Tcl_DString *resultPtr); /* 186 */
2078
+ int (*tcl_LinkVar) (Tcl_Interp *interp, const char *varName, void *addr, int type); /* 187 */
2079
+ void (*reserved188)(void);
2080
+ Tcl_Channel (*tcl_MakeFileChannel) (void *handle, int mode); /* 189 */
2081
+ void (*reserved190)(void);
2082
+ Tcl_Channel (*tcl_MakeTcpClientChannel) (void *tcpSocket); /* 191 */
2083
+ char * (*tcl_Merge) (Tcl_Size argc, const char *const *argv); /* 192 */
2084
+ Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch *searchPtr); /* 193 */
2085
+ void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */
2086
+ Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags); /* 195 */
2087
+ Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags); /* 196 */
2088
+ Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp *interp, Tcl_Size argc, const char **argv, int flags); /* 197 */
2089
+ Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp *interp, const char *fileName, const char *modeString, int permissions); /* 198 */
2090
+ Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp *interp, int port, const char *address, const char *myaddr, int myport, int flags); /* 199 */
2091
+ Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp *interp, int port, const char *host, Tcl_TcpAcceptProc *acceptProc, void *callbackData); /* 200 */
2092
+ void (*tcl_Preserve) (void *data); /* 201 */
2093
+ void (*tcl_PrintDouble) (Tcl_Interp *interp, double value, char *dst); /* 202 */
2094
+ int (*tcl_PutEnv) (const char *assignment); /* 203 */
2095
+ const char * (*tcl_PosixError) (Tcl_Interp *interp); /* 204 */
2096
+ void (*tcl_QueueEvent) (Tcl_Event *evPtr, int position); /* 205 */
2097
+ Tcl_Size (*tcl_Read) (Tcl_Channel chan, char *bufPtr, Tcl_Size toRead); /* 206 */
2098
+ void (*tcl_ReapDetachedProcs) (void); /* 207 */
2099
+ int (*tcl_RecordAndEval) (Tcl_Interp *interp, const char *cmd, int flags); /* 208 */
2100
+ int (*tcl_RecordAndEvalObj) (Tcl_Interp *interp, Tcl_Obj *cmdPtr, int flags); /* 209 */
2101
+ void (*tcl_RegisterChannel) (Tcl_Interp *interp, Tcl_Channel chan); /* 210 */
2102
+ void (*tcl_RegisterObjType) (const Tcl_ObjType *typePtr); /* 211 */
2103
+ Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp *interp, const char *pattern); /* 212 */
2104
+ int (*tcl_RegExpExec) (Tcl_Interp *interp, Tcl_RegExp regexp, const char *text, const char *start); /* 213 */
2105
+ int (*tcl_RegExpMatch) (Tcl_Interp *interp, const char *text, const char *pattern); /* 214 */
2106
+ void (*tcl_RegExpRange) (Tcl_RegExp regexp, Tcl_Size index, const char **startPtr, const char **endPtr); /* 215 */
2107
+ void (*tcl_Release) (void *clientData); /* 216 */
2108
+ void (*tcl_ResetResult) (Tcl_Interp *interp); /* 217 */
2109
+ Tcl_Size (*tcl_ScanElement) (const char *src, int *flagPtr); /* 218 */
2110
+ Tcl_Size (*tcl_ScanCountedElement) (const char *src, Tcl_Size length, int *flagPtr); /* 219 */
2111
+ void (*reserved220)(void);
2112
+ int (*tcl_ServiceAll) (void); /* 221 */
2113
+ int (*tcl_ServiceEvent) (int flags); /* 222 */
2114
+ void (*tcl_SetAssocData) (Tcl_Interp *interp, const char *name, Tcl_InterpDeleteProc *proc, void *clientData); /* 223 */
2115
+ void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, Tcl_Size sz); /* 224 */
2116
+ int (*tcl_SetChannelOption) (Tcl_Interp *interp, Tcl_Channel chan, const char *optionName, const char *newValue); /* 225 */
2117
+ int (*tcl_SetCommandInfo) (Tcl_Interp *interp, const char *cmdName, const Tcl_CmdInfo *infoPtr); /* 226 */
2118
+ void (*tcl_SetErrno) (int err); /* 227 */
2119
+ void (*tcl_SetErrorCode) (Tcl_Interp *interp, ...); /* 228 */
2120
+ void (*tcl_SetMaxBlockTime) (const Tcl_Time *timePtr); /* 229 */
2121
+ void (*reserved230)(void);
2122
+ Tcl_Size (*tcl_SetRecursionLimit) (Tcl_Interp *interp, Tcl_Size depth); /* 231 */
2123
+ void (*reserved232)(void);
2124
+ int (*tcl_SetServiceMode) (int mode); /* 233 */
2125
+ void (*tcl_SetObjErrorCode) (Tcl_Interp *interp, Tcl_Obj *errorObjPtr); /* 234 */
2126
+ void (*tcl_SetObjResult) (Tcl_Interp *interp, Tcl_Obj *resultObjPtr); /* 235 */
2127
+ void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */
2128
+ void (*reserved237)(void);
2129
+ const char * (*tcl_SetVar2) (Tcl_Interp *interp, const char *part1, const char *part2, const char *newValue, int flags); /* 238 */
2130
+ const char * (*tcl_SignalId) (int sig); /* 239 */
2131
+ const char * (*tcl_SignalMsg) (int sig); /* 240 */
2132
+ void (*tcl_SourceRCFile) (Tcl_Interp *interp); /* 241 */
2133
+ int (*tclSplitList) (Tcl_Interp *interp, const char *listStr, void *argcPtr, const char ***argvPtr); /* 242 */
2134
+ void (*tclSplitPath) (const char *path, void *argcPtr, const char ***argvPtr); /* 243 */
2135
+ void (*reserved244)(void);
2136
+ void (*reserved245)(void);
2137
+ void (*reserved246)(void);
2138
+ void (*reserved247)(void);
2139
+ int (*tcl_TraceVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, Tcl_VarTraceProc *proc, void *clientData); /* 248 */
2140
+ char * (*tcl_TranslateFileName) (Tcl_Interp *interp, const char *name, Tcl_DString *bufferPtr); /* 249 */
2141
+ Tcl_Size (*tcl_Ungets) (Tcl_Channel chan, const char *str, Tcl_Size len, int atHead); /* 250 */
2142
+ void (*tcl_UnlinkVar) (Tcl_Interp *interp, const char *varName); /* 251 */
2143
+ int (*tcl_UnregisterChannel) (Tcl_Interp *interp, Tcl_Channel chan); /* 252 */
2144
+ void (*reserved253)(void);
2145
+ int (*tcl_UnsetVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags); /* 254 */
2146
+ void (*reserved255)(void);
2147
+ void (*tcl_UntraceVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, Tcl_VarTraceProc *proc, void *clientData); /* 256 */
2148
+ void (*tcl_UpdateLinkedVar) (Tcl_Interp *interp, const char *varName); /* 257 */
2149
+ void (*reserved258)(void);
2150
+ int (*tcl_UpVar2) (Tcl_Interp *interp, const char *frameName, const char *part1, const char *part2, const char *localName, int flags); /* 259 */
2151
+ int (*tcl_VarEval) (Tcl_Interp *interp, ...); /* 260 */
2152
+ void (*reserved261)(void);
2153
+ void * (*tcl_VarTraceInfo2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, Tcl_VarTraceProc *procPtr, void *prevClientData); /* 262 */
2154
+ Tcl_Size (*tcl_Write) (Tcl_Channel chan, const char *s, Tcl_Size slen); /* 263 */
2155
+ void (*tcl_WrongNumArgs) (Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[], const char *message); /* 264 */
2156
+ int (*tcl_DumpActiveMemory) (const char *fileName); /* 265 */
2157
+ void (*tcl_ValidateAllMemory) (const char *file, int line); /* 266 */
2158
+ void (*reserved267)(void);
2159
+ void (*reserved268)(void);
2160
+ char * (*tcl_HashStats) (Tcl_HashTable *tablePtr); /* 269 */
2161
+ const char * (*tcl_ParseVar) (Tcl_Interp *interp, const char *start, const char **termPtr); /* 270 */
2162
+ void (*reserved271)(void);
2163
+ const char * (*tcl_PkgPresentEx) (Tcl_Interp *interp, const char *name, const char *version, int exact, void *clientDataPtr); /* 272 */
2164
+ void (*reserved273)(void);
2165
+ void (*reserved274)(void);
2166
+ void (*reserved275)(void);
2167
+ void (*reserved276)(void);
2168
+ Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int *statPtr, int options); /* 277 */
2169
+ void (*reserved278)(void);
2170
+ void (*tcl_GetVersion) (int *major, int *minor, int *patchLevel, int *type); /* 279 */
2171
+ void (*tcl_InitMemory) (Tcl_Interp *interp); /* 280 */
2172
+ Tcl_Channel (*tcl_StackChannel) (Tcl_Interp *interp, const Tcl_ChannelType *typePtr, void *instanceData, int mask, Tcl_Channel prevChan); /* 281 */
2173
+ int (*tcl_UnstackChannel) (Tcl_Interp *interp, Tcl_Channel chan); /* 282 */
2174
+ Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */
2175
+ void (*tcl_SetMainLoop) (Tcl_MainLoopProc *proc); /* 284 */
2176
+ int (*tcl_GetAliasObj) (Tcl_Interp *interp, const char *childCmd, Tcl_Interp **targetInterpPtr, const char **targetCmdPtr, Tcl_Size *objcPtr, Tcl_Obj ***objvPtr); /* 285 */
2177
+ void (*tcl_AppendObjToObj) (Tcl_Obj *objPtr, Tcl_Obj *appendObjPtr); /* 286 */
2178
+ Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType *typePtr); /* 287 */
2179
+ void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc *proc, void *clientData); /* 288 */
2180
+ void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc *proc, void *clientData); /* 289 */
2181
+ void (*reserved290)(void);
2182
+ int (*tcl_EvalEx) (Tcl_Interp *interp, const char *script, Tcl_Size numBytes, int flags); /* 291 */
2183
+ int (*tcl_EvalObjv) (Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[], int flags); /* 292 */
2184
+ int (*tcl_EvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 293 */
2185
+ TCL_NORETURN1 void (*tcl_ExitThread) (int status); /* 294 */
2186
+ int (*tcl_ExternalToUtf) (Tcl_Interp *interp, Tcl_Encoding encoding, const char *src, Tcl_Size srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, Tcl_Size dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); /* 295 */
2187
+ char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, const char *src, Tcl_Size srcLen, Tcl_DString *dsPtr); /* 296 */
2188
+ void (*tcl_FinalizeThread) (void); /* 297 */
2189
+ void (*tcl_FinalizeNotifier) (void *clientData); /* 298 */
2190
+ void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */
2191
+ Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */
2192
+ Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp *interp, const char *name); /* 301 */
2193
+ const char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */
2194
+ void (*tcl_GetEncodingNames) (Tcl_Interp *interp); /* 303 */
2195
+ int (*tcl_GetIndexFromObjStruct) (Tcl_Interp *interp, Tcl_Obj *objPtr, const void *tablePtr, Tcl_Size offset, const char *msg, int flags, void *indexPtr); /* 304 */
2196
+ void * (*tcl_GetThreadData) (Tcl_ThreadDataKey *keyPtr, Tcl_Size size); /* 305 */
2197
+ Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp *interp, const char *part1, const char *part2, int flags); /* 306 */
2198
+ void * (*tcl_InitNotifier) (void); /* 307 */
2199
+ void (*tcl_MutexLock) (Tcl_Mutex *mutexPtr); /* 308 */
2200
+ void (*tcl_MutexUnlock) (Tcl_Mutex *mutexPtr); /* 309 */
2201
+ void (*tcl_ConditionNotify) (Tcl_Condition *condPtr); /* 310 */
2202
+ void (*tcl_ConditionWait) (Tcl_Condition *condPtr, Tcl_Mutex *mutexPtr, const Tcl_Time *timePtr); /* 311 */
2203
+ Tcl_Size (*tclNumUtfChars) (const char *src, Tcl_Size length); /* 312 */
2204
+ Tcl_Size (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj *objPtr, Tcl_Size charsToRead, int appendFlag); /* 313 */
2205
+ void (*reserved314)(void);
2206
+ void (*reserved315)(void);
2207
+ int (*tcl_SetSystemEncoding) (Tcl_Interp *interp, const char *name); /* 316 */
2208
+ Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp *interp, const char *part1, const char *part2, Tcl_Obj *newValuePtr, int flags); /* 317 */
2209
+ void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */
2210
+ void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event *evPtr, int position); /* 319 */
2211
+ int (*tcl_UniCharAtIndex) (const char *src, Tcl_Size index); /* 320 */
2212
+ int (*tcl_UniCharToLower) (int ch); /* 321 */
2213
+ int (*tcl_UniCharToTitle) (int ch); /* 322 */
2214
+ int (*tcl_UniCharToUpper) (int ch); /* 323 */
2215
+ Tcl_Size (*tcl_UniCharToUtf) (int ch, char *buf); /* 324 */
2216
+ const char * (*tclUtfAtIndex) (const char *src, Tcl_Size index); /* 325 */
2217
+ int (*tclUtfCharComplete) (const char *src, Tcl_Size length); /* 326 */
2218
+ Tcl_Size (*tcl_UtfBackslash) (const char *src, int *readPtr, char *dst); /* 327 */
2219
+ const char * (*tcl_UtfFindFirst) (const char *src, int ch); /* 328 */
2220
+ const char * (*tcl_UtfFindLast) (const char *src, int ch); /* 329 */
2221
+ const char * (*tclUtfNext) (const char *src); /* 330 */
2222
+ const char * (*tclUtfPrev) (const char *src, const char *start); /* 331 */
2223
+ int (*tcl_UtfToExternal) (Tcl_Interp *interp, Tcl_Encoding encoding, const char *src, Tcl_Size srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, Tcl_Size dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); /* 332 */
2224
+ char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, const char *src, Tcl_Size srcLen, Tcl_DString *dsPtr); /* 333 */
2225
+ Tcl_Size (*tcl_UtfToLower) (char *src); /* 334 */
2226
+ Tcl_Size (*tcl_UtfToTitle) (char *src); /* 335 */
2227
+ Tcl_Size (*tcl_UtfToChar16) (const char *src, unsigned short *chPtr); /* 336 */
2228
+ Tcl_Size (*tcl_UtfToUpper) (char *src); /* 337 */
2229
+ Tcl_Size (*tcl_WriteChars) (Tcl_Channel chan, const char *src, Tcl_Size srcLen); /* 338 */
2230
+ Tcl_Size (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj *objPtr); /* 339 */
2231
+ char * (*tcl_GetString) (Tcl_Obj *objPtr); /* 340 */
2232
+ void (*reserved341)(void);
2233
+ void (*reserved342)(void);
2234
+ void (*tcl_AlertNotifier) (void *clientData); /* 343 */
2235
+ void (*tcl_ServiceModeHook) (int mode); /* 344 */
2236
+ int (*tcl_UniCharIsAlnum) (int ch); /* 345 */
2237
+ int (*tcl_UniCharIsAlpha) (int ch); /* 346 */
2238
+ int (*tcl_UniCharIsDigit) (int ch); /* 347 */
2239
+ int (*tcl_UniCharIsLower) (int ch); /* 348 */
2240
+ int (*tcl_UniCharIsSpace) (int ch); /* 349 */
2241
+ int (*tcl_UniCharIsUpper) (int ch); /* 350 */
2242
+ int (*tcl_UniCharIsWordChar) (int ch); /* 351 */
2243
+ Tcl_Size (*tcl_Char16Len) (const unsigned short *uniStr); /* 352 */
2244
+ void (*reserved353)(void);
2245
+ char * (*tcl_Char16ToUtfDString) (const unsigned short *uniStr, Tcl_Size uniLength, Tcl_DString *dsPtr); /* 354 */
2246
+ unsigned short * (*tcl_UtfToChar16DString) (const char *src, Tcl_Size length, Tcl_DString *dsPtr); /* 355 */
2247
+ Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp *interp, Tcl_Obj *patObj, int flags); /* 356 */
2248
+ void (*reserved357)(void);
2249
+ void (*tcl_FreeParse) (Tcl_Parse *parsePtr); /* 358 */
2250
+ void (*tcl_LogCommandInfo) (Tcl_Interp *interp, const char *script, const char *command, Tcl_Size length); /* 359 */
2251
+ int (*tcl_ParseBraces) (Tcl_Interp *interp, const char *start, Tcl_Size numBytes, Tcl_Parse *parsePtr, int append, const char **termPtr); /* 360 */
2252
+ int (*tcl_ParseCommand) (Tcl_Interp *interp, const char *start, Tcl_Size numBytes, int nested, Tcl_Parse *parsePtr); /* 361 */
2253
+ int (*tcl_ParseExpr) (Tcl_Interp *interp, const char *start, Tcl_Size numBytes, Tcl_Parse *parsePtr); /* 362 */
2254
+ int (*tcl_ParseQuotedString) (Tcl_Interp *interp, const char *start, Tcl_Size numBytes, Tcl_Parse *parsePtr, int append, const char **termPtr); /* 363 */
2255
+ int (*tcl_ParseVarName) (Tcl_Interp *interp, const char *start, Tcl_Size numBytes, Tcl_Parse *parsePtr, int append); /* 364 */
2256
+ char * (*tcl_GetCwd) (Tcl_Interp *interp, Tcl_DString *cwdPtr); /* 365 */
2257
+ int (*tcl_Chdir) (const char *dirName); /* 366 */
2258
+ int (*tcl_Access) (const char *path, int mode); /* 367 */
2259
+ int (*tcl_Stat) (const char *path, struct stat *bufPtr); /* 368 */
2260
+ int (*tclUtfNcmp) (const char *s1, const char *s2, size_t n); /* 369 */
2261
+ int (*tclUtfNcasecmp) (const char *s1, const char *s2, size_t n); /* 370 */
2262
+ int (*tcl_StringCaseMatch) (const char *str, const char *pattern, int nocase); /* 371 */
2263
+ int (*tcl_UniCharIsControl) (int ch); /* 372 */
2264
+ int (*tcl_UniCharIsGraph) (int ch); /* 373 */
2265
+ int (*tcl_UniCharIsPrint) (int ch); /* 374 */
2266
+ int (*tcl_UniCharIsPunct) (int ch); /* 375 */
2267
+ int (*tcl_RegExpExecObj) (Tcl_Interp *interp, Tcl_RegExp regexp, Tcl_Obj *textObj, Tcl_Size offset, Tcl_Size nmatches, int flags); /* 376 */
2268
+ void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr); /* 377 */
2269
+ Tcl_Obj * (*tcl_NewUnicodeObj) (const Tcl_UniChar *unicode, Tcl_Size numChars); /* 378 */
2270
+ void (*tcl_SetUnicodeObj) (Tcl_Obj *objPtr, const Tcl_UniChar *unicode, Tcl_Size numChars); /* 379 */
2271
+ Tcl_Size (*tclGetCharLength) (Tcl_Obj *objPtr); /* 380 */
2272
+ int (*tclGetUniChar) (Tcl_Obj *objPtr, Tcl_Size index); /* 381 */
2273
+ void (*reserved382)(void);
2274
+ Tcl_Obj * (*tclGetRange) (Tcl_Obj *objPtr, Tcl_Size first, Tcl_Size last); /* 383 */
2275
+ void (*tcl_AppendUnicodeToObj) (Tcl_Obj *objPtr, const Tcl_UniChar *unicode, Tcl_Size length); /* 384 */
2276
+ int (*tcl_RegExpMatchObj) (Tcl_Interp *interp, Tcl_Obj *textObj, Tcl_Obj *patternObj); /* 385 */
2277
+ void (*tcl_SetNotifier) (const Tcl_NotifierProcs *notifierProcPtr); /* 386 */
2278
+ Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */
2279
+ int (*tcl_GetChannelNames) (Tcl_Interp *interp); /* 388 */
2280
+ int (*tcl_GetChannelNamesEx) (Tcl_Interp *interp, const char *pattern); /* 389 */
2281
+ int (*tcl_ProcObjCmd) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 390 */
2282
+ void (*tcl_ConditionFinalize) (Tcl_Condition *condPtr); /* 391 */
2283
+ void (*tcl_MutexFinalize) (Tcl_Mutex *mutex); /* 392 */
2284
+ int (*tcl_CreateThread) (Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc *proc, void *clientData, TCL_HASH_TYPE stackSize, int flags); /* 393 */
2285
+ Tcl_Size (*tcl_ReadRaw) (Tcl_Channel chan, char *dst, Tcl_Size bytesToRead); /* 394 */
2286
+ Tcl_Size (*tcl_WriteRaw) (Tcl_Channel chan, const char *src, Tcl_Size srcLen); /* 395 */
2287
+ Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */
2288
+ int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */
2289
+ const char * (*tcl_ChannelName) (const Tcl_ChannelType *chanTypePtr); /* 398 */
2290
+ Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (const Tcl_ChannelType *chanTypePtr); /* 399 */
2291
+ Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (const Tcl_ChannelType *chanTypePtr); /* 400 */
2292
+ void (*reserved401)(void);
2293
+ Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (const Tcl_ChannelType *chanTypePtr); /* 402 */
2294
+ Tcl_DriverInputProc * (*tcl_ChannelInputProc) (const Tcl_ChannelType *chanTypePtr); /* 403 */
2295
+ Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (const Tcl_ChannelType *chanTypePtr); /* 404 */
2296
+ void (*reserved405)(void);
2297
+ Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (const Tcl_ChannelType *chanTypePtr); /* 406 */
2298
+ Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (const Tcl_ChannelType *chanTypePtr); /* 407 */
2299
+ Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (const Tcl_ChannelType *chanTypePtr); /* 408 */
2300
+ Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (const Tcl_ChannelType *chanTypePtr); /* 409 */
2301
+ Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (const Tcl_ChannelType *chanTypePtr); /* 410 */
2302
+ Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (const Tcl_ChannelType *chanTypePtr); /* 411 */
2303
+ int (*tcl_JoinThread) (Tcl_ThreadId threadId, int *result); /* 412 */
2304
+ int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */
2305
+ int (*tcl_IsChannelRegistered) (Tcl_Interp *interp, Tcl_Channel channel); /* 414 */
2306
+ void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */
2307
+ void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */
2308
+ void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */
2309
+ int (*tcl_IsChannelExisting) (const char *channelName); /* 418 */
2310
+ void (*reserved419)(void);
2311
+ void (*reserved420)(void);
2312
+ void (*reserved421)(void);
2313
+ Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable *tablePtr, const void *key, int *newPtr); /* 422 */
2314
+ void (*tcl_InitCustomHashTable) (Tcl_HashTable *tablePtr, int keyType, const Tcl_HashKeyType *typePtr); /* 423 */
2315
+ void (*tcl_InitObjHashTable) (Tcl_HashTable *tablePtr); /* 424 */
2316
+ void * (*tcl_CommandTraceInfo) (Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *procPtr, void *prevClientData); /* 425 */
2317
+ int (*tcl_TraceCommand) (Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *proc, void *clientData); /* 426 */
2318
+ void (*tcl_UntraceCommand) (Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *proc, void *clientData); /* 427 */
2319
+ void * (*tcl_AttemptAlloc) (TCL_HASH_TYPE size); /* 428 */
2320
+ void * (*tcl_AttemptDbCkalloc) (TCL_HASH_TYPE size, const char *file, int line); /* 429 */
2321
+ void * (*tcl_AttemptRealloc) (void *ptr, TCL_HASH_TYPE size); /* 430 */
2322
+ void * (*tcl_AttemptDbCkrealloc) (void *ptr, TCL_HASH_TYPE size, const char *file, int line); /* 431 */
2323
+ int (*tcl_AttemptSetObjLength) (Tcl_Obj *objPtr, Tcl_Size length); /* 432 */
2324
+ Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */
2325
+ Tcl_UniChar * (*tclGetUnicodeFromObj) (Tcl_Obj *objPtr, void *lengthPtr); /* 434 */
2326
+ void (*reserved435)(void);
2327
+ void (*reserved436)(void);
2328
+ Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 437 */
2329
+ int (*tcl_DetachChannel) (Tcl_Interp *interp, Tcl_Channel channel); /* 438 */
2330
+ int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */
2331
+ int (*tcl_FSCopyFile) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); /* 440 */
2332
+ int (*tcl_FSCopyDirectory) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr); /* 441 */
2333
+ int (*tcl_FSCreateDirectory) (Tcl_Obj *pathPtr); /* 442 */
2334
+ int (*tcl_FSDeleteFile) (Tcl_Obj *pathPtr); /* 443 */
2335
+ int (*tcl_FSLoadFile) (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *sym1, const char *sym2, Tcl_LibraryInitProc **proc1Ptr, Tcl_LibraryInitProc **proc2Ptr, Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr); /* 444 */
2336
+ int (*tcl_FSMatchInDirectory) (Tcl_Interp *interp, Tcl_Obj *result, Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types); /* 445 */
2337
+ Tcl_Obj * (*tcl_FSLink) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr, int linkAction); /* 446 */
2338
+ int (*tcl_FSRemoveDirectory) (Tcl_Obj *pathPtr, int recursive, Tcl_Obj **errorPtr); /* 447 */
2339
+ int (*tcl_FSRenameFile) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); /* 448 */
2340
+ int (*tcl_FSLstat) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); /* 449 */
2341
+ int (*tcl_FSUtime) (Tcl_Obj *pathPtr, struct utimbuf *tval); /* 450 */
2342
+ int (*tcl_FSFileAttrsGet) (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); /* 451 */
2343
+ int (*tcl_FSFileAttrsSet) (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr); /* 452 */
2344
+ const char *const * (*tcl_FSFileAttrStrings) (Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); /* 453 */
2345
+ int (*tcl_FSStat) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); /* 454 */
2346
+ int (*tcl_FSAccess) (Tcl_Obj *pathPtr, int mode); /* 455 */
2347
+ Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *modeString, int permissions); /* 456 */
2348
+ Tcl_Obj * (*tcl_FSGetCwd) (Tcl_Interp *interp); /* 457 */
2349
+ int (*tcl_FSChdir) (Tcl_Obj *pathPtr); /* 458 */
2350
+ int (*tcl_FSConvertToPathType) (Tcl_Interp *interp, Tcl_Obj *pathPtr); /* 459 */
2351
+ Tcl_Obj * (*tcl_FSJoinPath) (Tcl_Obj *listObj, Tcl_Size elements); /* 460 */
2352
+ Tcl_Obj * (*tclFSSplitPath) (Tcl_Obj *pathPtr, void *lenPtr); /* 461 */
2353
+ int (*tcl_FSEqualPaths) (Tcl_Obj *firstPtr, Tcl_Obj *secondPtr); /* 462 */
2354
+ Tcl_Obj * (*tcl_FSGetNormalizedPath) (Tcl_Interp *interp, Tcl_Obj *pathPtr); /* 463 */
2355
+ Tcl_Obj * (*tcl_FSJoinToPath) (Tcl_Obj *pathPtr, Tcl_Size objc, Tcl_Obj *const objv[]); /* 464 */
2356
+ void * (*tcl_FSGetInternalRep) (Tcl_Obj *pathPtr, const Tcl_Filesystem *fsPtr); /* 465 */
2357
+ Tcl_Obj * (*tcl_FSGetTranslatedPath) (Tcl_Interp *interp, Tcl_Obj *pathPtr); /* 466 */
2358
+ int (*tcl_FSEvalFile) (Tcl_Interp *interp, Tcl_Obj *fileName); /* 467 */
2359
+ Tcl_Obj * (*tcl_FSNewNativePath) (const Tcl_Filesystem *fromFilesystem, void *clientData); /* 468 */
2360
+ const void * (*tcl_FSGetNativePath) (Tcl_Obj *pathPtr); /* 469 */
2361
+ Tcl_Obj * (*tcl_FSFileSystemInfo) (Tcl_Obj *pathPtr); /* 470 */
2362
+ Tcl_Obj * (*tcl_FSPathSeparator) (Tcl_Obj *pathPtr); /* 471 */
2363
+ Tcl_Obj * (*tcl_FSListVolumes) (void); /* 472 */
2364
+ int (*tcl_FSRegister) (void *clientData, const Tcl_Filesystem *fsPtr); /* 473 */
2365
+ int (*tcl_FSUnregister) (const Tcl_Filesystem *fsPtr); /* 474 */
2366
+ void * (*tcl_FSData) (const Tcl_Filesystem *fsPtr); /* 475 */
2367
+ const char * (*tcl_FSGetTranslatedStringPath) (Tcl_Interp *interp, Tcl_Obj *pathPtr); /* 476 */
2368
+ const Tcl_Filesystem * (*tcl_FSGetFileSystemForPath) (Tcl_Obj *pathPtr); /* 477 */
2369
+ Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj *pathPtr); /* 478 */
2370
+ int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */
2371
+ void (*tcl_FSMountsChanged) (const Tcl_Filesystem *fsPtr); /* 480 */
2372
+ int (*tcl_EvalTokensStandard) (Tcl_Interp *interp, Tcl_Token *tokenPtr, Tcl_Size count); /* 481 */
2373
+ void (*tcl_GetTime) (Tcl_Time *timeBuf); /* 482 */
2374
+ Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp *interp, Tcl_Size level, int flags, Tcl_CmdObjTraceProc *objProc, void *clientData, Tcl_CmdObjTraceDeleteProc *delProc); /* 483 */
2375
+ int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo *infoPtr); /* 484 */
2376
+ int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, const Tcl_CmdInfo *infoPtr); /* 485 */
2377
+ Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, const char *file, int line); /* 486 */
2378
+ int (*tcl_GetWideIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideInt *widePtr); /* 487 */
2379
+ Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */
2380
+ void (*tcl_SetWideIntObj) (Tcl_Obj *objPtr, Tcl_WideInt wideValue); /* 489 */
2381
+ Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */
2382
+ long long (*tcl_Seek) (Tcl_Channel chan, long long offset, int mode); /* 491 */
2383
+ long long (*tcl_Tell) (Tcl_Channel chan); /* 492 */
2384
+ Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (const Tcl_ChannelType *chanTypePtr); /* 493 */
2385
+ int (*tcl_DictObjPut) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr, Tcl_Obj *valuePtr); /* 494 */
2386
+ int (*tcl_DictObjGet) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr, Tcl_Obj **valuePtrPtr); /* 495 */
2387
+ int (*tcl_DictObjRemove) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr); /* 496 */
2388
+ int (*tclDictObjSize) (Tcl_Interp *interp, Tcl_Obj *dictPtr, void *sizePtr); /* 497 */
2389
+ int (*tcl_DictObjFirst) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_DictSearch *searchPtr, Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr, int *donePtr); /* 498 */
2390
+ void (*tcl_DictObjNext) (Tcl_DictSearch *searchPtr, Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr, int *donePtr); /* 499 */
2391
+ void (*tcl_DictObjDone) (Tcl_DictSearch *searchPtr); /* 500 */
2392
+ int (*tcl_DictObjPutKeyList) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Size keyc, Tcl_Obj *const *keyv, Tcl_Obj *valuePtr); /* 501 */
2393
+ int (*tcl_DictObjRemoveKeyList) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Size keyc, Tcl_Obj *const *keyv); /* 502 */
2394
+ Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */
2395
+ Tcl_Obj * (*tcl_DbNewDictObj) (const char *file, int line); /* 504 */
2396
+ void (*tcl_RegisterConfig) (Tcl_Interp *interp, const char *pkgName, const Tcl_Config *configuration, const char *valEncoding); /* 505 */
2397
+ Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp *interp, const char *name, void *clientData, Tcl_NamespaceDeleteProc *deleteProc); /* 506 */
2398
+ void (*tcl_DeleteNamespace) (Tcl_Namespace *nsPtr); /* 507 */
2399
+ int (*tcl_AppendExportList) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, Tcl_Obj *objPtr); /* 508 */
2400
+ int (*tcl_Export) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern, int resetListFirst); /* 509 */
2401
+ int (*tcl_Import) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern, int allowOverwrite); /* 510 */
2402
+ int (*tcl_ForgetImport) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern); /* 511 */
2403
+ Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp *interp); /* 512 */
2404
+ Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp *interp); /* 513 */
2405
+ Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 514 */
2406
+ Tcl_Command (*tcl_FindCommand) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 515 */
2407
+ Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 516 */
2408
+ void (*tcl_GetCommandFullName) (Tcl_Interp *interp, Tcl_Command command, Tcl_Obj *objPtr); /* 517 */
2409
+ int (*tcl_FSEvalFileEx) (Tcl_Interp *interp, Tcl_Obj *fileName, const char *encodingName); /* 518 */
2410
+ void (*reserved519)(void);
2411
+ void (*tcl_LimitAddHandler) (Tcl_Interp *interp, int type, Tcl_LimitHandlerProc *handlerProc, void *clientData, Tcl_LimitHandlerDeleteProc *deleteProc); /* 520 */
2412
+ void (*tcl_LimitRemoveHandler) (Tcl_Interp *interp, int type, Tcl_LimitHandlerProc *handlerProc, void *clientData); /* 521 */
2413
+ int (*tcl_LimitReady) (Tcl_Interp *interp); /* 522 */
2414
+ int (*tcl_LimitCheck) (Tcl_Interp *interp); /* 523 */
2415
+ int (*tcl_LimitExceeded) (Tcl_Interp *interp); /* 524 */
2416
+ void (*tcl_LimitSetCommands) (Tcl_Interp *interp, Tcl_Size commandLimit); /* 525 */
2417
+ void (*tcl_LimitSetTime) (Tcl_Interp *interp, Tcl_Time *timeLimitPtr); /* 526 */
2418
+ void (*tcl_LimitSetGranularity) (Tcl_Interp *interp, int type, int granularity); /* 527 */
2419
+ int (*tcl_LimitTypeEnabled) (Tcl_Interp *interp, int type); /* 528 */
2420
+ int (*tcl_LimitTypeExceeded) (Tcl_Interp *interp, int type); /* 529 */
2421
+ void (*tcl_LimitTypeSet) (Tcl_Interp *interp, int type); /* 530 */
2422
+ void (*tcl_LimitTypeReset) (Tcl_Interp *interp, int type); /* 531 */
2423
+ Tcl_Size (*tcl_LimitGetCommands) (Tcl_Interp *interp); /* 532 */
2424
+ void (*tcl_LimitGetTime) (Tcl_Interp *interp, Tcl_Time *timeLimitPtr); /* 533 */
2425
+ int (*tcl_LimitGetGranularity) (Tcl_Interp *interp, int type); /* 534 */
2426
+ Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp *interp, int status); /* 535 */
2427
+ int (*tcl_RestoreInterpState) (Tcl_Interp *interp, Tcl_InterpState state); /* 536 */
2428
+ void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */
2429
+ int (*tcl_SetReturnOptions) (Tcl_Interp *interp, Tcl_Obj *options); /* 538 */
2430
+ Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp *interp, int result); /* 539 */
2431
+ int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */
2432
+ Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp *interp, const char *name, Tcl_Namespace *namespacePtr, int flags); /* 541 */
2433
+ Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp *interp, Tcl_Obj *cmdNameObj, int flags); /* 542 */
2434
+ int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *subcmdList); /* 543 */
2435
+ int (*tcl_SetEnsembleMappingDict) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *mapDict); /* 544 */
2436
+ int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *unknownList); /* 545 */
2437
+ int (*tcl_SetEnsembleFlags) (Tcl_Interp *interp, Tcl_Command token, int flags); /* 546 */
2438
+ int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **subcmdListPtr); /* 547 */
2439
+ int (*tcl_GetEnsembleMappingDict) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **mapDictPtr); /* 548 */
2440
+ int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **unknownListPtr); /* 549 */
2441
+ int (*tcl_GetEnsembleFlags) (Tcl_Interp *interp, Tcl_Command token, int *flagsPtr); /* 550 */
2442
+ int (*tcl_GetEnsembleNamespace) (Tcl_Interp *interp, Tcl_Command token, Tcl_Namespace **namespacePtrPtr); /* 551 */
2443
+ void (*tcl_SetTimeProc) (Tcl_GetTimeProc *getProc, Tcl_ScaleTimeProc *scaleProc, void *clientData); /* 552 */
2444
+ void (*tcl_QueryTimeProc) (Tcl_GetTimeProc **getProc, Tcl_ScaleTimeProc **scaleProc, void **clientData); /* 553 */
2445
+ Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (const Tcl_ChannelType *chanTypePtr); /* 554 */
2446
+ Tcl_Obj * (*tcl_NewBignumObj) (void *value); /* 555 */
2447
+ Tcl_Obj * (*tcl_DbNewBignumObj) (void *value, const char *file, int line); /* 556 */
2448
+ void (*tcl_SetBignumObj) (Tcl_Obj *obj, void *value); /* 557 */
2449
+ int (*tcl_GetBignumFromObj) (Tcl_Interp *interp, Tcl_Obj *obj, void *value); /* 558 */
2450
+ int (*tcl_TakeBignumFromObj) (Tcl_Interp *interp, Tcl_Obj *obj, void *value); /* 559 */
2451
+ int (*tcl_TruncateChannel) (Tcl_Channel chan, long long length); /* 560 */
2452
+ Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType *chanTypePtr); /* 561 */
2453
+ void (*tcl_SetChannelErrorInterp) (Tcl_Interp *interp, Tcl_Obj *msg); /* 562 */
2454
+ void (*tcl_GetChannelErrorInterp) (Tcl_Interp *interp, Tcl_Obj **msg); /* 563 */
2455
+ void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj *msg); /* 564 */
2456
+ void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj **msg); /* 565 */
2457
+ int (*tcl_InitBignumFromDouble) (Tcl_Interp *interp, double initval, void *toInit); /* 566 */
2458
+ Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp *interp, Tcl_Namespace *nsPtr); /* 567 */
2459
+ int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, Tcl_Obj *handlerPtr); /* 568 */
2460
+ int (*tcl_GetEncodingFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr); /* 569 */
2461
+ Tcl_Obj * (*tcl_GetEncodingSearchPath) (void); /* 570 */
2462
+ int (*tcl_SetEncodingSearchPath) (Tcl_Obj *searchPath); /* 571 */
2463
+ const char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString *bufPtr); /* 572 */
2464
+ int (*tcl_PkgRequireProc) (Tcl_Interp *interp, const char *name, Tcl_Size objc, Tcl_Obj *const objv[], void *clientDataPtr); /* 573 */
2465
+ void (*tcl_AppendObjToErrorInfo) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 574 */
2466
+ void (*tcl_AppendLimitedToObj) (Tcl_Obj *objPtr, const char *bytes, Tcl_Size length, Tcl_Size limit, const char *ellipsis); /* 575 */
2467
+ Tcl_Obj * (*tcl_Format) (Tcl_Interp *interp, const char *format, Tcl_Size objc, Tcl_Obj *const objv[]); /* 576 */
2468
+ int (*tcl_AppendFormatToObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, const char *format, Tcl_Size objc, Tcl_Obj *const objv[]); /* 577 */
2469
+ Tcl_Obj * (*tcl_ObjPrintf) (const char *format, ...) TCL_FORMAT_PRINTF(1, 2); /* 578 */
2470
+ void (*tcl_AppendPrintfToObj) (Tcl_Obj *objPtr, const char *format, ...) TCL_FORMAT_PRINTF(2, 3); /* 579 */
2471
+ int (*tcl_CancelEval) (Tcl_Interp *interp, Tcl_Obj *resultObjPtr, void *clientData, int flags); /* 580 */
2472
+ int (*tcl_Canceled) (Tcl_Interp *interp, int flags); /* 581 */
2473
+ int (*tcl_CreatePipe) (Tcl_Interp *interp, Tcl_Channel *rchan, Tcl_Channel *wchan, int flags); /* 582 */
2474
+ Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc *proc, Tcl_ObjCmdProc *nreProc, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 583 */
2475
+ int (*tcl_NREvalObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 584 */
2476
+ int (*tcl_NREvalObjv) (Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[], int flags); /* 585 */
2477
+ int (*tcl_NRCmdSwap) (Tcl_Interp *interp, Tcl_Command cmd, Tcl_Size objc, Tcl_Obj *const objv[], int flags); /* 586 */
2478
+ void (*tcl_NRAddCallback) (Tcl_Interp *interp, Tcl_NRPostProc *postProcPtr, void *data0, void *data1, void *data2, void *data3); /* 587 */
2479
+ int (*tcl_NRCallObjProc) (Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, void *clientData, Tcl_Size objc, Tcl_Obj *const objv[]); /* 588 */
2480
+ unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf *statPtr); /* 589 */
2481
+ unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf *statPtr); /* 590 */
2482
+ unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf *statPtr); /* 591 */
2483
+ int (*tcl_GetLinkCountFromStat) (const Tcl_StatBuf *statPtr); /* 592 */
2484
+ int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf *statPtr); /* 593 */
2485
+ int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf *statPtr); /* 594 */
2486
+ int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf *statPtr); /* 595 */
2487
+ long long (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf *statPtr); /* 596 */
2488
+ long long (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf *statPtr); /* 597 */
2489
+ long long (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf *statPtr); /* 598 */
2490
+ unsigned long long (*tcl_GetSizeFromStat) (const Tcl_StatBuf *statPtr); /* 599 */
2491
+ unsigned long long (*tcl_GetBlocksFromStat) (const Tcl_StatBuf *statPtr); /* 600 */
2492
+ unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf *statPtr); /* 601 */
2493
+ int (*tcl_SetEnsembleParameterList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *paramList); /* 602 */
2494
+ int (*tcl_GetEnsembleParameterList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **paramListPtr); /* 603 */
2495
+ int (*tclParseArgsObjv) (Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, void *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv); /* 604 */
2496
+ int (*tcl_GetErrorLine) (Tcl_Interp *interp); /* 605 */
2497
+ void (*tcl_SetErrorLine) (Tcl_Interp *interp, int lineNum); /* 606 */
2498
+ void (*tcl_TransferResult) (Tcl_Interp *sourceInterp, int code, Tcl_Interp *targetInterp); /* 607 */
2499
+ int (*tcl_InterpActive) (Tcl_Interp *interp); /* 608 */
2500
+ void (*tcl_BackgroundException) (Tcl_Interp *interp, int code); /* 609 */
2501
+ int (*tcl_ZlibDeflate) (Tcl_Interp *interp, int format, Tcl_Obj *data, int level, Tcl_Obj *gzipHeaderDictObj); /* 610 */
2502
+ int (*tcl_ZlibInflate) (Tcl_Interp *interp, int format, Tcl_Obj *data, Tcl_Size buffersize, Tcl_Obj *gzipHeaderDictObj); /* 611 */
2503
+ unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const unsigned char *buf, Tcl_Size len); /* 612 */
2504
+ unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const unsigned char *buf, Tcl_Size len); /* 613 */
2505
+ int (*tcl_ZlibStreamInit) (Tcl_Interp *interp, int mode, int format, int level, Tcl_Obj *dictObj, Tcl_ZlibStream *zshandle); /* 614 */
2506
+ Tcl_Obj * (*tcl_ZlibStreamGetCommandName) (Tcl_ZlibStream zshandle); /* 615 */
2507
+ int (*tcl_ZlibStreamEof) (Tcl_ZlibStream zshandle); /* 616 */
2508
+ int (*tcl_ZlibStreamChecksum) (Tcl_ZlibStream zshandle); /* 617 */
2509
+ int (*tcl_ZlibStreamPut) (Tcl_ZlibStream zshandle, Tcl_Obj *data, int flush); /* 618 */
2510
+ int (*tcl_ZlibStreamGet) (Tcl_ZlibStream zshandle, Tcl_Obj *data, Tcl_Size count); /* 619 */
2511
+ int (*tcl_ZlibStreamClose) (Tcl_ZlibStream zshandle); /* 620 */
2512
+ int (*tcl_ZlibStreamReset) (Tcl_ZlibStream zshandle); /* 621 */
2513
+ void (*tcl_SetStartupScript) (Tcl_Obj *path, const char *encoding); /* 622 */
2514
+ Tcl_Obj * (*tcl_GetStartupScript) (const char **encodingPtr); /* 623 */
2515
+ int (*tcl_CloseEx) (Tcl_Interp *interp, Tcl_Channel chan, int flags); /* 624 */
2516
+ int (*tcl_NRExprObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *resultPtr); /* 625 */
2517
+ int (*tcl_NRSubstObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 626 */
2518
+ int (*tcl_LoadFile) (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *const symv[], int flags, void *procPtrs, Tcl_LoadHandle *handlePtr); /* 627 */
2519
+ void * (*tcl_FindSymbol) (Tcl_Interp *interp, Tcl_LoadHandle handle, const char *symbol); /* 628 */
2520
+ int (*tcl_FSUnloadFile) (Tcl_Interp *interp, Tcl_LoadHandle handlePtr); /* 629 */
2521
+ void (*tcl_ZlibStreamSetCompressionDictionary) (Tcl_ZlibStream zhandle, Tcl_Obj *compressionDictionaryObj); /* 630 */
2522
+ Tcl_Channel (*tcl_OpenTcpServerEx) (Tcl_Interp *interp, const char *service, const char *host, unsigned int flags, int backlog, Tcl_TcpAcceptProc *acceptProc, void *callbackData); /* 631 */
2523
+ int (*tclZipfs_Mount) (Tcl_Interp *interp, const char *zipname, const char *mountPoint, const char *passwd); /* 632 */
2524
+ int (*tclZipfs_Unmount) (Tcl_Interp *interp, const char *mountPoint); /* 633 */
2525
+ Tcl_Obj * (*tclZipfs_TclLibrary) (void); /* 634 */
2526
+ int (*tclZipfs_MountBuffer) (Tcl_Interp *interp, const void *data, size_t datalen, const char *mountPoint, int copy); /* 635 */
2527
+ void (*tcl_FreeInternalRep) (Tcl_Obj *objPtr); /* 636 */
2528
+ char * (*tcl_InitStringRep) (Tcl_Obj *objPtr, const char *bytes, TCL_HASH_TYPE numBytes); /* 637 */
2529
+ Tcl_ObjInternalRep * (*tcl_FetchInternalRep) (Tcl_Obj *objPtr, const Tcl_ObjType *typePtr); /* 638 */
2530
+ void (*tcl_StoreInternalRep) (Tcl_Obj *objPtr, const Tcl_ObjType *typePtr, const Tcl_ObjInternalRep *irPtr); /* 639 */
2531
+ int (*tcl_HasStringRep) (Tcl_Obj *objPtr); /* 640 */
2532
+ void (*tcl_IncrRefCount) (Tcl_Obj *objPtr); /* 641 */
2533
+ void (*tcl_DecrRefCount) (Tcl_Obj *objPtr); /* 642 */
2534
+ int (*tcl_IsShared) (Tcl_Obj *objPtr); /* 643 */
2535
+ int (*tcl_LinkArray) (Tcl_Interp *interp, const char *varName, void *addr, int type, Tcl_Size size); /* 644 */
2536
+ int (*tcl_GetIntForIndex) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size endValue, Tcl_Size *indexPtr); /* 645 */
2537
+ Tcl_Size (*tcl_UtfToUniChar) (const char *src, int *chPtr); /* 646 */
2538
+ char * (*tcl_UniCharToUtfDString) (const int *uniStr, Tcl_Size uniLength, Tcl_DString *dsPtr); /* 647 */
2539
+ int * (*tcl_UtfToUniCharDString) (const char *src, Tcl_Size length, Tcl_DString *dsPtr); /* 648 */
2540
+ unsigned char * (*tclGetBytesFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, void *numBytesPtr); /* 649 */
2541
+ unsigned char * (*tcl_GetBytesFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size *numBytesPtr); /* 650 */
2542
+ char * (*tcl_GetStringFromObj) (Tcl_Obj *objPtr, Tcl_Size *lengthPtr); /* 651 */
2543
+ Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj *objPtr, Tcl_Size *lengthPtr); /* 652 */
2544
+ int (*tcl_GetSizeIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size *sizePtr); /* 653 */
2545
+ int (*tcl_UtfCharComplete) (const char *src, Tcl_Size length); /* 654 */
2546
+ const char * (*tcl_UtfNext) (const char *src); /* 655 */
2547
+ const char * (*tcl_UtfPrev) (const char *src, const char *start); /* 656 */
2548
+ int (*tcl_FSTildeExpand) (Tcl_Interp *interp, const char *path, Tcl_DString *dsPtr); /* 657 */
2549
+ int (*tcl_ExternalToUtfDStringEx) (Tcl_Interp *interp, Tcl_Encoding encoding, const char *src, Tcl_Size srcLen, int flags, Tcl_DString *dsPtr, Tcl_Size *errorLocationPtr); /* 658 */
2550
+ int (*tcl_UtfToExternalDStringEx) (Tcl_Interp *interp, Tcl_Encoding encoding, const char *src, Tcl_Size srcLen, int flags, Tcl_DString *dsPtr, Tcl_Size *errorLocationPtr); /* 659 */
2551
+ int (*tcl_AsyncMarkFromSignal) (Tcl_AsyncHandler async, int sigNumber); /* 660 */
2552
+ int (*tcl_ListObjGetElements) (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Size *objcPtr, Tcl_Obj ***objvPtr); /* 661 */
2553
+ int (*tcl_ListObjLength) (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Size *lengthPtr); /* 662 */
2554
+ int (*tcl_DictObjSize) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Size *sizePtr); /* 663 */
2555
+ int (*tcl_SplitList) (Tcl_Interp *interp, const char *listStr, Tcl_Size *argcPtr, const char ***argvPtr); /* 664 */
2556
+ void (*tcl_SplitPath) (const char *path, Tcl_Size *argcPtr, const char ***argvPtr); /* 665 */
2557
+ Tcl_Obj * (*tcl_FSSplitPath) (Tcl_Obj *pathPtr, Tcl_Size *lenPtr); /* 666 */
2558
+ int (*tcl_ParseArgsObjv) (Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, Tcl_Size *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv); /* 667 */
2559
+ Tcl_Size (*tcl_UniCharLen) (const int *uniStr); /* 668 */
2560
+ Tcl_Size (*tcl_NumUtfChars) (const char *src, Tcl_Size length); /* 669 */
2561
+ Tcl_Size (*tcl_GetCharLength) (Tcl_Obj *objPtr); /* 670 */
2562
+ const char * (*tcl_UtfAtIndex) (const char *src, Tcl_Size index); /* 671 */
2563
+ Tcl_Obj * (*tcl_GetRange) (Tcl_Obj *objPtr, Tcl_Size first, Tcl_Size last); /* 672 */
2564
+ int (*tcl_GetUniChar) (Tcl_Obj *objPtr, Tcl_Size index); /* 673 */
2565
+ int (*tcl_GetBool) (Tcl_Interp *interp, const char *src, int flags, char *charPtr); /* 674 */
2566
+ int (*tcl_GetBoolFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, char *charPtr); /* 675 */
2567
+ Tcl_Command (*tcl_CreateObjCommand2) (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc2 *proc2, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 676 */
2568
+ Tcl_Trace (*tcl_CreateObjTrace2) (Tcl_Interp *interp, Tcl_Size level, int flags, Tcl_CmdObjTraceProc2 *objProc2, void *clientData, Tcl_CmdObjTraceDeleteProc *delProc); /* 677 */
2569
+ Tcl_Command (*tcl_NRCreateCommand2) (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc2 *proc, Tcl_ObjCmdProc2 *nreProc2, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 678 */
2570
+ int (*tcl_NRCallObjProc2) (Tcl_Interp *interp, Tcl_ObjCmdProc2 *objProc2, void *clientData, Tcl_Size objc, Tcl_Obj *const objv[]); /* 679 */
2571
+ int (*tcl_GetNumberFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, void **clientDataPtr, int *typePtr); /* 680 */
2572
+ int (*tcl_GetNumber) (Tcl_Interp *interp, const char *bytes, Tcl_Size numBytes, void **clientDataPtr, int *typePtr); /* 681 */
2573
+ int (*tcl_RemoveChannelMode) (Tcl_Interp *interp, Tcl_Channel chan, int mode); /* 682 */
2574
+ Tcl_Size (*tcl_GetEncodingNulLength) (Tcl_Encoding encoding); /* 683 */
2575
+ int (*tcl_GetWideUIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); /* 684 */
2576
+ Tcl_Obj * (*tcl_DStringToObj) (Tcl_DString *dsPtr); /* 685 */
2577
+ int (*tcl_UtfNcmp) (const char *s1, const char *s2, size_t n); /* 686 */
2578
+ int (*tcl_UtfNcasecmp) (const char *s1, const char *s2, size_t n); /* 687 */
2579
+ Tcl_Obj * (*tcl_NewWideUIntObj) (Tcl_WideUInt wideValue); /* 688 */
2580
+ void (*tcl_SetWideUIntObj) (Tcl_Obj *objPtr, Tcl_WideUInt uwideValue); /* 689 */
2581
+ void (*tclUnusedStubEntry) (void); /* 690 */
2582
+} TclStubs;
2583
+
2584
+extern const TclStubs *tclStubsPtr;
2585
+
2586
+#ifdef __cplusplus
2587
+}
2588
+#endif
2589
+
2590
+#if defined(USE_TCL_STUBS)
2591
+
2592
+/*
2593
+ * Inline function declarations:
2594
+ */
2595
+
2596
+#define Tcl_PkgProvideEx \
2597
+ (tclStubsPtr->tcl_PkgProvideEx) /* 0 */
2598
+#define Tcl_PkgRequireEx \
2599
+ (tclStubsPtr->tcl_PkgRequireEx) /* 1 */
2600
+#define Tcl_Panic \
2601
+ (tclStubsPtr->tcl_Panic) /* 2 */
2602
+#define Tcl_Alloc \
2603
+ (tclStubsPtr->tcl_Alloc) /* 3 */
2604
+#define Tcl_Free \
2605
+ (tclStubsPtr->tcl_Free) /* 4 */
2606
+#define Tcl_Realloc \
2607
+ (tclStubsPtr->tcl_Realloc) /* 5 */
2608
+#define Tcl_DbCkalloc \
2609
+ (tclStubsPtr->tcl_DbCkalloc) /* 6 */
2610
+#define Tcl_DbCkfree \
2611
+ (tclStubsPtr->tcl_DbCkfree) /* 7 */
2612
+#define Tcl_DbCkrealloc \
2613
+ (tclStubsPtr->tcl_DbCkrealloc) /* 8 */
2614
+#define Tcl_CreateFileHandler \
2615
+ (tclStubsPtr->tcl_CreateFileHandler) /* 9 */
2616
+#define Tcl_DeleteFileHandler \
2617
+ (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */
2618
+#define Tcl_SetTimer \
2619
+ (tclStubsPtr->tcl_SetTimer) /* 11 */
2620
+#define Tcl_Sleep \
2621
+ (tclStubsPtr->tcl_Sleep) /* 12 */
2622
+#define Tcl_WaitForEvent \
2623
+ (tclStubsPtr->tcl_WaitForEvent) /* 13 */
2624
+#define Tcl_AppendAllObjTypes \
2625
+ (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */
2626
+#define Tcl_AppendStringsToObj \
2627
+ (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */
2628
+#define Tcl_AppendToObj \
2629
+ (tclStubsPtr->tcl_AppendToObj) /* 16 */
2630
+#define Tcl_ConcatObj \
2631
+ (tclStubsPtr->tcl_ConcatObj) /* 17 */
2632
+#define Tcl_ConvertToType \
2633
+ (tclStubsPtr->tcl_ConvertToType) /* 18 */
2634
+#define Tcl_DbDecrRefCount \
2635
+ (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */
2636
+#define Tcl_DbIncrRefCount \
2637
+ (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */
2638
+#define Tcl_DbIsShared \
2639
+ (tclStubsPtr->tcl_DbIsShared) /* 21 */
2640
+/* Slot 22 is reserved */
2641
+#define Tcl_DbNewByteArrayObj \
2642
+ (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */
2643
+#define Tcl_DbNewDoubleObj \
2644
+ (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */
2645
+#define Tcl_DbNewListObj \
2646
+ (tclStubsPtr->tcl_DbNewListObj) /* 25 */
2647
+/* Slot 26 is reserved */
2648
+#define Tcl_DbNewObj \
2649
+ (tclStubsPtr->tcl_DbNewObj) /* 27 */
2650
+#define Tcl_DbNewStringObj \
2651
+ (tclStubsPtr->tcl_DbNewStringObj) /* 28 */
2652
+#define Tcl_DuplicateObj \
2653
+ (tclStubsPtr->tcl_DuplicateObj) /* 29 */
2654
+#define TclFreeObj \
2655
+ (tclStubsPtr->tclFreeObj) /* 30 */
2656
+#define Tcl_GetBoolean \
2657
+ (tclStubsPtr->tcl_GetBoolean) /* 31 */
2658
+#define Tcl_GetBooleanFromObj \
2659
+ (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */
2660
+#define Tcl_GetByteArrayFromObj \
2661
+ (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */
2662
+#define Tcl_GetDouble \
2663
+ (tclStubsPtr->tcl_GetDouble) /* 34 */
2664
+#define Tcl_GetDoubleFromObj \
2665
+ (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */
2666
+/* Slot 36 is reserved */
2667
+#define Tcl_GetInt \
2668
+ (tclStubsPtr->tcl_GetInt) /* 37 */
2669
+#define Tcl_GetIntFromObj \
2670
+ (tclStubsPtr->tcl_GetIntFromObj) /* 38 */
2671
+#define Tcl_GetLongFromObj \
2672
+ (tclStubsPtr->tcl_GetLongFromObj) /* 39 */
2673
+#define Tcl_GetObjType \
2674
+ (tclStubsPtr->tcl_GetObjType) /* 40 */
2675
+#define TclGetStringFromObj \
2676
+ (tclStubsPtr->tclGetStringFromObj) /* 41 */
2677
+#define Tcl_InvalidateStringRep \
2678
+ (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */
2679
+#define Tcl_ListObjAppendList \
2680
+ (tclStubsPtr->tcl_ListObjAppendList) /* 43 */
2681
+#define Tcl_ListObjAppendElement \
2682
+ (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */
2683
+#define TclListObjGetElements \
2684
+ (tclStubsPtr->tclListObjGetElements) /* 45 */
2685
+#define Tcl_ListObjIndex \
2686
+ (tclStubsPtr->tcl_ListObjIndex) /* 46 */
2687
+#define TclListObjLength \