summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-04-16 10:55:42 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-04-16 10:55:42 (GMT)
commitcceb3ebddedc8b205dc57e284dd27a16c69beaa2 (patch)
tree896be1a586c6870f8ce3dbbcb4fb90c0752dc589
parent3c2a7e1741bd4cba6bab6deae6c97256b04a6d79 (diff)
parentf64db5dae2e12baca81dd2c44fa12194214a8bb5 (diff)
downloadtcl-cceb3ebddedc8b205dc57e284dd27a16c69beaa2.zip
tcl-cceb3ebddedc8b205dc57e284dd27a16c69beaa2.tar.gz
tcl-cceb3ebddedc8b205dc57e284dd27a16c69beaa2.tar.bz2
Merge core-8-branch
-rw-r--r--ChangeLog12
-rw-r--r--ChangeLog.19992
-rw-r--r--ChangeLog.200014
-rw-r--r--ChangeLog.200214
-rw-r--r--ChangeLog.20032
-rw-r--r--ChangeLog.200410
-rw-r--r--ChangeLog.20052
-rw-r--r--ChangeLog.200710
-rw-r--r--ChangeLog.20084
-rw-r--r--changes8
-rw-r--r--doc/Cancel.34
-rw-r--r--doc/Ensemble.34
-rw-r--r--doc/Eval.36
-rw-r--r--doc/FileSystem.34
-rw-r--r--doc/OpenFileChnl.32
-rw-r--r--doc/SubstObj.32
-rw-r--r--doc/info.n2
-rw-r--r--doc/memory.n2
-rw-r--r--doc/namespace.n2
-rw-r--r--doc/next.n2
-rw-r--r--doc/pkgMkIndex.n2
-rw-r--r--doc/tcltest.n4
-rw-r--r--generic/regc_nfa.c10
-rw-r--r--generic/regguts.h4
-rw-r--r--generic/tcl.decls16
-rw-r--r--generic/tclAlloc.c6
-rw-r--r--generic/tclBasic.c24
-rw-r--r--generic/tclBinary.c8
-rw-r--r--generic/tclCmdIL.c8
-rw-r--r--generic/tclCmdMZ.c10
-rw-r--r--generic/tclCompCmds.c12
-rw-r--r--generic/tclCompCmdsGR.c6
-rw-r--r--generic/tclCompCmdsSZ.c2
-rw-r--r--generic/tclCompExpr.c8
-rw-r--r--generic/tclCompile.c6
-rw-r--r--generic/tclCompile.h2
-rw-r--r--generic/tclConfig.c2
-rw-r--r--generic/tclDate.c2
-rw-r--r--generic/tclDecls.h39
-rw-r--r--generic/tclDictObj.c12
-rw-r--r--generic/tclEncoding.c2
-rw-r--r--generic/tclEnsemble.c2
-rw-r--r--generic/tclEnv.c2
-rw-r--r--generic/tclEvent.c4
-rw-r--r--generic/tclExecute.c10
-rw-r--r--generic/tclFCmd.c2
-rw-r--r--generic/tclFileName.c4
-rw-r--r--generic/tclIO.c216
-rw-r--r--generic/tclIO.h8
-rw-r--r--generic/tclIOCmd.c2
-rw-r--r--generic/tclIOGT.c14
-rw-r--r--generic/tclIORChan.c26
-rw-r--r--generic/tclIORTrans.c26
-rw-r--r--generic/tclIOUtil.c7
-rw-r--r--generic/tclIndexObj.c65
-rw-r--r--generic/tclInt.decls2
-rw-r--r--generic/tclInt.h22
-rw-r--r--generic/tclIntDecls.h4
-rw-r--r--generic/tclIntPlatDecls.h2
-rw-r--r--generic/tclInterp.c6
-rw-r--r--generic/tclLink.c2
-rw-r--r--generic/tclListObj.c89
-rw-r--r--generic/tclLiteral.c4
-rw-r--r--generic/tclNamesp.c6
-rw-r--r--generic/tclNotify.c12
-rw-r--r--generic/tclOO.c4
-rw-r--r--generic/tclOOCall.c2
-rw-r--r--generic/tclOOMethod.c2
-rw-r--r--generic/tclObj.c14
-rw-r--r--generic/tclPanic.c2
-rw-r--r--generic/tclParse.c8
-rw-r--r--generic/tclPathObj.c4
-rw-r--r--generic/tclPipe.c4
-rw-r--r--generic/tclPkg.c4
-rw-r--r--generic/tclStrToD.c6
-rw-r--r--generic/tclStringObj.c70
-rw-r--r--generic/tclStringRep.h2
-rw-r--r--generic/tclStubInit.c3
-rw-r--r--generic/tclTest.c48
-rw-r--r--generic/tclTestObj.c122
-rw-r--r--generic/tclThreadAlloc.c2
-rw-r--r--generic/tclThreadJoin.c4
-rw-r--r--generic/tclThreadTest.c15
-rw-r--r--generic/tclTrace.c14
-rw-r--r--generic/tclUtf.c2
-rw-r--r--generic/tclUtil.c4
-rw-r--r--generic/tclVar.c4
-rw-r--r--generic/tclZlib.c2
-rw-r--r--library/auto.tcl8
-rw-r--r--library/clock.tcl8
-rw-r--r--library/history.tcl2
-rw-r--r--library/http/http.tcl6
-rw-r--r--library/init.tcl2
-rw-r--r--library/msgcat/msgcat.tcl5
-rw-r--r--library/opt/optparse.tcl22
-rw-r--r--library/package.tcl6
-rw-r--r--library/platform/platform.tcl2
-rw-r--r--library/platform/shell.tcl8
-rw-r--r--library/safe.tcl12
-rw-r--r--library/tcltest/tcltest.tcl32
-rw-r--r--library/tm.tcl18
-rw-r--r--library/word.tcl2
-rw-r--r--libtommath/changes.txt2
-rw-r--r--macosx/GNUmakefile4
-rw-r--r--macosx/tclMacOSXFCmd.c2
-rw-r--r--macosx/tclMacOSXNotify.c2
-rw-r--r--tests/appendComp.test2
-rw-r--r--tests/chanio.test10
-rw-r--r--tests/clock.test2
-rw-r--r--tests/cmdAH.test4
-rw-r--r--tests/cmdMZ.test4
-rw-r--r--tests/compile.test2
-rw-r--r--tests/dict.test2
-rw-r--r--tests/env.test8
-rw-r--r--tests/error.test2
-rw-r--r--tests/eval.test4
-rw-r--r--tests/event.test2
-rw-r--r--tests/exec.test2
-rw-r--r--tests/expr.test2
-rw-r--r--tests/fCmd.test8
-rw-r--r--tests/fileName.test2
-rw-r--r--tests/fileSystem.test2
-rw-r--r--tests/for.test4
-rw-r--r--tests/indexObj.test2
-rw-r--r--tests/internals.tcl2
-rw-r--r--tests/io.test14
-rw-r--r--tests/ioCmd.test2
-rw-r--r--tests/ioTrans.test6
-rw-r--r--tests/iogt.test2
-rw-r--r--tests/mathop.test2
-rw-r--r--tests/msgcat.test8
-rw-r--r--tests/ooNext2.test2
-rw-r--r--tests/pkgMkIndex.test4
-rw-r--r--tests/remote.tcl2
-rw-r--r--tests/resolver.test2
-rw-r--r--tests/safe-stock.test4
-rw-r--r--tests/safe.test4
-rw-r--r--tests/scan.test2
-rw-r--r--tests/socket.test8
-rw-r--r--tests/stringObj.test6
-rw-r--r--tests/tcltest.test28
-rw-r--r--tests/unixFCmd.test4
-rw-r--r--tests/unixForkEvent.test2
-rw-r--r--tests/winDde.test6
-rw-r--r--tests/winFCmd.test2
-rw-r--r--tools/mkdepend.tcl4
-rwxr-xr-xunix/install-sh4
-rw-r--r--unix/tclAppInit.c2
-rw-r--r--unix/tclUnixChan.c4
-rw-r--r--unix/tclUnixCompat.c2
-rw-r--r--unix/tclUnixFCmd.c6
-rw-r--r--unix/tclUnixFile.c2
-rw-r--r--unix/tclUnixInit.c4
-rw-r--r--unix/tclUnixNotfy.c2
-rw-r--r--unix/tclUnixPipe.c4
-rw-r--r--unix/tclUnixPort.h2
-rw-r--r--unix/tclUnixSock.c20
-rw-r--r--unix/tclUnixTest.c2
-rw-r--r--unix/tclXtNotify.c2
-rw-r--r--win/Makefile.in8
-rw-r--r--win/makefile.vc2
-rw-r--r--win/nmakehlp.c10
-rw-r--r--win/rules.vc2
-rw-r--r--win/tcl.m44
-rw-r--r--win/tclWinChan.c10
-rw-r--r--win/tclWinDde.c9
-rw-r--r--win/tclWinFCmd.c2
-rw-r--r--win/tclWinFile.c8
-rw-r--r--win/tclWinInit.c6
-rw-r--r--win/tclWinNotify.c2
-rw-r--r--win/tclWinPipe.c6
-rw-r--r--win/tclWinReg.c14
-rw-r--r--win/tclWinSerial.c12
-rw-r--r--win/tclWinSock.c32
-rw-r--r--win/tclWinThrd.c4
-rw-r--r--win/tclWinTime.c10
176 files changed, 862 insertions, 830 deletions
diff --git a/ChangeLog b/ChangeLog
index 61e3e04..b189086 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1382,7 +1382,7 @@ a better first place to look now.
2012-05-03 Jan Nijtmans <nijtmans@users.sf.net>
- * compat/zlib/*: Upgrade to zlib 1.2.7 (pre-built dll is still 1.2.5,
+ * compat/zlib/*: Upgrade to zlib 1.2.7 (prebuilt dll is still 1.2.5,
will be upgraded as soon as the official build is available)
2012-05-03 Don Porter <dgp@users.sourceforge.net>
@@ -5482,7 +5482,7 @@ a better first place to look now.
* generic/tclIORChan.c (ReflectClose, ReflectInput, ReflectOutput,
(ReflectSeekWide, ReflectWatch, ReflectBlock, ReflectSetOption,
(ReflectGetOption, ForwardProc): [Bug 2978773]: Preserve
- ReflectedChannel* structures across handler invokations, to avoid
+ ReflectedChannel* structures across handler invocations, to avoid
crashes when the handler implementation induces nested callbacks and
destruction of the channel deep inside such a nesting.
@@ -6363,7 +6363,7 @@ a better first place to look now.
2009-12-28 Donal K. Fellows <dkf@users.sf.net>
* unix/Makefile.in (trace-shell, trace-test): [FRQ 1083288]: Added
- targets to allow easier tracing of shell and test invokations.
+ targets to allow easier tracing of shell and test invocations.
* unix/configure.in: [Bug 942170]: Detect the st_blocks field of
* generic/tclCmdAH.c (StoreStatData): 'struct stat' correctly.
@@ -6847,7 +6847,7 @@ a better first place to look now.
* unix/tclUnixChan.c (TtyParseMode): Partial undo of Donal's tidy-up
from a few days ago (2009-11-9, not in ChangeLog). It seems that
- strchr is apparently a macro on AIX and reacts badly to pre-processor
+ strchr is apparently a macro on AIX and reacts badly to preprocessor
directives in its arguments.
2009-11-16 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
@@ -7141,7 +7141,7 @@ a better first place to look now.
package-* that were for building Solaris packages. Appears that the
pieces needed for these targets to function have never been present in
the current era of Tcl development and belong completely to Tcl
- pre-history.
+ prehistory.
2009-10-19 Don Porter <dgp@users.sourceforge.net>
@@ -8709,7 +8709,7 @@ a better first place to look now.
2009-01-19 David Gravereaux <davygrvy@pobox.com>
* win/build.vc.bat: Improved tools detection and error message
- * win/makefile.vc: Reorganized the $(TCLOBJ) file list into seperate
+ * win/makefile.vc: Reorganized the $(TCLOBJ) file list into separate
parts for easier maintenance. Matched all sources built using -GL to
both $(lib) and $(link) to use -LTCG and avoid a warning message.
Addressed the over-building nature of the htmlhelp target by moving
diff --git a/ChangeLog.1999 b/ChangeLog.1999
index 3bf4e9a..e736dee 100644
--- a/ChangeLog.1999
+++ b/ChangeLog.1999
@@ -388,7 +388,7 @@
the beginning of the test run
* tests/basic.test: Use version information defined in tcltest instead
- of hardcoded version number
+ of hard-coded version number
* tests/socket.test: package require tcltest before attempting to use
variable defined in tcltest namespace
diff --git a/ChangeLog.2000 b/ChangeLog.2000
index 7e78c19..e22dff9 100644
--- a/ChangeLog.2000
+++ b/ChangeLog.2000
@@ -103,7 +103,7 @@
119398]
* library/init.tcl (unknown): Added specific level parameters to
- all uplevel invokations to boost performance; didn't dare touch
+ all uplevel invocation to boost performance; didn't dare touch
the "namespace inscope" stuff though, since it looks sensitive
to me! Should fix [Bug 123217], though testing is tricky...
@@ -348,7 +348,7 @@
makeFile/makeDirectory and removeFile/removeDirectory.
* tests/basic.test: Changed references to tcltest::tclVersion to
- hardcoded numbers.
+ hard-coded numbers.
* generic/tcl.h: Changed reference to tcltest2.tcl and tcltest.tcl in
comments to tests/basic.test.
@@ -1121,7 +1121,7 @@
2000-06-27 Eric Melski <ericm@scriptics.com>
- * tests/stringObj.test: Tweaked tests to avoid hardcoded high-ASCII
+ * tests/stringObj.test: Tweaked tests to avoid hard-coded high-ASCII
characters (which will fail in multibyte locales); instead used \uXXXX
syntax. [Bug: 3842].
@@ -1546,7 +1546,7 @@
* unix/mkLinks: Regen'd with new mkLinks.tcl.
* unix/mkLinks.tcl: Fixed indentation, made link setup more
- intelligent (only do one existance test per man page, instead of one
+ intelligent (only do one existence test per man page, instead of one
per function).
* doc/library.n: Fixed .SH NAME macro to include each function
@@ -1641,7 +1641,7 @@
2000-04-21 Brent Welch <welch@scriptics.com>
* library/http2.1/http.tcl: More thrashing with the "server closes
- without reading post data" scenario. Reverted to the previous filevent
+ without reading post data" scenario. Reverted to the previous fileevent
configuratiuon, which seems to work better with small amounts of post
data.
@@ -2267,7 +2267,7 @@
* library/auto.tcl: Fixed the regular expression that performs $
escaping before sourcing a file to index. It was erroneously adding \
escapes even to $'s that were already escaped, effectively
- "un-escaping" those $'s. (bug #2611).
+ "unescaping" those $'s. (bug #2611).
2000-01-27 Eric Melski <ericm@scriptics.com>
@@ -2378,7 +2378,7 @@
* generic/tclVar.c: Changed behavior of variable command when name
refers to an element in an array (ie, "variable foo(x)") to always
- return an error, regardless of existance of that element in the array
+ return an error, regardless of existence of that element in the array
(now behavior is consistant with docs too) (bug #981).
2000-01-20 Jeff Hobbs <hobbs@scriptics.com>
diff --git a/ChangeLog.2002 b/ChangeLog.2002
index fa31e42..9534476 100644
--- a/ChangeLog.2002
+++ b/ChangeLog.2002
@@ -15,7 +15,7 @@
* tests/winPipe.test:
* win/tclWinPipe.c (Tcl_WaitPid):
* win/tclWinTest.c: Gave Tcl_WaitPid the ability to return a Win32
- exception code translated into a posix style SIG*. This allows [close]
+ exception code translated into a Posix-style SIG*. This allows [close]
to report "CHILDKILLED" without the meaning getting lost in a
truncated exit code. In TclCleanupChildren(), TclpGetPid() had to get
moved to before Tcl_WaitPid() as the the handle is removed from the
@@ -1941,7 +1941,7 @@
* tests/pkg/samename.tcl: restored. needed by pkgMkIndex.test.
- * library/tcltest/tcltest.tcl: restored writeability testing of
+ * library/tcltest/tcltest.tcl: restored writability testing of
-tmpdir, augmented by a special exception for the deafault value.
2002-07-01 Donal K. Fellows <fellowsd@cs.man.ac.uk>
@@ -1959,9 +1959,9 @@
* tests/info.test: [temporaryDirectory] of tcltest.
* tests/interp.test:
- * library/tcltest/tcltest.tcl: Stopped checking for writeability of
+ * library/tcltest/tcltest.tcl: Stopped checking for writability of
-tmpdir value because no default directory can be guaranteed to be
- writeable.
+ writable.
* tests/autoMkindex.tcl: removed.
* tests/pkg/samename.tcl: removed.
@@ -2469,7 +2469,7 @@
thread-safe *_r counterparts are not available.
* unix/tcl.m4: added configure check for readdir_r
* unix/tcl.m4 (Darwin): set TCL_DEFAULT_ENCODING to utf-8 on MacOSX
- (where posix file apis expect utf-8, not iso8859-1).
+ (where Posix file apis expect utf-8, not iso8859-1).
* unix/configure: regen
* unix/Makefile.in: set DYLD_LIBRARY_PATH in parallel to
LD_LIBRARY_PATH for MacOSX dynamic linker.
@@ -3683,7 +3683,7 @@
* win/tclAppInit.c: Changed #include "tcl.h" to be tclPort.h to remove
the raw windows.h include. tclPort.h brings in windows.h already and
- lessens the pre-compiled-header mush and the randomly useless #pragma
+ lessens the precompiled-header mush and the randomly useless #pragma
comment (lib,...) references throughout the big windows.h tree (as
observed at high linker warning levels).
@@ -3793,7 +3793,7 @@
* generic/tclIO.c: Large-file support (with many consequences.)
* compat/strtoll.c, compat/strtoull.c: New support functions.
* unix/tcl.m4, unix/configure: 64-bit support and greatly enhanced
- cacheing.
+ caching.
Most other changes, including all those in doc/* and test/* as well as
the majority in the platform directories, follow on from these.
diff --git a/ChangeLog.2003 b/ChangeLog.2003
index ec4109f..d0f4ebc 100644
--- a/ChangeLog.2003
+++ b/ChangeLog.2003
@@ -268,7 +268,7 @@
recently fixed by 2003-11-15 commit to regcomp.c by Pavel Goran. His
notes on the fix: This bug results from an error in code that splits
states into "progress" and "no-progress" ones. This error causes an
- interesting situation with the pre-collected single-linked list of
+ interesting situation with the precollected single-linked list of
states to be splitted: many items were added to the list, but only
several of them are accessible from the list beginning, since the
"tmp" member of struct state (which is used here to hold a pointer to
diff --git a/ChangeLog.2004 b/ChangeLog.2004
index 550e286..e237382 100644
--- a/ChangeLog.2004
+++ b/ChangeLog.2004
@@ -377,7 +377,7 @@
strstr, strtoul and strtod.
* unix/tcl.m4 (SC_TCL_CHECK_BROKEN_FUNC): Split a complex stanza out
of configure.in into its own function. Also force it to do the right
- thing with cacheing of results of AC_TRY_RUN to deal with issue raised
+ thing with caching of results of AC_TRY_RUN to deal with issue raised
in [Patch 1073524]
* doc/foreach.n: Added simple example. [FRQ 1073334]
@@ -1975,7 +1975,7 @@
* doc/FileSystem.3:
* generic/tclIOUtil.c: Clarified documentation regarding ability of a
filesystem to say that it doesn't support a given operation using the
- EXDEV posix error code (copyFileProc, renameFileProc, etc), and
+ EXDEV Posix error code (copyFileProc, renameFileProc, etc), and
updated one piece of code to ensure correct behaviour when an
operation is not supported [Bug 1017072]
@@ -2277,7 +2277,7 @@
with vfs [Bug 991420].
* tests/fileSystem.test: added test for above bug.
- * doc/FileSystem.3: clarified documentation of posix error codes in
+ * doc/FileSystem.3: clarified documentation of Posix error codes in
'remove directory' FS proc - 'EEXIST' is used to signify a non-empty
directory error (bug reported against tclvfs).
@@ -4339,7 +4339,7 @@
provided by the c-runtime. [Bug 672938]
* win/nmakehlp.c: defensive techniques to avoid static buffer
- overflows and a couple envars upsetting invokations of cl.exe and
+ overflows and a couple envars upsetting invocations of cl.exe and
link.exe. [Bug 885537]
* tests/winPipe.test: Added proof that BuildCommandLine() is not doing
@@ -4548,7 +4548,7 @@
dictionary is computed at compile time (when it is fully known). The
dictionary is pushed on the stack along with the result, and the code
and level values are included in the bytecode as operands. Also
- supports optimized compilation of un-[catch]ed [return]s from procs
+ supports optimized compilation of un[catch]ed [return]s from procs
with default options into the INST_DONE instruction.
* generic/tclExecute.c: Rewrote INST_RETURN instruction to retrieve
diff --git a/ChangeLog.2005 b/ChangeLog.2005
index 109ea8e..f2d1b65 100644
--- a/ChangeLog.2005
+++ b/ChangeLog.2005
@@ -229,7 +229,7 @@
***POTENTIAL INCOMPATIBILITY*** for bytecode savers/loaders. See below
* generic/tclCompCmds.c (TclCompileSwitchCmd): Arrange for very simple
- [switch] invokations to be compiled into hash lookups into jump tables;
+ [switch] invocations to be compiled into hash lookups into jump tables;
only a very specific kind of [switch] can be safely compiled this way,
but that happens to be the most common kind. This makes around 5-10%
difference to the speed of execution of clock.test.
diff --git a/ChangeLog.2007 b/ChangeLog.2007
index b01db6a..404bc4d 100644
--- a/ChangeLog.2007
+++ b/ChangeLog.2007
@@ -1426,7 +1426,7 @@
initialization assumptions of the TIP 280 code in CompileWord().
* generic/tclCompExpr.c: Suppress the attempt to convert to
- numeric when pre-compiling a constant expression indicates an error.
+ numeric when precompiling a constant expression indicates an error.
2007-08-22 Miguel Sofer <msofer@users.sf.net>
@@ -2827,8 +2827,8 @@
2007-03-24 Zoran Vasiljevic <vasiljevic@users.sourceforge.net>
* win/tclWinThrd.c: Thread exit handler marks the current thread as
- un-initialized. This allows exit handlers that are registered later to
- re-initialize this subsystem in case they need to use some sync
+ uninitialized. This allows exit handlers that are registered later to
+ reinitialize this subsystem in case they need to use some sync
primitives (cond variables) from this file again.
2007-03-23 Miguel Sofer <msofer@users.sf.net>
@@ -4938,7 +4938,7 @@
Misc patches to make code more efficient. [Bug 1530474] (afredd)
* generic/*.c, macosx/tclMacOSXNotify.c, unix/tclUnixNotfy.c,
- * win/tclWinThrd.c: Tidy up invokations of Tcl_Panic() to promote
+ * win/tclWinThrd.c: Tidy up invocations of Tcl_Panic() to promote
string constant sharing and consistent style.
* generic/tclBasic.c (Tcl_CreateInterp): More efficient handling of
* generic/tclClock.c (TclClockInit): registration of commands not
@@ -5016,7 +5016,7 @@
2006-07-24 Don Porter <dgp@users.sourceforge.net>
- * win/tclWinSock.c: Correct un-initialized Tcl_DString. Thanks to
+ * win/tclWinSock.c: Correct uninitialized Tcl_DString. Thanks to
afredd. [Bug 1518166]
2006-07-21 Miguel Sofer <msofer@users.sf.net>
diff --git a/ChangeLog.2008 b/ChangeLog.2008
index 53690e4..7df6cbc 100644
--- a/ChangeLog.2008
+++ b/ChangeLog.2008
@@ -1207,7 +1207,7 @@
* generic/tcl.decls, doc/Ensemble.3, doc/namespace.n
* tests/namespace.test: Allow the handling of a (fixed) number of
formal parameters between an ensemble's command and subcommand at
- invokation time. [Patch 1901783]
+ invocation time. [Patch 1901783]
2008-09-28 Miguel Sofer <msofer@users.sf.net>
@@ -3252,7 +3252,7 @@
2008-03-21 Donal K. Fellows <dkf@users.sf.net>
* doc/switch.n: Clarified documentation in respect of two-argument
- invokation. [Bug 1899962]
+ invocation. [Bug 1899962]
* tests/switch.test: Added more tests of regexp-mode compilation of
the [switch] command. [Bug 1854435]
diff --git a/changes b/changes
index ecd098e..75642de 100644
--- a/changes
+++ b/changes
@@ -3028,7 +3028,7 @@ in case of errors is required for proper cleanup by the user of fcopy. (BW)
x eval rename foo blotz
x alias foo {}
The problem was that the interp code was not using the actual current name
-of the command to be deleted as a result of un-aliasing foo. (JL)
+of the command to be deleted as a result of unaliasing foo. (JL)
6/19/97 (feature change) Pass interp down to the ChannelOption and
driver specific calls so system errors can be differentiated from syntax
@@ -4167,7 +4167,7 @@ Only.) This fix included:
the location of the encoding files and libraries. This fix included:
- Adding the TclSetPerInitScript routine.
- Modifying the Tcl_Init routines to evaluate the non-NULL
- pre-init script.
+ preinit script.
- Adding the Tcl_SetdefaultEncodingDir and Tcl_GetDefaultEncodingDir
routines.
- Modifying the TclpInitLibrary routines to append the default
@@ -6977,7 +6977,7 @@ of traced command do not fire (sofer)
2007-08-16 (bug fix)[1773040] ::errorInfo trace crash (janssen,porter)
-2007-08-16 (performance)[1564517] pre-compile constant expressions (porter)
+2007-08-16 (performance)[1564517] precompile constant expressions (porter)
2007-08-21 (bug fix)[1775878] 'puts \' in interactive tclsh failed to move to
prompt for continuation line (porter)
@@ -8685,7 +8685,7 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich)
2016-07-08 (bug)[a47641] [file normalize] & Windows junctions (nadkarni)
-2016-07-09 [ae61a6] [file] handling of Win hardcoded names (CON) (nadkarni)
+2016-07-09 [ae61a6] [file] handling of Win hard-coded names (CON) (nadkarni)
*** POTENTIAL INCOMPATIBILITY ***
2016-07-09 [3613671] [file owned] (more) useful on Win (nadkarni)
diff --git a/doc/Cancel.3 b/doc/Cancel.3
index 73edaf6..027fb09 100644
--- a/doc/Cancel.3
+++ b/doc/Cancel.3
@@ -26,7 +26,7 @@ Error message to use in the cancellation, or NULL to use a default message. If
not NULL, this object will have its reference count decremented before
\fBTcl_CancelEval\fR returns.
.AP int flags in
-ORed combination of flag bits that specify additional options.
+OR'ed combination of flag bits that specify additional options.
For \fBTcl_CancelEval\fR, only \fBTCL_CANCEL_UNWIND\fR is currently
supported. For \fBTcl_Canceled\fR, only \fBTCL_LEAVE_ERR_MSG\fR and
\fBTCL_CANCEL_UNWIND\fR are currently supported.
@@ -47,7 +47,7 @@ Extensions can use this function to check to see if they should abort a long
running command. This function is thread sensitive and may only be called
from the thread the interpreter was created in.
.SS "FLAG BITS"
-Any ORed combination of the following values may be used for the
+Any OR'ed combination of the following values may be used for the
\fIflags\fR argument to procedures such as \fBTcl_CancelEval\fR:
.TP 20
\fBTCL_CANCEL_UNWIND\fR
diff --git a/doc/Ensemble.3 b/doc/Ensemble.3
index b768fd6..71a53ac 100644
--- a/doc/Ensemble.3
+++ b/doc/Ensemble.3
@@ -69,14 +69,14 @@ The name of the ensemble command to be created.
The namespace to which the ensemble command is to be bound, or NULL
for the current namespace.
.AP int ensFlags in
-An ORed set of flag bits describing the basic configuration of the
+An OR'ed set of flag bits describing the basic configuration of the
ensemble. Currently only one bit has meaning, \fBTCL_ENSEMBLE_PREFIX\fR,
which is present when the ensemble command should also match
unambiguous prefixes of subcommands.
.AP Tcl_Obj *cmdNameObj in
A value holding the name of the ensemble command to look up.
.AP int flags in
-An ORed set of flag bits controlling the behavior of
+An OR'ed set of flag bits controlling the behavior of
\fBTcl_FindEnsemble\fR. Currently only \fBTCL_LEAVE_ERR_MSG\fR is supported.
.AP Tcl_Command token in
A normal command token that refers to an ensemble command, or which
diff --git a/doc/Eval.3 b/doc/Eval.3
index 02a8da5..bccb696 100644
--- a/doc/Eval.3
+++ b/doc/Eval.3
@@ -49,7 +49,7 @@ modified to hold the result or error message from the script.
.AP Tcl_Obj *objPtr in
A Tcl value containing the script to execute.
.AP int flags in
-ORed combination of flag bits that specify additional options.
+OR'ed combination of flag bits that specify additional options.
\fBTCL_EVAL_GLOBAL\fR and \fBTCL_EVAL_DIRECT\fR are currently supported.
.AP "const char" *fileName in
Name of a file containing a Tcl script.
@@ -107,7 +107,7 @@ in code for string comparison, you can use
which will be safely substituted by the Tcl interpreter into
.QW ^Z .
.PP
-\fBTcl_EvalObjv\fR executes a single pre-parsed command instead of a
+\fBTcl_EvalObjv\fR executes a single preparsed command instead of a
script. The \fIobjc\fR and \fIobjv\fR arguments contain the values
of the words for the Tcl command, one word in each value in
\fIobjv\fR. \fBTcl_EvalObjv\fR evaluates the command and returns
@@ -159,7 +159,7 @@ in practice. This function is deprecated and will be removed in Tcl 9.0.
.SH "FLAG BITS"
.PP
-Any ORed combination of the following values may be used for the
+Any OR'ed combination of the following values may be used for the
\fIflags\fR argument to procedures such as \fBTcl_EvalObjEx\fR:
.TP 23
\fBTCL_EVAL_DIRECT\fR
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3
index e7cc4ab..7cbbded 100644
--- a/doc/FileSystem.3
+++ b/doc/FileSystem.3
@@ -233,7 +233,7 @@ The value to set in the operation.
.AP Tcl_Obj **objPtrRef out
Filled with a value containing the result of the operation.
.AP Tcl_Obj *resultPtr out
-Pre-allocated value in which to store (using
+Preallocated value in which to store (using
\fBTcl_ListObjAppendElement\fR) the list of
files or directories which are successfully matched.
.AP int mode in
@@ -483,7 +483,7 @@ is a Tcl_Obj specifying the contents of the symbolic link given by
by the caller, which should call \fBTcl_DecrRefCount\fR when the result is no
longer needed. If the \fItoPtr\fR is not NULL, Tcl should create a link
of one of the types passed in in the \fIlinkAction\fR flag. This flag is
-an ORed combination of \fBTCL_CREATE_SYMBOLIC_LINK\fR and \fBTCL_CREATE_HARD_LINK\fR.
+an OR'ed combination of \fBTCL_CREATE_SYMBOLIC_LINK\fR and \fBTCL_CREATE_HARD_LINK\fR.
Where a choice exists (i.e.\ more than one flag is passed in), the Tcl
convention is to prefer symbolic links. When a link is successfully
created, the return value should be \fItoPtr\fR (which is therefore
diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3
index e8ed521..1c6f619 100644
--- a/doc/OpenFileChnl.3
+++ b/doc/OpenFileChnl.3
@@ -599,7 +599,7 @@ their possible values are described in the manual entry for the Tcl
\fBfconfigure\fR command. Other options can be added by each channel type.
These channel type specific options are described in the manual entry for
the Tcl command that creates a channel of that type; for example, the
-additional options for TCP based channels are described in the manual entry
+additional options for TCP-based channels are described in the manual entry
for the Tcl \fBsocket\fR command.
The procedure normally returns \fBTCL_OK\fR. If an error occurs, it returns
\fBTCL_ERROR\fR and calls \fBTcl_SetErrno\fR to store an appropriate POSIX
diff --git a/doc/SubstObj.3 b/doc/SubstObj.3
index fa30fb1..f10e01d 100644
--- a/doc/SubstObj.3
+++ b/doc/SubstObj.3
@@ -24,7 +24,7 @@ message.
.AP Tcl_Obj *objPtr in
A Tcl value containing the string to perform substitutions on.
.AP int flags in
-ORed combination of flag bits that specify which substitutions to
+OR'ed combination of flag bits that specify which substitutions to
perform. The flags \fBTCL_SUBST_COMMANDS\fR,
\fBTCL_SUBST_VARIABLES\fR and \fBTCL_SUBST_BACKSLASHES\fR are
currently supported, and \fBTCL_SUBST_ALL\fR is provided as a
diff --git a/doc/info.n b/doc/info.n
index 86263db..8a61ba9 100644
--- a/doc/info.n
+++ b/doc/info.n
@@ -172,7 +172,7 @@ The body of a script provided to \fBeval\fR or \fBuplevel\fR.
.TP
\fBprecompiled\fR\0\0\0\0\0\0\0\0
.
-A pre-compiled script (loadable by the package
+A precompiled script (loadable by the package
\fBtbcload\fR), and no further information is available.
.RE
.TP
diff --git a/doc/memory.n b/doc/memory.n
index 4d6a7d1..fc3ff99 100644
--- a/doc/memory.n
+++ b/doc/memory.n
@@ -41,7 +41,7 @@ of packets and bytes allocated.
.TP
\fBmemory init \fR[\fBon\fR|\fBoff\fR]
.
-Turn on or off the pre-initialization of all allocated memory
+Turn on or off the preinitialization of all allocated memory
with bogus bytes. Useful for detecting the use of uninitialized
values.
.TP
diff --git a/doc/namespace.n b/doc/namespace.n
index 3196cac..1773555 100644
--- a/doc/namespace.n
+++ b/doc/namespace.n
@@ -161,7 +161,7 @@ this command first finds the matching exported commands.
It then checks whether any of those commands
were previously imported by the current namespace.
If so, this command deletes the corresponding imported commands.
-In effect, this un-does the action of a \fBnamespace import\fR command.
+In effect, this undoes the action of a \fBnamespace import\fR command.
.TP
\fBnamespace import \fR?\fB\-force\fR? ?\fIpattern\fR \fIpattern ...\fR?
.
diff --git a/doc/next.n b/doc/next.n
index f731335..624e058 100644
--- a/doc/next.n
+++ b/doc/next.n
@@ -96,7 +96,7 @@ forward to the proper implementation of the method (which it does by invoking
the \fBnext\fR command as filters are inserted into the front of the method
call chain) and is responsible for returning the result of \fBnext\fR.
.PP
-Filters are invoked when processing an invokation of the \fBunknown\fR
+Filters are invoked when processing an invocation of the \fBunknown\fR
method because of a failure to locate a method implementation, but \fInot\fR
when invoking either constructors or destructors. (Note however that the
\fBdestroy\fR method is a conventional method, and filters are invoked as
diff --git a/doc/pkgMkIndex.n b/doc/pkgMkIndex.n
index 5a6b905..f98cbcd 100644
--- a/doc/pkgMkIndex.n
+++ b/doc/pkgMkIndex.n
@@ -108,7 +108,7 @@ it immediately upon \fBpackage require\fR. This is not compatible with
the use of \fIauto_reset\fR, and therefore its use is discouraged.
.TP 15
\fB\-load \fIpkgPat\fR
-The index process will pre-load any packages that exist in the
+The index process will preload any packages that exist in the
current interpreter and match \fIpkgPat\fR into the child interpreter used to
generate the index. The pattern match uses string match rules, but without
making case distinctions.
diff --git a/doc/tcltest.n b/doc/tcltest.n
index 5a53699..965ed64 100644
--- a/doc/tcltest.n
+++ b/doc/tcltest.n
@@ -625,14 +625,14 @@ the test suite is being run on a Unix platform.
.PP
Each \fBtest\fR should include whatever \fB\-constraints\fR are
required to constrain it to run only where appropriate. Several
-constraints are pre-defined in the \fBtcltest\fR package, listed
+constraints are predefined in the \fBtcltest\fR package, listed
below. The registration of user-defined constraints is performed
by the \fBtestConstraint\fR command. User-defined constraints
may appear within a test file, or within the script specified
by the \fBconfigure \-load\fR or \fBconfigure \-loadfile\fR
options.
.PP
-The following is a list of constraints pre-defined by the
+The following is a list of constraints predefined by the
\fBtcltest\fR package itself:
.TP
\fIsingleTestInterp\fR
diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c
index f676a45..71bcb09 100644
--- a/generic/regc_nfa.c
+++ b/generic/regc_nfa.c
@@ -487,7 +487,7 @@ freearc(
/*
* changearctarget - flip an arc to have a different to state
*
- * Caller must have verified that there is no pre-existing duplicate arc.
+ * Caller must have verified that there is no preexisting duplicate arc.
*
* Note that because we store arcs in their from state, we can't easily have
* a similar changearcsource function.
@@ -1515,7 +1515,7 @@ pullback(
* Returns 1 if successful (which it always is unless the source is the
* start state or we have an internal error), 0 if nothing happened.
*
- * A significant property of this function is that it deletes no pre-existing
+ * A significant property of this function is that it deletes no preexisting
* states, and no outarcs of the constraint's from state other than the given
* constraint arc. This makes the loops in pullback() safe, at the cost that
* we may leave useless states behind. Therefore, we leave it to pullback()
@@ -1694,7 +1694,7 @@ pushfwd(
* Returns 1 if successful (which it always is unless the destination is the
* post state or we have an internal error), 0 if nothing happened.
*
- * A significant property of this function is that it deletes no pre-existing
+ * A significant property of this function is that it deletes no preexisting
* states, and no inarcs of the constraint's to state other than the given
* constraint arc. This makes the loops in pushfwd() safe, at the cost that
* we may leave useless states behind. Therefore, we leave it to pushfwd()
@@ -2467,7 +2467,7 @@ breakconstraintloop(struct nfa * nfa, struct state * sinitial)
* have multiple redundant arc pathways). Each donemap is a char array
* indexed by state number. The donemaps are all of the same size "nstates",
* which is nfa->nstates as of the start of the recursion. This is enough to
- * have entries for all pre-existing states, but *not* entries for clone
+ * have entries for all preexisting states, but *not* entries for clone
* states created during the recursion. That's okay since we have no need to
* mark those.
*
@@ -2774,7 +2774,7 @@ markcanreach(
- analyze - ascertain potentially-useful facts about an optimized NFA
^ static long analyze(struct nfa *);
*/
-static long /* re_info bits to be ORed in */
+static long /* re_info bits to be OR'ed in */
analyze(
struct nfa *nfa)
{
diff --git a/generic/regguts.h b/generic/regguts.h
index de5d18e..62ab889 100644
--- a/generic/regguts.h
+++ b/generic/regguts.h
@@ -258,10 +258,10 @@ struct state {
};
struct nfa {
- struct state *pre; /* pre-initial state */
+ struct state *pre; /* preinitial state */
struct state *init; /* initial state */
struct state *final; /* final state */
- struct state *post; /* post-final state */
+ struct state *post; /* postfinal state */
int nstates; /* for numbering states */
struct state *states; /* state-chain header */
struct state *slast; /* tail of the chain */
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 3dfa8dd..8082069 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -59,7 +59,7 @@ declare 8 {
const char *file, int line)
}
-# Tcl_CreateFileHandler and Tcl_DeleteFileHandler are only available on unix,
+# Tcl_CreateFileHandler and Tcl_DeleteFileHandler are only available on Unix,
# but they are part of the old generic interface, so we include them here for
# compatibility reasons.
@@ -1159,7 +1159,7 @@ declare 323 {
int Tcl_UniCharToUpper(int ch)
}
declare 324 {
- int Tcl_UniCharToUtf(int ch, char *buf)
+ Tcl_Size Tcl_UniCharToUtf(int ch, char *buf)
}
declare 325 {
const char *Tcl_UtfAtIndex(const char *src, Tcl_Size index)
@@ -1193,16 +1193,16 @@ declare 333 {
const char *src, Tcl_Size srcLen, Tcl_DString *dsPtr)
}
declare 334 {
- int Tcl_UtfToLower(char *src)
+ Tcl_Size Tcl_UtfToLower(char *src)
}
declare 335 {
- int Tcl_UtfToTitle(char *src)
+ Tcl_Size Tcl_UtfToTitle(char *src)
}
declare 336 {
- int Tcl_UtfToChar16(const char *src, unsigned short *chPtr)
+ Tcl_Size Tcl_UtfToChar16(const char *src, unsigned short *chPtr)
}
declare 337 {
- int Tcl_UtfToUpper(char *src)
+ Tcl_Size Tcl_UtfToUpper(char *src)
}
declare 338 {
Tcl_Size Tcl_WriteChars(Tcl_Channel chan, const char *src, Tcl_Size srcLen)
@@ -2395,7 +2395,7 @@ declare 645 {
# TIP #548
declare 646 {
- int Tcl_UtfToUniChar(const char *src, int *chPtr)
+ Tcl_Size Tcl_UtfToUniChar(const char *src, int *chPtr)
}
declare 647 {
char *Tcl_UniCharToUtfDString(const int *uniStr,
@@ -2575,7 +2575,7 @@ declare 686 {
# ----- BASELINE -- FOR -- 8.7.0 / 9.0.0 ----- #
-declare 687 {
+declare 688 {
void TclUnusedStubEntry(void)
}
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c
index 03655b9..800b0ae 100644
--- a/generic/tclAlloc.c
+++ b/generic/tclAlloc.c
@@ -116,7 +116,7 @@ static struct block bigBlocks={ /* Big blocks aren't suballocated. */
/*
* The allocator is protected by a special mutex that must be explicitly
- * initialized. Futhermore, because Tcl_Alloc may be used before anything else
+ * initialized. Furthermore, because Tcl_Alloc may be used before anything else
* in Tcl, we make this module self-initializing after all with the allocInit
* variable.
*/
@@ -511,7 +511,7 @@ TclpFree(
void *
TclpRealloc(
- void *oldPtr, /* Pointer to alloced block. */
+ void *oldPtr, /* Pointer to alloc'ed block. */
unsigned int numBytes) /* New size of memory. */
{
int i;
@@ -610,7 +610,7 @@ TclpRealloc(
}
/*
- * Ok, we don't have to copy, it fits as-is
+ * No need to copy. It fits as-is.
*/
#ifndef NDEBUG
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 616600f..abc5d60 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -1053,7 +1053,7 @@ Tcl_CreateInterp(void)
/*
* Create the core commands. Do it here, rather than calling
* Tcl_CreateCommand, because it's faster (there's no need to check for a
- * pre-existing command by the same name). If a command has a Tcl_CmdProc
+ * preexisting command by the same name). If a command has a Tcl_CmdProc
* but no Tcl_ObjCmdProc, set the Tcl_ObjCmdProc to
* TclInvokeStringCommand. This is an object-based wrapper function that
* extracts strings, calls the string function, and creates an object for
@@ -2253,15 +2253,15 @@ Tcl_HideCommand(
}
/*
- * NB: This code is currently 'like' a rename to a specialy set apart name
+ * NB: This code is currently 'like' a rename to a special separate name
* table. Changes here and in TclRenameCommand must be kept in synch until
* the common parts are actually factorized out.
*/
/*
* Remove the hash entry for the command from the interpreter command
- * table. This is like deleting the command, so bump its command epoch;
- * this invalidates any cached references that point to the command.
+ * table. This is like deleting the command, so bump its command epoch
+ * to invalidate any cached references that point to the command.
*/
if (cmdPtr->hPtr != NULL) {
@@ -2382,7 +2382,7 @@ Tcl_ExposeCommand(
if (cmdPtr->nsPtr != iPtr->globalNsPtr) {
/*
- * This case is theoritically impossible, we might rather Tcl_Panic
+ * This case is theoretically impossible, we might rather Tcl_Panic
* than 'nicely' erroring out ?
*/
@@ -2488,7 +2488,7 @@ Tcl_ExposeCommand(
* In the future, when cmdName is seen as the name of a command by
* Tcl_Eval, proc will be called. To support the bytecode interpreter,
* the command is created with a wrapper Tcl_ObjCmdProc
- * (TclInvokeStringCommand) that eventially calls proc. When the command
+ * (TclInvokeStringCommand) that eventually calls proc. When the command
* is deleted from the table, deleteProc will be called. See the manual
* entry for details on the calling sequence.
*
@@ -3939,7 +3939,7 @@ CallCommandTraces(
* The value given for the code argument.
*
* Side effects:
- * Transfers a message from the cancelation message to the interpreter.
+ * Transfers a message from the cancellation message to the interpreter.
*
*----------------------------------------------------------------------
*/
@@ -5249,7 +5249,7 @@ TEOV_NotFound(
/*
* Get the list of words for the unknown handler and allocate enough space
- * to hold both the handler prefix and all words of the command invokation
+ * to hold both the handler prefix and all words of the command invocation
* itself.
*/
@@ -5594,7 +5594,7 @@ TclEvalEx(
* TclSubstTokens(), to properly handle
* [...]-nested commands. The 'outerScript'
* refers to the most-outer script containing
- * the embedded command, which is refered to
+ * the embedded command, which is referred to
* by 'script'. The 'clNextOuter' refers to
* the current entry in the table of
* continuation lines in this "main script",
@@ -6160,8 +6160,8 @@ TclArgumentEnter(
/*
* Ignore argument words without line information (= dynamic). If they
* are variables they may have location information associated with
- * that, either through globally recorded 'set' invokations, or
- * literals in bytecode. Eitehr way there is no need to record
+ * that, either through globally recorded 'set' invocations, or
+ * literals in bytecode. Either way there is no need to record
* something here.
*/
@@ -7605,7 +7605,7 @@ int
Tcl_SetRecursionLimit(
Tcl_Interp *interp, /* Interpreter whose nesting limit is to be
* set. */
- int depth) /* New value for maximimum depth. */
+ int depth) /* New value for maximum depth. */
{
Interp *iPtr = (Interp *) interp;
int old;
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index b744203..b956bd0 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -26,7 +26,7 @@
#define BINARY_NOCOUNT -2 /* No count was specified in format. */
/*
- * The following flags may be ORed together and returned by GetFormatSpec
+ * The following flags may be OR'ed together and returned by GetFormatSpec
*/
#define BINARY_SIGNED 0 /* Field to be read as signed data */
@@ -37,7 +37,7 @@
* placed in the object cache by 'binary scan' before it bails out and
* switches back to Plan A (creating a new object for each value.)
* Theoretically, it would be possible to keep the cache about for the values
- * that are already in it, but that makes the code slower in practise when
+ * that are already in it, but that makes the code slower in practice when
* overflow happens, and makes little odds the rest of the time (as measured
* on my machine.) It is also slower (on the sample I tried at least) to grow
* the cache to hold all items we might want to put in it; presumably the
@@ -1194,7 +1194,7 @@ BinaryFormatCmd(
}
/*
- * Prepare the result object by preallocating the caclulated number of
+ * Prepare the result object by preallocating the calculated number of
* bytes and filling with nulls.
*/
@@ -1950,7 +1950,7 @@ GetFormatSpec(
*
* This routine determines, if bytes of a number need to be re-ordered,
* and returns a numeric code indicating the re-ordering to be done.
- * This depends on the endiannes of the machine and the desired format.
+ * This depends on the endianness of the machine and the desired format.
* It is in effect a table (whose contents depend on the endianness of
* the system) describing whether a value needs reversing or not. Anyone
* porting the code to a big-endian platform should take care to make
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 1838f7f..b1ee1f4 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -65,7 +65,7 @@ typedef struct {
int sortMode; /* The sort mode. One of SORTMODE_* values
* defined below. */
Tcl_Obj *compareCmdPtr; /* The Tcl comparison command when sortMode is
- * SORTMODE_COMMAND. Pre-initialized to hold
+ * SORTMODE_COMMAND. Preinitialized to hold
* base of command. */
int *indexv; /* If the -index option was specified, this
* holds an encoding of the indexes contained
@@ -4883,7 +4883,7 @@ Tcl_LsortObjCmd(
}
/*
- * Merge this element in the pre-existing sublists (and merge together
+ * Merge this element in the preexisting sublists (and merge together
* sublists when we have two of the same size).
*/
@@ -5200,7 +5200,7 @@ MergeLists(
* ordering between two elements.
*
* Results:
- * A negative results means the the first element comes before the
+ * A negative results means the first element comes before the
* second, and a positive results means that the second element should
* come first. A result of zero means the two elements are equal and it
* doesn't matter which comes first.
@@ -5402,7 +5402,7 @@ DictionaryCompare(
/*
* Convert both chars to lower for the comparison, because
- * dictionary sorts are case insensitve. Covert to lower, not
+ * dictionary sorts are case-insensitive. Covert to lower, not
* upper, so chars between Z and a will sort before A (where most
* other interesting punctuations occur).
*/
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 4a802c9..cd34364 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -427,7 +427,7 @@ Tcl_RegexpObjCmd(
* match. We always increment the offset by at least one to prevent
* endless looping (as in the case: regexp -all {a*} a). Otherwise,
* when we match the NULL string at the end of the input string, we
- * will loop indefinately (because the length of the match is 0, so
+ * will loop indefinitely (because the length of the match is 0, so
* offset never changes).
*/
@@ -1239,7 +1239,7 @@ Tcl_SplitObjCmd(
/*
* Handle the special case of splitting on a single character. This is
- * only true for the one-char ASCII case, as one unicode char is > 1
+ * only true for the one-char ASCII case, as one Unicode char is > 1
* byte in length.
*/
@@ -1588,7 +1588,7 @@ StringIsCmd(
/*
* We get the objPtr so that we can short-cut for some classes by checking
* the object type (int and double), but we need the string otherwise,
- * because we don't want any conversion of type occuring (as, for example,
+ * because we don't want any conversion of type occurring (as, for example,
* Tcl_Get*FromObj would do).
*/
@@ -2122,7 +2122,7 @@ StringMapCmd(
int *mapLens, *u2lc = NULL;
/*
- * Precompute pointers to the unicode string and length. This saves us
+ * Precompute pointers to the Unicode string and length. This saves us
* repeated function calls later, significantly speeding up the
* algorithm. We only need the lowercase first char in the nocase
* case.
@@ -2171,7 +2171,7 @@ StringMapCmd(
ustring1 = p - 1;
/*
- * Append the map value to the unicode string.
+ * Append the map value to the Unicode string.
*/
TclAppendUnicodeToObj(resultPtr,
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index dacb72a..7c5eead 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -230,7 +230,7 @@ TclCompileAppendCmd(
*
* TclCompileArray*Cmd --
*
- * Functions called to compile "array" sucommands.
+ * Functions called to compile "array" subcommands.
*
* Results:
* All return TCL_OK for a successful compile, and TCL_ERROR to defer
@@ -634,7 +634,7 @@ TclCompileCatchCmd(
* catch range so that errors in the substitution are not caught.
* [Bug 219184]
* The reason for duplicating the script is that EVAL_STK would otherwise
- * begin by undeflowing the stack below the mark set by BEGIN_CATCH4.
+ * begin by underflowing the stack below the mark set by BEGIN_CATCH4.
*/
range = TclCreateExceptRange(CATCH_EXCEPTION_RANGE, envPtr);
@@ -982,7 +982,7 @@ TclCompileContinueCmd(
*
* TclCompileDict*Cmd --
*
- * Functions called to compile "dict" sucommands.
+ * Functions called to compile "dict" subcommands.
*
* Results:
* All return TCL_OK for a successful compile, and TCL_ERROR to defer
@@ -1686,7 +1686,7 @@ CompileDictEachCmd(
/*
* Error handler "finally" clause, which force-terminates the iteration
- * and rethrows the error.
+ * and re-throws the error.
*/
TclAdjustStackDepth(-1, envPtr);
@@ -1858,7 +1858,7 @@ TclCompileDictUpdateCmd(
/*
* Termination code for non-ok returns: stash the result and return
* options in the stack, bring up the key list, finish the update code,
- * and finally return with the catched return data
+ * and finally return with the caught return data
*/
ExceptionRangeTarget(envPtr, range, catchOffset);
@@ -1904,7 +1904,7 @@ TclCompileDictAppendCmd(
/*
* There must be at least two argument after the command. And we impose an
- * (arbirary) safe limit; anyone exceeding it should stop worrying about
+ * (arbitrary) safe limit; anyone exceeding it should stop worrying about
* speed quite so much. ;-)
*/
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index 7bb06ab..d0cd6e9 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -416,7 +416,7 @@ TclCompileIfCmd(
if (TclFixupForwardJumpToHere(envPtr,
jumpEndFixupArray.fixup + jumpIndex, 127)) {
/*
- * Adjust the immediately preceeding "ifFalse" jump. We moved it's
+ * Adjust the immediately preceding "ifFalse" jump. We moved it's
* target (just after this jump) down three bytes.
*/
@@ -619,8 +619,8 @@ TclCompileInfoCommandsCmd(
Tcl_DecrRefCount(objPtr);
/*
- * Confirmed as a literal that will not frighten the horses. Compile. Note
- * that the result needs to be list-ified.
+ * Confirmed as a literal that will not frighten the horses. Compile.
+ * The result must be made into a list.
*/
/* TODO: Just push the known value */
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index ddc5c89..5146b33 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -2374,7 +2374,7 @@ IssueSwitchJumpTable(
* Compile the switch by using a jump table, which is basically a
* hashtable that maps from literal values to match against to the offset
* (relative to the INST_JUMP_TABLE instruction) to jump to. The jump
- * table itself is independent of any invokation of the bytecode, and as
+ * table itself is independent of any invocation of the bytecode, and as
* such is stored in an auxData block.
*
* Start by allocating the jump table itself, plus some workspace.
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 8808024..9791cb3 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -96,7 +96,7 @@ enum OperandTypes {
*
* The lexeme field is filled in with the lexeme of the operator that is
* returned by the ParseLexeme() routine. Only lexemes for unary and binary
- * operators get stored in an OpNode. Other lexmes get different treatement.
+ * operators get stored in an OpNode. Other lexmes get different treatment.
*
* The precedence field provides a place to store the precedence of the
* operator, so it need not be looked up again and again.
@@ -157,7 +157,7 @@ enum Marks {
* BINARY_PLUS according to context. */
#define MINUS 2 /* Ambiguous. Resolves to UNARY_MINUS or
* BINARY_MINUS according to context. */
-#define BAREWORD 3 /* Ambigous. Resolves to BOOLEAN or to
+#define BAREWORD 3 /* Ambiguous. Resolves to BOOLEAN or to
* FUNCTION or a parse error according to
* context and value. */
#define INCOMPLETE 4 /* A parse error. Used only when the single
@@ -576,7 +576,7 @@ ParseExpr(
* we build the parse tree. */
unsigned int nodesAvailable = 64; /* Initial size of the storage array. This
* value establishes a minimum tree memory
- * cost of only about 1 kibyte, and is large
+ * cost of only about 1 kilobyte, and is large
* enough for most expressions to parse with
* no need for array growth and
* reallocation. */
@@ -1912,7 +1912,7 @@ Tcl_ParseExpr(
* Returns the number of bytes scanned to produce the lexeme.
*
* Side effects:
- * Code identifying lexeme parsed is writen to *lexemePtr.
+ * Code identifying lexeme parsed is written to *lexemePtr.
*
*----------------------------------------------------------------------
*/
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index c10145c..1ab7301 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -2053,7 +2053,7 @@ CompileCommandTokens(
assert (parsePtr->numWords > 0);
- /* Pre-Compile */
+ /* Precompile */
TclNewObj(cmdObj);
envPtr->numCommands++;
@@ -2423,9 +2423,9 @@ TclCompileTokens(
int depth = TclGetStackDepth(envPtr);
/*
- * if this is actually a literal, handle continuation lines by
+ * If this is actually a literal, handle continuation lines by
* preallocating a small table to store the locations of any continuation
- * lines we find in this literal. The table is extended if needed.
+ * lines found in this literal. The table is extended if needed.
*
* Note: In contrast with the analagous code in 'TclSubstTokens()' the
* 'adjust' variable seems unneeded here. The code which merges
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 2e5d3ac..87fb783 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -434,7 +434,7 @@ typedef struct ByteCode {
* active. This structure can be freed when
* refCount becomes zero. */
unsigned int flags; /* flags describing state for the codebyte.
- * this variable holds ORed values from the
+ * this variable holds OR'ed values from the
* TCL_BYTECODE_ masks defined above */
const char *source; /* The source string from which this ByteCode
* was compiled. Note that this pointer is not
diff --git a/generic/tclConfig.c b/generic/tclConfig.c
index 5bffbcb..36d37ec 100644
--- a/generic/tclConfig.c
+++ b/generic/tclConfig.c
@@ -181,7 +181,7 @@ Tcl_RegisterConfig(
* configuration information embedded into a library.
*
* Results:
- * A standard tcl result.
+ * A standard Tcl result.
*
* Side effects:
* See the manual for what this command does.
diff --git a/generic/tclDate.c b/generic/tclDate.c
index 97675fb..3bdbdb2 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -2425,7 +2425,7 @@ static const TABLE TimezoneTable[] = {
{ "ist", tZONE, -HOUR(11/2) }, /* Indian Standard */
{ "zp6", tZONE, -HOUR( 6) }, /* USSR Zone 5 */
#if 0
- /* For completeness. NST is also Newfoundland Stanard, nad SST is
+ /* For completeness. NST is also Newfoundland Standard, and SST is
* also Swedish Summer. */
{ "nst", tZONE, -HOUR(13/2) }, /* North Sumatra */
{ "sst", tZONE, -HOUR( 7) }, /* South Sumatra, USSR Zone 6 */
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index bcec388..6dca873 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -1007,7 +1007,7 @@ EXTERN int Tcl_UniCharToTitle(int ch);
/* 323 */
EXTERN int Tcl_UniCharToUpper(int ch);
/* 324 */
-EXTERN int Tcl_UniCharToUtf(int ch, char *buf);
+EXTERN Tcl_Size Tcl_UniCharToUtf(int ch, char *buf);
/* 325 */
EXTERN const char * Tcl_UtfAtIndex(const char *src, Tcl_Size index);
/* 326 */
@@ -1035,14 +1035,14 @@ EXTERN char * Tcl_UtfToExternalDString(Tcl_Encoding encoding,
const char *src, Tcl_Size srcLen,
Tcl_DString *dsPtr);
/* 334 */
-EXTERN int Tcl_UtfToLower(char *src);
+EXTERN Tcl_Size Tcl_UtfToLower(char *src);
/* 335 */
-EXTERN int Tcl_UtfToTitle(char *src);
+EXTERN Tcl_Size Tcl_UtfToTitle(char *src);
/* 336 */
-EXTERN int Tcl_UtfToChar16(const char *src,
+EXTERN Tcl_Size Tcl_UtfToChar16(const char *src,
unsigned short *chPtr);
/* 337 */
-EXTERN int Tcl_UtfToUpper(char *src);
+EXTERN Tcl_Size Tcl_UtfToUpper(char *src);
/* 338 */
EXTERN Tcl_Size Tcl_WriteChars(Tcl_Channel chan, const char *src,
Tcl_Size srcLen);
@@ -1924,7 +1924,7 @@ EXTERN int Tcl_GetIntForIndex(Tcl_Interp *interp,
Tcl_Obj *objPtr, Tcl_Size endValue,
Tcl_Size *indexPtr);
/* 646 */
-EXTERN int Tcl_UtfToUniChar(const char *src, int *chPtr);
+EXTERN Tcl_Size Tcl_UtfToUniChar(const char *src, int *chPtr);
/* 647 */
EXTERN char * Tcl_UniCharToUtfDString(const int *uniStr,
Tcl_Size uniLength, Tcl_DString *dsPtr);
@@ -2052,7 +2052,8 @@ EXTERN Tcl_Obj * Tcl_DStringToObj(Tcl_DString *dsPtr);
/* 686 */
EXTERN int Tcl_GetSizeIntFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, Tcl_Size *sizePtr);
-/* 687 */
+/* Slot 687 is reserved */
+/* 688 */
EXTERN void TclUnusedStubEntry(void);
typedef struct {
@@ -2413,7 +2414,7 @@ typedef struct TclStubs {
int (*tcl_UniCharToLower) (int ch); /* 321 */
int (*tcl_UniCharToTitle) (int ch); /* 322 */
int (*tcl_UniCharToUpper) (int ch); /* 323 */
- int (*tcl_UniCharToUtf) (int ch, char *buf); /* 324 */
+ Tcl_Size (*tcl_UniCharToUtf) (int ch, char *buf); /* 324 */
const char * (*tcl_UtfAtIndex) (const char *src, Tcl_Size index); /* 325 */
int (*tclUtfCharComplete) (const char *src, Tcl_Size length); /* 326 */
Tcl_Size (*tcl_UtfBackslash) (const char *src, int *readPtr, char *dst); /* 327 */
@@ -2423,10 +2424,10 @@ typedef struct TclStubs {
const char * (*tclUtfPrev) (const char *src, const char *start); /* 331 */
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 */
char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, const char *src, Tcl_Size srcLen, Tcl_DString *dsPtr); /* 333 */
- int (*tcl_UtfToLower) (char *src); /* 334 */
- int (*tcl_UtfToTitle) (char *src); /* 335 */
- int (*tcl_UtfToChar16) (const char *src, unsigned short *chPtr); /* 336 */
- int (*tcl_UtfToUpper) (char *src); /* 337 */
+ Tcl_Size (*tcl_UtfToLower) (char *src); /* 334 */
+ Tcl_Size (*tcl_UtfToTitle) (char *src); /* 335 */
+ Tcl_Size (*tcl_UtfToChar16) (const char *src, unsigned short *chPtr); /* 336 */
+ Tcl_Size (*tcl_UtfToUpper) (char *src); /* 337 */
Tcl_Size (*tcl_WriteChars) (Tcl_Channel chan, const char *src, Tcl_Size srcLen); /* 338 */
Tcl_Size (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj *objPtr); /* 339 */
char * (*tcl_GetString) (Tcl_Obj *objPtr); /* 340 */
@@ -2735,7 +2736,7 @@ typedef struct TclStubs {
int (*tcl_IsShared) (Tcl_Obj *objPtr); /* 643 */
int (*tcl_LinkArray) (Tcl_Interp *interp, const char *varName, void *addr, int type, Tcl_Size size); /* 644 */
int (*tcl_GetIntForIndex) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size endValue, Tcl_Size *indexPtr); /* 645 */
- int (*tcl_UtfToUniChar) (const char *src, int *chPtr); /* 646 */
+ Tcl_Size (*tcl_UtfToUniChar) (const char *src, int *chPtr); /* 646 */
char * (*tcl_UniCharToUtfDString) (const int *uniStr, Tcl_Size uniLength, Tcl_DString *dsPtr); /* 647 */
int * (*tcl_UtfToUniCharDString) (const char *src, Tcl_Size length, Tcl_DString *dsPtr); /* 648 */
unsigned char * (*tclGetBytesFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *numBytesPtr); /* 649 */
@@ -2776,7 +2777,8 @@ typedef struct TclStubs {
int (*tcl_GetWideUIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); /* 684 */
Tcl_Obj * (*tcl_DStringToObj) (Tcl_DString *dsPtr); /* 685 */
int (*tcl_GetSizeIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size *sizePtr); /* 686 */
- void (*tclUnusedStubEntry) (void); /* 687 */
+ void (*reserved687)(void);
+ void (*tclUnusedStubEntry) (void); /* 688 */
} TclStubs;
extern const TclStubs *tclStubsPtr;
@@ -4181,8 +4183,9 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_DStringToObj) /* 685 */
#define Tcl_GetSizeIntFromObj \
(tclStubsPtr->tcl_GetSizeIntFromObj) /* 686 */
+/* Slot 687 is reserved */
#define TclUnusedStubEntry \
- (tclStubsPtr->tclUnusedStubEntry) /* 687 */
+ (tclStubsPtr->tclUnusedStubEntry) /* 688 */
#endif /* defined(USE_TCL_STUBS) */
@@ -4369,11 +4372,11 @@ extern const TclStubs *tclStubsPtr;
# define Tcl_UniCharNcmp(ucs,uct,n) \
((int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned int))tclStubsPtr->tcl_UniCharNcmp)(ucs,uct,(unsigned int)(n))
# define Tcl_UtfNcmp(s1,s2,n) \
- ((int(*)(const char*,const char*,unsigned int))tclStubsPtr->tcl_UtfNcmp)(s1,s2,(unsigned int)(n))
+ ((int(*)(const char*,const char*,unsigned int))(void *)tclStubsPtr->tcl_UtfNcmp)(s1,s2,(unsigned int)(n))
# define Tcl_UtfNcasecmp(s1,s2,n) \
- ((int(*)(const char*,const char*,unsigned int))tclStubsPtr->tcl_UtfNcasecmp)(s1,s2,(unsigned int)(n))
+ ((int(*)(const char*,const char*,unsigned int))(void *)tclStubsPtr->tcl_UtfNcasecmp)(s1,s2,(unsigned int)(n))
# define Tcl_UniCharNcasecmp(ucs,uct,n) \
- ((int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned int))tclStubsPtr->tcl_UniCharNcasecmp)(ucs,uct,(unsigned int)(n))
+ ((int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned int))(void *)tclStubsPtr->tcl_UniCharNcasecmp)(ucs,uct,(unsigned int)(n))
# endif
#endif
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index ab66186..44ee1a9 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -778,7 +778,7 @@ GetDictFromObj(
* the chain fields of the dictionaries (for easy invalidation of string
* representations using InvalidateDictChain). If the flags argument has
* the DICT_PATH_CREATE bits set (and not the DICT_PATH_EXISTS bit),
- * non-existant keys will be inserted with a value of an empty
+ * non-extant keys will be inserted with a value of an empty
* dictionary, resulting in the path being built.
*
*----------------------------------------------------------------------
@@ -871,7 +871,7 @@ TclTraceDictPath(
*
* InvalidateDictChain --
*
- * Go through a dictionary chain (built by an updating invokation of
+ * Go through a dictionary chain (built by an updating invocation of
* TclTraceDictPath) and invalidate the string representations of all the
* dictionaries on the chain.
*
@@ -1197,7 +1197,7 @@ Tcl_DictObjNext(
ChainEntry *cPtr;
/*
- * If the searh is done; we do no work.
+ * If the search is done; we do no work.
*/
if (!searchPtr->epoch) {
@@ -3683,9 +3683,9 @@ TclDictWithFinish(
if (pathc > 0) {
/*
* Want to get to the dictionary which we will update; need to do
- * prepare-for-update de-sharing along the path *but* avoid generating
- * an error on a non-existant path (we'll treat that the same as a
- * non-existant variable. Luckily, the de-sharing operation isn't
+ * prepare-for-update unsharing along the path *but* avoid generating
+ * an error on a non-extant path (we'll treat that the same as a
+ * non-extant variable. Luckily, the unsharing operation isn't
* deeply damaging if we don't go on to update; it's just less than
* perfectly efficient (but no memory should be leaked).
*/
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 41a84db..db98d54 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -3437,7 +3437,7 @@ TableToUtfProc(
}
/*
- * Special case for 1-byte utf chars for speed.
+ * Special case for 1-byte Utf chars for speed.
*/
if ((unsigned)ch - 1 < 0x7F) {
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index 963f1d8..2a33398 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -1888,7 +1888,7 @@ NsEnsembleImplementationCmdNR(
*
* ((Q: That's not true if the -map option is used, is it?))
*
- * but don't do that because cacheing of the command object should help.
+ * but don't do that because caching of the command object should help.
*/
{
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index 1378708..e9da69f 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -411,7 +411,7 @@ Tcl_PutEnv(
}
/*
- * First convert the native string to UTF. Then separate the string into
+ * First convert the native string to Utf. Then separate the string into
* name and value parts, and call TclSetEnv to do all of the real work.
*/
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index e28128f..56004aa 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -599,7 +599,7 @@ TclGetBgErrorHandler(
*
* This function is associated with the "tclBgError" assoc data for an
* interpreter; it is invoked when the interpreter is deleted in order to
- * free the information assoicated with any pending error reports.
+ * free the information associated with any pending error reports.
*
* Results:
* None.
@@ -1132,7 +1132,7 @@ Tcl_InitSubsystems(void)
if (subsystemsInitialized == 0) {
/*
- * Double check inside the mutex. There are definitly calls back into
+ * Double check inside the mutex. There are definitely calls back into
* this routine from some of the functions below.
*/
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 4c6c088..7f431bd 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -1690,7 +1690,7 @@ TclCompileObj(
* Future optimizations ...
* (1) Save the location data (ExtCmdLoc) keyed by start line. In that
* case we recompile once per location of the literal, but not
- * continously, because the moment we have all locations we do not
+ * continuously, because the moment we have all locations we do not
* need to recompile any longer.
*
* (2) Alternative: Do not recompile, tell the execution engine the
@@ -1788,7 +1788,7 @@ TclCompileObj(
*
* TclIncrObj --
*
- * Increment an integeral value in a Tcl_Obj by an integeral value held
+ * Increment an integral value in a Tcl_Obj by an integral value held
* in another Tcl_Obj. Caller is responsible for making sure we can
* update the first object.
*
@@ -3604,7 +3604,7 @@ TEBCresume(
* Start of INST_INCR instructions.
*
* WARNING: more 'goto' here than your doctor recommended! The different
- * instructions set the value of some variables and then jump to somme
+ * instructions set the value of some variables and then jump to some
* common execution code.
*/
@@ -5462,7 +5462,7 @@ TEBCresume(
TRACE(("\"%.20s\" %.20s => ", O2S(valuePtr), O2S(value2Ptr)));
/*
- * Get char length to calulate what 'end' means.
+ * Get char length to calculate what 'end' means.
*/
length = TclGetCharLength(valuePtr);
@@ -7446,7 +7446,7 @@ TEBCresume(
O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), done));
/*
- * The INST_DICT_FIRST and INST_DICT_NEXT instructsions are always
+ * The INST_DICT_FIRST and INST_DICT_NEXT instructions are always
* followed by a conditional jump, so we can take advantage of this to
* do some peephole optimization (note that we're careful to not close
* out someone doing something else).
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index bfc3f43..1ad7e1a 100644
--- a/generic/tclFCmd.c
+++ b/generic/tclFCmd.c
@@ -1220,7 +1220,7 @@ TclFileLinkCmd(
if (contents == NULL) {
/*
* We handle three common error cases specially, and for all other
- * errors, we use the standard posix error message.
+ * errors, we use the standard Posix error message.
*/
if (errno == EEXIST) {
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 7b3b03f..ac0dfa3 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -100,7 +100,7 @@ SetResultLength(
* Results:
* Returns the position in the path immediately after the root including
* any trailing slashes. Appends a cleaned up version of the root to the
- * Tcl_DString at the specified offest.
+ * Tcl_DString at the specified offset.
*
* Side effects:
* Modifies the specified Tcl_DString.
@@ -1900,7 +1900,7 @@ TclGlob(
* To process a [glob] invocation, this function may be called multiple
* times. Each time, the previously discovered filenames are in the
* interpreter result. We stash that away here so the result is free for
- * error messsages.
+ * error messages.
*/
savedResultObj = Tcl_GetObjResult(interp);
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 1c43360..92ad97e 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -102,7 +102,7 @@ typedef struct CopyState {
Tcl_WideInt total; /* Total bytes transferred (written). */
Tcl_Interp *interp; /* Interp that started the copy. */
Tcl_Obj *cmdPtr; /* Command to be invoked at completion. */
- int bufSize; /* Size of appended buffer. */
+ Tcl_Size bufSize; /* Size of appended buffer. */
char buffer[TCLFLEXARRAY]; /* Copy buffer, this must be the last
* field. */
} CopyState;
@@ -151,7 +151,7 @@ typedef struct CloseCallback {
* Static functions in this file:
*/
-static ChannelBuffer * AllocChannelBuffer(int length);
+static ChannelBuffer * AllocChannelBuffer(Tcl_Size length);
static void PreserveChannelBuffer(ChannelBuffer *bufPtr);
static void ReleaseChannelBuffer(ChannelBuffer *bufPtr);
static int IsShared(ChannelBuffer *bufPtr);
@@ -193,9 +193,9 @@ static int DetachChannel(Tcl_Interp *interp, Tcl_Channel chan);
static void DiscardInputQueued(ChannelState *statePtr,
int discardSavedBuffers);
static void DiscardOutputQueued(ChannelState *chanPtr);
-static int DoRead(Channel *chanPtr, char *dst, int bytesToRead,
+static Tcl_Size DoRead(Channel *chanPtr, char *dst, Tcl_Size bytesToRead,
int allowShortReads);
-static int DoReadChars(Channel *chan, Tcl_Obj *objPtr, int toRead,
+static Tcl_Size DoReadChars(Channel *chan, Tcl_Obj *objPtr, Tcl_Size toRead,
int allowShortReads, int appendFlag);
static int FilterInputBytes(Channel *chanPtr,
GetsState *statePtr);
@@ -239,7 +239,7 @@ static int WillRead(Channel *chanPtr);
* short description of what the macro does.
*
* --------------------------------------------------------------------------
- * int BytesLeft(ChannelBuffer *bufPtr)
+ * Tcl_Size BytesLeft(ChannelBuffer *bufPtr)
*
* Returns the number of bytes of data remaining in the buffer.
*
@@ -978,7 +978,7 @@ GetChannelTable(
*
* Side effects:
* Deletes the hash table of channels. May close channels. May flush
- * output on closed channels. Removes any channeEvent handlers that were
+ * output on closed channels. Removes any channelEvent handlers that were
* registered in this interpreter.
*
*----------------------------------------------------------------------
@@ -1011,7 +1011,7 @@ DeleteChannelTable(
statePtr = chanPtr->state;
/*
- * Remove any fileevents registered in this interpreter.
+ * Remove any file events registered in this interpreter.
*/
for (sPtr = statePtr->scriptRecordPtr, prevPtr = NULL;
@@ -1430,7 +1430,7 @@ Tcl_GetChannel(
* channel. */
const char *chanName, /* The name of the channel. */
int *modePtr) /* Where to store the mode in which the
- * channel was opened? Will contain an ORed
+ * channel was opened? Will contain an OR'ed
* combination of TCL_READABLE and
* TCL_WRITABLE, if non-NULL. */
{
@@ -1513,7 +1513,7 @@ TclGetChannelFromObj(
Tcl_Obj *objPtr,
Tcl_Channel *channelPtr,
int *modePtr, /* Where to store the mode in which the
- * channel was opened? Will contain an ORed
+ * channel was opened? Will contain an OR'ed
* combination of TCL_READABLE and
* TCL_WRITABLE, if non-NULL. */
TCL_UNUSED(int) /*flags*/)
@@ -1937,7 +1937,7 @@ Tcl_StackChannel(
* impossible) we move the buffers from the common state structure into
* the channel itself. We use the buffers in the channel below the new
* transformation to hold the data. In the future this allows us to write
- * transformations which pre-read data and push the unused part back when
+ * transformations which preread data and push the unused part back when
* they are going away.
*/
@@ -2046,7 +2046,7 @@ ChannelFree(
* A standard Tcl result.
*
* Side effects:
- * If TCL_ERROR is returned, the posix error code will be set with
+ * If TCL_ERROR is returned, the Posix error code will be set with
* Tcl_SetErrno. May leave a message in interp result as well.
*
*----------------------------------------------------------------------
@@ -2069,7 +2069,7 @@ Tcl_UnstackChannel(
if (chanPtr->downChanPtr != NULL) {
/*
- * Instead of manipulating the per-thread / per-interp list/hashtable
+ * Instead of manipulating the per-thread / per-interp list/hash table
* of registered channels we wind down the state of the
* transformation, and then restore the state of underlying channel
* into the old structure.
@@ -2531,10 +2531,10 @@ Tcl_RemoveChannelMode(
static ChannelBuffer *
AllocChannelBuffer(
- int length) /* Desired length of channel buffer. */
+ Tcl_Size length) /* Desired length of channel buffer. */
{
ChannelBuffer *bufPtr;
- int n;
+ Tcl_Size n;
n = length + CHANNELBUFFER_HEADER_SIZE + BUFFER_PADDING + BUFFER_PADDING;
bufPtr = (ChannelBuffer *)ckalloc(n);
@@ -2613,8 +2613,8 @@ RecycleBuffer(
}
/*
- * Only save buffers which have the requested buffersize for the channel.
- * This is to honor dynamic changes of the buffersize made by the user.
+ * Only save buffers which have the requested buffer size for the channel.
+ * This is to honor dynamic changes of the buffe rsize made by the user.
*/
if ((bufPtr->bufLength) != statePtr->bufSize + BUFFER_PADDING) {
@@ -2774,7 +2774,7 @@ FlushChannel(
/*
* Prevent writing on a dead channel -- a channel that has been closed but
* not yet deallocated. This can occur if the exit handler for the channel
- * deallocation runs before all channels are deregistered in all
+ * deallocation runs before all channels are unregistered in all
* interpreters.
*/
@@ -2889,9 +2889,9 @@ FlushChannel(
if (calledFromAsyncFlush) {
/*
* TIP #219, Tcl Channel Reflection API.
- * When defering the error copy a message from the bypass into
+ * When deferring the error copy a message from the bypass into
* the unreported area. Or discard it if the new error is to
- * be ignored in favor of an earlier defered error.
+ * be ignored in favor of an earlier deferred error.
*/
Tcl_Obj *msg = statePtr->chanMsg;
@@ -3247,8 +3247,8 @@ CloseChannel(
* The channel to cut out of the list must not be referenced in any
* interpreter. This is something this procedure cannot check (despite
* the refcount) because the caller usually wants fiddle with the channel
- * (like transfering it to a different thread) and thus keeps the
- * refcount artifically high to prevent its destruction.
+ * (like transferring it to a different thread) and thus keeps the
+ * refcount artificially high to prevent its destruction.
*
*----------------------------------------------------------------------
*/
@@ -3362,9 +3362,9 @@ Tcl_CutChannel(
* NOTE:
* The channel to splice into the list must not be referenced in any
* interpreter. This is something this procedure cannot check (despite
- * the refcount) because the caller usually wants figgle with the channel
- * (like transfering it to a different thread) and thus keeps the
- * refcount artifically high to prevent its destruction.
+ * the refcount) because the caller usually wants fiddle with the channel
+ * (like transferring it to a different thread) and thus keeps the
+ * refcount artificially high to prevent its destruction.
*
*----------------------------------------------------------------------
*/
@@ -3785,7 +3785,7 @@ Tcl_CloseEx(
*
* NOTE:
* CloseWrite removes the channel as far as the user is concerned.
- * However, the ooutput data structures may continue to exist for a while
+ * However, the output data structures may continue to exist for a while
* longer if it has a background flush scheduled. The device itself is
* eventually closed and the channel structures modified, in
* CloseChannelPart, below.
@@ -4099,11 +4099,11 @@ Tcl_ClearChannelHandlers(
*----------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_Write(
Tcl_Channel chan, /* The channel to buffer output for. */
const char *src, /* Data to queue in output buffer. */
- int srcLen) /* Length of data in bytes, or < 0 for
+ Tcl_Size srcLen) /* Length of data in bytes, or < 0 for
* strlen(). */
{
/*
@@ -4153,17 +4153,18 @@ Tcl_Write(
*----------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_WriteRaw(
Tcl_Channel chan, /* The channel to buffer output for. */
const char *src, /* Data to queue in output buffer. */
- int srcLen) /* Length of data in bytes, or < 0 for
+ Tcl_Size srcLen) /* Length of data in bytes, or TCL_INDEX_NONE for
* strlen(). */
{
Channel *chanPtr = ((Channel *) chan);
ChannelState *statePtr = chanPtr->state;
/* State info for channel */
- int errorCode, written;
+ int errorCode;
+ Tcl_Size written;
if (CheckChannelErrors(statePtr, TCL_WRITABLE | CHANNEL_RAW_MODE) != 0) {
return TCL_INDEX_NONE;
@@ -4209,17 +4210,17 @@ Tcl_WriteRaw(
*----------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_WriteChars(
Tcl_Channel chan, /* The channel to buffer output for. */
const char *src, /* UTF-8 characters to queue in output
* buffer. */
- int len) /* Length of string in bytes, or TCL_INDEX_NONE for
+ Tcl_Size len) /* Length of string in bytes, or TCL_INDEX_NONE for
* strlen(). */
{
Channel *chanPtr = (Channel *) chan;
ChannelState *statePtr = chanPtr->state; /* State info for channel */
- int result;
+ Tcl_Size result;
Tcl_Obj *objPtr;
if (CheckChannelErrors(statePtr, TCL_WRITABLE) != 0) {
@@ -4238,7 +4239,7 @@ Tcl_WriteChars(
/*
* Inefficient way to convert UTF-8 to byte-array, but the code
* parallels the way it is done for objects. Special case for 1-byte
- * (used by eg [puts] for the \n) could be extended to more efficient
+ * (used by e.g. [puts] for the \n) could be extended to more efficient
* translation of the src string.
*/
@@ -4278,7 +4279,7 @@ Tcl_WriteChars(
*----------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_WriteObj(
Tcl_Channel chan, /* The channel to buffer output for. */
Tcl_Obj *objPtr) /* The object to write. */
@@ -4290,7 +4291,7 @@ Tcl_WriteObj(
Channel *chanPtr;
ChannelState *statePtr; /* State info for channel */
const char *src;
- int srcLen;
+ Tcl_Size srcLen;
statePtr = ((Channel *) chan)->state;
chanPtr = statePtr->topChanPtr;
@@ -4543,7 +4544,7 @@ Write(
/*
* We just flushed. So if we have needNlFlush set to record that
- * we need to flush because theres a (translated) newline in the
+ * we need to flush because there is a (translated) newline in the
* buffer, that's likely not true any more. But there is a tricky
* exception. If we have saved bytes that did not really get
* flushed and those bytes came from a translation of a newline as
@@ -4592,7 +4593,7 @@ Write(
*---------------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_Gets(
Tcl_Channel chan, /* Channel from which to read. */
Tcl_DString *lineRead) /* The line read will be appended to this
@@ -4601,7 +4602,7 @@ Tcl_Gets(
* for managing the storage. */
{
Tcl_Obj *objPtr;
- int charsStored;
+ Tcl_Size charsStored;
TclNewObj(objPtr);
charsStored = Tcl_GetsObj(chan, objPtr);
@@ -4635,7 +4636,7 @@ Tcl_Gets(
*---------------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_GetsObj(
Tcl_Channel chan, /* Channel from which to read. */
Tcl_Obj *objPtr) /* The line read will be appended to this
@@ -4647,7 +4648,7 @@ Tcl_GetsObj(
/* State info for channel */
ChannelBuffer *bufPtr;
int inEofChar, skip, copiedTotal, oldFlags, oldRemoved;
- int oldLength;
+ Tcl_Size oldLength;
Tcl_Encoding encoding;
char *dst, *dstEnd, *eol, *eof;
Tcl_EncodingState oldState;
@@ -4796,12 +4797,12 @@ Tcl_GetsObj(
/*
* If a CR is at the end of the buffer, then check for a
- * LF at the begining of the next buffer, unless EOF char
+ * LF at the beginning of the next buffer, unless EOF char
* was found already.
*/
if (eol >= dstEnd) {
- int offset;
+ Tcl_Size offset;
if (eol != eof) {
offset = eol - objPtr->bytes;
@@ -5089,7 +5090,7 @@ TclGetsObjBinary(
/* State info for channel */
ChannelBuffer *bufPtr;
int inEofChar, skip, copiedTotal, oldFlags, oldRemoved;
- int rawLen, byteLen, oldLength;
+ Tcl_Size rawLen, byteLen, oldLength;
int eolChar;
unsigned char *dst, *dstEnd, *eol, *eof, *byteArray;
@@ -5736,11 +5737,11 @@ CommonGetsCleanup(
*----------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_Read(
Tcl_Channel chan, /* The channel from which to read. */
char *dst, /* Where to store input read. */
- int bytesToRead) /* Maximum number of bytes to read. */
+ Tcl_Size bytesToRead) /* Maximum number of bytes to read. */
{
Channel *chanPtr = (Channel *) chan;
ChannelState *statePtr = chanPtr->state;
@@ -5781,11 +5782,11 @@ Tcl_Read(
*----------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_ReadRaw(
Tcl_Channel chan, /* The channel from which to read. */
char *readBuf, /* Where to store input read. */
- int bytesToRead) /* Maximum number of bytes to read. */
+ Tcl_Size bytesToRead) /* Maximum number of bytes to read. */
{
Channel *chanPtr = (Channel *) chan;
ChannelState *statePtr = chanPtr->state;
@@ -5832,7 +5833,7 @@ Tcl_ReadRaw(
/*
* Go to the driver only if we got nothing from pushback. Have to do it
- * this way to avoid EOF mis-timings when we consider the ability that EOF
+ * this way to avoid EOF mistimings when we consider the ability that EOF
* may not be a permanent condition in the driver, and in that case we
* have to synchronize.
*/
@@ -5899,11 +5900,11 @@ Tcl_ReadRaw(
*---------------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_ReadChars(
Tcl_Channel chan, /* The channel to read. */
Tcl_Obj *objPtr, /* Input data is stored in this object. */
- int toRead, /* Maximum number of characters to store, or
+ Tcl_Size toRead, /* Maximum number of characters to store, or
* TCL_INDEX_NONE to read all available data (up to EOF or
* when channel blocks). */
int appendFlag) /* If non-zero, data read from the channel
@@ -5955,11 +5956,11 @@ Tcl_ReadChars(
*---------------------------------------------------------------------------
*/
-static int
+static Tcl_Size
DoReadChars(
Channel *chanPtr, /* The channel to read. */
Tcl_Obj *objPtr, /* Input data is stored in this object. */
- int toRead, /* Maximum number of characters to store, or
+ Tcl_Size toRead, /* Maximum number of characters to store, or
* TCL_INDEX_NONE to read all available data (up to EOF or
* when channel blocks). */
int allowShortReads, /* Allow half-blocking (pipes,sockets) */
@@ -5971,38 +5972,13 @@ DoReadChars(
ChannelState *statePtr = chanPtr->state;
/* State info for channel */
ChannelBuffer *bufPtr;
- int copied, copiedNow, result;
+ Tcl_Size copied;
+ int result, copiedNow;
Tcl_Encoding encoding = statePtr->encoding;
int binaryMode;
#define UTF_EXPANSION_FACTOR 1024
int factor = UTF_EXPANSION_FACTOR;
- binaryMode = (encoding == NULL)
- && (statePtr->inputTranslation == TCL_TRANSLATE_LF)
- && (statePtr->inEofChar == '\0');
-
- if (appendFlag) {
- if (binaryMode && (NULL == TclGetBytesFromObj(NULL, objPtr, NULL))) {
- binaryMode = 0;
- }
- } else {
- if (binaryMode) {
- Tcl_SetByteArrayLength(objPtr, 0);
- } else {
- Tcl_SetObjLength(objPtr, 0);
-
- /*
- * We're going to access objPtr->bytes directly, so we must ensure
- * that this is actually a string object (otherwise it might have
- * been pure Unicode).
- *
- * Probably not needed anymore.
- */
-
- TclGetString(objPtr);
- }
- }
-
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) {
/* TODO: We don't need this call? */
UpdateInterest(chanPtr);
@@ -6047,6 +6023,32 @@ DoReadChars(
chanPtr = statePtr->topChanPtr;
TclChannelPreserve((Tcl_Channel)chanPtr);
+ binaryMode = (encoding == NULL)
+ && (statePtr->inputTranslation == TCL_TRANSLATE_LF)
+ && (statePtr->inEofChar == '\0');
+
+ if (appendFlag) {
+ if (binaryMode && (NULL == TclGetBytesFromObj(NULL, objPtr, NULL))) {
+ binaryMode = 0;
+ }
+ } else {
+ if (binaryMode) {
+ Tcl_SetByteArrayLength(objPtr, 0);
+ } else {
+ Tcl_SetObjLength(objPtr, 0);
+
+ /*
+ * We're going to access objPtr->bytes directly, so we must ensure
+ * that this is actually a string object (otherwise it might have
+ * been pure Unicode).
+ *
+ * Probably not needed anymore.
+ */
+
+ TclGetString(objPtr);
+ }
+ }
+
/*
* Must clear the BLOCKED|EOF flags here since we check before reading.
*/
@@ -6089,11 +6091,7 @@ DoReadChars(
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)
&& !GotFlag(statePtr, CHANNEL_STICKY_EOF)
- && !GotFlag(statePtr, CHANNEL_NONBLOCKING)) {
- /* Channel is blocking. Return an error so that callers
- * like [read] can return an error.
- */
- Tcl_SetErrno(EILSEQ);
+ && (!GotFlag(statePtr, CHANNEL_NONBLOCKING))) {
goto finish;
}
}
@@ -6136,7 +6134,7 @@ finish:
}
/*
- * Regenerate the top channel, in case it was changed due to
+ * Regenerate chanPtr in case it was changed due to
* self-modifying reflected transforms.
*/
@@ -6158,8 +6156,14 @@ finish:
assert(!(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
== (CHANNEL_EOF|CHANNEL_BLOCKED)));
UpdateInterest(chanPtr);
+
+ /* This must comes after UpdateInterest(), which may set errno */
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)
&& (!copied || !GotFlag(statePtr, CHANNEL_NONBLOCKING))) {
+ /* Channel either is blocking or is nonblocking with no data
+ * succesfully red before the error. Return an error so that callers
+ * like [read] can also return an error.
+ */
Tcl_SetErrno(EILSEQ);
copied = -1;
}
@@ -6198,7 +6202,7 @@ ReadBytes(
* been allocated to hold data, not how many
* bytes of data have been stored in the
* object. */
- int bytesToRead) /* Maximum number of bytes to store, or < 0 to
+ int bytesToRead) /* Maximum number of bytes to store, or -1 to
* get all available bytes. Bytes are obtained
* from the first buffer in the queue - even
* if this number is larger than the number of
@@ -6257,7 +6261,7 @@ ReadChars(
* is larger than the number of characters
* available in the first buffer, only the
* characters from the first buffer are
- * returned. The execption is when there is
+ * returned. The exception is when there is
* not any complete character in the first
* buffer. In that case, a recursive call
* effectively obtains chars from the
@@ -6275,7 +6279,7 @@ ReadChars(
int savedIEFlags = statePtr->inputEncodingFlags;
int savedFlags = statePtr->flags;
char *dst, *src = RemovePoint(bufPtr);
- int numBytes;
+ Tcl_Size numBytes;
int srcLen = BytesLeft(bufPtr);
/*
@@ -6595,7 +6599,7 @@ ReadChars(
* precautions.
*/
- if (nextPtr->nextRemoved - srcLen < 0) {
+ if (nextPtr->nextRemoved < srcLen) {
Tcl_Panic("Buffer Underflow, BUFFER_PADDING not enough");
}
@@ -6821,11 +6825,11 @@ TranslateInputEOL(
*----------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_Ungets(
Tcl_Channel chan, /* The channel for which to add the input. */
const char *str, /* The input itself. */
- int len, /* The length of the input. */
+ Tcl_Size len, /* The length of the input. */
int atEnd) /* If non-zero, add at end of queue; otherwise
* add at head of queue. */
{
@@ -7446,7 +7450,7 @@ Tcl_TruncateChannel(
/*
* Seek first to force a total flush of all pending buffers and ditch any
- * pre-read input data.
+ * preread input data.
*/
WillWrite(chanPtr);
@@ -7506,7 +7510,7 @@ CheckChannelErrors(
/*
* TIP #219, Tcl Channel Reflection API.
- * Move a defered error message back into the channel bypass.
+ * Move a deferred error message back into the channel bypass.
*/
if (statePtr->chanMsg != NULL) {
@@ -7752,7 +7756,7 @@ Tcl_ChannelBuffered(
void
Tcl_SetChannelBufferSize(
Tcl_Channel chan, /* The channel whose buffer size to set. */
- int sz) /* The size to set. */
+ Tcl_Size sz) /* The size to set. */
{
ChannelState *statePtr; /* State of real channel structure. */
@@ -7806,7 +7810,7 @@ Tcl_SetChannelBufferSize(
*----------------------------------------------------------------------
*/
-int
+Tcl_Size
Tcl_GetChannelBufferSize(
Tcl_Channel chan) /* The channel for which to find the buffer
* size. */
@@ -7834,7 +7838,7 @@ Tcl_GetChannelBufferSize(
* Side effects:
* An error message is generated in interp's result object to indicate
- * that a command was invoked with the a bad option. The message has the
+ * that a command was invoked with a bad option. The message has the
* form:
* bad option "blah": should be one of
* <...generic options...>+<...specific options...>
@@ -7858,7 +7862,7 @@ Tcl_BadChannelOption(
const char *genericopt =
"blocking buffering buffersize encoding eofchar profile translation";
const char **argv;
- int argc, i;
+ Tcl_Size argc, i;
Tcl_DString ds;
Tcl_Obj *errObj;
@@ -8168,7 +8172,7 @@ Tcl_SetChannelOption(
ChannelState *statePtr = chanPtr->state;
/* State info for channel */
size_t len; /* Length of optionName string. */
- int argc;
+ Tcl_Size argc;
const char **argv = NULL;
/*
@@ -9770,7 +9774,7 @@ CopyData(
Tcl_Channel inChan, outChan;
ChannelState *inStatePtr, *outStatePtr;
int result = TCL_OK, size;
- int sizeb;
+ Tcl_Size sizeb;
Tcl_WideInt total;
const char *buffer;
int inBinary, outBinary, sameEncoding;
@@ -10105,11 +10109,11 @@ CopyData(
*----------------------------------------------------------------------
*/
-static int
+static Tcl_Size
DoRead(
Channel *chanPtr, /* The channel from which to read. */
char *dst, /* Where to store input read. */
- int bytesToRead, /* Maximum number of bytes to read. */
+ Tcl_Size bytesToRead, /* Maximum number of bytes to read. */
int allowShortReads) /* Allow half-blocking (pipes,sockets) */
{
ChannelState *statePtr = chanPtr->state;
@@ -11299,7 +11303,7 @@ FixLevelCode(
Tcl_Obj *msg)
{
int explicitResult, numOptions, lcn;
- int lc;
+ Tcl_Size lc;
Tcl_Obj **lv, **lvn;
int res, i, j, val, lignore, cignore;
int newlevel = -1, newcode = -1;
@@ -11312,7 +11316,7 @@ FixLevelCode(
* Syntax = (option value)... ?message?
*
* Bad message syntax causes a panic, because the other side uses
- * Tcl_GetReturnOptions and list construction functions to marshall the
+ * Tcl_GetReturnOptions and list construction functions to marshal the
* information. Hence an error means that we've got serious breakage.
*/
@@ -11381,8 +11385,8 @@ FixLevelCode(
lvn = (Tcl_Obj **)ckalloc(lcn * sizeof(Tcl_Obj *));
/*
- * New level/code information is spliced into the first occurence of
- * -level, -code, further occurences are ignored. The options cannot be
+ * New level/code information is spliced into the first occurrence of
+ * -level, -code, further occurrences are ignored. The options cannot be
* not present, we would not come here. Options which are ok are simply
* copied over.
*/
diff --git a/generic/tclIO.h b/generic/tclIO.h
index 5d02569..399acdb 100644
--- a/generic/tclIO.h
+++ b/generic/tclIO.h
@@ -45,7 +45,7 @@ typedef struct ChannelBuffer {
struct ChannelBuffer *nextPtr;
/* Next buffer in chain. */
char buf[TCLFLEXARRAY]; /* Placeholder for real buffer. The real
- * buffer occuppies this space + bufSize-1
+ * buffer occupies this space + bufSize-1
* bytes. This must be the last field in the
* structure. */
} ChannelBuffer;
@@ -129,7 +129,7 @@ typedef struct ChannelState {
char *channelName; /* The name of the channel instance in Tcl
* commands. Storage is owned by the generic
* IO code, is dynamically allocated. */
- int flags; /* ORed combination of the flags defined
+ int flags; /* OR'ed combination of the flags defined
* below. */
Tcl_Encoding encoding; /* Encoding to apply when reading or writing
* data on this channel. NULL means no
@@ -209,7 +209,7 @@ typedef struct ChannelState {
* TIP #219 ... Info for the I/O system ...
* Error message set by channel drivers, for the propagation of arbitrary
* Tcl errors. This information, if present (chanMsg not NULL), takes
- * precedence over a posix error code returned by a channel operation.
+ * precedence over a Posix error code returned by a channel operation.
*/
Tcl_Obj* chanMsg;
@@ -224,7 +224,7 @@ typedef struct ChannelState {
} ChannelState;
/*
- * Values for the flags field in Channel. Any ORed combination of the
+ * Values for the flags field in Channel. Any OR'ed combination of the
* following flags can be stored in the field. These flags record various
* options and state bits about the channel. In addition to the flags below,
* the channel can also have TCL_READABLE (1<<1) and TCL_WRITABLE (1<<2) set.
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 40f0090..bc4fab4 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -1033,7 +1033,7 @@ Tcl_ExecObjCmd(
*
* Side effects:
* Sets interp's result to boolean true or false depending on whether the
- * preceeding input operation on the channel would have blocked.
+ * preceding input operation on the channel would have blocked.
*
*---------------------------------------------------------------------------
*/
diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c
index 0e15280..51fa94d 100644
--- a/generic/tclIOGT.c
+++ b/generic/tclIOGT.c
@@ -409,7 +409,7 @@ ExecuteCallback(
/*
* Use a byte-array to prevent the misinterpretation of binary data coming
- * through as UTF while at the tcl level.
+ * through as Utf while at the tcl level.
*/
Tcl_ListObjAppendElement(NULL, command, Tcl_NewByteArrayObj(buf, bufLen));
@@ -417,7 +417,7 @@ ExecuteCallback(
/*
* Step 2, execute the command at the global level of the interpreter used
* to create the transformation. Destroy the command afterward. If an
- * error occured and the current interpreter is defined and not equal to
+ * error occurred and the current interpreter is defined and not equal to
* the interpreter for the callback, then copy the error message into
* current interpreter. Don't copy if in preservation mode.
*/
@@ -568,7 +568,7 @@ TransformCloseProc(
* Now flush data waiting in internal buffers to output and input. The
* input must be done despite the fact that there is no real receiver for
* it anymore. But the scripts might have sideeffects other parts of the
- * system rely on (f.e. signaling the close to interested parties).
+ * system rely on (f.e. signalling the close to interested parties).
*/
PreserveData(dataPtr);
@@ -1104,7 +1104,7 @@ TransformWatchProc(
Tcl_Channel downChan;
/*
- * The caller expressed interest in events occuring for this channel. We
+ * The caller expressed interest in events occurring for this channel. We
* are forwarding the call to the underlying channel now.
*/
@@ -1211,12 +1211,12 @@ static int
TransformNotifyProc(
ClientData clientData, /* The state of the notified
* transformation. */
- int mask) /* The mask of occuring events. */
+ int mask) /* The mask of occurring events. */
{
TransformChannelData *dataPtr = (TransformChannelData *)clientData;
/*
- * An event occured in the underlying channel. This transformation doesn't
+ * An event occurred in the underlying channel. This transformation doesn't
* process such events thus returns the incoming mask unchanged.
*/
@@ -1306,7 +1306,7 @@ ResultClear(
* ResultInit --
*
* Initializes the specified buffer structure. The structure will contain
- * valid information for an emtpy buffer.
+ * valid information for an empty buffer.
*
* Side effects:
* See above.
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 3057595..29f47ba 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -10,7 +10,7 @@
*
* See TIP #219 for the specification of this functionality.
*
- * Copyright © 2004-2005 ActiveState, a divison of Sophos
+ * Copyright © 2004-2005 ActiveState, a division of Sophos
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -139,7 +139,7 @@ typedef struct {
* data in buffers is flushed out through the generation of fake file
* events.
*
- * See 'rechan', 'memchan', etc.
+ * See 'refchan', 'memchan', etc.
*
* A timer is used here as well in order to ensure at least on pass through
* the event loop when a channel becomes ready. See issues 67a5eabbd3d1 and
@@ -148,7 +148,7 @@ typedef struct {
} ReflectedChannel;
/*
- * Structure of the table maping from channel handles to reflected
+ * Structure of the table mapping from channel handles to reflected
* channels. Each interpreter which has the handler command for one or more
* reflected channels records them in such a table, so that 'chan postevent'
* is able to find them even if the actual channel was moved to a different
@@ -897,8 +897,8 @@ TclChanPostEventObjCmd(
* handles of reflected channels, and only of such whose handler is
* defined in this interpreter.
*
- * We keep the old checks for both, for paranioa, but abort now instead of
- * throwing errors, as failure now means that our internal datastructures
+ * We keep the old checks for both, for paranoia, but abort now instead of
+ * throwing errors, as failure now means that our internal data structures
* have gone seriously haywire.
*/
@@ -1073,7 +1073,7 @@ UnmarshallErrorResult(
* Syntax = (option value)... ?message?
*
* Bad syntax causes a panic. This is OK because the other side uses
- * Tcl_GetReturnOptions and list construction functions to marshall the
+ * Tcl_GetReturnOptions and list construction functions to marshal the
* information; if we panic here, something has gone badly wrong already.
*/
@@ -1164,7 +1164,7 @@ TclChanCaughtErrorBypass(
* driver-specific instance data.
*
* Results:
- * A posix error.
+ * A Posix error.
*
* Side effects:
* Releases memory. Arbitrary, as it calls upon a script.
@@ -1745,7 +1745,7 @@ ReflectWatch(
* is required of it.
*
* Results:
- * A posix error number.
+ * A Posix error number.
*
* Side effects:
* Allocates memory. Arbitrary, as it calls upon a script.
@@ -2311,7 +2311,7 @@ NewReflectedChannel(
* refcount of the returned object is -- zero --.
*
* Side effects:
- * May allocate memory. Mutex protected critical section locks out other
+ * May allocate memory. Mutex-protected critical section locks out other
* threads for a short time.
*
*----------------------------------------------------------------------
@@ -2365,7 +2365,7 @@ FreeReflectedChannel(
* InvokeTclMethod --
*
* This function is used to invoke the Tcl level of a reflected channel.
- * It handles all the command assembly, invokation, and generic state and
+ * It handles all the command assembly, invocation, and generic state and
* result mgmt. It does *not* handle thread redirection; that is the
* responsibility of clients of this function.
*
@@ -2393,8 +2393,8 @@ InvokeTclMethod(
{
Tcl_Obj *methObj = NULL; /* Method name in object form */
Tcl_InterpState sr; /* State of handler interp */
- int result; /* Result code of method invokation */
- Tcl_Obj *resObj = NULL; /* Result of method invokation. */
+ int result; /* Result code of method invocation */
+ Tcl_Obj *resObj = NULL; /* Result of method invocation. */
Tcl_Obj *cmd;
if (rcPtr->dead) {
@@ -2613,7 +2613,7 @@ GetReflectedChannelMap(
*
* Side effects:
* Deletes the hash table of channels. May close channels. May flush
- * output on closed channels. Removes any channeEvent handlers that were
+ * output on closed channels. Removes any channelEvent handlers that were
* registered in this interpreter.
*
*----------------------------------------------------------------------
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c
index 3fe2585..8ab1ffb9 100644
--- a/generic/tclIORTrans.c
+++ b/generic/tclIORTrans.c
@@ -642,7 +642,7 @@ TclChanPushObjCmd(
/*
* Mode tell us what the parent channel supports. The methods tell us what
* the handler supports. We remove the non-supported bits from the mode
- * and check that the channel is not completely inacessible. Afterward the
+ * and check that the channel is not completely inaccessible. Afterward the
* mode tells us which methods are still required, and these methods will
* also be supported by the handler, by design of the check.
*/
@@ -874,7 +874,7 @@ UnmarshallErrorResult(
* driver specific instance data.
*
* Results:
- * A posix error.
+ * A Posix error.
*
* Side effects:
* Releases memory. Arbitrary, as it calls upon a script.
@@ -993,7 +993,7 @@ ReflectClose(
#endif /* TCL_THREADS */
/*
- * Do the actual invokation of "finalize" now; we're in the right thread.
+ * Do the actual invocation of "finalize" now; we're in the right thread.
*/
result = InvokeTclMethod(rtPtr, "finalize", NULL, NULL, &resObj);
@@ -1488,7 +1488,7 @@ ReflectWatch(
* is required of it.
*
* Results:
- * A posix error number.
+ * A Posix error number.
*
* Side effects:
* Allocates memory. Arbitrary, as it calls upon a script.
@@ -1575,7 +1575,7 @@ static int
ReflectGetOption(
void *clientData, /* Channel to query */
Tcl_Interp *interp, /* Interpreter to leave error messages in */
- const char *optionName, /* Name of reuqested option */
+ const char *optionName, /* Name of requested option */
Tcl_DString *dsPtr) /* String to place the result into */
{
ReflectedTransform *rtPtr = (ReflectedTransform *)clientData;
@@ -1630,7 +1630,7 @@ ReflectHandle(
/*
* Transformations have no handle of their own. As such we simply query
- * the parent channel for it. This way the qery will ripple down through
+ * the parent channel for it. This way the query will ripple down through
* all transformations until reaches the base channel. Which then returns
* its handle, or fails. The former will then ripple up the stack.
*
@@ -1664,7 +1664,7 @@ ReflectNotify(
ReflectedTransform *rtPtr = (ReflectedTransform *)clientData;
/*
- * An event occured in the underlying channel.
+ * An event occurred in the underlying channel.
*
* We delete our timer. It was not fired, yet we are here, so the channel
* below generated such an event and we don't have to. The renewal of the
@@ -1927,7 +1927,7 @@ FreeReflectedTransform(
* InvokeTclMethod --
*
* This function is used to invoke the Tcl level of a reflected channel.
- * It handles all the command assembly, invokation, and generic state and
+ * It handles all the command assembly, invocation, and generic state and
* result mgmt. It does *not* handle thread redirection; that is the
* responsibility of clients of this function.
*
@@ -1959,8 +1959,8 @@ InvokeTclMethod(
int cmdc; /* #words in constructed command */
Tcl_Obj *methObj = NULL; /* Method name in object form */
Tcl_InterpState sr; /* State of handler interp */
- int result; /* Result code of method invokation */
- Tcl_Obj *resObj = NULL; /* Result of method invokation. */
+ int result; /* Result code of method invocation */
+ Tcl_Obj *resObj = NULL; /* Result of method invocation. */
if (rtPtr->dead) {
/*
@@ -1984,7 +1984,7 @@ InvokeTclMethod(
*/
/*
- * Insert method into the pre-allocated area, after the command prefix,
+ * Insert method into the preallocated area, after the command prefix,
* before the channel id.
*/
@@ -2011,7 +2011,7 @@ InvokeTclMethod(
}
/*
- * And run the handler... This is done in auch a manner which leaves any
+ * And run the handler... This is done in a manner which leaves any
* existing state intact.
*/
@@ -2913,7 +2913,7 @@ TimerRun(
* ResultInit --
*
* Initializes the specified buffer structure. The structure will contain
- * valid information for an emtpy buffer.
+ * valid information for an empty buffer.
*
* Side effects:
* See above.
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 9a3ddfb..f665e0f 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -293,7 +293,7 @@ Tcl_Stat(
#endif /* !TCL_WIDE_INT_IS_LONG */
/*
- * Copy across all supported fields, with possible type coercions on
+ * Copy across all supported fields, with possible type coercion on
* those fields that change between the normal and lf64 versions of
* the stat structure (on Solaris at least). This is slow when the
* structure sizes coincide, but that's what you get for using an
@@ -1304,7 +1304,7 @@ Tcl_FSData(
* None (beyond the memory allocation for the result).
*
* Special notes:
- * If the filesystem-specific normalizePathProcs can re-introduce ../, ./
+ * If the filesystem-specific normalizePathProcs can reintroduce ../, ./
* components into the pathname, this function does not return the correct
* result. This may be possible with symbolic links on unix.
*
@@ -2062,8 +2062,7 @@ Tcl_PosixError(
* Tcl_FSStat --
* Calls 'statProc' of the filesystem corresponding to pathPtr.
*
- * Replaces the standard library routines stat.
- *
+ * Replaces the standard library "stat" routine.
*
* Results:
* See stat documentation.
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index 79be731..652853c 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -54,8 +54,8 @@ static const Tcl_ObjType indexType = {
typedef struct {
void *tablePtr; /* Pointer to the table of strings */
- int offset; /* Offset between table entries */
- int index; /* Selected index into table. */
+ Tcl_Size offset; /* Offset between table entries */
+ Tcl_Size index; /* Selected index into table. */
} IndexRep;
/*
@@ -175,13 +175,14 @@ GetIndexFromObjList(
int *indexPtr) /* Place to store resulting integer index. */
{
- int objc, result, t;
+ Tcl_Size objc, t;
+ int result;
Tcl_Obj **objv;
const char **tablePtr;
/*
* Use Tcl_GetIndexFromObjStruct to do the work to avoid duplicating most
- * of the code there. This is a bit ineffiecient but simpler.
+ * of the code there. This is a bit inefficient but simpler.
*/
result = TclListObjGetElementsM(interp, tableObjPtr, &objc, &objv);
@@ -260,7 +261,7 @@ Tcl_GetIndexFromObjStruct(
int flags, /* 0, TCL_EXACT, TCL_NULL_OK or TCL_INDEX_TEMP_TABLE */
void *indexPtr) /* Place to store resulting index. */
{
- int index, idx, numAbbrev;
+ Tcl_Size index, idx, numAbbrev;
const char *key, *p1;
const char *p2;
const char *const *entryPtr;
@@ -295,7 +296,7 @@ Tcl_GetIndexFromObjStruct(
*/
key = objPtr ? TclGetString(objPtr) : "";
- index = -1;
+ index = TCL_INDEX_NONE;
numAbbrev = 0;
if (!*key && (flags & TCL_NULL_OK)) {
@@ -568,8 +569,8 @@ PrefixMatchObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int flags = 0, result, index;
- int dummyLength, i, errorLength;
+ int flags = 0, result, index, i;
+ Tcl_Size dummyLength, errorLength;
Tcl_Obj *errorPtr = NULL;
const char *message = "option";
Tcl_Obj *tablePtr, *objPtr, *resultPtr;
@@ -597,7 +598,7 @@ PrefixMatchObjCmd(
case PRFMATCH_MESSAGE:
if (i > objc-4) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "missing value for -message", -1));
+ "missing value for -message", TCL_INDEX_NONE));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "NOARG", NULL);
return TCL_ERROR;
}
@@ -607,7 +608,7 @@ PrefixMatchObjCmd(
case PRFMATCH_ERROR:
if (i > objc-4) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "missing value for -error", -1));
+ "missing value for -error", TCL_INDEX_NONE));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "NOARG", NULL);
return TCL_ERROR;
}
@@ -692,7 +693,8 @@ PrefixAllObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int tableObjc, result, t, length, elemLength;
+ int result;
+ Tcl_Size length, elemLength, tableObjc, t;
const char *string, *elemString;
Tcl_Obj **tableObjv, *resultPtr;
@@ -749,7 +751,8 @@ PrefixLongestObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int tableObjc, result, i, t, length, elemLength, resultLength;
+ int result;
+ Tcl_Size i, length, elemLength, resultLength, tableObjc, t;
const char *string, *elemString, *resultString;
Tcl_Obj **tableObjv;
@@ -864,7 +867,7 @@ PrefixLongestObjCmd(
void
Tcl_WrongNumArgs(
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments to print from objv. */
+ Tcl_Size objc, /* Number of arguments to print from objv. */
Tcl_Obj *const objv[], /* Initial argument objects, which should be
* included in the error message. */
const char *message) /* Error message to print after the leading
@@ -872,7 +875,7 @@ Tcl_WrongNumArgs(
* NULL. */
{
Tcl_Obj *objPtr;
- int i, len, elemLen;
+ Tcl_Size i, len, elemLen;
char flags;
Interp *iPtr = (Interp *)interp;
const char *elementStr;
@@ -904,9 +907,9 @@ Tcl_WrongNumArgs(
if (iPtr->flags & INTERP_ALTERNATE_WRONG_ARGS) {
iPtr->flags &= ~INTERP_ALTERNATE_WRONG_ARGS;
Tcl_AppendObjToObj(objPtr, Tcl_GetObjResult(interp));
- Tcl_AppendToObj(objPtr, " or \"", -1);
+ Tcl_AppendToObj(objPtr, " or \"", TCL_INDEX_NONE);
} else {
- Tcl_AppendToObj(objPtr, "wrong # args: should be \"", -1);
+ Tcl_AppendToObj(objPtr, "wrong # args: should be \"", TCL_INDEX_NONE);
}
/*
@@ -915,8 +918,8 @@ Tcl_WrongNumArgs(
*/
if (iPtr->ensembleRewrite.sourceObjs != NULL) {
- int toSkip = iPtr->ensembleRewrite.numInsertedObjs;
- int toPrint = iPtr->ensembleRewrite.numRemovedObjs;
+ Tcl_Size toSkip = iPtr->ensembleRewrite.numInsertedObjs;
+ Tcl_Size toPrint = iPtr->ensembleRewrite.numRemovedObjs;
Tcl_Obj *const *origObjv = TclEnsembleGetRewriteValues(interp);
/*
@@ -938,7 +941,7 @@ Tcl_WrongNumArgs(
objc -= toSkip;
/*
- * We assume no object is of index type.
+ * Assume no object is of index type.
*/
for (i=0 ; i<toPrint ; i++) {
@@ -976,7 +979,7 @@ Tcl_WrongNumArgs(
* moderately complex condition here).
*/
- if (i<toPrint-1 || objc!=0 || message!=NULL) {
+ if (i + 1 < toPrint || objc!=0 || message!=NULL) {
Tcl_AppendStringsToObj(objPtr, " ", NULL);
}
}
@@ -990,7 +993,7 @@ Tcl_WrongNumArgs(
addNormalArgumentsToMessage:
for (i = 0; i < objc; i++) {
/*
- * If the object is an index type use the index table which allows for
+ * If the object is an index type, use the index table which allows for
* the correct error message even if the subcommand was abbreviated.
* Otherwise, just use the string rep.
*/
@@ -1028,7 +1031,7 @@ Tcl_WrongNumArgs(
* (either another element from objv, or the message string).
*/
- if (i<objc-1 || message!=NULL) {
+ if (i + 1 < objc || message!=NULL) {
Tcl_AppendStringsToObj(objPtr, " ", NULL);
}
}
@@ -1088,7 +1091,7 @@ Tcl_ParseArgsObjv(
Tcl_Obj **leftovers; /* Array to write back to remObjv on
* successful exit. Will include the name of
* the command. */
- int nrem; /* Size of leftovers.*/
+ Tcl_Size nrem; /* Size of leftovers.*/
const Tcl_ArgvInfo *infoPtr;
/* Pointer to the current entry in the table
* of argument descriptions. */
@@ -1100,13 +1103,13 @@ Tcl_ParseArgsObjv(
* quick check for matching; use 2nd char.
* because first char. will almost always be
* '-'). */
- int srcIndex; /* Location from which to read next argument
+ Tcl_Size srcIndex; /* Location from which to read next argument
* from objv. */
- int dstIndex; /* Used to keep track of current arguments
+ Tcl_Size dstIndex; /* Used to keep track of current arguments
* being processed, primarily for error
* reporting. */
- int objc; /* # arguments in objv still to process. */
- int length; /* Number of characters in current argument */
+ Tcl_Size objc; /* # arguments in objv still to process. */
+ Tcl_Size length; /* Number of characters in current argument */
if (remObjv != NULL) {
/*
@@ -1143,7 +1146,7 @@ Tcl_ParseArgsObjv(
}
/*
- * Loop throught the argument descriptors searching for one with the
+ * Loop through the argument descriptors searching for one with the
* matching key string. If found, leave a pointer to it in matchPtr.
*/
@@ -1357,7 +1360,7 @@ PrintUsage(
width = 4;
for (infoPtr = argTable; infoPtr->type != TCL_ARGV_END; infoPtr++) {
- int length;
+ Tcl_Size length;
if (infoPtr->keyStr == NULL) {
continue;
@@ -1372,7 +1375,7 @@ PrintUsage(
* Now add the option information, with pretty-printing.
*/
- msg = Tcl_NewStringObj("Command-specific options:", -1);
+ msg = Tcl_NewStringObj("Command-specific options:", TCL_INDEX_NONE);
for (infoPtr = argTable; infoPtr->type != TCL_ARGV_END; infoPtr++) {
if ((infoPtr->type == TCL_ARGV_HELP) && (infoPtr->keyStr == NULL)) {
Tcl_AppendPrintfToObj(msg, "\n%s", infoPtr->helpStr);
@@ -1388,7 +1391,7 @@ PrintUsage(
}
numSpaces -= NUM_SPACES;
}
- Tcl_AppendToObj(msg, infoPtr->helpStr, -1);
+ Tcl_AppendToObj(msg, infoPtr->helpStr, TCL_INDEX_NONE);
switch (infoPtr->type) {
case TCL_ARGV_INT:
Tcl_AppendPrintfToObj(msg, "\n\t\tDefault value: %d",
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 4db3919..1ae651d 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -184,7 +184,7 @@ declare 77 {deprecated {}} {
void TclpGetTime(Tcl_Time *time)
}
declare 81 {
- void *TclpRealloc(void *ptr, unsigned int size)
+ void *TclpRealloc(void *ptr, TCL_HASH_TYPE size)
}
declare 88 {deprecated {}} {
char *TclPrecTraceProc(void *clientData, Tcl_Interp *interp,
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 464909c..c073f42 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -232,7 +232,7 @@ typedef struct Tcl_Ensemble Tcl_Ensemble;
typedef struct NamespacePathEntry NamespacePathEntry;
/*
- * Special hashtable for variables: this is just a Tcl_HashTable with an nsPtr
+ * Special hash table for variables: this is just a Tcl_HashTable with an nsPtr
* field added at the end: in this way variables can find their namespace
* without having to copy a pointer in their struct: they can access it via
* their hPtr->tablePtr.
@@ -482,7 +482,7 @@ typedef struct EnsembleConfig {
* all lists, and cannot be found by scanning
* the list from the namespace's ensemble
* field. */
- int flags; /* ORed combo of TCL_ENSEMBLE_PREFIX,
+ int flags; /* OR'ed combo of TCL_ENSEMBLE_PREFIX,
* ENSEMBLE_DEAD and ENSEMBLE_COMPILE. */
/* OBJECT FIELDS FOR ENSEMBLE CONFIGURATION */
@@ -509,7 +509,7 @@ typedef struct EnsembleConfig {
* results passed directly back to the caller
* (including the error code) unless the code
* is TCL_CONTINUE in which case the
- * subcommand will be reparsed by the ensemble
+ * subcommand will be re-parsed by the ensemble
* core, presumably because the ensemble
* itself has been updated. */
Tcl_Obj *parameterList; /* List of ensemble parameter names. */
@@ -653,7 +653,7 @@ typedef struct VarInHash {
Tcl_HashEntry entry; /* The hash table entry that refers to this
* variable. This is used to find the name of
* the variable and to delete it from its
- * hashtable if it is no longer needed. It
+ * hash table if it is no longer needed. It
* also holds the variable's name. */
} VarInHash;
@@ -664,7 +664,7 @@ typedef struct VarInHash {
*
* VAR_ARRAY - 1 means this is an array variable rather than
* a scalar variable or link. The "tablePtr"
- * field points to the array's hashtable for its
+ * field points to the array's hash table for its
* elements.
* VAR_LINK - 1 means this Var structure contains a pointer
* to another Var structure that either has the
@@ -677,12 +677,12 @@ typedef struct VarInHash {
* Flags that indicate the type and status of storage; none is set for
* compiled local variables (Var structs).
*
- * VAR_IN_HASHTABLE - 1 means this variable is in a hashtable and
- * the Var structure is malloced. 0 if it is a
+ * VAR_IN_HASHTABLE - 1 means this variable is in a hash table and
+ * the Var structure is malloc'ed. 0 if it is a
* local variable that was assigned a slot in a
* procedure frame by the compiler so the Var
* storage is part of the call frame.
- * VAR_DEAD_HASH 1 means that this var's entry in the hashtable
+ * VAR_DEAD_HASH 1 means that this var's entry in the hash table
* has already been deleted.
* VAR_ARRAY_ELEMENT - 1 means that this variable is an array
* element, so it is not legal for it to be an
@@ -1277,7 +1277,7 @@ typedef struct CFWordBC {
struct CFWordBC *prevPtr; /* Previous entry in stack for same Tcl_Obj. */
struct CFWordBC *nextPtr; /* Next entry for same command call. See
* CmdFrame litarg field for the list start. */
- Tcl_Obj *obj; /* Back reference to hashtable key */
+ Tcl_Obj *obj; /* Back reference to hash table key */
} CFWordBC;
/*
@@ -1291,7 +1291,7 @@ typedef struct CFWordBC {
*
* These structures are allocated and filled by both the function
* TclSubstTokens() in the file "tclParse.c" and its caller TclEvalEx() in the
- * file "tclBasic.c", and stored in the thread-global hashtable "lineCLPtr" in
+ * file "tclBasic.c", and stored in the thread-global hash table "lineCLPtr" in
* file "tclObj.c". They are used by the functions TclSetByteCodeFromAny() and
* TclCompileScript(), both found in the file "tclCompile.c". Their memory is
* released by the function TclFreeObj(), in the file "tclObj.c", and also by
@@ -5235,7 +5235,7 @@ MODULE_SCOPE size_t TclEnvEpoch; /* Epoch of the tcl environment
* (if changed with tcl-env). */
#endif /* _TCLINT */
-
+
/*
* Local Variables:
* mode: c
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index ffd559d..e4c0b19 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -227,7 +227,7 @@ void TclpGetTime(Tcl_Time *time);
/* Slot 79 is reserved */
/* Slot 80 is reserved */
/* 81 */
-EXTERN void * TclpRealloc(void *ptr, unsigned int size);
+EXTERN void * TclpRealloc(void *ptr, TCL_HASH_TYPE size);
/* Slot 82 is reserved */
/* Slot 83 is reserved */
/* Slot 84 is reserved */
@@ -751,7 +751,7 @@ typedef struct TclIntStubs {
void (*reserved78)(void);
void (*reserved79)(void);
void (*reserved80)(void);
- void * (*tclpRealloc) (void *ptr, unsigned int size); /* 81 */
+ void * (*tclpRealloc) (void *ptr, TCL_HASH_TYPE size); /* 81 */
void (*reserved82)(void);
void (*reserved83)(void);
void (*reserved84)(void);
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index bd8d8e5..07888bf 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -580,7 +580,7 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
#undef TclpCreateTempFile_
#undef TclUnixWaitForFile_
-#ifndef MAC_OSX_TCL /* not accessable on Win32/UNIX */
+#ifndef MAC_OSX_TCL /* not accessible on Win32/UNIX */
#undef TclMacOSXGetFileAttribute /* 15 */
#undef TclMacOSXSetFileAttribute /* 16 */
#undef TclMacOSXCopyFileAttributes /* 17 */
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index e6f210c..cacf87a 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -198,7 +198,7 @@ struct LimitHandler {
/*
* Values for the LimitHandler flags field.
* LIMIT_HANDLER_ACTIVE - Whether the handler is currently being
- * processed; handlers are never to be entered reentrantly.
+ * processed; handlers are never to be reentered.
* LIMIT_HANDLER_DELETED - Whether the handler has been deleted. This
* should not normally be observed because when a handler is
* deleted it is also spliced out of the list of handlers, but
@@ -3320,7 +3320,7 @@ TclMakeSafe(
Tcl_UnsetVar2(interp, "tcl_platform", "user", TCL_GLOBAL_ONLY);
/*
- * Unset path informations variables (the only one remaining is [info
+ * Unset path information variables (the only one remaining is [info
* nameofexecutable])
*/
@@ -4284,7 +4284,7 @@ CallScriptLimitCallback(
* None.
*
* Side effects:
- * A limit callback implemented as an invokation of a Tcl script in
+ * A limit callback implemented as an invocation of a Tcl script in
* another interpreter is either installed or removed.
*
*----------------------------------------------------------------------
diff --git a/generic/tclLink.c b/generic/tclLink.c
index f478a00..9443db4 100644
--- a/generic/tclLink.c
+++ b/generic/tclLink.c
@@ -830,7 +830,7 @@ LinkTraceProc(
/*
* For writes, first make sure that the variable is writable. Then convert
* the Tcl value to C if possible. If the variable isn't writable or can't
- * be converted, then restore the varaible's old value and return an
+ * be converted, then restore the variable's old value and return an
* error. Another tricky thing: we have to save and restore the interp's
* result, since the variable access could occur when the result has been
* partially set.
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 8b683b1..811bd0f 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -1878,24 +1878,27 @@ Tcl_ListObjAppendList(
*
* Tcl_ListObjAppendElement --
*
- * This function is a special purpose version of Tcl_ListObjAppendList:
- * it appends a single object referenced by elemObj to the list object
- * referenced by toObj. If toObj is not already a list object, an
- * attempt will be made to convert it to one.
+ * Like 'Tcl_ListObjAppendList', but Appends a single value to a list.
*
- * Results:
- * The return value is normally TCL_OK; in this case elemObj is added to
- * the end of toObj's list. If toObj does not refer to a list object
- * and the object can not be converted to one, TCL_ERROR is returned and
- * an error message will be left in the interpreter's result if interp is
- * not NULL.
+ * Value
*
- * Side effects:
- * The ref count of elemObj is incremented since the list now refers to
- * it. toObj will be converted, if necessary, to a list object. Also,
- * appending the new element may cause listObj's array of element
- * pointers to grow. toObj's old string representation, if any, is
- * invalidated.
+ * TCL_OK
+ *
+ * 'objPtr' is appended to the elements of 'listPtr'.
+ *
+ * TCL_ERROR
+ *
+ * listPtr does not refer to a list object and the object can not be
+ * converted to one. An error message will be left in the
+ * interpreter's result if interp is not NULL.
+ *
+ * Effect
+ *
+ * If 'listPtr' is not already of type 'tclListType', it is converted.
+ * The 'refCount' of 'objPtr' is incremented as it is added to 'listPtr'.
+ * Appending the new element may cause the array of element pointers
+ * in 'listObj' to grow. Any preexisting string representation of
+ * 'listPtr' is invalidated.
*
*----------------------------------------------------------------------
*/
@@ -1917,23 +1920,27 @@ Tcl_ListObjAppendElement(
*
* Tcl_ListObjIndex --
*
- * This function returns a pointer to the index'th object from the list
- * referenced by listPtr. The first element has index 0. If index is
- * negative or greater than or equal to the number of elements in the
- * list, a NULL is returned. If listPtr is not a list object, an attempt
- * will be made to convert it to a list.
+ * Retrieve a pointer to the element of 'listPtr' at 'index'. The index
+ * of the first element is 0.
*
- * Results:
- * The return value is normally TCL_OK; in this case objPtrPtr is set to
- * the Tcl_Obj pointer for the index'th list element or NULL if index is
- * out of range. This object should be treated as readonly and its ref
- * count is _not_ incremented; the caller must do that if it holds on to
- * the reference. If listPtr does not refer to a list and can't be
- * converted to one, TCL_ERROR is returned and an error message is left
- * in the interpreter's result if interp is not NULL.
+ * Value
*
- * Side effects:
- * listPtr will be converted, if necessary, to a list object.
+ * TCL_OK
+ *
+ * A pointer to the element at 'index' is stored in 'objPtrPtr'. If
+ * 'index' is out of range, NULL is stored in 'objPtrPtr'. This
+ * object should be treated as readonly and its 'refCount' is _not_
+ * incremented. The caller must do that if it holds on to the
+ * reference.
+ *
+ * TCL_ERROR
+ *
+ * 'listPtr' is not a valid list. An error message is left in the
+ * interpreter's result if 'interp' is not NULL.
+ *
+ * Effect
+ *
+ * If 'listPtr' is not already of type 'tclListType', it is converted.
*
*----------------------------------------------------------------------
*/
@@ -2769,7 +2776,7 @@ TclLsetList(
ListObjGetElements(indexListCopy, indexCount, indices);
/*
- * Let TclLsetFlat handle the actual lset'ting.
+ * Let TclLsetFlat perform the actual lset operation.
*/
retValueObj = TclLsetFlat(interp, listObj, indexCount, indices, valueObj);
@@ -3398,18 +3405,16 @@ fail:
*
* UpdateStringOfList --
*
- * Update the string representation for a list object. Note: This
- * function does not invalidate an existing old string rep so storage
- * will be lost if this has not already been done.
+ * Update the string representation for a list object.
*
- * Results:
- * None.
+ * Any previously-existing string representation is not invalidated, so
+ * storage is lost if this has not been taken care of.
*
- * Side effects:
- * The object's string is set to a valid string that results from the
- * list-to-string conversion. This string will be empty if the list has
- * no elements. The list internal representation should not be NULL and
- * we assume it is not NULL.
+ * Effect
+ *
+ * The string representation of 'listPtr' is set to the resulting string.
+ * This string will be empty if the list has no elements. It is assumed
+ * that the list internal representation is not NULL.
*
*----------------------------------------------------------------------
*/
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index 56ce848..3966901 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -400,7 +400,7 @@ TclRegisterLiteral(
int flags) /* If LITERAL_ON_HEAP then the caller already
* malloc'd bytes and ownership is passed to
* this function. If LITERAL_CMD_NAME then
- * the literal should not be shared accross
+ * the literal should not be shared across
* namespaces. */
{
CompileEnv *envPtr = (CompileEnv *)ePtr;
@@ -444,7 +444,7 @@ TclRegisterLiteral(
/*
* The literal is new to this CompileEnv. If it is a command name, avoid
- * sharing it accross namespaces, and try not to share it with non-cmd
+ * sharing it across namespaces, and try not to share it with non-cmd
* literals. Note that FQ command names can be shared, so that we register
* the namespace as the interp's global NS.
*/
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 5a2979e..2531421 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -4209,7 +4209,7 @@ UnlinkNsPath(
* Side effects:
* Increments the command reference epoch in each namespace whose path
* includes the given namespace. This causes any cached resolved names
- * whose root cacheing context starts at that namespace to be recomputed
+ * whose root caching context starts at that namespace to be recomputed
* the next time they are used.
*
*----------------------------------------------------------------------
@@ -4282,7 +4282,7 @@ NamespaceQualifiersCmd(
if ((*p == ':') && (p > name) && (*(p-1) == ':')) {
p -= 2; /* Back up over the :: */
while ((p >= name) && (*p == ':')) {
- p--; /* Back up over the preceeding : */
+ p--; /* Back up over the preceding : */
}
break;
}
@@ -4561,7 +4561,7 @@ NamespaceTailCmd(
*
* Side effects:
* Creates new variables in the current scope, linked to the
- * corresponding variables in the stipulated nmamespace. If anything goes
+ * corresponding variables in the stipulated namespace. If anything goes
* wrong, the result is an error message.
*
*----------------------------------------------------------------------
diff --git a/generic/tclNotify.c b/generic/tclNotify.c
index e17819e..e511fa1 100644
--- a/generic/tclNotify.c
+++ b/generic/tclNotify.c
@@ -1027,12 +1027,12 @@ Tcl_DoOneEvent(
}
/*
- * If Tcl_WaitForEvent has returned 1, indicating that one system
- * event has been dispatched (and thus that some Tcl code might have
- * been indirectly executed), we break out of the loop. We do this to
- * give VwaitCmd for instance a chance to check if that system event
- * had the side effect of changing the variable (so the vwait can
- * return and unwind properly).
+ * If Tcl_WaitForEvent has returned 1, indicating that one system event
+ * has been dispatched (and thus that some Tcl code might have been
+ * indirectly executed), we break out of the loop in order, e.g. to
+ * give vwait a chance to determine whether that system event had the
+ * side effect of changing the variable (so the vwait can return and
+ * unwind properly).
*
* NB: We will process idle events if any first, because otherwise we
* might never do the idle events if the notifier always gets
diff --git a/generic/tclOO.c b/generic/tclOO.c
index 299ac4c..46ab3b2 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -1134,7 +1134,7 @@ ObjectNamespaceDeleted(
/*
* One rule for the teardown routines is that if an object is in the
- * process of being deleted, nothing else may modify its bookeeping
+ * process of being deleted, nothing else may modify its bookkeeping
* records. This is the flag that
*/
@@ -1187,7 +1187,7 @@ ObjectNamespaceDeleted(
if (((Command *) oPtr->command)->flags && CMD_DYING) {
/*
* Something has already started the command deletion process. We can
- * go ahead and clean up the the namespace,
+ * go ahead and clean up the namespace,
*/
} else {
/*
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index fc36f90..5430a7d 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -1493,7 +1493,7 @@ TclOOGetStereotypeCallChain(
/*
* Check to see if the method has no implementation. If so, we probably
* need to add in a call to the unknown method. Otherwise, set up the
- * cacheing of the method implementation (if relevant).
+ * caching of the method implementation (if relevant).
*/
if (count == callPtr->numChain) {
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index a613fb4..2386c15 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -18,7 +18,7 @@
/*
* Structure used to help delay computing names of objects or classes for
- * [info frame] until needed, making invokation faster in the normal case.
+ * [info frame] until needed, making invocation faster in the normal case.
*/
struct PNI {
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 9d6cd2d..233c677 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -80,7 +80,7 @@ typedef struct {
Tcl_HashTable *lineCLPtr; /* This table remembers for each Tcl_Obj
* generated by a call to the function
* TclSubstTokens() from a literal text
- * where bs+nl sequences occured in it, if
+ * where bs+nl sequences occurred in it, if
* any. I.e. this table keeps track of
* invisible and stripped continuation lines.
* Its keys are Tcl_Obj pointers, the values
@@ -111,14 +111,14 @@ static ThreadSpecificData *TclGetContLineTable(void);
*/
typedef struct PendingObjData {
- int deletionCount; /* Count of the number of invokations of
+ int deletionCount; /* Count of the number of invocations of
* TclFreeObj() are on the stack (at least
* conceptually; many are actually expanded
* macros). */
Tcl_Obj *deletionStack; /* Stack of objects that have had TclFreeObj()
* invoked upon them but which can't be
* deleted yet because they are in a nested
- * invokation of TclFreeObj(). By postponing
+ * invocation of TclFreeObj(). By postponing
* this way, we limit the maximum overall C
* stack depth when deleting a complex object.
* The down-side is that we alter the overall
@@ -581,7 +581,7 @@ TclContinuationsEnter(
* the switch command is identical, mapping them all to the same
* literal. An interesting result of this is that the number and
* locations (offset) of invisible continuation lines in the literal
- * are the same for all occurences.
+ * are the same for all occurrences.
*
* Note that while reusing the existing entry is possible it requires
* the same actions as for a new entry because we have to copy the
@@ -1391,7 +1391,7 @@ TclFreeObj(
* We have to access it using the low-level call and then check for
* validity. This function can be called after TclFinalizeThreadData() has
* already killed the thread-global data structures. Performing
- * TCL_TSD_INIT will leave us with an un-initialized memory block upon
+ * TCL_TSD_INIT will leave us with an uninitialized memory block upon
* which we crash (if we where to access the uninitialized hashtable).
*/
@@ -1482,7 +1482,7 @@ TclFreeObj(
* We have to access it using the low-level call and then check for
* validity. This function can be called after TclFinalizeThreadData() has
* already killed the thread-global data structures. Performing
- * TCL_TSD_INIT will leave us with an un-initialized memory block upon
+ * TCL_TSD_INIT will leave us with an uninitialized memory block upon
* which we crash (if we where to access the uninitialized hashtable).
*/
@@ -3891,7 +3891,7 @@ Tcl_GetBignumFromObj(
*
* Side effects:
* A copy of bignum is stored in *bignumValue, which is expected to be
- * uninitialized or cleared. If conversion fails, an the 'interp'
+ * uninitialized or cleared. If conversion fails and the 'interp'
* argument is not NULL, an error message is stored in the interpreter
* result.
*
diff --git a/generic/tclPanic.c b/generic/tclPanic.c
index ba7e801..1f5ef27 100644
--- a/generic/tclPanic.c
+++ b/generic/tclPanic.c
@@ -144,7 +144,7 @@ Tcl_PanicVA(
*/
/*
- * The following comment is here so that Coverity's static analizer knows that
+ * The following comment is here so that Coverity's static analyzer knows that
* a Tcl_Panic() call can never return and avoids lots of false positives.
*/
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 4de0356..5ee1a9f 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -779,7 +779,7 @@ ParseHex(
int
TclParseBackslash(
- const char *src, /* Points to the backslash character of a a
+ const char *src, /* Points to the backslash character of a
* backslash sequence. */
int numBytes, /* Max number of bytes to scan. */
int *readPtr, /* NULL, or points to storage where the number
@@ -2133,9 +2133,9 @@ TclSubstTokens(
*/
/*
- * For the handling of continuation lines in literals we first check if
- * this is actually a literal. For if not we can forego the additional
- * processing. Otherwise we pre-allocate a small table to store the
+ * For the handling of continuation lines in literals, first check if
+ * this is actually a literal. If not then forego the additional
+ * processing. Otherwise preallocate a small table to store the
* locations of all continuation lines we find in this literal, if any.
* The table is extended if needed.
*/
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index e67ae64..ce9db2a 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -827,7 +827,7 @@ TclJoinPath(
int elements, /* Number of elements to use (-1 = all) */
Tcl_Obj * const objv[], /* Path elements to join */
int forceRelative) /* If non-zero, assume all more paths are
- * relative (e. g. simple normalization) */
+ * relative (e.g. simple normalization) */
{
Tcl_Obj *res = NULL;
int i;
@@ -883,7 +883,7 @@ TclJoinPath(
}
/*
- * If it doesn't begin with '.' and is a unix path or it a
+ * If it doesn't begin with '.' and is a Unix path or it a
* windows path without backslashes, then we can be very
* efficient here. (In fact even a windows path with
* backslashes can be joined efficiently, but the path object
diff --git a/generic/tclPipe.c b/generic/tclPipe.c
index 699d559..830f3f6 100644
--- a/generic/tclPipe.c
+++ b/generic/tclPipe.c
@@ -415,7 +415,7 @@ TclCreatePipeline(
TclFile *outPipePtr, /* If non-NULL, output to the pipeline goes to
* a pipe, unless overridden by redirection in
* the command. The file id with which to read
- * frome this pipe is stored at *outPipePtr.
+ * from this pipe is stored at *outPipePtr.
* NULL means command specified its own output
* sink. */
TclFile *errFilePtr) /* If non-NULL, all stderr output from the
@@ -489,7 +489,7 @@ TclCreatePipeline(
* and remove them from the argument list in the pipeline. Count the
* number of distinct processes (it's the number of "|" arguments plus
* one) but don't remove the "|" arguments because they'll be used in the
- * second pass to seperate the individual child processes. Cannot start
+ * second pass to separate the individual child processes. Cannot start
* the child processes in this pass because the redirection symbols may
* appear anywhere in the command line - e.g., the '<' that specifies the
* input to the entire pipe may appear at the very end of the argument
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 7866158..c5b2d38 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -1782,7 +1782,7 @@ CompareVersions(
* of version numbers). */
int *isMajorPtr) /* If non-null, the word pointed to is filled
* in with a 0/1 value. 1 means that the
- * difference occured in the first element. */
+ * difference occurred in the first element. */
{
int thisIsMajor, res, flip;
char *s1, *e1, *s2, *e2, o1, o2;
@@ -2235,7 +2235,7 @@ RequirementSatisfied(
/*
* We have both min and max, and generate their internal reps. When
- * identical we compare as is, otherwise we pad with 'a0' to ove the range
+ * identical we compare as is, otherwise we pad with 'a0' to over the range
* a bit.
*/
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index 92b2938..664a18c 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -1818,7 +1818,7 @@ MakeLowPrecisionDouble(
}
/*
- * All the easy cases have failed. Promote ths significand to bignum and
+ * All the easy cases have failed. Promote the significand to bignum and
* call MakeHighPrecisionDouble to do it the hard way.
*/
@@ -2120,7 +2120,7 @@ RefineApproximation(
/*
* Compute twoMd as 2*M*d, where d is the exact value.
* This is done by multiplying by 5**(M5+exponent) and then multiplying
- * by 2**(M5+exponent+1), which is, of couse, a left shift.
+ * by 2**(M5+exponent+1), which is, of course, a left shift.
*/
if (mp_init_copy(&twoMd, exactSignificand) != MP_OKAY) {
@@ -2349,7 +2349,7 @@ NormalizeRightward(
*
* RequiredPrecision --
*
- * Determines the number of bits needed to hold an intger.
+ * Determines the number of bits needed to hold an integer.
*
* Results:
* Returns the position of the most significant bit (0 - 63). Returns 0
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index de6dc2f..340ef50 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -297,7 +297,7 @@ GrowStringBuffer(
int flag)
{
/*
- * Pre-conditions:
+ * Preconditions:
* objPtr->typePtr == &tclStringType
* needed > stringPtr->allocated
* flag || objPtr->bytes != NULL
@@ -348,7 +348,7 @@ GrowUnicodeBuffer(
int needed)
{
/*
- * Pre-conditions:
+ * Preconditions:
* objPtr->typePtr == &tclStringType
* needed > stringPtr->maxChars
* needed < UNICHAR_STRING_MAXCHARS
@@ -594,7 +594,7 @@ Tcl_NewUnicodeObj(
* Get the length of the Unicode string from the Tcl object.
*
* Results:
- * Pointer to unicode string representing the unicode object.
+ * Pointer to Unicode string representing the Unicode object.
*
* Side effects:
* Frees old internal rep. Allocates memory for new "String" internal
@@ -676,10 +676,10 @@ Tcl_GetCharLength(
}
/*
- * Optimize the case where we're really dealing with a bytearray object;
- * we don't need to convert to a string to perform the get-length operation.
+ * Optimize BytArray case: No need to convert to a string to perform the
+ * get-length operation.
*
- * Starting in Tcl 8.7, we check for a "pure" bytearray, because the
+ * Starting in Tcl 8.7, check for a "pure" bytearray, because the
* machinery behind that test is using a proper bytearray ObjType. We
* could also compute length of an improper bytearray without shimmering
* but there's no value in that. We *want* to shimmer an improper bytearray
@@ -773,7 +773,7 @@ Tcl_GetUniChar(
}
/*
- * Optimize the case where we're really dealing with a bytearray object
+ * Optimize the case where we're really dealing with a ByteArray object
* we don't need to convert to a string to perform the indexing operation.
*/
@@ -817,7 +817,7 @@ Tcl_GetUniChar(
int
TclGetUniChar(
- Tcl_Obj *objPtr, /* The object to get the Unicode charater
+ Tcl_Obj *objPtr, /* The object to get the Unicode character
* from. */
int index) /* Get the index'th Unicode character. */
{
@@ -829,7 +829,7 @@ TclGetUniChar(
}
/*
- * Optimize the case where we're really dealing with a bytearray object
+ * Optimize the case where we're really dealing with a ByteArray object
* we don't need to convert to a string to perform the indexing operation.
*/
@@ -911,7 +911,7 @@ TclGetUniChar(
#undef Tcl_GetUnicode
unsigned short *
Tcl_GetUnicode(
- Tcl_Obj *objPtr) /* The object to find the unicode string
+ Tcl_Obj *objPtr) /* The object to find the Unicode string
* for. */
{
return TclGetUnicodeFromObj(objPtr, NULL);
@@ -964,10 +964,10 @@ TclGetUnicodeFromObj_(
#if TCL_UTF_MAX > 3 && !defined(TCL_NO_DEPRECATED)
unsigned short *
Tcl_GetUnicodeFromObj(
- Tcl_Obj *objPtr, /* The object to find the unicode string
+ Tcl_Obj *objPtr, /* The object to find the Unicode string
* for. */
int *lengthPtr) /* If non-NULL, the location where the string
- * rep's unichar length should be stored. If
+ * rep's Tcl_UniChar length should be stored. If
* NULL, no length is stored. */
{
String *stringPtr;
@@ -1090,7 +1090,7 @@ TclGetRange(
}
/*
- * Optimize the case where we're really dealing with a bytearray object
+ * Optimize the case where we're really dealing with a ByteArray object
* we don't need to convert to a string to perform the substring operation.
*/
@@ -1309,7 +1309,7 @@ Tcl_SetObjLength(
}
/*
- * Mark the new end of the unicode string
+ * Mark the new end of the Unicode string
*/
stringPtr->numChars = length;
@@ -1401,14 +1401,14 @@ Tcl_AttemptSetObjLength(
objPtr->bytes[length] = 0;
/*
- * Invalidate the unicode data.
+ * Invalidate the Unicode data.
*/
stringPtr->numChars = -1;
stringPtr->hasUnicode = 0;
} else {
/*
- * Changing length of pure unicode string.
+ * Changing length of pure Unicode string.
*/
if (length > UNICHAR_STRING_MAXCHARS) {
@@ -1424,7 +1424,7 @@ Tcl_AttemptSetObjLength(
}
/*
- * Mark the new end of the unicode string.
+ * Mark the new end of the Unicode string.
*/
stringPtr->unicode[length] = 0;
@@ -1459,9 +1459,9 @@ Tcl_AttemptSetObjLength(
void
Tcl_SetUnicodeObj(
Tcl_Obj *objPtr, /* The object to set the string of. */
- const unsigned short *unicode, /* The unicode string used to initialize the
+ const unsigned short *unicode, /* The Unicode string used to initialize the
* object. */
- int numChars) /* Number of characters in the unicode
+ int numChars) /* Number of characters in the Unicode
* string. */
{
String *stringPtr;
@@ -1523,9 +1523,9 @@ UnicodeLength(
static void
SetUnicodeObj(
Tcl_Obj *objPtr, /* The object to set the string of. */
- const Tcl_UniChar *unicode, /* The unicode string used to initialize the
+ const Tcl_UniChar *unicode, /* The Unicode string used to initialize the
* object. */
- int numChars) /* Number of characters in the unicode
+ int numChars) /* Number of characters in the Unicode
* string. */
{
UniCharString *stringPtr;
@@ -1699,9 +1699,9 @@ Tcl_AppendToObj(
void
TclAppendUnicodeToObj(
Tcl_Obj *objPtr, /* Points to the object to append to. */
- const Tcl_UniChar *unicode, /* The unicode string to append to the
+ const Tcl_UniChar *unicode, /* The Unicode string to append to the
* object. */
- int length) /* Number of chars in "unicode". */
+ int length) /* Number of chars in unicode. */
{
UniCharString *stringPtr;
@@ -1756,7 +1756,7 @@ Tcl_AppendUnicodeToObj(
SET_STRING(objPtr, stringPtr);
}
#endif
-
+
/*
*----------------------------------------------------------------------
*
@@ -1796,7 +1796,7 @@ Tcl_AppendObjToObj(
}
/*
- * Handle append of one bytearray object to another as a special case.
+ * Handle append of one ByteArray object to another as a special case.
* Note that we only do this when the objects are pure so that the
* bytearray faithfully represent the true value; Otherwise appending the
* byte arrays together could lose information;
@@ -1913,8 +1913,8 @@ Tcl_AppendObjToObj(
*
* AppendUnicodeToUnicodeRep --
*
- * This function appends the contents of "unicode" to the Unicode rep of
- * "objPtr". objPtr must already have a valid Unicode rep.
+ * Appends the contents of unicode to the Unicode rep of
+ * objPtr, which must already have a valid Unicode rep.
*
* Results:
* None.
@@ -1945,7 +1945,7 @@ AppendUnicodeToUnicodeRep(
stringPtr = GET_UNICHAR_STRING(objPtr);
/*
- * If not enough space has been allocated for the unicode rep, reallocate
+ * If not enough space has been allocated for the Unicode rep, reallocate
* the internal rep object with additional space. First try to double the
* required allocation; if that fails, try a more modest increase. See the
* "TCL STRING GROWTH ALGORITHM" comment at the top of this file for an
@@ -1959,7 +1959,7 @@ AppendUnicodeToUnicodeRep(
int offset = -1;
/*
- * Protect against case where unicode points into the existing
+ * Protect against case where Unicode points into the existing
* stringPtr->unicode array. Force it to follow any relocations due to
* the reallocs below.
*/
@@ -1973,7 +1973,7 @@ AppendUnicodeToUnicodeRep(
stringPtr = GET_UNICHAR_STRING(objPtr);
/*
- * Relocate unicode if needed; see above.
+ * Relocate Unicode if needed; see above.
*/
if (offset >= 0) {
@@ -2018,7 +2018,7 @@ static void
AppendUnicodeToUtfRep(
Tcl_Obj *objPtr, /* Points to the object to append to. */
const Tcl_UniChar *unicode, /* String to convert to UTF. */
- int numChars) /* Number of chars of "unicode" to convert. */
+ int numChars) /* Number of chars of unicode to convert. */
{
UniCharString *stringPtr = GET_UNICHAR_STRING(objPtr);
@@ -4301,8 +4301,8 @@ TclStringReverse(
if (!inPlace || Tcl_IsShared(objPtr)) {
/*
- * Create a non-empty, pure unicode value, so we can coax
- * Tcl_SetObjLength into growing the unicode rep buffer.
+ * Create a non-empty, pure Unicode value, so we can coax
+ * Tcl_SetObjLength into growing the Unicode rep buffer.
*/
objPtr = TclNewUnicodeObj(&ch, 1);
@@ -4767,7 +4767,7 @@ SetStringFromAny(
* None.
*
* Side effects:
- * The object's string may be set by converting its Unicode represention
+ * The object's string may be set by converting its Unicode representation
* to UTF format.
*
*----------------------------------------------------------------------
@@ -4804,7 +4804,7 @@ ExtendStringRepWithUnicode(
int numChars)
{
/*
- * Pre-condition: this is the "string" Tcl_ObjType.
+ * Precondition: this is the "string" Tcl_ObjType.
*/
int i, origLength, size = 0;
diff --git a/generic/tclStringRep.h b/generic/tclStringRep.h
index bce9092..0219a00 100644
--- a/generic/tclStringRep.h
+++ b/generic/tclStringRep.h
@@ -55,7 +55,7 @@ typedef struct {
* the UTF string (minus 1 byte for the
* termination char). */
Tcl_Size maxChars; /* Max number of chars that can fit in the
- * space allocated for the unicode array. */
+ * space allocated for the Unicode array. */
int hasUnicode; /* Boolean determining whether the string has
* a Unicode representation. */
unsigned short unicode[TCLFLEXARRAY]; /* The array of Unicode chars. The actual size
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 6d29465..05a829c 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -2058,7 +2058,8 @@ const TclStubs tclStubs = {
Tcl_GetWideUIntFromObj, /* 684 */
Tcl_DStringToObj, /* 685 */
Tcl_GetSizeIntFromObj, /* 686 */
- TclUnusedStubEntry, /* 687 */
+ 0, /* 687 */
+ TclUnusedStubEntry, /* 688 */
};
/* !END!: Do not edit above this line. */
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 459c494..893f073 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -2063,7 +2063,7 @@ static int UtfExtWrapper(
int result;
int flags;
Tcl_Obj **flagObjs;
- int nflags;
+ Tcl_Size nflags;
static const struct {
const char *flagKey;
int flag;
@@ -2078,7 +2078,7 @@ static int UtfExtWrapper(
{"profilereplace", TCL_ENCODING_PROFILE_REPLACE},
{NULL, 0}
};
- int i;
+ Tcl_Size i;
Tcl_WideInt wide;
if (objc < 7 || objc > 10) {
@@ -2453,7 +2453,8 @@ TestevalexObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int length, flags;
+ int flags;
+ Tcl_Size length;
const char *script;
flags = 0;
@@ -3092,7 +3093,7 @@ TestgetassocdataCmd(
* TestgetplatformCmd --
*
* This procedure implements the "testgetplatform" command. It is
- * used to retrievel the value of the tclPlatform global variable.
+ * used to retrieve the value of the tclPlatform global variable.
*
* Results:
* A standard Tcl result.
@@ -3691,7 +3692,8 @@ TestlinkarrayCmd(
TCL_LINK_FLOAT, TCL_LINK_DOUBLE, TCL_LINK_STRING, TCL_LINK_CHARS,
TCL_LINK_BINARY
};
- int optionIndex, typeIndex, readonly, i, size, length;
+ int optionIndex, typeIndex, readonly, i, size;
+ Tcl_Size length;
char *name, *arg;
Tcl_WideInt addr;
@@ -4036,7 +4038,8 @@ TestparserObjCmd(
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
- int length, dummy;
+ Tcl_Size dummy;
+ int length;
Tcl_Parse parse;
if (objc != 3) {
@@ -4092,7 +4095,8 @@ TestexprparserObjCmd(
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
- int length, dummy;
+ Tcl_Size dummy;
+ int length;
Tcl_Parse parse;
if (objc != 3) {
@@ -4281,7 +4285,8 @@ TestparsevarnameObjCmd(
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
- int append, length, dummy;
+ int length, append;
+ Tcl_Size dummy;
Tcl_Parse parse;
if (objc != 4) {
@@ -4414,7 +4419,8 @@ TestregexpObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, ii, indices, stringLength, match, about;
+ int i, indices, match, about;
+ Tcl_Size stringLength, ii;
int hasxflags, cflags, eflags;
Tcl_RegExp regExpr;
const char *string;
@@ -4527,7 +4533,7 @@ TestregexpObjCmd(
if (objc > 2 && (cflags&REG_EXPECT) && indices) {
const char *varName;
const char *value;
- int start, end;
+ Tcl_Size start, end;
char resinfo[TCL_INTEGER_SPACE * 2];
varName = Tcl_GetString(objv[2]);
@@ -4567,7 +4573,7 @@ TestregexpObjCmd(
Tcl_RegExpGetInfo(regExpr, &info);
for (i = 0; i < objc; i++) {
- int start, end;
+ Tcl_Size start, end;
Tcl_Obj *newPtr, *varPtr, *valuePtr;
varPtr = objv[i];
@@ -4853,7 +4859,7 @@ TestsetplatformCmd(
* A standard Tcl result.
*
* Side effects:
- * When the packge given by argv[1] is loaded into an interpreter,
+ * When the package given by argv[1] is loaded into an interpreter,
* variable "x" in that interpreter is set to "loaded".
*
*----------------------------------------------------------------------
@@ -5568,7 +5574,7 @@ TeststringbytesObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
- int n;
+ Tcl_Size n;
const unsigned char *p;
if (objc != 2) {
@@ -6956,10 +6962,10 @@ static int
TestWrongNumArgsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, length;
+ Tcl_Size i, length;
const char *msg;
if (objc < 3) {
@@ -7474,7 +7480,7 @@ static Tcl_Obj *
SimpleRedirect(
Tcl_Obj *pathPtr) /* Name of file to copy. */
{
- int len;
+ Tcl_Size len;
const char *str;
Tcl_Obj *origPtr;
@@ -7667,7 +7673,7 @@ TestUtfPrevCmd(
int objc,
Tcl_Obj *const objv[])
{
- int numBytes, offset;
+ Tcl_Size numBytes, offset;
char *bytes;
const char *result;
@@ -7708,7 +7714,7 @@ TestNumUtfCharsCmd(
Tcl_Obj *const objv[])
{
if (objc > 1) {
- int numBytes, len, limit = TCL_INDEX_NONE;
+ Tcl_Size numBytes, len, limit = TCL_INDEX_NONE;
const char *bytes = Tcl_GetStringFromObj(objv[1], &numBytes);
if (objc > 2) {
@@ -7776,7 +7782,7 @@ TestGetIntForIndexCmd(
int objc,
Tcl_Obj *const objv[])
{
- int result;
+ Tcl_Size result;
Tcl_WideInt endvalue;
if (objc != 3) {
@@ -8063,7 +8069,7 @@ TestNRELevels(
*
* This procedure implements the "testconcatobj" command. It is used
* to test that Tcl_ConcatObj does indeed return a fresh Tcl_Obj in all
- * cases and thet it never corrupts its arguments. In other words, that
+ * cases and that it never corrupts its arguments. In other words, that
* [Bug 1447328] was fixed properly.
*
* Results:
@@ -8654,7 +8660,7 @@ static int
InterpCompiledVarResolver(
TCL_UNUSED(Tcl_Interp *),
const char *name,
- TCL_UNUSED(int) /* length */,
+ TCL_UNUSED(Tcl_Size) /* length */,
TCL_UNUSED(Tcl_Namespace *),
Tcl_ResolvedVarInfo **rPtr)
{
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index e5b8a55..0f5f21f 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -38,10 +38,10 @@
* Forward declarations for functions defined later in this file:
*/
-static int CheckIfVarUnset(Tcl_Interp *interp, Tcl_Obj **varPtr, size_t varIndex);
+static int CheckIfVarUnset(Tcl_Interp *interp, Tcl_Obj **varPtr, Tcl_Size varIndex);
static int GetVariableIndex(Tcl_Interp *interp,
- Tcl_Obj *obj, size_t *indexPtr);
-static void SetVarToObj(Tcl_Obj **varPtr, size_t varIndex, Tcl_Obj *objPtr);
+ Tcl_Obj *obj, Tcl_Size *indexPtr);
+static void SetVarToObj(Tcl_Obj **varPtr, Tcl_Size varIndex, Tcl_Obj *objPtr);
static Tcl_ObjCmdProc TestbignumobjCmd;
static Tcl_ObjCmdProc TestbooleanobjCmd;
static Tcl_ObjCmdProc TestdoubleobjCmd;
@@ -161,7 +161,7 @@ TestbignumobjCmd(
BIGNUM_RADIXSIZE
};
int index;
- size_t varIndex;
+ Tcl_Size varIndex;
const char *string;
mp_int bignumValue;
Tcl_Obj **varPtr;
@@ -188,13 +188,13 @@ TestbignumobjCmd(
string = Tcl_GetString(objv[3]);
if (mp_init(&bignumValue) != MP_OKAY) {
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("error in mp_init", -1));
+ Tcl_NewStringObj("error in mp_init", TCL_INDEX_NONE));
return TCL_ERROR;
}
if (mp_read_radix(&bignumValue, string, 10) != MP_OKAY) {
mp_clear(&bignumValue);
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("error in mp_read_radix", -1));
+ Tcl_NewStringObj("error in mp_read_radix", TCL_INDEX_NONE));
return TCL_ERROR;
}
@@ -238,7 +238,7 @@ TestbignumobjCmd(
if (mp_mul_d(&bignumValue, 10, &bignumValue) != MP_OKAY) {
mp_clear(&bignumValue);
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("error in mp_mul_d", -1));
+ Tcl_NewStringObj("error in mp_mul_d", TCL_INDEX_NONE));
return TCL_ERROR;
}
if (!Tcl_IsShared(varPtr[varIndex])) {
@@ -263,7 +263,7 @@ TestbignumobjCmd(
if (mp_div_d(&bignumValue, 10, &bignumValue, NULL) != MP_OKAY) {
mp_clear(&bignumValue);
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("error in mp_div_d", -1));
+ Tcl_NewStringObj("error in mp_div_d", TCL_INDEX_NONE));
return TCL_ERROR;
}
if (!Tcl_IsShared(varPtr[varIndex])) {
@@ -288,7 +288,7 @@ TestbignumobjCmd(
if (mp_mod_2d(&bignumValue, 1, &bignumValue) != MP_OKAY) {
mp_clear(&bignumValue);
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("error in mp_mod_2d", -1));
+ Tcl_NewStringObj("error in mp_mod_2d", TCL_INDEX_NONE));
return TCL_ERROR;
}
if (!Tcl_IsShared(varPtr[varIndex])) {
@@ -352,7 +352,7 @@ TestbooleanobjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- size_t varIndex;
+ Tcl_Size varIndex;
int boolValue;
const char *subCmd;
Tcl_Obj **varPtr;
@@ -452,7 +452,7 @@ TestdoubleobjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- size_t varIndex;
+ Tcl_Size varIndex;
double doubleValue;
const char *subCmd;
Tcl_Obj **varPtr;
@@ -569,7 +569,7 @@ TestindexobjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int allowAbbrev, index, setError, i, result;
- Tcl_WideInt index2;
+ Tcl_Size index2;
const char **argv;
static const char *const tablePtr[] = {"a", "b", "check", NULL};
@@ -578,8 +578,8 @@ TestindexobjCmd(
*/
struct IndexRep {
void *tablePtr; /* Pointer to the table of strings. */
- TCL_HASH_TYPE offset; /* Offset between table entries. */
- TCL_HASH_TYPE index; /* Selected index into table. */
+ Tcl_Size offset; /* Offset between table entries. */
+ Tcl_Size index; /* Selected index into table. */
} *indexRep;
if ((objc == 3) && (strcmp(Tcl_GetString(objv[1]),
@@ -590,7 +590,7 @@ TestindexobjCmd(
* lookups.
*/
- if (Tcl_GetWideIntFromObj(interp, objv[2], &index2) != TCL_OK) {
+ if (Tcl_GetIntForIndex(interp, objv[2], TCL_INDEX_NONE, &index2) != TCL_OK) {
return TCL_ERROR;
}
@@ -606,7 +606,7 @@ TestindexobjCmd(
}
if (objc < 5) {
- Tcl_AppendToObj(Tcl_GetObjResult(interp), "wrong # args", -1);
+ Tcl_AppendToObj(Tcl_GetObjResult(interp), "wrong # args", TCL_INDEX_NONE);
return TCL_ERROR;
}
@@ -617,7 +617,7 @@ TestindexobjCmd(
return TCL_ERROR;
}
- argv = (const char **)ckalloc((objc-3) * sizeof(char *));
+ argv = (const char **)ckalloc(((unsigned)objc-3) * sizeof(char *));
for (i = 4; i < objc; i++) {
argv[i-4] = Tcl_GetString(objv[i]);
}
@@ -658,7 +658,7 @@ TestintobjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- size_t varIndex;
+ Tcl_Size varIndex;
#if (INT_MAX != LONG_MAX) /* int is not the same size as long */
int i;
#endif
@@ -746,7 +746,7 @@ TestintobjCmd(
return TCL_ERROR;
}
Tcl_AppendToObj(Tcl_GetObjResult(interp),
- ((wideValue == WIDE_MAX)? "1" : "0"), -1);
+ ((wideValue == WIDE_MAX)? "1" : "0"), TCL_INDEX_NONE);
} else if (strcmp(subCmd, "get") == 0) {
if (objc != 3) {
goto wrongNumArgs;
@@ -762,7 +762,7 @@ TestintobjCmd(
if (CheckIfVarUnset(interp, varPtr,varIndex)) {
return TCL_ERROR;
}
- Tcl_AppendToObj(Tcl_GetObjResult(interp), Tcl_GetString(varPtr[varIndex]), -1);
+ Tcl_AppendToObj(Tcl_GetObjResult(interp), Tcl_GetString(varPtr[varIndex]), TCL_INDEX_NONE);
} else if (strcmp(subCmd, "inttoobigtest") == 0) {
/*
* If long ints have more bits than ints on this platform, verify that
@@ -775,7 +775,7 @@ TestintobjCmd(
goto wrongNumArgs;
}
#if (INT_MAX == LONG_MAX) /* int is same size as long int */
- Tcl_AppendToObj(Tcl_GetObjResult(interp), "1", -1);
+ Tcl_AppendToObj(Tcl_GetObjResult(interp), "1", TCL_INDEX_NONE);
#else
if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) {
Tcl_SetWideIntObj(varPtr[varIndex], LONG_MAX);
@@ -784,10 +784,10 @@ TestintobjCmd(
}
if (Tcl_GetIntFromObj(interp, varPtr[varIndex], &i) != TCL_OK) {
Tcl_ResetResult(interp);
- Tcl_AppendToObj(Tcl_GetObjResult(interp), "1", -1);
+ Tcl_AppendToObj(Tcl_GetObjResult(interp), "1", TCL_INDEX_NONE);
return TCL_OK;
}
- Tcl_AppendToObj(Tcl_GetObjResult(interp), "0", -1);
+ Tcl_AppendToObj(Tcl_GetObjResult(interp), "0", TCL_INDEX_NONE);
#endif
} else if (strcmp(subCmd, "mult10") == 0) {
if (objc != 3) {
@@ -903,11 +903,11 @@ TestlistobjCmd(
LISTOBJ_GETELEMENTSMEMCHECK,
} cmdIndex;
- size_t varIndex; /* Variable number converted to binary */
- Tcl_WideInt first; /* First index in the list */
- Tcl_WideInt count; /* Count of elements in a list */
+ Tcl_Size varIndex; /* Variable number converted to binary */
+ Tcl_Size first; /* First index in the list */
+ Tcl_Size count; /* Count of elements in a list */
Tcl_Obj **varPtr;
- int i, len;
+ Tcl_Size i, len;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg...?");
@@ -948,8 +948,8 @@ TestlistobjCmd(
"varIndex start count ?element...?");
return TCL_ERROR;
}
- if (Tcl_GetWideIntFromObj(interp, objv[3], &first) != TCL_OK
- || Tcl_GetWideIntFromObj(interp, objv[4], &count) != TCL_OK) {
+ if (Tcl_GetIntForIndex(interp, objv[3], TCL_INDEX_NONE, &first) != TCL_OK
+ || Tcl_GetIntForIndex(interp, objv[4], TCL_INDEX_NONE, &count) != TCL_OK) {
return TCL_ERROR;
}
if (Tcl_IsShared(varPtr[varIndex])) {
@@ -1036,7 +1036,7 @@ TestobjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- size_t varIndex, destIndex;
+ Tcl_Size varIndex, destIndex;
int i;
const Tcl_ObjType *targetType;
Tcl_Obj **varPtr;
@@ -1112,7 +1112,7 @@ TestobjCmd(
const char *typeName;
if (objv[2]->typePtr == NULL) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj("none", -1));
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("none", TCL_INDEX_NONE));
} else {
typeName = objv[2]->typePtr->name;
if (!strcmp(typeName, "utf32string"))
@@ -1120,7 +1120,7 @@ TestobjCmd(
#ifndef TCL_WIDE_INT_IS_LONG
else if (!strcmp(typeName, "wideInt")) typeName = "int";
#endif
- Tcl_SetObjResult(interp, Tcl_NewStringObj(typeName, -1));
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(typeName, TCL_INDEX_NONE));
}
}
return TCL_OK;
@@ -1214,15 +1214,15 @@ TestobjCmd(
goto wrongNumArgs;
}
if (varPtr[varIndex]->typePtr == NULL) { /* a string! */
- Tcl_AppendToObj(Tcl_GetObjResult(interp), "string", -1);
+ Tcl_AppendToObj(Tcl_GetObjResult(interp), "string", TCL_INDEX_NONE);
#ifndef TCL_WIDE_INT_IS_LONG
} else if (!strcmp(varPtr[varIndex]->typePtr->name, "wideInt")) {
Tcl_AppendToObj(Tcl_GetObjResult(interp),
- "int", -1);
+ "int", TCL_INDEX_NONE);
#endif
} else {
Tcl_AppendToObj(Tcl_GetObjResult(interp),
- varPtr[varIndex]->typePtr->name, -1);
+ varPtr[varIndex]->typePtr->name, TCL_INDEX_NONE);
}
break;
default:
@@ -1258,9 +1258,9 @@ TeststringobjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
unsigned short *unicode;
- size_t varIndex;
- int size, option, i;
- Tcl_WideInt length;
+ Tcl_Size size, varIndex;
+ int option, i;
+ Tcl_Size length;
#define MAX_STRINGS 11
const char *string, *strings[MAX_STRINGS+1];
String *strPtr;
@@ -1291,7 +1291,7 @@ TeststringobjCmd(
if (objc != 5) {
goto wrongNumArgs;
}
- if (Tcl_GetWideIntFromObj(interp, objv[4], &length) != TCL_OK) {
+ if (Tcl_GetIntForIndex(interp, objv[4], TCL_INDEX_NONE, &length) != TCL_OK) {
return TCL_ERROR;
}
if (varPtr[varIndex] == NULL) {
@@ -1353,7 +1353,7 @@ TeststringobjCmd(
if (CheckIfVarUnset(interp, varPtr, varIndex)) {
return TCL_ERROR;
}
- Tcl_AppendToObj(Tcl_GetObjResult(interp), Tcl_GetString(varPtr[varIndex]), -1);
+ Tcl_AppendToObj(Tcl_GetObjResult(interp), Tcl_GetString(varPtr[varIndex]), TCL_INDEX_NONE);
break;
case 4: /* length */
if (objc != 3) {
@@ -1413,7 +1413,7 @@ TeststringobjCmd(
if (objc != 4) {
goto wrongNumArgs;
}
- if (Tcl_GetWideIntFromObj(interp, objv[3], &length) != TCL_OK) {
+ if (Tcl_GetIntForIndex(interp, objv[3], TCL_INDEX_NONE, &length) != TCL_OK) {
return TCL_ERROR;
}
if (varPtr[varIndex] != NULL) {
@@ -1439,12 +1439,12 @@ TeststringobjCmd(
Tcl_SetWideIntObj(Tcl_GetObjResult(interp), length);
break;
case 10: { /* range */
- int first, last;
+ Tcl_Size first, last;
if (objc != 5) {
goto wrongNumArgs;
}
- if ((Tcl_GetIntFromObj(interp, objv[3], &first) != TCL_OK)
- || (Tcl_GetIntFromObj(interp, objv[4], &last) != TCL_OK)) {
+ if ((Tcl_GetIntForIndex(interp, objv[3], TCL_INDEX_NONE, &first) != TCL_OK)
+ || (Tcl_GetIntForIndex(interp, objv[4], TCL_INDEX_NONE, &last) != TCL_OK)) {
return TCL_ERROR;
}
Tcl_SetObjResult(interp, Tcl_GetRange(varPtr[varIndex], first, last));
@@ -1469,12 +1469,12 @@ TeststringobjCmd(
string = Tcl_GetStringFromObj(varPtr[varIndex], &size);
- if (Tcl_GetWideIntFromObj(interp, objv[3], &length) != TCL_OK) {
+ if (Tcl_GetIntForIndex(interp, objv[3], size-1, &length) != TCL_OK) {
return TCL_ERROR;
}
- if ((length < 0) || (length > size)) {
+ if (length == TCL_INDEX_NONE) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "index value out of range", -1));
+ "index value out of range", TCL_INDEX_NONE));
return TCL_ERROR;
}
@@ -1500,12 +1500,12 @@ TeststringobjCmd(
unicode = Tcl_GetUnicodeFromObj(varPtr[varIndex], &size);
- if (Tcl_GetWideIntFromObj(interp, objv[3], &length) != TCL_OK) {
+ if (Tcl_GetIntForIndex(interp, objv[3], size-1, &length) != TCL_OK) {
return TCL_ERROR;
}
- if ((length < 0) || (length > size)) {
+ if (length == TCL_INDEX_NONE) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "index value out of range", -1));
+ "index value out of range", TCL_INDEX_NONE));
return TCL_ERROR;
}
@@ -1513,7 +1513,7 @@ TeststringobjCmd(
Tcl_SetObjResult(interp, varPtr[varIndex]);
break;
case 13: /* newunicode*/
- unicode = (unsigned short *) ckalloc((objc - 3) * sizeof(unsigned short));
+ unicode = (unsigned short *) ckalloc(((unsigned)objc - 3) * sizeof(unsigned short));
for (i = 0; i < (objc - 3); ++i) {
int val;
if (Tcl_GetIntFromObj(interp, objv[i + 3], &val) != TCL_OK) {
@@ -1529,7 +1529,7 @@ TeststringobjCmd(
Tcl_SetObjResult(interp, varPtr[varIndex]);
ckfree(unicode);
break;
- }
+ }
return TCL_OK;
}
@@ -1556,7 +1556,7 @@ TeststringobjCmd(
static void
SetVarToObj(
Tcl_Obj **varPtr,
- size_t varIndex, /* Designates the assignment variable. */
+ Tcl_Size varIndex, /* Designates the assignment variable. */
Tcl_Obj *objPtr) /* Points to object to assign to var. */
{
if (varPtr[varIndex] != NULL) {
@@ -1590,16 +1590,16 @@ GetVariableIndex(
Tcl_Obj *obj, /* The variable index
* specified as a nonnegative number less than
* NUMBER_OF_OBJECT_VARS. */
- size_t *indexPtr) /* Place to store converted result. */
+ Tcl_Size *indexPtr) /* Place to store converted result. */
{
- Tcl_WideInt index;
+ Tcl_Size index;
- if (Tcl_GetWideIntFromObj(interp, obj, &index) != TCL_OK) {
+ if (Tcl_GetIntForIndex(interp, obj, NUMBER_OF_OBJECT_VARS - 1, &index) != TCL_OK) {
return TCL_ERROR;
}
- if (index < 0 || index >= NUMBER_OF_OBJECT_VARS) {
+ if (index == TCL_INDEX_NONE) {
Tcl_ResetResult(interp);
- Tcl_AppendToObj(Tcl_GetObjResult(interp), "bad variable index", -1);
+ Tcl_AppendToObj(Tcl_GetObjResult(interp), "bad variable index", TCL_INDEX_NONE);
return TCL_ERROR;
}
@@ -1629,14 +1629,14 @@ static int
CheckIfVarUnset(
Tcl_Interp *interp, /* Interpreter for error reporting. */
Tcl_Obj ** varPtr,
- size_t varIndex) /* Index of the test variable to check. */
+ Tcl_Size varIndex) /* Index of the test variable to check. */
{
if (varPtr[varIndex] == NULL) {
char buf[32 + TCL_INTEGER_SPACE];
- snprintf(buf, sizeof(buf), "variable %" TCL_Z_MODIFIER "u is unset (NULL)", varIndex);
+ snprintf(buf, sizeof(buf), "variable %d is unset (NULL)", varIndex);
Tcl_ResetResult(interp);
- Tcl_AppendToObj(Tcl_GetObjResult(interp), buf, -1);
+ Tcl_AppendToObj(Tcl_GetObjResult(interp), buf, TCL_INDEX_NONE);
return 1;
}
return 0;
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index 65bfb14..df4d2e3 100644
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -963,7 +963,7 @@ GetBlocks(
size_t n;
/*
- * First, atttempt to move blocks from the shared cache. Note the
+ * First, attempt to move blocks from the shared cache. Note the
* potentially dirty read of numFree before acquiring the lock which is a
* slight performance enhancement. The value is verified after the lock is
* actually acquired.
diff --git a/generic/tclThreadJoin.c b/generic/tclThreadJoin.c
index 4d2aca5..af4bc13 100644
--- a/generic/tclThreadJoin.c
+++ b/generic/tclThreadJoin.c
@@ -211,8 +211,8 @@ TclJoinThread(
*
* TclRememberJoinableThread --
*
- * This procedure remebers a thread as joinable. Only a call to
- * TclJoinThread will remove the structre created (and initialized) here.
+ * This procedure remembers a thread as joinable. Only a call to
+ * TclJoinThread will remove the structure created (and initialized) here.
* IOW, not waiting upon a joinable thread will cause memory leaks.
*
* Results:
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index ed887db..44d2b0e 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -273,7 +273,8 @@ ThreadObjCmd(
}
case THREAD_CREATE: {
const char *script;
- int joinable, len;
+ int joinable;
+ Tcl_Size len;
if (objc == 2) {
/*
@@ -608,7 +609,7 @@ NewTestThread(
*/
Tcl_Preserve(tsdPtr->interp);
- result = Tcl_EvalEx(tsdPtr->interp, threadEvalScript, -1, 0);
+ result = Tcl_EvalEx(tsdPtr->interp, threadEvalScript, TCL_INDEX_NONE, 0);
if (result != TCL_OK) {
ThreadErrorProc(tsdPtr->interp);
}
@@ -655,10 +656,10 @@ ThreadErrorProc(
errorInfo = Tcl_GetVar2(interp, "errorInfo", NULL, TCL_GLOBAL_ONLY);
if (errorProcString == NULL) {
errChannel = Tcl_GetStdChannel(TCL_STDERR);
- Tcl_WriteChars(errChannel, "Error from thread ", -1);
- Tcl_WriteChars(errChannel, buf, -1);
+ Tcl_WriteChars(errChannel, "Error from thread ", TCL_INDEX_NONE);
+ Tcl_WriteChars(errChannel, buf, TCL_INDEX_NONE);
Tcl_WriteChars(errChannel, "\n", 1);
- Tcl_WriteChars(errChannel, errorInfo, -1);
+ Tcl_WriteChars(errChannel, errorInfo, TCL_INDEX_NONE);
Tcl_WriteChars(errChannel, "\n", 1);
} else {
argv[0] = errorProcString;
@@ -823,7 +824,7 @@ ThreadSend(
}
/*
- * Short circut sends to ourself. Ought to do something with -async, like
+ * Short circuit sends to ourself. Ought to do something with -async, like
* run in an idle handler.
*/
@@ -983,7 +984,7 @@ ThreadCancel(
Tcl_MutexUnlock(&threadMutex);
Tcl_ResetResult(interp);
return Tcl_CancelEval(tsdPtr->interp,
- (result != NULL) ? Tcl_NewStringObj(result, -1) : NULL, 0, flags);
+ (result != NULL) ? Tcl_NewStringObj(result, TCL_INDEX_NONE) : NULL, 0, flags);
}
/*
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 3e8844a..0b1606a 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -1107,7 +1107,7 @@ Tcl_CommandTraceInfo(
*
* Side effects:
* A trace is set up on the command given by cmdName, such that future
- * changes to the command will be intermediated by proc. See the manual
+ * changes to the command will be mediated by proc. See the manual
* entry for complete details on the calling sequence for proc.
*
*----------------------------------------------------------------------
@@ -2967,7 +2967,7 @@ Tcl_UntraceVar2(
* trace, including any of TCL_TRACE_READS,
* TCL_TRACE_WRITES, TCL_TRACE_UNSETS,
* TCL_GLOBAL_ONLY, and TCL_NAMESPACE_ONLY. */
- Tcl_VarTraceProc *proc, /* Function assocated with trace. */
+ Tcl_VarTraceProc *proc, /* Function associated with trace. */
ClientData clientData) /* Arbitrary argument to pass to proc. */
{
VarTrace *tracePtr;
@@ -3101,7 +3101,7 @@ Tcl_VarTraceInfo(
* signify an array reference. */
int flags, /* OR-ed combo or TCL_GLOBAL_ONLY,
* TCL_NAMESPACE_ONLY (can be 0). */
- Tcl_VarTraceProc *proc, /* Function assocated with trace. */
+ Tcl_VarTraceProc *proc, /* Function associated with trace. */
ClientData prevClientData) /* If non-NULL, gives last value returned by
* this function, so this call will return the
* next trace after that one. If NULL, this
@@ -3138,7 +3138,7 @@ Tcl_VarTraceInfo2(
* as-a-whole. */
int flags, /* OR-ed combination of TCL_GLOBAL_ONLY,
* TCL_NAMESPACE_ONLY. */
- Tcl_VarTraceProc *proc, /* Function assocated with trace. */
+ Tcl_VarTraceProc *proc, /* Function associated with trace. */
ClientData prevClientData) /* If non-NULL, gives last value returned by
* this function, so this call will return the
* next trace after that one. If NULL, this
@@ -3196,7 +3196,7 @@ Tcl_VarTraceInfo2(
*
* Side effects:
* A trace is set up on the variable given by varName, such that future
- * references to the variable will be intermediated by proc. See the
+ * references to the variable will be mediated by proc. See the
* manual entry for complete details on the calling sequence for proc.
* The variable's flags are updated.
*
@@ -3237,7 +3237,7 @@ Tcl_TraceVar(
*
* Side effects:
* A trace is set up on the variable given by part1 and part2, such that
- * future references to the variable will be intermediated by proc. See
+ * future references to the variable will be mediated by proc. See
* the manual entry for complete details on the calling sequence for
* proc. The variable's flags are updated.
*
@@ -3290,7 +3290,7 @@ Tcl_TraceVar2(
*
* Side effects:
* A trace is set up on the variable given by part1 and part2, such that
- * future references to the variable will be intermediated by the
+ * future references to the variable will be mediated by the
* traceProc listed in tracePtr. See the manual entry for complete
* details on the calling sequence for proc.
*
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index fd8681c..6e14689 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -2012,7 +2012,7 @@ int
TclUniCharNcasecmp(
const Tcl_UniChar *ucs, /* Unicode string to compare to uct. */
const Tcl_UniChar *uct, /* Unicode string ucs is compared to. */
- unsigned long numChars) /* Number of unichars to compare. */
+ unsigned long numChars) /* Number of Unichars to compare. */
{
for ( ; numChars != 0; numChars--, ucs++, uct++) {
if (*ucs != *uct) {
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 60e37fc..7bd55e2 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -1235,7 +1235,7 @@ TclScanElement(
* If we are quoting solely due to ] or internal " characters use
* the CONVERT_MASK mode where we escape all special characters
* except for braces. "extra" counted space needed to escape
- * braces too, so substract "braceCount" to get our actual needs.
+ * braces too, so subtract "braceCount" to get our actual needs.
*/
bytesNeeded += (extra - braceCount);
@@ -2064,7 +2064,7 @@ Tcl_ConcatObj(
* Something cannot be determined to be safe, so build the concatenation
* the slow way, using the string representations.
*
- * First try to pre-allocate the size required.
+ * First try to preallocate the size required.
*/
for (i = 0; i < objc; i++) {
diff --git a/generic/tclVar.c b/generic/tclVar.c
index c614371..8ff43f0 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -632,7 +632,7 @@ TclObjLookupVarEx(
}
/*
- * If part1Ptr is a parsedVarNameType, retrieve the pre-parsed parts.
+ * If part1Ptr is a parsedVarNameType, retrieve the preparsed parts.
*/
ParsedGetInternalRep(part1Ptr, parsed, arrayPtr, elem);
@@ -793,7 +793,7 @@ TclObjLookupVarEx(
* TclObjLookupVar):
* -1 a global reference
* -2 a reference to a namespace variable
- * -3 a non-cachable reference, i.e., one of:
+ * -3 a non-cacheable reference, i.e., one of:
* . non-indexed local var
* . a reference of unknown origin;
* . resolution by a namespace or interp resolver
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index c485d43..1d64877 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -1731,7 +1731,7 @@ Tcl_ZlibDeflate(
}
/*
- * Reduce the bytearray length to the actual data length produced by
+ * Reduce the ByteArray length to the actual data length produced by
* deflate.
*/
diff --git a/library/auto.tcl b/library/auto.tcl
index 3b1bb05..e7c954d 100644
--- a/library/auto.tcl
+++ b/library/auto.tcl
@@ -180,7 +180,7 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
$basename$patch library]
}
}
- # uniquify $dirs in order
+ # make $dirs unique, preserving order
array set seen {}
foreach i $dirs {
# Make sure $i is unique under normalization. Avoid repeated [source].
@@ -380,7 +380,7 @@ namespace eval auto_mkindex_parser {
$parser expose eval
$parser invokehidden rename eval _%@eval
- # Install all the registered psuedo-command implementations
+ # Install all the registered pseudo-command implementations
foreach cmd $initCommands {
eval $cmd
@@ -633,7 +633,7 @@ auto_mkindex_parser::hook {
load {} tbcload $auto_mkindex_parser::parser
# AUTO MKINDEX: tbcload::bcproc name arglist body
- # Adds an entry to the auto index list for the given pre-compiled
+ # Adds an entry to the auto index list for the given precompiled
# procedure name.
auto_mkindex_parser::commandInit tbcload::bcproc {name args} {
@@ -688,7 +688,7 @@ auto_mkindex_parser::command namespace {op args} {
}
regsub -all ::+ $name :: name
}
- # create artifical proc to force an entry in the tclIndex
+ # create artificial proc to force an entry in the tclIndex
$parser eval [list ::proc $name {} {}]
}
}
diff --git a/library/clock.tcl b/library/clock.tcl
index 118d177..be4abf8 100644
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -2298,7 +2298,7 @@ proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } {
# Returns the locale that was previously current.
#
# Side effects:
-# Does [mclocale]. If necessary, loades the designated locale's files.
+# Does [mclocale]. If necessary, loads the designated locale's files.
#
#----------------------------------------------------------------------
@@ -2605,7 +2605,7 @@ proc ::tcl::clock::FormatStarDate { date } {
#
# Parameters:
# year - Year from the Roddenberry epoch
-# fractYear - Fraction of a year specifiying the day of year.
+# fractYear - Fraction of a year specifying the day of year.
# fractDay - Fraction of a day
#
# Results:
@@ -2975,7 +2975,7 @@ proc ::tcl::clock::InterpretHMS { date } {
# Returns the system time zone.
#
# Side effects:
-# Stores the sustem time zone in the 'CachedSystemTimeZone'
+# Stores the system time zone in the 'CachedSystemTimeZone'
# variable, since determining it may be an expensive process.
#
#----------------------------------------------------------------------
@@ -3401,7 +3401,7 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} {
close $f
# The file begins with a magic number, sixteen reserved bytes, and then
- # six 4-byte integers giving counts of fileds in the file.
+ # six 4-byte integers giving counts of fields in the file.
binary scan $d a4a1x15IIIIII \
magic version nIsGMT nIsStd nLeap nTime nType nChar
diff --git a/library/history.tcl b/library/history.tcl
index 4867021..5dd6b06 100644
--- a/library/history.tcl
+++ b/library/history.tcl
@@ -268,7 +268,7 @@ proc ::tcl::HistIndex {event} {
return -code error "event \"$event\" is too far in the past"
}
if {$i > $history(nextid)} {
- return -code error "event \"$event\" hasn't occured yet"
+ return -code error "event \"$event\" hasn't occurred yet"
}
return $i
}
diff --git a/library/http/http.tcl b/library/http/http.tcl
index f2ad0a0..6c3c068 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -3322,7 +3322,7 @@ proc http::postError {token} {
# token The token returned from http::geturl
#
# Side Effects
-# unsets the state array
+# Unsets the state array.
proc http::cleanup {token} {
variable $token
@@ -3350,7 +3350,7 @@ proc http::cleanup {token} {
# http::Connect
#
-# This callback is made when an asyncronous connection completes.
+# This callback is made when an asynchronous connection completes.
#
# Arguments
# token The token returned from http::geturl
@@ -4457,7 +4457,7 @@ proc http::CopyChunk {token chunk} {
#
# Arguments
# token The token returned from http::geturl
-# count The amount transfered
+# count The amount transferred
#
# Side Effects
# Invokes callbacks
diff --git a/library/init.tcl b/library/init.tcl
index 23f4da3..33be0ac 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -132,7 +132,7 @@ if {[namespace which -command exec] eq ""} {
set auto_noexec 1
}
-# Define a log command (which can be overwitten to log errors
+# Define a log command (which can be overwritten to log errors
# differently, specially when stderr is not available)
if {[namespace which -command tclLog] eq ""} {
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl
index 12ab43f..fa21685 100644
--- a/library/msgcat/msgcat.tcl
+++ b/library/msgcat/msgcat.tcl
@@ -34,7 +34,7 @@ namespace eval msgcat {
# Configuration values per Package (e.g. client namespace).
# The dict key is of the form "<option> <namespace>" and the value is the
- # configuration option. A nonexisting key is an unset option.
+ # configuration option. A non-existing key is an unset option.
variable PackageConfig [dict create mcfolder {} loadcmd {} changecmd {}\
unknowncmd {} loadedlocales {} loclist {}]
@@ -211,6 +211,7 @@ proc msgcat::mc {args} {
# parent namespace until the source is found. If additional args are
# specified, use the format command to work them into the translated
# string.
+#
# If no catalog item is found, mcunknown is called in the caller frame
# and its result is returned.
#
@@ -684,7 +685,7 @@ proc msgcat::mcpackagenamespaceget {} {
# mcfolder
# The message catalog folder of the package.
# This is automatically set by mcload.
-# If the value is changed using the set subcommand, an evntual
+# If the value is changed using the set subcommand, an eventual
# loadcmd is invoked and all message files of the package locale are
# loaded.
#
diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl
index 454b923..914ceff 100644
--- a/library/opt/optparse.tcl
+++ b/library/opt/optparse.tcl
@@ -75,7 +75,7 @@ namespace eval ::tcl {
variable OptDescN 0
# Inside algorithm/mechanism description:
-# (not for the faint hearted ;-)
+# (not for the faint-hearted ;-)
#
# The argument description is parsed into a "program tree"
# It is called a "program" because it is the program used by
@@ -134,9 +134,9 @@ namespace eval ::tcl {
# they should start to be much faster.
# But this code use a lot of helper procs (like Lvarset)
# which are quite slow and would be helpfully optimized
-# for instance by being written in C. Also our struture
+# for instance by being written in C. Also our structure
# is complex and there is maybe some places where the
-# string rep might be calculated at great exense. to be checked.
+# string rep might be calculated at great expense. to be checked.
#
# Parse a given description and saves it here under the given key
@@ -226,7 +226,7 @@ proc ::tcl::OptKeyDelete {key} {
set OptDesc($descKey)
}
-# Parse entry point for ppl who don't want to register with a key,
+# Parse entry point for people who don't want to register with a key,
# for instance because the description changes dynamically.
# (otherwise one should really use OptKeyRegister once + OptKeyParse
# as it is way faster or simply OptProc which does it all)
@@ -328,18 +328,18 @@ proc ::tcl::OptProcArgGiven {argname} {
return $start
}
}
- # Set the value field of the current instruction
+ # Set the value field of the current instruction.
proc OptCurSetValue {descriptionsName value} {
upvar $descriptionsName descriptions
- # get the current item full adress
+ # Get the current item full address.
set adress [OptCurAddr $descriptions]
- # use the 3th field of the item (see OptValue / OptNewInst)
+ # Use the 3rd field of the item (see OptValue / OptNewInst).
lappend adress 2
Lvarset descriptions $adress [list 1 $value]
# ^hasBeenSet flag
}
- # empty state means done/paste the end of the program
+ # Empty state means done/paste the end of the program.
proc OptState {item} {
lindex $item 0
}
@@ -352,11 +352,11 @@ proc ::tcl::OptProcArgGiven {argname} {
#######
# Arguments manipulation
- # Returns the argument that has to be processed now
+ # Returns the argument that has to be processed now.
proc OptCurrentArg {lst} {
lindex $lst 0
}
- # Advance to next argument
+ # Advance to next argument.
proc OptNextArg {argsName} {
uplevel 1 [list Lvarpop1 $argsName]
}
@@ -553,7 +553,7 @@ proc ::tcl::OptKeyParse {descKey arglist} {
if {[OptHasBeenSet $item]} {
# puts "adding $vname"
# lets use the input name for the returned list
- # it is more usefull, for instance you can check that
+ # it is more useful, for instance you can check that
# no flags at all was given with expr
# {![string match "*-*" $Args]}
lappend vnamesLst [OptName $item]
diff --git a/library/package.tcl b/library/package.tcl
index 5f0795f..2d72a7c 100644
--- a/library/package.tcl
+++ b/library/package.tcl
@@ -69,7 +69,7 @@ proc tcl::Pkg::CompareExtension {fileName {ext {}}} {
# than lazily when the first reference to an exported
# procedure in the package is made.
# -verbose (optional) Verbose output; the name of each file that
-# was successfully rocessed is printed out. Additionally,
+# was successfully processed is printed out. Additionally,
# if processing of a file failed a message is printed.
# -load pat (optional) Preload any packages whose names match
# the pattern. Used to handle DLLs that depend on
@@ -206,7 +206,7 @@ proc pkg_mkIndex {args} {
package unknown tclPkgUnknown
# Stub out the unknown command so package can call into each other
- # during their initialilzation.
+ # during their initialization.
proc unknown {args} {}
@@ -733,7 +733,7 @@ proc ::tcl::Pkg::Create {args} {
error $err(noLoadOrSource)
}
- # OK, now everything is good. Generate the package ifneeded statment.
+ # OK, now everything is good. Generate the package ifneeded statement.
set cmdline "package ifneeded $opts(-name) $opts(-version) "
set cmdList {}
diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl
index acaebf2..63d4d76 100644
--- a/library/platform/platform.tcl
+++ b/library/platform/platform.tcl
@@ -265,7 +265,7 @@ proc ::platform::LibcVersion {base _->_ vv} {
set libc [lindex $libclist 0]
- # Try executing the library first. This should suceed
+ # Try executing the library first. This should succeed
# for a glibc library, and return the version
# information.
diff --git a/library/platform/shell.tcl b/library/platform/shell.tcl
index 6eb9691..1e43409 100644
--- a/library/platform/shell.tcl
+++ b/library/platform/shell.tcl
@@ -27,7 +27,7 @@ proc ::platform::shell::generic {shell} {
LOCATE base out
set code {}
- # Forget any pre-existing platform package, it might be in
+ # Forget any preexisting platform package, it might be in
# conflict with this one.
lappend code {package forget platform}
# Inject our platform package
@@ -52,7 +52,7 @@ proc ::platform::shell::identify {shell} {
LOCATE base out
set code {}
- # Forget any pre-existing platform package, it might be in
+ # Forget any preexisting platform package, it might be in
# conflict with this one.
lappend code {package forget platform}
# Inject our platform package
@@ -99,14 +99,14 @@ proc ::platform::shell::LOCATE {bv ov} {
upvar 1 $bv base $ov out
# Locate the platform package for injection into the specified
- # shell. We are using package management to find it, whereever it
+ # shell. We are using package management to find it, wherever it
# is, instead of using hardwired relative paths. This allows us to
# install the two packages as TMs without breaking the code
# here. If the found package is wrapped we copy the code somewhere
# where the spawned shell will be able to read it.
# This code is brittle, it needs has to adapt to whatever changes
- # are made to the TM code, i.e. the provide statement generated by
+ # are made to the TM code, i.e. the "provide" statement generated by
# tm.tcl
set pl [package ifneeded platform [package require platform]]
diff --git a/library/safe.tcl b/library/safe.tcl
index 7fc2b5c..b84d2f5 100644
--- a/library/safe.tcl
+++ b/library/safe.tcl
@@ -194,7 +194,7 @@ proc ::safe::interpConfigure {args} {
# it is most probably a set in fact but we would need
# then to jump to the set part and it is not *sure*
# that it is a set action that the user want, so force
- # it to use the unambigous -statics ?value? instead:
+ # it to use the unambiguous -statics ?value? instead:
return -code error\
"ambigous query (get or set -noStatics ?)\
use -statics instead"
@@ -249,11 +249,11 @@ proc ::safe::interpConfigure {args} {
if {![::tcl::OptProcArgGiven -deleteHook]} {
set deleteHook $state(cleanupHook)
}
- # we can now reconfigure :
+ # Now reconfigure
set withAutoPath [::tcl::OptProcArgGiven -autoPath]
InterpSetConfig $child $accessPath $statics $nested $deleteHook $autoPath $withAutoPath
- # auto_reset the child (to completely synch the new access_path) tests safe-9.8 safe-9.9
+ # auto_reset the child (to completely sync the new access_path) tests safe-9.8 safe-9.9
if {$doreset} {
if {[catch {::interp eval $child {auto_reset}} msg]} {
Log $child "auto_reset failed: $msg"
@@ -375,7 +375,7 @@ proc ::safe::InterpSetConfig {child access_path staticsok nestedok deletehook au
set raw_auto_path $access_path
- # Add 1st level sub dirs (will searched by auto loading from tcl
+ # Add 1st level subdirs (will searched by auto loading from tcl
# code in the child using glob and thus fail, so we add them here
# so by default it works the same).
set access_path [AddSubDirs $access_path]
@@ -695,7 +695,7 @@ proc ::safe::interpDelete {child} {
}
# If the child has a cleanup hook registered, call it. Check the
- # existance because we might be called to delete an interp which has
+ # existence because we might be called to delete an interp which has
# not been registered with us at all
if {[info exists state(cleanupHook)]} {
@@ -729,7 +729,7 @@ proc ::safe::interpDelete {child} {
return
}
-# Set (or get) the logging mecanism
+# Set (or get) the logging mechanism
proc ::safe::setLogCmd {args} {
variable Log
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 6a161a3..ff3f250 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -153,7 +153,7 @@ namespace eval tcltest {
}
##### Initialize internal arrays of tcltest, but only if the caller
- # has not already pre-initialized them. This is done to support
+ # has not already preinitialized them. This is done to support
# compatibility with older tests that directly access internals
# rather than go through command interfaces.
#
@@ -163,7 +163,7 @@ namespace eval tcltest {
return
}
if {[info exists $varName]} {
- # Pre-initialized value is a scalar: destroy it!
+ # Preinitialized value is a scalar: Destroy it!
unset $varName
}
array set $varName $value
@@ -196,7 +196,7 @@ namespace eval tcltest {
ArrayDefault testConstraints {}
##### Initialize internal variables of tcltest, but only if the caller
- # has not already pre-initialized them. This is done to support
+ # has not already preinitialized them. This is done to support
# compatibility with older tests that directly access internals
# rather than go through command interfaces.
#
@@ -229,7 +229,7 @@ namespace eval tcltest {
# check the current working dir for files created by the tests.
# filesMade keeps track of such files created using the makeFile and
# makeDirectory procedures. filesExisted stores the names of
- # pre-existing files.
+ # preexisting files.
#
# Note that $filesExisted lists only those files that exist in
# the original [temporaryDirectory].
@@ -298,7 +298,7 @@ namespace eval tcltest {
# keep track of test level for nested test commands
variable testLevel 0
- # the variables and procs that existed when saveState was called are
+ # the variables and procedures that existed when saveState was called are
# stored in a variable of the same name
Default saveState {}
@@ -354,12 +354,12 @@ namespace eval tcltest {
# be kept in sync with the [configure -outfile] configuration
# option ( and underlying variable Option(-outfile) ). This is
# accomplished with a write trace on Option(-outfile) that will
- # update [outputChannel] whenver a new value is written. That
+ # update [outputChannel] whenever a new value is written. That
# much is easy.
#
# The trick is that in order to maintain compatibility with
# version 1 of tcltest, we must allow every configuration option
- # to get its inital value from command line arguments. This is
+ # to get its initial value from command line arguments. This is
# accomplished by setting initial read traces on all the
# configuration options to parse the command line option the first
# time they are read. These traces are cancelled whenever the
@@ -482,7 +482,7 @@ namespace eval tcltest {
# Initialize the default values of the configurable options that are
# historically associated with an exported variable. If that variable
- # is already set, support compatibility by accepting its pre-set value.
+ # is already set, support compatibility by accepting its preset value.
# Use [trace] to establish ongoing connection between the deprecated
# exported variable and the modern option kept as a true internal var.
# Also set up usage string and value testing for the option.
@@ -761,7 +761,7 @@ namespace eval tcltest {
# even if the directory is not writable
return $directory
}
- return -code error "\"$directory\" is not writeable"
+ return -code error "\"$directory\" is not writable"
}
return $directory
}
@@ -852,7 +852,7 @@ namespace eval tcltest {
# tcltest::Debug* --
#
# Internal helper procedures to write out debug information
-# dependent on the chosen level. A test shell may overide
+# dependent on the chosen level. A test shell may override
# them, f.e. to redirect the output into a different
# channel, or even into a GUI.
@@ -1789,7 +1789,7 @@ proc tcltest::SubstArguments {argList} {
# We need to split the argList up into tokens but cannot use list
# operations as they throw away some significant quoting, and
# [split] ignores braces as it should. Therefore what we do is
- # gradually build up a string out of whitespace seperated strings.
+ # gradually build up a string out of whitespace-separated strings.
# We cannot use [split] to split the argList into whitespace
# separated strings as it throws away the whitespace which maybe
# important so we have to do it all by hand.
@@ -1896,7 +1896,7 @@ proc tcltest::SubstArguments {argList} {
# match - specifies type of matching to do on result,
# output, errorOutput; this must be a string
# previously registered by a call to [customMatch].
-# The strings exact, glob, and regexp are pre-registered
+# The strings exact, glob, and regexp are preregistered
# by the tcltest package. Default value is exact.
#
# Arguments:
@@ -1927,7 +1927,7 @@ proc tcltest::test {name description args} {
FillFilesExisted
incr testLevel
- # Pre-define everything to null except output and errorOutput. We
+ # Predefine everything to null except output and errorOutput. We
# determine whether or not to trap output based on whether or not
# these variables (output & errorOutput) are defined.
lassign {} constraints setup cleanup body result returnCodes errorCode match
@@ -2526,7 +2526,7 @@ proc tcltest::cleanupTests {{calledFromAllFile 0}} {
# Remove files and directories created by the makeFile and
# makeDirectory procedures. Record the names of files in
- # workingDirectory that were not pre-existing, and associate them
+ # workingDirectory that were not preexisting, and associate them
# with the test file that created them.
if {!$calledFromAllFile} {
@@ -3484,7 +3484,7 @@ proc tcltest::threadReap {} {
# Initialize the constraints and set up command line arguments
namespace eval tcltest {
- # Define initializers for all the built-in contraint definitions
+ # Define initializers for all the built-in constraint definitions
DefineConstraintInitializers
# Set up the constraints in the testConstraints array to be lazily
@@ -3493,7 +3493,7 @@ namespace eval tcltest {
trace add variable testConstraints read [namespace code SafeFetch]
# Only initialize constraints at package load time if an
- # [initConstraintsHook] has been pre-defined. This is only
+ # [initConstraintsHook] has been predefined. This is only
# for compatibility support. The modern way to add a custom
# test constraint is to just call the [testConstraint] command
# straight away, without all this "hook" nonsense.
diff --git a/library/tm.tcl b/library/tm.tcl
index c1a8f8a..75abfb0 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -22,10 +22,10 @@
#
# This covers the possibility that the application asked for a package
# late, and the package was actually added to the installation after the
-# application was started. It shoukld still be able to find it.
+# application was started. It should still be able to find it.
#
# 2) It still is not there: Either way, you don't get it, but the rescan
-# takes time. This is however an error case and we dont't care that much
+# takes time. This is however an error case and we don't care that much
# about it
#
# 3) It was there the first time; but for some reason a "package forget" has
@@ -70,9 +70,9 @@ namespace eval ::tcl::tm {
# No result for subcommands 'add' and 'remove'. A list of paths for
# 'list'.
#
-# Sideeffects
+# Side effects
# The subcommands 'add' and 'remove' manipulate the list of paths to
-# search for Tcl Modules. The subcommand 'list' has no sideeffects.
+# search for Tcl Modules. The subcommand 'list' has no side effects.
proc ::tcl::tm::add {args} {
# PART OF THE ::tcl::tm::path ENSEMBLE
@@ -81,7 +81,7 @@ proc ::tcl::tm::add {args} {
#
# The command enforces the restriction that no path may be an ancestor
# directory of any other path on the list. If the new path violates this
- # restriction an error wil be raised.
+ # restriction an error will be raised.
#
# If the path is already present as is no error will be raised and no
# action will be taken.
@@ -166,7 +166,7 @@ proc ::tcl::tm::list {} {
# name - Name of desired package.
# version - Version of desired package. Can be the
# empty string.
-# exact - Either -exact or ommitted.
+# exact - Either -exact or omitted.
#
# Name, version, and exact are used to determine satisfaction. The
# original is called iff no satisfaction was achieved. The name is also
@@ -175,7 +175,7 @@ proc ::tcl::tm::list {} {
# Results
# None.
#
-# Sideeffects
+# Side effects
# May populate the package ifneeded database with additional provide
# scripts.
@@ -310,7 +310,7 @@ proc ::tcl::tm::UnknownHandler {original name args} {
# Results
# None.
#
-# Sideeffects
+# Side effects
# May add paths to the list of defaults.
proc ::tcl::tm::Defaults {} {
@@ -355,7 +355,7 @@ proc ::tcl::tm::Defaults {} {
# Results
# No result.
#
-# Sideeffects
+# Side effects
# Calls 'path add' to paths to the list of module search paths.
proc ::tcl::tm::roots {paths} {
diff --git a/library/word.tcl b/library/word.tcl
index 58ff4dc..e86c44a 100644
--- a/library/word.tcl
+++ b/library/word.tcl
@@ -5,7 +5,7 @@
# properly for different platforms.
#
# Copyright © 1996 Sun Microsystems, Inc.
-# Copyright © 1998 Scritpics Corporation.
+# Copyright © 1998 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/libtommath/changes.txt b/libtommath/changes.txt
index 1b3a7a3..cc6736c 100644
--- a/libtommath/changes.txt
+++ b/libtommath/changes.txt
@@ -412,7 +412,7 @@ v0.13 -- tons of minor speed-ups in low level add, sub, mul_2 and div_2 which p
Jan 17th, 2003
v0.12 -- re-wrote the majority of the makefile so its more portable and will
install via "make install" on most *nix platforms
- -- Re-packaged all the source as seperate files. Means the library a single
+ -- Re-packaged all the source as separate files. Means the library a single
file packagage any more. Instead of just adding "bn.c" you have to add
libtommath.a
-- Renamed "bn.h" to "tommath.h"
diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile
index 1ee3bf1..77886c7 100644
--- a/macosx/GNUmakefile
+++ b/macosx/GNUmakefile
@@ -1,7 +1,7 @@
########################################################################################################
#
# Makefile wrapper to build tcl on Mac OS X in a way compatible with the tk/macosx Xcode buildsystem
-# uses the standard unix build system in tcl/unix (which can be used directly instead of this
+# uses the standard Unix build system in tcl/unix (which can be used directly instead of this
# if you are not using the tk/macosx projects).
#
# Copyright (c) 2002-2008 Daniel A. Steffen <das@users.sourceforge.net>
@@ -150,7 +150,7 @@ ${objdir}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure \
build-${PROJECT}: ${objdir}/Makefile
${DO_MAKE}
ifeq (${INSTALL_BUILD},)
-# symolic link hackery to trick
+# symbolic link hackery to trick
# 'make install INSTALL_ROOT=${OBJ_DIR}'
# into building Tcl.framework and tclsh in ${SYMROOT}
@cd "${OBJ_DIR}" && mkdir -p $(dir $(subst ${space},\ ,.${LIBDIR})) $(dir $(subst ${space},\ ,.${BINDIR})) "${SYMROOT}" && \
diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c
index 60cb7f3..0fbc7a3 100644
--- a/macosx/tclMacOSXFCmd.c
+++ b/macosx/tclMacOSXFCmd.c
@@ -491,7 +491,7 @@ TclMacOSXCopyFileAttributes(
*
* Results:
* The return value is 1, 0 or -1 indicating whether the file matches the
- * given criteria, does not match them, or an error occurred (in wich
+ * given criteria, does not match them, or an error occurred (in which
* case an error is left in interp).
*
* Side effects:
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c
index d7c4d7f..169c7b9 100644
--- a/macosx/tclMacOSXNotify.c
+++ b/macosx/tclMacOSXNotify.c
@@ -1350,7 +1350,7 @@ TclpNotifierData(void)
* polls without blocking.
*
* Results:
- * Returns 0 if a tcl event or timeout ocurred and 1 if a non-tcl
+ * Returns 0 if a tcl event or timeout occurred and 1 if a non-tcl
* CFRunLoop source was processed.
*
* Side effects:
diff --git a/tests/appendComp.test b/tests/appendComp.test
index 66f2a5c..121b704 100644
--- a/tests/appendComp.test
+++ b/tests/appendComp.test
@@ -384,7 +384,7 @@ test appendComp-8.1 {defer error to runtime} -setup {
# patch (no read traces run for lappend, append). The compiled tests are
# failing for lappend (9.0/1) before the patch, showing how it invokes read
# traces in the compiled path. The append tests are good (9.2/3). After the
-# patch the failues are gone.
+# patch the failures are gone.
test appendComp-9.0 {bug 3057639, lappend compiled, read trace on non-existing array variable element} -setup {
unset -nocomplain myvar
diff --git a/tests/chanio.test b/tests/chanio.test
index 5c0dba4..179d7a7 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -3572,7 +3572,7 @@ test chan-io-31.13 {binary mode is synonym of lf mode} -setup {
} -result lf
#
# Test chan-io-9.14 has been removed because "auto" output translation mode is
-# not supoprted.
+# not supported.
#
test chan-io-31.14 {Tcl_Write mixed, Tcl_Gets auto} -setup {
file delete $path(test1)
@@ -5310,8 +5310,10 @@ test chan-io-39.22a {Tcl_SetChannelOption, invariance} -setup {
} -cleanup {
chan close $f1
} -result {{O G} {D D} {1 {bad value for -eofchar: should be a list of zero, one, or two elements}}}
-test chan-io-39.23 {Tcl_GetChannelOption, server socket is not readable or\
- writeable, it should still have valid -eofchar and -translation options} -setup {
+test chan-io-39.23 {
+ Tcl_GetChannelOption, server socket is not readable or writable, but should
+ still have valid -eofchar and -translation options.
+} -setup {
set l [list]
} -body {
set sock [socket -server [namespace code accept] -myaddr 127.0.0.1 0]
@@ -7613,7 +7615,7 @@ test chan-io-61.1 {Reset eof state after changing the eof char} -setup {
removeFile eofchar
} -result {77 = 23431}
-# Test the cutting and splicing of channels, this is incidentially the
+# Test the cutting and splicing of channels, this is incidentally the
# attach/detach facility of package Thread, but __without any safeguards__. It
# can also be used to emulate transfer of channels between threads, and is
# used for that here.
diff --git a/tests/clock.test b/tests/clock.test
index 2a53259..0b385c9 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -36043,7 +36043,7 @@ test clock-42.1 {regression test - %z in :localtime when west of Greenwich } \
} \
-result {-0500}
-# 43.1 was a bad test - mktime returning -1 is an error according to posix.
+# 43.1 was a bad test - mktime returning -1 is an error according to Posix.
test clock-44.1 {regression test - time zone name containing hyphen } \
-setup {
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 01a4a36..f024f36 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -1741,7 +1741,7 @@ test cmdAH-24.14.1 {
file mtime [file join [temporaryDirectory] CON.txt]
} -match regexp -result {could not (?:get modification time|read)} -returnCodes error
-# 3155760000 is 64-bit unix time, Wed Jan 01 00:00:00 GMT 2070:
+# 3155760000 is 64-bit Unix time, Wed Jan 01 00:00:00 GMT 2070:
test cmdAH-24.20.1 {Tcl_FileObjCmd: atime 64-bit time_t, bug [4718b41c56]} -constraints {time64bit} -setup {
set filename [makeFile "" foo.text]
} -body {
@@ -2150,7 +2150,7 @@ test cmdAH-32.5 {file tempfile - templates} -constraints unix -body {
} -cleanup {
catch {file delete $name}
} -result ok
-# Not portable; not all unix systems have mkstemps()
+# Not portable; not all Unix systems have mkstemps()
test cmdAH-32.6 {file tempfile - templates} -body {
set template [file join $dirfile foo]
close [file tempfile name $template.bar]
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index a7aa36c..89947bb 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -55,8 +55,8 @@ test cmdMZ-1.4 {Tcl_PwdObjCmd: failure} -setup {
file delete -force $foodir
file mkdir $foodir
cd $foodir
-} -constraints {unix nonPortable} -body {
- # This test fails on various unix platforms (eg Linux) where permissions
+} -constraints {Unix nonPortable} -body {
+ # This test fails on various Unix platforms (eg Linux) where permissions
# caching causes this to fail. The caching is strictly incorrect, but we
# have no control over that.
file attr . -permissions 0
diff --git a/tests/compile.test b/tests/compile.test
index aec1ef1..36b4f3a 100644
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -520,7 +520,7 @@ test compile-13.3 {TclCompileScript: testing check of max depth by nested script
#puts $errors
# all of nested calls exceed the limit, so must end with "too many nested compilations"
# (or evaluations, depending on compile method/instruction and "mixed" compile within
- # evaliation), so no one succeeds, the result must be empty:
+ # evaluation), so no one succeeds, the result must be empty:
ti eval {set result}
} -result {}
#
diff --git a/tests/dict.test b/tests/dict.test
index d67f703..1515675 100644
--- a/tests/dict.test
+++ b/tests/dict.test
@@ -1109,7 +1109,7 @@ test dict-19.2 {dict: testing for leaks} -constraints memory -body {
# This test is made to stress object reference management
memtest {
apply {{} {
- # A shared invalid dictinary
+ # A shared invalid dictionary
set apa {a {}b c d}
set bepa $apa
catch {dict replace $apa e f}
diff --git a/tests/env.test b/tests/env.test
index ce7c01e..5317897 100644
--- a/tests/env.test
+++ b/tests/env.test
@@ -221,9 +221,9 @@ NAME2=more
XYZZY=garbage}
test env-2.5 {different encoding (wide chars)} -constraints {win exec} -setup {
- # be sure set of (unicode) environment occurs if single-byte encoding is used:
+ # be sure set of (Unicode) environment occurs if single-byte encoding is used:
encodingswitch cp1252
- # german (cp1252) and russian (cp1251) characters together encoded as utf-8:
+ # German (cp1252) and Russian (cp1251) characters together encoded as utf-8:
set val 2d2dc3a4c3b6c3bcc39f2dd182d0b5d181d1822d2d
set env(XYZZY) [encoding convertfrom utf-8 [binary decode hex $val]]
# now switch to utf-8 (to see correct values from test):
@@ -303,7 +303,7 @@ test env-5.1 {
corner cases - remove one elem at a time
} -setup setup1 -body {
# When no environment variables exist, the env var will contain no
- # entries. The "array names" call synchs up the C-level environ array with
+ # entries. The "array names" call syncs up the C-level environ array with
# the Tcl level env array. Make sure an empty Tcl array is created.
foreach e [array names env] {
unset env($e)
@@ -347,7 +347,7 @@ test env-5.4 {corner cases - unset the env array} -setup {
setup1
interp create i
} -body {
- # The info exists command should be in synch with the env array.
+ # The info exists command should be in sync with the env array.
# Know Bug: 1737
i eval {set env(THIS_SHOULD_EXIST) a}
set result [info exists env(THIS_SHOULD_EXIST)]
diff --git a/tests/error.test b/tests/error.test
index 4ce7709..5bed039 100644
--- a/tests/error.test
+++ b/tests/error.test
@@ -924,7 +924,7 @@ test error-18.12 {variable assignment unaffected by exception in finally} {
list $em [dict get $opts -errorcode]
} {bar FOO}
-# try tests - fallthough body cases
+# try tests - fall-through body cases
test error-19.1 {try with fallthrough body #1} {
set RES {}
diff --git a/tests/eval.test b/tests/eval.test
index 5ffe309..9b8eccd 100644
--- a/tests/eval.test
+++ b/tests/eval.test
@@ -64,7 +64,7 @@ test eval-3.2 {concatenating eval and pure lists} {
} {1 2 3 4 5}
test eval-3.3 {eval and canonical lists} {
set cmd [list list 1 2 3 4 5]
- # Force existance of utf-8 rep
+ # Force existence of utf-8 rep
set dummy($cmd) $cmd
unset dummy
eval $cmd
@@ -72,7 +72,7 @@ test eval-3.3 {eval and canonical lists} {
test eval-3.4 {concatenating eval and canonical lists} {
set cmd [list list 1]
set cmd2 [list 2 3 4 5]
- # Force existance of utf-8 rep
+ # Force existence of utf-8 rep
set dummy($cmd) $cmd
set dummy($cmd2) $cmd2
unset dummy
diff --git a/tests/event.test b/tests/event.test
index 16cbc24..d62d08e 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -427,7 +427,7 @@ foo
# someday : add a test checking that when there is no bgerror, an error msg
# goes to stderr ideally one would use sub interp and transfer a fake stderr
-# to it, unfortunatly the current interp tcl API does not allow that. The
+# to it, unfortunately the current interp tcl API does not allow that. The
# other option would be to use fork a test but it then becomes more a
# file/exec test than a bgerror test.
diff --git a/tests/exec.test b/tests/exec.test
index d1ef418..4058ae9 100644
--- a/tests/exec.test
+++ b/tests/exec.test
@@ -25,7 +25,7 @@ testConstraint noosxCI [expr {![info exists ::env(MAC_CI)]}]
unset -nocomplain path
-# Utilities that are like bourne shell stalwarts, but cross-platform.
+# Utilities that are like Bourne shell stalwarts, but cross-platform.
set path(echo) [makeFile {
puts -nonewline [lindex $argv 0]
foreach str [lrange $argv 1 end] {
diff --git a/tests/expr.test b/tests/expr.test
index 85860f7..985bce1 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -7455,7 +7455,7 @@ test expr-62.10 {TIP 582: comments can go inside function calls} {
# Bug e3dcab1d14
proc do-one-test-expr-63 {e p float athreshold} {
# e - power of 2 to test
- # p - tcl_precision to test wuth
+ # p - tcl_precision to test with
# float - floating point value 2**-$p
# athreshold - tolerable absolute error (1/2 decimal digit in
# least significant place plus 1/2 least significant bit)
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 3476895..2469762 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -87,7 +87,7 @@ testConstraint notFileSharing 1
testConstraint linkFile 1
testConstraint linkDirectory 1
-# Several tests require need to match results against the unix username
+# Several tests require need to match results against the Unix username
set user {}
if {[testConstraint unix]} {
catch {
@@ -787,7 +787,7 @@ test fCmd-7.5 {FileForceOption: multiple times through loop} -setup {
test fCmd-8.1 {FileBasename: basename of ~user: argc == 1 && *path == ~} \
-constraints {unix notRoot knownBug} -body {
- # Labelled knownBug because it is dangerous [Bug: 3881]
+ # Labeled knownBug because it is dangerous [Bug: 3881]
file mkdir td1
file attr td1 -perm 0o40000
file rename ~$user td1
@@ -887,7 +887,7 @@ test fCmd-9.7 {file rename: comprehensive: file to existing file} -setup {
test fCmd-9.8 {file rename: comprehensive: dir to empty dir} -setup {
cleanup
} -constraints {notRoot testchmod notNetworkFilesystem} -body {
- # Under unix, you can rename a read-only directory, but you can't move it
+ # Under Unix you can rename a read-only directory, but you can't move it
# into another directory.
file mkdir td1
file mkdir [file join td2 td1]
@@ -2438,7 +2438,7 @@ test fCmd-28.12 {file link: cd into a link} -setup {
cd $orig
# Now '$up' should be either $orig or [file dirname abc.dir], depending on
# whether 'cd' actually moves to the destination of a link, or simply
- # treats the link as a directory. (On windows the former, on unix the
+ # treats the link as a directory. (On windows the former, on Unix the
# latter, I believe)
if {
([file normalize $up] ne [file normalize $orig]) &&
diff --git a/tests/fileName.test b/tests/fileName.test
index d70c09c..b147bd7 100644
--- a/tests/fileName.test
+++ b/tests/fileName.test
@@ -1346,7 +1346,7 @@ catch {file attributes globTest/a1 -permissions 0o755}
test filename-15.4 {unix specific no complain: no errors, good result} \
{unix nonPortable} {
# test fails because if an error occurs, the interp's result is reset...
- # or you don't run at scriptics where the outser and welch users exists
+ # or you don't run at scriptics where the ouster and welch users exists
glob -nocomplain ~ouster ~foo ~welch
} {/home/ouster /home/welch}
test filename-15.4.1 {no complain: errors, sequencing} {
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index 003bf40..d62a59a 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -298,7 +298,7 @@ test filesystem-1.33 {link normalisation: link near filesystem root} {testsetpla
testsetplatform windows
set res [file normalize C:/../bar]
if {[testConstraint unix]} {
- # Some unices go further in normalizing this -- not really a problem
+ # Some Unices go further in normalizing this -- not really a problem
# since this is a Windows test.
regexp {C:/bar$} $res res
}
diff --git a/tests/for.test b/tests/for.test
index 8284a09..26300ce 100644
--- a/tests/for.test
+++ b/tests/for.test
@@ -337,7 +337,7 @@ proc formatMail {} {
50 {} \
51 {Binary Releases} \
52 {} \
- 53 {Pre-compiled releases are available for the following platforms: } \
+ 53 {Precompiled releases are available for the following platforms: } \
54 {} \
55 { Windows 3.1, Windows 95, and Windows NT: Fetch} \
56 { ftp://ftp.sunlabs.com/pub/tcl/win42b1.exe, then execute it. The file is a} \
@@ -556,7 +556,7 @@ Obtaining The Releases
Binary Releases
-Pre-compiled releases are available for the following
+Precompiled releases are available for the following
platforms:
Windows 3.1, Windows 95, and Windows NT: Fetch
diff --git a/tests/indexObj.test b/tests/indexObj.test
index f10bd2a..2c50200 100644
--- a/tests/indexObj.test
+++ b/tests/indexObj.test
@@ -1,4 +1,4 @@
-# This file is a Tcl script to test out the the procedures in file
+# This file is a Tcl script to test out the procedures in file
# tkIndexObj.c, which implement indexed table lookups. The tests here are
# organized in the standard fashion for Tcl tests.
#
diff --git a/tests/internals.tcl b/tests/internals.tcl
index ff6c42b..36dbc90 100644
--- a/tests/internals.tcl
+++ b/tests/internals.tcl
@@ -36,7 +36,7 @@ proc testWithLimit args {
# with limited address space:
if {[info exists in(-addmem)] || [info exists in(-maxmem)]} {
if {[info exists in(-addmem)]} {
- # as differnce to normal usage, so try to retrieve current memory usage:
+ # as difference to normal usage, so try to retrieve current memory usage:
if {[catch {
# using ps (vsz is in KB):
incr in(-addmem) [expr {[lindex [exec ps -hq $ppid -o vsz] end] * 1024}]
diff --git a/tests/io.test b/tests/io.test
index 88ad425..1efd69c 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -3833,7 +3833,7 @@ test io-31.13 {binary mode is synonym of lf mode} {
} lf
#
# Test io-9.14 has been removed because "auto" output translation mode is
-# not supoprted.
+# not supported.
#
test io-31.14 {Tcl_Write mixed, Tcl_Gets auto} {
file delete $path(test1)
@@ -5790,7 +5790,7 @@ test io-39.22a {Tcl_SetChannelOption, invariance} {
set l
} {{O G} {D D} {1 {bad value for -eofchar: should be a list of zero, one, or two elements}}}
test io-39.23 {Tcl_GetChannelOption, server socket is not readable or
- writeable, it should still have valid -eofchar and -translation options } {
+ writable, it should still have valid -eofchar and -translation options } {
set l [list]
set sock [socket -server [namespace code accept] -myaddr 127.0.0.1 0]
lappend l [fconfigure $sock -eofchar] [fconfigure $sock -translation]
@@ -8752,7 +8752,7 @@ test io-61.1 {Reset eof state after changing the eof char} -setup {
} -result {77 = 23431}
-# Test the cutting and splicing of channels, this is incidentially the
+# Test the cutting and splicing of channels, this is incidentally the
# attach/detach facility of package Thread, but __without any
# safeguards__. It can also be used to emulate transfer of channels
# between threads, and is used for that here.
@@ -9304,12 +9304,16 @@ test io-75.12 {invalid utf-8 encoding read is ignored} -setup {
close $f
removeFile io-75.12
} -result 4181
-test io-75.13 {invalid utf-8 encoding read is not ignored (-profile strict)} -setup {
+test io-75.13 {
+ In nonblocking mode when there is an encoding error the data that has been
+ successfully read so far is returned first and then the error is returned
+ on the next call to [read].
+} -setup {
set fn [makeFile {} io-75.13]
set f [open $fn w+]
fconfigure $f -encoding binary
# \x81 is invalid in utf-8
- puts -nonewline $f "A\x81"
+ puts -nonewline $f A\x81
flush $f
seek $f 0
fconfigure $f -encoding utf-8 -blocking 0 -eofchar "" -translation lf -profile strict
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index c5b0352..2a1f616 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -703,7 +703,7 @@ test iocmd-20.1 {chan, unknown method} -body {
} -returnCodes error -match glob -result {unknown or ambiguous subcommand "foo": must be *}
# --- --- --- --------- --------- ---------
-# chan create, and method "initalize"
+# chan create, and method "initialize"
test iocmd-21.0 {chan create, wrong#args, not enough} {
catch {chan create} msg
diff --git a/tests/ioTrans.test b/tests/ioTrans.test
index 9f6542c..45d2530 100644
--- a/tests/ioTrans.test
+++ b/tests/ioTrans.test
@@ -114,7 +114,7 @@ test iortrans-1.1 {chan, unknown method} -returnCodes error -body {
} -match glob -result {unknown or ambiguous subcommand "foo": must be*}
# --- --- --- --------- --------- ---------
-# chan push, and method "initalize"
+# chan push, and method "initialize"
test iortrans-2.0 {chan push, wrong#args, not enough} -returnCodes error -body {
chan push
@@ -1334,7 +1334,7 @@ test iortrans-11.2 {delete interp of reflected transform} -setup {
# ### ### ### ######### ######### #########
## Helper command. Runs a script in a separate thread and returns the result.
-## A channel is transfered into the thread as well, and a list of configuation
+## A channel is transferred into the thread as well, and a list of configuration
## variables
proc inthread {chan script args} {
@@ -2013,7 +2013,7 @@ test iortrans.tf-8.1 {seek flushes write buffers, ignores data} -setup {
# The close flushes again, this modifies the file!
lappend notes | [close $c] |
# NOTE: The flush generated by the close is recorded immediately, the
- # other note's here are defered until after the thread is done. This
+ # other note's here are deferred until after the thread is done. This
# changes the order of the result a bit from the non-threaded case
# (The first | moves one to the right). This is an artifact of the
# 'inthread' framework, not of the transformation itself.
diff --git a/tests/iogt.test b/tests/iogt.test
index d397ccb..5692682 100644
--- a/tests/iogt.test
+++ b/tests/iogt.test
@@ -843,7 +843,7 @@ test iogt-6.0 {Push back} -constraints testchannel -body {
# expect to get "xxx" from the transform because of unread "def" input to
# transform which returns "xxx".
#
- # Actually the IO layer pre-read the whole file and will read "def"
+ # Actually the IO layer preread the whole file and will read "def"
# directly from the buffer without bothering to consult the newly stacked
# transformation. This is wrong.
read $f 3
diff --git a/tests/mathop.test b/tests/mathop.test
index 13a0543..3c25a2b 100644
--- a/tests/mathop.test
+++ b/tests/mathop.test
@@ -22,7 +22,7 @@ namespace eval ::testmathop2 {
}
# Helper to test math ops.
-# Test different invokation variants and see that they do the same thing.
+# Test different invocation variants and see that they do the same thing.
# Byte compiled / non byte compiled version
# Shared / unshared arguments
# Original / imported
diff --git a/tests/msgcat.test b/tests/msgcat.test
index 4549cee..6d2ba2c 100644
--- a/tests/msgcat.test
+++ b/tests/msgcat.test
@@ -1055,7 +1055,7 @@ if {[package vsatisfies [package provide msgcat] 1.7]} {
variable locale
if {![info exist locale]} { set locale [mclocale] }
- test msgcat-14.1 {invokation loadcmd} -setup {
+ test msgcat-14.1 {invocation loadcmd} -setup {
mcforgetpackage
mclocale $locale
mclocale ""
@@ -1069,7 +1069,7 @@ if {[package vsatisfies [package provide msgcat] 1.7]} {
lsort $resultvariable
} -result {foo foo_bar}
- test msgcat-14.2 {invokation failed in loadcmd} -setup {
+ test msgcat-14.2 {invocation failed in loadcmd} -setup {
mcforgetpackage
mclocale $locale
mclocale ""
@@ -1087,7 +1087,7 @@ if {[package vsatisfies [package provide msgcat] 1.7]} {
list $err [dict get $errdict -code]
} -result {fail 1}
- test msgcat-14.3 {invokation changecmd} -setup {
+ test msgcat-14.3 {invocation changecmd} -setup {
mcforgetpackage
mclocale $locale
mclocale ""
@@ -1100,7 +1100,7 @@ if {[package vsatisfies [package provide msgcat] 1.7]} {
set resultvariable
} -result {foo_bar foo {}}
- test msgcat-14.4 {invokation unknowncmd} -setup {
+ test msgcat-14.4 {invocation unknowncmd} -setup {
mcforgetpackage
mclocale $locale
mclocale ""
diff --git a/tests/ooNext2.test b/tests/ooNext2.test
index 746f9a5..8d8cf45 100644
--- a/tests/ooNext2.test
+++ b/tests/ooNext2.test
@@ -126,7 +126,7 @@ test oo-nextto-1.3 {basic nextto functionality: constructors} -setup {
variable result
constructor {p q r} {
lappend result ==C== p=$p,q=$q,r=$r
- # Route arguments to superclasses, in non-trival pattern
+ # Route arguments to superclasses, in non-trivial pattern
nextto B $q
nextto A $p $r
}
diff --git a/tests/pkgMkIndex.test b/tests/pkgMkIndex.test
index 25840c6..33add42 100644
--- a/tests/pkgMkIndex.test
+++ b/tests/pkgMkIndex.test
@@ -490,7 +490,7 @@ removeFile [file join pkg pkg2_b.tcl]
makeFile {
# This package requires circ2, and circ2 requires circ3, which in turn
-# requires circ1. In case of cirularities, pkg_mkIndex should give up when
+# requires circ1. In case of circularities, pkg_mkIndex should give up when
# it gets stuck.
package require circ2 1.0
package provide circ1 1.0
@@ -654,7 +654,7 @@ test pkgMkIndex-12.1 {same name procs in different namespace} {
removeFile [file join pkg samename.tcl]
-# Proc names with embedded spaces are properly listed (ie, correct number of
+# Proc names with embedded spaces are properly listed (i.e. correct number of
# braces) in result
makeFile {
package provide spacename 1.0
diff --git a/tests/remote.tcl b/tests/remote.tcl
index 6bc4b17..eee551a 100644
--- a/tests/remote.tcl
+++ b/tests/remote.tcl
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-# Initialize message delimitor
+# Initialize message delimiter
# Initialize command array
catch {unset command}
diff --git a/tests/resolver.test b/tests/resolver.test
index 51df07c..ea84956 100644
--- a/tests/resolver.test
+++ b/tests/resolver.test
@@ -203,7 +203,7 @@ test resolver-2.1 {compiled var resolver: Bug #3383616} -setup {
# resolver-agnostic).
#
# In order to make the test cases for the per-interpreter cmd literal pool
-# reproducable and to minimize interactions between test cases, we use a child
+# reproducible and to minimize interactions between test cases, we use a child
# interpreter per test-case.
#
#
diff --git a/tests/safe-stock.test b/tests/safe-stock.test
index d23d86e..24e90a0 100644
--- a/tests/safe-stock.test
+++ b/tests/safe-stock.test
@@ -97,8 +97,8 @@ proc mapAndSortList {map listIn} {
lsort $listOut
}
-# Force actual loading of the safe package because we use un-exported (and
-# thus un-autoindexed) APIs in this test result arguments:
+# Force actual loading of the safe package because we use unexported (and
+# thus unautoindexed) APIs in this test result arguments:
catch {safe::interpConfigure}
testConstraint AutoSyncDefined 1
diff --git a/tests/safe.test b/tests/safe.test
index f3890b7..0a888f4 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -56,8 +56,8 @@ proc mapAndSortList {map listIn} {
lsort $listOut
}
-# Force actual loading of the safe package because we use un-exported (and
-# thus un-autoindexed) APIs in this test result arguments:
+# Force actual loading of the safe package because we use unexported (and
+# thus unautoindexed) APIs in this test result arguments:
catch {safe::interpConfigure}
# testing that nested and statics do what is advertised (we use a static
diff --git a/tests/scan.test b/tests/scan.test
index 03a5b46..cf58828 100644
--- a/tests/scan.test
+++ b/tests/scan.test
@@ -508,7 +508,7 @@ test scan-5.10 {integer scanning} -setup {
list [scan "1 2 " "%hd %d %d %d" a b c d] $a $b $c $d
} -result {2 1 2 {} {}}
#
-# The behavior for scaning intergers larger than MAX_INT is not defined by the
+# The behavior for scanning integers larger than MAX_INT is not defined by the
# ANSI spec. Some implementations wrap the input (-16) some return MAX_INT.
#
test scan-5.11 {integer scanning} -constraints {nonPortable} -setup {
diff --git a/tests/socket.test b/tests/socket.test
index 052733f..82e908a 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -127,7 +127,7 @@ set t2 [clock milliseconds]
set lat1 [expr {($t2-$t1)*2}]; # doubled as a safety margin
# Test the latency of failed connection attempts over the loopback
-# interface. They can take more than a second under Windowos and requres
+# interface. They can take more than a second under Windows and requires
# additional [after]s in some tests that are not needed on systems that fail
# immediately.
set t1 [clock milliseconds]
@@ -1864,7 +1864,7 @@ proc transf_test {{testmode transfer} {maxIter 1000} {maxTime 10000}} {
set srvsock {}
# if binding on port 0 is not possible (system related, blocked on ISPs etc):
if {[catch {close [socket -async $::localhost $port]}]} {
- # simplest server on random port (immediatelly closing a connect):
+ # simplest server on random port (immediately closing a connect):
set port [randport]
set srvsock [socket -server {apply {{ch args} {close $ch}}} -myaddr $::localhost $port]
# socket on windows has some issues yet (e. g. bug [b6d0d8cc2c]), so we simply decrease iteration count (to 1/4):
@@ -1898,7 +1898,7 @@ proc transf_test {{testmode transfer} {maxIter 1000} {maxTime 10000}} {
}
iteration first
}
- # parent proc commiting transfer attempt (attach) and checking acquire was successful:
+ # parent proc committing transfer attempt (attach) and checking acquire was successful:
proc transf_parent {fd args} {
tcltest::DebugPuts 2 "** trma / $::count ** $args **"
thread::attach $fd
@@ -2447,7 +2447,7 @@ test socket-14.13 {testing writable event when quick failure} \
# Test for bug 336441ed59 where a quick background fail was ignored
# Test only for windows as socket -async 255.255.255.255 fails
- # directly on unix
+ # directly on Unix
# The following connect should fail very quickly
set a1 [after 2000 {set x timeout}]
diff --git a/tests/stringObj.test b/tests/stringObj.test
index 5c1d040..60e1294 100644
--- a/tests/stringObj.test
+++ b/tests/stringObj.test
@@ -317,7 +317,7 @@ test stringObj-9.10 {TclAppendObjToObj, integer src & mixed dest} testobj {
test stringObj-9.11 {TclAppendObjToObj, mixed src & 1-byte dest index check} testobj {
# bug 2678, in <=8.2.0, the second obj (the one to append) in
# Tcl_AppendObjToObj was not correctly checked to see if it was all one
- # byte chars, so a unicode string would be added as one byte chars.
+ # byte chars, so a Unicode string would be added as one byte chars.
set x abcdef
set len [string length $x]
set y a\xFCb\xE5c\xEF
@@ -410,13 +410,13 @@ test stringObj-13.4 {Tcl_GetCharLength with mixed width chars} testobj {
} 1
test stringObj-13.5 {Tcl_GetCharLength with mixed width chars} testobj {
# string length "○○"
- # Use \uXXXX notation below instead of hardcoding the values, otherwise
+ # Use \uXXXX notation below instead of hard-coding the values, otherwise
# the test will fail in multibyte locales.
string length "\xEF\xBF\xAE\xEF\xBF\xAE"
} 6
test stringObj-13.6 {Tcl_GetCharLength with mixed width chars} testobj {
# set a "ïa¿b®cï¿d®"
- # Use \uXXXX notation below instead of hardcoding the values, otherwise
+ # Use \uXXXX notation below instead of hard-coding the values, otherwise
# the test will fail in multibyte locales.
set a "\xEFa\xBFb\xAEc\xEF\xBFd\xAE"
list [string length $a] [string length $a]
diff --git a/tests/tcltest.test b/tests/tcltest.test
index 29d40e2..114ce30 100644
--- a/tests/tcltest.test
+++ b/tests/tcltest.test
@@ -542,20 +542,20 @@ test tcltest-8.2 {tcltest a.tcl -tmpdir thisdirectoryisafile} {
-result {*not a directory*}
-match glob
}
-# Test non-writeable directories, non-readable directories with directory flags
+# Test non-writable directories, non-readable directories with directory flags
set notReadableDir [file join [temporaryDirectory] notreadable]
-set notWriteableDir [file join [temporaryDirectory] notwriteable]
+set notWritableDir [file join [temporaryDirectory] notwritable]
makeDirectory notreadable
-makeDirectory notwriteable
+makeDirectory notwritable
switch -- $::tcl_platform(platform) {
unix {
file attributes $notReadableDir -permissions 0o333
- file attributes $notWriteableDir -permissions 0o555
+ file attributes $notWritableDir -permissions 0o555
}
default {
# note in FAT/NTFS we won't be able to protect directory with read-only attribute...
- catch {file attributes $notWriteableDir -readonly 1}
- catch {testchmod 0o444 $notWriteableDir}
+ catch {file attributes $notWritableDir -readonly 1}
+ catch {testchmod 0o444 $notWritableDir}
}
}
test tcltest-8.3 {tcltest a.tcl -tmpdir notReadableDir} {
@@ -570,17 +570,17 @@ test tcltest-8.3 {tcltest a.tcl -tmpdir notReadableDir} {
# This constraint doesn't go at the top of the file so that it doesn't
# interfere with tcltest-5.5
testConstraint notFAT [expr {
- ![regexp {^(FAT\d*|NTFS)$} [lindex [file system $notWriteableDir] 1]]
+ ![regexp {^(FAT\d*|NTFS)$} [lindex [file system $notWritableDir] 1]]
|| $::tcl_platform(platform) eq "unix" || [llength [info commands testchmod]]
}]
# FAT/NTFS permissions are fairly hopeless; ignore this test if that FS is used
-test tcltest-8.4 {tcltest a.tcl -tmpdir notWriteableDir} {
+test tcltest-8.4 {tcltest a.tcl -tmpdir notWritableDir} {
-constraints {unixOrWin notRoot notFAT notWsl}
-body {
- child msg $a -tmpdir $notWriteableDir
+ child msg $a -tmpdir $notWritableDir
return $msg
}
- -result {*not writeable*}
+ -result {*not writable*}
-match glob
}
test tcltest-8.5 {tcltest a.tcl -tmpdir normaldirectory} {
@@ -720,15 +720,15 @@ test tcltest-8.60 {::workingDirectory} {
switch -- $::tcl_platform(platform) {
unix {
file attributes $notReadableDir -permissions 0o777
- file attributes $notWriteableDir -permissions 0o777
+ file attributes $notWritableDir -permissions 0o777
}
default {
- catch {testchmod 0o777 $notWriteableDir}
- catch {file attributes $notWriteableDir -readonly 0}
+ catch {testchmod 0o777 $notWritableDir}
+ catch {file attributes $notWritableDir -readonly 0}
}
}
-file delete -force -- $notReadableDir $notWriteableDir
+file delete -force -- $notReadableDir $notWritableDir
removeFile a.tcl
removeFile thisdirectoryisafile
removeDirectory normaldirectory
diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test
index 1250c0b..09a34dd 100644
--- a/tests/unixFCmd.test
+++ b/tests/unixFCmd.test
@@ -26,7 +26,7 @@ testConstraint notWsl [expr {[llength [array names ::env *WSL*]] == 0}]
set oldcwd [pwd]
cd [temporaryDirectory]
-# Several tests require need to match results against the unix username
+# Several tests require need to match results against the Unix username
set user {}
if {[testConstraint unix]} {
catch {set user [exec whoami]}
@@ -387,7 +387,7 @@ file delete -force -- foo.test
test unixFCmd-18.1 {Unix pwd} -constraints {unix notRoot nonPortable} -setup {
set cd [pwd]
} -body {
- # This test is nonPortable because SunOS generates a weird error
+ # This test is non-portable because SunOS generates a weird error
# message when the current directory isn't readable.
set nd $cd/tstdir
file mkdir $nd
diff --git a/tests/unixForkEvent.test b/tests/unixForkEvent.test
index f321b10..bf22449 100644
--- a/tests/unixForkEvent.test
+++ b/tests/unixForkEvent.test
@@ -17,7 +17,7 @@ testConstraint testfork [llength [info commands testfork]]
# Test if the notifier thread is well initialized in a forked interpreter
# by Tcl_InitNotifier
-test unixforkevent-1.1 {fork and test writeable event} \
+test unixforkevent-1.1 {fork and test writable event} \
-constraints {testfork nonPortable} \
-body {
set myFolder [makeDirectory unixtestfork]
diff --git a/tests/winDde.test b/tests/winDde.test
index 14308c7..93b9242 100644
--- a/tests/winDde.test
+++ b/tests/winDde.test
@@ -154,15 +154,15 @@ test winDde-3.5 {DDE request locally} -constraints dde -body {
dde execute TclEval self [list set \xe1 foo]
dde request -binary TclEval self \xe1
} -result "foo\x00"
-# Set variable a to A with diaeresis (unicode C4) by relying on the fact
+# Set variable a to A with diaeresis (Unicode C4) by relying on the fact
# that utf-8 is sent (e.g. "c3 84" on the wire)
test winDde-3.6 {DDE request utf-8} -constraints dde -body {
set \xe1 "not set"
dde execute TclEval self "set \xe1 \xc4"
scan [set \xe1] %c
} -result 196
-# Set variable a to A with diaeresis (unicode C4) using binary execute
-# and compose utf-8 (e.g. "c3 84" ) manualy
+# Set variable a to A with diaeresis (Unicode C4) using binary execute
+# and compose utf-8 (e.g. "c3 84" ) manually
test winDde-3.7 {DDE request binary} -constraints {dde notWine} -body {
set \xe1 "not set"
dde execute -binary TclEval self [list set \xc3\xa1 \xc3\x84\x00]
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index 3be1920..9b5e67e 100644
--- a/tests/winFCmd.test
+++ b/tests/winFCmd.test
@@ -123,7 +123,7 @@ append longname $longname
# Uses the "testfile" command instead of the "file" command. The "file"
# command provides several layers of sanity checks on the arguments and
# it can be difficult to actually forward "insane" arguments to the
-# low-level posix emulation layer.
+# low-level Posix emulation layer.
test winFCmd-1.1 {TclpRenameFile: errno: EACCES} -body {
testfile mv $cdfile $cdrom/dummy~~.fil
diff --git a/tools/mkdepend.tcl b/tools/mkdepend.tcl
index 6e3d6ed..b02e396 100644
--- a/tools/mkdepend.tcl
+++ b/tools/mkdepend.tcl
@@ -252,7 +252,7 @@ proc compressDeps {depends} {
# Adds a new set of path and replacement string to the global list.
#
# Arguments:
-# newPathInfo comma seperated path and replacement string
+# newPathInfo comma separated path and replacement string
#
# Results:
# None.
@@ -296,7 +296,7 @@ proc readInputListFile {objectListFile} {
set fl [read $f]
close $f
- # fix native path seperator so it isn't treated as an escape.
+ # fix native path separator so it isn't treated as an escape.
regsub -all {\\} $fl {/} fl
# Treat the string as a list so filenames between double quotes are
diff --git a/unix/install-sh b/unix/install-sh
index 21b733a..b6593f3 100755
--- a/unix/install-sh
+++ b/unix/install-sh
@@ -329,7 +329,7 @@ do
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
- # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directly in world-writable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
@@ -515,4 +515,4 @@ done
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
-# End: \ No newline at end of file
+# End:
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c
index 05d25de..b203487 100644
--- a/unix/tclAppInit.c
+++ b/unix/tclAppInit.c
@@ -91,7 +91,7 @@ main(
TclZipfs_AppHook(&argc, &argv);
#endif
- Tcl_Main((size_t)argc, argv, TCL_LOCAL_APPINIT);
+ Tcl_Main(argc, argv, TCL_LOCAL_APPINIT);
return 0; /* Needed only to prevent compiler warning. */
}
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 94c172d..a7a6eb1 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -1532,7 +1532,7 @@ TtyParseMode(
*
* We cannot if/else/endif the strchr arguments, it has to be the whole
* function. On AIX this function is apparently a macro, and macros do
- * not allow pre-processor directives in their arguments.
+ * not allow preprocessor directives in their arguments.
*/
if (
@@ -1782,7 +1782,7 @@ TclpOpenFileChannel(
Tcl_Channel
Tcl_MakeFileChannel(
void *handle, /* OS level handle. */
- int mode) /* ORed combination of TCL_READABLE and
+ int mode) /* OR'ed combination of TCL_READABLE and
* TCL_WRITABLE to indicate file mode. */
{
TtyState *fsPtr;
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index 7bd840a..3a7778e 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -736,7 +736,7 @@ CopyGrp(
*
* CopyHostent --
*
- * Copies string fields of the hostnent structure to the private buffer,
+ * Copies string fields of the hostent structure to the private buffer,
* honouring the size of the buffer.
*
* Results:
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index ed6a6e0..f8eaeb5 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -1,7 +1,7 @@
/*
* tclUnixFCmd.c
*
- * This file implements the unix specific portion of file manipulation
+ * This file implements the Unix specific portion of file manipulation
* subcommands of the "file" command. All filename arguments should
* already be translated to native format.
*
@@ -340,7 +340,7 @@ DoRenameFile(
}
/*
- * IRIX returns EIO when you attept to move a directory into itself. We
+ * IRIX returns EIO when you attempt to move a directory into itself. We
* just map EIO to EINVAL get the right message on SGI. Most platforms
* don't return EIO except in really strange cases.
*/
@@ -730,7 +730,7 @@ DoCreateDirectory(
*
* Recursively copies a directory. The target directory dst must not
* already exist. Note that this function does not merge two directory
- * hierarchies, even if the target directory is an an empty directory.
+ * hierarchies, even if the target directory is an empty directory.
*
* Results:
* If the directory was successfully copied, returns TCL_OK. Otherwise
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index c1fb7da..aecdb3b 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -701,7 +701,7 @@ TclpObjLstat(
* is either the given clientData, if the working directory hasn't
* changed, or a new clientData (owned by our caller), giving the new
* native path, or NULL if the current directory could not be determined.
- * If NULL is returned, the caller can examine the standard posix error
+ * If NULL is returned, the caller can examine the standard Posix error
* codes to determine the cause of the problem.
*
* Side effects:
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 6d7f19b..ce08425 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -469,7 +469,7 @@ TclpInitLibraryPath(
* Look for the library relative to the TCL_LIBRARY env variable. If the
* last dirname in the TCL_LIBRARY path does not match the last dirname in
* the installLib variable, use the last dir name of installLib in
- * addition to the orginal TCL_LIBRARY path.
+ * addition to the original TCL_LIBRARY path.
*/
str = getenv("TCL_LIBRARY"); /* INTL: Native. */
@@ -987,7 +987,7 @@ TclpSetVariables(
* TclpFindVariable --
*
* Locate the entry in environ for a given name. On Unix this routine is
- * case sensetive, on Windows this matches mixed case.
+ * case sensitive, on Windows this matches mixed case.
*
* Results:
* The return value is the index in environ of an entry with the name
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index 943e7d7..0a2b695 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -439,7 +439,7 @@ AtForkChild(void)
/*
* The tsdPtr from before the fork is copied as well. But since we
- * are paranoic, we don't trust its condvar and reset it.
+ * are paranoiac, we don't trust its condvar and reset it.
*/
#ifdef __CYGWIN__
DestroyWindow(tsdPtr->hwnd);
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index c1fd36f..b6ade1a 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -393,12 +393,12 @@ TclpCreateProcess(
* receive no standard input. */
TclFile outputFile, /* If non-NULL, gives the file that receives
* output from the child process. If
- * outputFile file is not writeable or is
+ * outputFile file is not writable or is
* NULL, output from the child will be
* discarded. */
TclFile errorFile, /* If non-NULL, gives the file that receives
* errors from the child process. If errorFile
- * file is not writeable or is NULL, errors
+ * file is not writable or is NULL, errors
* from the child will be discarded. errorFile
* may be the same as outputFile. */
Tcl_Pid *pidPtr) /* If this function is successful, pidPtr is
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index 791c2a3..5d5b14b 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -504,7 +504,7 @@ extern int gettimeofday(struct timeval *tp,
/*
*---------------------------------------------------------------------------
- * Not all systems declare the errno variable in errno.h. so this file does it
+ * Not all systems declare the errno variable in errno.h, so this file does it
* explicitly. The list of system error messages also isn't generally declared
* in a header file anywhere.
*---------------------------------------------------------------------------
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 0a63788..45a3c4d 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -41,7 +41,7 @@ typedef union {
} address;
/*
- * This structure describes per-instance state of a tcp based channel.
+ * This structure describes per-instance state of a tcp-based channel.
*/
typedef struct TcpState TcpState;
@@ -54,7 +54,7 @@ typedef struct TcpFdList {
struct TcpState {
Tcl_Channel channel; /* Channel associated with this file. */
- int flags; /* ORed combination of the bitfields defined
+ int flags; /* OR'ed combination of the bitfields defined
* below. */
TcpFdList fds; /* The file descriptors of the sockets. */
int interest; /* Event types of interest */
@@ -82,7 +82,7 @@ struct TcpState {
};
/*
- * These bits may be ORed together into the "flags" field of a TcpState
+ * These bits may be OR'ed together into the "flags" field of a TcpState
* structure.
*/
@@ -389,17 +389,17 @@ TcpBlockModeProc(
*
* Check the state of an async connect process. If a connection attempt
* terminated, process it, which may finalize it or may start the next
- * attempt. If a connect error occures, it is saved in
+ * attempt. If a connect error occurs, it is saved in
* statePtr->connectError to be reported by 'fconfigure -error'.
*
* There are two modes of operation, defined by errorCodePtr:
- * * non-NULL: Called by explicite read/write command. Blocks if the
+ * * non-NULL: Called by explicit read/write command. Blocks if the
* socket is blocking.
* May return two error codes:
* * EWOULDBLOCK: if connect is still in progress
* * ENOTCONN: if connect failed. This would be the error message
- * of a rect or sendto syscall so this is emulated here.
- * * NULL: Called by a backround operation. Do not block and do not
+ * of a recv or sendto syscall so this is emulated here.
+ * * NULL: Called by a background operation. Do not block and do not
* return any error code.
*
* Results:
@@ -431,7 +431,7 @@ WaitForConnect(
}
/*
- * Check if an async connect is running. If not return ok
+ * Check if an async connect is running. If not return ok.
*/
if (!GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING)) {
@@ -1204,7 +1204,7 @@ TcpWatchProc(
* socket file descriptor is writable when the other end of the socket
* is closed. This is in contrast to the guarantees Tcl makes that
* its channels become writable and fire writable events on an error
- * conditon. This has caused a leak of file descriptors in a state of
+ * condition. This has caused a leak of file descriptors in a state of
* background flushing. See Tcl ticket 1758a0b603.
*
* As a workaround, when our caller indicates an interest in writable
@@ -1604,7 +1604,7 @@ Tcl_MakeTcpClientChannel(
void *
TclpMakeTcpClientChannelMode(
void *sock, /* The socket to wrap up into a channel. */
- int mode) /* ORed combination of TCL_READABLE and
+ int mode) /* OR'ed combination of TCL_READABLE and
* TCL_WRITABLE to indicate file mode. */
{
TcpState *statePtr;
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index be54481..ee1229b 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -594,7 +594,7 @@ TestgotsigCmd(
*
* Implements the "testchmod" cmd. Used when testing "file" command.
* The only attribute used by the Windows platform is the user write
- * flag; if this is not set, the file is made read-only. Otehrwise, the
+ * flag; if this is not set, the file is made read-only. Otherwise, the
* file is made read-write.
*
* Results:
diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c
index 45bda3e..4388009 100644
--- a/unix/tclXtNotify.c
+++ b/unix/tclXtNotify.c
@@ -17,7 +17,7 @@
#include "tclInt.h"
/*
- * This structure is used to keep track of the notifier info for a a
+ * This structure is used to keep track of the notifier info for a
* registered file.
*/
diff --git a/win/Makefile.in b/win/Makefile.in
index 202b860..6c92749 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -82,7 +82,7 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
#CFLAGS = $(CFLAGS_DEBUG)
#CFLAGS = $(CFLAGS_OPTIMIZE)
#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
-CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -D__USE_MINGW_ANSI_STDIO=0 -DMP_FIXED_CUTOFFS -DMP_NO_STDINT
+CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DMP_FIXED_CUTOFFS -D__USE_MINGW_ANSI_STDIO=0 -DMP_NO_STDINT
# To compile without backward compatibility and deprecated code uncomment the
# following
@@ -545,7 +545,7 @@ $(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES) ${TCL_ZIP_
tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
$(COPY) tclsh.exe.manifest $(TCLSH).manifest
@VC_MANIFEST_EMBED_EXE@
- if test "${ZIPFS_BUILD}" = "2" ; then \
+ @if test "${ZIPFS_BUILD}" = "2" ; then \
cat ${TCL_ZIP_FILE} >> ${TCLSH}; \
${NATIVE_ZIP} -A ${TCLSH} \
|| echo 'ignore zip-error by adjust sfx process (not executable?)'; \
@@ -600,7 +600,7 @@ ${TEST_EXE_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS} tclTestMain.${OBJEXT}
tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
$(COPY) tclsh.exe.manifest ${TEST_EXE_FILE}.manifest
-# use pre-built zlib1.dll
+# use prebuilt zlib1.dll
${ZLIB_DLL_FILE}: ${TCL_STUB_LIB_FILE}
@if test "@ZLIB_LIBS@set" = "${ZLIB_DIR_NATIVE}/win64-arm/zdll.libset" ; then \
$(COPY) $(ZLIB_DIR)/win64-arm/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
@@ -683,6 +683,8 @@ tclPkgConfig.${OBJEXT}: tclPkgConfig.c
tclEvent.${OBJEXT}: tclEvent.c tclUuid.h
+tclTest.${OBJEXT}: tclTest.c tclUuid.h
+
$(TOP_DIR)/manifest.uuid:
printf "git-" >$(TOP_DIR)/manifest.uuid
(cd $(TOP_DIR); git rev-parse HEAD >>$(TOP_DIR)/manifest.uuid || \
diff --git a/win/makefile.vc b/win/makefile.vc
index 1f0b02e..d1f4ef3 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -112,7 +112,7 @@
# Hooks to allow the intermediate and output directories to be
# changed. $(OUT_DIR) is assumed to be
# $(BINROOT)\(Release|Debug) based on if symbols are requested.
-# $(TMP_DIR) will de $(OUT_DIR)\<buildtype> by default.
+# $(TMP_DIR) will be $(OUT_DIR)\<buildtype> by default.
#
# TESTPAT=<file>
# Reads the tests requested to be run from this file.
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index fc40da4..e0941e3 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -210,13 +210,13 @@ CheckForCompilerFeature(
sa.bInheritHandle = FALSE;
/*
- * Create a non-inheritible pipe.
+ * Create a non-inheritable pipe.
*/
CreatePipe(&Out.pipe, &h, &sa, 0);
/*
- * Dupe the write side, make it inheritible, and close the original.
+ * Dupe the write side, make it inheritable, and close the original.
*/
DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput, 0, TRUE,
@@ -352,7 +352,7 @@ CheckForLinkerFeature(
CreatePipe(&Out.pipe, &h, &sa, 0);
/*
- * Dupe the write side, make it inheritible, and close the original.
+ * Dupe the write side, make it inheritable, and close the original.
*/
DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput, 0, TRUE,
@@ -584,7 +584,7 @@ list_free(list_item_t **listPtrPtr)
* SubstituteFile --
* As windows doesn't provide anything useful like sed and it's unreliable
* to use the tclsh you are building against (consider x-platform builds -
- * eg compiling AMD64 target from IX86) we provide a simple substitution
+ * e.g. compiling AMD64 target from IX86) we provide a simple substitution
* option here to handle autoconf style substitutions.
* The substitution file is whitespace and line delimited. The file should
* consist of lines matching the regular expression:
@@ -610,7 +610,7 @@ SubstituteFile(
if (fp != NULL) {
/*
- * Build a list of substutitions from the first filename
+ * Build a list of substitutions from the first filename
*/
sp = fopen(substitutions, "rt");
diff --git a/win/rules.vc b/win/rules.vc
index 0dd6ef2..d8b3b12 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -1369,7 +1369,7 @@ INCLUDE_INSTALL_DIR = $(_INSTALLDIR)\..\include
# and switches are specific to it.
# The following macros are defined, names are for historical compatibility:
# OPTDEFINES - /Dxxx C macro flags based on user-specified OPTS
-# COMPILERFLAGS - /Dxxx C macro flags independent of any configuration opttions
+# COMPILERFLAGS - /Dxxx C macro flags independent of any configuration options
# crt - Compiler switch that selects the appropriate C runtime
# cdebug - Compiler switches related to debug AND optimizations
# cwarn - Compiler switches that set warning levels
diff --git a/win/tcl.m4 b/win/tcl.m4
index 8774b94..954c3c0 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -1044,7 +1044,7 @@ AC_DEFUN([SC_WITH_TCL], [
# none
#
# Results
-# Subst's the following values:
+# Substitutes the following values:
# TCLSH_PROG
#------------------------------------------------------------------------
@@ -1090,7 +1090,7 @@ AC_DEFUN([SC_PROG_TCLSH], [
# none
#
# Results
-# Subst's the following values:
+# Substitutes the following values:
# BUILD_TCLSH
#------------------------------------------------------------------------
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index 8a4db89..ecdd03a 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -939,7 +939,7 @@ TclpOpenFileChannel(
}
/*
- * For natively named Windows serial ports we are done.
+ * For natively-named Windows serial ports we are done.
*/
channel = TclWinOpenSerialChannel(handle, channelName,
@@ -1079,7 +1079,7 @@ TclpOpenFileChannel(
Tcl_Channel
Tcl_MakeFileChannel(
ClientData rawHandle, /* OS level handle */
- int mode) /* ORed combination of TCL_READABLE and
+ int mode) /* OR'ed combination of TCL_READABLE and
* TCL_WRITABLE to indicate file mode. */
{
#if defined(HAVE_NO_SEH) && !defined(_WIN64) && !defined(__clang__)
@@ -1092,7 +1092,7 @@ Tcl_MakeFileChannel(
TclFile readFile = NULL, writeFile = NULL;
BOOL result;
- if (mode == 0) {
+ if ((mode & (TCL_READABLE|TCL_WRITABLE)) == 0) {
return NULL;
}
@@ -1375,7 +1375,7 @@ OpenFileChannel(
for (infoPtr = tsdPtr->firstFilePtr; infoPtr != NULL;
infoPtr = infoPtr->nextPtr) {
if (infoPtr->handle == (HANDLE) handle) {
- return (permissions==infoPtr->validMask) ? infoPtr->channel : NULL;
+ return ((permissions & (TCL_READABLE|TCL_WRITABLE|TCL_EXCEPTION))==infoPtr->validMask) ? infoPtr->channel : NULL;
}
}
@@ -1388,7 +1388,7 @@ OpenFileChannel(
*/
infoPtr->nextPtr = NULL;
- infoPtr->validMask = permissions;
+ infoPtr->validMask = permissions & (TCL_READABLE|TCL_WRITABLE|TCL_EXCEPTION);
infoPtr->watchMask = 0;
infoPtr->flags = appendMode;
infoPtr->handle = handle;
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index fb2be99..697aae6 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -318,7 +318,8 @@ DdeSetServerName(
Tcl_DString dString;
const WCHAR *actualName;
Tcl_Obj *srvListPtr = NULL, **srvPtrPtr = NULL;
- int n, srvCount = 0, lastSuffix, r = TCL_OK;
+ Tcl_Size n, srvCount = 0;
+ int lastSuffix, r = TCL_OK;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
/*
@@ -870,7 +871,7 @@ DdeServerProc(
case XTYP_EXECUTE: {
/*
* Execute this script. The results will be saved into a list object
- * which will be retreived later. See ExecuteRemoteObject.
+ * which will be retrieved later. See ExecuteRemoteObject.
*/
Tcl_Obj *returnPackagePtr;
@@ -893,13 +894,13 @@ DdeServerProc(
/* Empty binary array. */
ddeObjectPtr = Tcl_NewObj();
} else if ((dlen & 1) || utilString[(dlen>>1)-1]) {
- /* Cannot be unicode, so assume utf-8 */
+ /* Cannot be Unicode, so assume utf-8 */
if (!string[dlen-1]) {
dlen--;
}
ddeObjectPtr = Tcl_NewStringObj(string, dlen);
} else {
- /* unicode */
+ /* Unicode */
Tcl_DString dsBuf;
Tcl_DStringInit(&dsBuf);
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 7f8cfd1..acf61b7 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -879,7 +879,7 @@ DoCreateDirectory(
*
* Recursively copies a directory. The target directory dst must not
* already exist. Note that this function does not merge two directory
- * hierarchies, even if the target directory is an an empty directory.
+ * hierarchies, even if the target directory is an empty directory.
*
* Results:
* If the directory was successfully copied, returns TCL_OK. Otherwise
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 3e5cff5..f0c46f9 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1679,7 +1679,7 @@ NativeAccess(
}
/*
- * We cannnot verify the access fast, check it below using security
+ * We cannot verify the access fast, check it below using security
* info.
*/
}
@@ -1799,7 +1799,7 @@ NativeAccess(
RevertToSelf();
/*
- * Setup desiredAccess according to the access priveleges we are
+ * Setup desiredAccess according to the access privileges we are
* checking.
*/
@@ -2056,7 +2056,7 @@ NativeStat(
* 'getFileAttributesExProc', and if that isn't available, then on even
* simpler routines.
*
- * Special consideration must be given to Windows hardcoded names like
+ * Special consideration must be given to Windows hard-coded names like
* CON, NULL, COM1, LPT1 etc. For these, we still need to do the
* CreateFile as some may not exist (e.g. there is no CON in wish by
* default). However the subsequent GetFileInformationByHandle will
@@ -2347,7 +2347,7 @@ FromCTime(
* is either the given clientData, if the working directory hasn't
* changed, or a new clientData (owned by our caller), giving the new
* native path, or NULL if the current directory could not be determined.
- * If NULL is returned, the caller can examine the standard posix error
+ * If NULL is returned, the caller can examine the standard Posix error
* codes to determine the cause of the problem.
*
* Side effects:
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 2eaaa09..c085c81 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -147,7 +147,7 @@ TclpInitLibraryPath(
* Look for the library relative to the TCL_LIBRARY env variable. If the
* last dirname in the TCL_LIBRARY path does not match the last dirname in
* the installLib variable, use the last dir name of installLib in
- * addition to the orginal TCL_LIBRARY path.
+ * addition to the original TCL_LIBRARY path.
*/
AppendEnvironment(pathPtr, installLib);
@@ -225,8 +225,8 @@ AppendEnvironment(
}
/*
- * The "L" preceeding the TCL_LIBRARY string is used to tell VC++ that
- * this is a unicode string.
+ * The "L" preceding the TCL_LIBRARY string is used to tell VC++ that
+ * this is a Unicode string.
*/
GetEnvironmentVariableW(L"TCL_LIBRARY", wBuf, MAX_PATH);
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c
index fd39428..7b7ef1e 100644
--- a/win/tclWinNotify.c
+++ b/win/tclWinNotify.c
@@ -14,7 +14,7 @@
#include "tclInt.h"
/*
- * The follwing static indicates whether this module has been initialized.
+ * The following static indicates whether this module has been initialized.
*/
#define INTERVAL_TIMER 1 /* Handle of interval timer. */
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 094aa8b..14767f9 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -923,12 +923,12 @@ TclpCreateProcess(
* receive no standard input. */
TclFile outputFile, /* If non-NULL, gives the file that receives
* output from the child process. If
- * outputFile file is not writeable or is
+ * outputFile file is not writable or is
* NULL, output from the child will be
* discarded. */
TclFile errorFile, /* If non-NULL, gives the file that receives
* errors from the child process. If errorFile
- * file is not writeable or is NULL, errors
+ * file is not writable or is NULL, errors
* from the child will be discarded. errorFile
* may be the same as outputFile. */
Tcl_Pid *pidPtr) /* If this function is successful, pidPtr is
@@ -3145,7 +3145,7 @@ PipeThreadActionProc(
/*
* We do not access firstPipePtr in the thread structures. This is not for
* all pipes managed by the thread, but only those we are watching.
- * Removal of the filevent handlers before transfer thus takes care of
+ * Removal of the fileevent handlers before transfer thus takes care of
* this structure.
*/
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index becc6f5..3732550 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -782,7 +782,7 @@ GetValue(
* length to TCL_DSTRING_STATIC_SIZE, but this should be safer if the
* implementation of Dstrings changes.
*
- * This allows short values to be read from the registy in one call.
+ * This allows short values to be read from the registry in one call.
* Longer values need a second call with an expanded DString.
*/
@@ -876,7 +876,7 @@ GetValue(
*
* GetValueNames --
*
- * This function enumerates the values of the a given key. If the
+ * This function enumerates the values of the given key. If the
* optional pattern is supplied, then only value names that match the
* pattern will be returned.
*
@@ -1012,7 +1012,7 @@ OpenKey(
*
* OpenSubKey --
*
- * This function opens a given subkey of a root key on the specified
+ * Opens a given subkey of the given root key on the specified
* host.
*
* Results:
@@ -1097,7 +1097,7 @@ OpenSubKey(
*
* ParseKeyName --
*
- * This function parses a key name into the host, root, and subkey parts.
+ * Parses a key name into the host, root, and subkey parts.
*
* Results:
* The pointers to the start of the host and subkey names are returned in
@@ -1329,7 +1329,7 @@ SetValue(
(DWORD) type, (BYTE *) &value, sizeof(DWORD));
} else if (type == REG_MULTI_SZ) {
Tcl_DString data, buf;
- int objc, i;
+ Tcl_Size objc, i;
Tcl_Obj **objv;
if (Tcl_ListObjGetElements(interp, dataObj, &objc, &objv) != TCL_OK) {
@@ -1476,7 +1476,7 @@ BroadcastValue(
*
* AppendSystemError --
*
- * This routine formats a Windows system error message and places it into
+ * Formats a Windows system error message and places it into
* the interpreter result.
*
* Results:
@@ -1549,7 +1549,7 @@ AppendSystemError(
*
* ConvertDWORD --
*
- * This function determines whether a DWORD needs to be byte swapped, and
+ * Determines whether a DWORD needs to be byte swapped, and
* returns the appropriately swapped value.
*
* Results:
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index 62af1c5..6ab305c 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -335,7 +335,7 @@ ProcExitHandler(
*
* SerialBlockTime --
*
- * Wrapper to set Tcl's block time in msec
+ * Wrapper to set Tcl's block time in msec.
*
* Results:
* None.
@@ -904,7 +904,7 @@ SerialInputProc(
}
} else {
/*
- * BLOCKING mode: Tcl trys to read a full buffer of 4 kBytes here.
+ * BLOCKING mode: Tcl tries to read a full buffer of 4 kBytes here.
*/
if (cStat.cbInQue > 0) {
@@ -973,9 +973,9 @@ SerialOutputProc(
*errorCode = 0;
/*
- * At EXIT Tcl trys to flush all open channels in blocking mode. We avoid
+ * At EXIT Tcl tries to flush all open channels in blocking mode. We avoid
* blocking output after ExitProc or CloseHandler(chan) has been called by
- * checking the corrresponding variables.
+ * checking the corresponding variables.
*/
if (!initialized || TclInExit()) {
@@ -1458,7 +1458,7 @@ TclWinOpenSerialChannel(
infoPtr = (SerialInfo *)ckalloc(sizeof(SerialInfo));
memset(infoPtr, 0, sizeof(SerialInfo));
- infoPtr->validMask = permissions;
+ infoPtr->validMask = permissions & (TCL_READABLE|TCL_WRITABLE);
infoPtr->handle = handle;
infoPtr->channel = (Tcl_Channel) NULL;
infoPtr->readable = 0;
@@ -2287,7 +2287,7 @@ SerialThreadActionProc(
/*
* We do not access firstSerialPtr in the thread structures. This is not
* for all serials managed by the thread, but only those we are watching.
- * Removal of the filevent handlers before transfer thus takes care of
+ * Removal of the fileevent handlers before transfer thus takes care of
* this structure.
*/
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 7fc34e1..7dd5b41 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -105,7 +105,7 @@ typedef union {
#endif
/*
- * This structure describes per-instance state of a tcp based channel.
+ * This structure describes per-instance state of a tcp-based channel.
*/
typedef struct TcpState TcpState;
@@ -161,7 +161,7 @@ struct TcpState {
};
/*
- * These bits may be ORed together into the "flags" field of a TcpState
+ * These bits may be OR'ed together into the "flags" field of a TcpState
* structure.
*/
@@ -553,8 +553,8 @@ TcpBlockModeProc(
* May return two error codes:
* * EWOULDBLOCK: if connect is still in progress
* * ENOTCONN: if connect failed. This would be the error message
- * of a rect or sendto syscall so this is emulated here.
- * * Null: Called by a backround operation. Do not block and don't
+ * of a recv or sendto syscall so this is emulated here.
+ * * Null: Called by a background operation. Do not block and don't
* return any error code.
*
* Results:
@@ -642,7 +642,7 @@ WaitForConnect(
/*
* For blocking sockets and foreground processing, disable async
- * connect as we continue now synchoneously.
+ * connect as we continue now synchronously.
*/
if (errorCodePtr != NULL &&
@@ -657,7 +657,7 @@ WaitForConnect(
SetEvent(tsdPtr->socketListLock);
/*
- * Continue connect. If switched to synchroneous connect, the
+ * Continue connect. If switched to synchronous connect, the
* connect is terminated.
*/
@@ -670,7 +670,7 @@ WaitForConnect(
(void) Tcl_SetServiceMode(oldMode);
/*
- * Check for Succesfull connect or async connect restart
+ * Check for Successful connect or async connect restart
*/
if (result == TCL_OK) {
@@ -830,7 +830,7 @@ TcpInputProc(
/*
* If an RST comes, then ignore the error and report an EOF just like
- * on unix.
+ * on Unix.
*/
if (error == WSAECONNRESET) {
@@ -1227,7 +1227,7 @@ TcpGetOptionProc(
/*
* Go one step in async connect
*
- * If any error is thrown save it as backround error to report eventually
+ * If any error is thrown save it as background error to report eventually
* below.
*/
@@ -1774,7 +1774,7 @@ TcpConnect(
if (async_connect && error == WSAEWOULDBLOCK) {
/*
- * Asynchroneous connect
+ * Asynchronous connect
*
* Remember that we jump back behind this next round
*/
@@ -1843,7 +1843,7 @@ TcpConnect(
if (Tcl_GetErrno() == 0) {
/*
- * Succesfully connected
+ * Successfully connected
*
* Set up the select mask for read/write events.
*/
@@ -1902,7 +1902,7 @@ TcpConnect(
}
/*
- * Error message on synchroneous connect
+ * Error message on synchronous connect
*/
if (interp != NULL) {
@@ -2937,7 +2937,7 @@ WaitForSocketEvent(
WaitForSingleObject(tsdPtr->socketListLock, INFINITE);
/*
- * Check if event occured.
+ * Check if event occurred.
*/
event_found = GOT_BITS(statePtr->readyEvents, events);
@@ -2949,7 +2949,7 @@ WaitForSocketEvent(
SetEvent(tsdPtr->socketListLock);
/*
- * Exit loop if event occured.
+ * Exit loop if event occurred.
*/
if (event_found) {
@@ -3054,7 +3054,7 @@ SocketThread(
*
* Side effects:
* The flags for the given socket are updated to reflect the event that
- * occured.
+ * occurred.
*
*----------------------------------------------------------------------
*/
@@ -3204,7 +3204,7 @@ SocketProc(
*
* FindFDInList --
*
- * Return true, if the given file descriptior is contained in the
+ * Return true, if the given file descriptor is contained in the
* file descriptor list.
*
* Results:
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index b69fbfc..e9d4e08 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -777,9 +777,9 @@ Tcl_ConditionWait(
timeout = 0;
} else {
/*
- * When dequeuing, we can leave the tsdPtr->nextPtr and
+ * When dequeueing, we can leave the tsdPtr->nextPtr and
* tsdPtr->prevPtr with dangling pointers because they are
- * reinitialilzed w/out reading them when the thread is enqueued
+ * reinitialized w/out reading them when the thread is enqueued
* later.
*/
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index e8401a5..6fecbd2 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -650,7 +650,7 @@ NativeGetMicroseconds(void)
if (curCounter.QuadPart <= perfCounterLastCall) {
/*
- * Calibrated file-time is saved from posix in 100-ns ticks
+ * Calibrated file-time is saved from Posix in 100-ns ticks
*/
return fileTimeLastCall / 10;
@@ -669,7 +669,7 @@ NativeGetMicroseconds(void)
if (curCounter.QuadPart - perfCounterLastCall <
11 * curCounterFreq * timeInfo.calibrationInterv / 10) {
/*
- * Calibrated file-time is saved from posix in 100-ns ticks.
+ * Calibrated file-time is saved from Posix in 100-ns ticks.
*/
return NativeCalc100NsTicks(fileTimeLastCall,
@@ -1029,7 +1029,7 @@ CalibrationThread(
timeInfo.fileTimeLastCall.HighPart = curFileTime.dwHighDateTime;
/*
- * Calibrated file-time will be saved from posix in 100-ns ticks.
+ * Calibrated file-time will be saved from Posix in 100-ns ticks.
*/
timeInfo.fileTimeLastCall.QuadPart -= timeInfo.posixEpoch.QuadPart;
@@ -1104,7 +1104,7 @@ UpdateTimeEachSecond(void)
* step over 1 second. */
/*
- * Sample performance counter and system time (from posix epoch).
+ * Sample performance counter and system time (from Posix epoch).
*/
GetSystemTimeAsFileTime(&curSysTime);
@@ -1129,7 +1129,7 @@ UpdateTimeEachSecond(void)
lastFileTime.QuadPart = curFileTime.QuadPart;
/*
- * We devide by timeInfo.curCounterFreq.QuadPart in several places. That
+ * We divide by timeInfo.curCounterFreq.QuadPart in several places. That
* value should always be positive on a correctly functioning system. But
* it is good to be defensive about such matters. So if something goes
* wrong and the value does goes to zero, we clear the