summaryrefslogtreecommitdiffstats
path: root/tmake/doc/m-win32-msvc.html
blob: 24097cc499fd0d476fa7c7ed95e8cc2a41c71b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!doctype HTML public "-//W3C//DTD HTML 3.2//EN">
<html><head><title>
Generated Makefile for  Win32 / Microsoft Visual C++
</title></head><body bgcolor="#ffffff">
<h2 align=center>Generated Makefile for Win32 / Microsoft Visual C++</h2>

<pre>
#############################################################################
# Makefile for building hello
# Generated by tmake at 20:40, 1998/02/27
#     Project: hello
#    Template: app
#############################################################################

####### Compiler, tools and options

CC	=	cl
CFLAGS	=	-nologo -W3 -O2
INCPATH	=	-I"$(QTDIR)\include"
LINK	=	link
LFLAGS	=	/NOLOGO /SUBSYSTEM:windows
LIBS	=	$(QTDIR)\lib\qt.lib user32.lib gdi32.lib comdlg32.lib wsock32.lib
MOC	=	moc

####### Files

HEADERS =	hello.h
SOURCES =	hello.cpp \
		main.cpp
OBJECTS =	hello.obj \
		main.obj
SRCMOC	=	moc_hello.cpp
OBJMOC	=	moc_hello.obj
TARGET	=	hello.exe

####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .c

.cpp.obj:
	$(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<

.cxx.obj:
	$(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<

.cc.obj:
	$(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<

.c.obj:
	$(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<

####### Build rules

all: $(TARGET)

$(TARGET): $(OBJECTS) $(OBJMOC) 
	$(LINK) $(LFLAGS) /OUT:$(TARGET) @<<
	    $(OBJECTS) $(OBJMOC) $(LIBS)
<<

moc: $(SRCMOC)

tmake: Makefile

Makefile: hello.pro
	tmake hello.pro -o Makefile

clean:
	-del hello.obj
	-del main.obj
	-del moc_hello.cpp
	-del moc_hello.obj
	-del $(TARGET)

####### Compile

hello.obj: hello.cpp \
		hello.h

main.obj: main.cpp \
		hello.h

moc_hello.obj: moc_hello.cpp \
		hello.h

moc_hello.cpp: hello.h
	$(MOC) hello.h -o moc_hello.cpp
</pre>
</body></html>
lue='bug_3610026'>bug_3610026 Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-17 17:37:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-17 17:37:48 (GMT)
commitb549908df2d5c9b0dba0a55f14c53f2052afeb4b (patch)
treebd019667a72a0afddfe022d9473738d383c78fe1
parent9bf0f01d3d518909dba4fddd22b5eefdad229a83 (diff)
parent9e89327bdf29379e7d2ca6af75ffad273e8babba (diff)
downloadtcl-b549908df2d5c9b0dba0a55f14c53f2052afeb4b.zip
tcl-b549908df2d5c9b0dba0a55f14c53f2052afeb4b.tar.gz
tcl-b549908df2d5c9b0dba0a55f14c53f2052afeb4b.tar.bz2
Merge 9.0
Diffstat
-rw-r--r--.fossil-settings/crlf-glob2
-rw-r--r--.fossil-settings/encoding-glob4
-rw-r--r--.github/workflows/linux-build.yml51
-rw-r--r--.github/workflows/mac-build.yml63
-rw-r--r--.github/workflows/onefiledist.yml138
-rw-r--r--.github/workflows/win-build.yml85
-rw-r--r--.travis.yml53
-rw-r--r--ChangeLog.20012
-rw-r--r--README.md27
-rw-r--r--changes129
-rw-r--r--doc/ByteArrObj.35
-rw-r--r--doc/CrtChannel.35
-rw-r--r--doc/CrtTrace.32
-rw-r--r--doc/DumpActiveMemory.34
-rw-r--r--doc/FileSystem.310
-rw-r--r--doc/GetHostName.32
-rw-r--r--doc/GetStdChan.32
-rw-r--r--doc/GetTime.32
-rw-r--r--doc/Init.32
-rw-r--r--doc/IntObj.32
-rw-r--r--doc/NRE.38
-rw-r--r--doc/OpenFileChnl.38
-rw-r--r--doc/SaveResult.32
-rw-r--r--doc/SourceRCFile.32
-rw-r--r--doc/StdChannels.32
-rw-r--r--doc/StringObj.36
-rw-r--r--doc/TCL_MEM_DEBUG.34
-rw-r--r--doc/Tcl.n2
-rw-r--r--doc/ToUpper.32
-rw-r--r--doc/abstract.n2
-rw-r--r--doc/binary.n13
-rw-r--r--doc/callback.n2
-rw-r--r--doc/chan.n4
-rw-r--r--doc/class.n2
-rw-r--r--doc/classvariable.n2
-rw-r--r--doc/clock.n4
-rw-r--r--doc/copy.n2
-rw-r--r--doc/define.n2
-rw-r--r--doc/dict.n2
-rw-r--r--doc/encoding.n2
-rw-r--r--doc/exec.n15
-rw-r--r--doc/expr.n21
-rw-r--r--doc/fconfigure.n6
-rw-r--r--doc/file.n43
-rw-r--r--doc/filename.n4
-rw-r--r--doc/fpclassify.n8
-rw-r--r--doc/http.n28
-rw-r--r--doc/lindex.n2
-rw-r--r--doc/link.n2
-rw-r--r--doc/load.n5
-rw-r--r--doc/lpop.n2
-rw-r--r--doc/lrepeat.n2
-rw-r--r--doc/lreverse.n2
-rw-r--r--doc/lset.n2
-rw-r--r--doc/mathfunc.n6
-rw-r--r--doc/mathop.n2
-rw-r--r--doc/memory.n4
-rw-r--r--doc/msgcat.n2
-rw-r--r--doc/my.n2
-rw-r--r--doc/next.n2
-rw-r--r--doc/object.n2
-rw-r--r--doc/packagens.n2
-rw-r--r--doc/re_syntax.n25
-rw-r--r--doc/self.n2
-rw-r--r--doc/singleton.n2
-rw-r--r--doc/socket.n2
-rw-r--r--doc/tclsh.12
-rw-r--r--doc/tcltest.n1
-rw-r--r--doc/zipfs.n2
-rw-r--r--generic/regc_color.c2
-rw-r--r--generic/regc_cvec.c2
-rw-r--r--generic/regc_lex.c4
-rw-r--r--generic/regc_locale.c2
-rw-r--r--generic/regc_nfa.c2
-rw-r--r--generic/regcomp.c2
-rw-r--r--generic/rege_dfa.c2
-rw-r--r--generic/regerror.c2
-rw-r--r--generic/regexec.c2
-rw-r--r--generic/regfree.c2
-rw-r--r--generic/regfronts.c2
-rw-r--r--generic/tcl.decls66
-rw-r--r--generic/tcl.h63
-rw-r--r--generic/tclAlloc.c8
-rw-r--r--generic/tclAssembly.c12
-rw-r--r--generic/tclAsync.c4
-rw-r--r--generic/tclBasic.c48
-rw-r--r--generic/tclBinary.c82
-rw-r--r--generic/tclCkalloc.c6
-rw-r--r--generic/tclClock.c6
-rw-r--r--generic/tclCmdAH.c8
-rw-r--r--generic/tclCmdIL.c22
-rw-r--r--generic/tclCmdMZ.c176
-rw-r--r--generic/tclCompCmds.c20
-rw-r--r--generic/tclCompCmdsGR.c18
-rw-r--r--generic/tclCompCmdsSZ.c28
-rw-r--r--generic/tclCompExpr.c70
-rw-r--r--generic/tclCompile.c14
-rw-r--r--generic/tclConfig.c4
-rw-r--r--generic/tclDate.c2
-rw-r--r--generic/tclDecls.h170
-rw-r--r--generic/tclDictObj.c12
-rw-r--r--generic/tclDisassemble.c10
-rw-r--r--generic/tclEncoding.c10
-rw-r--r--generic/tclEnsemble.c10
-rw-r--r--generic/tclEnv.c4
-rw-r--r--generic/tclEvent.c6
-rw-r--r--generic/tclExecute.c87
-rw-r--r--generic/tclFCmd.c6
-rw-r--r--generic/tclFileName.c58
-rw-r--r--generic/tclGet.c4
-rw-r--r--generic/tclGetDate.y4
-rw-r--r--generic/tclHash.c4
-rw-r--r--generic/tclHistory.c4
-rw-r--r--generic/tclIO.c32
-rw-r--r--generic/tclIOCmd.c8
-rw-r--r--generic/tclIOGT.c20
-rw-r--r--generic/tclIORChan.c22
-rw-r--r--generic/tclIORTrans.c32
-rw-r--r--generic/tclIOSock.c2
-rw-r--r--generic/tclIOUtil.c40
-rw-r--r--generic/tclIndexObj.c20
-rw-r--r--generic/tclInt.decls741
-rw-r--r--generic/tclInt.h49
-rw-r--r--generic/tclIntDecls.h22
-rw-r--r--generic/tclIntPlatDecls.h372
-rw-r--r--generic/tclInterp.c14
-rw-r--r--generic/tclLink.c18
-rw-r--r--generic/tclListObj.c24
-rw-r--r--generic/tclLiteral.c20
-rw-r--r--generic/tclLoad.c101
-rw-r--r--generic/tclLoadNone.c50
-rw-r--r--generic/tclMain.c19
-rw-r--r--generic/tclNamesp.c12
-rw-r--r--generic/tclNotify.c6
-rw-r--r--generic/tclOO.c13
-rw-r--r--generic/tclOO.decls2
-rw-r--r--generic/tclOOBasic.c8
-rw-r--r--generic/tclOOCall.c2
-rw-r--r--generic/tclOODefineCmds.c12
-rw-r--r--generic/tclOOInfo.c2
-rw-r--r--generic/tclOOMethod.c20
-rw-r--r--generic/tclOOStubLib.c9
-rw-r--r--generic/tclObj.c72
-rw-r--r--generic/tclOptimize.c6
-rw-r--r--generic/tclPanic.c6
-rw-r--r--generic/tclParse.c18
-rw-r--r--generic/tclPathObj.c60
-rw-r--r--generic/tclPipe.c2
-rw-r--r--generic/tclPkg.c14
-rw-r--r--generic/tclPkgConfig.c5
-rw-r--r--generic/tclPlatDecls.h35
-rw-r--r--generic/tclPosixStr.c4
-rw-r--r--generic/tclPreserve.c4
-rw-r--r--generic/tclProc.c22
-rw-r--r--generic/tclProcess.c2
-rw-r--r--generic/tclRegexp.c10
-rw-r--r--generic/tclResolve.c2
-rw-r--r--generic/tclResult.c6
-rw-r--r--generic/tclScan.c2
-rw-r--r--generic/tclStrToD.c51
-rw-r--r--generic/tclStringObj.c180
-rw-r--r--generic/tclStubInit.c158
-rw-r--r--generic/tclStubLib.c13
-rw-r--r--generic/tclTest.c20
-rw-r--r--generic/tclTestObj.c25
-rw-r--r--generic/tclTestProcBodyObj.c10
-rw-r--r--generic/tclThread.c4
-rw-r--r--generic/tclThreadAlloc.c2
-rw-r--r--generic/tclThreadJoin.c2
-rw-r--r--generic/tclThreadStorage.c4
-rw-r--r--generic/tclThreadTest.c8
-rw-r--r--generic/tclTimer.c6
-rw-r--r--generic/tclTomMath.decls6
-rw-r--r--generic/tclTomMathDecls.h18
-rw-r--r--generic/tclTomMathInterface.c2
-rw-r--r--generic/tclTomMathStubLib.c4
-rw-r--r--generic/tclTrace.c16
-rw-r--r--generic/tclUniData.c2
-rw-r--r--generic/tclUtf.c17
-rw-r--r--generic/tclUtil.c38
-rw-r--r--generic/tclVar.c16
-rw-r--r--generic/tclZipfs.c83
-rw-r--r--generic/tclZlib.c31
-rw-r--r--library/auto.tcl214
-rw-r--r--library/clock.tcl2
-rw-r--r--library/cookiejar/cookiejar.tcl6
-rw-r--r--library/cookiejar/idna.tcl10
-rw-r--r--library/dde/pkgIndex.tcl2
-rw-r--r--library/history.tcl2
-rw-r--r--library/init.tcl14
-rw-r--r--library/install.tcl10
-rw-r--r--library/manifest.txt4
-rw-r--r--library/msgcat/msgcat.tcl6
-rw-r--r--library/opt/optparse.tcl2
-rw-r--r--library/package.tcl4
-rw-r--r--library/parray.tcl4
-rw-r--r--library/platform/pkgIndex.tcl2
-rw-r--r--library/platform/platform.tcl49
-rw-r--r--library/registry/pkgIndex.tcl (renamed from library/reg/pkgIndex.tcl)4
-rw-r--r--library/safe.tcl4
-rw-r--r--library/tcltest/pkgIndex.tcl2
-rw-r--r--library/tcltest/tcltest.tcl49
-rw-r--r--library/tm.tcl4
-rw-r--r--library/tzdata/Africa/Accra108
-rw-r--r--library/tzdata/Africa/Juba1
-rw-r--r--library/tzdata/Africa/Lagos7
-rw-r--r--library/tzdata/Africa/Nairobi9
-rw-r--r--library/tzdata/America/Belize47
-rw-r--r--library/tzdata/America/Grand_Turk3
-rw-r--r--library/tzdata/America/Nassau5
-rw-r--r--library/tzdata/Antarctica/Macquarie2
-rw-r--r--library/tzdata/Asia/Gaza216
-rw-r--r--library/tzdata/Asia/Hebron216
-rw-r--r--library/tzdata/Asia/Jerusalem56
-rw-r--r--library/tzdata/Atlantic/Bermuda29
-rw-r--r--library/tzdata/Australia/Adelaide10
-rw-r--r--library/tzdata/Australia/Brisbane10
-rw-r--r--library/tzdata/Australia/Broken_Hill10
-rw-r--r--library/tzdata/Australia/Currie274
-rw-r--r--library/tzdata/Australia/Darwin10
-rw-r--r--library/tzdata/Australia/Eucla8
-rw-r--r--library/tzdata/Australia/Hobart14
-rw-r--r--library/tzdata/Australia/Lindeman10
-rw-r--r--library/tzdata/Australia/Melbourne10
-rw-r--r--library/tzdata/Australia/Perth8
-rw-r--r--library/tzdata/Australia/Sydney10
-rw-r--r--library/tzdata/Europe/Volgograd1
-rw-r--r--library/tzdata/Indian/Mahe2
-rw-r--r--library/tzdata/Pacific/Efate4
-rw-r--r--library/word.tcl4
-rw-r--r--libtommath/tommath.h45
-rw-r--r--macosx/GNUmakefile4
-rw-r--r--macosx/Tcl-Common.xcconfig2
-rw-r--r--macosx/Tcl.xcode/project.pbxproj17
-rw-r--r--macosx/Tcl.xcodeproj/project.pbxproj19
-rw-r--r--macosx/tclMacOSXBundle.c4
-rw-r--r--macosx/tclMacOSXFCmd.c4
-rw-r--r--macosx/tclMacOSXNotify.c16
-rw-r--r--tests-perf/clock.perf.tcl2
-rw-r--r--tests-perf/test-performance.tcl2
-rw-r--r--tests-perf/timer-event.perf.tcl2
-rw-r--r--tests/aaa_exit.test6
-rw-r--r--tests/all.tcl5
-rw-r--r--tests/append.test10
-rw-r--r--tests/appendComp.test10
-rw-r--r--tests/apply.test10
-rw-r--r--tests/assemble.test4
-rw-r--r--tests/assocd.test8
-rw-r--r--tests/async.test10
-rw-r--r--tests/autoMkindex.test10
-rw-r--r--tests/basic.test8
-rw-r--r--tests/binary.test15
-rw-r--r--tests/chan.test2
-rw-r--r--tests/chanio.test45
-rw-r--r--tests/clock.test16
-rw-r--r--tests/cmdAH.test24
-rw-r--r--tests/cmdIL.test8
-rw-r--r--tests/cmdInfo.test8
-rw-r--r--tests/cmdMZ.test8
-rw-r--r--tests/compExpr-old.test10
-rw-r--r--tests/compExpr.test48
-rw-r--r--tests/compile.test14
-rw-r--r--tests/concat.test6
-rw-r--r--tests/config.test10
-rw-r--r--tests/coroutine.test4
-rw-r--r--tests/dcall.test8
-rw-r--r--tests/dict.test2
-rw-r--r--tests/dstring.test8
-rw-r--r--tests/encoding.test127
-rw-r--r--tests/env.test10
-rw-r--r--tests/error.test6
-rw-r--r--tests/eval.test6
-rw-r--r--tests/event.test8
-rw-r--r--tests/exec.test17
-rw-r--r--tests/execute.test40
-rw-r--r--tests/expr-old.test18
-rw-r--r--tests/expr.test80
-rw-r--r--tests/fCmd.test123
-rw-r--r--tests/fileName.test16
-rw-r--r--tests/fileSystem.test24
-rw-r--r--tests/fileSystemEncoding.test2
-rw-r--r--tests/for-old.test18
-rw-r--r--tests/for.test64
-rw-r--r--tests/foreach.test6
-rw-r--r--tests/format.test29
-rw-r--r--tests/get.test10
-rw-r--r--tests/history.test24
-rw-r--r--tests/http.test19
-rw-r--r--tests/httpcookie.test9
-rw-r--r--tests/httpd14
-rw-r--r--tests/httpd11.tcl2
-rw-r--r--tests/if-old.test6
-rw-r--r--tests/if.test52
-rw-r--r--tests/incr-old.test6
-rw-r--r--tests/incr.test4
-rw-r--r--tests/indexObj.test6
-rw-r--r--tests/info.test14
-rw-r--r--tests/init.test4
-rw-r--r--tests/internals.tcl2
-rw-r--r--tests/interp.test50
-rw-r--r--tests/io.test217
-rw-r--r--tests/ioCmd.test8
-rw-r--r--tests/ioTrans.test4
-rw-r--r--tests/iogt.test6
-rw-r--r--tests/join.test6
-rw-r--r--tests/lindex.test10
-rw-r--r--tests/link.test8
-rw-r--r--tests/linsert.test6
-rw-r--r--tests/list.test20
-rw-r--r--tests/listObj.test6
-rw-r--r--tests/llength.test6
-rw-r--r--tests/lmap.test8
-rw-r--r--tests/load.test150
-rw-r--r--tests/lpop.test6
-rw-r--r--tests/lrange.test8
-rw-r--r--tests/lrepeat.test2
-rw-r--r--tests/lreplace.test6
-rw-r--r--tests/lsearch.test8
-rw-r--r--tests/lset.test4
-rw-r--r--tests/lsetComp.test2
-rw-r--r--tests/macOSXFCmd.test2
-rw-r--r--tests/macOSXLoad.test4
-rw-r--r--tests/main.test84
-rw-r--r--tests/mathop.test10
-rw-r--r--tests/misc.test8
-rw-r--r--tests/msgcat.test4
-rw-r--r--tests/namespace-old.test10
-rw-r--r--tests/namespace.test6
-rw-r--r--tests/notify.test4
-rw-r--r--tests/nre.test4
-rw-r--r--tests/obj.test6
-rw-r--r--tests/oo.test34
-rw-r--r--tests/ooNext2.test4
-rw-r--r--tests/ooUtil.test6
-rw-r--r--tests/opt.test10
-rw-r--r--tests/package.test10
-rw-r--r--tests/parse.test30
-rw-r--r--tests/parseExpr.test14
-rw-r--r--tests/parseOld.test80
-rw-r--r--tests/pid.test6
-rw-r--r--tests/pkgMkIndex.test20
-rw-r--r--tests/platform.test4
-rw-r--r--tests/proc-old.test18
-rw-r--r--tests/proc.test46
-rw-r--r--tests/process.test2
-rw-r--r--tests/pwd.test11
-rw-r--r--tests/reg.test4
-rw-r--r--tests/regexp.test6
-rw-r--r--tests/regexpComp.test6
-rw-r--r--tests/registry.test10
-rw-r--r--tests/remote.tcl10
-rw-r--r--tests/rename.test8
-rw-r--r--tests/resolver.test6
-rw-r--r--tests/result.test6
-rw-r--r--tests/safe-stock.test4
-rw-r--r--tests/safe-stock86.test0
-rw-r--r--tests/safe-zipfs.test12
-rw-r--r--tests/safe.test23
-rw-r--r--tests/scan.test6
-rw-r--r--tests/security.test4
-rw-r--r--tests/set-old.test6
-rw-r--r--tests/set.test6
-rw-r--r--tests/socket.test34
-rw-r--r--tests/source.test6
-rw-r--r--tests/split.test6
-rw-r--r--tests/stack.test2
-rw-r--r--tests/string.test117
-rw-r--r--tests/stringObj.test6
-rw-r--r--tests/subst.test20
-rw-r--r--tests/switch.test6
-rw-r--r--tests/tailcall.test4
-rw-r--r--tests/tcltest.test10
-rw-r--r--tests/thread.test8
-rw-r--r--tests/timer.test4
-rw-r--r--tests/tm.test4
-rw-r--r--tests/trace.test12
-rw-r--r--tests/unixFCmd.test20
-rw-r--r--tests/unixFile.test6
-rw-r--r--tests/unixForkEvent.test4
-rw-r--r--tests/unixInit.test4
-rw-r--r--tests/unixNotfy.test4
-rw-r--r--tests/unknown.test6
-rw-r--r--tests/unload.test59
-rw-r--r--tests/uplevel.test8
-rw-r--r--tests/upvar.test8
-rw-r--r--tests/utf.test38
-rw-r--r--tests/util.test90
-rw-r--r--tests/var.test8
-rw-r--r--tests/while-old.test14
-rw-r--r--tests/while.test48
-rw-r--r--tests/winConsole.test2
-rw-r--r--tests/winDde.test18
-rw-r--r--tests/winFCmd.test83
-rw-r--r--tests/winFile.test8
-rw-r--r--tests/winNotify.test6
-rw-r--r--tests/winPipe.test10
-rw-r--r--tests/winTime.test12
-rw-r--r--tests/zipfs.test13
-rw-r--r--tests/zlib.test10
-rw-r--r--tools/Makefile.in67
-rwxr-xr-xtools/addVerToFile.tcl9
-rw-r--r--tools/checkLibraryDoc.tcl2
-rwxr-xr-xtools/configure2869
-rw-r--r--tools/configure.ac35
-rw-r--r--tools/encoding/big5.txt2
-rw-r--r--tools/encoding/gb2312.txt2
-rw-r--r--tools/eolFix.tcl80
-rw-r--r--tools/genStubs.tcl9
-rw-r--r--tools/index.tcl2
-rw-r--r--tools/installData.tcl6
-rw-r--r--tools/installVfs.tcl2
-rwxr-xr-xtools/loadICU.tcl2
-rw-r--r--tools/makeHeader.tcl4
-rw-r--r--tools/man2help.tcl141
-rw-r--r--tools/man2help2.tcl1033
-rw-r--r--tools/man2html.tcl185
-rw-r--r--tools/man2html1.tcl258
-rw-r--r--tools/man2html2.tcl927
-rw-r--r--tools/man2tcl.c424
-rw-r--r--tools/mkVfs.tcl4
-rw-r--r--tools/regexpTestLib.tcl4
-rw-r--r--tools/str2c59
-rw-r--r--tools/tcl.hpj.in19
-rwxr-xr-xtools/tclZIC.tcl6
-rw-r--r--tools/tcltk-man2html-utils.tcl338
-rwxr-xr-xtools/tcltk-man2html.tcl66
-rw-r--r--tools/uniParse.tcl6
-rw-r--r--unix/Makefile.in87
-rwxr-xr-xunix/configure6977
-rw-r--r--unix/configure.ac194
-rw-r--r--unix/dltest/pkga.c4
-rw-r--r--unix/dltest/pkgb.c8
-rw-r--r--unix/dltest/pkgc.c6
-rw-r--r--unix/dltest/pkgd.c8
-rw-r--r--unix/dltest/pkge.c2
-rw-r--r--unix/dltest/pkgooa.c4
-rw-r--r--unix/dltest/pkgua.c6
-rwxr-xr-xunix/installManPage2
-rw-r--r--unix/tcl.m4379
-rw-r--r--unix/tcl.pc.in1
-rw-r--r--unix/tcl.spec2
-rw-r--r--unix/tclConfig.h.in34
-rw-r--r--unix/tclEpollNotfy.c4
-rw-r--r--unix/tclKqueueNotfy.c4
-rw-r--r--unix/tclLoadAix.c4
-rw-r--r--unix/tclLoadDl.c30
-rw-r--r--unix/tclLoadDyld.c32
-rw-r--r--unix/tclLoadNext.c32
-rw-r--r--unix/tclLoadOSF.c32
-rw-r--r--unix/tclLoadShl.c32
-rw-r--r--unix/tclSelectNotfy.c2
-rw-r--r--unix/tclUnixChan.c18
-rw-r--r--unix/tclUnixCompat.c19
-rw-r--r--unix/tclUnixEvent.c2
-rw-r--r--unix/tclUnixFCmd.c16
-rw-r--r--unix/tclUnixFile.c6
-rw-r--r--unix/tclUnixInit.c15
-rw-r--r--unix/tclUnixNotfy.c4
-rw-r--r--unix/tclUnixPipe.c4
-rw-r--r--unix/tclUnixPort.h8
-rw-r--r--unix/tclUnixSock.c2
-rw-r--r--unix/tclUnixTest.c4
-rw-r--r--unix/tclUnixThrd.c6
-rw-r--r--unix/tclUnixTime.c16
-rw-r--r--unix/tclXtNotify.c2
-rw-r--r--unix/tclXtTest.c2
-rw-r--r--win/Makefile.in88
-rwxr-xr-xwin/buildall.vc.bat4
-rwxr-xr-xwin/configure3838
-rw-r--r--win/configure.ac102
-rw-r--r--win/makefile.vc157
-rw-r--r--win/nmakehlp.c9
-rw-r--r--win/rules-ext.vc2
-rw-r--r--win/rules.vc276
-rw-r--r--win/targets.vc2
-rw-r--r--win/tcl.dsp8
-rw-r--r--win/tcl.hpj.in19
-rw-r--r--win/tcl.m4124
-rw-r--r--win/tclAppInit.c8
-rw-r--r--win/tclWin32Dll.c18
-rw-r--r--win/tclWinChan.c18
-rw-r--r--win/tclWinConsole.c2
-rw-r--r--win/tclWinDde.c2
-rw-r--r--win/tclWinError.c4
-rw-r--r--win/tclWinFCmd.c8
-rw-r--r--win/tclWinFile.c44
-rw-r--r--win/tclWinInit.c24
-rw-r--r--win/tclWinInt.h9
-rw-r--r--win/tclWinLoad.c30
-rw-r--r--win/tclWinNotify.c2
-rw-r--r--win/tclWinPanic.c2
-rw-r--r--win/tclWinPipe.c8
-rw-r--r--win/tclWinPort.h48
-rw-r--r--win/tclWinReg.c2
-rw-r--r--win/tclWinSerial.c2
-rw-r--r--win/tclWinSock.c2
-rw-r--r--win/tclWinTest.c2
-rw-r--r--win/tclWinThrd.c10
-rw-r--r--win/tclWinTime.c94
-rw-r--r--win/tclsh.exe.manifest.in2
500 files changed, 11739 insertions, 16904 deletions
diff --git a/.fossil-settings/crlf-glob b/.fossil-settings/crlf-glob
index ebd0093..67a33c2 100644
--- a/.fossil-settings/crlf-glob
+++ b/.fossil-settings/crlf-glob
@@ -7,7 +7,6 @@ compat/zlib/win64/*.txt
libtommath/*.dsp
libtommath/*.sln
libtommath/*.vcproj
-tools/tcl.hpj.in
tools/tcl.wse.in
win/buildall.vc.bat
win/coffbase.txt
@@ -17,4 +16,3 @@ win/rules-ext.vc
win/targets.vc
win/tcl.dsp
win/tcl.dsw
-win/tcl.hpj.in
diff --git a/.fossil-settings/encoding-glob b/.fossil-settings/encoding-glob
index 8582dd4..28ce243 100644
--- a/.fossil-settings/encoding-glob
+++ b/.fossil-settings/encoding-glob
@@ -1,9 +1,7 @@
-tools/tcl.hpj.in
tools/tcl.wse.in
win/buildall.vc.bat
win/coffbase.txt
win/makefile.vc
win/rules.vc
win/tcl.dsp
-win/tcl.dsw
-win/tcl.hpj.in \ No newline at end of file
+win/tcl.dsw \ No newline at end of file
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml
new file mode 100644
index 0000000..92e17b6
--- /dev/null
+++ b/.github/workflows/linux-build.yml
@@ -0,0 +1,51 @@
+name: Linux
+on: [push]
+jobs:
+ gcc:
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ cfgopt:
+ - ""
+ - "CFLAGS=-DTCL_NO_DEPRECATED=1"
+ - "CFLAGS=-DTCL_UTF_MAX=3"
+ - "--disable-shared"
+ - "--enable-symbols"
+ - "--enable-symbols=mem"
+ defaults:
+ run:
+ shell: bash
+ working-directory: unix
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Prepare
+ run: |
+ touch tclStubInit.c tclOOStubInit.c tclOOScript.h
+ working-directory: generic
+ - name: Configure ${{ matrix.cfgopt }}
+ run: |
+ mkdir "${HOME}/install dir"
+ ./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
+ env:
+ CFGOPT: ${{ matrix.cfgopt }}
+ - name: Build
+ run: |
+ make all
+ - name: Build Test Harness
+ run: |
+ make tcltest
+ - name: Run Tests
+ run: |
+ make test
+ env:
+ ERROR_ON_FAILURES: 1
+ - name: Test-Drive Installation
+ run: |
+ make install
+ - name: Create Distribution Package
+ run: |
+ make dist
+ - name: Convert Documentation to HTML
+ run: |
+ make html-tcl
diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml
new file mode 100644
index 0000000..bf3c420
--- /dev/null
+++ b/.github/workflows/mac-build.yml
@@ -0,0 +1,63 @@
+name: macOS
+on: [push]
+jobs:
+ xcode:
+ runs-on: macos-11.0
+ defaults:
+ run:
+ shell: bash
+ working-directory: macosx
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Prepare
+ run: |
+ touch tclStubInit.c tclOOStubInit.c tclOOScript.h
+ working-directory: generic
+ - name: Build
+ run: make all
+ env:
+ CFLAGS: -arch x86_64 -arch arm64e
+ - name: Run Tests
+ run: make test styles=develop
+ env:
+ ERROR_ON_FAILURES: 1
+ MAC_CI: 1
+ clang:
+ runs-on: macos-11.0
+ strategy:
+ matrix:
+ cfgopt:
+ - ""
+ - "--disable-shared"
+ - "--enable-symbols"
+ - "--enable-symbols=mem"
+ defaults:
+ run:
+ shell: bash
+ working-directory: unix
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Prepare
+ run: |
+ touch tclStubInit.c tclOOStubInit.c tclOOScript.h
+ mkdir "$HOME/install dir"
+ working-directory: generic
+ - name: Configure ${{ matrix.cfgopt }}
+ # Note that macOS is always a 64 bit platform
+ run: ./configure --enable-64bit --enable-dtrace --enable-framework ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1)
+ env:
+ CFLAGS: -arch x86_64 -arch arm64e
+ CFGOPT: ${{ matrix.cfgopt }}
+ - name: Build
+ run: |
+ make all tcltest
+ env:
+ CFLAGS: -arch x86_64 -arch arm64e
+ - name: Run Tests
+ run: |
+ make test
+ env:
+ ERROR_ON_FAILURES: 1
+ MAC_CI: 1
diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml
new file mode 100644
index 0000000..a60428d
--- /dev/null
+++ b/.github/workflows/onefiledist.yml
@@ -0,0 +1,138 @@
+name: Build Binaries
+on: [push]
+jobs:
+ linux:
+ name: Linux
+ runs-on: ubuntu-16.04
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Prepare
+ run: |
+ touch generic/tclStubInit.c generic/tclOOStubInit.c
+ mkdir 1dist
+ echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
+ working-directory: .
+ - name: Configure
+ run: ./configure --disable-symbols --disable-shared --enable-zipfs
+ working-directory: unix
+ - name: Build
+ run: |
+ make tclsh
+ make shell SCRIPT="$VER_PATH $GITHUB_ENV"
+ echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
+ working-directory: unix
+ - name: Package
+ run: |
+ cp ../unix/tclsh tclsh${TCL_PATCHLEVEL}_unofficial
+ chmod +x tclsh${TCL_PATCHLEVEL}_unofficial
+ tar -cf tclsh${TCL_PATCHLEVEL}_unofficial.tar tclsh${TCL_PATCHLEVEL}_unofficial
+ working-directory: 1dist
+ - name: Upload
+ uses: actions/upload-artifact@v2
+ with:
+ name: Tclsh ${{ env.TCL_PATCHLEVEL }} Linux single-file build (unofficial)
+ path: 1dist/*.tar
+ macos:
+ name: macOS
+ runs-on: macos-11.0
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Checkout create-dmg
+ uses: actions/checkout@v2
+ with:
+ repository: create-dmg/create-dmg
+ ref: v1.0.8
+ path: create-dmg
+ - name: Prepare
+ run: |
+ mkdir 1dist
+ touch generic/tclStubInit.c generic/tclOOStubInit.c || true
+ wget https://github.com/culler/macher/releases/download/v1.3/macher
+ sudo cp macher /usr/local/bin
+ sudo chmod a+x /usr/local/bin/macher
+ echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
+ echo "CREATE_DMG=$(cd create-dmg;pwd)/create-dmg" >> $GITHUB_ENV
+ echo "CFLAGS=-arch x86_64 -arch arm64e" >> $GITHUB_ENV
+ - name: Configure
+ run: ./configure --disable-symbols --disable-shared --enable-zipfs
+ working-directory: unix
+ - name: Build
+ run: |
+ make tclsh
+ make shell SCRIPT="$VER_PATH $GITHUB_ENV"
+ echo "TCL_BIN=`pwd`/tclsh" >> $GITHUB_ENV
+ echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
+ working-directory: unix
+ - name: Package
+ run: |
+ mkdir contents
+ cp $TCL_BIN contents/tclsh${TCL_PATCHLEVEL}_unofficial
+ chmod +x contents/tclsh${TCL_PATCHLEVEL}_unofficial
+ cat > contents/README.txt <<EOF
+ This is a single-file executable developer preview of Tcl $TCL_PATCHLEVEL
+
+ It is not intended as an official release at all, so it is unsigned and unnotarized.
+ Use strictly at your own risk.
+
+ To run it, you need to copy the executable out and run:
+ xattr -d com.apple.quarantine tclsh${TCL_PATCHLEVEL}_unofficial
+ to mark the executable as runnable on your machine.
+ EOF
+ $CREATE_DMG \
+ --volname "Tcl $TCL_PATCHLEVEL (unofficial)" \
+ --window-pos 200 120 \
+ --window-size 800 400 \
+ "Tcl-$TCL_PATCHLEVEL-(unofficial).dmg" \
+ "contents/"
+ working-directory: 1dist
+ - name: Upload
+ uses: actions/upload-artifact@v2
+ with:
+ name: Tclsh ${{ env.TCL_PATCHLEVEL }} macOS single-file build (unofficial)
+ path: 1dist/*.dmg
+ win:
+ name: Windows
+ runs-on: windows-latest
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Install MSYS2
+ uses: msys2/setup-msys2@v2
+ - name: Prepare
+ run: |
+ touch generic/tclStubInit.c generic/tclOOStubInit.c
+ echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
+ mkdir 1dist
+ working-directory: .
+ - name: Configure
+ run: ./configure --disable-symbols --disable-shared --enable-zipfs
+ working-directory: win
+ - name: Build
+ run: |
+ make binaries libraries
+ echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
+ working-directory: win
+ - name: Get Exact Version
+ run: |
+ ./tclsh*.exe $VER_PATH $GITHUB_ENV
+ working-directory: win
+ - name: Set Executable Name
+ run: |
+ cp ../win/tclsh*.exe tclsh${TCL_PATCHLEVEL}_unofficial.exe
+ working-directory: 1dist
+ - name: Upload
+ uses: actions/upload-artifact@v2
+ with:
+ name: Tclsh ${{ env.TCL_PATCHLEVEL }} Windows single-file build (unofficial)
+ path: '1dist/*_unofficial.exe'
diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml
new file mode 100644
index 0000000..5148a47
--- /dev/null
+++ b/.github/workflows/win-build.yml
@@ -0,0 +1,85 @@
+name: Windows
+on: [push]
+jobs:
+ msvc:
+ runs-on: windows-latest
+ defaults:
+ run:
+ shell: powershell
+ working-directory: win
+ strategy:
+ matrix:
+ cfgopt:
+ - ""
+ - "CHECKS=nodep"
+ - "OPTS=static"
+ - "OPTS=symbols"
+ - "OPTS=memdbg"
+ # Using powershell means we need to explicitly stop on failure
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Init MSVC
+ uses: ilammy/msvc-dev-cmd@v1
+ - name: Build ${{ matrix.cfgopt }}
+ run: |
+ &nmake -f makefile.vc ${{ matrix.cfgopt }} all
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ - name: Build Test Harness ${{ matrix.cfgopt }}
+ run: |
+ &nmake -f makefile.vc ${{ matrix.cfgopt }} tcltest
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ - name: Run Tests ${{ matrix.cfgopt }}
+ run: |
+ &nmake -f makefile.vc ${{ matrix.cfgopt }} test
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ env:
+ ERROR_ON_FAILURES: 1
+ CI_BUILD_WITH_MSVC: 1
+ gcc:
+ runs-on: windows-latest
+ defaults:
+ run:
+ shell: bash
+ working-directory: win
+ strategy:
+ matrix:
+ cfgopt:
+ - ""
+ - "CFLAGS=-DTCL_NO_DEPRECATED=1"
+ - "--disable-shared"
+ - "--enable-symbols"
+ - "--enable-symbols=mem"
+ # Using powershell means we need to explicitly stop on failure
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Install MSYS2 and Make
+ run: choco install msys2 make
+ - name: Prepare
+ run: |
+ touch tclStubInit.c tclOOStubInit.c tclOOScript.h
+ mkdir "${HOME}/install dir"
+ working-directory: generic
+ - name: Configure ${{ matrix.cfgopt }}
+ run: |
+ ./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
+ env:
+ CFGOPT: --enable-64bit ${{ matrix.cfgopt }}
+ - name: Build
+ run: make all
+ - name: Build Test Harness
+ run: make tcltest
+ - name: Run Tests
+ run: make test
+ env:
+ ERROR_ON_FAILURES: 1
+
+# If you add builds with Wine, be sure to define the environment variable
+# CI_USING_WINE when running them so that broken tests know not to run.
diff --git a/.travis.yml b/.travis.yml
index fc318c2..99b692d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,14 +55,6 @@ jobs:
env:
- BUILD_DIR=unix
- CFGOPT="--enable-symbols=mem"
-# C++ build.
- - name: "Linux/G++/Shared"
- os: linux
- dist: focal
- compiler: g++
- env:
- - BUILD_DIR=unix
- - CFGOPT="CC=g++ CFLAGS=-Dregister=dont+use+register"
# Newer/Older versions of GCC
- name: "Linux/GCC 10/Shared"
os: linux
@@ -140,14 +132,6 @@ jobs:
homebrew:
packages:
- libtommath
- - name: "macOS/Clang++/Xcode 12/Shared"
- os: osx
- osx_image: xcode12.2
- env:
- - BUILD_DIR=unix
- - CFGOPT="CC=clang++ --enable-framework --enable-dtrace CFLAGS=-Dregister=dont+use+register CPPFLAGS=-D__private_extern__=extern"
- script:
- - make all tcltest
# Newer MacOS versions
- name: "macOS/Clang/Xcode 12/Universal Apps/Shared"
os: osx
@@ -217,7 +201,6 @@ jobs:
- BUILD_DIR=win
- VCDIR="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"
before_install: &vcpreinst
- - rm -rf tests/safe-stock8*.test
- touch generic/tclStubInit.c generic/tclOOStubInit.c generic/tclOOScript.h
- PATH="$PATH:$VCDIR"
- cd ${BUILD_DIR}
@@ -232,8 +215,8 @@ jobs:
before_install: *vcpreinst
install: []
script:
- - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=nodep' '-f' makefile.vc all tcltest
- - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=nodep' '-f' makefile.vc test
+ - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'CHECKS=nodep' '-f' makefile.vc all tcltest
+ - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'CHECKS=nodep' '-f' makefile.vc test
- name: "Windows/MSVC/Static"
os: windows
compiler: cl
@@ -241,8 +224,8 @@ jobs:
before_install: *vcpreinst
install: []
script:
- - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc all tcltest
- - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc test
+ - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static' '-f' makefile.vc all tcltest
+ - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static' '-f' makefile.vc test
- name: "Windows/MSVC/Debug"
os: windows
compiler: cl
@@ -278,8 +261,8 @@ jobs:
before_install: *vcpreinst
install: []
script:
- - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=nodep' '-f' makefile.vc all tcltest
- - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=nodep' '-f' makefile.vc test
+ - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'CHECKS=nodep' '-f' makefile.vc all tcltest
+ - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'CHECKS=nodep' '-f' makefile.vc test
- name: "Windows/MSVC-x86/Static"
os: windows
compiler: cl
@@ -287,8 +270,8 @@ jobs:
before_install: *vcpreinst
install: []
script:
- - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc all tcltest
- - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,msvcrt' '-f' makefile.vc test
+ - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static' '-f' makefile.vc all tcltest
+ - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static' '-f' makefile.vc test
- name: "Windows/MSVC-x86/Debug"
os: windows
compiler: cl
@@ -315,7 +298,6 @@ jobs:
- BUILD_DIR=win
- CFGOPT="--enable-64bit"
before_install: &makepreinst
- - rm -rf tests/safe-stock8*.test
- touch generic/tclStubInit.c generic/tclOOStubInit.c generic/tclOOScript.h
- choco install -y make zip
- cd ${BUILD_DIR}
@@ -333,15 +315,6 @@ jobs:
- BUILD_DIR=win
- CFGOPT="--enable-64bit CFLAGS=-DTCL_NO_DEPRECATED=1"
before_install: *makepreinst
- - name: "Windows/G++/Shared"
- os: windows
- compiler: g++
- env:
- - BUILD_DIR=win
- - CFGOPT="CC=g++ --enable-64bit"
- before_install: *makepreinst
- script:
- - make all tcltest
- name: "Windows/GCC/Static"
os: windows
compiler: gcc
@@ -384,15 +357,6 @@ jobs:
- BUILD_DIR=win
- CFGOPT="CFLAGS=-DTCL_NO_DEPRECATED=1"
before_install: *makepreinst
- - name: "Windows/G++-x86/Shared"
- os: windows
- compiler: g++
- env:
- - BUILD_DIR=win
- - CFGOPT="CC=g++"
- before_install: *makepreinst
- script:
- - make all tcltest
- name: "Windows/GCC-x86/Static"
os: windows
compiler: gcc
@@ -424,7 +388,6 @@ jobs:
script:
- make dist
before_install:
- - rm -rf tests/safe-stock8*.test
- touch generic/tclStubInit.c generic/tclOOStubInit.c generic/tclOOScript.h
- cd ${BUILD_DIR}
install:
diff --git a/ChangeLog.2001 b/ChangeLog.2001
index 9d6d541..5fdff46 100644
--- a/ChangeLog.2001
+++ b/ChangeLog.2001
@@ -3525,7 +3525,7 @@
* generic/tclVar.c (Tcl_UnsetObjCmd): Rewrote argument parser to avoid
a read off the end of the argument array that could occur when
executing something like [unset -nocomplain] was executed. Improved
- the error message given when too few arguments are given (-nocomplain
+ the error message given when not enough arguments are given (-nocomplain
should obviously be *before* --, not after it) and also modified the
test suite to take account of that and the documentation to use the
same improvement. [Bug 405769]
diff --git a/README.md b/README.md
index 466cb21..875c7ba 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,20 @@ This is the **Tcl 9.0a2** source distribution.
You can get any source release of Tcl from [our distribution
site](https://sourceforge.net/projects/tcl/files/Tcl/).
-[![Build Status](https://travis-ci.org/tcltk/tcl.svg?branch=master)](https://travis-ci.org/tcltk/tcl)
+8.6 (production release, daily build)
+[![Build Status](https://github.com/tcltk/tcl/workflows/Linux/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-6-branch)
+[![Build Status](https://github.com/tcltk/tcl/workflows/Windows/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-6-branch)
+[![Build Status](https://github.com/tcltk/tcl/workflows/macOS/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-6-branch)
+<br>
+8.7 (in development, daily build))
+[![Build Status](https://github.com/tcltk/tcl/workflows/Linux/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-branch)
+[![Build Status](https://github.com/tcltk/tcl/workflows/Windows/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-branch)
+[![Build Status](https://github.com/tcltk/tcl/workflows/macOS/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-branch)
+<br>
+9.0 (in development, daily build))
+[![Build Status](https://github.com/tcltk/tcl/workflows/Linux/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Amain)
+[![Build Status](https://github.com/tcltk/tcl/workflows/Windows/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Amain)
+[![Build Status](https://github.com/tcltk/tcl/workflows/macOS/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Amain)
## Contents
1. [Introduction](#intro)
@@ -29,19 +42,19 @@ powerful command languages for applications.
Tcl is maintained, enhanced, and distributed freely by the Tcl community.
Source code development and tracking of bug reports and feature requests
-takes place at [core.tcl-lang.org](https://core.tcl-lang.org/).
+take place at [core.tcl-lang.org](https://core.tcl-lang.org/).
Tcl/Tk release and mailing list services are [hosted by
SourceForge](https://sourceforge.net/projects/tcl/)
with the Tcl Developer Xchange hosted at
[www.tcl-lang.org](https://www.tcl-lang.org).
-Tcl is a freely available open source package. You can do virtually
+Tcl is a freely available open-source package. You can do virtually
anything you like with it, such as modifying it, redistributing it,
and selling it either in whole or in part. See the file
`license.terms` for complete information.
## <a id="doc">2.</a> Documentation
-Extensive documentation is available at our website.
+Extensive documentation is available on our website.
The home page for this release, including new features, is
[here](https://www.tcl.tk/software/tcltk/9.0.html).
Detailed release notes can be found at the
@@ -88,16 +101,16 @@ about building Tcl from sources
[online](https://www.tcl-lang.org/doc/howto/compile.html).
## <a id="devtools">4.</a> Development tools
-ActiveState produces a high quality set of commercial quality development
+ActiveState produces a high-quality set of commercial quality development
tools that is available to accelerate your Tcl application development.
Tcl Dev Kit builds on the earlier TclPro toolset and provides a debugger,
-static code checker, single-file wrapping utility, bytecode compiler and
+static code checker, single-file wrapping utility, bytecode compiler, and
more. More information can be found at
http://www.ActiveState.com/Tcl
## <a id="complangtcl">5.</a> Tcl newsgroup
-There is a USENET news group, "`comp.lang.tcl`", intended for the exchange of
+There is a USENET newsgroup, "`comp.lang.tcl`", intended for the exchange of
information about Tcl, Tk, and related applications. The newsgroup is a
great place to ask general information questions. For bug reports, please
see the "Support and bug fixes" section below.
diff --git a/changes b/changes
index c8080d1..569c7f0 100644
--- a/changes
+++ b/changes
@@ -8992,6 +8992,135 @@ in this changeset (new minor version) rather than bug fixes:
- Released 8.6.10, Nov 21, 2019 - details at http://core.tcl-lang.org/tcl/ -
+2019-12-03 (bug)[3cd9be] Corner case in surrogate handling (nijtmans)
+
+2019-12-09 (new) Add tcltest::(Setup|Eval|Cleanup|)Test (coulter,sebres)
+=> tcltest 2.5.2
+
+2019-12-12 (new) Add 3 libtommath functions to stub table (nijtmans)
+
+2019-12-23 (bug)[ce3b9f] compilation errors with clang, windows msys2 (nijtmans)
+
+2019-12-27 (bug)[1de6b0] [expr 1e2147483648] => 0.0 (kbk)
+
+2020-01-04 (bug)[912886] tis-620 encoding fails to load (coulter)
+
+2020-01-13 (bug)[0b9332] Win: support system encoding init to utf-8 (jedlička)
+
+2020-01-17 (bug)[8cd2fe] [unload] corrupted list of loaded packages (berc)
+
+2020-01-17 (bug)[5d989f] segfault in lsort for large list length (sebres)
+
+2020-01-30 (bug) Reset WSAGetLastError()/errno in channel close (nijtmans)
+
+2020-02-17 (bug) Win: avoid create of legacy error-vars on init phase (sebres)
+
+2020-02-25 (bug) release refs when setting class's superclasses fails (dkf)
+
+2020-02-26 (bug) C++ compiler compatibility for registry and dde (nijtmans)
+=> registry 1.4.3
+=> dde 1.3.5
+
+2020-03-05 (new) Update to Unicode-13 (nijtmans)
+
+2020-03-16 (bug)[8f89e2] Win: env var encoding, env-2.5 (sebres, nijtmans)
+
+2020-03-27 (bug)[767e07] Tcl_Get(Range|UniChar) validate index inputs (nijtmans)
+
+2020-03-28 (bug)[8edfce] [binary encode base64] & multi-byte wrapchars (dgp)
+
+2020-03-28 (bug)[ffeb20] [binary decode base64] ignore invalid chars (dgp)
+See RFC 2045
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2020-03-31 (bug)[b8e82d] some -maxlen values break uuencode round trip (dgp)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2020-04-01 (bug)[f58371] Fileevent run in proper thread (bron,sebres)
+
+2020-04-13 (bug)[afa4b2] TclNeedSpace bug; tests util-8.5 .. util-8.11 (dgp)
+
+2020-04-13 (bug)[085913] Tcl_DStringAppendElement # quoting precision (dgp)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2020-04-13 (bug)[a7f685] test util-5.52 (dgp)
+
+2020-04-13 (bug)[c61818] Tcl_UtfPrev regression (dgp)
+
+2020-04-15 (bug)[8af92d] zlib transform issue, bad inflate (sebres)
+
+2020-04-16 (bug)[5e6346] Tcl_UtfPrev handling of overlong sequences (dgp)
+
+2020-04-27 (bug)[45ca23] [string tolower] inconsistency (dgp)
+
+2020-04-30 (bug)[da2352] init [info hostname] with DNS, not NetBIOS (nadkarni)
+
+2020-05-11 (bug)[d402ff] Win32 potential crash when using main() (werner)
+
+2020-05-13 (bug)[81242a] revised documentation for Tcl_UtfAtIndex() (nijtmans)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2020-05-13 (bug)[ed2980] Tcl_UtfToUniChar reads > TCL_UTF_MAX bytes (nijtmans)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2020-06-02 (bug) prevent segfault in parser (sebres)
+
+2020-06-21 (bug)[f81bec] http POST a binary file (alakendu,nash)
+=> http 2.9.2
+
+2020-06-23 (bug)[41c985] auto_path nonsense in Safe Base (nash)
+
+2020-06-24 (bug)[f70ce1] zlib multi-stream inflate acts only on first (sebres)
+
+2020-07-09 (bug)[a1bd37] [clock scan] new ISO format (clock-34.(19-24)) (sebres)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2020-07-10 (bug)[501974] [clock scan] +time zone (clock-34.(53-68)) (sebres)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2020-07-15 (bug)[3c6e47] compiled [lappend] performance, avoid copy (sebres)
+
+2020-07-16 (bug)[5bbd04] Fix index underflow (schwab)
+
+2020-07-27 (bug)[cb0373] http::geturl -keepalive fixes (nash)
+=> http 2.9.3
+
+2020-08-10 (bug)[29e884] cmd resolution cycle (namespace-57.0) (coulter,sebres)
+
+2020-08-12 (bug)[e87000] Tcl_BadChannelOption tolerate NULL (werner,nijtmans)
+
+2020-08-31 (TIP #581) disfavor Master/Slave terminology (nijtmans)
+=> opt 0.4.8
+
+2020-09-11 (bug)[3bc0f4] UBSan complains about body.chars[] usage (nijtmans)
+
+2020-09-17 (bug)[835c93] Support TIP 525 exit code for -singleproc 1 (nijtmans)
+=> tcltest 2.5.3
+
+2020-09-25 (new) force -eofchar \032 when evaluating library scripts (nijtmans)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2020-09-29 (bug)[0063cb] http::geturl -headers must be dict (oehlmann,nijtmans)
+
+2020-10-19 (bug)[cb4582] Update install-sh script (stu,nijtmans)
+
+2020-10-22 (bug)[c97593] Usage of gnu_printf in latest mingw-w64 (nijtmans)
+
+2020-10-26 (new)[48898a] improve error message consistency (stu)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2020-11-06 (new) revised case of module names (nijtmans)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2020-12-10 (bug)[ed5be7] Win: recognize "comx:" as serial port (oehlmann)
+
+2020-12-11 (new) support for msys2, Big Sur (nijtmans)
+=> platform 1.0.15
+
+2020-12-23 tzdata updated to Olson's tzdata2020e (jima)
+
+- Released 8.6.11, Dec 31, 2020 - details at http://core.tcl-lang.org/tcl/ -
+
Changes to 8.7a3 include all changes to the 8.6 line through 8.6.10,
plus the following, which focuses on the high-level feature changes
in this changeset (new minor version) rather than bug fixes:
diff --git a/doc/ByteArrObj.3 b/doc/ByteArrObj.3
index d6947eb..7e75dde 100644
--- a/doc/ByteArrObj.3
+++ b/doc/ByteArrObj.3
@@ -37,8 +37,9 @@ byte-array type. For \fBTcl_GetByteArrayFromObj\fR and
\fBTcl_SetByteArrayLength\fR, this points to the value from which to get
the byte-array value; if \fIobjPtr\fR does not already point to a byte-array
value, it will be converted to one.
-.AP int *lengthPtr out
-If non-NULL, filled with the length of the array of bytes in the value.
+.AP size_t | int *lengthPtr out
+Filled with the length of the array of bytes in the value.
+May be (int *)NULL when not used.
.BE
.SH DESCRIPTION
diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3
index 9edb782..299bc29 100644
--- a/doc/CrtChannel.3
+++ b/doc/CrtChannel.3
@@ -253,7 +253,8 @@ outside this range, \fBTcl_SetChannelBufferSize\fR sets the buffer size to
the generic layer that the events specified by \fImask\fR have
occurred on the channel. Channel drivers are responsible for invoking
this function whenever the channel handlers need to be called for the
-channel. See \fBWATCHPROC\fR below for more details.
+channel (or other pending tasks like a write flush should be performed).
+See \fBWATCHPROC\fR below for more details.
.PP
\fBTcl_BadChannelOption\fR is called from driver specific
\fIsetOptionProc\fR or \fIgetOptionProc\fR to generate a complete
@@ -761,7 +762,7 @@ length. It can be NULL.
.CS
typedef int \fBTcl_DriverTruncateProc\fR(
void *\fIinstanceData\fR,
- Tcl_WideInt \fIlength\fR);
+ long long \fIlength\fR);
.CE
.PP
\fIInstanceData\fR is the same as the value passed to
diff --git a/doc/CrtTrace.3 b/doc/CrtTrace.3
index fbce7e1..888c462 100644
--- a/doc/CrtTrace.3
+++ b/doc/CrtTrace.3
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1989-1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
-'\" Copyright (c) 2002 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
+'\" Copyright (c) 2002 Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/doc/DumpActiveMemory.3 b/doc/DumpActiveMemory.3
index ab75ad2..0e162bb 100644
--- a/doc/DumpActiveMemory.3
+++ b/doc/DumpActiveMemory.3
@@ -1,6 +1,6 @@
'\"
-'\" Copyright (c) 1992-1999 Karl Lehenbauer and Mark Diekhans.
-'\" Copyright (c) 2000 by Scriptics Corporation.
+'\" Copyright (c) 1992-1999 Karl Lehenbauer & Mark Diekhans.
+'\" Copyright (c) 2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH "Tcl_DumpActiveMemory" 3 8.1 Tcl "Tcl Library Procedures"
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3
index eb388a2..ffb09f2 100644
--- a/doc/FileSystem.3
+++ b/doc/FileSystem.3
@@ -144,16 +144,16 @@ Tcl_Obj *
Tcl_StatBuf *
\fBTcl_AllocStatBuf\fR()
.sp
-Tcl_WideInt
+long long
\fBTcl_GetAccessTimeFromStat\fR(\fIstatPtr\fR)
.sp
unsigned
\fBTcl_GetBlockSizeFromStat\fR(\fIstatPtr\fR)
.sp
-Tcl_WideUInt
+unsigned long long
\fBTcl_GetBlocksFromStat\fR(\fIstatPtr\fR)
.sp
-Tcl_WideInt
+long long
\fBTcl_GetChangeTimeFromStat\fR(\fIstatPtr\fR)
.sp
int
@@ -174,10 +174,10 @@ int
unsigned
\fBTcl_GetModeFromStat\fR(\fIstatPtr\fR)
.sp
-Tcl_WideInt
+long long
\fBTcl_GetModificationTimeFromStat\fR(\fIstatPtr\fR)
.sp
-Tcl_WideUInt
+unsigned long long
\fBTcl_GetSizeFromStat\fR(\fIstatPtr\fR)
.sp
int
diff --git a/doc/GetHostName.3 b/doc/GetHostName.3
index 73432d3..8e43f8e 100644
--- a/doc/GetHostName.3
+++ b/doc/GetHostName.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tcl_GetHostName 3 8.3 Tcl "Tcl Library Procedures"
diff --git a/doc/GetStdChan.3 b/doc/GetStdChan.3
index be0e79f..3472fee 100644
--- a/doc/GetStdChan.3
+++ b/doc/GetStdChan.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1996 by Sun Microsystems, Inc.
+'\" Copyright (c) 1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/doc/GetTime.3 b/doc/GetTime.3
index 4bb3759..4aa8442 100644
--- a/doc/GetTime.3
+++ b/doc/GetTime.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 2001 by Kevin B. Kenny <kennykb@acm.org>.
+'\" Copyright (c) 2001 Kevin B. Kenny <kennykb@acm.org>.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/doc/Init.3 b/doc/Init.3
index 0a6635e..d9fc2e1 100644
--- a/doc/Init.3
+++ b/doc/Init.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tcl_Init 3 8.0 Tcl "Tcl Library Procedures"
diff --git a/doc/IntObj.3 b/doc/IntObj.3
index e793303..36bfa7d 100644
--- a/doc/IntObj.3
+++ b/doc/IntObj.3
@@ -102,7 +102,7 @@ are provided by the C language standard. The \fBTcl_WideInt\fR type is a
typedef defined to be whatever signed integral type covers at least the
64-bit integer range (-9223372036854775808 to 9223372036854775807). Depending
on the platform and the C compiler, the actual type might be
-\fBlong long int\fR, \fB__int64\fR, or something else.
+\fBlong long int\fR, or something else.
The \fBmp_int\fR type is a multiple-precision integer type defined
by the LibTomMath multiple-precision integer library.
.PP
diff --git a/doc/NRE.3 b/doc/NRE.3
index f4d6a95..d74781b 100644
--- a/doc/NRE.3
+++ b/doc/NRE.3
@@ -1,6 +1,6 @@
.\"
-.\" Copyright (c) 2008 by Kevin B. Kenny.
-.\" Copyright (c) 2018 by Nathan Coulter.
+.\" Copyright (c) 2008 Kevin B. Kenny.
+.\" Copyright (c) 2018 Nathan Coulter.
.\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -232,5 +232,5 @@ Tcl_CreateCommand(3), Tcl_CreateObjCommand(3), Tcl_EvalObjEx(3), Tcl_GetCommandF
.SH KEYWORDS
stackless, nonrecursive, execute, command, global, value, result, script
.SH COPYRIGHT
-Copyright (c) 2008 by Kevin B. Kenny.
-Copyright (c) 2018 by Nathan Coulter.
+Copyright \(co 2008 Kevin B. Kenny.
+Copyright \(co 2018 Nathan Coulter.
diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3
index d48a35c..23b0863 100644
--- a/doc/OpenFileChnl.3
+++ b/doc/OpenFileChnl.3
@@ -92,10 +92,10 @@ int
int
\fBTcl_OutputBuffered\fR(\fIchannel\fR)
.sp
-Tcl_WideInt
+long long
\fBTcl_Seek\fR(\fIchannel, offset, seekMode\fR)
.sp
-Tcl_WideInt
+long long
\fBTcl_Tell\fR(\fIchannel\fR)
.sp
int
@@ -190,7 +190,7 @@ A buffer containing the bytes to output to the channel.
.AP size_t bytesToWrite in
The number of bytes to consume from \fIcharBuf\fR or \fIbyteBuf\fR and
output to the channel.
-.AP Tcl_WideInt offset in
+.AP "long long" offset in
How far to move the access point in the channel at which the next input or
output operation will be applied, measured in bytes from the position
given by \fIseekMode\fR. May be either positive or negative.
@@ -198,7 +198,7 @@ given by \fIseekMode\fR. May be either positive or negative.
Relative to which point to seek; used with \fIoffset\fR to calculate the new
access point for the channel. Legal values are \fBSEEK_SET\fR,
\fBSEEK_CUR\fR, and \fBSEEK_END\fR.
-.AP Tcl_WideInt length in
+.AP "long long" length in
The (non-negative) length to truncate the channel the channel to.
.AP "const char" *optionName in
The name of an option applicable to this channel, such as \fB\-blocking\fR.
diff --git a/doc/SaveResult.3 b/doc/SaveResult.3
index e62d22d..804f9ec 100644
--- a/doc/SaveResult.3
+++ b/doc/SaveResult.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1997 by Sun Microsystems, Inc.
+'\" Copyright (c) 1997 Sun Microsystems, Inc.
'\" Contributions from Don Porter, NIST, 2004. (not subject to US copyright)
'\" Copyright (c) 2018 Nathan Coulter.
'\"
diff --git a/doc/SourceRCFile.3 b/doc/SourceRCFile.3
index 0afb66b..bf8c527 100644
--- a/doc/SourceRCFile.3
+++ b/doc/SourceRCFile.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tcl_SourceRCFile 3 8.3 Tcl "Tcl Library Procedures"
diff --git a/doc/StdChannels.3 b/doc/StdChannels.3
index 7cb75a0..d3ecff2 100644
--- a/doc/StdChannels.3
+++ b/doc/StdChannels.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 2001 by ActiveState Corporation
+'\" Copyright (c) 2001 ActiveState 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/doc/StringObj.3 b/doc/StringObj.3
index 33c5c79..10e747f 100644
--- a/doc/StringObj.3
+++ b/doc/StringObj.3
@@ -116,9 +116,9 @@ returned as a new value.
Points to a value to manipulate.
.AP Tcl_Obj *appendObjPtr in
The value to append to \fIobjPtr\fR in \fBTcl_AppendObjToObj\fR.
-.AP int *lengthPtr out
-If non-NULL, the location where \fBTcl_GetStringFromObj\fR will store
-the length of a value's string representation.
+.AP size_t | int *lengthPtr out
+The location where \fBTcl_GetStringFromObj\fR will store the length
+of a value's string representation. May be (int *)NULL when not used.
.AP "const char" *string in
Null-terminated string value to append to \fIobjPtr\fR.
.AP va_list argList in
diff --git a/doc/TCL_MEM_DEBUG.3 b/doc/TCL_MEM_DEBUG.3
index 38489a3..6bd03c9 100644
--- a/doc/TCL_MEM_DEBUG.3
+++ b/doc/TCL_MEM_DEBUG.3
@@ -1,6 +1,6 @@
'\"
-'\" Copyright (c) 1992-1999 Karl Lehenbauer and Mark Diekhans.
-'\" Copyright (c) 2000 by Scriptics Corporation.
+'\" Copyright (c) 1992-1999 Karl Lehenbauer & Mark Diekhans.
+'\" Copyright (c) 2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH TCL_MEM_DEBUG 3 8.1 Tcl "Tcl Library Procedures"
diff --git a/doc/Tcl.n b/doc/Tcl.n
index 48a3488..0f46f73 100644
--- a/doc/Tcl.n
+++ b/doc/Tcl.n
@@ -224,7 +224,7 @@ is reached. The upper bits of the Unicode character will be 0.
.RS
.PP
The range U+00D800\(enU+00DFFF is reserved for surrogates, which
-are illegal on its own. Therefore, such sequences will result in
+are illegal on their own. Therefore, such sequences will result in
the replacement character U+FFFD. Surrogate pairs should be
encoded as single \e\fBU\fIhhhhhhhh\fR character.
.RE
diff --git a/doc/ToUpper.3 b/doc/ToUpper.3
index fd9ddfb..37ebd2b 100644
--- a/doc/ToUpper.3
+++ b/doc/ToUpper.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1997 by Sun Microsystems, Inc.
+'\" Copyright (c) 1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/doc/abstract.n b/doc/abstract.n
index 022c24b..c58abd8 100644
--- a/doc/abstract.n
+++ b/doc/abstract.n
@@ -12,7 +12,7 @@
oo::abstract \- a class that does not allow direct instances of itself
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBoo::abstract\fI method \fR?\fIarg ...\fR?
.fi
diff --git a/doc/binary.n b/doc/binary.n
index 0e8b28e..4a5d6c8 100644
--- a/doc/binary.n
+++ b/doc/binary.n
@@ -1,6 +1,6 @@
'\"
-'\" Copyright (c) 1997 by Sun Microsystems, Inc.
-'\" Copyright (c) 2008 by Donal K. Fellows
+'\" Copyright (c) 1997 Sun Microsystems, Inc.
+'\" Copyright (c) 2008 Donal K. Fellows
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -762,6 +762,15 @@ high-to-low order within each byte. For example,
will return \fB2\fR with \fB01110\fR stored in \fIvar1\fR and
\fB1000011100000101\fR stored in \fIvar2\fR.
.RE
+.IP \fBC\fR 5
+This form is similar to \fBA\fR, except that it scans the data from start
+and terminates at the first null (C string semantics). For example,
+.RS
+.CS
+\fBbinary scan\fR "abc\e000efghi" C* var1
+.CE
+will return \fB1\fR with \fBabc\fR stored in \fIvar1\fR.
+.RE
.IP \fBH\fR 5
The data is turned into a string of \fIcount\fR hexadecimal digits in
high-to-low order represented as a sequence of characters in the set
diff --git a/doc/callback.n b/doc/callback.n
index 95838a9..3ab81ac 100644
--- a/doc/callback.n
+++ b/doc/callback.n
@@ -12,7 +12,7 @@
callback, mymethod \- generate callbacks to methods
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBcallback\fR \fImethodName\fR ?\fIarg ...\fR?
\fBmymethod\fR \fImethodName\fR ?\fIarg ...\fR?
diff --git a/doc/chan.n b/doc/chan.n
index 82f5200..f788bbf 100644
--- a/doc/chan.n
+++ b/doc/chan.n
@@ -175,7 +175,7 @@ operating system, as returned by \fBencoding system\fR.
.TP
\fB\-eofchar\fR \fB{\fIinChar outChar\fB}\fR
.
-This option supports DOS file systems that use Control-z (\ex1a) as an
+This option supports DOS file systems that use Control-z (\ex1A) as an
end of file marker. If \fIchar\fR is not an empty string, then this
character signals end-of-file when it is encountered during input.
For output, the end-of-file character is output when the channel is
@@ -188,7 +188,7 @@ will apply to both reading and writing. When querying the end-of-file
character of a read-write channel, a two-element list will always be
returned. The default value for \fB\-eofchar\fR is the empty string
in all cases except for files under Windows. In that case the
-\fB\-eofchar\fR is Control-z (\ex1a) for reading and the empty string
+\fB\-eofchar\fR is Control-z (\ex1A) for reading and the empty string
for writing.
The acceptable range for \fB\-eofchar\fR values is \ex01 - \ex7f;
attempting to set \fB\-eofchar\fR to a value outside of this range will
diff --git a/doc/class.n b/doc/class.n
index 198ae41..c48f52d 100644
--- a/doc/class.n
+++ b/doc/class.n
@@ -12,7 +12,7 @@
oo::class \- class of all classes
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBoo::class\fI method \fR?\fIarg ...\fR?
.fi
diff --git a/doc/classvariable.n b/doc/classvariable.n
index 0798bb2..70d9f13 100644
--- a/doc/classvariable.n
+++ b/doc/classvariable.n
@@ -13,7 +13,7 @@
classvariable \- create link from local variable to variable in class
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBclassvariable\fR \fIvariableName\fR ?\fI...\fR?
.fi
diff --git a/doc/clock.n b/doc/clock.n
index a3f934a..6b15fba 100644
--- a/doc/clock.n
+++ b/doc/clock.n
@@ -8,7 +8,7 @@
.SH NAME
clock \- Obtain and manipulate dates and times
.SH "SYNOPSIS"
-package require \fBTcl 8.5\fR
+package require \fBTcl 8.5-\fR
.sp
\fBclock add\fR \fItimeVal\fR ?\fIcount unit...\fR? ?\fI\-option value\fR?
.sp
@@ -951,7 +951,7 @@ msgcat(n)
.SH KEYWORDS
clock, date, time
.SH "COPYRIGHT"
-Copyright (c) 2004 Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
+Copyright \(co 2004 Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
'\" Local Variables:
'\" mode: nroff
'\" End:
diff --git a/doc/copy.n b/doc/copy.n
index 706be54..56160a0 100644
--- a/doc/copy.n
+++ b/doc/copy.n
@@ -12,7 +12,7 @@
oo::copy \- create copies of objects and classes
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBoo::copy\fI sourceObject \fR?\fItargetObject\fR? ?\fItargetNamespace\fR?
.fi
diff --git a/doc/define.n b/doc/define.n
index 4175efc..f1e799b 100644
--- a/doc/define.n
+++ b/doc/define.n
@@ -12,7 +12,7 @@
oo::define, oo::objdefine \- define and configure classes and objects
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBoo::define\fI class defScript\fR
\fBoo::define\fI class subcommand arg\fR ?\fIarg ...\fR?
diff --git a/doc/dict.n b/doc/dict.n
index e06947b..5f5a087 100644
--- a/doc/dict.n
+++ b/doc/dict.n
@@ -61,7 +61,7 @@ of the given patterns (in the style of \fBstring match\fR.)
.
The script rule tests for matching by assigning the key to the
\fIkeyVariable\fR and the value to the \fIvalueVariable\fR, and then evaluating
-the given script which should return a boolean value (with the
+the given script which should result in a boolean value (with the
key/value pair only being included in the result of the \fBdict
filter\fR when a true value is returned.) Note that the first
argument after the rule selection word is a two-element list. If the
diff --git a/doc/encoding.n b/doc/encoding.n
index 50ad083..5aac181 100644
--- a/doc/encoding.n
+++ b/doc/encoding.n
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998 by Scriptics Corporation.
+'\" Copyright (c) 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/doc/exec.n b/doc/exec.n
index 855a192..373b980 100644
--- a/doc/exec.n
+++ b/doc/exec.n
@@ -246,15 +246,6 @@ the backslash character. If an argument contains forward slashes as the
path separator, it may or may not be recognized as a path name, depending on
the program.
.PP
-Additionally, when calling a 16-bit DOS or Windows 3.X application, all path
-names must use the short, cryptic, path format (e.g., using
-.QW applba~1.def
-instead of
-.QW applbakery.default ),
-which can be obtained with the
-.QW "\fBfile attributes\fI fileName \fB\-shortname\fR"
-command.
-.PP
Two or more forward or backward slashes in a row in a path refer to a
network path. For example, a simple concatenation of the root directory
\fBc:/\fR with a subdirectory \fB/windows/system\fR will yield
@@ -295,11 +286,9 @@ The directory from which the Tcl executable was loaded.
.IP \(bu 3
The current directory.
.IP \(bu 3
-The Windows NT 32-bit system directory.
-.IP \(bu 3
-The Windows NT 16-bit system directory.
+The Windows 32-bit system directory.
.IP \(bu 3
-The Windows NT home directory.
+The Windows home directory.
.IP \(bu 3
The directories listed in the path.
.PP
diff --git a/doc/expr.n b/doc/expr.n
index 44a5a4b..60dcf72 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-2000 Sun Microsystems, Inc.
-'\" Copyright (c) 2005 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved
+'\" Copyright (c) 2005 Kevin B. Kenny <kennykb@acm.org>. All rights reserved
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -41,6 +41,12 @@ When an expression evaluates to an integer, the value is the decimal form of
the integer, and when an expression evaluates to a floating-point number, the
value is the form produced by the \fB%g\fR format specifier of Tcl's
\fBformat\fR command.
+.PP
+.VS "TIP 582"
+You can use \fB#\fR at any point in the expression (except inside double
+quotes or braces) to start a comment. Comments last to the end of the line or
+the end of the expression, whichever comes first.
+.VE "TIP 582"
.SS OPERANDS
.PP
An expression consists of a combination of operands, operators, parentheses and
@@ -82,9 +88,9 @@ produces the value on the right side.
.PP
.CS
.ta 9c
-\fBexpr\fR 3.1 + $a \fI6.1\fR
-\fBexpr\fR 2 + "$a.$b" \fI5.6\fR
-\fBexpr\fR 4*[llength "6 2"] \fI8\fR
+\fBexpr\fR {3.1 + $a} \fI6.1\fR
+\fBexpr\fR {2 + "$a.$b"} \fI5.6\fR
+\fBexpr\fR {4*[llength "6 2"]} \fI8\fR
\fBexpr\fR {{word one} < "word $a"} \fI0\fR
.CE
.PP
@@ -268,7 +274,7 @@ which means that operands are not evaluated if they are
not needed to determine the outcome. For example, in
.PP
.CS
-\fBexpr\fR {$v ? [a] : [b]}
+\fBexpr\fR {$v?[a]:[b]}
.CE
.PP
only one of \fB[a]\fR or \fB[b]\fR is evaluated,
@@ -485,7 +491,9 @@ value of true:
.PP
.CS
set isTrue [\fBexpr\fR {
+ # Does the environment variable exist, and...
[info exists ::env(SOME_ENV_VAR)] &&
+ # ...does it contain a proper true value?
[string is true -strict $::env(SOME_ENV_VAR)]
}]
.CE
@@ -504,8 +512,9 @@ arithmetic, boolean, compare, expression, fuzzy comparison, integer value
.nf
Copyright \(co 1993 The Regents of the University of California.
Copyright \(co 1994-2000 Sun Microsystems Incorporated.
-Copyright \(co 2005 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
+Copyright \(co 2005 Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
.fi
'\" Local Variables:
'\" mode: nroff
+'\" fill-column: 78
'\" End:
diff --git a/doc/fconfigure.n b/doc/fconfigure.n
index 8da76c6..2926777 100644
--- a/doc/fconfigure.n
+++ b/doc/fconfigure.n
@@ -105,7 +105,7 @@ system, as returned by \fBencoding system\fR.
.TP
\fB\-eofchar\fR \fB{\fIinChar outChar\fB}\fR
.
-This option supports DOS file systems that use Control-z (\ex1a) as an
+This option supports DOS file systems that use Control-z (\ex1A) as an
end of file marker. If \fIchar\fR is not an empty string, then this
character signals end-of-file when it is encountered during input. For
output, the end-of-file character is output when the channel is closed.
@@ -117,9 +117,9 @@ channel you can specify a single value that will apply to both reading
and writing. When querying the end-of-file character of a read-write
channel, a two-element list will always be returned. The default value
for \fB\-eofchar\fR is the empty string in all cases except for files
-under Windows. In that case the \fB\-eofchar\fR is Control-z (\ex1a) for
+under Windows. In that case the \fB\-eofchar\fR is Control-z (\ex1A) for
reading and the empty string for writing.
-The acceptable range for \fB\-eofchar\fR values is \ex01 - \ex7f;
+The acceptable range for \fB\-eofchar\fR values is \ex01 - \ex7F;
attempting to set \fB\-eofchar\fR to a value outside of this range will
generate an error.
.TP
diff --git a/doc/file.n b/doc/file.n
index da602fd..c5a5eed 100644
--- a/doc/file.n
+++ b/doc/file.n
@@ -38,28 +38,31 @@ generated. On Windows, FAT file systems do not support access time.
.TP
\fBfile attributes \fIname\fR ?\fIoption value option value...\fR?
.
-This subcommand returns or sets platform specific values associated
-with a file. The first form returns a list of the platform specific
-flags and their values. The second form returns the value for the
-specific option. The third form sets one or more of the values. The
-values are as follows:
+This subcommand returns or sets platform-specific values associated
+with a file. The first form returns a list of the platform-specific
+options and their values. The second form returns the value for the
+given option. The third form sets one or more of the values. The values
+are as follows:
.RS
.PP
-On Unix, \fB\-group\fR gets or sets the group name for the file. A group id
-can be given to the command, but it returns a group name. \fB\-owner\fR gets
-or sets the user name of the owner of the file. The command returns the
-owner name, but the numerical id can be passed when setting the
-owner. \fB\-permissions\fR sets or retrieves the octal code that chmod(1)
-uses. This command does also has limited support for setting using the
-symbolic attributes for chmod(1), of the form [ugo]?[[+\-=][rwxst],[...]],
-where multiple symbolic attributes can be separated by commas (example:
-\fBu+s,go\-rw\fR add sticky bit for user, remove read and write
-permissions for group and other). A simplified \fBls\fR style string,
-of the form rwxrwxrwx (must be 9 characters), is also supported
-(example: \fBrwxr\-xr\-t\fR is equivalent to 01755).
-On versions of Unix supporting file flags, \fB\-readonly\fR gives the
-value or sets or clears the readonly attribute of the file,
-i.e. the user immutable flag \fBuchg\fR to chflags(1).
+On Unix, \fB\-group\fR gets or sets the group name for the file. A
+group id can be given to the command, but it returns a group name.
+\fB\-owner\fR gets or sets the user name of the owner of the file. The
+command returns the owner name, but the numerical id can be passed when
+setting the owner. \fB\-permissions\fR retrieves or sets a file's
+access permissions, using octal notation by default. This option also
+provides limited support for setting permissions using the symbolic
+notation accepted by the \fBchmod\fR command, following the form
+[\fBugo\fR]?[[\fB+-=\fR][\fBrwxst\fR]\fB,\fR[...]]. Multiple permission
+specifications may be given, separated by commas. E.g., \fBu+s,go-rw\fR
+would set the setuid bit for a file's owner as well as remove read and
+write permission for the file's group and other users. An
+\fBls\fR-style string of the form \fBrwxrwxrwx\fR is also accepted but
+must always be 9 characters long. E.g., \fBrwxr-xr-t\fR is equivalent
+to \fB01755\fR. On versions of Unix supporting file flags,
+\fB-readonly\fR returns the value of, or sets, or clears the readonly
+attribute of a file, i.e., the user immutable flag (\fBuchg\fR) to the
+\fBchflags\fR command.
.PP
On Windows, \fB\-archive\fR gives the value or sets or clears the
archive attribute of the file. \fB\-hidden\fR gives the value or sets
diff --git a/doc/filename.n b/doc/filename.n
index f160eff..7b9d6fa 100644
--- a/doc/filename.n
+++ b/doc/filename.n
@@ -150,9 +150,7 @@ The safest approach is to use names consisting of
alphanumeric characters only. Care should be taken with filenames
which contain spaces (common on Windows systems) and
filenames where the backslash is the directory separator (Windows
-native path names). Also Windows 3.1 only supports file
-names with a root of no more than 8 characters and an extension of no
-more than 3 characters.
+native path names).
.PP
On Windows platforms there are file and path length restrictions.
Complete paths or filenames longer than about 260 characters will lead
diff --git a/doc/fpclassify.n b/doc/fpclassify.n
index 5bf21c5..b6eb0e6 100644
--- a/doc/fpclassify.n
+++ b/doc/fpclassify.n
@@ -1,6 +1,6 @@
'\"
-'\" Copyright (c) 2018 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved
-'\" Copyright (c) 2019 by Donal Fellows
+'\" Copyright (c) 2018 Kevin B. Kenny <kennykb@acm.org>. All rights reserved
+'\" Copyright (c) 2019 Donal Fellows
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -12,7 +12,7 @@
.SH NAME
fpclassify \- Floating point number classification of Tcl values
.SH SYNOPSIS
-package require \fBTcl 8.7\fR
+package require \fBtcl 8.7\fR
.sp
\fBfpclassify \fIvalue\fR
.BE
@@ -76,7 +76,7 @@ This command depends on the \fBfpclassify\fR() C macro conforming to
(i.e., to ISO/IEC 9899:1999).
.SH COPYRIGHT
.nf
-Copyright \(co 2018 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved
+Copyright \(co 2018 Kevin B. Kenny <kennykb@acm.org>. All rights reserved
.fi
'\" Local Variables:
'\" mode: nroff
diff --git a/doc/http.n b/doc/http.n
index 03cc811..b7eac6b 100644
--- a/doc/http.n
+++ b/doc/http.n
@@ -1,6 +1,6 @@
'\"
'\" Copyright (c) 1995-1997 Sun Microsystems, Inc.
-'\" Copyright (c) 1998-2000 by Ajuba Solutions.
+'\" Copyright (c) 1998-2000 Ajuba Solutions.
'\" Copyright (c) 2004 ActiveState Corporation.
'\"
'\" See the file "license.terms" for information on usage and redistribution
@@ -78,6 +78,9 @@ when the transaction completes. For this to work, the Tcl event loop
must be active. In Tk applications this is always true. For pure-Tcl
applications, the caller can use \fB::http::wait\fR after calling
\fB::http::geturl\fR to start the event loop.
+.PP
+\fBNote:\fR The event queue is even used without the \fB-command\fR option.
+As a side effect, arbitrary commands may be processed while \fBhttp::geturl\fR is running.
.SH COMMANDS
.TP
\fB::http::config\fR ?\fIoptions\fR?
@@ -325,9 +328,11 @@ otherwise complain about HTTP/1.1.
\fB\-query\fR \fIquery\fR
.
This flag causes \fB::http::geturl\fR to do a POST request that passes the
-\fIquery\fR to the server. The \fIquery\fR must be an x-url-encoding
-formatted query. The \fB::http::formatQuery\fR procedure can be used to
-do the formatting.
+\fIquery\fR as payload verbatim to the server.
+The content format (and encoding) of \fIquery\fR is announced by the header
+field \fBcontent-type\fR set by the option \fB-type\fR.
+\fIquery\fR is an x-url-encoding formatted query, if used for html forms.
+The \fB::http::formatQuery\fR procedure can be used to do the formatting.
.TP
\fB\-queryblocksize\fR \fIsize\fR
.
@@ -551,6 +556,14 @@ is raised, but the status of the transaction will be \fBeof\fR.
.
The error message will also be stored in the \fBerror\fR status
array element, accessible via \fB::http::error\fR.
+.TP
+\fBtimeout\fR
+.
+A timeout occurred before the transaction could complete
+.TP
+\fBreset\fR
+.
+user-reset
.PP
Another error possibility is that \fB::http::geturl\fR is unable to
write all the post query data to the server before the server
@@ -666,10 +679,9 @@ the post query data to the server.
.TP
\fBstatus\fR
.
-Either \fBok\fR, for successful completion, \fBreset\fR for
-user-reset, \fBtimeout\fR if a timeout occurred before the transaction
-could complete, or \fBerror\fR for an error condition. During the
-transaction this value is the empty string.
+See description in the chapter \fBERRORS\fR above for a
+list and description of \fBstatus\fR.
+During the transaction this value is the empty string.
.TP
\fBtotalsize\fR
.
diff --git a/doc/lindex.n b/doc/lindex.n
index 01e0d8b..75fe5e8 100644
--- a/doc/lindex.n
+++ b/doc/lindex.n
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
-'\" Copyright (c) 2001 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
+'\" Copyright (c) 2001 Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/doc/link.n b/doc/link.n
index 7219342..e06be33 100644
--- a/doc/link.n
+++ b/doc/link.n
@@ -13,7 +13,7 @@
link \- create link from command to method of object
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBlink\fR \fImethodName\fR ?\fI...\fR?
\fBlink\fR \fB{\fIcommandName methodName\fB}\fR ?\fI...\fR?
diff --git a/doc/load.n b/doc/load.n
index 03b4f4e..1185e1e 100644
--- a/doc/load.n
+++ b/doc/load.n
@@ -89,9 +89,10 @@ Tcl tries to guess the name of the package.
This may be done differently on different platforms.
The default guess, which is used on most UNIX platforms, is to
take the last element of \fIfileName\fR, strip off the first
-three characters if they are \fBlib\fR, and use any following
+three characters if they are \fBlib\fR, then strip off the next
+three characters if they are \fBtcl\fR, and use any following
alphabetic and underline characters as the module name.
-For example, the command \fBload libxyz4.2.so\fR uses the module
+For example, the command \fBload libtclxyz4.2.so\fR uses the module
name \fBxyz\fR and the command \fBload bin/last.so {}\fR uses the
module name \fBlast\fR.
.PP
diff --git a/doc/lpop.n b/doc/lpop.n
index 631bc58..3d88638 100644
--- a/doc/lpop.n
+++ b/doc/lpop.n
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 2018 by Peter Spjuth. All rights reserved.
+'\" Copyright (c) 2018 Peter Spjuth. All rights reserved.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/doc/lrepeat.n b/doc/lrepeat.n
index 2e17f9c..9a3fc88 100644
--- a/doc/lrepeat.n
+++ b/doc/lrepeat.n
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 2003 by Simon Geard. All rights reserved.
+'\" Copyright (c) 2003 Simon Geard. All rights reserved.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/doc/lreverse.n b/doc/lreverse.n
index 2ed496a..e2e3b69 100644
--- a/doc/lreverse.n
+++ b/doc/lreverse.n
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 2006 by Donal K. Fellows. All rights reserved.
+'\" Copyright (c) 2006 Donal K. Fellows. All rights reserved.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/doc/lset.n b/doc/lset.n
index fbcf7e4..cb60ee0 100644
--- a/doc/lset.n
+++ b/doc/lset.n
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 2001 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
+'\" Copyright (c) 2001 Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/doc/mathfunc.n b/doc/mathfunc.n
index 9b14587..805cf82 100644
--- a/doc/mathfunc.n
+++ b/doc/mathfunc.n
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-2000 Sun Microsystems, Inc.
-'\" Copyright (c) 2005 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved
+'\" Copyright (c) 2005 Kevin B. Kenny <kennykb@acm.org>. All rights reserved
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -13,7 +13,7 @@
.SH NAME
mathfunc \- Mathematical functions for Tcl expressions
.SH SYNOPSIS
-package require \fBTcl 8.5\fR
+package require \fBTcl 8.5-\fR
.sp
\fB::tcl::mathfunc::abs\fR \fIarg\fR
.br
@@ -357,7 +357,7 @@ expr(n), fpclassify(n), mathop(n), namespace(n)
.nf
Copyright \(co 1993 The Regents of the University of California.
Copyright \(co 1994-2000 Sun Microsystems Incorporated.
-Copyright \(co 2005, 2006 by Kevin B. Kenny <kennykb@acm.org>.
+Copyright \(co 2005-2006 Kevin B. Kenny <kennykb@acm.org>.
.fi
'\" Local Variables:
'\" mode: nroff
diff --git a/doc/mathop.n b/doc/mathop.n
index 1c70e95..3a13456 100644
--- a/doc/mathop.n
+++ b/doc/mathop.n
@@ -11,7 +11,7 @@
.SH NAME
mathop \- Mathematical operators as Tcl commands
.SH SYNOPSIS
-package require \fBTcl 8.5\fR
+package require \fBTcl 8.5-\fR
.sp
\fB::tcl::mathop::!\fR \fInumber\fR
.br
diff --git a/doc/memory.n b/doc/memory.n
index 5e1566a..dc58502 100644
--- a/doc/memory.n
+++ b/doc/memory.n
@@ -1,6 +1,6 @@
'\"
-'\" Copyright (c) 1992-1999 by Karl Lehenbauer and Mark Diekhans
-'\" Copyright (c) 2000 by Scriptics Corporation.
+'\" Copyright (c) 1992-1999 Karl Lehenbauer & Mark Diekhans
+'\" Copyright (c) 2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH memory n 8.1 Tcl "Tcl Built-In Commands"
diff --git a/doc/msgcat.n b/doc/msgcat.n
index 3d87ffd..74a7020 100644
--- a/doc/msgcat.n
+++ b/doc/msgcat.n
@@ -11,7 +11,7 @@
.SH NAME
msgcat \- Tcl message catalog
.SH SYNOPSIS
-\fBpackage require Tcl 8.7\fR
+\fBpackage require tcl 8.7\fR
.sp
\fBpackage require msgcat 1.7\fR
.sp
diff --git a/doc/my.n b/doc/my.n
index 4618525..3464a87 100644
--- a/doc/my.n
+++ b/doc/my.n
@@ -12,7 +12,7 @@
my, myclass \- invoke any method of current object or its class
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBmy\fI methodName\fR ?\fIarg ...\fR?
\fBmyclass\fI methodName\fR ?\fIarg ...\fR?
diff --git a/doc/next.n b/doc/next.n
index 8ebaed2..f731335 100644
--- a/doc/next.n
+++ b/doc/next.n
@@ -12,7 +12,7 @@
next, nextto \- invoke superclass method implementations
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBnext\fR ?\fIarg ...\fR?
\fBnextto\fI class\fR ?\fIarg ...\fR?
diff --git a/doc/object.n b/doc/object.n
index df657a9..98679d1 100644
--- a/doc/object.n
+++ b/doc/object.n
@@ -12,7 +12,7 @@
oo::object \- root class of the class hierarchy
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBoo::object\fI method \fR?\fIarg ...\fR?
.fi
diff --git a/doc/packagens.n b/doc/packagens.n
index a6eee1e..65535ef 100644
--- a/doc/packagens.n
+++ b/doc/packagens.n
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH pkg::create n 8.3 Tcl "Tcl Built-In Commands"
diff --git a/doc/re_syntax.n b/doc/re_syntax.n
index 43c8417..62bb4af 100644
--- a/doc/re_syntax.n
+++ b/doc/re_syntax.n
@@ -137,11 +137,26 @@ later, under \fBESCAPES\fR.
.TP 8
\fB^\fR
.
-matches at the beginning of a line
+matches at the beginning of the string or a line (according to whether
+matching is newline-sensitive or not, as described in \fBMATCHING\fR,
+below).
.TP
\fB$\fR
.
-matches at the end of a line
+matches at the end of the string or a line (according to whether
+matching is newline-sensitive or not, as described in \fBMATCHING\fR,
+below).
+.RS
+.PP
+The difference between string and line matching modes is immaterial
+when the string does not contain a newline character. The \fB\eA\fR
+and \fB\eZ\fR constraint escapes have a similar purpose but are
+always constraints for the overall string.
+.PP
+The default newline-sensitivity depends on the command that uses the
+regular expression, and can be overridden as described in
+\fBMETASYNTAX\fR, below.
+.RE
.TP
\fB(?=\fIre\fB)\fR
.
@@ -293,12 +308,12 @@ treatment is as if the enclosing delimiters were
.QW \fB[.\fR \&
and
.QW \fB.]\fR .)
-For example, if \fBo\fR and \fB\[^o]\fR are the members of an
+For example, if \fBo\fR and \fB\(^o\fR are the members of an
equivalence class, then
.QW \fB[[=o=]]\fR ,
-.QW \fB[[=\[^o]=]]\fR ,
+.QW \fB[[=\(^o=]]\fR ,
and
-.QW \fB[o\[^o]]\fR \&
+.QW \fB[o\(^o]\fR \&
are all synonymous. An equivalence class may not be an endpoint of a range.
.RS
.PP
diff --git a/doc/self.n b/doc/self.n
index 855d067..14f68c7 100644
--- a/doc/self.n
+++ b/doc/self.n
@@ -12,7 +12,7 @@
self \- method call internal introspection
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBself\fR ?\fIsubcommand\fR?
.fi
diff --git a/doc/singleton.n b/doc/singleton.n
index 568a8bd..3ccbdd3 100644
--- a/doc/singleton.n
+++ b/doc/singleton.n
@@ -12,7 +12,7 @@
oo::singleton \- a class that does only allows one instance of itself
.SH SYNOPSIS
.nf
-package require TclOO
+package require tcl::oo
\fBoo::singleton\fI method \fR?\fIarg ...\fR?
.fi
diff --git a/doc/socket.n b/doc/socket.n
index 823dbd5..8836150 100644
--- a/doc/socket.n
+++ b/doc/socket.n
@@ -1,6 +1,6 @@
'\"
'\" Copyright (c) 1996 Sun Microsystems, Inc.
-'\" Copyright (c) 1998-1999 by Scriptics Corporation.
+'\" Copyright (c) 1998-1999 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/doc/tclsh.1 b/doc/tclsh.1
index c37eb81..8dbacc0 100644
--- a/doc/tclsh.1
+++ b/doc/tclsh.1
@@ -44,7 +44,7 @@ If this character is present in the file, the \fBtclsh\fR application
will read text up to but not including the character. An application
that requires this character in the file may safely encode it as
.QW \e032 ,
-.QW \ex1a ,
+.QW \ex1A ,
or
.QW \eu001a ;
or may generate it by use of commands such as \fBformat\fR or \fBbinary\fR.
diff --git a/doc/tcltest.n b/doc/tcltest.n
index 25e5e5e..5a53699 100644
--- a/doc/tcltest.n
+++ b/doc/tcltest.n
@@ -1179,7 +1179,6 @@ Here is a sketch of a sample test suite main script:
.RS
.PP
.CS
-package require Tcl 8.6
package require tcltest 2.5
package require example
\fB::tcltest::configure\fR -testdir \e
diff --git a/doc/zipfs.n b/doc/zipfs.n
index 2d84173..da2e026 100644
--- a/doc/zipfs.n
+++ b/doc/zipfs.n
@@ -14,7 +14,7 @@
zipfs \- Mount and work with ZIP files within Tcl
.SH SYNOPSIS
.nf
-\fBpackage require zipfs \fR?\fB1.0\fR?
+\fBpackage require tcl::zipfs \fR?\fB1.0\fR?
.sp
\fBzipfs canonical\fR ?\fImntpnt\fR? \fIfilename\fR ?\fIZIPFS\fR?
\fBzipfs exists\fR \fIfilename\fR
diff --git a/generic/regc_color.c b/generic/regc_color.c
index 92e0aad..f7dd284 100644
--- a/generic/regc_color.c
+++ b/generic/regc_color.c
@@ -2,7 +2,7 @@
* colorings of characters
* This file is #included by regcomp.c.
*
- * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+ * Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
diff --git a/generic/regc_cvec.c b/generic/regc_cvec.c
index d450d3e..3b4f1e4 100644
--- a/generic/regc_cvec.c
+++ b/generic/regc_cvec.c
@@ -2,7 +2,7 @@
* Utility functions for handling cvecs
* This file is #included by regcomp.c.
*
- * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+ * Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
diff --git a/generic/regc_lex.c b/generic/regc_lex.c
index 0cd7dd6..c750a26 100644
--- a/generic/regc_lex.c
+++ b/generic/regc_lex.c
@@ -2,7 +2,7 @@
* lexical analyzer
* This file is #included by regcomp.c.
*
- * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+ * Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
@@ -1005,7 +1005,7 @@ brenext(
if (LASTTYPE(EMPTY) || LASTTYPE('(') || LASTTYPE('^')) {
RETV(PLAIN, c);
}
- RET('*');
+ RETV('*', 1);
break;
case CHR('['):
if (HAVE(6) && *(v->now+0) == CHR('[') &&
diff --git a/generic/regc_locale.c b/generic/regc_locale.c
index 182428d..8ee44d2 100644
--- a/generic/regc_locale.c
+++ b/generic/regc_locale.c
@@ -4,7 +4,7 @@
* This file contains the Unicode locale specific regexp routines.
* This file is #included by regcomp.c.
*
- * Copyright (c) 1998 by Scriptics 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/generic/regc_nfa.c b/generic/regc_nfa.c
index 7507137..f676a45 100644
--- a/generic/regc_nfa.c
+++ b/generic/regc_nfa.c
@@ -2,7 +2,7 @@
* NFA utilities.
* This file is #included by regcomp.c.
*
- * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+ * Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
diff --git a/generic/regcomp.c b/generic/regcomp.c
index 4843b54..103c0bf 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -2,7 +2,7 @@
* re_*comp and friends - compile REs
* This file #includes several others (see the bottom).
*
- * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+ * Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
diff --git a/generic/rege_dfa.c b/generic/rege_dfa.c
index e5f22c4..f38c8c9 100644
--- a/generic/rege_dfa.c
+++ b/generic/rege_dfa.c
@@ -2,7 +2,7 @@
* DFA routines
* This file is #included by regexec.c.
*
- * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+ * Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
diff --git a/generic/regerror.c b/generic/regerror.c
index 5d74340..a53a0fd 100644
--- a/generic/regerror.c
+++ b/generic/regerror.c
@@ -1,7 +1,7 @@
/*
* regerror - error-code expansion
*
- * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+ * Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
diff --git a/generic/regexec.c b/generic/regexec.c
index 2c5107f..82b08cc 100644
--- a/generic/regexec.c
+++ b/generic/regexec.c
@@ -1,7 +1,7 @@
/*
* re_*exec and friends - match REs
*
- * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+ * Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
diff --git a/generic/regfree.c b/generic/regfree.c
index b0aaa70..71263ab 100644
--- a/generic/regfree.c
+++ b/generic/regfree.c
@@ -1,7 +1,7 @@
/*
* regfree - free an RE
*
- * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+ * Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
diff --git a/generic/regfronts.c b/generic/regfronts.c
index 088a640..3042558 100644
--- a/generic/regfronts.c
+++ b/generic/regfronts.c
@@ -4,7 +4,7 @@
* Mostly for implementation of backward-compatibility kludges. Note that
* these routines exist ONLY in char versions.
*
- * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+ * Copyright © 1998, 1999 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 0c711c1..9b133ef 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -5,9 +5,9 @@
# This file is used to generate the tclDecls.h, tclPlatDecls.h
# and tclStubInit.c files.
#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# Copyright (c) 2001, 2002 by Kevin B. Kenny. All rights reserved.
-# Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
+# Copyright © 1998-1999 Scriptics Corporation.
+# Copyright © 2001, 2002 Kevin B. Kenny. All rights reserved.
+# Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -63,11 +63,11 @@ declare 8 {
# but they are part of the old generic interface, so we include them here for
# compatibility reasons.
-declare 9 unix {
+declare 9 {
void Tcl_CreateFileHandler(int fd, int mask, Tcl_FileProc *proc,
void *clientData)
}
-declare 10 unix {
+declare 10 {
void Tcl_DeleteFileHandler(int fd)
}
declare 11 {
@@ -145,7 +145,7 @@ declare 32 {
int *boolPtr)
}
declare 33 {
- unsigned char *Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, int *lengthPtr)
+ unsigned char *TclGetByteArrayFromObj(Tcl_Obj *objPtr, int *lengthPtr)
}
declare 34 {
int Tcl_GetDouble(Tcl_Interp *interp, const char *src, double *doublePtr)
@@ -172,7 +172,7 @@ declare 40 {
const Tcl_ObjType *Tcl_GetObjType(const char *typeName)
}
declare 41 {
- char *Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr)
+ char *TclGetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr)
}
declare 42 {
void Tcl_InvalidateStringRep(Tcl_Obj *objPtr)
@@ -616,7 +616,7 @@ declare 166 {
# Tcl_GetOpenFile is only available on unix, but it is a part of the old
# generic interface, so we include it here for compatibility reasons.
-declare 167 unix {
+declare 167 {
int Tcl_GetOpenFile(Tcl_Interp *interp, const char *chanID, int forWriting,
int checkUsage, void **filePtr)
}
@@ -1601,7 +1601,7 @@ declare 433 {
# introduced in 8.4a3
declare 434 {
- Tcl_UniChar *Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, int *lengthPtr)
+ Tcl_UniChar *TclGetUnicodeFromObj(Tcl_Obj *objPtr, int *lengthPtr)
}
# TIP#15 (math function introspection) dkf
@@ -1813,10 +1813,10 @@ declare 490 {
Tcl_StatBuf *Tcl_AllocStatBuf(void)
}
declare 491 {
- Tcl_WideInt Tcl_Seek(Tcl_Channel chan, Tcl_WideInt offset, int mode)
+ long long Tcl_Seek(Tcl_Channel chan, long long offset, int mode)
}
declare 492 {
- Tcl_WideInt Tcl_Tell(Tcl_Channel chan)
+ long long Tcl_Tell(Tcl_Channel chan)
}
# TIP#91 (back-compat enhancements for channels) dkf
@@ -2088,7 +2088,7 @@ declare 559 {
# TIP #208 ('chan' command) jeffh
declare 560 {
- int Tcl_TruncateChannel(Tcl_Channel chan, Tcl_WideInt length)
+ int Tcl_TruncateChannel(Tcl_Channel chan, long long length)
}
declare 561 {
Tcl_DriverTruncateProc *Tcl_ChannelTruncateProc(
@@ -2239,19 +2239,19 @@ declare 595 {
int Tcl_GetDeviceTypeFromStat(const Tcl_StatBuf *statPtr)
}
declare 596 {
- Tcl_WideInt Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr)
+ long long Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr)
}
declare 597 {
- Tcl_WideInt Tcl_GetModificationTimeFromStat(const Tcl_StatBuf *statPtr)
+ long long Tcl_GetModificationTimeFromStat(const Tcl_StatBuf *statPtr)
}
declare 598 {
- Tcl_WideInt Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr)
+ long long Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr)
}
declare 599 {
- Tcl_WideUInt Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr)
+ unsigned long long Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr)
}
declare 600 {
- Tcl_WideUInt Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr)
+ unsigned long long Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr)
}
declare 601 {
unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr)
@@ -2465,6 +2465,17 @@ declare 648 {
size_t length, Tcl_DString *dsPtr)
}
+# TIP #481
+declare 651 {
+ char *Tcl_GetStringFromObj(Tcl_Obj *objPtr, size_t *lengthPtr)
+}
+declare 652 {
+ Tcl_UniChar *Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, size_t *lengthPtr)
+}
+declare 653 {
+ unsigned char *Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, size_t *lengthPtr)
+}
+
# ----- BASELINE -- FOR -- 8.7.0 ----- #
##############################################################################
@@ -2480,30 +2491,19 @@ interface tclPlat
################################
# Windows specific functions
-
-# Added in Tcl 8.1, Removed in Tcl 9.0 (converted to macro)
-
-#declare 0 win {
-# TCHAR *Tcl_WinUtfToTChar(const char *str, size_t len, Tcl_DString *dsPtr)
-#}
-#declare 1 win {
-# char *Tcl_WinTCharToUtf(const TCHAR *str, size_t len, Tcl_DString *dsPtr)
-#}
+# (none)
################################
# Mac OS X specific functions
-# Removed in 9.0
-#declare 0 macosx {
-# int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
-# const char *bundleName, int hasResourceFile,
-# size_t maxPathLen, char *libraryPath)
-#}
-declare 1 macosx {
+declare 1 {
int Tcl_MacOSXOpenVersionedBundleResources(Tcl_Interp *interp,
const char *bundleName, const char *bundleVersion,
int hasResourceFile, size_t maxPathLen, char *libraryPath)
}
+declare 2 {
+ void Tcl_MacOSXNotifierAddRunLoopMode(const void *runLoopMode)
+}
##############################################################################
diff --git a/generic/tcl.h b/generic/tcl.h
index 0c75a4e..c6f5e30 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -45,7 +45,6 @@ extern "C" {
* macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC
* win/README (not patchlevel) (sections 0 and 2)
* unix/tcl.spec (1 LOC patch)
- * tools/tcl.hpj.in (not patchlevel, for windows installer)
*/
#define TCL_MAJOR_VERSION 9
@@ -102,7 +101,11 @@ extern "C" {
#include <stdio.h>
#if defined(__GNUC__) && (__GNUC__ > 2)
-# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b)))
+# if defined(_WIN32) && defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO
+# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__MINGW_PRINTF_FORMAT, a, b)))
+# else
+# define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b)))
+# endif
# define TCL_NORETURN __attribute__ ((noreturn))
# define TCL_NOINLINE __attribute__ ((noinline))
# define TCL_NORETURN1 __attribute__ ((noreturn))
@@ -149,8 +152,7 @@ extern "C" {
* MSVCRT.
*/
-#if (defined(_WIN32) && (defined(_MSC_VER) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0550)) || defined(__LCC__) || defined(__WATCOMC__) || (defined(__GNUC__) && defined(__declspec))))
-# define HAVE_DECLSPEC 1
+#ifdef _WIN32
# ifdef STATIC_BUILD
# define DLLIMPORT
# define DLLEXPORT
@@ -232,17 +234,22 @@ typedef void *ClientData;
#ifdef __APPLE__
# ifdef __LP64__
-# undef TCL_WIDE_INT_TYPE
# define TCL_WIDE_INT_IS_LONG 1
# define TCL_CFG_DO64BIT 1
# else /* !__LP64__ */
-# define TCL_WIDE_INT_TYPE long long
# undef TCL_WIDE_INT_IS_LONG
# undef TCL_CFG_DO64BIT
# endif /* __LP64__ */
# undef HAVE_STRUCT_STAT64
#endif /* __APPLE__ */
+/* Cross-compiling 32-bit on a 64-bit platform? Then our
+ * configure script does the wrong thing. Correct that here.
+ */
+#if defined(__GNUC__) && !defined(_WIN32) && !defined(__LP64__)
+# undef TCL_WIDE_INT_IS_LONG
+#endif
+
/*
* Define Tcl_WideInt to be a type that is (at least) 64-bits wide, and define
* Tcl_WideUInt to be the unsigned variant of that type (assuming that where
@@ -258,32 +265,18 @@ typedef void *ClientData;
*
* The following invariant should hold for any long value 'longVal':
* longVal == Tcl_WideAsLong(Tcl_LongAsWide(longVal))
- *
- * Note on converting between Tcl_WideInt and strings. This implementation (in
- * tclObj.c) depends on the function
- * sprintf(...,"%" TCL_LL_MODIFIER "d",...).
*/
-#if !defined(TCL_WIDE_INT_TYPE)&&!defined(TCL_WIDE_INT_IS_LONG)
-# if defined(_WIN32) && (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO)
-# define TCL_WIDE_INT_TYPE __int64
-# define TCL_LL_MODIFIER "I64"
-# if defined(_WIN64)
-# define TCL_Z_MODIFIER "I"
-# endif
-# elif defined(__GNUC__)
-# define TCL_Z_MODIFIER "z"
-# else /* ! _WIN32 && ! __GNUC__ */
+#if !defined(TCL_WIDE_INT_TYPE) && !defined(TCL_WIDE_INT_IS_LONG) && !defined(_WIN32) && !defined(__GNUC__)
/*
* Don't know what platform it is and configure hasn't discovered what is
* going on for us. Try to guess...
*/
-# include <limits.h>
-# if defined(LLONG_MAX) && (LLONG_MAX == LONG_MAX)
-# define TCL_WIDE_INT_IS_LONG 1
-# endif
-# endif /* _WIN32 */
-#endif /* !TCL_WIDE_INT_TYPE & !TCL_WIDE_INT_IS_LONG */
+# include <limits.h>
+# if defined(LLONG_MAX) && (LLONG_MAX == LONG_MAX)
+# define TCL_WIDE_INT_IS_LONG 1
+# endif
+#endif
#ifndef TCL_WIDE_INT_TYPE
# define TCL_WIDE_INT_TYPE long long
@@ -293,11 +286,17 @@ typedef TCL_WIDE_INT_TYPE Tcl_WideInt;
typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
#ifndef TCL_LL_MODIFIER
-# define TCL_LL_MODIFIER "ll"
+# if defined(_WIN32) && (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO)
+# define TCL_LL_MODIFIER "I64"
+# else
+# define TCL_LL_MODIFIER "ll"
+# endif
#endif /* !TCL_LL_MODIFIER */
#ifndef TCL_Z_MODIFIER
# if defined(__GNUC__) && !defined(_WIN32)
# define TCL_Z_MODIFIER "z"
+# elif defined(_WIN64)
+# define TCL_Z_MODIFIER TCL_LL_MODIFIER
# else
# define TCL_Z_MODIFIER ""
# endif
@@ -802,7 +801,7 @@ typedef struct Tcl_DString {
* 64-bit integers).
*/
-#define TCL_INTEGER_SPACE 24
+#define TCL_INTEGER_SPACE (3*(int)sizeof(Tcl_WideInt))
/*
* Flag values passed to Tcl_ConvertElement.
@@ -933,7 +932,7 @@ typedef struct Tcl_DString {
#define TCL_LINK_CHARS 15
#define TCL_LINK_BINARY 16
#define TCL_LINK_READ_ONLY 0x80
-
+
/*
*----------------------------------------------------------------------------
* Forward declarations of Tcl_HashTable and related types.
@@ -1265,8 +1264,8 @@ typedef int (Tcl_DriverGetHandleProc) (void *instanceData,
typedef int (Tcl_DriverFlushProc) (void *instanceData);
typedef int (Tcl_DriverHandlerProc) (void *instanceData,
int interestMask);
-typedef Tcl_WideInt (Tcl_DriverWideSeekProc) (void *instanceData,
- Tcl_WideInt offset, int mode, int *errorCodePtr);
+typedef long long (Tcl_DriverWideSeekProc) (void *instanceData,
+ long long offset, int mode, int *errorCodePtr);
/*
* TIP #218, Channel Thread Actions
*/
@@ -1276,7 +1275,7 @@ typedef void (Tcl_DriverThreadActionProc) (void *instanceData,
* TIP #208, File Truncation (etc.)
*/
typedef int (Tcl_DriverTruncateProc) (void *instanceData,
- Tcl_WideInt length);
+ long long length);
/*
* struct Tcl_ChannelType:
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c
index 9291826..5070f96 100644
--- a/generic/tclAlloc.c
+++ b/generic/tclAlloc.c
@@ -6,9 +6,9 @@
* that don't exactly fit are passed up to the next larger size. Blocks
* over a certain size are directly allocated from the system.
*
- * Copyright (c) 1983 Regents of the University of California.
- * Copyright (c) 1996-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1983 Regents of the University of California.
+ * Copyright © 1996-1997 Sun Microsystems, Inc.
+ * Copyright © 1998-1999 Scriptics Corporation.
*
* Portions contributed by Chris Kingsley, Jack Jansen and Ray Johnson.
*
@@ -31,7 +31,7 @@
* until Tcl uses config.h properly.
*/
-#if defined(_MSC_VER) || defined(__MSVCRT__) || defined(__BORLANDC__)
+#if defined(_MSC_VER) || defined(__MSVCRT__)
typedef size_t caddr_t;
#endif
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index 4783811..5a961bc 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -6,8 +6,8 @@
* This file contains the procedures that convert Tcl Assembly Language (TAL)
* to a sequence of bytecode instructions for the Tcl execution engine.
*
- * Copyright (c) 2010 by Ozgur Dogan Ugurlu.
- * Copyright (c) 2010 by Kevin B. Kenny.
+ * Copyright © 2010 Ozgur Dogan Ugurlu.
+ * Copyright © 2010 Kevin B. Kenny.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -887,7 +887,7 @@ CompileAssembleObj(
* Set up the compilation environment, and assemble the code.
*/
- source = TclGetStringFromObj(objPtr, &sourceLen);
+ source = Tcl_GetStringFromObj(objPtr, &sourceLen);
TclInitCompileEnv(interp, &compEnv, source, sourceLen, NULL, 0);
status = TclAssembleCode(&compEnv, source, sourceLen, TCL_EVAL_DIRECT);
if (status != TCL_OK) {
@@ -1311,7 +1311,7 @@ AssembleOneLine(
if (GetNextOperand(assemEnvPtr, &tokenPtr, &operand1Obj) != TCL_OK) {
goto cleanup;
}
- operand1 = TclGetStringFromObj(operand1Obj, &operand1Len);
+ operand1 = Tcl_GetStringFromObj(operand1Obj, &operand1Len);
litIndex = TclRegisterLiteral(envPtr, operand1, operand1Len, 0);
BBEmitInst1or4(assemEnvPtr, tblIdx, litIndex, 0);
break;
@@ -1478,7 +1478,7 @@ AssembleOneLine(
&operand1Obj) != TCL_OK) {
goto cleanup;
} else {
- operand1 = TclGetStringFromObj(operand1Obj, &operand1Len);
+ operand1 = Tcl_GetStringFromObj(operand1Obj, &operand1Len);
litIndex = TclRegisterLiteral(envPtr, operand1, operand1Len, 0);
/*
@@ -2315,7 +2315,7 @@ FindLocalVar(
if (GetNextOperand(assemEnvPtr, tokenPtrPtr, &varNameObj) != TCL_OK) {
return -1;
}
- varNameStr = TclGetStringFromObj(varNameObj, &varNameLen);
+ varNameStr = Tcl_GetStringFromObj(varNameObj, &varNameLen);
if (CheckNamespaceQualifiers(interp, varNameStr, varNameLen)) {
Tcl_DecrRefCount(varNameObj);
return -1;
diff --git a/generic/tclAsync.c b/generic/tclAsync.c
index 8b0b61e..8c103de 100644
--- a/generic/tclAsync.c
+++ b/generic/tclAsync.c
@@ -5,8 +5,8 @@
* in a safe way. The code here doesn't actually handle signals, though.
* This code is based on proposals made by Mark Diekhans and Don Libes.
*
- * Copyright (c) 1993 The Regents of the University of California.
- * Copyright (c) 1994 Sun Microsystems, Inc.
+ * Copyright © 1993 The Regents of the University of California.
+ * Copyright © 1994 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index d2a017d..92d0ed4 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -5,13 +5,13 @@
* including interpreter creation and deletion, command creation and
* deletion, and command/script execution.
*
- * Copyright (c) 1987-1994 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
- * Copyright (c) 2001, 2002 by Kevin B. Kenny. All rights reserved.
- * Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved.
- * Copyright (c) 2008 Miguel Sofer <msofer@users.sourceforge.net>
+ * Copyright © 1987-1994 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 1998-1999 Scriptics Corporation.
+ * Copyright © 2001, 2002 Kevin B. Kenny. All rights reserved.
+ * Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2006-2008 Joe Mistachkin. All rights reserved.
+ * Copyright © 2008 Miguel Sofer <msofer@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1132,6 +1132,7 @@ Tcl_CreateInterp(void)
*/
Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, &tclStubs);
+ Tcl_PkgProvideEx(interp, "tcl", TCL_PATCH_LEVEL, &tclStubs);
if (TclTommath_Init(interp) != TCL_OK) {
Tcl_Panic("%s", Tcl_GetStringResult(interp));
@@ -3954,7 +3955,7 @@ Tcl_Canceled(
*/
if (iPtr->asyncCancelMsg != NULL) {
- message = TclGetStringFromObj(iPtr->asyncCancelMsg, &length);
+ message = Tcl_GetStringFromObj(iPtr->asyncCancelMsg, &length);
} else {
length = 0;
}
@@ -4053,7 +4054,7 @@ Tcl_CancelEval(
*/
if (resultObjPtr != NULL) {
- result = TclGetStringFromObj(resultObjPtr, &cancelInfo->length);
+ result = Tcl_GetStringFromObj(resultObjPtr, &cancelInfo->length);
cancelInfo->result = (char *)Tcl_Realloc(cancelInfo->result,cancelInfo->length);
memcpy(cancelInfo->result, result, cancelInfo->length);
TclDecrRefCount(resultObjPtr); /* Discard their result object. */
@@ -4552,7 +4553,7 @@ TEOV_Error(
*/
listPtr = Tcl_NewListObj(objc, objv);
- cmdString = TclGetStringFromObj(listPtr, &cmdLen);
+ cmdString = Tcl_GetStringFromObj(listPtr, &cmdLen);
Tcl_LogCommandInfo(interp, cmdString, cmdString, cmdLen);
Tcl_DecrRefCount(listPtr);
}
@@ -4698,7 +4699,7 @@ TEOV_RunEnterTraces(
Command *cmdPtr = *cmdPtrPtr;
size_t length, newEpoch, cmdEpoch = cmdPtr->cmdEpoch;
int traceCode = TCL_OK;
- const char *command = TclGetStringFromObj(commandPtr, &length);
+ const char *command = Tcl_GetStringFromObj(commandPtr, &length);
/*
* Call trace functions.
@@ -4750,7 +4751,7 @@ TEOV_RunLeaveTraces(
Command *cmdPtr = (Command *)data[2];
Tcl_Obj **objv = (Tcl_Obj **)data[3];
size_t length;
- const char *command = TclGetStringFromObj(commandPtr, &length);
+ const char *command = Tcl_GetStringFromObj(commandPtr, &length);
if (!(cmdPtr->flags & CMD_DYING)) {
if (cmdPtr->flags & CMD_HAS_EXEC_TRACES) {
@@ -5992,7 +5993,7 @@ TclNREvalObjEx(
Tcl_IncrRefCount(objPtr);
- script = TclGetStringFromObj(objPtr, &numSrcBytes);
+ script = Tcl_GetStringFromObj(objPtr, &numSrcBytes);
result = Tcl_EvalEx(interp, script, numSrcBytes, flags);
TclDecrRefCount(objPtr);
@@ -6023,7 +6024,7 @@ TEOEx_ByteCodeCallback(
ProcessUnexpectedResult(interp, result);
result = TCL_ERROR;
- script = TclGetStringFromObj(objPtr, &numSrcBytes);
+ script = Tcl_GetStringFromObj(objPtr, &numSrcBytes);
Tcl_LogCommandInfo(interp, script, script, numSrcBytes);
}
@@ -6554,7 +6555,7 @@ Tcl_AppendObjToErrorInfo(
Tcl_Obj *objPtr) /* Message to record. */
{
size_t length;
- const char *message = TclGetStringFromObj(objPtr, &length);
+ const char *message = Tcl_GetStringFromObj(objPtr, &length);
Interp *iPtr = (Interp *) interp;
Tcl_IncrRefCount(objPtr);
@@ -7138,7 +7139,7 @@ ExprAbsFunc(
} else if (l == 0) {
if (TclHasStringRep(objv[1])) {
size_t numBytes;
- const char *bytes = TclGetStringFromObj(objv[1], &numBytes);
+ const char *bytes = Tcl_GetStringFromObj(objv[1], &numBytes);
while (numBytes) {
if (*bytes == '-') {
@@ -7150,7 +7151,16 @@ ExprAbsFunc(
}
goto unChanged;
} else if (l == WIDE_MIN) {
- if (mp_init_i64(&big, l) != MP_OKAY) {
+ if (sizeof(Tcl_WideInt) > sizeof(int64_t)) {
+ Tcl_WideUInt ul = -(Tcl_WideUInt)WIDE_MIN;
+ if (mp_init(&big) != MP_OKAY || mp_unpack(&big, 1, 1,
+ sizeof(Tcl_WideInt), 0, 0, &ul) != MP_OKAY) {
+ return TCL_ERROR;
+ }
+ if (mp_neg(&big, &big) != MP_OKAY) {
+ return TCL_ERROR;
+ }
+ } else if (mp_init_i64(&big, l) != MP_OKAY) {
return TCL_ERROR;
}
goto tooLarge;
@@ -8035,8 +8045,8 @@ MathFuncWrongNumArgs(
}
}
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "too %s arguments for math function \"%s\"",
- (found < expected ? "few" : "many"), name));
+ "%s arguments for math function \"%s\"",
+ (found < expected ? "not enough" : "too many"), name));
Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL);
}
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 3d12e24..f7cb02d 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -4,8 +4,8 @@
* This file contains the implementation of the "binary" Tcl built-in
* command and the Tcl binary data object.
*
- * Copyright (c) 1997 by Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1997 Sun Microsystems, Inc.
+ * Copyright © 1998-1999 Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -491,7 +491,7 @@ TclGetBytesFromObj(
/*
*----------------------------------------------------------------------
*
- * Tcl_GetByteArrayFromObj --
+ * Tcl_GetByteArrayFromObj/TclGetByteArrayFromObj --
*
* Attempt to get the array of bytes from the Tcl object. If the object
* is not already a ByteArray object, an attempt will be made to convert
@@ -506,8 +506,9 @@ TclGetBytesFromObj(
*----------------------------------------------------------------------
*/
+#undef Tcl_GetByteArrayFromObj
unsigned char *
-Tcl_GetByteArrayFromObj(
+TclGetByteArrayFromObj(
Tcl_Obj *objPtr, /* The ByteArray object. */
int *lengthPtr) /* If non-NULL, filled with length of the
* array of bytes in the ByteArray object. */
@@ -531,9 +532,7 @@ Tcl_GetByteArrayFromObj(
if (lengthPtr) {
if (numBytes > INT_MAX) {
/* Caller asked for an int length, but true length is outside
- * the int range. This case will be developed out of existence
- * in Tcl 9. As interim measure, fail. */
-
+ * the int range. */
*lengthPtr = 0;
return NULL;
} else {
@@ -542,6 +541,32 @@ Tcl_GetByteArrayFromObj(
}
return bytes;
}
+
+unsigned char *
+Tcl_GetByteArrayFromObj(
+ Tcl_Obj *objPtr, /* The ByteArray object. */
+ size_t *lengthPtr) /* If non-NULL, filled with length of the
+ * array of bytes in the ByteArray object. */
+{
+ size_t numBytes = 0;
+ unsigned char *bytes = TclGetBytesFromObj(NULL, objPtr, &numBytes);
+
+ if (bytes == NULL) {
+ ByteArray *baPtr;
+ const Tcl_ObjIntRep *irPtr = TclFetchIntRep(objPtr, &tclByteArrayType);
+
+ assert(irPtr != NULL);
+
+ baPtr = GET_BYTEARRAY(irPtr);
+ bytes = baPtr->bytes;
+ numBytes = baPtr->used;
+ }
+
+ if (lengthPtr) {
+ *lengthPtr = numBytes;
+ }
+ return bytes;
+}
/*
*----------------------------------------------------------------------
@@ -637,7 +662,7 @@ SetByteArrayFromAny(
return TCL_OK;
}
- src = TclGetStringFromObj(objPtr, &length);
+ src = Tcl_GetStringFromObj(objPtr, &length);
bad = length;
srcEnd = src + length;
@@ -1029,7 +1054,7 @@ BinaryFormatCmd(
goto badIndex;
}
if (count == BINARY_ALL) {
- (void)TclGetByteArrayFromObj(objv[arg], &count);
+ (void)Tcl_GetByteArrayFromObj(objv[arg], &count);
} else if (count == BINARY_NOCOUNT) {
count = 1;
}
@@ -1193,7 +1218,7 @@ BinaryFormatCmd(
char pad = (char) (cmd == 'a' ? '\0' : ' ');
unsigned char *bytes;
- bytes = TclGetByteArrayFromObj(objv[arg], &length);
+ bytes = Tcl_GetByteArrayFromObj(objv[arg], &length);
arg++;
if (count == BINARY_ALL) {
count = length;
@@ -1213,7 +1238,7 @@ BinaryFormatCmd(
case 'B': {
unsigned char *last;
- str = TclGetStringFromObj(objv[arg], &length);
+ str = Tcl_GetStringFromObj(objv[arg], &length);
arg++;
if (count == BINARY_ALL) {
count = length;
@@ -1275,7 +1300,7 @@ BinaryFormatCmd(
unsigned char *last;
int c;
- str = TclGetStringFromObj(objv[arg], &length);
+ str = Tcl_GetStringFromObj(objv[arg], &length);
arg++;
if (count == BINARY_ALL) {
count = length;
@@ -1506,7 +1531,7 @@ BinaryScanCmd(
}
numberCachePtr = &numberCacheHash;
Tcl_InitHashTable(numberCachePtr, TCL_ONE_WORD_KEYS);
- buffer = TclGetByteArrayFromObj(objv[1], &length);
+ buffer = Tcl_GetByteArrayFromObj(objv[1], &length);
format = TclGetString(objv[2]);
arg = 3;
offset = 0;
@@ -1518,7 +1543,8 @@ BinaryScanCmd(
}
switch (cmd) {
case 'a':
- case 'A': {
+ case 'A':
+ case 'C': {
unsigned char *src;
if (arg >= objc) {
@@ -1540,10 +1566,18 @@ BinaryScanCmd(
size = count;
/*
- * Trim trailing nulls and spaces, if necessary.
+ * Apply C string semantics or trim trailing
+ * nulls and spaces, if necessary.
*/
- if (cmd == 'A') {
+ if (cmd == 'C') {
+ for (i = 0; i < size; i++) {
+ if (src[i] == '\0') {
+ size = i;
+ break;
+ }
+ }
+ } else if (cmd == 'A') {
while (size > 0) {
if (src[size - 1] != '\0' && src[size - 1] != ' ') {
break;
@@ -2559,7 +2593,7 @@ BinaryEncodeHex(
}
TclNewObj(resultObj);
- data = TclGetByteArrayFromObj(objv[1], &count);
+ data = Tcl_GetByteArrayFromObj(objv[1], &count);
cursor = Tcl_SetByteArrayLength(resultObj, count * 2);
for (offset = 0; offset < count; ++offset) {
*cursor++ = HexDigits[(data[offset] >> 4) & 0x0F];
@@ -2621,7 +2655,7 @@ BinaryDecodeHex(
data = TclGetBytesFromObj(NULL, objv[objc - 1], &count);
if (data == NULL) {
pure = 0;
- data = (unsigned char *) TclGetStringFromObj(objv[objc - 1], &count);
+ data = (unsigned char *) Tcl_GetStringFromObj(objv[objc - 1], &count);
}
datastart = data;
dataend = data + count;
@@ -2755,7 +2789,7 @@ BinaryEncode64(
objv[i + 1], &wrapcharlen);
if (wrapchar == NULL) {
purewrap = 0;
- wrapchar = TclGetStringFromObj(objv[i + 1], &wrapcharlen);
+ wrapchar = Tcl_GetStringFromObj(objv[i + 1], &wrapcharlen);
}
break;
}
@@ -2765,7 +2799,7 @@ BinaryEncode64(
}
TclNewObj(resultObj);
- data = TclGetByteArrayFromObj(objv[objc - 1], &count);
+ data = Tcl_GetByteArrayFromObj(objv[objc - 1], &count);
if (count > 0) {
unsigned char *cursor = NULL;
@@ -2876,7 +2910,7 @@ BinaryEncodeUu(
lineLength = ((lineLength - 1) & -4) + 1; /* 5, 9, 13 ... */
break;
case OPT_WRAPCHAR:
- wrapchar = (const unsigned char *) TclGetStringFromObj(
+ wrapchar = (const unsigned char *) Tcl_GetStringFromObj(
objv[i + 1], &wrapcharlen);
{
const unsigned char *p = wrapchar;
@@ -2918,7 +2952,7 @@ BinaryEncodeUu(
TclNewObj(resultObj);
offset = 0;
- data = TclGetByteArrayFromObj(objv[objc - 1], &count);
+ data = Tcl_GetByteArrayFromObj(objv[objc - 1], &count);
rawLength = (lineLength - 1) * 3 / 4;
start = cursor = Tcl_SetByteArrayLength(resultObj,
(lineLength + wrapcharlen) *
@@ -3018,7 +3052,7 @@ BinaryDecodeUu(
data = TclGetBytesFromObj(NULL, objv[objc - 1], &count);
if (data == NULL) {
pure = 0;
- data = (unsigned char *) TclGetStringFromObj(objv[objc - 1], &count);
+ data = (unsigned char *) Tcl_GetStringFromObj(objv[objc - 1], &count);
}
datastart = data;
dataend = data + count;
@@ -3193,7 +3227,7 @@ BinaryDecode64(
data = TclGetBytesFromObj(NULL, objv[objc - 1], &count);
if (data == NULL) {
pure = 0;
- data = (unsigned char *) TclGetStringFromObj(objv[objc - 1], &count);
+ data = (unsigned char *) Tcl_GetStringFromObj(objv[objc - 1], &count);
}
datastart = data;
dataend = data + count;
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c
index 5951cf0..fcf9a9d 100644
--- a/generic/tclCkalloc.c
+++ b/generic/tclCkalloc.c
@@ -5,9 +5,9 @@
* problems involving overwritten, double freeing memory and loss of
* memory.
*
- * Copyright (c) 1991-1994 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1991-1994 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 1998-1999 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/generic/tclClock.c b/generic/tclClock.c
index dbd24a8..810aeb2 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -5,9 +5,9 @@
* the time and date facilities of TclX, by Mark Diekhans and Karl
* Lehenbauer.
*
- * Copyright 1991-1995 Karl Lehenbauer and Mark Diekhans.
- * Copyright (c) 1995 Sun Microsystems, Inc.
- * Copyright (c) 2004 by Kevin B. Kenny. All rights reserved.
+ * Copyright © 1991-1995 Karl Lehenbauer & Mark Diekhans.
+ * Copyright © 1995 Sun Microsystems, Inc.
+ * Copyright © 2004 Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 15669be..f02bc33 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -4,8 +4,8 @@
* This file contains the top-level command routines for most of the Tcl
* built-in commands whose names begin with the letters A to H.
*
- * Copyright (c) 1987-1993 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 1987-1993 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -431,7 +431,7 @@ EncodingConvertfromObjCmd(
/*
* Convert the string into a byte array in 'ds'
*/
- bytesPtr = (char *) TclGetByteArrayFromObj(data, &length);
+ bytesPtr = (char *) Tcl_GetByteArrayFromObj(data, &length);
Tcl_ExternalToUtfDString(encoding, bytesPtr, length, &ds);
/*
@@ -496,7 +496,7 @@ EncodingConverttoObjCmd(
* Convert the string to a byte array in 'ds'
*/
- stringPtr = TclGetStringFromObj(data, &length);
+ stringPtr = Tcl_GetStringFromObj(data, &length);
Tcl_UtfToExternalDString(encoding, stringPtr, length, &ds);
Tcl_SetObjResult(interp,
Tcl_NewByteArrayObj((unsigned char*) Tcl_DStringValue(&ds),
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 5a8ef22..75eb441 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -6,12 +6,12 @@
* contains only commands in the generic core (i.e., those that don't
* depend much upon UNIX facilities).
*
- * Copyright (c) 1987-1993 The Regents of the University of California.
- * Copyright (c) 1993-1997 Lucent Technologies.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
- * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
- * Copyright (c) 2005 Donal K. Fellows.
+ * Copyright © 1987-1993 The Regents of the University of California.
+ * Copyright © 1993-1997 Lucent Technologies.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 1998-1999 Scriptics Corporation.
+ * Copyright © 2001 Kevin B. Kenny. All rights reserved.
+ * Copyright © 2005 Donal K. Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -545,7 +545,7 @@ InfoBodyCmd(
* the object do not invalidate the internal rep.
*/
- bytes = TclGetStringFromObj(procPtr->bodyPtr, &numBytes);
+ bytes = Tcl_GetStringFromObj(procPtr->bodyPtr, &numBytes);
Tcl_SetObjResult(interp, Tcl_NewStringObj(bytes, numBytes));
return TCL_OK;
}
@@ -2212,7 +2212,7 @@ Tcl_JoinObjCmd(
joinObjPtr = (objc == 2) ? Tcl_NewStringObj(" ", 1) : objv[2];
Tcl_IncrRefCount(joinObjPtr);
- (void) TclGetStringFromObj(joinObjPtr, &length);
+ (void) Tcl_GetStringFromObj(joinObjPtr, &length);
if (length == 0) {
resObjPtr = TclStringCat(interp, listLen, elemPtrs, 0);
} else {
@@ -3539,7 +3539,7 @@ Tcl_LsearchObjCmd(
switch ((enum datatypes) dataType) {
case ASCII:
case DICTIONARY:
- patternBytes = TclGetStringFromObj(patObj, &length);
+ patternBytes = Tcl_GetStringFromObj(patObj, &length);
break;
case INTEGER:
result = TclGetWideIntFromObj(interp, patObj, &patWide);
@@ -3569,7 +3569,7 @@ Tcl_LsearchObjCmd(
break;
}
} else {
- patternBytes = TclGetStringFromObj(patObj, &length);
+ patternBytes = Tcl_GetStringFromObj(patObj, &length);
}
/*
@@ -3713,7 +3713,7 @@ Tcl_LsearchObjCmd(
case EXACT:
switch ((enum datatypes) dataType) {
case ASCII:
- bytes = TclGetStringFromObj(itemPtr, &elemLen);
+ bytes = Tcl_GetStringFromObj(itemPtr, &elemLen);
if (length == elemLen) {
/*
* This split allows for more optimal compilation of
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index d5828cd..848b1dc 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -6,11 +6,11 @@
* contains only commands in the generic core (i.e. those that don't
* depend much upon UNIX facilities).
*
- * Copyright (c) 1987-1993 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 Scriptics Corporation.
- * Copyright (c) 2002 ActiveState Corporation.
- * Copyright (c) 2003-2009 Donal K. Fellows.
+ * Copyright © 1987-1993 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 1998-2000 Scriptics Corporation.
+ * Copyright © 2002 ActiveState Corporation.
+ * Copyright © 2003-2009 Donal K. Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -36,31 +36,31 @@ static int UniCharIsHexDigit(int character);
*/
const char tclDefaultTrimSet[] =
- "\x09\x0a\x0b\x0c\x0d " /* ASCII */
- "\xc0\x80" /* nul (U+0000) */
- "\xc2\x85" /* next line (U+0085) */
- "\xc2\xa0" /* non-breaking space (U+00a0) */
- "\xe1\x9a\x80" /* ogham space mark (U+1680) */
- "\xe1\xa0\x8e" /* mongolian vowel separator (U+180e) */
- "\xe2\x80\x80" /* en quad (U+2000) */
- "\xe2\x80\x81" /* em quad (U+2001) */
- "\xe2\x80\x82" /* en space (U+2002) */
- "\xe2\x80\x83" /* em space (U+2003) */
- "\xe2\x80\x84" /* three-per-em space (U+2004) */
- "\xe2\x80\x85" /* four-per-em space (U+2005) */
- "\xe2\x80\x86" /* six-per-em space (U+2006) */
- "\xe2\x80\x87" /* figure space (U+2007) */
- "\xe2\x80\x88" /* punctuation space (U+2008) */
- "\xe2\x80\x89" /* thin space (U+2009) */
- "\xe2\x80\x8a" /* hair space (U+200a) */
- "\xe2\x80\x8b" /* zero width space (U+200b) */
- "\xe2\x80\xa8" /* line separator (U+2028) */
- "\xe2\x80\xa9" /* paragraph separator (U+2029) */
- "\xe2\x80\xaf" /* narrow no-break space (U+202f) */
- "\xe2\x81\x9f" /* medium mathematical space (U+205f) */
- "\xe2\x81\xa0" /* word joiner (U+2060) */
- "\xe3\x80\x80" /* ideographic space (U+3000) */
- "\xef\xbb\xbf" /* zero width no-break space (U+feff) */
+ "\x09\x0A\x0B\x0C\x0D " /* ASCII */
+ "\xC0\x80" /* nul (U+0000) */
+ "\xC2\x85" /* next line (U+0085) */
+ "\xC2\xA0" /* non-breaking space (U+00a0) */
+ "\xE1\x9A\x80" /* ogham space mark (U+1680) */
+ "\xE1\xA0\x8E" /* mongolian vowel separator (U+180e) */
+ "\xE2\x80\x80" /* en quad (U+2000) */
+ "\xE2\x80\x81" /* em quad (U+2001) */
+ "\xE2\x80\x82" /* en space (U+2002) */
+ "\xE2\x80\x83" /* em space (U+2003) */
+ "\xE2\x80\x84" /* three-per-em space (U+2004) */
+ "\xE2\x80\x85" /* four-per-em space (U+2005) */
+ "\xE2\x80\x86" /* six-per-em space (U+2006) */
+ "\xE2\x80\x87" /* figure space (U+2007) */
+ "\xE2\x80\x88" /* punctuation space (U+2008) */
+ "\xE2\x80\x89" /* thin space (U+2009) */
+ "\xE2\x80\x8A" /* hair space (U+200a) */
+ "\xE2\x80\x8B" /* zero width space (U+200b) */
+ "\xE2\x80\xA8" /* line separator (U+2028) */
+ "\xE2\x80\xA9" /* paragraph separator (U+2029) */
+ "\xE2\x80\xAF" /* narrow no-break space (U+202f) */
+ "\xE2\x81\x9F" /* medium mathematical space (U+205f) */
+ "\xE2\x81\xA0" /* word joiner (U+2060) */
+ "\xE3\x80\x80" /* ideographic space (U+3000) */
+ "\xEF\xBB\xBF" /* zero width no-break space (U+feff) */
;
/*
@@ -608,9 +608,9 @@ Tcl_RegsubObjCmd(
nocase = (cflags & TCL_REG_NOCASE);
strCmpFn = nocase ? TclUniCharNcasecmp : TclUniCharNcmp;
- wsrc = TclGetUnicodeFromObj(objv[0], &slen);
- wstring = TclGetUnicodeFromObj(objv[1], &wlen);
- wsubspec = TclGetUnicodeFromObj(objv[2], &wsublen);
+ wsrc = Tcl_GetUnicodeFromObj(objv[0], &slen);
+ wstring = Tcl_GetUnicodeFromObj(objv[1], &wlen);
+ wsubspec = Tcl_GetUnicodeFromObj(objv[2], &wsublen);
wend = wstring + wlen - (slen ? slen - 1 : 0);
result = TCL_OK;
@@ -700,14 +700,14 @@ Tcl_RegsubObjCmd(
} else {
objPtr = objv[1];
}
- wstring = TclGetUnicodeFromObj(objPtr, &wlen);
+ wstring = Tcl_GetUnicodeFromObj(objPtr, &wlen);
if (objv[2] == objv[0]) {
subPtr = Tcl_DuplicateObj(objv[2]);
} else {
subPtr = objv[2];
}
if (!command) {
- wsubspec = TclGetUnicodeFromObj(subPtr, &wsublen);
+ wsubspec = Tcl_GetUnicodeFromObj(subPtr, &wsublen);
}
result = TCL_OK;
@@ -827,7 +827,7 @@ Tcl_RegsubObjCmd(
* the user code.
*/
- wstring = TclGetUnicodeFromObj(objPtr, &wlen);
+ wstring = Tcl_GetUnicodeFromObj(objPtr, &wlen);
offset += end;
if (end == 0 || start == end) {
@@ -1187,13 +1187,13 @@ Tcl_SplitObjCmd(
splitChars = " \n\t\r";
splitCharLen = 4;
} else if (objc == 3) {
- splitChars = TclGetStringFromObj(objv[2], &splitCharLen);
+ splitChars = Tcl_GetStringFromObj(objv[2], &splitCharLen);
} else {
Tcl_WrongNumArgs(interp, 1, objv, "string ?splitChars?");
return TCL_ERROR;
}
- stringPtr = TclGetStringFromObj(objv[1], &stringLen);
+ stringPtr = Tcl_GetStringFromObj(objv[1], &stringLen);
end = stringPtr + stringLen;
listPtr = Tcl_NewObj();
@@ -1619,7 +1619,7 @@ StringIsCmd(
if (strict) {
result = 0;
} else {
- string1 = TclGetStringFromObj(objPtr, &length1);
+ string1 = Tcl_GetStringFromObj(objPtr, &length1);
result = length1 == 0;
}
} else if ((objPtr->internalRep.wideValue != 0)
@@ -1648,7 +1648,7 @@ StringIsCmd(
size_t elemSize;
const char *p;
- string1 = TclGetStringFromObj(objPtr, &length1);
+ string1 = Tcl_GetStringFromObj(objPtr, &length1);
end = string1 + length1;
failat = -1;
for (p=string1, lenRemain=length1; lenRemain > 0;
@@ -1688,7 +1688,7 @@ StringIsCmd(
TclHasIntRep(objPtr, &tclBignumType)) {
break;
}
- string1 = TclGetStringFromObj(objPtr, &length1);
+ string1 = Tcl_GetStringFromObj(objPtr, &length1);
if (length1 == 0) {
if (strict) {
result = 0;
@@ -1718,7 +1718,7 @@ StringIsCmd(
TclHasIntRep(objPtr, &tclBignumType)) {
break;
}
- string1 = TclGetStringFromObj(objPtr, &length1);
+ string1 = Tcl_GetStringFromObj(objPtr, &length1);
if (length1 == 0) {
if (strict) {
result = 0;
@@ -1760,7 +1760,7 @@ StringIsCmd(
break;
}
- string1 = TclGetStringFromObj(objPtr, &length1);
+ string1 = Tcl_GetStringFromObj(objPtr, &length1);
if (length1 == 0) {
if (strict) {
result = 0;
@@ -1829,7 +1829,7 @@ StringIsCmd(
size_t elemSize;
const char *p;
- string1 = TclGetStringFromObj(objPtr, &length1);
+ string1 = Tcl_GetStringFromObj(objPtr, &length1);
end = string1 + length1;
failat = -1;
for (p=string1, lenRemain=length1; lenRemain > 0;
@@ -1884,7 +1884,7 @@ StringIsCmd(
}
if (chcomp != NULL) {
- string1 = TclGetStringFromObj(objPtr, &length1);
+ string1 = Tcl_GetStringFromObj(objPtr, &length1);
if (length1 == 0) {
if (strict) {
result = 0;
@@ -1970,7 +1970,7 @@ StringMapCmd(
}
if (objc == 4) {
- const char *string = TclGetStringFromObj(objv[1], &length2);
+ const char *string = Tcl_GetStringFromObj(objv[1], &length2);
if ((length2 > 1) &&
strncmp(string, "-nocase", length2) == 0) {
@@ -2062,7 +2062,7 @@ StringMapCmd(
} else {
sourceObj = objv[objc-1];
}
- ustring1 = TclGetUnicodeFromObj(sourceObj, &length1);
+ ustring1 = Tcl_GetUnicodeFromObj(sourceObj, &length1);
if (length1 == 0) {
/*
* Empty input string, just stop now.
@@ -2092,7 +2092,7 @@ StringMapCmd(
int u2lc;
Tcl_UniChar *mapString;
- ustring2 = TclGetUnicodeFromObj(mapElemv[0], &length2);
+ ustring2 = Tcl_GetUnicodeFromObj(mapElemv[0], &length2);
p = ustring1;
if ((length2 > length1) || (length2 == 0)) {
/*
@@ -2101,7 +2101,7 @@ StringMapCmd(
ustring1 = end;
} else {
- mapString = TclGetUnicodeFromObj(mapElemv[1], &mapLen);
+ mapString = Tcl_GetUnicodeFromObj(mapElemv[1], &mapLen);
u2lc = (nocase ? Tcl_UniCharToLower(*ustring2) : 0);
for (; ustring1 < end; ustring1++) {
if (((*ustring1 == *ustring2) ||
@@ -2138,7 +2138,7 @@ StringMapCmd(
u2lc = (int *)TclStackAlloc(interp, mapElemc * sizeof(int));
}
for (index = 0; index < mapElemc; index++) {
- mapStrings[index] = TclGetUnicodeFromObj(mapElemv[index],
+ mapStrings[index] = Tcl_GetUnicodeFromObj(mapElemv[index],
mapLens+index);
if (nocase && ((index % 2) == 0)) {
u2lc[index/2] = Tcl_UniCharToLower(*mapStrings[index]);
@@ -2242,7 +2242,7 @@ StringMatchCmd(
if (objc == 4) {
size_t length;
- const char *string = TclGetStringFromObj(objv[1], &length);
+ const char *string = Tcl_GetStringFromObj(objv[1], &length);
if ((length > 1) &&
strncmp(string, "-nocase", length) == 0) {
@@ -2505,8 +2505,8 @@ StringStartCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int ch;
- const char *p, *string;
- size_t numChars, length, cur, index;
+ const Tcl_UniChar *p, *string;
+ size_t cur, index, length;
Tcl_Obj *obj;
if (objc != 3) {
@@ -2514,32 +2514,30 @@ StringStartCmd(
return TCL_ERROR;
}
- string = TclGetStringFromObj(objv[1], &length);
- numChars = Tcl_NumUtfChars(string, length) - 1;
- if (TclGetIntForIndexM(interp, objv[2], numChars, &index) != TCL_OK) {
+ string = Tcl_GetUnicodeFromObj(objv[1], &length);
+ if (TclGetIntForIndexM(interp, objv[2], length-1, &index) != TCL_OK) {
return TCL_ERROR;
}
- string = TclGetString(objv[1]);
- if (index + 1 > numChars + 1) {
- index = numChars;
+ if (index + 1 >= length + 1) {
+ index = length - 1;
}
cur = 0;
if (index + 1 > 1) {
- p = Tcl_UtfAtIndex(string, index);
+ p = &string[index];
- TclUtfToUCS4(p, &ch);
+ (void)TclUniCharToUCS4(p, &ch);
for (cur = index; cur != TCL_INDEX_NONE; cur--) {
int delta = 0;
- const char *next;
+ const Tcl_UniChar *next;
if (!Tcl_UniCharIsWordChar(ch)) {
break;
}
- next = TclUtfPrev(p, string);
+ next = TclUCS4Prev(p, string);
do {
next += delta;
- delta = TclUtfToUCS4(next, &ch);
+ delta = TclUniCharToUCS4(next, &ch);
} while (next + delta < p);
p = next;
}
@@ -2577,8 +2575,8 @@ StringEndCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int ch;
- const char *p, *end, *string;
- size_t length, numChars, cur, index;
+ const Tcl_UniChar *p, *end, *string;
+ size_t cur, index, length;
Tcl_Obj *obj;
if (objc != 3) {
@@ -2586,20 +2584,18 @@ StringEndCmd(
return TCL_ERROR;
}
- string = TclGetStringFromObj(objv[1], &length);
- numChars = Tcl_NumUtfChars(string, length) - 1;
- if (TclGetIntForIndexM(interp, objv[2], numChars, &index) != TCL_OK) {
+ string = Tcl_GetUnicodeFromObj(objv[1], &length);
+ if (TclGetIntForIndexM(interp, objv[2], length-1, &index) != TCL_OK) {
return TCL_ERROR;
}
- string = TclGetStringFromObj(objv[1], &length);
if (index == TCL_INDEX_NONE) {
index = TCL_INDEX_START;
}
- if (index + 1 <= numChars + 1) {
- p = Tcl_UtfAtIndex(string, index);
+ if (index + 1 <= length + 1) {
+ p = &string[index];
end = string+length;
for (cur = index; p < end; cur++) {
- p += TclUtfToUCS4(p, &ch);
+ p += TclUniCharToUCS4(p, &ch);
if (!Tcl_UniCharIsWordChar(ch)) {
break;
}
@@ -2608,7 +2604,7 @@ StringEndCmd(
cur++;
}
} else {
- cur = numChars + 1;
+ cur = length;
}
TclNewIndexObj(obj, cur);
Tcl_SetObjResult(interp, obj);
@@ -2658,7 +2654,7 @@ StringEqualCmd(
}
for (i = 1; i < objc-2; i++) {
- string2 = TclGetStringFromObj(objv[i], &length);
+ string2 = Tcl_GetStringFromObj(objv[i], &length);
if ((length > 1) && !strncmp(string2, "-nocase", length)) {
nocase = 1;
} else if ((length > 1)
@@ -2757,7 +2753,7 @@ TclStringCmpOpts(
}
for (i = 1; i < objc-2; i++) {
- string = TclGetStringFromObj(objv[i], &length);
+ string = Tcl_GetStringFromObj(objv[i], &length);
if ((length > 1) && !strncmp(string, "-nocase", length)) {
*nocase = 1;
} else if ((length > 1)
@@ -2858,7 +2854,7 @@ StringBytesCmd(
return TCL_ERROR;
}
- (void) TclGetStringFromObj(objv[1], &length);
+ (void) Tcl_GetStringFromObj(objv[1], &length);
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(length));
return TCL_OK;
}
@@ -2931,7 +2927,7 @@ StringLowerCmd(
return TCL_ERROR;
}
- string1 = TclGetStringFromObj(objv[1], &length1);
+ string1 = Tcl_GetStringFromObj(objv[1], &length1);
if (objc == 2) {
Tcl_Obj *resultPtr = Tcl_NewStringObj(string1, length1);
@@ -2966,7 +2962,7 @@ StringLowerCmd(
return TCL_OK;
}
- string1 = TclGetStringFromObj(objv[1], &length1);
+ string1 = Tcl_GetStringFromObj(objv[1], &length1);
start = Tcl_UtfAtIndex(string1, first);
end = Tcl_UtfAtIndex(start, last - first + 1);
resultPtr = Tcl_NewStringObj(string1, end - string1);
@@ -3016,7 +3012,7 @@ StringUpperCmd(
return TCL_ERROR;
}
- string1 = TclGetStringFromObj(objv[1], &length1);
+ string1 = Tcl_GetStringFromObj(objv[1], &length1);
if (objc == 2) {
Tcl_Obj *resultPtr = Tcl_NewStringObj(string1, length1);
@@ -3051,7 +3047,7 @@ StringUpperCmd(
return TCL_OK;
}
- string1 = TclGetStringFromObj(objv[1], &length1);
+ string1 = Tcl_GetStringFromObj(objv[1], &length1);
start = Tcl_UtfAtIndex(string1, first);
end = Tcl_UtfAtIndex(start, last - first + 1);
resultPtr = Tcl_NewStringObj(string1, end - string1);
@@ -3101,7 +3097,7 @@ StringTitleCmd(
return TCL_ERROR;
}
- string1 = TclGetStringFromObj(objv[1], &length1);
+ string1 = Tcl_GetStringFromObj(objv[1], &length1);
if (objc == 2) {
Tcl_Obj *resultPtr = Tcl_NewStringObj(string1, length1);
@@ -3136,7 +3132,7 @@ StringTitleCmd(
return TCL_OK;
}
- string1 = TclGetStringFromObj(objv[1], &length1);
+ string1 = Tcl_GetStringFromObj(objv[1], &length1);
start = Tcl_UtfAtIndex(string1, first);
end = Tcl_UtfAtIndex(start, last - first + 1);
resultPtr = Tcl_NewStringObj(string1, end - string1);
@@ -3181,7 +3177,7 @@ StringTrimCmd(
size_t triml, trimr, length1, length2;
if (objc == 3) {
- string2 = TclGetStringFromObj(objv[2], &length2);
+ string2 = Tcl_GetStringFromObj(objv[2], &length2);
} else if (objc == 2) {
string2 = tclDefaultTrimSet;
length2 = strlen(tclDefaultTrimSet);
@@ -3189,7 +3185,7 @@ StringTrimCmd(
Tcl_WrongNumArgs(interp, 1, objv, "string ?chars?");
return TCL_ERROR;
}
- string1 = TclGetStringFromObj(objv[1], &length1);
+ string1 = Tcl_GetStringFromObj(objv[1], &length1);
triml = TclTrim(string1, length1, string2, length2, &trimr);
@@ -3229,7 +3225,7 @@ StringTrimLCmd(
size_t length1, length2;
if (objc == 3) {
- string2 = TclGetStringFromObj(objv[2], &length2);
+ string2 = Tcl_GetStringFromObj(objv[2], &length2);
} else if (objc == 2) {
string2 = tclDefaultTrimSet;
length2 = strlen(tclDefaultTrimSet);
@@ -3237,7 +3233,7 @@ StringTrimLCmd(
Tcl_WrongNumArgs(interp, 1, objv, "string ?chars?");
return TCL_ERROR;
}
- string1 = TclGetStringFromObj(objv[1], &length1);
+ string1 = Tcl_GetStringFromObj(objv[1], &length1);
trim = TclTrimLeft(string1, length1, string2, length2);
@@ -3276,7 +3272,7 @@ StringTrimRCmd(
size_t length1, length2;
if (objc == 3) {
- string2 = TclGetStringFromObj(objv[2], &length2);
+ string2 = Tcl_GetStringFromObj(objv[2], &length2);
} else if (objc == 2) {
string2 = tclDefaultTrimSet;
length2 = strlen(tclDefaultTrimSet);
@@ -3284,7 +3280,7 @@ StringTrimRCmd(
Tcl_WrongNumArgs(interp, 1, objv, "string ?chars?");
return TCL_ERROR;
}
- string1 = TclGetStringFromObj(objv[1], &length1);
+ string1 = Tcl_GetStringFromObj(objv[1], &length1);
trim = TclTrimRight(string1, length1, string2, length2);
@@ -3697,7 +3693,7 @@ TclNRSwitchObjCmd(
* See if the pattern matches the string.
*/
- pattern = TclGetStringFromObj(objv[i], &patternLength);
+ pattern = Tcl_GetStringFromObj(objv[i], &patternLength);
if ((i == objc - 2) && (*pattern == 'd')
&& (strcmp(pattern, "default") == 0)) {
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 7412e2f..c382c52 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -4,10 +4,10 @@
* This file contains compilation procedures that compile various Tcl
* commands into a sequence of instructions ("bytecodes").
*
- * Copyright (c) 1997-1998 Sun Microsystems, Inc.
- * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
- * Copyright (c) 2002 ActiveState Corporation.
- * Copyright (c) 2004-2013 by Donal K. Fellows.
+ * Copyright © 1997-1998 Sun Microsystems, Inc.
+ * Copyright © 2001 Kevin B. Kenny. All rights reserved.
+ * Copyright © 2002 ActiveState Corporation.
+ * Copyright © 2004-2013 Donal K. Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -896,7 +896,7 @@ TclCompileConcatCmd(
Tcl_ListObjGetElements(NULL, listObj, &len, &objs);
objPtr = Tcl_ConcatObj(len, objs);
Tcl_DecrRefCount(listObj);
- bytes = TclGetStringFromObj(objPtr, &slen);
+ bytes = Tcl_GetStringFromObj(objPtr, &slen);
PushLiteral(envPtr, bytes, slen);
Tcl_DecrRefCount(objPtr);
return TCL_OK;
@@ -1333,7 +1333,7 @@ TclCompileDictCreateCmd(
* We did! Excellent. The "verifyDict" is to do type forcing.
*/
- bytes = TclGetStringFromObj(dictObj, &len);
+ bytes = Tcl_GetStringFromObj(dictObj, &len);
PushLiteral(envPtr, bytes, len);
TclEmitOpcode( INST_DUP, envPtr);
TclEmitOpcode( INST_DICT_VERIFY, envPtr);
@@ -2773,7 +2773,7 @@ CompileEachloopCmd(
Tcl_ListObjIndex(NULL, varListObj, j, &varNameObj);
- bytes = TclGetStringFromObj(varNameObj, &length);
+ bytes = Tcl_GetStringFromObj(varNameObj, &length);
varIndex = LocalScalar(bytes, length, envPtr);
if (varIndex < 0) {
code = TCL_ERROR;
@@ -3210,7 +3210,7 @@ TclCompileFormatCmd(
* literal. Job done.
*/
- bytes = TclGetStringFromObj(tmpObj, &len);
+ bytes = Tcl_GetStringFromObj(tmpObj, &len);
PushLiteral(envPtr, bytes, len);
Tcl_DecrRefCount(tmpObj);
return TCL_OK;
@@ -3281,7 +3281,7 @@ TclCompileFormatCmd(
if (*++bytes == '%') {
Tcl_AppendToObj(tmpObj, "%", 1);
} else {
- const char *b = TclGetStringFromObj(tmpObj, &len);
+ const char *b = Tcl_GetStringFromObj(tmpObj, &len);
/*
* If there is a non-empty literal from the format string,
@@ -3315,7 +3315,7 @@ TclCompileFormatCmd(
*/
Tcl_AppendToObj(tmpObj, start, bytes - start);
- bytes = TclGetStringFromObj(tmpObj, &len);
+ bytes = Tcl_GetStringFromObj(tmpObj, &len);
if (len > 0) {
PushLiteral(envPtr, bytes, len);
i++;
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index 9dda453..ecd087e 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -5,10 +5,10 @@
* commands (beginning with the letters 'g' through 'r') into a sequence
* of instructions ("bytecodes").
*
- * Copyright (c) 1997-1998 Sun Microsystems, Inc.
- * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
- * Copyright (c) 2002 ActiveState Corporation.
- * Copyright (c) 2004-2013 by Donal K. Fellows.
+ * Copyright © 1997-1998 Sun Microsystems, Inc.
+ * Copyright © 2001 Kevin B. Kenny. All rights reserved.
+ * Copyright © 2002 ActiveState Corporation.
+ * Copyright © 2004-2013 Donal K. Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1065,7 +1065,7 @@ TclCompileLindexCmd(
int i, idx, numWords = parsePtr->numWords;
/*
- * Quit if too few args.
+ * Quit if not enough args.
*/
/* TODO: Consider support for compiling expanded args. */
@@ -2304,7 +2304,7 @@ TclCompileRegsubCmd(
* replacement "simple"?
*/
- bytes = TclGetStringFromObj(patternObj, &len);
+ bytes = Tcl_GetStringFromObj(patternObj, &len);
if (TclReToGlob(NULL, bytes, len, &pattern, &exact, &quantified)
!= TCL_OK || exact || quantified) {
goto done;
@@ -2352,7 +2352,7 @@ TclCompileRegsubCmd(
result = TCL_OK;
bytes = Tcl_DStringValue(&pattern) + 1;
PushLiteral(envPtr, bytes, len);
- bytes = TclGetStringFromObj(replacementObj, &len);
+ bytes = Tcl_GetStringFromObj(replacementObj, &len);
PushLiteral(envPtr, bytes, len);
CompileWord(envPtr, stringTokenPtr, interp, parsePtr->numWords - 2);
TclEmitOpcode( INST_STR_MAP, envPtr);
@@ -2610,7 +2610,7 @@ TclCompileSyntaxError(
{
Tcl_Obj *msg = Tcl_GetObjResult(interp);
size_t numBytes;
- const char *bytes = TclGetStringFromObj(msg, &numBytes);
+ const char *bytes = Tcl_GetStringFromObj(msg, &numBytes);
TclErrorStackResetIf(interp, bytes, numBytes);
TclEmitPush(TclRegisterLiteral(envPtr, bytes, numBytes, 0), envPtr);
@@ -2868,7 +2868,7 @@ IndexTailVarIfKnown(
Tcl_SetStringObj(tailPtr, lastTokenPtr->start, lastTokenPtr->size);
}
- tailName = TclGetStringFromObj(tailPtr, &len);
+ tailName = Tcl_GetStringFromObj(tailPtr, &len);
if (len) {
if (*(tailName + len - 1) == ')') {
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index f3865ea..5b752b3 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -6,10 +6,10 @@
* [upvar] and [variable]) into a sequence of instructions ("bytecodes").
* Also includes the operator command compilers.
*
- * Copyright (c) 1997-1998 Sun Microsystems, Inc.
- * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
- * Copyright (c) 2002 ActiveState Corporation.
- * Copyright (c) 2004-2010 by Donal K. Fellows.
+ * Copyright © 1997-1998 Sun Microsystems, Inc.
+ * Copyright © 2001 Kevin B. Kenny. All rights reserved.
+ * Copyright © 2002 ActiveState Corporation.
+ * Copyright © 2004-2010 Donal K. Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -253,7 +253,7 @@ TclCompileStringCatCmd(
Tcl_DecrRefCount(obj);
if (folded) {
size_t len;
- const char *bytes = TclGetStringFromObj(folded, &len);
+ const char *bytes = Tcl_GetStringFromObj(folded, &len);
PushLiteral(envPtr, bytes, len);
Tcl_DecrRefCount(folded);
@@ -271,7 +271,7 @@ TclCompileStringCatCmd(
}
if (folded) {
size_t len;
- const char *bytes = TclGetStringFromObj(folded, &len);
+ const char *bytes = Tcl_GetStringFromObj(folded, &len);
PushLiteral(envPtr, bytes, len);
Tcl_DecrRefCount(folded);
@@ -462,7 +462,7 @@ TclCompileStringInsertCmd(
TCL_INDEX_END, &idx)) {
/* Nothing useful knowable - cease compile; let it direct eval */
- return TCL_OK;
+ return TCL_ERROR;
}
/* Compute and push the string to be inserted */
@@ -951,12 +951,12 @@ TclCompileStringMapCmd(
* correct semantics for mapping.
*/
- bytes = TclGetStringFromObj(objv[0], &slen);
+ bytes = Tcl_GetStringFromObj(objv[0], &slen);
if (slen == 0) {
CompileWord(envPtr, stringTokenPtr, interp, 2);
} else {
PushLiteral(envPtr, bytes, slen);
- bytes = TclGetStringFromObj(objv[1], &slen);
+ bytes = Tcl_GetStringFromObj(objv[1], &slen);
PushLiteral(envPtr, bytes, slen);
CompileWord(envPtr, stringTokenPtr, interp, 2);
OP(STR_MAP);
@@ -2914,7 +2914,7 @@ TclCompileTryCmd(
}
if (objc > 0) {
size_t len;
- const char *varname = TclGetStringFromObj(objv[0], &len);
+ const char *varname = Tcl_GetStringFromObj(objv[0], &len);
resultVarIndices[i] = LocalScalar(varname, len, envPtr);
if (resultVarIndices[i] < 0) {
@@ -2926,7 +2926,7 @@ TclCompileTryCmd(
}
if (objc == 2) {
size_t len;
- const char *varname = TclGetStringFromObj(objv[1], &len);
+ const char *varname = Tcl_GetStringFromObj(objv[1], &len);
optionVarIndices[i] = LocalScalar(varname, len, envPtr);
if (optionVarIndices[i] < 0) {
@@ -3130,7 +3130,7 @@ IssueTryClausesInstructions(
OP4( DICT_GET, 1);
TclAdjustStackDepth(-1, envPtr);
OP44( LIST_RANGE_IMM, 0, len-1);
- p = TclGetStringFromObj(matchClauses[i], &slen);
+ p = Tcl_GetStringFromObj(matchClauses[i], &slen);
PushLiteral(envPtr, p, slen);
OP( STR_EQ);
JUMP4( JUMP_FALSE, notECJumpSource);
@@ -3342,7 +3342,7 @@ IssueTryClausesFinallyInstructions(
OP4( DICT_GET, 1);
TclAdjustStackDepth(-1, envPtr);
OP44( LIST_RANGE_IMM, 0, len-1);
- p = TclGetStringFromObj(matchClauses[i], &slen);
+ p = Tcl_GetStringFromObj(matchClauses[i], &slen);
PushLiteral(envPtr, p, slen);
OP( STR_EQ);
JUMP4( JUMP_FALSE, notECJumpSource);
@@ -3670,7 +3670,7 @@ TclCompileUnsetCmd(
const char *bytes;
size_t len;
- bytes = TclGetStringFromObj(leadingWord, &len);
+ bytes = Tcl_GetStringFromObj(leadingWord, &len);
if (i == 1 && len == 11 && !strncmp("-nocomplain", bytes, 11)) {
flags = 0;
haveFlags++;
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index bf677da..847a240 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -164,6 +164,8 @@ enum Marks {
* "=" is encountered. */
#define INVALID 5 /* A parse error. Used when any punctuation
* appears that's not a supported operator. */
+#define COMMENT 6 /* Comment. Lasts to end of line or end of
+ * expression, whichever comes first. */
/* Leaf lexemes */
@@ -462,7 +464,7 @@ static const unsigned char Lexeme[] = {
INVALID /* FS */, INVALID /* GS */,
INVALID /* RS */, INVALID /* US */,
INVALID /* SPACE */, 0 /* ! or != */,
- QUOTED /* " */, INVALID /* # */,
+ QUOTED /* " */, 0 /* # */,
VARIABLE /* $ */, MOD /* % */,
0 /* & or && */, INVALID /* ' */,
OPEN_PAREN /* ( */, CLOSE_PAREN /* ) */,
@@ -674,9 +676,10 @@ ParseExpr(
OpNode *newPtr = NULL;
do {
- if (size <= UINT_MAX/sizeof(OpNode)) {
- newPtr = (OpNode *)Tcl_AttemptRealloc(nodes, size * sizeof(OpNode));
- }
+ if (size <= UINT_MAX/sizeof(OpNode)) {
+ newPtr = (OpNode *) Tcl_AttemptRealloc(nodes,
+ size * sizeof(OpNode));
+ }
} while ((newPtr == NULL)
&& ((size -= (size - nodesUsed) / 2) > nodesUsed));
if (newPtr == NULL) {
@@ -708,6 +711,10 @@ ParseExpr(
int b;
switch (lexeme) {
+ case COMMENT:
+ start += scanned;
+ numBytes -= scanned;
+ continue;
case INVALID:
msg = Tcl_ObjPrintf("invalid character \"%.*s\"",
(int)scanned, start);
@@ -742,6 +749,32 @@ ParseExpr(
} else if (Tcl_GetBooleanFromObj(NULL,literal,&b) == TCL_OK) {
lexeme = BOOLEAN;
} else {
+ /*
+ * Tricky case: see test expr-62.10
+ */
+
+ int scanned2 = scanned;
+ do {
+ scanned2 += TclParseAllWhiteSpace(
+ start + scanned2, numBytes - scanned2);
+ scanned2 += ParseLexeme(
+ start + scanned2, numBytes - scanned2, &lexeme,
+ NULL);
+ } while (lexeme == COMMENT);
+ if (lexeme == OPEN_PAREN) {
+ /*
+ * Actually a function call, but with obscuring
+ * comments. Skip to the start of the parentheses.
+ * Note that we assume that open parentheses are one
+ * byte long.
+ */
+
+ lexeme = FUNCTION;
+ Tcl_ListObjAppendElement(NULL, funcList, literal);
+ scanned = scanned2 - 1;
+ break;
+ }
+
Tcl_DecrRefCount(literal);
msg = Tcl_ObjPrintf("invalid bareword \"%.*s%s\"",
(scanned < limit) ? (int)scanned : (int)limit - 3, start,
@@ -1894,7 +1927,7 @@ ParseLexeme(
storage, if non-NULL. */
{
const char *end;
- Tcl_UniChar ch = 0;
+ int ch;
Tcl_Obj *literal = NULL;
unsigned char byte;
@@ -1908,6 +1941,19 @@ ParseLexeme(
return 1;
}
switch (byte) {
+ case '#': {
+ /*
+ * Scan forward over the comment contents.
+ */
+ size_t size;
+
+ for (size = 0; byte != '\n' && byte != 0 && size < numBytes; size++) {
+ byte = UCHAR(start[size]);
+ }
+ *lexemePtr = COMMENT;
+ return size - (byte == '\n');
+ }
+
case '*':
if ((numBytes > 1) && (start[1] == '*')) {
*lexemePtr = EXPON;
@@ -2102,14 +2148,14 @@ ParseLexeme(
if (!TclIsBareword(*start) || *start == '_') {
size_t scanned;
- if (Tcl_UtfCharComplete(start, numBytes)) {
- scanned = TclUtfToUniChar(start, &ch);
+ if (TclUCS4Complete(start, numBytes)) {
+ scanned = TclUtfToUCS4(start, &ch);
} else {
- char utfBytes[4];
+ char utfBytes[8];
memcpy(utfBytes, start, numBytes);
utfBytes[numBytes] = '\0';
- scanned = TclUtfToUniChar(utfBytes, &ch);
+ scanned = TclUtfToUCS4(utfBytes, &ch);
}
*lexemePtr = INVALID;
Tcl_DecrRefCount(literal);
@@ -2306,7 +2352,7 @@ CompileExprTree(
Tcl_DStringInit(&cmdName);
TclDStringAppendLiteral(&cmdName, "tcl::mathfunc::");
- p = TclGetStringFromObj(*funcObjv, &length);
+ p = Tcl_GetStringFromObj(*funcObjv, &length);
funcObjv++;
Tcl_DStringAppend(&cmdName, p, length);
TclEmitPush(TclRegisterLiteral(envPtr,
@@ -2462,7 +2508,7 @@ CompileExprTree(
if (optimize) {
size_t length;
- const char *bytes = TclGetStringFromObj(literal, &length);
+ const char *bytes = Tcl_GetStringFromObj(literal, &length);
int idx = TclRegisterLiteral(envPtr, bytes, length, 0);
Tcl_Obj *objPtr = TclFetchLiteral(envPtr, idx);
@@ -2522,7 +2568,7 @@ CompileExprTree(
Tcl_Obj *tableValue;
size_t numBytes;
const char *bytes
- = TclGetStringFromObj(objPtr, &numBytes);
+ = Tcl_GetStringFromObj(objPtr, &numBytes);
idx = TclRegisterLiteral(envPtr, bytes, numBytes, 0);
tableValue = TclFetchLiteral(envPtr, idx);
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 85f785f..3f6bc12 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -5,8 +5,8 @@
* commands (like quoted strings or nested sub-commands) into a sequence
* of instructions ("bytecodes").
*
- * Copyright (c) 1996-1998 Sun Microsystems, Inc.
- * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
+ * Copyright © 1996-1998 Sun Microsystems, Inc.
+ * Copyright © 2001 Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -785,7 +785,7 @@ TclSetByteCodeFromAny(
}
#endif
- stringPtr = TclGetStringFromObj(objPtr, &length);
+ stringPtr = Tcl_GetStringFromObj(objPtr, &length);
/*
* TIP #280: Pick up the CmdFrame in which the BC compiler was invoked and
@@ -1323,7 +1323,7 @@ CompileSubstObj(
if (codePtr == NULL) {
CompileEnv compEnv;
size_t numBytes;
- const char *bytes = TclGetStringFromObj(objPtr, &numBytes);
+ const char *bytes = Tcl_GetStringFromObj(objPtr, &numBytes);
/* TODO: Check for more TIP 280 */
TclInitCompileEnv(interp, &compEnv, bytes, numBytes, NULL, 0);
@@ -1812,7 +1812,7 @@ CompileCmdLiteral(
extraLiteralFlags |= LITERAL_UNSHARED;
}
- bytes = TclGetStringFromObj(cmdObj, &length);
+ bytes = Tcl_GetStringFromObj(cmdObj, &length);
cmdLitIdx = TclRegisterLiteral(envPtr, bytes, length, extraLiteralFlags);
if (cmdPtr && TclRoutineHasName(cmdPtr)) {
@@ -2784,7 +2784,7 @@ PreventCycle(
* the intrep.
*/
size_t numBytes;
- const char *bytes = TclGetStringFromObj(objPtr, &numBytes);
+ const char *bytes = Tcl_GetStringFromObj(objPtr, &numBytes);
Tcl_Obj *copyPtr = Tcl_NewStringObj(bytes, numBytes);
Tcl_IncrRefCount(copyPtr);
@@ -3021,7 +3021,7 @@ TclFindCompiledLocal(
varNamePtr = &cachePtr->varName0;
for (i=0; i < cachePtr->numVars; varNamePtr++, i++) {
if (*varNamePtr) {
- localName = TclGetStringFromObj(*varNamePtr, &len);
+ localName = Tcl_GetStringFromObj(*varNamePtr, &len);
if ((len == nameBytes) && !strncmp(name, localName, len)) {
return i;
}
diff --git a/generic/tclConfig.c b/generic/tclConfig.c
index 6a0155f..85e05e9 100644
--- a/generic/tclConfig.c
+++ b/generic/tclConfig.c
@@ -4,7 +4,7 @@
* This file provides the facilities which allow Tcl and other packages
* to embed configuration information into their binary libraries.
*
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+ * Copyright © 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -259,7 +259,7 @@ QueryConfigObjCmd(
* Value is stored as-is in a byte array, see Bug [9b2e636361],
* so we have to decode it first.
*/
- value = (const char *) TclGetByteArrayFromObj(val, &n);
+ value = (const char *) Tcl_GetByteArrayFromObj(val, &n);
value = Tcl_ExternalToUtfDString(venc, value, n, &conv);
Tcl_SetObjResult(interp, Tcl_NewStringObj(value,
Tcl_DStringLength(&conv)));
diff --git a/generic/tclDate.c b/generic/tclDate.c
index 01d7782..0e76e26 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -76,7 +76,7 @@
* This file is generated from a yacc grammar defined in the file
* tclGetDate.y. It should not be edited directly.
*
- * Copyright (c) 1992-1995 Karl Lehenbauer and Mark Diekhans.
+ * Copyright (c) 1992-1995 Karl Lehenbauer & Mark Diekhans.
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 31b8e0b..cdc8ed0 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -72,24 +72,11 @@ EXTERN void Tcl_DbCkfree(void *ptr, const char *file, int line);
/* 8 */
EXTERN void * Tcl_DbCkrealloc(void *ptr, size_t size,
const char *file, int line);
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
/* 9 */
EXTERN void Tcl_CreateFileHandler(int fd, int mask,
Tcl_FileProc *proc, void *clientData);
-#endif /* UNIX */
-#ifdef MAC_OSX_TCL /* MACOSX */
-/* 9 */
-EXTERN void Tcl_CreateFileHandler(int fd, int mask,
- Tcl_FileProc *proc, void *clientData);
-#endif /* MACOSX */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
-/* 10 */
-EXTERN void Tcl_DeleteFileHandler(int fd);
-#endif /* UNIX */
-#ifdef MAC_OSX_TCL /* MACOSX */
/* 10 */
EXTERN void Tcl_DeleteFileHandler(int fd);
-#endif /* MACOSX */
/* 11 */
EXTERN void Tcl_SetTimer(const Tcl_Time *timePtr);
/* 12 */
@@ -145,7 +132,7 @@ EXTERN int Tcl_GetBoolean(Tcl_Interp *interp, const char *src,
EXTERN int Tcl_GetBooleanFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, int *boolPtr);
/* 33 */
-EXTERN unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr,
+EXTERN unsigned char * TclGetByteArrayFromObj(Tcl_Obj *objPtr,
int *lengthPtr);
/* 34 */
EXTERN int Tcl_GetDouble(Tcl_Interp *interp, const char *src,
@@ -166,7 +153,7 @@ EXTERN int Tcl_GetLongFromObj(Tcl_Interp *interp,
/* 40 */
EXTERN const Tcl_ObjType * Tcl_GetObjType(const char *typeName);
/* 41 */
-EXTERN char * Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr);
+EXTERN char * TclGetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr);
/* 42 */
EXTERN void Tcl_InvalidateStringRep(Tcl_Obj *objPtr);
/* 43 */
@@ -489,18 +476,10 @@ EXTERN Tcl_Interp * Tcl_GetParent(Tcl_Interp *interp);
EXTERN const char * Tcl_GetNameOfExecutable(void);
/* 166 */
EXTERN Tcl_Obj * Tcl_GetObjResult(Tcl_Interp *interp);
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
/* 167 */
EXTERN int Tcl_GetOpenFile(Tcl_Interp *interp,
const char *chanID, int forWriting,
int checkUsage, void **filePtr);
-#endif /* UNIX */
-#ifdef MAC_OSX_TCL /* MACOSX */
-/* 167 */
-EXTERN int Tcl_GetOpenFile(Tcl_Interp *interp,
- const char *chanID, int forWriting,
- int checkUsage, void **filePtr);
-#endif /* MACOSX */
/* 168 */
EXTERN Tcl_PathType Tcl_GetPathType(const char *path);
/* 169 */
@@ -1147,8 +1126,7 @@ EXTERN int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr,
/* 433 */
EXTERN Tcl_ThreadId Tcl_GetChannelThread(Tcl_Channel channel);
/* 434 */
-EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr,
- int *lengthPtr);
+EXTERN Tcl_UniChar * TclGetUnicodeFromObj(Tcl_Obj *objPtr, int *lengthPtr);
/* Slot 435 is reserved */
/* Slot 436 is reserved */
/* 437 */
@@ -1298,10 +1276,10 @@ EXTERN void Tcl_SetWideIntObj(Tcl_Obj *objPtr,
/* 490 */
EXTERN Tcl_StatBuf * Tcl_AllocStatBuf(void);
/* 491 */
-EXTERN Tcl_WideInt Tcl_Seek(Tcl_Channel chan, Tcl_WideInt offset,
+EXTERN long long Tcl_Seek(Tcl_Channel chan, long long offset,
int mode);
/* 492 */
-EXTERN Tcl_WideInt Tcl_Tell(Tcl_Channel chan);
+EXTERN long long Tcl_Tell(Tcl_Channel chan);
/* 493 */
EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc(
const Tcl_ChannelType *chanTypePtr);
@@ -1498,7 +1476,7 @@ EXTERN int Tcl_TakeBignumFromObj(Tcl_Interp *interp,
Tcl_Obj *obj, void *value);
/* 560 */
EXTERN int Tcl_TruncateChannel(Tcl_Channel chan,
- Tcl_WideInt length);
+ long long length);
/* 561 */
EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc(
const Tcl_ChannelType *chanTypePtr);
@@ -1601,16 +1579,16 @@ EXTERN int Tcl_GetGroupIdFromStat(const Tcl_StatBuf *statPtr);
/* 595 */
EXTERN int Tcl_GetDeviceTypeFromStat(const Tcl_StatBuf *statPtr);
/* 596 */
-EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr);
+EXTERN long long Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr);
/* 597 */
-EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat(
+EXTERN long long Tcl_GetModificationTimeFromStat(
const Tcl_StatBuf *statPtr);
/* 598 */
-EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr);
+EXTERN long long Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr);
/* 599 */
-EXTERN Tcl_WideUInt Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr);
+EXTERN unsigned long long Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr);
/* 600 */
-EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr);
+EXTERN unsigned long long Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr);
/* 601 */
EXTERN unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr);
/* 602 */
@@ -1751,6 +1729,17 @@ EXTERN char * Tcl_UniCharToUtfDString(const int *uniStr,
/* 648 */
EXTERN int * Tcl_UtfToUniCharDString(const char *src,
size_t length, Tcl_DString *dsPtr);
+/* Slot 649 is reserved */
+/* Slot 650 is reserved */
+/* 651 */
+EXTERN char * Tcl_GetStringFromObj(Tcl_Obj *objPtr,
+ size_t *lengthPtr);
+/* 652 */
+EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr,
+ size_t *lengthPtr);
+/* 653 */
+EXTERN unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr,
+ size_t *lengthPtr);
typedef struct {
const struct TclPlatStubs *tclPlatStubs;
@@ -1771,24 +1760,8 @@ typedef struct TclStubs {
void * (*tcl_DbCkalloc) (size_t size, const char *file, int line); /* 6 */
void (*tcl_DbCkfree) (void *ptr, const char *file, int line); /* 7 */
void * (*tcl_DbCkrealloc) (void *ptr, size_t size, const char *file, int line); /* 8 */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
- void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc *proc, void *clientData); /* 9 */
-#endif /* UNIX */
-#if defined(_WIN32) /* WIN */
- void (*reserved9)(void);
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc *proc, void *clientData); /* 9 */
-#endif /* MACOSX */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
void (*tcl_DeleteFileHandler) (int fd); /* 10 */
-#endif /* UNIX */
-#if defined(_WIN32) /* WIN */
- void (*reserved10)(void);
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
- void (*tcl_DeleteFileHandler) (int fd); /* 10 */
-#endif /* MACOSX */
void (*tcl_SetTimer) (const Tcl_Time *timePtr); /* 11 */
void (*tcl_Sleep) (int ms); /* 12 */
int (*tcl_WaitForEvent) (const Tcl_Time *timePtr); /* 13 */
@@ -1811,7 +1784,7 @@ typedef struct TclStubs {
void (*tclFreeObj) (Tcl_Obj *objPtr); /* 30 */
int (*tcl_GetBoolean) (Tcl_Interp *interp, const char *src, int *boolPtr); /* 31 */
int (*tcl_GetBooleanFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *boolPtr); /* 32 */
- unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 33 */
+ unsigned char * (*tclGetByteArrayFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 33 */
int (*tcl_GetDouble) (Tcl_Interp *interp, const char *src, double *doublePtr); /* 34 */
int (*tcl_GetDoubleFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, double *doublePtr); /* 35 */
void (*reserved36)(void);
@@ -1819,7 +1792,7 @@ typedef struct TclStubs {
int (*tcl_GetIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr); /* 38 */
int (*tcl_GetLongFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, long *longPtr); /* 39 */
const Tcl_ObjType * (*tcl_GetObjType) (const char *typeName); /* 40 */
- char * (*tcl_GetStringFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 41 */
+ char * (*tclGetStringFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 41 */
void (*tcl_InvalidateStringRep) (Tcl_Obj *objPtr); /* 42 */
int (*tcl_ListObjAppendList) (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *elemListPtr); /* 43 */
int (*tcl_ListObjAppendElement) (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *objPtr); /* 44 */
@@ -1945,15 +1918,7 @@ typedef struct TclStubs {
Tcl_Interp * (*tcl_GetParent) (Tcl_Interp *interp); /* 164 */
const char * (*tcl_GetNameOfExecutable) (void); /* 165 */
Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp *interp); /* 166 */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
- int (*tcl_GetOpenFile) (Tcl_Interp *interp, const char *chanID, int forWriting, int checkUsage, void **filePtr); /* 167 */
-#endif /* UNIX */
-#if defined(_WIN32) /* WIN */
- void (*reserved167)(void);
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
int (*tcl_GetOpenFile) (Tcl_Interp *interp, const char *chanID, int forWriting, int checkUsage, void **filePtr); /* 167 */
-#endif /* MACOSX */
Tcl_PathType (*tcl_GetPathType) (const char *path); /* 168 */
size_t (*tcl_Gets) (Tcl_Channel chan, Tcl_DString *dsPtr); /* 169 */
size_t (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj *objPtr); /* 170 */
@@ -2220,7 +2185,7 @@ typedef struct TclStubs {
void * (*tcl_AttemptDbCkrealloc) (void *ptr, size_t size, const char *file, int line); /* 431 */
int (*tcl_AttemptSetObjLength) (Tcl_Obj *objPtr, size_t length); /* 432 */
Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */
- Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 434 */
+ Tcl_UniChar * (*tclGetUnicodeFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 434 */
void (*reserved435)(void);
void (*reserved436)(void);
Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 437 */
@@ -2277,8 +2242,8 @@ typedef struct TclStubs {
Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */
void (*tcl_SetWideIntObj) (Tcl_Obj *objPtr, Tcl_WideInt wideValue); /* 489 */
Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */
- Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */
- Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */
+ long long (*tcl_Seek) (Tcl_Channel chan, long long offset, int mode); /* 491 */
+ long long (*tcl_Tell) (Tcl_Channel chan); /* 492 */
Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (const Tcl_ChannelType *chanTypePtr); /* 493 */
int (*tcl_DictObjPut) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr, Tcl_Obj *valuePtr); /* 494 */
int (*tcl_DictObjGet) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr, Tcl_Obj **valuePtrPtr); /* 495 */
@@ -2346,7 +2311,7 @@ typedef struct TclStubs {
void (*tcl_SetBignumObj) (Tcl_Obj *obj, void *value); /* 557 */
int (*tcl_GetBignumFromObj) (Tcl_Interp *interp, Tcl_Obj *obj, void *value); /* 558 */
int (*tcl_TakeBignumFromObj) (Tcl_Interp *interp, Tcl_Obj *obj, void *value); /* 559 */
- int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */
+ int (*tcl_TruncateChannel) (Tcl_Channel chan, long long length); /* 560 */
Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType *chanTypePtr); /* 561 */
void (*tcl_SetChannelErrorInterp) (Tcl_Interp *interp, Tcl_Obj *msg); /* 562 */
void (*tcl_GetChannelErrorInterp) (Tcl_Interp *interp, Tcl_Obj **msg); /* 563 */
@@ -2382,11 +2347,11 @@ typedef struct TclStubs {
int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf *statPtr); /* 593 */
int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf *statPtr); /* 594 */
int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf *statPtr); /* 595 */
- Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf *statPtr); /* 596 */
- Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf *statPtr); /* 597 */
- Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf *statPtr); /* 598 */
- Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf *statPtr); /* 599 */
- Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf *statPtr); /* 600 */
+ long long (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf *statPtr); /* 596 */
+ long long (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf *statPtr); /* 597 */
+ long long (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf *statPtr); /* 598 */
+ unsigned long long (*tcl_GetSizeFromStat) (const Tcl_StatBuf *statPtr); /* 599 */
+ unsigned long long (*tcl_GetBlocksFromStat) (const Tcl_StatBuf *statPtr); /* 600 */
unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf *statPtr); /* 601 */
int (*tcl_SetEnsembleParameterList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *paramList); /* 602 */
int (*tcl_GetEnsembleParameterList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **paramListPtr); /* 603 */
@@ -2435,6 +2400,11 @@ typedef struct TclStubs {
int (*tcl_UtfToUniChar) (const char *src, int *chPtr); /* 646 */
char * (*tcl_UniCharToUtfDString) (const int *uniStr, size_t uniLength, Tcl_DString *dsPtr); /* 647 */
int * (*tcl_UtfToUniCharDString) (const char *src, size_t length, Tcl_DString *dsPtr); /* 648 */
+ void (*reserved649)(void);
+ void (*reserved650)(void);
+ char * (*tcl_GetStringFromObj) (Tcl_Obj *objPtr, size_t *lengthPtr); /* 651 */
+ Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj *objPtr, size_t *lengthPtr); /* 652 */
+ unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj *objPtr, size_t *lengthPtr); /* 653 */
} TclStubs;
extern const TclStubs *tclStubsPtr;
@@ -2467,22 +2437,10 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_DbCkfree) /* 7 */
#define Tcl_DbCkrealloc \
(tclStubsPtr->tcl_DbCkrealloc) /* 8 */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
#define Tcl_CreateFileHandler \
(tclStubsPtr->tcl_CreateFileHandler) /* 9 */
-#endif /* UNIX */
-#ifdef MAC_OSX_TCL /* MACOSX */
-#define Tcl_CreateFileHandler \
- (tclStubsPtr->tcl_CreateFileHandler) /* 9 */
-#endif /* MACOSX */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
-#define Tcl_DeleteFileHandler \
- (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */
-#endif /* UNIX */
-#ifdef MAC_OSX_TCL /* MACOSX */
#define Tcl_DeleteFileHandler \
(tclStubsPtr->tcl_DeleteFileHandler) /* 10 */
-#endif /* MACOSX */
#define Tcl_SetTimer \
(tclStubsPtr->tcl_SetTimer) /* 11 */
#define Tcl_Sleep \
@@ -2525,8 +2483,8 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_GetBoolean) /* 31 */
#define Tcl_GetBooleanFromObj \
(tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */
-#define Tcl_GetByteArrayFromObj \
- (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */
+#define TclGetByteArrayFromObj \
+ (tclStubsPtr->tclGetByteArrayFromObj) /* 33 */
#define Tcl_GetDouble \
(tclStubsPtr->tcl_GetDouble) /* 34 */
#define Tcl_GetDoubleFromObj \
@@ -2540,8 +2498,8 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_GetLongFromObj) /* 39 */
#define Tcl_GetObjType \
(tclStubsPtr->tcl_GetObjType) /* 40 */
-#define Tcl_GetStringFromObj \
- (tclStubsPtr->tcl_GetStringFromObj) /* 41 */
+#define TclGetStringFromObj \
+ (tclStubsPtr->tclGetStringFromObj) /* 41 */
#define Tcl_InvalidateStringRep \
(tclStubsPtr->tcl_InvalidateStringRep) /* 42 */
#define Tcl_ListObjAppendList \
@@ -2776,14 +2734,8 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */
#define Tcl_GetObjResult \
(tclStubsPtr->tcl_GetObjResult) /* 166 */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
-#define Tcl_GetOpenFile \
- (tclStubsPtr->tcl_GetOpenFile) /* 167 */
-#endif /* UNIX */
-#ifdef MAC_OSX_TCL /* MACOSX */
#define Tcl_GetOpenFile \
(tclStubsPtr->tcl_GetOpenFile) /* 167 */
-#endif /* MACOSX */
#define Tcl_GetPathType \
(tclStubsPtr->tcl_GetPathType) /* 168 */
#define Tcl_Gets \
@@ -3274,8 +3226,8 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */
#define Tcl_GetChannelThread \
(tclStubsPtr->tcl_GetChannelThread) /* 433 */
-#define Tcl_GetUnicodeFromObj \
- (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */
+#define TclGetUnicodeFromObj \
+ (tclStubsPtr->tclGetUnicodeFromObj) /* 434 */
/* Slot 435 is reserved */
/* Slot 436 is reserved */
#define Tcl_SubstObj \
@@ -3701,6 +3653,14 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_UniCharToUtfDString) /* 647 */
#define Tcl_UtfToUniCharDString \
(tclStubsPtr->tcl_UtfToUniCharDString) /* 648 */
+/* Slot 649 is reserved */
+/* Slot 650 is reserved */
+#define Tcl_GetStringFromObj \
+ (tclStubsPtr->tcl_GetStringFromObj) /* 651 */
+#define Tcl_GetUnicodeFromObj \
+ (tclStubsPtr->tcl_GetUnicodeFromObj) /* 652 */
+#define Tcl_GetByteArrayFromObj \
+ (tclStubsPtr->tcl_GetByteArrayFromObj) /* 653 */
#endif /* defined(USE_TCL_STUBS) */
@@ -3805,6 +3765,31 @@ extern const TclStubs *tclStubsPtr;
# endif
#endif
+#undef Tcl_GetString
+#undef Tcl_GetUnicode
+#define Tcl_GetString(objPtr) \
+ Tcl_GetStringFromObj(objPtr, (size_t *)NULL)
+#define Tcl_GetUnicode(objPtr) \
+ Tcl_GetUnicodeFromObj(objPtr, (size_t *)NULL)
+#undef Tcl_GetStringFromObj
+#undef Tcl_GetUnicodeFromObj
+#undef Tcl_GetByteArrayFromObj
+#if defined(USE_TCL_STUBS)
+#define Tcl_GetStringFromObj(objPtr, sizePtr) \
+ (sizeof(*sizePtr) <= sizeof(int) ? tclStubsPtr->tclGetStringFromObj(objPtr, (int *)sizePtr) : tclStubsPtr->tcl_GetStringFromObj(objPtr, (size_t *)sizePtr))
+#define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \
+ (sizeof(*sizePtr) <= sizeof(int) ? tclStubsPtr->tclGetByteArrayFromObj(objPtr, (int *)sizePtr) : tclStubsPtr->tcl_GetByteArrayFromObj(objPtr, (size_t *)sizePtr))
+#define Tcl_GetUnicodeFromObj(objPtr, sizePtr) \
+ (sizeof(*sizePtr) <= sizeof(int) ? tclStubsPtr->tclGetUnicodeFromObj(objPtr, (int *)sizePtr) : tclStubsPtr->tcl_GetUnicodeFromObj(objPtr, (size_t *)sizePtr))
+#else
+#define Tcl_GetStringFromObj(objPtr, sizePtr) \
+ (sizeof(*sizePtr) <= sizeof(int) ? (TclGetStringFromObj)(objPtr, (int *)sizePtr) : (Tcl_GetStringFromObj)(objPtr, (size_t *)sizePtr))
+#define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \
+ (sizeof(*sizePtr) <= sizeof(int) ? (TclGetByteArrayFromObj)(objPtr, (int *)sizePtr) : Tcl_GetByteArrayFromObj(objPtr, (size_t *)sizePtr))
+#define Tcl_GetUnicodeFromObj(objPtr, sizePtr) \
+ (sizeof(*sizePtr) <= sizeof(int) ? (TclGetUnicodeFromObj)(objPtr, (int *)sizePtr) : Tcl_GetUnicodeFromObj(objPtr, (size_t *)sizePtr))
+#endif
+
#ifdef TCL_MEM_DEBUG
# undef Tcl_Alloc
# define Tcl_Alloc(x) \
@@ -3828,7 +3813,6 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_DbNewLongObj(value, file, line) Tcl_DbNewWideIntObj((long)(value), file, line)
#define Tcl_SetIntObj(objPtr, value) Tcl_SetWideIntObj((objPtr), (int)(value))
#define Tcl_SetLongObj(objPtr, value) Tcl_SetWideIntObj((objPtr), (long)(value))
-#define Tcl_GetUnicode(objPtr) Tcl_GetUnicodeFromObj((objPtr), NULL)
#define Tcl_BackgroundError(interp) Tcl_BackgroundException((interp), TCL_ERROR)
#define Tcl_StringMatch(str, pattern) Tcl_StringCaseMatch((str), (pattern), 0)
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index 8002fd4..bb184a6 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -4,7 +4,7 @@
* This file contains functions that implement the Tcl dict object type
* and its accessor command.
*
- * Copyright (c) 2002-2010 by Donal K. Fellows.
+ * Copyright © 2002-2010 Donal K. Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -528,11 +528,11 @@ UpdateStringOfDict(
flagPtr[i] = ( i ? TCL_DONT_QUOTE_HASH : 0 );
keyPtr = (Tcl_Obj *)Tcl_GetHashKey(&dict->table, &cPtr->entry);
- elem = TclGetStringFromObj(keyPtr, &length);
+ elem = Tcl_GetStringFromObj(keyPtr, &length);
bytesNeeded += TclScanElement(elem, length, flagPtr+i);
flagPtr[i+1] = TCL_DONT_QUOTE_HASH;
valuePtr = (Tcl_Obj *)Tcl_GetHashValue(&cPtr->entry);
- elem = TclGetStringFromObj(valuePtr, &length);
+ elem = Tcl_GetStringFromObj(valuePtr, &length);
bytesNeeded += TclScanElement(elem, length, flagPtr+i+1);
}
bytesNeeded += numElems;
@@ -546,13 +546,13 @@ UpdateStringOfDict(
for (i=0,cPtr=dict->entryChainHead; i<numElems; i+=2,cPtr=cPtr->nextPtr) {
flagPtr[i] |= ( i ? TCL_DONT_QUOTE_HASH : 0 );
keyPtr = (Tcl_Obj *)Tcl_GetHashKey(&dict->table, &cPtr->entry);
- elem = TclGetStringFromObj(keyPtr, &length);
+ elem = Tcl_GetStringFromObj(keyPtr, &length);
dst += TclConvertElement(elem, length, dst, flagPtr[i]);
*dst++ = ' ';
flagPtr[i+1] |= TCL_DONT_QUOTE_HASH;
valuePtr = (Tcl_Obj *)Tcl_GetHashValue(&cPtr->entry);
- elem = TclGetStringFromObj(valuePtr, &length);
+ elem = Tcl_GetStringFromObj(valuePtr, &length);
dst += TclConvertElement(elem, length, dst, flagPtr[i+1]);
*dst++ = ' ';
}
@@ -632,7 +632,7 @@ SetDictFromAny(
}
} else {
size_t length;
- const char *nextElem = TclGetStringFromObj(objPtr, &length);
+ const char *nextElem = Tcl_GetStringFromObj(objPtr, &length);
const char *limit = (nextElem + length);
while (nextElem < limit) {
diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c
index a96dba9..5ac59e6 100644
--- a/generic/tclDisassemble.c
+++ b/generic/tclDisassemble.c
@@ -4,9 +4,9 @@
* This file contains procedures that disassemble bytecode into either
* human-readable or Tcl-processable forms.
*
- * Copyright (c) 1996-1998 Sun Microsystems, Inc.
- * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
- * Copyright (c) 2013-2016 Donal K. Fellows.
+ * Copyright © 1996-1998 Sun Microsystems, Inc.
+ * Copyright © 2001 Kevin B. Kenny. All rights reserved.
+ * Copyright © 2013-2016 Donal K. Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -198,7 +198,7 @@ TclPrintObject(
char *bytes;
size_t length;
- bytes = TclGetStringFromObj(objPtr, &length);
+ bytes = Tcl_GetStringFromObj(objPtr, &length);
TclPrintSource(outFile, bytes, TclMin(length, maxChars));
}
@@ -653,7 +653,7 @@ FormatInstruction(
size_t length;
Tcl_AppendToObj(bufferObj, "\t# ", -1);
- bytes = TclGetStringFromObj(codePtr->objArrayPtr[opnd], &length);
+ bytes = Tcl_GetStringFromObj(codePtr->objArrayPtr[opnd], &length);
PrintSourceToObj(bufferObj, bytes, TclMin(length, 40));
} else if (suffixBuffer[0]) {
Tcl_AppendPrintfToObj(bufferObj, "\t# %s", suffixBuffer);
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index ab8b466..3ef4e58 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -3,7 +3,7 @@
*
* Contains the implementation of the encoding conversion package.
*
- * Copyright (c) 1996-1998 Sun Microsystems, Inc.
+ * Copyright © 1996-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -2507,7 +2507,7 @@ UtfToUtf16Proc(
*dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
*dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
*dst++ = (*chPtr & 0xFF);
- *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
+ *dst++ = ((*chPtr >> 8) & 0x3) | 0xDC;
}
#else
*dst++ = (*chPtr & 0xFF);
@@ -2519,10 +2519,10 @@ UtfToUtf16Proc(
*dst++ = (*chPtr >> 8);
*dst++ = (*chPtr & 0xFF);
} else {
- *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
- *dst++ = (*chPtr & 0xFF);
*dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
*dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
+ *dst++ = ((*chPtr >> 8) & 0x3) | 0xDC;
+ *dst++ = (*chPtr & 0xFF);
}
#else
*dst++ = (*chPtr >> 8);
@@ -3700,7 +3700,7 @@ InitializeEncodingSearchPath(
if (*encodingPtr) {
((Encoding *)(*encodingPtr))->refCount++;
}
- bytes = TclGetStringFromObj(searchPathObj, lengthPtr);
+ bytes = Tcl_GetStringFromObj(searchPathObj, lengthPtr);
*valuePtr = (char *)Tcl_Alloc(*lengthPtr + 1);
memcpy(*valuePtr, bytes, *lengthPtr + 1);
Tcl_DecrRefCount(searchPathObj);
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index 0d048ab..3c1f9ee 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -4,7 +4,7 @@
* Contains support for ensembles (see TIP#112), which provide simple
* mechanism for creating composite commands on top of namespaces.
*
- * Copyright (c) 2005-2013 Donal K. Fellows.
+ * Copyright © 2005-2013 Donal K. Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1811,7 +1811,7 @@ NsEnsembleImplementationCmdNR(
size_t tableLength = ensemblePtr->subcommandTable.numEntries;
Tcl_Obj *fix;
- subcmdName = TclGetStringFromObj(subObj, &stringLength);
+ subcmdName = Tcl_GetStringFromObj(subObj, &stringLength);
for (i=0 ; i<tableLength ; i++) {
int cmp = strncmp(subcmdName,
ensemblePtr->subcommandArrayPtr[i],
@@ -2993,7 +2993,7 @@ TclCompileEnsemble(
goto failed;
}
for (i=0 ; i<len ; i++) {
- str = TclGetStringFromObj(elems[i], &sclen);
+ str = Tcl_GetStringFromObj(elems[i], &sclen);
if ((sclen == numBytes) && !memcmp(word, str, numBytes)) {
/*
* Exact match! Excellent!
@@ -3396,7 +3396,7 @@ CompileToInvokedCommand(
for (i = 0, tokPtr = parsePtr->tokenPtr; i < parsePtr->numWords;
i++, tokPtr = TokenAfter(tokPtr)) {
if (i > 0 && i < numWords+1) {
- bytes = TclGetStringFromObj(words[i-1], &length);
+ bytes = Tcl_GetStringFromObj(words[i-1], &length);
PushLiteral(envPtr, bytes, length);
continue;
}
@@ -3425,7 +3425,7 @@ CompileToInvokedCommand(
TclNewObj(objPtr);
Tcl_GetCommandFullName(interp, (Tcl_Command) cmdPtr, objPtr);
- bytes = TclGetStringFromObj(objPtr, &length);
+ bytes = Tcl_GetStringFromObj(objPtr, &length);
if ((cmdPtr != NULL) && (cmdPtr->flags & CMD_VIA_RESOLVER)) {
extraLiteralFlags |= LITERAL_UNSHARED;
}
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index d0c59f0..76e45bb 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -6,8 +6,8 @@
* is primarily responsible for keeping the "env" arrays in sync with the
* system environment variables.
*
- * Copyright (c) 1991-1994 The Regents of the University of California.
- * Copyright (c) 1994-1998 Sun Microsystems, Inc.
+ * Copyright © 1991-1994 The Regents of the University of California.
+ * Copyright © 1994-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index bf1c3bb..9d287ac 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -5,9 +5,9 @@
* background errors, exit handlers, and the "vwait" and "update" command
* functions.
*
- * Copyright (c) 1990-1994 The Regents of the University of California.
- * Copyright (c) 1994-1998 Sun Microsystems, Inc.
- * Copyright (c) 2004 by Zoran Vasiljevic.
+ * Copyright © 1990-1994 The Regents of the University of California.
+ * Copyright © 1994-1998 Sun Microsystems, Inc.
+ * Copyright © 2004 Zoran Vasiljevic.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 60f8928..d667023 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -3,13 +3,13 @@
*
* This file contains procedures that execute byte-compiled Tcl commands.
*
- * Copyright (c) 1996-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 by Scriptics Corporation.
- * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
- * Copyright (c) 2002-2010 by Miguel Sofer.
- * Copyright (c) 2005-2007 by Donal K. Fellows.
- * Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved.
+ * Copyright © 1996-1997 Sun Microsystems, Inc.
+ * Copyright © 1998-2000 Scriptics Corporation.
+ * Copyright © 2001 Kevin B. Kenny. All rights reserved.
+ * Copyright © 2002-2010 Miguel Sofer.
+ * Copyright © 2005-2007 Donal K. Fellows.
+ * Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2006-2008 Joe Mistachkin. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1437,7 +1437,7 @@ CompileExprObj(
*/
size_t length;
- const char *string = TclGetStringFromObj(objPtr, &length);
+ const char *string = Tcl_GetStringFromObj(objPtr, &length);
TclInitCompileEnv(interp, &compEnv, string, length, NULL, 0);
TclCompileExpr(interp, string, length, &compEnv, 0);
@@ -4899,7 +4899,7 @@ TEBCresume(
value2Ptr = OBJ_AT_TOS;
valuePtr = OBJ_UNDER_TOS;
- s1 = TclGetStringFromObj(valuePtr, &s1len);
+ s1 = Tcl_GetStringFromObj(valuePtr, &s1len);
TRACE(("\"%.30s\" \"%.30s\" => ", O2S(valuePtr), O2S(value2Ptr)));
if (TclListObjLength(interp, value2Ptr, &length) != TCL_OK) {
TRACE_ERROR(interp);
@@ -4917,7 +4917,7 @@ TEBCresume(
do {
Tcl_ListObjIndex(NULL, value2Ptr, i, &o);
if (o != NULL) {
- s2 = TclGetStringFromObj(o, &s2len);
+ s2 = Tcl_GetStringFromObj(o, &s2len);
} else {
s2 = "";
s2len = 0;
@@ -5042,7 +5042,7 @@ TEBCresume(
valuePtr = OBJ_AT_TOS;
TRACE(("\"%.20s\" => ", O2S(valuePtr)));
if (Tcl_IsShared(valuePtr)) {
- s1 = TclGetStringFromObj(valuePtr, &slength);
+ s1 = Tcl_GetStringFromObj(valuePtr, &slength);
TclNewStringObj(objResultPtr, s1, slength);
slength = Tcl_UtfToUpper(TclGetString(objResultPtr));
Tcl_SetObjLength(objResultPtr, slength);
@@ -5059,7 +5059,7 @@ TEBCresume(
valuePtr = OBJ_AT_TOS;
TRACE(("\"%.20s\" => ", O2S(valuePtr)));
if (Tcl_IsShared(valuePtr)) {
- s1 = TclGetStringFromObj(valuePtr, &slength);
+ s1 = Tcl_GetStringFromObj(valuePtr, &slength);
TclNewStringObj(objResultPtr, s1, slength);
slength = Tcl_UtfToLower(TclGetString(objResultPtr));
Tcl_SetObjLength(objResultPtr, slength);
@@ -5076,7 +5076,7 @@ TEBCresume(
valuePtr = OBJ_AT_TOS;
TRACE(("\"%.20s\" => ", O2S(valuePtr)));
if (Tcl_IsShared(valuePtr)) {
- s1 = TclGetStringFromObj(valuePtr, &slength);
+ s1 = Tcl_GetStringFromObj(valuePtr, &slength);
TclNewStringObj(objResultPtr, s1, slength);
slength = Tcl_UtfToTitle(TclGetString(objResultPtr));
Tcl_SetObjLength(objResultPtr, slength);
@@ -5112,7 +5112,7 @@ TEBCresume(
TclNewObj(objResultPtr);
} else if (TclIsPureByteArray(valuePtr)) {
objResultPtr = Tcl_NewByteArrayObj(
- Tcl_GetByteArrayFromObj(valuePtr, NULL)+index, 1);
+ TclGetByteArrayFromObj(valuePtr, NULL)+index, 1);
} else if (valuePtr->bytes && slength == valuePtr->length) {
objResultPtr = Tcl_NewStringObj((const char *)
valuePtr->bytes+index, 1);
@@ -5304,12 +5304,12 @@ TEBCresume(
objResultPtr = value3Ptr;
goto doneStringMap;
}
- ustring1 = TclGetUnicodeFromObj(valuePtr, &slength);
+ ustring1 = Tcl_GetUnicodeFromObj(valuePtr, &slength);
if (slength == 0) {
objResultPtr = valuePtr;
goto doneStringMap;
}
- ustring2 = TclGetUnicodeFromObj(value2Ptr, &length2);
+ ustring2 = Tcl_GetUnicodeFromObj(value2Ptr, &length2);
if (length2 > slength || length2 == 0) {
objResultPtr = valuePtr;
goto doneStringMap;
@@ -5321,7 +5321,7 @@ TEBCresume(
}
goto doneStringMap;
}
- ustring3 = TclGetUnicodeFromObj(value3Ptr, &length3);
+ ustring3 = Tcl_GetUnicodeFromObj(value3Ptr, &length3);
objResultPtr = Tcl_NewUnicodeObj(ustring1, 0);
p = ustring1;
@@ -5356,14 +5356,14 @@ TEBCresume(
case INST_STR_FIND:
objResultPtr = TclStringFirst(OBJ_UNDER_TOS, OBJ_AT_TOS, 0);
- TRACE(("%.20s %.20s => %d\n",
+ TRACE(("%.20s %.20s => %s\n",
O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), O2S(objResultPtr)));
NEXT_INST_F(1, 2, 1);
case INST_STR_FIND_LAST:
objResultPtr = TclStringLast(OBJ_UNDER_TOS, OBJ_AT_TOS, INT_MAX - 1);
- TRACE(("%.20s %.20s => %d\n",
+ TRACE(("%.20s %.20s => %s\n",
O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), O2S(objResultPtr)));
NEXT_INST_F(1, 2, 1);
@@ -5372,7 +5372,7 @@ TEBCresume(
valuePtr = OBJ_AT_TOS;
TRACE(("%s \"%.30s\" => ", tclStringClassTable[opnd].name,
O2S(valuePtr)));
- ustring1 = TclGetUnicodeFromObj(valuePtr, &slength);
+ ustring1 = Tcl_GetUnicodeFromObj(valuePtr, &slength);
match = 1;
if (slength > 0) {
int ch;
@@ -5403,16 +5403,16 @@ TEBCresume(
|| TclHasIntRep(value2Ptr, &tclStringType)) {
Tcl_UniChar *ustring1, *ustring2;
- ustring1 = TclGetUnicodeFromObj(valuePtr, &slength);
- ustring2 = TclGetUnicodeFromObj(value2Ptr, &length2);
+ ustring1 = Tcl_GetUnicodeFromObj(valuePtr, &slength);
+ ustring2 = Tcl_GetUnicodeFromObj(value2Ptr, &length2);
match = TclUniCharMatch(ustring1, slength, ustring2, length2,
nocase);
} else if (TclIsPureByteArray(valuePtr) && !nocase) {
unsigned char *bytes1, *bytes2;
size_t wlen1 = 0, wlen2 = 0;
- bytes1 = TclGetByteArrayFromObj(valuePtr, &wlen1);
- bytes2 = TclGetByteArrayFromObj(value2Ptr, &wlen2);
+ bytes1 = Tcl_GetByteArrayFromObj(valuePtr, &wlen1);
+ bytes2 = Tcl_GetByteArrayFromObj(value2Ptr, &wlen2);
match = TclByteArrayMatch(bytes1, wlen1, bytes2, wlen2, 0);
} else {
match = Tcl_StringCaseMatch(TclGetString(valuePtr),
@@ -5439,24 +5439,24 @@ TEBCresume(
case INST_STR_TRIM_LEFT:
valuePtr = OBJ_UNDER_TOS; /* String */
value2Ptr = OBJ_AT_TOS; /* TrimSet */
- string2 = TclGetStringFromObj(value2Ptr, &length2);
- string1 = TclGetStringFromObj(valuePtr, &slength);
+ string2 = Tcl_GetStringFromObj(value2Ptr, &length2);
+ string1 = Tcl_GetStringFromObj(valuePtr, &slength);
trim1 = TclTrimLeft(string1, slength, string2, length2);
trim2 = 0;
goto createTrimmedString;
case INST_STR_TRIM_RIGHT:
valuePtr = OBJ_UNDER_TOS; /* String */
value2Ptr = OBJ_AT_TOS; /* TrimSet */
- string2 = TclGetStringFromObj(value2Ptr, &length2);
- string1 = TclGetStringFromObj(valuePtr, &slength);
+ string2 = Tcl_GetStringFromObj(value2Ptr, &length2);
+ string1 = Tcl_GetStringFromObj(valuePtr, &slength);
trim2 = TclTrimRight(string1, slength, string2, length2);
trim1 = 0;
goto createTrimmedString;
case INST_STR_TRIM:
valuePtr = OBJ_UNDER_TOS; /* String */
value2Ptr = OBJ_AT_TOS; /* TrimSet */
- string2 = TclGetStringFromObj(value2Ptr, &length2);
- string1 = TclGetStringFromObj(valuePtr, &slength);
+ string2 = Tcl_GetStringFromObj(value2Ptr, &length2);
+ string1 = Tcl_GetStringFromObj(valuePtr, &slength);
trim1 = TclTrim(string1, slength, string2, length2, &trim2);
createTrimmedString:
/*
@@ -9317,7 +9317,7 @@ TclLog2(
static int
EvalStatsCmd(
- ClientData unused, /* Unused. */
+ TCL_UNUSED(void *), /* Unused. */
Tcl_Interp *interp, /* The current interpreter. */
int objc, /* The number of arguments. */
Tcl_Obj *const objv[]) /* The argument strings. */
@@ -9474,7 +9474,7 @@ EvalStatsCmd(
if (TclHasIntRep(entryPtr->objPtr, &tclByteCodeType)) {
numByteCodeLits++;
}
- (void) TclGetStringFromObj(entryPtr->objPtr, &length);
+ (void) Tcl_GetStringFromObj(entryPtr->objPtr, &length);
refCountSum += entryPtr->refCount;
objBytesIfUnshared += (entryPtr->refCount * sizeof(Tcl_Obj));
strBytesIfUnshared += (entryPtr->refCount * (length+1));
@@ -9611,12 +9611,13 @@ EvalStatsCmd(
break;
}
}
- for (i = 31; i >= 0; i--) {
+ for (i = 31; i != (size_t)-1; i--) {
if (statsPtr->srcCount[i] > 0) {
- maxSizeDecade = i;
- break;
+ break; /* maxSizeDecade to consume 'i' value
+ * below... */
}
}
+ maxSizeDecade = i;
sum = 0;
for (i = minSizeDecade; i <= maxSizeDecade; i++) {
decadeHigh = (1 << (i+1)) - 1;
@@ -9634,12 +9635,13 @@ EvalStatsCmd(
break;
}
}
- for (i = 31; i >= 0; i--) {
+ for (i = 31; i != (size_t)-1; i--) {
if (statsPtr->byteCodeCount[i] > 0) {
- maxSizeDecade = i;
- break;
+ break; /* maxSizeDecade to consume 'i' value
+ * below... */
}
}
+ maxSizeDecade = i;
sum = 0;
for (i = minSizeDecade; i <= maxSizeDecade; i++) {
decadeHigh = (1 << (i+1)) - 1;
@@ -9657,12 +9659,13 @@ EvalStatsCmd(
break;
}
}
- for (i = 31; i >= 0; i--) {
+ for (i = 31; i != (size_t)-1; i--) {
if (statsPtr->lifetimeCount[i] > 0) {
- maxSizeDecade = i;
- break;
+ break; /* maxSizeDecade to consume 'i' value
+ * below... */
}
}
+ maxSizeDecade = i;
sum = 0;
for (i = minSizeDecade; i <= maxSizeDecade; i++) {
decadeHigh = (1 << (i+1)) - 1;
@@ -9697,7 +9700,7 @@ EvalStatsCmd(
Tcl_SetObjResult(interp, objPtr);
} else {
Tcl_Channel outChan;
- char *str = TclGetStringFromObj(objv[1], &length);
+ char *str = Tcl_GetStringFromObj(objv[1], &length);
if (length) {
if (strcmp(str, "stdout") == 0) {
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index 6d7f3cf..4e37574 100644
--- a/generic/tclFCmd.c
+++ b/generic/tclFCmd.c
@@ -4,7 +4,7 @@
* This file implements the generic portion of file manipulation
* subcommands of the "file" command.
*
- * Copyright (c) 1996-1998 Sun Microsystems, Inc.
+ * Copyright © 1996-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1391,7 +1391,7 @@ TclFileTemporaryCmd(
if (objc > 2) {
size_t length;
Tcl_Obj *templateObj = objv[2];
- const char *string = TclGetStringFromObj(templateObj, &length);
+ const char *string = Tcl_GetStringFromObj(templateObj, &length);
/*
* Treat an empty string as if it wasn't there.
@@ -1543,7 +1543,7 @@ TclFileTempDirCmd(
if (objc > 1) {
int length;
Tcl_Obj *templateObj = objv[1];
- const char *string = TclGetStringFromObj(templateObj, &length);
+ const char *string = Tcl_GetStringFromObj(templateObj, &length);
const int onWindows = (tclPlatform == TCL_PLATFORM_WINDOWS);
/*
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index bab3f90..b58d23b 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -4,8 +4,8 @@
* This file contains routines for converting file names betwen native
* and network form.
*
- * Copyright (c) 1995-1998 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1995-1998 Sun Microsystems, Inc.
+ * Copyright © 1998-1999 Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -242,7 +242,7 @@ ExtractWinRoot(
if (path[4] == '\0') {
abs = 4;
- } else if (path [4] == ':' && path[5] == '\0') {
+ } else if (path[4] == ':' && path[5] == '\0') {
abs = 5;
}
@@ -264,7 +264,7 @@ ExtractWinRoot(
if (path[4] == '\0') {
abs = 4;
- } else if (path [4] == ':' && path[5] == '\0') {
+ } else if (path[4] == ':' && path[5] == '\0') {
abs = 5;
}
}
@@ -578,7 +578,7 @@ Tcl_SplitPath(
size = 1;
for (i = 0; i < *argcPtr; i++) {
Tcl_ListObjIndex(NULL, resultPtr, i, &eltPtr);
- (void)TclGetStringFromObj(eltPtr, &len);
+ (void)Tcl_GetStringFromObj(eltPtr, &len);
size += len + 1;
}
@@ -598,7 +598,7 @@ Tcl_SplitPath(
p = (char *) &(*argvPtr)[(*argcPtr) + 1];
for (i = 0; i < *argcPtr; i++) {
Tcl_ListObjIndex(NULL, resultPtr, i, &eltPtr);
- str = TclGetStringFromObj(eltPtr, &len);
+ str = Tcl_GetStringFromObj(eltPtr, &len);
memcpy(p, str, len + 1);
p += len+1;
}
@@ -861,7 +861,7 @@ TclpNativeJoinPath(
const char *p;
const char *start;
- start = TclGetStringFromObj(prefix, &length);
+ start = Tcl_GetStringFromObj(prefix, &length);
/*
* Remove the ./ from tilde prefixed elements, and drive-letter prefixed
@@ -889,7 +889,7 @@ TclpNativeJoinPath(
if (length > 0 && (start[length-1] != '/')) {
Tcl_AppendToObj(prefix, "/", 1);
- (void)TclGetStringFromObj(prefix, &length);
+ (void)Tcl_GetStringFromObj(prefix, &length);
}
needsSep = 0;
@@ -925,7 +925,7 @@ TclpNativeJoinPath(
if ((length > 0) &&
(start[length-1] != '/') && (start[length-1] != ':')) {
Tcl_AppendToObj(prefix, "/", 1);
- (void)TclGetStringFromObj(prefix, &length);
+ (void)Tcl_GetStringFromObj(prefix, &length);
}
needsSep = 0;
@@ -1009,7 +1009,7 @@ Tcl_JoinPath(
* Store the result.
*/
- resultStr = TclGetStringFromObj(resultObj, &len);
+ resultStr = Tcl_GetStringFromObj(resultObj, &len);
Tcl_DStringAppend(resultPtr, resultStr, len);
Tcl_DecrRefCount(resultObj);
@@ -1368,7 +1368,7 @@ Tcl_GlobObjCmd(
if (dir == PATH_GENERAL) {
size_t pathlength;
const char *last;
- const char *first = TclGetStringFromObj(pathOrDir,&pathlength);
+ const char *first = Tcl_GetStringFromObj(pathOrDir,&pathlength);
/*
* Find the last path separator in the path
@@ -1471,7 +1471,7 @@ Tcl_GlobObjCmd(
const char *str;
Tcl_ListObjIndex(interp, typePtr, length, &look);
- str = TclGetStringFromObj(look, &len);
+ str = Tcl_GetStringFromObj(look, &len);
if (strcmp("readonly", str) == 0) {
globTypes->perm |= TCL_GLOB_PERM_RONLY;
} else if (strcmp("hidden", str) == 0) {
@@ -2002,7 +2002,7 @@ TclGlob(
Tcl_Panic("Called TclGlob with TCL_GLOBMODE_TAILS and pathPrefix==NULL");
}
- pre = TclGetStringFromObj(pathPrefix, &prefixLen);
+ pre = Tcl_GetStringFromObj(pathPrefix, &prefixLen);
if (prefixLen > 0
&& (strchr(separators, pre[prefixLen-1]) == NULL)) {
/*
@@ -2020,7 +2020,7 @@ TclGlob(
Tcl_ListObjGetElements(NULL, filenamesObj, &objc, &objv);
for (i = 0; i< objc; i++) {
size_t len;
- const char *oldStr = TclGetStringFromObj(objv[i], &len);
+ const char *oldStr = Tcl_GetStringFromObj(objv[i], &len);
Tcl_Obj *elem;
if (len == prefixLen) {
@@ -2372,7 +2372,7 @@ DoGlob(
Tcl_Obj *fixme, *newObj;
Tcl_ListObjIndex(NULL, matchesObj, repair, &fixme);
- bytes = TclGetStringFromObj(fixme, &numBytes);
+ bytes = Tcl_GetStringFromObj(fixme, &numBytes);
newObj = Tcl_NewStringObj(bytes+2, numBytes-2);
Tcl_ListObjReplace(NULL, matchesObj, repair, 1,
1, &newObj);
@@ -2410,7 +2410,7 @@ DoGlob(
Tcl_DStringAppend(&append, pattern, p-pattern);
if (pathPtr != NULL) {
- (void) TclGetStringFromObj(pathPtr, &length);
+ (void) Tcl_GetStringFromObj(pathPtr, &length);
} else {
length = 0;
}
@@ -2456,7 +2456,7 @@ DoGlob(
*/
size_t len;
- const char *joined = TclGetStringFromObj(joinedPtr,&len);
+ const char *joined = Tcl_GetStringFromObj(joinedPtr,&len);
if ((len > 0) && (strchr(separators, joined[len-1]) == NULL)) {
Tcl_AppendToObj(joinedPtr, "/", 1);
@@ -2493,7 +2493,7 @@ DoGlob(
*/
size_t len;
- const char *joined = TclGetStringFromObj(joinedPtr,&len);
+ const char *joined = Tcl_GetStringFromObj(joinedPtr,&len);
if ((len > 0) && (strchr(separators, joined[len-1]) == NULL)) {
if (Tcl_FSGetPathType(pathPtr) != TCL_PATH_VOLUME_RELATIVE) {
@@ -2603,44 +2603,44 @@ Tcl_GetDeviceTypeFromStat(
return (int) statPtr->st_rdev;
}
-Tcl_WideInt
+long long
Tcl_GetAccessTimeFromStat(
const Tcl_StatBuf *statPtr)
{
- return (Tcl_WideInt) statPtr->st_atime;
+ return (long long) statPtr->st_atime;
}
-Tcl_WideInt
+long long
Tcl_GetModificationTimeFromStat(
const Tcl_StatBuf *statPtr)
{
- return (Tcl_WideInt) statPtr->st_mtime;
+ return (long long) statPtr->st_mtime;
}
-Tcl_WideInt
+long long
Tcl_GetChangeTimeFromStat(
const Tcl_StatBuf *statPtr)
{
- return (Tcl_WideInt) statPtr->st_ctime;
+ return (long long) statPtr->st_ctime;
}
-Tcl_WideUInt
+unsigned long long
Tcl_GetSizeFromStat(
const Tcl_StatBuf *statPtr)
{
- return (Tcl_WideUInt) statPtr->st_size;
+ return (unsigned long long) statPtr->st_size;
}
-Tcl_WideUInt
+unsigned long long
Tcl_GetBlocksFromStat(
const Tcl_StatBuf *statPtr)
{
#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
- return (Tcl_WideUInt) statPtr->st_blocks;
+ return (unsigned long long) statPtr->st_blocks;
#else
unsigned blksize = Tcl_GetBlockSizeFromStat(statPtr);
- return ((Tcl_WideUInt) statPtr->st_size + blksize - 1) / blksize;
+ return ((unsigned long long) statPtr->st_size + blksize - 1) / blksize;
#endif
}
diff --git a/generic/tclGet.c b/generic/tclGet.c
index 4811c42..754824c 100644
--- a/generic/tclGet.c
+++ b/generic/tclGet.c
@@ -5,8 +5,8 @@
* integers or floating-point numbers or booleans, doing syntax checking
* along the way.
*
- * Copyright (c) 1990-1993 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 1990-1993 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y
index 7615bb5..bfc5596 100644
--- a/generic/tclGetDate.y
+++ b/generic/tclGetDate.y
@@ -7,7 +7,7 @@
* only used when doing free-form date parsing, an ill-defined process
* anyway.
*
- * Copyright (c) 1992-1995 Karl Lehenbauer and Mark Diekhans.
+ * Copyright (c) 1992-1995 Karl Lehenbauer & Mark Diekhans.
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
@@ -27,7 +27,7 @@
* This file is generated from a yacc grammar defined in the file
* tclGetDate.y. It should not be edited directly.
*
- * Copyright (c) 1992-1995 Karl Lehenbauer and Mark Diekhans.
+ * Copyright (c) 1992-1995 Karl Lehenbauer & Mark Diekhans.
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
diff --git a/generic/tclHash.c b/generic/tclHash.c
index e633fb0..802b627 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.c
@@ -4,8 +4,8 @@
* Implementation of in-memory hash tables for Tcl and Tcl-based
* applications.
*
- * Copyright (c) 1991-1993 The Regents of the University of California.
- * Copyright (c) 1994 Sun Microsystems, Inc.
+ * Copyright © 1991-1993 The Regents of the University of California.
+ * Copyright © 1994 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclHistory.c b/generic/tclHistory.c
index ed9fd04..eea4d1d 100644
--- a/generic/tclHistory.c
+++ b/generic/tclHistory.c
@@ -6,8 +6,8 @@
* commands ("events") before they are executed. Commands defined in
* history.tcl may be used to perform history substitutions.
*
- * Copyright (c) 1990-1993 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 1990-1993 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 5c7c5a6..1c4279e 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -4,8 +4,8 @@
* This file provides the generic portions (those that are the same on
* all platforms and for all channel types) of Tcl's IO facilities.
*
- * Copyright (c) 1998-2000 Ajuba Solutions
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1998-2000 Ajuba Solutions
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
* Contributions from Don Porter, NIST, 2014. (not subject to US copyright)
*
* See the file "license.terms" for information on usage and redistribution of
@@ -4140,7 +4140,7 @@ Tcl_WriteChars(
}
objPtr = Tcl_NewStringObj(src, len);
- src = (char *) TclGetByteArrayFromObj(objPtr, &len);
+ src = (char *) Tcl_GetByteArrayFromObj(objPtr, &len);
result = WriteBytes(chanPtr, src, len);
TclDecrRefCount(objPtr);
return result;
@@ -4192,10 +4192,10 @@ Tcl_WriteObj(
return TCL_IO_FAILURE;
}
if (statePtr->encoding == NULL) {
- src = (char *) TclGetByteArrayFromObj(objPtr, &srcLen);
+ src = (char *) Tcl_GetByteArrayFromObj(objPtr, &srcLen);
return WriteBytes(chanPtr, src, srcLen);
} else {
- src = TclGetStringFromObj(objPtr, &srcLen);
+ src = Tcl_GetStringFromObj(objPtr, &srcLen);
return WriteChars(chanPtr, src, srcLen);
}
}
@@ -4573,7 +4573,7 @@ Tcl_GetsObj(
* newline in the available input.
*/
- (void)TclGetStringFromObj(objPtr, &oldLength);
+ (void)Tcl_GetStringFromObj(objPtr, &oldLength);
oldFlags = statePtr->inputEncodingFlags;
oldState = statePtr->inputEncodingState;
oldRemoved = BUFFER_PADDING;
@@ -4956,7 +4956,7 @@ TclGetsObjBinary(
* newline in the available input.
*/
- byteArray = TclGetByteArrayFromObj(objPtr, &byteLen);
+ byteArray = Tcl_GetByteArrayFromObj(objPtr, &byteLen);
oldFlags = statePtr->inputEncodingFlags;
oldRemoved = BUFFER_PADDING;
oldLength = byteLen;
@@ -6108,7 +6108,7 @@ ReadChars(
int factor = *factorPtr;
int dstLimit = TCL_UTF_MAX - 1 + toRead * factor / UTF_EXPANSION_FACTOR;
- (void) TclGetStringFromObj(objPtr, &numBytes);
+ (void) Tcl_GetStringFromObj(objPtr, &numBytes);
Tcl_AppendToObj(objPtr, NULL, dstLimit);
if (toRead == srcLen) {
size_t size;
@@ -6951,10 +6951,10 @@ GetInput(
*----------------------------------------------------------------------
*/
-Tcl_WideInt
+long long
Tcl_Seek(
Tcl_Channel chan, /* The channel on which to seek. */
- Tcl_WideInt offset, /* Offset to seek to. */
+ long long offset, /* Offset to seek to. */
int mode) /* Relative to which location to seek? */
{
Channel *chanPtr = (Channel *) chan;
@@ -6964,7 +6964,7 @@ Tcl_Seek(
int inputBuffered, outputBuffered;
/* # bytes held in buffers. */
int result; /* Of device driver operations. */
- Tcl_WideInt curPos; /* Position on the device. */
+ long long curPos; /* Position on the device. */
int wasAsync; /* Was the channel nonblocking before the seek
* operation? If so, must restore to
* non-blocking mode after the seek. */
@@ -7121,7 +7121,7 @@ Tcl_Seek(
*----------------------------------------------------------------------
*/
-Tcl_WideInt
+long long
Tcl_Tell(
Tcl_Channel chan) /* The channel to return pos for. */
{
@@ -7132,7 +7132,7 @@ Tcl_Tell(
int inputBuffered, outputBuffered;
/* # bytes held in buffers. */
int result; /* Of calling device driver. */
- Tcl_WideInt curPos; /* Position on device. */
+ long long curPos; /* Position on device. */
if (CheckChannelErrors(statePtr, TCL_WRITABLE | TCL_READABLE) != 0) {
return -1;
@@ -7213,7 +7213,7 @@ Tcl_Tell(
int
Tcl_TruncateChannel(
Tcl_Channel chan, /* Channel to truncate. */
- Tcl_WideInt length) /* Length to truncate it to. */
+ long long length) /* Length to truncate it to. */
{
Channel *chanPtr = (Channel *) chan;
Tcl_DriverTruncateProc *truncateProc =
@@ -9101,7 +9101,7 @@ TclCopyChannel(
Tcl_Interp *interp, /* Current interpreter. */
Tcl_Channel inChan, /* Channel to read from. */
Tcl_Channel outChan, /* Channel to write to. */
- Tcl_WideInt toRead, /* Amount of data to copy, or -1 for all. */
+ long long toRead, /* Amount of data to copy, or -1 for all. */
Tcl_Obj *cmdPtr) /* Pointer to script to execute or NULL. */
{
Channel *inPtr = (Channel *) inChan;
@@ -9612,7 +9612,7 @@ CopyData(
buffer = csPtr->buffer;
sizeb = size;
} else {
- buffer = TclGetStringFromObj(bufObj, &sizeb);
+ buffer = Tcl_GetStringFromObj(bufObj, &sizeb);
}
if (outBinary || sameEncoding) {
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 34c12f5..61aa585 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -3,7 +3,7 @@
*
* Contains the definitions of most of the Tcl commands relating to IO.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -456,7 +456,7 @@ Tcl_ReadObjCmd(
const char *result;
size_t length;
- result = TclGetStringFromObj(resultPtr, &length);
+ result = Tcl_GetStringFromObj(resultPtr, &length);
if (result[length - 1] == '\n') {
Tcl_SetObjLength(resultPtr, length - 1);
}
@@ -703,7 +703,7 @@ Tcl_CloseObjCmd(
resultPtr = Tcl_DuplicateObj(resultPtr);
Tcl_SetObjResult(interp, resultPtr);
}
- string = TclGetStringFromObj(resultPtr, &len);
+ string = Tcl_GetStringFromObj(resultPtr, &len);
if ((len > 0) && (string[len - 1] == '\n')) {
Tcl_SetObjLength(resultPtr, len - 1);
}
@@ -983,7 +983,7 @@ Tcl_ExecObjCmd(
*/
if (keepNewline == 0) {
- string = TclGetStringFromObj(resultPtr, &length);
+ string = Tcl_GetStringFromObj(resultPtr, &length);
if ((length > 0) && (string[length - 1] == '\n')) {
Tcl_SetObjLength(resultPtr, length - 1);
}
diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c
index 512825c..0f113d3 100644
--- a/generic/tclIOGT.c
+++ b/generic/tclIOGT.c
@@ -4,8 +4,8 @@
* Implements a generic transformation exposing the underlying API at the
* script level. Contributed by Andreas Kupries.
*
- * Copyright (c) 2000 Ajuba Solutions
- * Copyright (c) 1999-2000 Andreas Kupries (a.kupries@westend.com)
+ * Copyright © 2000 Ajuba Solutions
+ * Copyright © 1999-2000 Andreas Kupries (a.kupries@westend.com)
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -37,8 +37,8 @@ static void TransformWatchProc(ClientData instanceData, int mask);
static int TransformGetFileHandleProc(ClientData instanceData,
int direction, ClientData *handlePtr);
static int TransformNotifyProc(ClientData instanceData, int mask);
-static Tcl_WideInt TransformWideSeekProc(ClientData instanceData,
- Tcl_WideInt offset, int mode, int *errorCodePtr);
+static long long TransformWideSeekProc(ClientData instanceData,
+ long long offset, int mode, int *errorCodePtr);
/*
* Forward declarations of internal procedures. Secondly the procedures for
@@ -440,7 +440,7 @@ ExecuteCallback(
break;
}
resObj = Tcl_GetObjResult(eval);
- resBuf = TclGetByteArrayFromObj(resObj, &resLen);
+ resBuf = Tcl_GetByteArrayFromObj(resObj, &resLen);
Tcl_WriteRaw(Tcl_GetStackedChannel(dataPtr->self), (char *) resBuf,
resLen);
break;
@@ -450,13 +450,13 @@ ExecuteCallback(
break;
}
resObj = Tcl_GetObjResult(eval);
- resBuf = TclGetByteArrayFromObj(resObj, &resLen);
+ resBuf = Tcl_GetByteArrayFromObj(resObj, &resLen);
Tcl_WriteRaw(dataPtr->self, (char *) resBuf, resLen);
break;
case TRANSMIT_IBUF:
resObj = Tcl_GetObjResult(eval);
- resBuf = TclGetByteArrayFromObj(resObj, &resLen);
+ resBuf = Tcl_GetByteArrayFromObj(resObj, &resLen);
ResultAdd(&dataPtr->result, resBuf, resLen);
break;
@@ -830,10 +830,10 @@ TransformOutputProc(
*----------------------------------------------------------------------
*/
-static Tcl_WideInt
+static long long
TransformWideSeekProc(
ClientData instanceData, /* The channel to manipulate. */
- Tcl_WideInt offset, /* Size of movement. */
+ long long offset, /* Size of movement. */
int mode, /* How to move. */
int *errorCodePtr) /* Location of error flag. */
{
@@ -842,7 +842,7 @@ TransformWideSeekProc(
const Tcl_ChannelType *parentType = Tcl_GetChannelType(parent);
Tcl_DriverWideSeekProc *parentWideSeekProc =
Tcl_ChannelWideSeekProc(parentType);
- ClientData parentData = Tcl_GetChannelInstanceData(parent);
+ void *parentData = Tcl_GetChannelInstanceData(parent);
if ((offset == 0) && (mode == SEEK_CUR)) {
/*
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 2076f00..fe6d1c1 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -10,7 +10,7 @@
*
* See TIP #219 for the specification of this functionality.
*
- * Copyright (c) 2004-2005 ActiveState, a divison of Sophos
+ * Copyright © 2004-2005 ActiveState, a divison of Sophos
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -44,8 +44,8 @@ static void ReflectThread(ClientData clientData, int action);
static int ReflectEventRun(Tcl_Event *ev, int flags);
static int ReflectEventDelete(Tcl_Event *ev, ClientData cd);
#endif
-static Tcl_WideInt ReflectSeekWide(ClientData clientData,
- Tcl_WideInt offset, int mode, int *errorCodePtr);
+static long long ReflectSeekWide(ClientData clientData,
+ long long offset, int mode, int *errorCodePtr);
static int ReflectGetOption(ClientData clientData,
Tcl_Interp *interp, const char *optionName,
Tcl_DString *dsPtr);
@@ -1369,7 +1369,7 @@ ReflectInput(
goto invalid;
}
- bytev = TclGetByteArrayFromObj(resObj, &bytec);
+ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
if ((size_t)toRead < bytec) {
SetChannelErrorStr(rcPtr->chan, msg_read_toomuch);
@@ -1539,10 +1539,10 @@ ReflectOutput(
*----------------------------------------------------------------------
*/
-static Tcl_WideInt
+static long long
ReflectSeekWide(
ClientData clientData,
- Tcl_WideInt offset,
+ long long offset,
int seekMode,
int *errorCodePtr)
{
@@ -1993,7 +1993,7 @@ ReflectGetOption(
goto error;
} else {
size_t len;
- const char *str = TclGetStringFromObj(resObj, &len);
+ const char *str = Tcl_GetStringFromObj(resObj, &len);
if (len) {
TclDStringAppendLiteral(dsPtr, " ");
@@ -2368,7 +2368,7 @@ InvokeTclMethod(
if (result != TCL_ERROR) {
size_t cmdLen;
- const char *cmdString = TclGetStringFromObj(cmd, &cmdLen);
+ const char *cmdString = Tcl_GetStringFromObj(cmd, &cmdLen);
Tcl_IncrRefCount(cmd);
Tcl_ResetResult(rcPtr->interp);
@@ -3039,7 +3039,7 @@ ForwardProc(
size_t bytec = 0; /* Number of returned bytes */
unsigned char *bytev; /* Array of returned bytes */
- bytev = TclGetByteArrayFromObj(resObj, &bytec);
+ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
if (paramPtr->input.toRead < bytec) {
ForwardSetStaticError(paramPtr, msg_read_toomuch);
@@ -3236,7 +3236,7 @@ ForwardProc(
ForwardSetDynamicError(paramPtr, buf);
} else {
size_t len;
- const char *str = TclGetStringFromObj(resObj, &len);
+ const char *str = Tcl_GetStringFromObj(resObj, &len);
if (len) {
TclDStringAppendLiteral(paramPtr->getOpt.value, " ");
@@ -3335,7 +3335,7 @@ ForwardSetObjError(
Tcl_Obj *obj)
{
size_t len;
- const char *msgStr = TclGetStringFromObj(obj, &len);
+ const char *msgStr = Tcl_GetStringFromObj(obj, &len);
len++;
ForwardSetDynamicError(paramPtr, Tcl_Alloc(len));
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c
index 698f3ce..b9b215e 100644
--- a/generic/tclIORTrans.c
+++ b/generic/tclIORTrans.c
@@ -10,7 +10,7 @@
*
* See TIP #230 for the specification of this functionality.
*
- * Copyright (c) 2007-2008 ActiveState.
+ * Copyright © 2007-2008 ActiveState.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -39,8 +39,8 @@ static int ReflectOutput(ClientData clientData, const char *buf,
int toWrite, int *errorCodePtr);
static void ReflectWatch(ClientData clientData, int mask);
static int ReflectBlock(ClientData clientData, int mode);
-static Tcl_WideInt ReflectSeekWide(ClientData clientData,
- Tcl_WideInt offset, int mode, int *errorCodePtr);
+static long long ReflectSeekWide(ClientData clientData,
+ long long offset, int mode, int *errorCodePtr);
static int ReflectGetOption(ClientData clientData,
Tcl_Interp *interp, const char *optionName,
Tcl_DString *dsPtr);
@@ -1319,10 +1319,10 @@ ReflectOutput(
*----------------------------------------------------------------------
*/
-static Tcl_WideInt
+static long long
ReflectSeekWide(
ClientData clientData,
- Tcl_WideInt offset,
+ long long offset,
int seekMode,
int *errorCodePtr)
{
@@ -2006,7 +2006,7 @@ InvokeTclMethod(
if (result != TCL_ERROR) {
Tcl_Obj *cmd = Tcl_NewListObj(cmdc, rtPtr->argv);
size_t cmdLen;
- const char *cmdString = TclGetStringFromObj(cmd, &cmdLen);
+ const char *cmdString = Tcl_GetStringFromObj(cmd, &cmdLen);
Tcl_IncrRefCount(cmd);
Tcl_ResetResult(rtPtr->interp);
@@ -2565,7 +2565,7 @@ ForwardProc(
unsigned char *bytev;
/* Array of returned bytes */
- bytev = TclGetByteArrayFromObj(resObj, &bytec);
+ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
paramPtr->transform.size = bytec;
@@ -2599,7 +2599,7 @@ ForwardProc(
unsigned char *bytev;
/* Array of returned bytes */
- bytev = TclGetByteArrayFromObj(resObj, &bytec);
+ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
paramPtr->transform.size = bytec;
@@ -2628,7 +2628,7 @@ ForwardProc(
size_t bytec = 0; /* Number of returned bytes */
unsigned char *bytev; /* Array of returned bytes */
- bytev = TclGetByteArrayFromObj(resObj, &bytec);
+ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
paramPtr->transform.size = bytec;
@@ -2655,7 +2655,7 @@ ForwardProc(
unsigned char *bytev;
/* Array of returned bytes */
- bytev = TclGetByteArrayFromObj(resObj, &bytec);
+ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
paramPtr->transform.size = bytec;
@@ -2770,7 +2770,7 @@ ForwardSetObjError(
Tcl_Obj *obj)
{
size_t len;
- const char *msgStr = TclGetStringFromObj(obj, &len);
+ const char *msgStr = Tcl_GetStringFromObj(obj, &len);
len++;
ForwardSetDynamicError(paramPtr, Tcl_Alloc(len));
@@ -3055,7 +3055,7 @@ TransformRead(
if (rtPtr->thread != Tcl_GetCurrentThread()) {
ForwardParam p;
- p.transform.buf = (char *) TclGetByteArrayFromObj(bufObj,
+ p.transform.buf = (char *) Tcl_GetByteArrayFromObj(bufObj,
&(p.transform.size));
ForwardOpToOwnerThread(rtPtr, ForwardedInput, &p);
@@ -3083,7 +3083,7 @@ TransformRead(
return 0;
}
- bytev = TclGetByteArrayFromObj(resObj, &bytec);
+ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
ResultAdd(&rtPtr->result, bytev, bytec);
Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */
@@ -3145,7 +3145,7 @@ TransformWrite(
*errorCodePtr = EOK;
- bytev = TclGetByteArrayFromObj(resObj, &bytec);
+ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
res = Tcl_WriteRaw(rtPtr->parent, (char *) bytev, bytec);
Tcl_DecrRefCount(bufObj);
@@ -3198,7 +3198,7 @@ TransformDrain(
return 0;
}
- bytev = TclGetByteArrayFromObj(resObj, &bytec);
+ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
ResultAdd(&rtPtr->result, bytev, bytec);
Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */
@@ -3254,7 +3254,7 @@ TransformFlush(
}
if (op == FLUSH_WRITE) {
- bytev = TclGetByteArrayFromObj(resObj, &bytec);
+ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
res = Tcl_WriteRaw(rtPtr->parent, (char *) bytev, bytec);
} else {
res = 0;
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c
index 531c38b..cfb0454 100644
--- a/generic/tclIOSock.c
+++ b/generic/tclIOSock.c
@@ -3,7 +3,7 @@
*
* Common routines used by all socket based channel types.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 4cd2c6d..36d8dbc 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -7,9 +7,9 @@
* is the primary author. Other signifiant contributors are Karl
* Lehenbauer, Mark Diekhans and Peter da Silva.
*
- * Copyright (c) 1991-1994 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 2001-2004 Vincent Darley.
+ * Copyright © 1991-1994 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2004 Vincent Darley.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -524,8 +524,8 @@ TclFSCwdPointerEquals(
size_t len1, len2;
const char *str1, *str2;
- str1 = TclGetStringFromObj(tsdPtr->cwdPathPtr, &len1);
- str2 = TclGetStringFromObj(*pathPtrPtr, &len2);
+ str1 = Tcl_GetStringFromObj(tsdPtr->cwdPathPtr, &len1);
+ str2 = Tcl_GetStringFromObj(*pathPtrPtr, &len2);
if ((len1 == len2) && !memcmp(str1, str2, len1)) {
/*
* The values are equal but the objects are different. Cache the
@@ -668,7 +668,7 @@ FsUpdateCwd(
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
if (cwdObj != NULL) {
- str = TclGetStringFromObj(cwdObj, &len);
+ str = Tcl_GetStringFromObj(cwdObj, &len);
}
Tcl_MutexLock(&cwdMutex);
@@ -1157,8 +1157,8 @@ FsAddMountsToGlobResult(
if (norm != NULL) {
const char *path, *mount;
- mount = TclGetStringFromObj(mElt, &mlen);
- path = TclGetStringFromObj(norm, &len);
+ mount = Tcl_GetStringFromObj(mElt, &mlen);
+ path = Tcl_GetStringFromObj(norm, &len);
if (path[len-1] == '/') {
/*
* Deal with the root of the volume.
@@ -1338,7 +1338,7 @@ TclFSNormalizeToUniquePath(
* We check these first to avoid useless calls to the native filesystem's
* normalizePathProc.
*/
- path = TclGetStringFromObj(pathPtr, &i);
+ path = Tcl_GetStringFromObj(pathPtr, &i);
if ( (i >= 3) && ( (path[0] == '/' && path[1] == '/')
|| (path[0] == '\\' && path[1] == '\\') ) ) {
@@ -1757,7 +1757,7 @@ Tcl_FSEvalFileEx(
*/
if (Tcl_ReadChars(chan, objPtr, -1,
- memcmp(string, "\xef\xbb\xbf", 3)) == TCL_IO_FAILURE) {
+ memcmp(string, "\xEF\xBB\xBF", 3)) == TCL_IO_FAILURE) {
Tcl_CloseEx(interp, chan, 0);
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"couldn't read file \"%s\": %s",
@@ -1773,7 +1773,7 @@ Tcl_FSEvalFileEx(
oldScriptFile = iPtr->scriptFile;
iPtr->scriptFile = pathPtr;
Tcl_IncrRefCount(iPtr->scriptFile);
- string = TclGetStringFromObj(objPtr, &length);
+ string = Tcl_GetStringFromObj(objPtr, &length);
/*
* TIP #280: Open a frame for the evaluated script.
@@ -1800,7 +1800,7 @@ Tcl_FSEvalFileEx(
* Record information about where the error occurred.
*/
- const char *pathString = TclGetStringFromObj(pathPtr, &length);
+ const char *pathString = Tcl_GetStringFromObj(pathPtr, &length);
unsigned limit = 150;
int overflow = (length > limit);
@@ -1894,7 +1894,7 @@ TclNREvalFile(
*/
if (Tcl_ReadChars(chan, objPtr, -1,
- memcmp(string, "\xef\xbb\xbf", 3)) == TCL_IO_FAILURE) {
+ memcmp(string, "\xEF\xBB\xBF", 3)) == TCL_IO_FAILURE) {
Tcl_CloseEx(interp, chan, 0);
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"couldn't read file \"%s\": %s",
@@ -1953,7 +1953,7 @@ EvalFileCallback(
*/
size_t length;
- const char *pathString = TclGetStringFromObj(pathPtr, &length);
+ const char *pathString = Tcl_GetStringFromObj(pathPtr, &length);
const unsigned int limit = 150;
int overflow = (length > limit);
@@ -2797,8 +2797,8 @@ Tcl_FSGetCwd(
size_t len1, len2;
const char *str1, *str2;
- str1 = TclGetStringFromObj(tsdPtr->cwdPathPtr, &len1);
- str2 = TclGetStringFromObj(norm, &len2);
+ str1 = Tcl_GetStringFromObj(tsdPtr->cwdPathPtr, &len1);
+ str2 = Tcl_GetStringFromObj(norm, &len2);
if ((len1 == len2) && (strcmp(str1, str2) == 0)) {
/*
* The pathname values are equal so retain the old pathname
@@ -3976,7 +3976,7 @@ TclGetPathType(
* of the volume. */
{
size_t pathLen;
- const char *path = TclGetStringFromObj(pathPtr, &pathLen);
+ const char *path = Tcl_GetStringFromObj(pathPtr, &pathLen);
Tcl_PathType type;
type = TclFSNonnativePathType(path, pathLen, filesystemPtrPtr,
@@ -4083,7 +4083,7 @@ TclFSNonnativePathType(
numVolumes--;
Tcl_ListObjIndex(NULL, thisFsVolumes, numVolumes, &vol);
- strVol = TclGetStringFromObj(vol,&len);
+ strVol = Tcl_GetStringFromObj(vol,&len);
if ((size_t) pathLen < len) {
continue;
}
@@ -4430,8 +4430,8 @@ Tcl_FSRemoveDirectory(
Tcl_Obj *normPath = Tcl_FSGetNormalizedPath(NULL, pathPtr);
if (normPath != NULL) {
- normPathStr = TclGetStringFromObj(normPath, &normLen);
- cwdStr = TclGetStringFromObj(cwdPtr, &cwdLen);
+ normPathStr = Tcl_GetStringFromObj(normPath, &normLen);
+ cwdStr = Tcl_GetStringFromObj(cwdPtr, &cwdLen);
if ((cwdLen >= normLen) && (strncmp(normPathStr, cwdStr,
normLen) == 0)) {
/*
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index 89582b7..02d0e31 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -5,9 +5,9 @@
* to lookup a keyword in a table of valid values and cache the index of
* the matching entry. Also provides table-based argv/argc processing.
*
- * Copyright (c) 1990-1994 The Regents of the University of California.
- * Copyright (c) 1997 Sun Microsystems, Inc.
- * Copyright (c) 2006 Sam Bromley.
+ * Copyright © 1990-1994 The Regents of the University of California.
+ * Copyright © 1997 Sun Microsystems, Inc.
+ * Copyright © 2006 Sam Bromley.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -615,10 +615,10 @@ PrefixAllObjCmd(
return result;
}
resultPtr = Tcl_NewListObj(0, NULL);
- string = TclGetStringFromObj(objv[2], &length);
+ string = Tcl_GetStringFromObj(objv[2], &length);
for (t = 0; t < tableObjc; t++) {
- elemString = TclGetStringFromObj(tableObjv[t], &elemLength);
+ elemString = Tcl_GetStringFromObj(tableObjv[t], &elemLength);
/*
* A prefix cannot match if it is longest.
@@ -672,13 +672,13 @@ PrefixLongestObjCmd(
if (result != TCL_OK) {
return result;
}
- string = TclGetStringFromObj(objv[2], &length);
+ string = Tcl_GetStringFromObj(objv[2], &length);
resultString = NULL;
resultLength = 0;
for (t = 0; t < tableObjc; t++) {
- elemString = TclGetStringFromObj(tableObjv[t], &elemLength);
+ elemString = Tcl_GetStringFromObj(tableObjv[t], &elemLength);
/*
* First check if the prefix string matches the element. A prefix
@@ -849,7 +849,7 @@ Tcl_WrongNumArgs(
elementStr = EXPAND_OF(indexRep);
elemLen = strlen(elementStr);
} else {
- elementStr = TclGetStringFromObj(origObjv[i], &elemLen);
+ elementStr = Tcl_GetStringFromObj(origObjv[i], &elemLen);
}
flags = 0;
len = TclScanElement(elementStr, elemLen, &flags);
@@ -899,7 +899,7 @@ Tcl_WrongNumArgs(
* Quote the argument if it contains spaces (Bug 942757).
*/
- elementStr = TclGetStringFromObj(objv[i], &elemLen);
+ elementStr = Tcl_GetStringFromObj(objv[i], &elemLen);
flags = 0;
len = TclScanElement(elementStr, elemLen, &flags);
@@ -1024,7 +1024,7 @@ Tcl_ParseArgsObjv(
curArg = objv[srcIndex];
srcIndex++;
objc--;
- str = TclGetStringFromObj(curArg, &length);
+ str = Tcl_GetStringFromObj(curArg, &length);
if (length > 0) {
c = str[1];
} else {
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 9df08e7..42e6899 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -5,9 +5,9 @@
# is used to generate the tclIntDecls.h, tclIntPlatDecls.h
# and tclStubInit.c files
#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
-# Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
+# Copyright © 1998-1999 Scriptics Corporation.
+# Copyright © 2001 Kevin B. Kenny. All rights reserved.
+# Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -23,23 +23,9 @@ interface tclInt
# Use at your own risk. Note that the position of functions should not
# be changed between versions to avoid gratuitous incompatibilities.
-# Replaced by Tcl_FSAccess in 8.4:
-#declare 0 {
-# int TclAccess(const char *path, int mode)
-#}
-#declare 1 {
-# int TclAccessDeleteProc(TclAccessProc_ *proc)
-#}
-#declare 2 {
-# int TclAccessInsertProc(TclAccessProc_ *proc)
-#}
declare 3 {
void TclAllocateFreeObjects(void)
}
-# Replaced by TclpChdir in 8.1:
-# declare 4 {
-# int TclChdir(Tcl_Interp *interp, char *dirName)
-# }
declare 5 {
int TclCleanupChildren(Tcl_Interp *interp, int numPids, Tcl_Pid *pidPtr,
Tcl_Channel errorChan)
@@ -50,14 +36,7 @@ declare 6 {
declare 7 {
size_t TclCopyAndCollapse(size_t count, const char *src, char *dst)
}
-# Removed in 9.0:
-#declare 8 {
-# int TclCopyChannelOld(Tcl_Interp *interp, Tcl_Channel inChan,
-# Tcl_Channel outChan, int toRead, Tcl_Obj *cmdPtr)
-#}
-
# TclCreatePipeline unofficially exported for use by BLT.
-
declare 9 {
int TclCreatePipeline(Tcl_Interp *interp, int argc, const char **argv,
Tcl_Pid **pidArrayPtr, TclFile *inPipePtr, TclFile *outPipePtr,
@@ -74,37 +53,12 @@ declare 11 {
declare 12 {
void TclDeleteVars(Interp *iPtr, TclVarHashTable *tablePtr)
}
-# Removed in 8.5:
-#declare 13 {
-# int TclDoGlob(Tcl_Interp *interp, char *separators,
-# Tcl_DString *headPtr, char *tail, Tcl_GlobTypeData *types)
-#}
declare 14 {
int TclDumpMemoryInfo(void *clientData, int flags)
}
-# Removed in 8.1:
-# declare 15 {
-# void TclExpandParseValue(ParseValue *pvPtr, int needed)
-# }
declare 16 {
void TclExprFloatError(Tcl_Interp *interp, double value)
}
-# Removed in 8.4:
-#declare 17 {
-# int TclFileAttrsCmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
-#}
-#declare 18 {
-# int TclFileCopyCmd(Tcl_Interp *interp, int argc, char **argv)
-#}
-#declare 19 {
-# int TclFileDeleteCmd(Tcl_Interp *interp, int argc, char **argv)
-#}
-#declare 20 {
-# int TclFileMakeDirsCmd(Tcl_Interp *interp, int argc, char **argv)
-#}
-#declare 21 {
-# int TclFileRenameCmd(Tcl_Interp *interp, int argc, char **argv)
-#}
declare 22 {
int TclFindElement(Tcl_Interp *interp, const char *listStr,
int listLength, const char **elementPtr, const char **nextPtr,
@@ -120,27 +74,9 @@ declare 24 {
declare 25 {
void TclFreePackageInfo(Interp *iPtr)
}
-# Removed in 8.1:
-# declare 26 {
-# char *TclGetCwd(Tcl_Interp *interp)
-# }
-# Removed in 8.5:
-#declare 27 {
-# int TclGetDate(char *p, unsigned long now, long zone,
-# unsigned long *timePtr)
-#}
declare 28 {
Tcl_Channel TclpGetDefaultStdChannel(int type)
}
-# Removed in 8.4b2:
-#declare 29 {
-# Tcl_Obj *TclGetElementOfIndexedArray(Tcl_Interp *interp,
-# int localIndex, Tcl_Obj *elemPtr, int flags)
-#}
-# Replaced by char *TclGetEnv(const char *name, Tcl_DString *valuePtr) in 8.1:
-# declare 30 {
-# char *TclGetEnv(const char *name)
-# }
declare 31 {
const char *TclGetExtension(const char *name)
}
@@ -148,27 +84,6 @@ declare 32 {
int TclGetFrame(Tcl_Interp *interp, const char *str,
CallFrame **framePtrPtr)
}
-# Removed in 8.5:
-#declare 33 {
-# TclCmdProcType TclGetInterpProc(void)
-#}
-# Removed in 9.0:
-#declare 34 {deprecated {Use Tcl_GetIntForIndex}} {
-# int TclGetIntForIndex(Tcl_Interp *interp, Tcl_Obj *objPtr,
-# int endValue, int *indexPtr)
-#}
-# Removed in 8.4b2:
-#declare 35 {
-# Tcl_Obj *TclGetIndexedScalar(Tcl_Interp *interp, int localIndex,
-# int flags)
-#}
-# Removed in 8.6a2:
-#declare 36 {
-# int TclGetLong(Tcl_Interp *interp, const char *str, long *longPtr)
-#}
-declare 37 {
- int TclGetLoadedPackages(Tcl_Interp *interp, const char *targetName)
-}
declare 38 {
int TclGetNamespaceForQualName(Tcl_Interp *interp, const char *qualName,
Namespace *cxtNsPtr, int flags, Namespace **nsPtrPtr,
@@ -187,47 +102,15 @@ declare 41 {
declare 42 {
const char *TclpGetUserHome(const char *name, Tcl_DString *bufferPtr)
}
-# Removed in 8.5a2:
-#declare 43 {
-# int TclGlobalInvoke(Tcl_Interp *interp, int argc, const char **argv,
-# int flags)
-#}
-declare 44 {
- int TclGuessPackageName(const char *fileName, Tcl_DString *bufPtr)
-}
declare 45 {
int TclHideUnsafeCommands(Tcl_Interp *interp)
}
declare 46 {
int TclInExit(void)
}
-# Removed in 8.4b2:
-#declare 47 {
-# Tcl_Obj *TclIncrElementOfIndexedArray(Tcl_Interp *interp,
-# int localIndex, Tcl_Obj *elemPtr, long incrAmount)
-#}
-# Removed in 8.4b2:
-#declare 48 {
-# Tcl_Obj *TclIncrIndexedScalar(Tcl_Interp *interp, int localIndex,
-# long incrAmount)
-#}
-#declare 49 {
-# Tcl_Obj *TclIncrVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
-# Tcl_Obj *part2Ptr, long incrAmount, int part1NotParsed)
-#}
-# Removed in 9.0:
-#declare 50 {
-# void TclInitCompiledLocals(Tcl_Interp *interp, CallFrame *framePtr,
-# Namespace *nsPtr)
-#}
declare 51 {
int TclInterpInit(Tcl_Interp *interp)
}
-# Removed in 8.5a2:
-#declare 52 {
-# int TclInvoke(Tcl_Interp *interp, int argc, const char **argv,
-# int flags)
-#}
declare 53 {
int TclInvokeObjectCommand(void *clientData, Tcl_Interp *interp,
int argc, const char **argv)
@@ -239,26 +122,11 @@ declare 54 {
declare 55 {
Proc *TclIsProc(Command *cmdPtr)
}
-# Replaced with TclpLoadFile in 8.1:
-# declare 56 {
-# int TclLoadFile(Tcl_Interp *interp, char *fileName, char *sym1,
-# char *sym2, Tcl_PackageInitProc **proc1Ptr,
-# Tcl_PackageInitProc **proc2Ptr)
-# }
-# Signature changed to take a length in 8.1:
-# declare 57 {
-# int TclLooksLikeInt(char *p)
-# }
declare 58 {
Var *TclLookupVar(Tcl_Interp *interp, const char *part1, const char *part2,
int flags, const char *msg, int createPart1, int createPart2,
Var **arrayPtrPtr)
}
-# Replaced by Tcl_FSMatchInDirectory in 8.4
-#declare 59 {
-# int TclpMatchFiles(Tcl_Interp *interp, char *separators,
-# Tcl_DString *dirPtr, char *pattern, char *tail)
-#}
declare 60 {
int TclNeedSpace(const char *start, const char *end)
}
@@ -276,37 +144,9 @@ declare 64 {
int TclObjInvoke(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[],
int flags)
}
-# Removed in 8.5a2:
-#declare 65 {
-# int TclObjInvokeGlobal(Tcl_Interp *interp, int objc,
-# Tcl_Obj *const objv[], int flags)
-#}
-#declare 66 {
-# int TclOpenFileChannelDeleteProc(TclOpenFileChannelProc_ *proc)
-#}
-#declare 67 {
-# int TclOpenFileChannelInsertProc(TclOpenFileChannelProc_ *proc)
-#}
-# Replaced by Tcl_FSAccess in 8.4:
-#declare 68 {
-# int TclpAccess(const char *path, int mode)
-#}
declare 69 {
void *TclpAlloc(size_t size)
}
-#declare 70 {
-# int TclpCopyFile(const char *source, const char *dest)
-#}
-#declare 71 {
-# int TclpCopyDirectory(const char *source, const char *dest,
-# Tcl_DString *errorPtr)
-#}
-#declare 72 {
-# int TclpCreateDirectory(const char *path)
-#}
-#declare 73 {
-# int TclpDeleteFile(const char *path)
-#}
declare 74 {
void TclpFree(void *ptr)
}
@@ -316,63 +156,13 @@ declare 75 {
declare 76 {
Tcl_WideUInt TclpGetSeconds(void)
}
-
-# Removed in 9.0:
-#declare 77 {
-# void TclpGetTime(Tcl_Time *time)
-#}
-# Removed in 8.6:
-#declare 78 {
-# int TclpGetTimeZone(unsigned long time)
-#}
-# Replaced by Tcl_FSListVolumes in 8.4:
-#declare 79 {
-# int TclpListVolumes(Tcl_Interp *interp)
-#}
-# Replaced by Tcl_FSOpenFileChannel in 8.4:
-#declare 80 {
-# Tcl_Channel TclpOpenFileChannel(Tcl_Interp *interp, char *fileName,
-# char *modeString, int permissions)
-#}
declare 81 {
void *TclpRealloc(void *ptr, size_t size)
}
-#declare 82 {
-# int TclpRemoveDirectory(const char *path, int recursive,
-# Tcl_DString *errorPtr)
-#}
-#declare 83 {
-# int TclpRenameFile(const char *source, const char *dest)
-#}
-# Removed in 8.1:
-# declare 84 {
-# int TclParseBraces(Tcl_Interp *interp, char *str, char **termPtr,
-# ParseValue *pvPtr)
-# }
-# declare 85 {
-# int TclParseNestedCmd(Tcl_Interp *interp, char *str, int flags,
-# char **termPtr, ParseValue *pvPtr)
-# }
-# declare 86 {
-# int TclParseQuotes(Tcl_Interp *interp, char *str, int termChar,
-# int flags, char **termPtr, ParseValue *pvPtr)
-# }
-# declare 87 {
-# void TclPlatformInit(Tcl_Interp *interp)
-# }
-# Removed in 9.0:
-#declare 88 {
-# char *TclPrecTraceProc(void *clientData, Tcl_Interp *interp,
-# const char *name1, const char *name2, int flags)
-#}
declare 89 {
int TclPreventAliasLoop(Tcl_Interp *interp, Tcl_Interp *cmdInterp,
Tcl_Command cmd)
}
-# Removed in 8.1 (only available if compiled with TCL_COMPILE_DEBUG):
-# declare 90 {
-# void TclPrintByteCodeObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
-# }
declare 91 {
void TclProcCleanupProc(Proc *procPtr)
}
@@ -384,15 +174,6 @@ declare 92 {
declare 93 {
void TclProcDeleteProc(void *clientData)
}
-# Removed in 8.5:
-#declare 94 {
-# int TclProcInterpProc(void *clientData, Tcl_Interp *interp,
-# int argc, const char **argv)
-#}
-# Replaced by Tcl_FSStat in 8.4:
-#declare 95 {
-# int TclpStat(const char *path, Tcl_StatBuf *buf)
-#}
declare 96 {
int TclRenameCommand(Tcl_Interp *interp, const char *oldName,
const char *newName)
@@ -403,16 +184,6 @@ declare 97 {
declare 98 {
int TclServiceIdle(void)
}
-# Removed in 8.4b2:
-#declare 99 {
-# Tcl_Obj *TclSetElementOfIndexedArray(Tcl_Interp *interp, int localIndex,
-# Tcl_Obj *elemPtr, Tcl_Obj *objPtr, int flags)
-#}
-# Removed in 8.4b2:
-#declare 100 {
-# Tcl_Obj *TclSetIndexedScalar(Tcl_Interp *interp, int localIndex,
-# Tcl_Obj *objPtr, int flags)
-#}
declare 101 {
const char *TclSetPreInitScript(const char *string)
}
@@ -423,20 +194,6 @@ declare 103 {
int TclSockGetPort(Tcl_Interp *interp, const char *str, const char *proto,
int *portPtr)
}
-# Removed in 9.0:
-#declare 104 {
-# int TclSockMinimumBuffersOld(int sock, int size)
-#}
-# Replaced by Tcl_FSStat in 8.4:
-#declare 105 {
-# int TclStat(const char *path, Tcl_StatBuf *buf)
-#}
-#declare 106 {
-# int TclStatDeleteProc(TclStatProc_ *proc)
-#}
-#declare 107 {
-# int TclStatInsertProc(TclStatProc_ *proc)
-#}
declare 108 {
void TclTeardownNamespace(Namespace *nsPtr)
}
@@ -459,35 +216,6 @@ declare 111 {
Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc,
Tcl_ResolveCompiledVarProc *compiledVarProc)
}
-# Removed in 9.0:
-#declare 112 {
-# int Tcl_AppendExportList(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
-# Tcl_Obj *objPtr)
-#}
-# Removed in 9.0:
-#declare 113 {
-# Tcl_Namespace *Tcl_CreateNamespace(Tcl_Interp *interp, const char *name,
-# void *clientData, Tcl_NamespaceDeleteProc *deleteProc)
-#}
-# Removed in 9.0:
-#declare 114 {
-# void Tcl_DeleteNamespace(Tcl_Namespace *nsPtr)
-#}
-# Removed in 9.0:
-#declare 115 {
-# int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
-# const char *pattern, int resetListFirst)
-#}
-# Removed in 9.0:
-#declare 116 {
-# Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name,
-# Tcl_Namespace *contextNsPtr, int flags)
-#}
-# Removed in 9.0:
-#declare 117 {
-# Tcl_Namespace *Tcl_FindNamespace(Tcl_Interp *interp, const char *name,
-# Tcl_Namespace *contextNsPtr, int flags)
-#}
declare 118 {
int Tcl_GetInterpResolvers(Tcl_Interp *interp, const char *name,
Tcl_ResolverInfo *resInfo)
@@ -500,37 +228,10 @@ declare 120 {
Tcl_Var Tcl_FindNamespaceVar(Tcl_Interp *interp, const char *name,
Tcl_Namespace *contextNsPtr, int flags)
}
-# Removed in 9.0:
-#declare 121 {
-# int Tcl_ForgetImport(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
-# const char *pattern)
-#}
-# Removed in 9.0:
-#declare 122 {
-# Tcl_Command Tcl_GetCommandFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
-#}
-# Removed in 9.0:
-#declare 123 {
-# void Tcl_GetCommandFullName(Tcl_Interp *interp, Tcl_Command command,
-# Tcl_Obj *objPtr)
-#}
-# Removed in 9.0:
-#declare 124 {
-# Tcl_Namespace *Tcl_GetCurrentNamespace(Tcl_Interp *interp)
-#}
-# Removed in 9.0:
-#declare 125 {
-# Tcl_Namespace *Tcl_GetGlobalNamespace(Tcl_Interp *interp)
-#}
declare 126 {
void Tcl_GetVariableFullName(Tcl_Interp *interp, Tcl_Var variable,
Tcl_Obj *objPtr)
}
-# Removed in 9.0:
-#declare 127 {
-# int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
-# const char *pattern, int allowOverwrite)
-#}
declare 128 {
void Tcl_PopCallFrame(Tcl_Interp *interp)
}
@@ -549,35 +250,9 @@ declare 131 {
declare 132 {
int TclpHasSockets(Tcl_Interp *interp)
}
-# Removed in 9.0
-#declare 133 {
-# struct tm *TclpGetDate(const time_t *time, int useGMT)
-#}
-# Removed in 8.5
-#declare 134 {
-# size_t TclpStrftime(char *s, size_t maxsize, const char *format,
-# const struct tm *t, int useGMT)
-#}
-#declare 135 {
-# int TclpCheckStackSpace(void)
-#}
-
-# Added in 8.1:
-
-#declare 137 {
-# int TclpChdir(const char *dirName)
-#}
declare 138 {
const char *TclGetEnv(const char *name, Tcl_DString *valuePtr)
}
-#declare 139 {
-# int TclpLoadFile(Tcl_Interp *interp, char *fileName, char *sym1,
-# char *sym2, Tcl_PackageInitProc **proc1Ptr,
-# Tcl_PackageInitProc **proc2Ptr, void **clientDataPtr)
-#}
-#declare 140 {
-# int TclLooksLikeInt(const char *bytes, int length)
-#}
# This is used by TclX, but should otherwise be considered private
declare 141 {
const char *TclpGetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr)
@@ -609,9 +284,6 @@ declare 148 {
declare 149 {
void TclHandleRelease(TclHandle handle)
}
-
-# Added for Tcl 8.2
-
declare 150 {
int TclRegAbout(Tcl_Interp *interp, Tcl_RegExp re)
}
@@ -625,17 +297,6 @@ declare 152 {
declare 153 {
Tcl_Obj *TclGetLibraryPath(void)
}
-
-# moved to tclTest.c (static) in 8.3.2/8.4a2
-#declare 154 {
-# int TclTestChannelCmd(void *clientData,
-# Tcl_Interp *interp, int argc, char **argv)
-#}
-#declare 155 {
-# int TclTestChannelEventCmd(void *clientData,
-# Tcl_Interp *interp, int argc, char **argv)
-#}
-
declare 156 {
void TclRegError(Tcl_Interp *interp, const char *msg,
int status)
@@ -643,21 +304,6 @@ declare 156 {
declare 157 {
Var *TclVarTraceExists(Tcl_Interp *interp, const char *varName)
}
-# REMOVED - use public Tcl_SetStartupScript()
-#declare 158 {
-# void TclSetStartupScriptFileName(const char *filename)
-#}
-# REMOVED - use public Tcl_GetStartupScript()
-#declare 159 {
-# const char *TclGetStartupScriptFileName(void)
-#}
-#declare 160 {
-# int TclpMatchFilesTypes(Tcl_Interp *interp, char *separators,
-# Tcl_DString *dirPtr, char *pattern, char *tail,
-# GlobTypeData *types)
-#}
-
-# new in 8.3.2/8.4a2
declare 161 {
int TclChannelTransform(Tcl_Interp *interp, Tcl_Channel chan,
Tcl_Obj *cmdObjPtr)
@@ -694,15 +340,6 @@ declare 166 {
int index, Tcl_Obj *valuePtr)
}
-# VFS-aware versions of Tcl*StartupScriptFileName (158 and 159 above)
-# REMOVED - use public Tcl_SetStartupScript()
-#declare 167 {
-# void TclSetStartupScriptPath(Tcl_Obj *pathPtr)
-#}
-# REMOVED - use public Tcl_GetStartupScript()
-#declare 168 {
-# Tcl_Obj *TclGetStartupScriptPath(void)
-#}
# variant of Tcl_UtfNCmp that takes n as bytes, not chars
declare 169 {
int TclpUtfNcmp2(const char *s1, const char *s2, size_t n)
@@ -720,23 +357,10 @@ declare 171 {
declare 172 {
int TclInThreadExit(void)
}
-
-# added for 8.4.2
-
declare 173 {
int TclUniCharMatch(const Tcl_UniChar *string, size_t strLen,
const Tcl_UniChar *pattern, size_t ptnLen, int flags)
}
-
-# added for 8.4.3
-
-#declare 174 {
-# Tcl_Obj *TclIncrWideVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
-# Tcl_Obj *part2Ptr, Tcl_WideInt wideIncrAmount, int part1NotParsed)
-#}
-
-# Factoring out of trace code
-
declare 175 {
int TclCallVarTraces(Interp *iPtr, Var *arrayPtr, Var *varPtr,
const char *part1, const char *part2, int flags, int leaveErrMsg)
@@ -748,95 +372,10 @@ declare 177 {
void TclVarErrMsg(Tcl_Interp *interp, const char *part1, const char *part2,
const char *operation, const char *reason)
}
-# TIP 338 made these public - now declared in tcl.h
-#declare 178 {
-# void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char *encodingName)
-#}
-#declare 179 {
-# Tcl_Obj *Tcl_GetStartupScript(const char **encodingNamePtr)
-#}
-
-# REMOVED
-# Allocate lists without copying arrays
-# declare 180 {
-# Tcl_Obj *TclNewListObjDirect(int objc, Tcl_Obj **objv)
-# }
-#declare 181 {
-# Tcl_Obj *TclDbNewListObjDirect(int objc, Tcl_Obj **objv,
-# const char *file, int line)
-#}
-
-# Removed in 9.0
-#declare 182 {
-# struct tm *TclpLocaltime(const time_t *clock)
-#}
-# Removed in 9.0
-#declare 183 {
-# struct tm *TclpGmtime(const time_t *clock)
-#}
-
-# For the new "Thread Storage" subsystem.
-
-### REMOVED on grounds it should never have been exposed. All these
-### functions are now either static in tclThreadStorage.c or
-### MODULE_SCOPE.
-# declare 184 {
-# void TclThreadStorageLockInit(void)
-# }
-# declare 185 {
-# void TclThreadStorageLock(void)
-# }
-# declare 186 {
-# void TclThreadStorageUnlock(void)
-# }
-# declare 187 {
-# void TclThreadStoragePrint(FILE *outFile, int flags)
-# }
-# declare 188 {
-# Tcl_HashTable *TclThreadStorageGetHashTable(Tcl_ThreadId id)
-# }
-# declare 189 {
-# Tcl_HashTable *TclThreadStorageInit(Tcl_ThreadId id, void *reserved)
-# }
-# declare 190 {
-# void TclThreadStorageDataKeyInit(Tcl_ThreadDataKey *keyPtr)
-# }
-# declare 191 {
-# void *TclThreadStorageDataKeyGet(Tcl_ThreadDataKey *keyPtr)
-# }
-# declare 192 {
-# void TclThreadStorageDataKeySet(Tcl_ThreadDataKey *keyPtr, void *data)
-# }
-# declare 193 {
-# void TclFinalizeThreadStorageThread(Tcl_ThreadId id)
-# }
-# declare 194 {
-# void TclFinalizeThreadStorage(void)
-# }
-# declare 195 {
-# void TclFinalizeThreadStorageData(Tcl_ThreadDataKey *keyPtr)
-# }
-# declare 196 {
-# void TclFinalizeThreadStorageDataKey(Tcl_ThreadDataKey *keyPtr)
-# }
-
-#
-# Added in tcl8.5a5 for compiler/executor experimentation.
-# Disabled in Tcl 8.5.1; experiments terminated. :/
-#
-#declare 197 {
-# int TclCompEvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
-# const CmdFrame *invoker, int word)
-#}
declare 198 {
int TclObjGetFrame(Tcl_Interp *interp, Tcl_Obj *objPtr,
CallFrame **framePtrPtr)
}
-
-#declare 199 {
-# int TclMatchIsTrivial(const char *pattern)
-#}
-
# 200-208 exported for use by the test suite [Bug 1054748]
declare 200 {
int TclpObjRemoveDirectory(Tcl_Obj *pathPtr, int recursive,
@@ -868,16 +407,6 @@ declare 208 {
Tcl_Channel TclpOpenFileChannel(Tcl_Interp *interp,
Tcl_Obj *pathPtr, int mode, int permissions)
}
-# Made public by TIP 258
-#declare 209 {
-# Tcl_Obj *TclGetEncodingSearchPath(void)
-#}
-#declare 210 {
-# int TclSetEncodingSearchPath(Tcl_Obj *searchPath)
-#}
-#declare 211 {
-# const char *TclpGetEncodingNameFromEnvironment(Tcl_DString *bufPtr)
-#}
declare 212 {
void TclpFindExecutable(const char *argv0)
}
@@ -905,8 +434,6 @@ declare 218 {
declare 224 {
TclPlatformType *TclGetPlatform(void)
}
-
-#
declare 225 {
Tcl_Obj *TclTraceDictPath(Tcl_Interp *interp, Tcl_Obj *rootPtr,
int keyc, Tcl_Obj *const keyv[], int flags)
@@ -918,12 +445,6 @@ declare 227 {
void TclSetNsPath(Namespace *nsPtr, size_t pathLength,
Tcl_Namespace *pathAry[])
}
-# Used to be needed for TclOO-extension; unneeded now that TclOO is in the
-# core and NRE-enabled
-# declare 228 {
-# int TclObjInterpProcCore(Tcl_Interp *interp, Tcl_Obj *procNameObj,
-# int skip, ProcErrorProc *errorProc)
-# }
declare 229 {
int TclPtrMakeUpvar(Tcl_Interp *interp, Var *otherP1Ptr,
const char *myName, int myFlags, int index)
@@ -946,7 +467,6 @@ declare 232 {
declare 233 {
void TclGetSrcInfoForPc(CmdFrame *contextPtr)
}
-
# Exports for VarReform compat: Itcl, XOTcl like to peek into our varTables :(
declare 234 {
Var *TclVarHashCreateVar(TclVarHashTable *tablePtr, const char *key,
@@ -955,18 +475,10 @@ declare 234 {
declare 235 {
void TclInitVarHashTable(TclVarHashTable *tablePtr, Namespace *nsPtr)
}
-
-
-# TIP 337 made this one public
-#declare 236 {
-# void TclBackgroundException(Tcl_Interp *interp, int code)
-#}
-
# TIP #285: Script cancellation support.
declare 237 {
int TclResetCancellation(Tcl_Interp *interp, int force)
}
-
# NRE functions for "rogue" extensions to exploit NRE; they will need to
# include NRE.h too.
declare 238 {
@@ -1012,7 +524,7 @@ declare 247 {
declare 248 {
int TclCopyChannel(Tcl_Interp *interp, Tcl_Channel inChan,
- Tcl_Channel outChan, Tcl_WideInt toRead, Tcl_Obj *cmdPtr)
+ Tcl_Channel outChan, long long toRead, Tcl_Obj *cmdPtr)
}
declare 249 {
@@ -1055,6 +567,7 @@ declare 256 {
int TclPtrUnsetVar(Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr,
Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const int flags)
}
+
declare 257 {
void TclStaticPackage(Tcl_Interp *interp, const char *pkgName,
Tcl_PackageInitProc *initProc, Tcl_PackageInitProc *safeInitProc)
@@ -1075,7 +588,6 @@ declare 260 {
unsigned char *TclGetBytesFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
size_t *lengthPtr)
}
-
##############################################################################
@@ -1085,248 +597,89 @@ declare 260 {
interface tclIntPlat
################################
-# Windows specific functions
+# Platform specific functions
-declare 0 win {
+declare 0 {unix win} {
void TclWinConvertError(int errCode)
}
-# Removed in 9.0:
-#declare 1 win {
-# void TclWinConvertWSAError(int errCode)
-#}
-# Removed in 9.0:
-#declare 2 win {
-# struct servent *TclWinGetServByName(const char *nm,
-# const char *proto)
-#}
-# Removed in 9.0:
-#declare 3 win {
-# int TclWinGetSockOpt(SOCKET s, int level, int optname,
-# char *optval, int *optlen)
-#}
-declare 4 win {
- void *TclWinGetTclInstance(void)
-}
-# new for 8.4.20+/8.5.12+ Cygwin only
-declare 5 win {
- int TclUnixWaitForFile(int fd, int mask, int timeout)
-}
-# Removed in 8.1:
-# declare 5 win {
-# HINSTANCE TclWinLoadLibrary(char *name)
-# }
-# Removed in 9.0:
-#declare 6 win {
-# unsigned short TclWinNToHS(unsigned short ns)
-#}
-# Removed in 9.0:
-#declare 7 win {
-# int TclWinSetSockOpt(SOCKET s, int level, int optname,
-# const char *optval, int optlen)
-#}
-declare 8 win {
- size_t TclpGetPid(Tcl_Pid pid)
-}
-# Removed in 9.0:
-#declare 9 win {
-# int TclWinGetPlatformId(void)
-#}
-# Removed in 9.0:
-#declare 10 win {
-# Tcl_DirEntry *TclpReaddir(TclDIR *dir)
-#}
-# Removed in 8.3.1 (for Win32s only):
-#declare 10 win {
-# int TclWinSynchSpawn(void *args, int type, void **trans, Tcl_Pid *pidPtr)
-#}
-
-# Pipe channel functions
-
-declare 11 win {
- void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan)
-}
-declare 12 win {
+declare 1 {unix win} {
int TclpCloseFile(TclFile file)
}
-declare 13 win {
+declare 2 {unix win} {
Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)
}
-declare 14 win {
+declare 3 {unix win} {
int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe)
}
-declare 15 win {
- int TclpCreateProcess(Tcl_Interp *interp, int argc,
- const char **argv, TclFile inputFile, TclFile outputFile,
- TclFile errorFile, Tcl_Pid *pidPtr)
-}
-# new for 8.4.20+/8.5.12+ Cygwin only
-declare 16 win {
- int TclpIsAtty(int fd)
+declare 4 {unix win} {
+ void *TclWinGetTclInstance(void)
}
-# Signature changed in 8.1:
-# declare 16 win {
-# TclFile TclpCreateTempFile(char *contents, Tcl_DString *namePtr)
-# }
-# declare 17 win {
-# char *TclpGetTZName(void)
-# }
-# new for 8.5.12+ Cygwin only
-declare 17 win {
- int TclUnixCopyFile(const char *src, const char *dst,
- const Tcl_StatBuf *statBufPtr, int dontCopyAtts)
+declare 5 {unix win} {
+ int TclUnixWaitForFile(int fd, int mask, int timeout)
}
-declare 18 win {
+declare 6 {unix win} {
TclFile TclpMakeFile(Tcl_Channel channel, int direction)
}
-declare 19 win {
+declare 7 {unix win} {
TclFile TclpOpenFile(const char *fname, int mode)
}
-declare 20 win {
- void TclWinAddProcess(void *hProcess, size_t id)
+declare 8 {unix win} {
+ size_t TclpGetPid(Tcl_Pid pid)
}
-# Removed in 9.0:
-#declare 21 win {
-# char *TclpInetNtoa(struct in_addr addr)
-#}
-# removed permanently for 8.4
-#declare 21 win {
-# void TclpAsyncMark(Tcl_AsyncHandler async)
-#}
-
-# Added in 8.1:
-declare 22 win {
+declare 9 {unix win} {
TclFile TclpCreateTempFile(const char *contents)
}
-# Removed in 8.6:
-#declare 23 win {
-# char *TclpGetTZName(int isdst)
-#}
-declare 24 win {
- char *TclWinNoBackslash(char *path)
-}
-# replaced by generic TclGetPlatform
-#declare 25 win {
-# TclPlatformType *TclWinGetPlatform(void)
-#}
-# Removed in 9.0:
-#declare 26 win {
-# void TclWinSetInterfaces(int wide)
-#}
-
-# Added in Tcl 8.3.3 / 8.4
-
-declare 27 win {
- void TclWinFlushDirtyChannels(void)
-}
-
-# Added in 8.4.2
-
-# Removed in 9.0:
-#declare 28 win {
-# void TclWinResetInterfaces(void)
-#}
-
-################################
-# Unix specific functions
-
-# Pipe channel functions
-
-declare 0 unix {
+declare 11 {unix win} {
void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan)
}
-declare 1 unix {
- int TclpCloseFile(TclFile file)
+declare 12 win {
+ int TclpCloseFile_(TclFile file)
}
-declare 2 unix {
- Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
+declare 13 win {
+ Tcl_Channel TclpCreateCommandChannel_(TclFile readFile,
TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)
}
-declare 3 unix {
- int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe)
+declare 14 {unix win} {
+ int TclpCreatePipe_(TclFile *readPipe, TclFile *writePipe)
}
-declare 4 unix {
+declare 15 {unix win} {
int TclpCreateProcess(Tcl_Interp *interp, int argc,
const char **argv, TclFile inputFile, TclFile outputFile,
TclFile errorFile, Tcl_Pid *pidPtr)
}
-declare 5 unix {
- int TclUnixWaitForFile_(int fd, int mask, int timeout)
-}
-declare 6 unix {
- TclFile TclpMakeFile(Tcl_Channel channel, int direction)
-}
-declare 7 unix {
- TclFile TclpOpenFile(const char *fname, int mode)
-}
-declare 8 unix {
- int TclUnixWaitForFile(int fd, int mask, int timeout)
-}
-
-# Added in 8.1:
-
-declare 9 unix {
- TclFile TclpCreateTempFile(const char *contents)
+declare 16 {unix win} {
+ int TclpIsAtty(int fd)
}
-
-# Added in 8.4:
-
-# Removed in 9.0:
-#declare 10 unix {
-# Tcl_DirEntry *TclpReaddir(TclDIR *dir)
-#}
-# Removed in 9.0:
-#declare 11 unix {
-# struct tm *TclpLocaltime_unix(const time_t *clock)
-#}
-# Removed in 9.0:
-#declare 12 unix {
-# struct tm *TclpGmtime_unix(const time_t *clock)
-#}
-# Removed in 9.0:
-#declare 13 unix {
-# char *TclpInetNtoa(struct in_addr addr)
-#}
-
-# Added in 8.5:
-
-declare 14 unix {
+declare 17 {unix win} {
int TclUnixCopyFile(const char *src, const char *dst,
const Tcl_StatBuf *statBufPtr, int dontCopyAtts)
}
-
-################################
-# Mac OS X specific functions
-
-declare 15 {unix macosx} {
- int TclMacOSXGetFileAttribute(Tcl_Interp *interp, int objIndex,
- Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr)
-}
-declare 16 {unix macosx} {
- int TclMacOSXSetFileAttribute(Tcl_Interp *interp, int objIndex,
- Tcl_Obj *fileName, Tcl_Obj *attributePtr)
+declare 18 win {
+ TclFile TclpMakeFile_(Tcl_Channel channel, int direction)
}
-declare 17 {unix macosx} {
- int TclMacOSXCopyFileAttributes(const char *src, const char *dst,
- const Tcl_StatBuf *statBufPtr)
+declare 19 unix {
+ void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode)
}
-declare 18 {unix macosx} {
- int TclMacOSXMatchType(Tcl_Interp *interp, const char *pathName,
- const char *fileName, Tcl_StatBuf *statBufPtr,
- Tcl_GlobTypeData *types)
+declare 19 win {
+ TclFile TclpOpenFile_(const char *fname, int mode)
}
-declare 19 {unix macosx} {
- void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode)
+declare 20 {unix win} {
+ void TclWinAddProcess(void *hProcess, size_t id)
}
-declare 22 {unix macosx} {
+declare 22 {unix win} {
TclFile TclpCreateTempFile_(const char *contents)
}
-
-declare 29 {win unix} {
+declare 24 {unix win} {
+ char *TclWinNoBackslash(char *path)
+}
+declare 27 {unix win} {
+ void TclWinFlushDirtyChannels(void)
+}
+declare 29 {unix win} {
int TclWinCPUID(int index, int *regs)
}
-# Added in 8.6; core of TclpOpenTemporaryFile
-declare 30 {win unix} {
+declare 30 {unix win} {
int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj, Tcl_Obj *basenameObj,
Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj)
}
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 2a0dfa6..3816eff 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3183,12 +3183,14 @@ MODULE_SCOPE size_t TclUtfCount(int ch);
#if TCL_UTF_MAX > 3
# define TclUtfToUCS4 Tcl_UtfToUniChar
# define TclUniCharToUCS4(src, ptr) (*ptr = *(src),1)
+# define TclUCS4Prev(src, ptr) (((src) > (ptr)) ? ((src) - 1) : (src))
# define TclUCS4Complete Tcl_UtfCharComplete
# define TclChar16Complete(src, length) (((unsigned)((unsigned char)*(src) - 0xF0) < 5) \
? ((length) >= 3) : Tcl_UtfCharComplete((src), (length)))
#else
- MODULE_SCOPE int TclUtfToUCS4(const char *src, int *ucs4Ptr);
- MODULE_SCOPE int TclUniCharToUCS4(const Tcl_UniChar *src, int *ucs4Ptr);
+ MODULE_SCOPE int TclUtfToUCS4(const char *, int *);
+ MODULE_SCOPE int TclUniCharToUCS4(const Tcl_UniChar *, int *);
+ MODULE_SCOPE const Tcl_UniChar *TclUCS4Prev(const Tcl_UniChar *, const Tcl_UniChar *);
# define TclUCS4Complete(src, length) (((unsigned)((unsigned char)*(src) - 0xF0) < 5) \
? ((length) >= 4) : Tcl_UtfCharComplete((src), (length)))
# define TclChar16Complete Tcl_UtfCharComplete
@@ -3210,19 +3212,19 @@ MODULE_SCOPE void TclFinalizeThreadDataThread(void);
MODULE_SCOPE void TclFinalizeThreadStorage(void);
#ifdef TCL_WIDE_CLICKS
-MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void);
-MODULE_SCOPE double TclpWideClicksToNanoseconds(Tcl_WideInt clicks);
+MODULE_SCOPE long long TclpGetWideClicks(void);
+MODULE_SCOPE double TclpWideClicksToNanoseconds(long long clicks);
MODULE_SCOPE double TclpWideClickInMicrosec(void);
#else
# ifdef _WIN32
# define TCL_WIDE_CLICKS 1
-MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void);
+MODULE_SCOPE long long TclpGetWideClicks(void);
MODULE_SCOPE double TclpWideClickInMicrosec(void);
# define TclpWideClicksToNanoseconds(clicks) \
((double)(clicks) * TclpWideClickInMicrosec() * 1000)
# endif
#endif
-MODULE_SCOPE Tcl_WideInt TclpGetMicroseconds(void);
+MODULE_SCOPE long long TclpGetMicroseconds(void);
MODULE_SCOPE int TclZlibInit(Tcl_Interp *interp);
MODULE_SCOPE void * TclpThreadCreateKey(void);
@@ -4417,39 +4419,6 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
#define TclGetString(objPtr) \
((objPtr)->bytes? (objPtr)->bytes : Tcl_GetString(objPtr))
-#if 0
- static inline char *TclGetStringFromObj(Tcl_Obj *objPtr, size_t *lenPtr) {
- char *response = Tcl_GetString(objPtr);
- *(lenPtr) = objPtr->length;
- return response;
- }
- static inline Tcl_UniChar *TclGetUnicodeFromObj(Tcl_Obj *objPtr, size_t *lenPtr) {
- Tcl_UniChar *response = Tcl_GetUnicodeFromObj(objPtr, NULL);
- *(lenPtr) = *((size_t *) (objPtr)->internalRep.twoPtrValue.ptr1);
- return response;
- }
- static inline unsigned char *TclGetByteArrayFromObj(Tcl_Obj *objPtr, size_t *lenPtr) {
- unsigned char *response = Tcl_GetByteArrayFromObj(objPtr, NULL);
- if (response) {
- *(lenPtr) = *((size_t *) (objPtr)->internalRep.twoPtrValue.ptr1 + 1);
- }
- return response;
- }
-#else
-#define TclGetStringFromObj(objPtr, lenPtr) \
- (((objPtr)->bytes \
- ? NULL : Tcl_GetString((objPtr)), \
- *(lenPtr) = (objPtr)->length, (objPtr)->bytes))
-#define TclGetUnicodeFromObj(objPtr, lenPtr) \
- (Tcl_GetUnicodeFromObj((objPtr), NULL), \
- *(lenPtr) = *((size_t *) (objPtr)->internalRep.twoPtrValue.ptr1), \
- Tcl_GetUnicodeFromObj((objPtr), NULL))
-#define TclGetByteArrayFromObj(objPtr, lenPtr) \
- (Tcl_GetByteArrayFromObj((objPtr), NULL) ? \
- (*(lenPtr) = *((size_t *) (objPtr)->internalRep.twoPtrValue.ptr1 + 1), \
- (unsigned char *)(((size_t *) (objPtr)->internalRep.twoPtrValue.ptr1) + 3)) : NULL)
-#endif
-
/*
*----------------------------------------------------------------
* Macro used by the Tcl core to clean out an object's internal
@@ -4852,7 +4821,7 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit;
(objPtr) = Tcl_NewWideIntObj(w)
#define TclNewIndexObj(objPtr, w) \
- (objPtr) = ((w) == TCL_INDEX_NONE) ? Tcl_NewWideIntObj(-1) : Tcl_NewWideIntObj(w)
+ (objPtr) = (((size_t)w) == TCL_INDEX_NONE) ? Tcl_NewWideIntObj(-1) : Tcl_NewWideIntObj(w)
#define TclNewDoubleObj(objPtr, d) \
(objPtr) = Tcl_NewDoubleObj(d)
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 9053285..2969f27 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -111,9 +111,7 @@ EXTERN int TclGetFrame(Tcl_Interp *interp, const char *str,
/* Slot 34 is reserved */
/* Slot 35 is reserved */
/* Slot 36 is reserved */
-/* 37 */
-EXTERN int TclGetLoadedPackages(Tcl_Interp *interp,
- const char *targetName);
+/* Slot 37 is reserved */
/* 38 */
EXTERN int TclGetNamespaceForQualName(Tcl_Interp *interp,
const char *qualName, Namespace *cxtNsPtr,
@@ -132,9 +130,7 @@ EXTERN Tcl_Command TclGetOriginalCommand(Tcl_Command command);
EXTERN const char * TclpGetUserHome(const char *name,
Tcl_DString *bufferPtr);
/* Slot 43 is reserved */
-/* 44 */
-EXTERN int TclGuessPackageName(const char *fileName,
- Tcl_DString *bufPtr);
+/* Slot 44 is reserved */
/* 45 */
EXTERN int TclHideUnsafeCommands(Tcl_Interp *interp);
/* 46 */
@@ -541,7 +537,7 @@ EXTERN void TclResetRewriteEnsemble(Tcl_Interp *interp,
/* 248 */
EXTERN int TclCopyChannel(Tcl_Interp *interp,
Tcl_Channel inChan, Tcl_Channel outChan,
- Tcl_WideInt toRead, Tcl_Obj *cmdPtr);
+ long long toRead, Tcl_Obj *cmdPtr);
/* 249 */
EXTERN char * TclDoubleDigits(double dv, int ndigits, int flags,
int *decpt, int *signum, char **endPtr);
@@ -629,14 +625,14 @@ typedef struct TclIntStubs {
void (*reserved34)(void);
void (*reserved35)(void);
void (*reserved36)(void);
- int (*tclGetLoadedPackages) (Tcl_Interp *interp, const char *targetName); /* 37 */
+ void (*reserved37)(void);
int (*tclGetNamespaceForQualName) (Tcl_Interp *interp, const char *qualName, Namespace *cxtNsPtr, int flags, Namespace **nsPtrPtr, Namespace **altNsPtrPtr, Namespace **actualCxtPtrPtr, const char **simpleNamePtr); /* 38 */
TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */
int (*tclGetOpenMode) (Tcl_Interp *interp, const char *str, int *seekFlagPtr); /* 40 */
Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */
const char * (*tclpGetUserHome) (const char *name, Tcl_DString *bufferPtr); /* 42 */
void (*reserved43)(void);
- int (*tclGuessPackageName) (const char *fileName, Tcl_DString *bufPtr); /* 44 */
+ void (*reserved44)(void);
int (*tclHideUnsafeCommands) (Tcl_Interp *interp); /* 45 */
int (*tclInExit) (void); /* 46 */
void (*reserved47)(void);
@@ -840,7 +836,7 @@ typedef struct TclIntStubs {
Tcl_HashTable * (*tclGetNamespaceCommandTable) (Tcl_Namespace *nsPtr); /* 245 */
int (*tclInitRewriteEnsemble) (Tcl_Interp *interp, size_t numRemoved, size_t numInserted, Tcl_Obj *const *objv); /* 246 */
void (*tclResetRewriteEnsemble) (Tcl_Interp *interp, int isRootEnsemble); /* 247 */
- int (*tclCopyChannel) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, Tcl_WideInt toRead, Tcl_Obj *cmdPtr); /* 248 */
+ int (*tclCopyChannel) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, long long toRead, Tcl_Obj *cmdPtr); /* 248 */
char * (*tclDoubleDigits) (double dv, int ndigits, int flags, int *decpt, int *signum, char **endPtr); /* 249 */
void (*tclSetChildCancelFlags) (Tcl_Interp *interp, int flags, int force); /* 250 */
int (*tclRegisterLiteral) (void *envPtr, const char *bytes, size_t length, int flags); /* 251 */
@@ -921,8 +917,7 @@ extern const TclIntStubs *tclIntStubsPtr;
/* Slot 34 is reserved */
/* Slot 35 is reserved */
/* Slot 36 is reserved */
-#define TclGetLoadedPackages \
- (tclIntStubsPtr->tclGetLoadedPackages) /* 37 */
+/* Slot 37 is reserved */
#define TclGetNamespaceForQualName \
(tclIntStubsPtr->tclGetNamespaceForQualName) /* 38 */
#define TclGetObjInterpProc \
@@ -934,8 +929,7 @@ extern const TclIntStubs *tclIntStubsPtr;
#define TclpGetUserHome \
(tclIntStubsPtr->tclpGetUserHome) /* 42 */
/* Slot 43 is reserved */
-#define TclGuessPackageName \
- (tclIntStubsPtr->tclGuessPackageName) /* 44 */
+/* Slot 44 is reserved */
#define TclHideUnsafeCommands \
(tclIntStubsPtr->tclHideUnsafeCommands) /* 45 */
#define TclInExit \
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 7613264..c8941e5 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -42,8 +42,7 @@ extern "C" {
#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
/* 0 */
-EXTERN void TclGetAndDetachPids(Tcl_Interp *interp,
- Tcl_Channel chan);
+EXTERN void TclWinConvertError(int errCode);
/* 1 */
EXTERN int TclpCloseFile(TclFile file);
/* 2 */
@@ -53,57 +52,53 @@ EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
/* 3 */
EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe);
/* 4 */
-EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc,
- const char **argv, TclFile inputFile,
- TclFile outputFile, TclFile errorFile,
- Tcl_Pid *pidPtr);
+EXTERN void * TclWinGetTclInstance(void);
/* 5 */
-EXTERN int TclUnixWaitForFile_(int fd, int mask, int timeout);
+EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
/* 6 */
EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction);
/* 7 */
EXTERN TclFile TclpOpenFile(const char *fname, int mode);
/* 8 */
-EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
+EXTERN size_t TclpGetPid(Tcl_Pid pid);
/* 9 */
EXTERN TclFile TclpCreateTempFile(const char *contents);
/* Slot 10 is reserved */
-/* Slot 11 is reserved */
+/* 11 */
+EXTERN void TclGetAndDetachPids(Tcl_Interp *interp,
+ Tcl_Channel chan);
/* Slot 12 is reserved */
/* Slot 13 is reserved */
/* 14 */
-EXTERN int TclUnixCopyFile(const char *src, const char *dst,
- const Tcl_StatBuf *statBufPtr,
- int dontCopyAtts);
+EXTERN int TclpCreatePipe_(TclFile *readPipe,
+ TclFile *writePipe);
/* 15 */
-EXTERN int TclMacOSXGetFileAttribute(Tcl_Interp *interp,
- int objIndex, Tcl_Obj *fileName,
- Tcl_Obj **attributePtrPtr);
+EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc,
+ const char **argv, TclFile inputFile,
+ TclFile outputFile, TclFile errorFile,
+ Tcl_Pid *pidPtr);
/* 16 */
-EXTERN int TclMacOSXSetFileAttribute(Tcl_Interp *interp,
- int objIndex, Tcl_Obj *fileName,
- Tcl_Obj *attributePtr);
+EXTERN int TclpIsAtty(int fd);
/* 17 */
-EXTERN int TclMacOSXCopyFileAttributes(const char *src,
- const char *dst,
- const Tcl_StatBuf *statBufPtr);
-/* 18 */
-EXTERN int TclMacOSXMatchType(Tcl_Interp *interp,
- const char *pathName, const char *fileName,
- Tcl_StatBuf *statBufPtr,
- Tcl_GlobTypeData *types);
+EXTERN int TclUnixCopyFile(const char *src, const char *dst,
+ const Tcl_StatBuf *statBufPtr,
+ int dontCopyAtts);
+/* Slot 18 is reserved */
/* 19 */
EXTERN void TclMacOSXNotifierAddRunLoopMode(
const void *runLoopMode);
-/* Slot 20 is reserved */
+/* 20 */
+EXTERN void TclWinAddProcess(void *hProcess, size_t id);
/* Slot 21 is reserved */
/* 22 */
EXTERN TclFile TclpCreateTempFile_(const char *contents);
/* Slot 23 is reserved */
-/* Slot 24 is reserved */
+/* 24 */
+EXTERN char * TclWinNoBackslash(char *path);
/* Slot 25 is reserved */
/* Slot 26 is reserved */
-/* Slot 27 is reserved */
+/* 27 */
+EXTERN void TclWinFlushDirtyChannels(void);
/* Slot 28 is reserved */
/* 29 */
EXTERN int TclWinCPUID(int index, int *regs);
@@ -115,30 +110,39 @@ EXTERN int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj,
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
/* 0 */
EXTERN void TclWinConvertError(int errCode);
-/* Slot 1 is reserved */
-/* Slot 2 is reserved */
-/* Slot 3 is reserved */
+/* 1 */
+EXTERN int TclpCloseFile(TclFile file);
+/* 2 */
+EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
+ TclFile writeFile, TclFile errorFile,
+ int numPids, Tcl_Pid *pidPtr);
+/* 3 */
+EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe);
/* 4 */
EXTERN void * TclWinGetTclInstance(void);
/* 5 */
EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
-/* Slot 6 is reserved */
-/* Slot 7 is reserved */
+/* 6 */
+EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction);
+/* 7 */
+EXTERN TclFile TclpOpenFile(const char *fname, int mode);
/* 8 */
EXTERN size_t TclpGetPid(Tcl_Pid pid);
-/* Slot 9 is reserved */
+/* 9 */
+EXTERN TclFile TclpCreateTempFile(const char *contents);
/* Slot 10 is reserved */
/* 11 */
EXTERN void TclGetAndDetachPids(Tcl_Interp *interp,
Tcl_Channel chan);
/* 12 */
-EXTERN int TclpCloseFile(TclFile file);
+EXTERN int TclpCloseFile_(TclFile file);
/* 13 */
-EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
+EXTERN Tcl_Channel TclpCreateCommandChannel_(TclFile readFile,
TclFile writeFile, TclFile errorFile,
int numPids, Tcl_Pid *pidPtr);
/* 14 */
-EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe);
+EXTERN int TclpCreatePipe_(TclFile *readPipe,
+ TclFile *writePipe);
/* 15 */
EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc,
const char **argv, TclFile inputFile,
@@ -151,14 +155,14 @@ EXTERN int TclUnixCopyFile(const char *src, const char *dst,
const Tcl_StatBuf *statBufPtr,
int dontCopyAtts);
/* 18 */
-EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction);
+EXTERN TclFile TclpMakeFile_(Tcl_Channel channel, int direction);
/* 19 */
-EXTERN TclFile TclpOpenFile(const char *fname, int mode);
+EXTERN TclFile TclpOpenFile_(const char *fname, int mode);
/* 20 */
EXTERN void TclWinAddProcess(void *hProcess, size_t id);
/* Slot 21 is reserved */
/* 22 */
-EXTERN TclFile TclpCreateTempFile(const char *contents);
+EXTERN TclFile TclpCreateTempFile_(const char *contents);
/* Slot 23 is reserved */
/* 24 */
EXTERN char * TclWinNoBackslash(char *path);
@@ -176,8 +180,7 @@ EXTERN int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj,
#endif /* WIN */
#ifdef MAC_OSX_TCL /* MACOSX */
/* 0 */
-EXTERN void TclGetAndDetachPids(Tcl_Interp *interp,
- Tcl_Channel chan);
+EXTERN void TclWinConvertError(int errCode);
/* 1 */
EXTERN int TclpCloseFile(TclFile file);
/* 2 */
@@ -187,57 +190,53 @@ EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile,
/* 3 */
EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe);
/* 4 */
-EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc,
- const char **argv, TclFile inputFile,
- TclFile outputFile, TclFile errorFile,
- Tcl_Pid *pidPtr);
+EXTERN void * TclWinGetTclInstance(void);
/* 5 */
-EXTERN int TclUnixWaitForFile_(int fd, int mask, int timeout);
+EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
/* 6 */
EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction);
/* 7 */
EXTERN TclFile TclpOpenFile(const char *fname, int mode);
/* 8 */
-EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout);
+EXTERN size_t TclpGetPid(Tcl_Pid pid);
/* 9 */
EXTERN TclFile TclpCreateTempFile(const char *contents);
/* Slot 10 is reserved */
-/* Slot 11 is reserved */
+/* 11 */
+EXTERN void TclGetAndDetachPids(Tcl_Interp *interp,
+ Tcl_Channel chan);
/* Slot 12 is reserved */
/* Slot 13 is reserved */
/* 14 */
-EXTERN int TclUnixCopyFile(const char *src, const char *dst,
- const Tcl_StatBuf *statBufPtr,
- int dontCopyAtts);
+EXTERN int TclpCreatePipe_(TclFile *readPipe,
+ TclFile *writePipe);
/* 15 */
-EXTERN int TclMacOSXGetFileAttribute(Tcl_Interp *interp,
- int objIndex, Tcl_Obj *fileName,
- Tcl_Obj **attributePtrPtr);
+EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc,
+ const char **argv, TclFile inputFile,
+ TclFile outputFile, TclFile errorFile,
+ Tcl_Pid *pidPtr);
/* 16 */
-EXTERN int TclMacOSXSetFileAttribute(Tcl_Interp *interp,
- int objIndex, Tcl_Obj *fileName,
- Tcl_Obj *attributePtr);
+EXTERN int TclpIsAtty(int fd);
/* 17 */
-EXTERN int TclMacOSXCopyFileAttributes(const char *src,
- const char *dst,
- const Tcl_StatBuf *statBufPtr);
-/* 18 */
-EXTERN int TclMacOSXMatchType(Tcl_Interp *interp,
- const char *pathName, const char *fileName,
- Tcl_StatBuf *statBufPtr,
- Tcl_GlobTypeData *types);
+EXTERN int TclUnixCopyFile(const char *src, const char *dst,
+ const Tcl_StatBuf *statBufPtr,
+ int dontCopyAtts);
+/* Slot 18 is reserved */
/* 19 */
EXTERN void TclMacOSXNotifierAddRunLoopMode(
const void *runLoopMode);
-/* Slot 20 is reserved */
+/* 20 */
+EXTERN void TclWinAddProcess(void *hProcess, size_t id);
/* Slot 21 is reserved */
/* 22 */
EXTERN TclFile TclpCreateTempFile_(const char *contents);
/* Slot 23 is reserved */
-/* Slot 24 is reserved */
+/* 24 */
+EXTERN char * TclWinNoBackslash(char *path);
/* Slot 25 is reserved */
/* Slot 26 is reserved */
-/* Slot 27 is reserved */
+/* 27 */
+EXTERN void TclWinFlushDirtyChannels(void);
/* Slot 28 is reserved */
/* 29 */
EXTERN int TclWinCPUID(int index, int *regs);
@@ -252,62 +251,62 @@ typedef struct TclIntPlatStubs {
void *hooks;
#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
- void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 0 */
+ void (*tclWinConvertError) (int errCode); /* 0 */
int (*tclpCloseFile) (TclFile file); /* 1 */
Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */
int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */
- int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 4 */
- int (*tclUnixWaitForFile_) (int fd, int mask, int timeout); /* 5 */
+ void * (*tclWinGetTclInstance) (void); /* 4 */
+ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 5 */
TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */
TclFile (*tclpOpenFile) (const char *fname, int mode); /* 7 */
- int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */
+ size_t (*tclpGetPid) (Tcl_Pid pid); /* 8 */
TclFile (*tclpCreateTempFile) (const char *contents); /* 9 */
void (*reserved10)(void);
- void (*reserved11)(void);
+ void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 11 */
void (*reserved12)(void);
void (*reserved13)(void);
- int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 14 */
- int (*tclMacOSXGetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr); /* 15 */
- int (*tclMacOSXSetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj *attributePtr); /* 16 */
- int (*tclMacOSXCopyFileAttributes) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr); /* 17 */
- int (*tclMacOSXMatchType) (Tcl_Interp *interp, const char *pathName, const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types); /* 18 */
+ int (*tclpCreatePipe_) (TclFile *readPipe, TclFile *writePipe); /* 14 */
+ int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 15 */
+ int (*tclpIsAtty) (int fd); /* 16 */
+ int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 17 */
+ void (*reserved18)(void);
void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */
- void (*reserved20)(void);
+ void (*tclWinAddProcess) (void *hProcess, size_t id); /* 20 */
void (*reserved21)(void);
TclFile (*tclpCreateTempFile_) (const char *contents); /* 22 */
void (*reserved23)(void);
- void (*reserved24)(void);
+ char * (*tclWinNoBackslash) (char *path); /* 24 */
void (*reserved25)(void);
void (*reserved26)(void);
- void (*reserved27)(void);
+ void (*tclWinFlushDirtyChannels) (void); /* 27 */
void (*reserved28)(void);
int (*tclWinCPUID) (int index, int *regs); /* 29 */
int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */
#endif /* UNIX */
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
void (*tclWinConvertError) (int errCode); /* 0 */
- void (*reserved1)(void);
- void (*reserved2)(void);
- void (*reserved3)(void);
+ int (*tclpCloseFile) (TclFile file); /* 1 */
+ Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */
+ int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */
void * (*tclWinGetTclInstance) (void); /* 4 */
int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 5 */
- void (*reserved6)(void);
- void (*reserved7)(void);
+ TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */
+ TclFile (*tclpOpenFile) (const char *fname, int mode); /* 7 */
size_t (*tclpGetPid) (Tcl_Pid pid); /* 8 */
- void (*reserved9)(void);
+ TclFile (*tclpCreateTempFile) (const char *contents); /* 9 */
void (*reserved10)(void);
void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 11 */
- int (*tclpCloseFile) (TclFile file); /* 12 */
- Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 13 */
- int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 14 */
+ int (*tclpCloseFile_) (TclFile file); /* 12 */
+ Tcl_Channel (*tclpCreateCommandChannel_) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 13 */
+ int (*tclpCreatePipe_) (TclFile *readPipe, TclFile *writePipe); /* 14 */
int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 15 */
int (*tclpIsAtty) (int fd); /* 16 */
int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 17 */
- TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */
- TclFile (*tclpOpenFile) (const char *fname, int mode); /* 19 */
+ TclFile (*tclpMakeFile_) (Tcl_Channel channel, int direction); /* 18 */
+ TclFile (*tclpOpenFile_) (const char *fname, int mode); /* 19 */
void (*tclWinAddProcess) (void *hProcess, size_t id); /* 20 */
void (*reserved21)(void);
- TclFile (*tclpCreateTempFile) (const char *contents); /* 22 */
+ TclFile (*tclpCreateTempFile_) (const char *contents); /* 22 */
void (*reserved23)(void);
char * (*tclWinNoBackslash) (char *path); /* 24 */
void (*reserved25)(void);
@@ -318,34 +317,34 @@ typedef struct TclIntPlatStubs {
int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */
#endif /* WIN */
#ifdef MAC_OSX_TCL /* MACOSX */
- void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 0 */
+ void (*tclWinConvertError) (int errCode); /* 0 */
int (*tclpCloseFile) (TclFile file); /* 1 */
Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */
int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */
- int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 4 */
- int (*tclUnixWaitForFile_) (int fd, int mask, int timeout); /* 5 */
+ void * (*tclWinGetTclInstance) (void); /* 4 */
+ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 5 */
TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */
TclFile (*tclpOpenFile) (const char *fname, int mode); /* 7 */
- int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */
+ size_t (*tclpGetPid) (Tcl_Pid pid); /* 8 */
TclFile (*tclpCreateTempFile) (const char *contents); /* 9 */
void (*reserved10)(void);
- void (*reserved11)(void);
+ void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 11 */
void (*reserved12)(void);
void (*reserved13)(void);
- int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 14 */
- int (*tclMacOSXGetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr); /* 15 */
- int (*tclMacOSXSetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj *attributePtr); /* 16 */
- int (*tclMacOSXCopyFileAttributes) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr); /* 17 */
- int (*tclMacOSXMatchType) (Tcl_Interp *interp, const char *pathName, const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types); /* 18 */
+ int (*tclpCreatePipe_) (TclFile *readPipe, TclFile *writePipe); /* 14 */
+ int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 15 */
+ int (*tclpIsAtty) (int fd); /* 16 */
+ int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 17 */
+ void (*reserved18)(void);
void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */
- void (*reserved20)(void);
+ void (*tclWinAddProcess) (void *hProcess, size_t id); /* 20 */
void (*reserved21)(void);
TclFile (*tclpCreateTempFile_) (const char *contents); /* 22 */
void (*reserved23)(void);
- void (*reserved24)(void);
+ char * (*tclWinNoBackslash) (char *path); /* 24 */
void (*reserved25)(void);
void (*reserved26)(void);
- void (*reserved27)(void);
+ void (*tclWinFlushDirtyChannels) (void); /* 27 */
void (*reserved28)(void);
int (*tclWinCPUID) (int index, int *regs); /* 29 */
int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */
@@ -365,51 +364,54 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
*/
#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
-#define TclGetAndDetachPids \
- (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */
+#define TclWinConvertError \
+ (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */
#define TclpCloseFile \
(tclIntPlatStubsPtr->tclpCloseFile) /* 1 */
#define TclpCreateCommandChannel \
(tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */
#define TclpCreatePipe \
(tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */
-#define TclpCreateProcess \
- (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */
-#define TclUnixWaitForFile_ \
- (tclIntPlatStubsPtr->tclUnixWaitForFile_) /* 5 */
+#define TclWinGetTclInstance \
+ (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */
+#define TclUnixWaitForFile \
+ (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 5 */
#define TclpMakeFile \
(tclIntPlatStubsPtr->tclpMakeFile) /* 6 */
#define TclpOpenFile \
(tclIntPlatStubsPtr->tclpOpenFile) /* 7 */
-#define TclUnixWaitForFile \
- (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */
+#define TclpGetPid \
+ (tclIntPlatStubsPtr->tclpGetPid) /* 8 */
#define TclpCreateTempFile \
(tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */
/* Slot 10 is reserved */
-/* Slot 11 is reserved */
+#define TclGetAndDetachPids \
+ (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */
/* Slot 12 is reserved */
/* Slot 13 is reserved */
+#define TclpCreatePipe_ \
+ (tclIntPlatStubsPtr->tclpCreatePipe_) /* 14 */
+#define TclpCreateProcess \
+ (tclIntPlatStubsPtr->tclpCreateProcess) /* 15 */
+#define TclpIsAtty \
+ (tclIntPlatStubsPtr->tclpIsAtty) /* 16 */
#define TclUnixCopyFile \
- (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */
-#define TclMacOSXGetFileAttribute \
- (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */
-#define TclMacOSXSetFileAttribute \
- (tclIntPlatStubsPtr->tclMacOSXSetFileAttribute) /* 16 */
-#define TclMacOSXCopyFileAttributes \
- (tclIntPlatStubsPtr->tclMacOSXCopyFileAttributes) /* 17 */
-#define TclMacOSXMatchType \
- (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */
+ (tclIntPlatStubsPtr->tclUnixCopyFile) /* 17 */
+/* Slot 18 is reserved */
#define TclMacOSXNotifierAddRunLoopMode \
(tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */
-/* Slot 20 is reserved */
+#define TclWinAddProcess \
+ (tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */
/* Slot 21 is reserved */
#define TclpCreateTempFile_ \
(tclIntPlatStubsPtr->tclpCreateTempFile_) /* 22 */
/* Slot 23 is reserved */
-/* Slot 24 is reserved */
+#define TclWinNoBackslash \
+ (tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */
/* Slot 25 is reserved */
/* Slot 26 is reserved */
-/* Slot 27 is reserved */
+#define TclWinFlushDirtyChannels \
+ (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */
/* Slot 28 is reserved */
#define TclWinCPUID \
(tclIntPlatStubsPtr->tclWinCPUID) /* 29 */
@@ -419,42 +421,48 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
#define TclWinConvertError \
(tclIntPlatStubsPtr->tclWinConvertError) /* 0 */
-/* Slot 1 is reserved */
-/* Slot 2 is reserved */
-/* Slot 3 is reserved */
+#define TclpCloseFile \
+ (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */
+#define TclpCreateCommandChannel \
+ (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */
+#define TclpCreatePipe \
+ (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */
#define TclWinGetTclInstance \
(tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */
#define TclUnixWaitForFile \
(tclIntPlatStubsPtr->tclUnixWaitForFile) /* 5 */
-/* Slot 6 is reserved */
-/* Slot 7 is reserved */
+#define TclpMakeFile \
+ (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */
+#define TclpOpenFile \
+ (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */
#define TclpGetPid \
(tclIntPlatStubsPtr->tclpGetPid) /* 8 */
-/* Slot 9 is reserved */
+#define TclpCreateTempFile \
+ (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */
/* Slot 10 is reserved */
#define TclGetAndDetachPids \
(tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */
-#define TclpCloseFile \
- (tclIntPlatStubsPtr->tclpCloseFile) /* 12 */
-#define TclpCreateCommandChannel \
- (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 13 */
-#define TclpCreatePipe \
- (tclIntPlatStubsPtr->tclpCreatePipe) /* 14 */
+#define TclpCloseFile_ \
+ (tclIntPlatStubsPtr->tclpCloseFile_) /* 12 */
+#define TclpCreateCommandChannel_ \
+ (tclIntPlatStubsPtr->tclpCreateCommandChannel_) /* 13 */
+#define TclpCreatePipe_ \
+ (tclIntPlatStubsPtr->tclpCreatePipe_) /* 14 */
#define TclpCreateProcess \
(tclIntPlatStubsPtr->tclpCreateProcess) /* 15 */
#define TclpIsAtty \
(tclIntPlatStubsPtr->tclpIsAtty) /* 16 */
#define TclUnixCopyFile \
(tclIntPlatStubsPtr->tclUnixCopyFile) /* 17 */
-#define TclpMakeFile \
- (tclIntPlatStubsPtr->tclpMakeFile) /* 18 */
-#define TclpOpenFile \
- (tclIntPlatStubsPtr->tclpOpenFile) /* 19 */
+#define TclpMakeFile_ \
+ (tclIntPlatStubsPtr->tclpMakeFile_) /* 18 */
+#define TclpOpenFile_ \
+ (tclIntPlatStubsPtr->tclpOpenFile_) /* 19 */
#define TclWinAddProcess \
(tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */
/* Slot 21 is reserved */
-#define TclpCreateTempFile \
- (tclIntPlatStubsPtr->tclpCreateTempFile) /* 22 */
+#define TclpCreateTempFile_ \
+ (tclIntPlatStubsPtr->tclpCreateTempFile_) /* 22 */
/* Slot 23 is reserved */
#define TclWinNoBackslash \
(tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */
@@ -469,51 +477,54 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
(tclIntPlatStubsPtr->tclUnixOpenTemporaryFile) /* 30 */
#endif /* WIN */
#ifdef MAC_OSX_TCL /* MACOSX */
-#define TclGetAndDetachPids \
- (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */
+#define TclWinConvertError \
+ (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */
#define TclpCloseFile \
(tclIntPlatStubsPtr->tclpCloseFile) /* 1 */
#define TclpCreateCommandChannel \
(tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */
#define TclpCreatePipe \
(tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */
-#define TclpCreateProcess \
- (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */
-#define TclUnixWaitForFile_ \
- (tclIntPlatStubsPtr->tclUnixWaitForFile_) /* 5 */
+#define TclWinGetTclInstance \
+ (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */
+#define TclUnixWaitForFile \
+ (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 5 */
#define TclpMakeFile \
(tclIntPlatStubsPtr->tclpMakeFile) /* 6 */
#define TclpOpenFile \
(tclIntPlatStubsPtr->tclpOpenFile) /* 7 */
-#define TclUnixWaitForFile \
- (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */
+#define TclpGetPid \
+ (tclIntPlatStubsPtr->tclpGetPid) /* 8 */
#define TclpCreateTempFile \
(tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */
/* Slot 10 is reserved */
-/* Slot 11 is reserved */
+#define TclGetAndDetachPids \
+ (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */
/* Slot 12 is reserved */
/* Slot 13 is reserved */
+#define TclpCreatePipe_ \
+ (tclIntPlatStubsPtr->tclpCreatePipe_) /* 14 */
+#define TclpCreateProcess \
+ (tclIntPlatStubsPtr->tclpCreateProcess) /* 15 */
+#define TclpIsAtty \
+ (tclIntPlatStubsPtr->tclpIsAtty) /* 16 */
#define TclUnixCopyFile \
- (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */
-#define TclMacOSXGetFileAttribute \
- (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */
-#define TclMacOSXSetFileAttribute \
- (tclIntPlatStubsPtr->tclMacOSXSetFileAttribute) /* 16 */
-#define TclMacOSXCopyFileAttributes \
- (tclIntPlatStubsPtr->tclMacOSXCopyFileAttributes) /* 17 */
-#define TclMacOSXMatchType \
- (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */
+ (tclIntPlatStubsPtr->tclUnixCopyFile) /* 17 */
+/* Slot 18 is reserved */
#define TclMacOSXNotifierAddRunLoopMode \
(tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */
-/* Slot 20 is reserved */
+#define TclWinAddProcess \
+ (tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */
/* Slot 21 is reserved */
#define TclpCreateTempFile_ \
(tclIntPlatStubsPtr->tclpCreateTempFile_) /* 22 */
/* Slot 23 is reserved */
-/* Slot 24 is reserved */
+#define TclWinNoBackslash \
+ (tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */
/* Slot 25 is reserved */
/* Slot 26 is reserved */
-/* Slot 27 is reserved */
+#define TclWinFlushDirtyChannels \
+ (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */
/* Slot 28 is reserved */
#define TclWinCPUID \
(tclIntPlatStubsPtr->tclWinCPUID) /* 29 */
@@ -529,14 +540,23 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
#define TCL_STORAGE_CLASS DLLIMPORT
#define TclWinConvertWSAError TclWinConvertError
-#undef TclpCreateTempFile_
-#undef TclUnixWaitForFile_
-#ifndef MAC_OSX_TCL /* not accessable on Win32/UNIX */
-#undef TclMacOSXGetFileAttribute /* 15 */
-#undef TclMacOSXSetFileAttribute /* 16 */
-#undef TclMacOSXCopyFileAttributes /* 17 */
-#undef TclMacOSXMatchType /* 18 */
-#undef TclMacOSXNotifierAddRunLoopMode /* 19 */
+#ifdef MAC_OSX_TCL /* not accessable on Win32/UNIX */
+MODULE_SCOPE int TclMacOSXGetFileAttribute(Tcl_Interp *interp,
+ int objIndex, Tcl_Obj *fileName,
+ Tcl_Obj **attributePtrPtr);
+/* 16 */
+MODULE_SCOPE int TclMacOSXSetFileAttribute(Tcl_Interp *interp,
+ int objIndex, Tcl_Obj *fileName,
+ Tcl_Obj *attributePtr);
+/* 17 */
+MODULE_SCOPE int TclMacOSXCopyFileAttributes(const char *src,
+ const char *dst,
+ const Tcl_StatBuf *statBufPtr);
+/* 18 */
+MODULE_SCOPE int TclMacOSXMatchType(Tcl_Interp *interp,
+ const char *pathName, const char *fileName,
+ Tcl_StatBuf *statBufPtr,
+ Tcl_GlobTypeData *types);
#endif
#if !defined(_WIN32)
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index f7eff58..c9111d2 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -4,8 +4,8 @@
* This file implements the "interp" command which allows creation and
* manipulation of Tcl interpreters from within Tcl scripts.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 2004 Donal K. Fellows
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2004 Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -4597,7 +4597,7 @@ ChildCommandLimitCmd(
switch ((enum Options) index) {
case OPT_CMD:
scriptObj = objv[i+1];
- (void) TclGetStringFromObj(scriptObj, &scriptLen);
+ (void) Tcl_GetStringFromObj(scriptObj, &scriptLen);
break;
case OPT_GRAN:
granObj = objv[i+1];
@@ -4614,7 +4614,7 @@ ChildCommandLimitCmd(
break;
case OPT_VAL:
limitObj = objv[i+1];
- (void) TclGetStringFromObj(objv[i+1], &limitLen);
+ (void) Tcl_GetStringFromObj(objv[i+1], &limitLen);
if (limitLen == 0) {
break;
}
@@ -4807,7 +4807,7 @@ ChildTimeLimitCmd(
switch ((enum Options) index) {
case OPT_CMD:
scriptObj = objv[i+1];
- (void) TclGetStringFromObj(objv[i+1], &scriptLen);
+ (void) Tcl_GetStringFromObj(objv[i+1], &scriptLen);
break;
case OPT_GRAN:
granObj = objv[i+1];
@@ -4824,7 +4824,7 @@ ChildTimeLimitCmd(
break;
case OPT_MILLI:
milliObj = objv[i+1];
- (void) TclGetStringFromObj(objv[i+1], &milliLen);
+ (void) Tcl_GetStringFromObj(objv[i+1], &milliLen);
if (milliLen == 0) {
break;
}
@@ -4842,7 +4842,7 @@ ChildTimeLimitCmd(
break;
case OPT_SEC:
secObj = objv[i+1];
- (void) TclGetStringFromObj(objv[i+1], &secLen);
+ (void) Tcl_GetStringFromObj(objv[i+1], &secLen);
if (secLen == 0) {
break;
}
diff --git a/generic/tclLink.c b/generic/tclLink.c
index 299e43d..e1ddce6 100644
--- a/generic/tclLink.c
+++ b/generic/tclLink.c
@@ -6,10 +6,10 @@
* Andreas Stolcke and this implementation is based heavily on a
* prototype implementation provided by him.
*
- * Copyright (c) 1993 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 2008 Rene Zaumseil
- * Copyright (c) 2019 Donal K. Fellows
+ * Copyright © 1993 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 2008 Rene Zaumseil
+ * Copyright © 2019 Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -634,7 +634,7 @@ SetInvalidRealFromAny(
size_t length;
const char *str, *endPtr;
- str = TclGetStringFromObj(objPtr, &length);
+ str = Tcl_GetStringFromObj(objPtr, &length);
if ((length == 1) && (str[0] == '.')) {
objPtr->typePtr = &invalidRealType;
objPtr->internalRep.doubleValue = 0.0;
@@ -679,7 +679,7 @@ GetInvalidIntFromObj(
int *intPtr)
{
size_t length;
- const char *str = TclGetStringFromObj(objPtr, &length);
+ const char *str = Tcl_GetStringFromObj(objPtr, &length);
if ((length == 0) ||
((length == 2) && (str[0] == '0') && strchr("xXbBoOdD", str[1]))) {
@@ -897,7 +897,7 @@ LinkTraceProc(
switch (linkPtr->type) {
case TCL_LINK_STRING:
- value = TclGetStringFromObj(valueObj, &valueLength);
+ value = Tcl_GetStringFromObj(valueObj, &valueLength);
pp = (char **) linkPtr->addr;
*pp = (char *)Tcl_Realloc(*pp, ++valueLength);
@@ -905,7 +905,7 @@ LinkTraceProc(
return NULL;
case TCL_LINK_CHARS:
- value = (char *) TclGetStringFromObj(valueObj, &valueLength);
+ value = (char *) Tcl_GetStringFromObj(valueObj, &valueLength);
valueLength++; /* include end of string char */
if (valueLength > linkPtr->bytes) {
return (char *) "wrong size of char* value";
@@ -920,7 +920,7 @@ LinkTraceProc(
return NULL;
case TCL_LINK_BINARY:
- value = (char *) TclGetByteArrayFromObj(valueObj, &valueLength);
+ value = (char *) Tcl_GetByteArrayFromObj(valueObj, &valueLength);
if (valueLength != linkPtr->bytes) {
return (char *) "wrong size of binary value";
}
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 3bba674..9feaf3c 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -3,9 +3,9 @@
*
* This file contains functions that implement the Tcl list object type.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998 by Scriptics Corporation.
- * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1998 Scriptics Corporation.
+ * Copyright © 2001 Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -540,7 +540,7 @@ Tcl_ListObjGetElements(
int result;
size_t length;
- (void) TclGetStringFromObj(listPtr, &length);
+ (void) Tcl_GetStringFromObj(listPtr, &length);
if (length == 0) {
*objcPtr = 0;
*objvPtr = NULL;
@@ -664,7 +664,7 @@ Tcl_ListObjAppendElement(
int result;
size_t length;
- (void) TclGetStringFromObj(listPtr, &length);
+ (void) Tcl_GetStringFromObj(listPtr, &length);
if (length == 0) {
Tcl_SetListObj(listPtr, 1, &objPtr);
return TCL_OK;
@@ -839,7 +839,7 @@ Tcl_ListObjIndex(
int result;
size_t length;
- (void) TclGetStringFromObj(listPtr, &length);
+ (void) Tcl_GetStringFromObj(listPtr, &length);
if (length == 0) {
*objPtrPtr = NULL;
return TCL_OK;
@@ -896,7 +896,7 @@ Tcl_ListObjLength(
int result;
size_t length;
- (void) TclGetStringFromObj(listPtr, &length);
+ (void) Tcl_GetStringFromObj(listPtr, &length);
if (length == 0) {
*intPtr = 0;
return TCL_OK;
@@ -973,7 +973,7 @@ Tcl_ListObjReplace(
if (listRepPtr == NULL) {
size_t length;
- (void) TclGetStringFromObj(listPtr, &length);
+ (void) Tcl_GetStringFromObj(listPtr, &length);
if (length == 0) {
if (objc == 0) {
return TCL_OK;
@@ -1784,7 +1784,7 @@ TclListObjSetElement(
int result;
size_t length;
- (void) TclGetStringFromObj(listPtr, &length);
+ (void) Tcl_GetStringFromObj(listPtr, &length);
if (length == 0) {
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -2020,7 +2020,7 @@ SetListFromAny(
} else {
int estCount;
size_t length;
- const char *limit, *nextElem = TclGetStringFromObj(objPtr, &length);
+ const char *limit, *nextElem = Tcl_GetStringFromObj(objPtr, &length);
/*
* Allocate enough space to hold a (Tcl_Obj *) for each
@@ -2163,7 +2163,7 @@ UpdateStringOfList(
elemPtrs = &listRepPtr->elements;
for (i = 0; i < numElems; i++) {
flagPtr[i] = (i ? TCL_DONT_QUOTE_HASH : 0);
- elem = TclGetStringFromObj(elemPtrs[i], &length);
+ elem = Tcl_GetStringFromObj(elemPtrs[i], &length);
bytesNeeded += TclScanElement(elem, length, flagPtr+i);
}
bytesNeeded += numElems - 1;
@@ -2176,7 +2176,7 @@ UpdateStringOfList(
TclOOM(dst, bytesNeeded);
for (i = 0; i < numElems; i++) {
flagPtr[i] |= (i ? TCL_DONT_QUOTE_HASH : 0);
- elem = TclGetStringFromObj(elemPtrs[i], &length);
+ elem = Tcl_GetStringFromObj(elemPtrs[i], &length);
dst += TclConvertElement(elem, length, dst, flagPtr[i]);
*dst++ = ' ';
}
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index e58125a..cc34cac 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -7,8 +7,8 @@
* general hashtable implementation of Tcl hash tables that appears in
* tclHash.c.
*
- * Copyright (c) 1997-1998 Sun Microsystems, Inc.
- * Copyright (c) 2004 by Kevin B. Kenny. All rights reserved.
+ * Copyright © 1997-1998 Sun Microsystems, Inc.
+ * Copyright © 2004 Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -211,7 +211,7 @@ TclCreateLiteral(
*/
size_t objLength;
- const char *objBytes = TclGetStringFromObj(objPtr, &objLength);
+ const char *objBytes = Tcl_GetStringFromObj(objPtr, &objLength);
if ((objLength == length) && ((length == 0)
|| ((objBytes[0] == bytes[0])
@@ -510,7 +510,7 @@ LookupLiteralEntry(
const char *bytes;
size_t globalHash, length;
- bytes = TclGetStringFromObj(objPtr, &length);
+ bytes = Tcl_GetStringFromObj(objPtr, &length);
globalHash = (HashString(bytes, length) & globalTablePtr->mask);
for (entryPtr=globalTablePtr->buckets[globalHash] ; entryPtr!=NULL;
entryPtr=entryPtr->nextPtr) {
@@ -571,7 +571,7 @@ TclHideLiteral(
TclReleaseLiteral(interp, lPtr->objPtr);
lPtr->objPtr = newObjPtr;
- bytes = TclGetStringFromObj(newObjPtr, &length);
+ bytes = Tcl_GetStringFromObj(newObjPtr, &length);
localHash = HashString(bytes, length) & localTablePtr->mask;
nextPtrPtr = &localTablePtr->buckets[localHash];
@@ -704,7 +704,7 @@ AddLocalLiteralEntry(
}
if (!found) {
- bytes = TclGetStringFromObj(objPtr, &length);
+ bytes = Tcl_GetStringFromObj(objPtr, &length);
Tcl_Panic("%s: literal \"%.*s\" wasn't found locally",
"AddLocalLiteralEntry", (length>60? 60 : (int)length), bytes);
}
@@ -833,7 +833,7 @@ TclReleaseLiteral(
}
globalTablePtr = &iPtr->literalTable;
- bytes = TclGetStringFromObj(objPtr, &length);
+ bytes = Tcl_GetStringFromObj(objPtr, &length);
index = HashString(bytes, length) & globalTablePtr->mask;
/*
@@ -1005,7 +1005,7 @@ RebuildLiteralTable(
for (oldChainPtr=oldBuckets ; oldSize>0 ; oldSize--,oldChainPtr++) {
for (entryPtr=*oldChainPtr ; entryPtr!=NULL ; entryPtr=*oldChainPtr) {
- bytes = TclGetStringFromObj(entryPtr->objPtr, &length);
+ bytes = Tcl_GetStringFromObj(entryPtr->objPtr, &length);
index = (HashString(bytes, length) & tablePtr->mask);
*oldChainPtr = entryPtr->nextPtr;
@@ -1176,7 +1176,7 @@ TclVerifyLocalLiteralTable(
localPtr=localPtr->nextPtr) {
count++;
if (localPtr->refCount != TCL_INDEX_NONE) {
- bytes = TclGetStringFromObj(localPtr->objPtr, &length);
+ bytes = Tcl_GetStringFromObj(localPtr->objPtr, &length);
Tcl_Panic("%s: local literal \"%.*s\" had bad refCount %" TCL_Z_MODIFIER "u",
"TclVerifyLocalLiteralTable",
(length>60? 60 : (int) length), bytes, localPtr->refCount);
@@ -1225,7 +1225,7 @@ TclVerifyGlobalLiteralTable(
globalPtr=globalPtr->nextPtr) {
count++;
if (globalPtr->refCount + 1 < 2) {
- bytes = TclGetStringFromObj(globalPtr->objPtr, &length);
+ bytes = Tcl_GetStringFromObj(globalPtr->objPtr, &length);
Tcl_Panic("%s: global literal \"%.*s\" had bad refCount %" TCL_Z_MODIFIER "u",
"TclVerifyGlobalLiteralTable",
(length>60? 60 : (int)length), bytes, globalPtr->refCount);
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 7bea2c1..364e97b 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -4,7 +4,7 @@
* This file provides the generic portion (those that are the same on all
* platforms) of Tcl's dynamic loading facilities.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -302,60 +302,59 @@ Tcl_LoadObjCmd(
if (packageName != NULL) {
Tcl_DStringAppend(&pkgName, packageName, -1);
} else {
- int retc;
+ Tcl_Obj *splitPtr, *pkgGuessPtr;
+ int pElements;
+ const char *pkgGuess;
/*
* Threading note - this call used to be protected by a mutex.
*/
- retc = TclGuessPackageName(fullFileName, &pkgName);
- if (!retc) {
- Tcl_Obj *splitPtr, *pkgGuessPtr;
- int pElements;
- const char *pkgGuess;
-
- /*
- * The platform-specific code couldn't figure out the module
- * name. Make a guess by taking the last element of the file
- * name, stripping off any leading "lib", and then using all
- * of the alphabetic and underline characters that follow
- * that.
- */
+ /*
+ * The platform-specific code couldn't figure out the module
+ * name. Make a guess by taking the last element of the file
+ * name, stripping off any leading "lib", and then using all
+ * of the alphabetic and underline characters that follow
+ * that.
+ */
- splitPtr = Tcl_FSSplitPath(objv[1], &pElements);
- Tcl_ListObjIndex(NULL, splitPtr, pElements -1, &pkgGuessPtr);
- pkgGuess = TclGetString(pkgGuessPtr);
- if ((pkgGuess[0] == 'l') && (pkgGuess[1] == 'i')
- && (pkgGuess[2] == 'b')) {
- pkgGuess += 3;
- }
+ splitPtr = Tcl_FSSplitPath(objv[1], &pElements);
+ Tcl_ListObjIndex(NULL, splitPtr, pElements -1, &pkgGuessPtr);
+ pkgGuess = TclGetString(pkgGuessPtr);
+ if ((pkgGuess[0] == 'l') && (pkgGuess[1] == 'i')
+ && (pkgGuess[2] == 'b')) {
+ pkgGuess += 3;
+ }
#ifdef __CYGWIN__
- if ((pkgGuess[0] == 'c') && (pkgGuess[1] == 'y')
- && (pkgGuess[2] == 'g')) {
- pkgGuess += 3;
- }
+ else if ((pkgGuess[0] == 'c') && (pkgGuess[1] == 'y')
+ && (pkgGuess[2] == 'g')) {
+ pkgGuess += 3;
+ }
#endif /* __CYGWIN__ */
- for (p = pkgGuess; *p != 0; p += offset) {
- offset = TclUtfToUniChar(p, &ch);
- if ((ch > 0x100)
- || !(isalpha(UCHAR(ch)) /* INTL: ISO only */
- || (UCHAR(ch) == '_'))) {
- break;
- }
- }
- if (p == pkgGuess) {
- Tcl_DecrRefCount(splitPtr);
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "couldn't figure out package name for %s",
- fullFileName));
- Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD",
- "WHATPACKAGE", NULL);
- code = TCL_ERROR;
- goto done;
+ if ((pkgGuess[0] == 't') && (pkgGuess[1] == 'c')
+ && (pkgGuess[2] == 'l')) {
+ pkgGuess += 3;
+ }
+ for (p = pkgGuess; *p != 0; p += offset) {
+ offset = TclUtfToUniChar(p, &ch);
+ if ((ch > 0x100)
+ || !(isalpha(UCHAR(ch)) /* INTL: ISO only */
+ || (UCHAR(ch) == '_'))) {
+ break;
}
- Tcl_DStringAppend(&pkgName, pkgGuess, p - pkgGuess);
+ }
+ if (p == pkgGuess) {
Tcl_DecrRefCount(splitPtr);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "couldn't figure out package name for %s",
+ fullFileName));
+ Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD",
+ "WHATPACKAGE", NULL);
+ code = TCL_ERROR;
+ goto done;
}
+ Tcl_DStringAppend(&pkgName, pkgGuess, p - pkgGuess);
+ Tcl_DecrRefCount(splitPtr);
}
/*
@@ -1023,7 +1022,7 @@ Tcl_StaticPackage(
/*
*----------------------------------------------------------------------
*
- * TclGetLoadedPackages, TclGetLoadedPackagesEx --
+ * TclGetLoadedPackagesEx --
*
* This function returns information about all of the files that are
* loaded (either in a particular interpreter, or for all interpreters).
@@ -1042,18 +1041,6 @@ Tcl_StaticPackage(
*/
int
-TclGetLoadedPackages(
- Tcl_Interp *interp, /* Interpreter in which to return information
- * or error message. */
- const char *targetName) /* Name of target interpreter or NULL. If
- * NULL, return info about all interps;
- * otherwise, just return info about this
- * interpreter. */
-{
- return TclGetLoadedPackagesEx(interp, targetName, NULL);
-}
-
-int
TclGetLoadedPackagesEx(
Tcl_Interp *interp, /* Interpreter in which to return information
* or error message. */
diff --git a/generic/tclLoadNone.c b/generic/tclLoadNone.c
index 6af5c4f..f60f843 100644
--- a/generic/tclLoadNone.c
+++ b/generic/tclLoadNone.c
@@ -4,7 +4,7 @@
* This procedure provides a version of the TclpDlopen for use in
* systems that don't support dynamic loading; it just returns an error.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -54,36 +54,6 @@ TclpDlopen(
}
/*
- *----------------------------------------------------------------------
- *
- * TclGuessPackageName --
- *
- * If the "load" command is invoked without providing a package name,
- * this procedure is invoked to try to figure it out.
- *
- * Results:
- * Always returns 0 to indicate that we couldn't figure out a package
- * name; generic code will then try to guess the package from the file
- * name. A return value of 1 would have meant that we figured out the
- * package name and put it in bufPtr.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-int
-TclGuessPackageName(
- const char *fileName, /* Name of file containing package (already
- * translated to local form if needed). */
- Tcl_DString *bufPtr) /* Initialized empty dstring. Append package
- * name to this if possible. */
-{
- return 0;
-}
-
-/*
* These functions are fallbacks if we somehow determine that the platform can
* do loading from memory but the user wishes to disable it. They just report
* (gracefully) that they fail.
@@ -93,8 +63,8 @@ TclGuessPackageName(
MODULE_SCOPE void *
TclpLoadMemoryGetBuffer(
- Tcl_Interp *interp, /* Dummy: unused by this implementation */
- int size) /* Dummy: unused by this implementation */
+ TCL_UNUSED(Tcl_Interp *),
+ TCL_UNUSED(int))
{
return NULL;
}
@@ -102,14 +72,12 @@ TclpLoadMemoryGetBuffer(
MODULE_SCOPE int
TclpLoadMemory(
Tcl_Interp *interp, /* Used for error reporting. */
- void *buffer, /* Dummy: unused by this implementation */
- int size, /* Dummy: unused by this implementation */
- int codeSize, /* Dummy: unused by this implementation */
- Tcl_LoadHandle *loadHandle, /* Dummy: unused by this implementation */
- Tcl_FSUnloadFileProc **unloadProcPtr,
- /* Dummy: unused by this implementation */
- int flags)
- /* Dummy: unused by this implementation */
+ TCL_UNUSED(void *),
+ TCL_UNUSED(int),
+ TCL_UNUSED(int),
+ TCL_UNUSED(Tcl_LoadHandle *),
+ TCL_UNUSED(Tcl_FSUnloadFileProc **),
+ TCL_UNUSED(int))
{
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("dynamic loading from memory "
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 89bb8ec..f175319 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -8,9 +8,9 @@
* application. Or, it can be used as a template for creating new main
* programs for Tcl applications.
*
- * Copyright (c) 1988-1994 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 2000 Ajuba Solutions.
+ * Copyright © 1988-1994 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 2000 Ajuba Solutions.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -64,11 +64,6 @@ NewNativeObj(
* source directory to make their own modified versions).
*/
-#if defined _MSC_VER && _MSC_VER < 1900
-/* isatty is always defined on MSVC 14.0, but not necessarily as CRTIMPORT. */
-extern CRTIMPORT int isatty(int fd);
-#endif
-
/*
* The thread-local variables for this file's functions.
*/
@@ -516,7 +511,7 @@ Tcl_MainEx(
* error messages troubles deeper in, so lop it back off.
*/
- (void)TclGetStringFromObj(is.commandPtr, &length);
+ (void)Tcl_GetStringFromObj(is.commandPtr, &length);
Tcl_SetObjLength(is.commandPtr, --length);
code = Tcl_RecordAndEvalObj(interp, is.commandPtr,
TCL_EVAL_GLOBAL);
@@ -533,7 +528,7 @@ Tcl_MainEx(
} else if (is.tty) {
resultPtr = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(resultPtr);
- (void)TclGetStringFromObj(resultPtr, &length);
+ (void)Tcl_GetStringFromObj(resultPtr, &length);
chan = Tcl_GetStdChannel(TCL_STDOUT);
if ((length > 0) && chan) {
Tcl_WriteObj(chan, resultPtr);
@@ -777,7 +772,7 @@ StdinProc(
goto prompt;
}
isPtr->prompt = PROMPT_START;
- (void)TclGetStringFromObj(commandPtr, &length);
+ (void)Tcl_GetStringFromObj(commandPtr, &length);
Tcl_SetObjLength(commandPtr, --length);
/*
@@ -809,7 +804,7 @@ StdinProc(
chan = Tcl_GetStdChannel(TCL_STDOUT);
Tcl_IncrRefCount(resultPtr);
- (void)TclGetStringFromObj(resultPtr, &length);
+ (void)Tcl_GetStringFromObj(resultPtr, &length);
if ((length > 0) && (chan != NULL)) {
Tcl_WriteObj(chan, resultPtr);
Tcl_WriteChars(chan, "\n", 1);
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 8e71271..b2d717b 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -7,11 +7,11 @@
* children of the global namespace. These other namespaces contain
* special-purpose commands and variables for packages.
*
- * Copyright (c) 1993-1997 Lucent Technologies.
- * Copyright (c) 1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
- * Copyright (c) 2002-2005 Donal K. Fellows.
- * Copyright (c) 2006 Neil Madden.
+ * Copyright © 1993-1997 Lucent Technologies.
+ * Copyright © 1997 Sun Microsystems, Inc.
+ * Copyright © 1998-1999 Scriptics Corporation.
+ * Copyright © 2002-2005 Donal K. Fellows.
+ * Copyright © 2006 Neil Madden.
* Contributions from Don Porter, NIST, 2007. (not subject to US copyright)
*
* Originally implemented by
@@ -3133,7 +3133,7 @@ NamespaceCodeCmd(
" "namespace" command. [Bug 3202171].
*/
- arg = TclGetStringFromObj(objv[1], &length);
+ arg = Tcl_GetStringFromObj(objv[1], &length);
if (*arg==':' && length > 20
&& strncmp(arg, "::namespace inscope ", 20) == 0) {
Tcl_SetObjResult(interp, objv[1]);
diff --git a/generic/tclNotify.c b/generic/tclNotify.c
index 2f13710..897346e 100644
--- a/generic/tclNotify.c
+++ b/generic/tclNotify.c
@@ -7,9 +7,9 @@
* of the notifier is defined in the tcl*Notify.c files in each platform
* directory.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998 by Scriptics Corporation.
- * Copyright (c) 2003 by Kevin B. Kenny. All rights reserved.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1998 Scriptics Corporation.
+ * Copyright © 2003 Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOO.c b/generic/tclOO.c
index 0f0cc96..4dbe668 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -3,8 +3,8 @@
*
* This file contains the object-system core (NB: not Tcl_Obj, but ::oo)
*
- * Copyright (c) 2005-2012 by Donal K. Fellows
- * Copyright (c) 2017 by Nathan Coulter
+ * Copyright © 2005-2012 Donal K. Fellows
+ * Copyright © 2017 Nathan Coulter
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -138,7 +138,10 @@ static const Tcl_MethodType classConstructor = {
*/
static const char *initScript =
+#ifndef TCL_NO_DEPRECATED
"package ifneeded TclOO " TCLOO_PATCHLEVEL " {# Already present, OK?};"
+#endif
+"package ifneeded tcl::oo " TCLOO_PATCHLEVEL " {# Already present, OK?};"
"namespace eval ::oo { variable version " TCLOO_VERSION " };"
"namespace eval ::oo { variable patchlevel " TCLOO_PATCHLEVEL " };";
/* "tcl_findLibrary tcloo $oo::version $oo::version" */
@@ -257,7 +260,11 @@ TclOOInit(
return TCL_ERROR;
}
- return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_PATCHLEVEL,
+#ifndef TCL_NO_DEPRECATED
+ Tcl_PkgProvideEx(interp, "TclOO", TCLOO_PATCHLEVEL,
+ (void *) &tclOOStubs);
+#endif
+ return Tcl_PkgProvideEx(interp, "tcl::oo", TCLOO_PATCHLEVEL,
(void *) &tclOOStubs);
}
diff --git a/generic/tclOO.decls b/generic/tclOO.decls
index ed7b800..8f3986e 100644
--- a/generic/tclOO.decls
+++ b/generic/tclOO.decls
@@ -5,7 +5,7 @@
# library via the stubs table. This file is used to generate the
# tclOODecls.h, tclOOIntDecls.h and tclOOStubInit.c files.
#
-# Copyright (c) 2008-2013 by Donal K. Fellows.
+# Copyright © 2008-2013 Donal K. Fellows.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c
index 6f277f7..eb929c8 100644
--- a/generic/tclOOBasic.c
+++ b/generic/tclOOBasic.c
@@ -4,7 +4,7 @@
* This file contains implementations of the "simple" commands and
* methods from the object-system core.
*
- * Copyright (c) 2005-2013 by Donal K. Fellows
+ * Copyright © 2005-2013 Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -208,7 +208,7 @@ TclOO_Class_Create(
"objectName ?arg ...?");
return TCL_ERROR;
}
- objName = TclGetStringFromObj(
+ objName = Tcl_GetStringFromObj(
objv[Tcl_ObjectContextSkippedArgs(context)], &len);
if (len == 0) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
@@ -273,7 +273,7 @@ TclOO_Class_CreateNs(
"objectName namespaceName ?arg ...?");
return TCL_ERROR;
}
- objName = TclGetStringFromObj(
+ objName = Tcl_GetStringFromObj(
objv[Tcl_ObjectContextSkippedArgs(context)], &len);
if (len == 0) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
@@ -281,7 +281,7 @@ TclOO_Class_CreateNs(
Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", NULL);
return TCL_ERROR;
}
- nsName = TclGetStringFromObj(
+ nsName = Tcl_GetStringFromObj(
objv[Tcl_ObjectContextSkippedArgs(context)+1], &len);
if (len == 0) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index 276eda8..0b2c2f3 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -4,7 +4,7 @@
* This file contains the method call chain management code for the
* object-system core.
*
- * Copyright (c) 2005-2012 by Donal K. Fellows
+ * Copyright © 2005-2012 Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index b7c3cda..8831056 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -4,7 +4,7 @@
* This file contains the implementation of the ::oo::define command,
* part of the object-system core (NB: not Tcl_Obj, but ::oo).
*
- * Copyright (c) 2006-2013 by Donal K. Fellows
+ * Copyright © 2006-2013 Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -716,7 +716,7 @@ TclOOUnknownDefinition(
return TCL_ERROR;
}
- soughtStr = TclGetStringFromObj(objv[1], &soughtLen);
+ soughtStr = Tcl_GetStringFromObj(objv[1], &soughtLen);
if (soughtLen == 0) {
goto noMatch;
}
@@ -778,7 +778,7 @@ FindCommand(
Tcl_Namespace *const namespacePtr)
{
size_t length;
- const char *nameStr, *string = TclGetStringFromObj(stringObj, &length);
+ const char *nameStr, *string = Tcl_GetStringFromObj(stringObj, &length);
Namespace *const nsPtr = (Namespace *) namespacePtr;
FOREACH_HASH_DECLS;
Tcl_Command cmd, cmd2;
@@ -999,7 +999,7 @@ GenerateErrorInfo(
size_t length;
Tcl_Obj *realNameObj = Tcl_ObjectDeleted((Tcl_Object) oPtr)
? savedNameObj : TclOOObjectName(interp, oPtr);
- const char *objName = TclGetStringFromObj(realNameObj, &length);
+ const char *objName = Tcl_GetStringFromObj(realNameObj, &length);
unsigned limit = OBJNAME_LENGTH_IN_ERRORINFO_LIMIT;
int overflow = (length > limit);
@@ -1550,7 +1550,7 @@ TclOODefineConstructorObjCmd(
}
clsPtr = oPtr->classPtr;
- (void)TclGetStringFromObj(objv[2], &bodyLength);
+ (void)Tcl_GetStringFromObj(objv[2], &bodyLength);
if (bodyLength > 0) {
/*
* Create the method structure.
@@ -1756,7 +1756,7 @@ TclOODefineDestructorObjCmd(
}
clsPtr = oPtr->classPtr;
- (void)TclGetStringFromObj(objv[1], &bodyLength);
+ (void)Tcl_GetStringFromObj(objv[1], &bodyLength);
if (bodyLength > 0) {
/*
* Create the method structure.
diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c
index c80b92f..ede00b8 100644
--- a/generic/tclOOInfo.c
+++ b/generic/tclOOInfo.c
@@ -4,7 +4,7 @@
* This file contains the implementation of the ::oo-related [info]
* subcommands.
*
- * Copyright (c) 2006-2011 by Donal K. Fellows
+ * Copyright © 2006-2011 Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index c4133bf..eb43adf 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -3,7 +3,7 @@
*
* This file contains code to create and manage methods.
*
- * Copyright (c) 2005-2011 by Donal K. Fellows
+ * Copyright © 2005-2011 Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1017,12 +1017,12 @@ ProcedureMethodCompiledVarConnect(
* either.
*/
- varName = TclGetStringFromObj(infoPtr->variableObj, &varLen);
+ varName = Tcl_GetStringFromObj(infoPtr->variableObj, &varLen);
if (contextPtr->callPtr->chain[contextPtr->index]
.mPtr->declaringClassPtr != NULL) {
FOREACH_STRUCT(privateVar, contextPtr->callPtr->chain[contextPtr->index]
.mPtr->declaringClassPtr->privateVariables) {
- match = TclGetStringFromObj(privateVar->variableObj, &len);
+ match = Tcl_GetStringFromObj(privateVar->variableObj, &len);
if ((len == varLen) && !memcmp(match, varName, len)) {
variableObj = privateVar->fullNameObj;
cacheIt = 0;
@@ -1031,7 +1031,7 @@ ProcedureMethodCompiledVarConnect(
}
FOREACH(variableObj, contextPtr->callPtr->chain[contextPtr->index]
.mPtr->declaringClassPtr->variables) {
- match = TclGetStringFromObj(variableObj, &len);
+ match = Tcl_GetStringFromObj(variableObj, &len);
if ((len == varLen) && !memcmp(match, varName, len)) {
cacheIt = 0;
goto gotMatch;
@@ -1039,7 +1039,7 @@ ProcedureMethodCompiledVarConnect(
}
} else {
FOREACH_STRUCT(privateVar, contextPtr->oPtr->privateVariables) {
- match = TclGetStringFromObj(privateVar->variableObj, &len);
+ match = Tcl_GetStringFromObj(privateVar->variableObj, &len);
if ((len == varLen) && !memcmp(match, varName, len)) {
variableObj = privateVar->fullNameObj;
cacheIt = 1;
@@ -1047,7 +1047,7 @@ ProcedureMethodCompiledVarConnect(
}
}
FOREACH(variableObj, contextPtr->oPtr->variables) {
- match = TclGetStringFromObj(variableObj, &len);
+ match = Tcl_GetStringFromObj(variableObj, &len);
if ((len == varLen) && !memcmp(match, varName, len)) {
cacheIt = 1;
goto gotMatch;
@@ -1187,7 +1187,7 @@ MethodErrorHandler(
CallContext *contextPtr = (CallContext *)((Interp *) interp)->varFramePtr->clientData;
Method *mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr;
const char *objectName, *kindName, *methodName =
- TclGetStringFromObj(mPtr->namePtr, &nameLen);
+ Tcl_GetStringFromObj(mPtr->namePtr, &nameLen);
Object *declarerPtr;
if (mPtr->declaringObjectPtr != NULL) {
@@ -1201,7 +1201,7 @@ MethodErrorHandler(
kindName = "class";
}
- objectName = TclGetStringFromObj(TclOOObjectName(interp, declarerPtr),
+ objectName = Tcl_GetStringFromObj(TclOOObjectName(interp, declarerPtr),
&objectNameLen);
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (%s \"%.*s%s\" method \"%.*s%s\" line %d)",
@@ -1232,7 +1232,7 @@ ConstructorErrorHandler(
kindName = "class";
}
- objectName = TclGetStringFromObj(TclOOObjectName(interp, declarerPtr),
+ objectName = Tcl_GetStringFromObj(TclOOObjectName(interp, declarerPtr),
&objectNameLen);
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (%s \"%.*s%s\" constructor line %d)", kindName,
@@ -1262,7 +1262,7 @@ DestructorErrorHandler(
kindName = "class";
}
- objectName = TclGetStringFromObj(TclOOObjectName(interp, declarerPtr),
+ objectName = Tcl_GetStringFromObj(TclOOObjectName(interp, declarerPtr),
&objectNameLen);
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (%s \"%.*s%s\" destructor line %d)", kindName,
diff --git a/generic/tclOOStubLib.c b/generic/tclOOStubLib.c
index a9fa212..221d99a 100644
--- a/generic/tclOOStubLib.c
+++ b/generic/tclOOStubLib.c
@@ -35,14 +35,19 @@ TclOOInitializeStubs(
const char *version)
{
int exact = 0;
- const char *packageName = "TclOO";
+ const char *packageName = "tcl::oo";
const char *errMsg = NULL;
TclOOStubs *stubsPtr = NULL;
const char *actualVersion = tclStubsPtr->tcl_PkgRequireEx(interp,
packageName, version, exact, &stubsPtr);
if (actualVersion == NULL) {
- return NULL;
+ packageName = "TclOO";
+ actualVersion = tclStubsPtr->tcl_PkgRequireEx(interp,
+ packageName, version, exact, &stubsPtr);
+ if (actualVersion == NULL) {
+ return NULL;
+ }
}
if (stubsPtr == NULL) {
errMsg = "missing stub table pointer";
diff --git a/generic/tclObj.c b/generic/tclObj.c
index eeaf936..3130bdd 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -4,11 +4,11 @@
* This file contains Tcl object-related functions that are used by many
* Tcl commands.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 1999 by Scriptics Corporation.
- * Copyright (c) 2001 by ActiveState Corporation.
- * Copyright (c) 2005 by Kevin B. Kenny. All rights reserved.
- * Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1999 Scriptics Corporation.
+ * Copyright © 2001 ActiveState Corporation.
+ * Copyright © 2005 Kevin B. Kenny. All rights reserved.
+ * Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -621,7 +621,7 @@ TclContinuationsEnterDerived(
* better way which doesn't shimmer?)
*/
- (void)TclGetStringFromObj(objPtr, &length);
+ (void)Tcl_GetStringFromObj(objPtr, &length);
end = start + length; /* First char after the word */
/*
@@ -1584,6 +1584,7 @@ TclSetDuplicateObj(
*----------------------------------------------------------------------
*/
+#undef Tcl_GetString
char *
Tcl_GetString(
Tcl_Obj *objPtr) /* Object whose string rep byte pointer should
@@ -1620,7 +1621,7 @@ Tcl_GetString(
/*
*----------------------------------------------------------------------
*
- * Tcl_GetStringFromObj --
+ * Tcl_GetStringFromObj/TclGetStringFromObj --
*
* Returns the string representation's byte array pointer and length for
* an object.
@@ -1640,8 +1641,9 @@ Tcl_GetString(
*----------------------------------------------------------------------
*/
+#undef TclGetStringFromObj
char *
-Tcl_GetStringFromObj(
+TclGetStringFromObj(
Tcl_Obj *objPtr, /* Object whose string rep byte pointer should
* be returned. */
int *lengthPtr) /* If non-NULL, the location where the string
@@ -1678,6 +1680,51 @@ Tcl_GetStringFromObj(
}
return objPtr->bytes;
}
+
+#undef Tcl_GetStringFromObj
+char *
+Tcl_GetStringFromObj(
+ Tcl_Obj *objPtr, /* Object whose string rep byte pointer should
+ * be returned. */
+ size_t *lengthPtr) /* If non-NULL, the location where the string
+ * rep's byte array length should * be stored.
+ * If NULL, no length is stored. */
+{
+ if (objPtr->bytes == NULL) {
+ /*
+ * Note we do not check for objPtr->typePtr == NULL. An invariant
+ * of a properly maintained Tcl_Obj is that at least one of
+ * objPtr->bytes and objPtr->typePtr must not be NULL. If broken
+ * extensions fail to maintain that invariant, we can crash here.
+ */
+
+ if (objPtr->typePtr->updateStringProc == NULL) {
+ /*
+ * Those Tcl_ObjTypes which choose not to define an
+ * updateStringProc must be written in such a way that
+ * (objPtr->bytes) never becomes NULL.
+ */
+ Tcl_Panic("UpdateStringProc should not be invoked for type %s",
+ objPtr->typePtr->name);
+ }
+ objPtr->typePtr->updateStringProc(objPtr);
+ if (objPtr->bytes == NULL
+ || objPtr->bytes[objPtr->length] != '\0') {
+ Tcl_Panic("UpdateStringProc for type '%s' "
+ "failed to create a valid string rep",
+ objPtr->typePtr->name);
+ }
+ }
+ if (lengthPtr != NULL) {
+#if TCL_MAJOR_VERSION > 8
+ *lengthPtr = objPtr->length;
+#else
+ *lengthPtr = ((size_t)(unsigned)(objPtr->length + 1)) - 1;
+#endif
+ }
+ return objPtr->bytes;
+}
+
/*
*----------------------------------------------------------------------
@@ -2008,7 +2055,7 @@ TclSetBooleanFromAny(
badBoolean:
if (interp != NULL) {
size_t length;
- const char *str = TclGetStringFromObj(objPtr, &length);
+ const char *str = Tcl_GetStringFromObj(objPtr, &length);
Tcl_Obj *msg;
TclNewLiteralStringObj(msg, "expected boolean value but got \"");
@@ -2027,7 +2074,7 @@ ParseBoolean(
int newBool;
char lowerCase[6];
size_t i, length;
- const char *str = TclGetStringFromObj(objPtr, &length);
+ const char *str = Tcl_GetStringFromObj(objPtr, &length);
if ((length == 0) || (length > 5)) {
/*
@@ -2443,6 +2490,7 @@ Tcl_GetIntFromObj(
return TCL_OK;
#endif
}
+
/*
*----------------------------------------------------------------------
@@ -3868,8 +3916,8 @@ TclHashObjKey(
void *keyPtr) /* Key from which to compute hash value. */
{
Tcl_Obj *objPtr = (Tcl_Obj *)keyPtr;
- const char *string = TclGetString(objPtr);
- size_t length = objPtr->length;
+ size_t length;
+ const char *string = Tcl_GetStringFromObj(objPtr, &length);
TCL_HASH_TYPE result = 0;
/*
diff --git a/generic/tclOptimize.c b/generic/tclOptimize.c
index 7c5b2fd..fef6c26 100644
--- a/generic/tclOptimize.c
+++ b/generic/tclOptimize.c
@@ -3,7 +3,7 @@
*
* This file contains the bytecode optimizer.
*
- * Copyright (c) 2013 by Donal Fellows.
+ * Copyright © 2013 Donal Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -233,7 +233,7 @@ ConvertZeroEffectToNOP(
TclGetUInt1AtPtr(currentInstPtr + 1));
size_t numBytes;
- (void) TclGetStringFromObj(litPtr, &numBytes);
+ (void) Tcl_GetStringFromObj(litPtr, &numBytes);
if (numBytes == 0) {
blank = size + InstLength(nextInst);
}
@@ -248,7 +248,7 @@ ConvertZeroEffectToNOP(
TclGetUInt4AtPtr(currentInstPtr + 1));
size_t numBytes;
- (void) TclGetStringFromObj(litPtr, &numBytes);
+ (void) Tcl_GetStringFromObj(litPtr, &numBytes);
if (numBytes == 0) {
blank = size + InstLength(nextInst);
}
diff --git a/generic/tclPanic.c b/generic/tclPanic.c
index 333fa50..1d7e992 100644
--- a/generic/tclPanic.c
+++ b/generic/tclPanic.c
@@ -5,9 +5,9 @@
* applications will probably call Tcl_SetPanicProc() to set an
* application-specific panic procedure.
*
- * Copyright (c) 1988-1993 The Regents of the University of California.
- * Copyright (c) 1994 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1988-1993 The Regents of the University of California.
+ * Copyright © 1994 Sun Microsystems, Inc.
+ * Copyright © 1998-1999 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/generic/tclParse.c b/generic/tclParse.c
index 7bb92d5..f894906 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -5,8 +5,8 @@
* general-purpose fashion that can be used for many different purposes,
* including compilation, direct execution, code analysis, etc.
*
- * Copyright (c) 1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 Ajuba Solutions.
+ * Copyright © 1997 Sun Microsystems, Inc.
+ * Copyright © 1998-2000 Ajuba Solutions.
* Contributions from Don Porter, NIST, 2002. (not subject to US copyright)
*
* See the file "license.terms" for information on usage and redistribution of
@@ -790,7 +790,7 @@ TclParseBackslash(
* written. At most 4 bytes will be written there. */
{
const char *p = src+1;
- Tcl_UniChar unichar = 0;
+ int unichar;
int result;
size_t count;
char buf[4] = "";
@@ -936,14 +936,14 @@ TclParseBackslash(
* #217987] test subst-3.2
*/
- if (Tcl_UtfCharComplete(p, numBytes - 1)) {
- count = TclUtfToUniChar(p, &unichar) + 1; /* +1 for '\' */
+ if (TclUCS4Complete(p, numBytes - 1)) {
+ count = TclUtfToUCS4(p, &unichar) + 1; /* +1 for '\' */
} else {
- char utfBytes[4];
+ char utfBytes[8];
memcpy(utfBytes, p, numBytes - 1);
utfBytes[numBytes - 1] = '\0';
- count = TclUtfToUniChar(utfBytes, &unichar) + 1;
+ count = TclUtfToUCS4(utfBytes, &unichar) + 1;
}
result = unichar;
break;
@@ -2200,7 +2200,7 @@ TclSubstTokens(
if (result == 0) {
clPos = 0;
} else {
- (void)TclGetStringFromObj(result, &clPos);
+ (void)Tcl_GetStringFromObj(result, &clPos);
}
if (numCL >= maxNumCL) {
@@ -2476,7 +2476,7 @@ TclObjCommandComplete(
* check. */
{
size_t length;
- const char *script = TclGetStringFromObj(objPtr, &length);
+ const char *script = Tcl_GetStringFromObj(objPtr, &length);
return CommandComplete(script, length);
}
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index 647eb1c..95a0a64 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -5,7 +5,7 @@
* to represent and manipulate a general (virtual) filesystem entity in
* an efficient manner.
*
- * Copyright (c) 2003 Vince Darley.
+ * Copyright © 2003 Vince Darley.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -212,7 +212,7 @@ TclFSNormalizeAbsolutePath(
retVal = Tcl_NewStringObj(path, dirSep - path);
Tcl_IncrRefCount(retVal);
}
- (void)TclGetStringFromObj(retVal, &curLen);
+ (void)Tcl_GetStringFromObj(retVal, &curLen);
if (curLen == 0) {
Tcl_AppendToObj(retVal, dirSep, 1);
}
@@ -238,7 +238,7 @@ TclFSNormalizeAbsolutePath(
retVal = Tcl_NewStringObj(path, dirSep - path);
Tcl_IncrRefCount(retVal);
}
- (void)TclGetStringFromObj(retVal, &curLen);
+ (void)Tcl_GetStringFromObj(retVal, &curLen);
if (curLen == 0) {
Tcl_AppendToObj(retVal, dirSep, 1);
}
@@ -269,7 +269,7 @@ TclFSNormalizeAbsolutePath(
*/
const char *path =
- TclGetStringFromObj(retVal, &curLen);
+ Tcl_GetStringFromObj(retVal, &curLen);
while (curLen-- > 0) {
if (IsSeparatorOrNull(path[curLen])) {
@@ -284,7 +284,7 @@ TclFSNormalizeAbsolutePath(
Tcl_SetObjLength(retVal, curLen+1);
Tcl_AppendObjToObj(retVal, linkObj);
TclDecrRefCount(linkObj);
- linkStr = TclGetStringFromObj(retVal, &curLen);
+ linkStr = Tcl_GetStringFromObj(retVal, &curLen);
} else {
/*
* Absolute link.
@@ -297,7 +297,7 @@ TclFSNormalizeAbsolutePath(
} else {
retVal = linkObj;
}
- linkStr = TclGetStringFromObj(retVal, &curLen);
+ linkStr = Tcl_GetStringFromObj(retVal, &curLen);
/*
* Convert to forward-slashes on windows.
@@ -314,7 +314,7 @@ TclFSNormalizeAbsolutePath(
}
}
} else {
- linkStr = TclGetStringFromObj(retVal, &curLen);
+ linkStr = Tcl_GetStringFromObj(retVal, &curLen);
}
/*
@@ -385,7 +385,7 @@ TclFSNormalizeAbsolutePath(
if (tclPlatform == TCL_PLATFORM_WINDOWS) {
size_t len;
- const char *path = TclGetStringFromObj(retVal, &len);
+ const char *path = Tcl_GetStringFromObj(retVal, &len);
if (len == 2 && path[0] != 0 && path[1] == ':') {
if (Tcl_IsShared(retVal)) {
@@ -559,7 +559,7 @@ TclPathPart(
*/
size_t numBytes;
- const char *rest = TclGetStringFromObj(fsPathPtr->normPathPtr, &numBytes);
+ const char *rest = Tcl_GetStringFromObj(fsPathPtr->normPathPtr, &numBytes);
if (strchr(rest, '/') != NULL) {
goto standardPath;
@@ -596,7 +596,7 @@ TclPathPart(
*/
size_t numBytes;
- const char *rest = TclGetStringFromObj(fsPathPtr->normPathPtr, &numBytes);
+ const char *rest = Tcl_GetStringFromObj(fsPathPtr->normPathPtr, &numBytes);
if (strchr(rest, '/') != NULL) {
goto standardPath;
@@ -625,7 +625,7 @@ TclPathPart(
const char *fileName, *extension;
size_t length;
- fileName = TclGetStringFromObj(fsPathPtr->normPathPtr,
+ fileName = Tcl_GetStringFromObj(fsPathPtr->normPathPtr,
&length);
extension = TclGetExtension(fileName);
if (extension == NULL) {
@@ -677,7 +677,7 @@ TclPathPart(
size_t length;
const char *fileName, *extension;
- fileName = TclGetStringFromObj(pathPtr, &length);
+ fileName = Tcl_GetStringFromObj(pathPtr, &length);
extension = TclGetExtension(fileName);
if (extension == NULL) {
Tcl_IncrRefCount(pathPtr);
@@ -868,7 +868,7 @@ TclJoinPath(
const char *str;
size_t len;
- str = TclGetStringFromObj(tailObj, &len);
+ str = Tcl_GetStringFromObj(tailObj, &len);
if (len == 0) {
/*
* This happens if we try to handle the root volume '/'.
@@ -940,7 +940,7 @@ TclJoinPath(
Tcl_Obj *driveName = NULL;
Tcl_Obj *elt = objv[i];
- strElt = TclGetStringFromObj(elt, &strEltLen);
+ strElt = Tcl_GetStringFromObj(elt, &strEltLen);
driveNameLength = 0;
/* if forceRelative - all paths excepting first one are relative */
type = (forceRelative && (i > 0)) ? TCL_PATH_RELATIVE :
@@ -1037,7 +1037,7 @@ TclJoinPath(
if (res == NULL) {
TclNewObj(res);
}
- ptr = TclGetStringFromObj(res, &length);
+ ptr = Tcl_GetStringFromObj(res, &length);
/*
* Strip off any './' before a tilde, unless this is the beginning of
@@ -1082,7 +1082,7 @@ TclJoinPath(
if (length > 0 && ptr[length -1] != '/') {
Tcl_AppendToObj(res, &separator, 1);
- (void)TclGetStringFromObj(res, &length);
+ (void)Tcl_GetStringFromObj(res, &length);
}
Tcl_SetObjLength(res, length + strlen(strElt));
@@ -1351,7 +1351,7 @@ AppendPath(
* intrep produce the same results; that is, bugward compatibility. If
* we need to fix that bug here, it needs fixing in TclJoinPath() too.
*/
- bytes = TclGetStringFromObj(tail, &length);
+ bytes = Tcl_GetStringFromObj(tail, &length);
if (length == 0) {
Tcl_AppendToObj(copy, "/", 1);
} else {
@@ -1411,7 +1411,7 @@ TclFSMakePathRelative(
* too little below, leading to wrong answers returned by glob.
*/
- tempStr = TclGetStringFromObj(cwdPtr, &cwdLen);
+ tempStr = Tcl_GetStringFromObj(cwdPtr, &cwdLen);
/*
* Should we perhaps use 'Tcl_FSPathSeparator'? But then what about the
@@ -1431,7 +1431,7 @@ TclFSMakePathRelative(
}
break;
}
- tempStr = TclGetStringFromObj(pathPtr, &len);
+ tempStr = Tcl_GetStringFromObj(pathPtr, &len);
return Tcl_NewStringObj(tempStr + cwdLen, len - cwdLen);
}
@@ -1657,7 +1657,7 @@ Tcl_FSGetTranslatedStringPath(
if (transPtr != NULL) {
size_t len;
- const char *orig = TclGetStringFromObj(transPtr, &len);
+ const char *orig = Tcl_GetStringFromObj(transPtr, &len);
char *result = (char *)Tcl_Alloc(len+1);
memcpy(result, orig, len+1);
@@ -1717,7 +1717,7 @@ Tcl_FSGetNormalizedPath(
/* TODO: Figure out why this is needed. */
TclGetString(pathPtr);
- (void)TclGetStringFromObj(fsPathPtr->normPathPtr, &tailLen);
+ (void)Tcl_GetStringFromObj(fsPathPtr->normPathPtr, &tailLen);
if (tailLen) {
copy = AppendPath(dir, fsPathPtr->normPathPtr);
} else {
@@ -1730,7 +1730,7 @@ Tcl_FSGetNormalizedPath(
* We now own a reference on both 'dir' and 'copy'
*/
- (void) TclGetStringFromObj(dir, &cwdLen);
+ (void) Tcl_GetStringFromObj(dir, &cwdLen);
/* Normalize the combined string. */
@@ -1813,7 +1813,7 @@ Tcl_FSGetNormalizedPath(
copy = AppendPath(fsPathPtr->cwdPtr, pathPtr);
- (void) TclGetStringFromObj(fsPathPtr->cwdPtr, &cwdLen);
+ (void) Tcl_GetStringFromObj(fsPathPtr->cwdPtr, &cwdLen);
cwdLen += (TclGetString(copy)[cwdLen] == '/');
/*
@@ -2151,8 +2151,8 @@ Tcl_FSEqualPaths(
if (firstPtr == NULL || secondPtr == NULL) {
return 0;
}
- firstStr = TclGetStringFromObj(firstPtr, &firstLen);
- secondStr = TclGetStringFromObj(secondPtr, &secondLen);
+ firstStr = Tcl_GetStringFromObj(firstPtr, &firstLen);
+ secondStr = Tcl_GetStringFromObj(secondPtr, &secondLen);
if ((firstLen == secondLen) && !memcmp(firstStr, secondStr, firstLen)) {
return 1;
}
@@ -2171,8 +2171,8 @@ Tcl_FSEqualPaths(
return 0;
}
- firstStr = TclGetStringFromObj(firstPtr, &firstLen);
- secondStr = TclGetStringFromObj(secondPtr, &secondLen);
+ firstStr = Tcl_GetStringFromObj(firstPtr, &firstLen);
+ secondStr = Tcl_GetStringFromObj(secondPtr, &secondLen);
return ((firstLen == secondLen) && !memcmp(firstStr, secondStr, firstLen));
}
@@ -2225,7 +2225,7 @@ SetFsPathFromAny(
* cmdAH.test exercise most of the code).
*/
- name = TclGetStringFromObj(pathPtr, &len);
+ name = Tcl_GetStringFromObj(pathPtr, &len);
/*
* Handle tilde substitutions, if needed.
@@ -2482,7 +2482,7 @@ UpdateStringOfFsPath(
Tcl_IncrRefCount(copy);
/* Steal copy's string rep */
- pathPtr->bytes = TclGetStringFromObj(copy, &cwdLen);
+ pathPtr->bytes = Tcl_GetStringFromObj(copy, &cwdLen);
pathPtr->length = cwdLen;
TclInitStringRep(copy, NULL, 0);
TclDecrRefCount(copy);
@@ -2542,7 +2542,7 @@ TclNativePathInFilesystem(
size_t len;
- (void) TclGetStringFromObj(pathPtr, &len);
+ (void) Tcl_GetStringFromObj(pathPtr, &len);
if (len == 0) {
/*
* We reject the empty path "".
diff --git a/generic/tclPipe.c b/generic/tclPipe.c
index 94ed8e3..84b3646 100644
--- a/generic/tclPipe.c
+++ b/generic/tclPipe.c
@@ -4,7 +4,7 @@
* This file contains the generic portion of the command channel driver
* as well as various utility routines used in managing subprocesses.
*
- * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * Copyright © 1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 9022fe9..d0adfac 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -4,8 +4,8 @@
* This file implements package and version control for Tcl via the
* "package" command and a few C APIs.
*
- * Copyright (c) 1996 Sun Microsystems, Inc.
- * Copyright (c) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+ * Copyright © 1996 Sun Microsystems, Inc.
+ * Copyright © 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1182,7 +1182,7 @@ TclNRPackageObjCmd(
} else {
pkgPtr = FindPackage(interp, argv2);
}
- argv3 = TclGetStringFromObj(objv[3], &length);
+ argv3 = Tcl_GetStringFromObj(objv[3], &length);
for (availPtr = pkgPtr->availPtr, prevPtr = NULL; availPtr != NULL;
prevPtr = availPtr, availPtr = availPtr->nextPtr) {
@@ -1229,10 +1229,10 @@ TclNRPackageObjCmd(
}
}
if (iPtr->scriptFile) {
- argv4 = TclGetStringFromObj(iPtr->scriptFile, &length);
+ argv4 = Tcl_GetStringFromObj(iPtr->scriptFile, &length);
DupBlock(availPtr->pkgIndex, argv4, length + 1);
}
- argv4 = TclGetStringFromObj(objv[4], &length);
+ argv4 = Tcl_GetStringFromObj(objv[4], &length);
DupBlock(availPtr->script, argv4, length + 1);
break;
}
@@ -1409,7 +1409,7 @@ TclNRPackageObjCmd(
if (iPtr->packageUnknown != NULL) {
Tcl_Free(iPtr->packageUnknown);
}
- argv2 = TclGetStringFromObj(objv[2], &length);
+ argv2 = Tcl_GetStringFromObj(objv[2], &length);
if (argv2[0] == 0) {
iPtr->packageUnknown = NULL;
} else {
@@ -2074,7 +2074,7 @@ AddRequirementsToResult(
size_t length;
for (i = 0; i < reqc; i++) {
- const char *v = TclGetStringFromObj(reqv[i], &length);
+ const char *v = Tcl_GetStringFromObj(reqv[i], &length);
if ((length & 0x1) && (v[length/2] == '-')
&& (strncmp(v, v+((length+1)/2), length/2) == 0)) {
diff --git a/generic/tclPkgConfig.c b/generic/tclPkgConfig.c
index 12df68e..672d3c9 100644
--- a/generic/tclPkgConfig.c
+++ b/generic/tclPkgConfig.c
@@ -4,7 +4,7 @@
* This file contains the configuration information to embed into the tcl
* binary library.
*
- * Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+ * Copyright © 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -109,8 +109,9 @@ static Tcl_Config const cfg[] = {
{"scriptdir,runtime", CFG_RUNTIME_SCRDIR},
{"includedir,runtime", CFG_RUNTIME_INCDIR},
{"docdir,runtime", CFG_RUNTIME_DOCDIR},
+#if !defined(STATIC_BUILD)
{"dllfile,runtime", CFG_RUNTIME_DLLFILE},
- {"zipfile,runtime", CFG_RUNTIME_ZIPFILE},
+#endif
/* Installation paths to various stuff */
diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h
index fb46271..f9d38ef 100644
--- a/generic/tclPlatDecls.h
+++ b/generic/tclPlatDecls.h
@@ -40,6 +40,14 @@
# define _TCHAR_DEFINED
#endif
+#ifndef MODULE_SCOPE
+# ifdef __cplusplus
+# define MODULE_SCOPE extern "C"
+# else
+# define MODULE_SCOPE extern
+# endif
+#endif
+
/* !BEGIN!: Do not edit below this line. */
#ifdef __cplusplus
@@ -50,7 +58,6 @@ extern "C" {
* Exported function declarations:
*/
-#ifdef MAC_OSX_TCL /* MACOSX */
/* Slot 0 is reserved */
/* 1 */
EXTERN int Tcl_MacOSXOpenVersionedBundleResources(
@@ -58,16 +65,17 @@ EXTERN int Tcl_MacOSXOpenVersionedBundleResources(
const char *bundleVersion,
int hasResourceFile, size_t maxPathLen,
char *libraryPath);
-#endif /* MACOSX */
+/* 2 */
+EXTERN void Tcl_MacOSXNotifierAddRunLoopMode(
+ const void *runLoopMode);
typedef struct TclPlatStubs {
int magic;
void *hooks;
-#ifdef MAC_OSX_TCL /* MACOSX */
void (*reserved0)(void);
int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, const char *bundleName, const char *bundleVersion, int hasResourceFile, size_t maxPathLen, char *libraryPath); /* 1 */
-#endif /* MACOSX */
+ void (*tcl_MacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 2 */
} TclPlatStubs;
extern const TclPlatStubs *tclPlatStubsPtr;
@@ -82,24 +90,29 @@ extern const TclPlatStubs *tclPlatStubsPtr;
* Inline function declarations:
*/
-#ifdef MAC_OSX_TCL /* MACOSX */
/* Slot 0 is reserved */
#define Tcl_MacOSXOpenVersionedBundleResources \
(tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
-#endif /* MACOSX */
+#define Tcl_MacOSXNotifierAddRunLoopMode \
+ (tclPlatStubsPtr->tcl_MacOSXNotifierAddRunLoopMode) /* 2 */
#endif /* defined(USE_TCL_STUBS) */
/* !END!: Do not edit above this line. */
-#ifdef MAC_OSX_TCL /* MACOSX */
-#undef Tcl_MacOSXOpenBundleResources
-#define Tcl_MacOSXOpenBundleResources(a,b,c,d,e) Tcl_MacOSXOpenVersionedBundleResources(a,b,NULL,c,d,e)
-#endif
-
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
+#ifdef _WIN32
+# undef Tcl_CreateFileHandler
+# undef Tcl_DeleteFileHandler
+# undef Tcl_GetOpenFile
+#endif
+#ifndef MAC_OSX_TCL
+# undef Tcl_MacOSXOpenVersionedBundleResources
+# undef Tcl_MacOSXNotifierAddRunLoopMode
+#endif
+
#if defined(USE_TCL_STUBS) && defined(_WIN32) && !defined(TCL_NO_DEPRECATED)
#define Tcl_WinUtfToTChar(string, len, dsPtr) (Tcl_DStringInit(dsPtr), \
(TCHAR *)Tcl_UtfToChar16DString((string), (len), (dsPtr)))
diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c
index 411eb27..d91a9c4 100644
--- a/generic/tclPosixStr.c
+++ b/generic/tclPosixStr.c
@@ -4,8 +4,8 @@
* This file contains procedures that generate strings corresponding to
* various POSIX-related codes, such as errno and signals.
*
- * Copyright (c) 1991-1994 The Regents of the University of California.
- * Copyright (c) 1994-1996 Sun Microsystems, Inc.
+ * Copyright © 1991-1994 The Regents of the University of California.
+ * Copyright © 1994-1996 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclPreserve.c b/generic/tclPreserve.c
index 59ee40f..5bc0a1a 100644
--- a/generic/tclPreserve.c
+++ b/generic/tclPreserve.c
@@ -5,8 +5,8 @@
* sure that widget records and other data structures aren't reallocated
* when there are nested functions that depend on their existence.
*
- * Copyright (c) 1991-1994 The Regents of the University of California.
- * Copyright (c) 1994-1998 Sun Microsystems, Inc.
+ * Copyright © 1991-1994 The Regents of the University of California.
+ * Copyright © 1994-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 4c9694b..46e7858 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -4,10 +4,10 @@
* This file contains routines that implement Tcl procedures, including
* the "proc" and "uplevel" commands.
*
- * Copyright (c) 1987-1993 The Regents of the University of California.
- * Copyright (c) 1994-1998 Sun Microsystems, Inc.
- * Copyright (c) 2004-2006 Miguel Sofer
- * Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1987-1993 The Regents of the University of California.
+ * Copyright © 1994-1998 Sun Microsystems, Inc.
+ * Copyright © 2004-2006 Miguel Sofer
+ * Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -352,7 +352,7 @@ Tcl_ProcObjCmd(
* The argument list is just "args"; check the body
*/
- procBody = TclGetStringFromObj(objv[3], &numBytes);
+ procBody = Tcl_GetStringFromObj(objv[3], &numBytes);
if (TclParseAllWhiteSpace(procBody, numBytes) < numBytes) {
goto done;
}
@@ -447,7 +447,7 @@ TclCreateProc(
size_t length;
Tcl_Obj *sharedBodyPtr = bodyPtr;
- bytes = TclGetStringFromObj(bodyPtr, &length);
+ bytes = Tcl_GetStringFromObj(bodyPtr, &length);
bodyPtr = Tcl_NewStringObj(bytes, length);
/*
@@ -538,7 +538,7 @@ TclCreateProc(
goto procError;
}
- argname = TclGetStringFromObj(fieldValues[0], &nameLength);
+ argname = Tcl_GetStringFromObj(fieldValues[0], &nameLength);
/*
* Check that the formal parameter name is a scalar.
@@ -601,8 +601,8 @@ TclCreateProc(
if (localPtr->defValuePtr != NULL) {
size_t tmpLength, valueLength;
- const char *tmpPtr = TclGetStringFromObj(localPtr->defValuePtr, &tmpLength);
- const char *value = TclGetStringFromObj(fieldValues[1], &valueLength);
+ const char *tmpPtr = Tcl_GetStringFromObj(localPtr->defValuePtr, &tmpLength);
+ const char *value = Tcl_GetStringFromObj(fieldValues[1], &valueLength);
if ((valueLength != tmpLength)
|| memcmp(value, tmpPtr, tmpLength) != 0
@@ -2034,7 +2034,7 @@ MakeProcError(
{
unsigned int overflow, limit = 60;
size_t nameLen;
- const char *procName = TclGetStringFromObj(procNameObj, &nameLen);
+ const char *procName = Tcl_GetStringFromObj(procNameObj, &nameLen);
overflow = (nameLen > limit);
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
@@ -2705,7 +2705,7 @@ MakeLambdaError(
{
unsigned int overflow, limit = 60;
size_t nameLen;
- const char *procName = TclGetStringFromObj(procNameObj, &nameLen);
+ const char *procName = Tcl_GetStringFromObj(procNameObj, &nameLen);
overflow = (nameLen > limit);
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
diff --git a/generic/tclProcess.c b/generic/tclProcess.c
index 838d8d6..49b4068 100644
--- a/generic/tclProcess.c
+++ b/generic/tclProcess.c
@@ -4,7 +4,7 @@
* This file implements the "tcl::process" ensemble for subprocess
* management as defined by TIP #462.
*
- * Copyright (c) 2017 Frederic Bonnet.
+ * Copyright © 2017 Frederic Bonnet.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index f67fcee..c40165f 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -4,8 +4,8 @@
* This file contains the public interfaces to the Tcl regular expression
* mechanism.
*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1998 Sun Microsystems, Inc.
+ * Copyright © 1998-1999 Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -26,7 +26,7 @@
* regex.h regexec.c regfree.c
* regfronts.c regguts.h
*
- * Copyright (c) 1998 Henry Spencer. All rights reserved.
+ * Copyright © 1998 Henry Spencer. All rights reserved.
*
* Development of this software was funded, in part, by Cray Research Inc.,
* UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
@@ -481,7 +481,7 @@ Tcl_RegExpExecObj(
regexpPtr->string = NULL;
regexpPtr->objPtr = textObj;
- udata = TclGetUnicodeFromObj(textObj, &length);
+ udata = Tcl_GetUnicodeFromObj(textObj, &length);
if (offset > length) {
offset = length;
@@ -600,7 +600,7 @@ Tcl_GetRegExpFromObj(
RegexpGetIntRep(objPtr, regexpPtr);
if ((regexpPtr == NULL) || (regexpPtr->flags != flags)) {
- pattern = TclGetStringFromObj(objPtr, &length);
+ pattern = Tcl_GetStringFromObj(objPtr, &length);
regexpPtr = CompileRegexp(interp, pattern, length, flags);
if (regexpPtr == NULL) {
diff --git a/generic/tclResolve.c b/generic/tclResolve.c
index c70cbd3..f321515 100644
--- a/generic/tclResolve.c
+++ b/generic/tclResolve.c
@@ -6,7 +6,7 @@
* name resolution rules to the Tcl language. Rules can be applied to a
* particular namespace, to the interpreter as a whole, or both.
*
- * Copyright (c) 1998 Lucent Technologies, Inc.
+ * Copyright © 1998 Lucent Technologies, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 5584de4..83bfd04 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -3,7 +3,7 @@
*
* This file contains code to manage the interpreter result.
*
- * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * Copyright © 1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -362,7 +362,7 @@ Tcl_AppendElement(
if (Tcl_IsShared(iPtr->objResultPtr)) {
Tcl_SetObjResult(interp, Tcl_DuplicateObj(iPtr->objResultPtr));
}
- bytes = TclGetStringFromObj(iPtr->objResultPtr, &length);
+ bytes = Tcl_GetStringFromObj(iPtr->objResultPtr, &length);
if (TclNeedSpace(bytes, bytes + length)) {
Tcl_AppendToObj(iPtr->objResultPtr, " ", 1);
}
@@ -723,7 +723,7 @@ TclProcessReturn(
if (valuePtr != NULL) {
size_t length;
- (void) TclGetStringFromObj(valuePtr, &length);
+ (void) Tcl_GetStringFromObj(valuePtr, &length);
if (length) {
iPtr->errorInfo = valuePtr;
Tcl_IncrRefCount(iPtr->errorInfo);
diff --git a/generic/tclScan.c b/generic/tclScan.c
index 3387f34..7e1f2b0 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -3,7 +3,7 @@
*
* This file contains the implementation of the "scan" command.
*
- * Copyright (c) 1998 by Scriptics 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/generic/tclStrToD.c b/generic/tclStrToD.c
index 33b91a3..a47646b 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -7,7 +7,7 @@
* into strings of digits, and procedures for interconversion among
* 'double' and 'mp_int' types.
*
- * Copyright (c) 2005 by Kevin B. Kenny. All rights reserved.
+ * Copyright © 2005 Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -22,6 +22,11 @@
#define copysign _copysign
#endif
+#ifndef PRIx64
+# define PRIx64 TCL_LL_MODIFIER "x"
+#endif
+
+
/*
* This code supports (at least hypothetically), IBM, Cray, VAX and IEEE-754
* floating point; of these, only IEEE-754 can represent NaN. IEEE-754 can be
@@ -537,7 +542,7 @@ TclParseNumber(
int under = 0; /* Flag trailing '_' as error if true once
* number is accepted. */
-#define ALL_BITS ((Tcl_WideUInt)-1)
+#define ALL_BITS UWIDE_MAX
#define MOST_BITS (ALL_BITS >> 1)
/*
@@ -720,7 +725,7 @@ TclParseNumber(
&& (((size_t)shift >=
CHAR_BIT*sizeof(Tcl_WideUInt))
|| (octalSignificandWide >
- ((Tcl_WideUInt)-1 >> shift)))) {
+ (UWIDE_MAX >> shift)))) {
octalSignificandOverflow = 1;
err = mp_init_u64(&octalSignificandBig,
octalSignificandWide);
@@ -804,7 +809,7 @@ TclParseNumber(
if (significandWide != 0 &&
((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) ||
- significandWide > ((Tcl_WideUInt)-1 >> shift))) {
+ significandWide > (UWIDE_MAX >> shift))) {
significandOverflow = 1;
err = mp_init_u64(&significandBig,
significandWide);
@@ -838,12 +843,14 @@ TclParseNumber(
under = 0;
state = BINARY;
break;
- } else if (c == '_' && !(flags & TCL_PARSE_NO_UNDERSCORE)) {
- /* Ignore numeric "white space" */
- under = 1;
- break;
+ } else if (c == '_' && !(flags & TCL_PARSE_NO_UNDERSCORE)) {
+ /* Ignore numeric "white space" */
+ under = 1;
+ break;
} else if (c != '1') {
goto endgame;
+ } else {
+ under = 0;
}
if (objPtr != NULL) {
shift = numTrailZeros + 1;
@@ -856,7 +863,7 @@ TclParseNumber(
if (significandWide != 0 &&
((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) ||
- significandWide > ((Tcl_WideUInt)-1 >> shift))) {
+ significandWide > (UWIDE_MAX >> shift))) {
significandOverflow = 1;
err = mp_init_u64(&significandBig,
significandWide);
@@ -883,11 +890,11 @@ TclParseNumber(
under = 0;
numTrailZeros++;
} else if ( ! isdigit(UCHAR(c))) {
- if (c == '_' && !(flags & TCL_PARSE_NO_UNDERSCORE)) {
- /* Ignore numeric "white space" */
- under = 1;
- break;
- }
+ if (c == '_' && !(flags & TCL_PARSE_NO_UNDERSCORE)) {
+ /* Ignore numeric "white space" */
+ under = 1;
+ break;
+ }
goto endgame;
}
under = 0;
@@ -1530,7 +1537,7 @@ AccumulateDecimalDigit(
*wideRepPtr = digit;
return 0;
} else if (numZeros >= maxpow10_wide
- || w > ((Tcl_WideUInt)-1-digit)/pow10_wide[numZeros+1]) {
+ || w > (UWIDE_MAX-digit)/pow10_wide[numZeros+1]) {
/*
* Wide multiplication will overflow. Expand the number to a
* bignum and fall through into the bignum case.
@@ -2918,7 +2925,7 @@ QuickConversion(
}
ilim = ilim1;
--k;
- d *= 10.0;
+ d = d * 10.0;
++ieps;
}
@@ -2935,7 +2942,7 @@ QuickConversion(
retval = (char *)Tcl_Alloc(len + 1);
if (ilim == 0) {
- d -= 5.;
+ d = d - 5.;
if (d > eps.d) {
*retval = '1';
*decpt = k;
@@ -5183,23 +5190,23 @@ TclFormatNaN(
#else
union {
double dv;
- Tcl_WideUInt iv;
+ uint64_t iv;
} bitwhack;
bitwhack.dv = value;
if (n770_fp) {
bitwhack.iv = Nokia770Twiddle(bitwhack.iv);
}
- if (bitwhack.iv & ((Tcl_WideUInt) 1 << 63)) {
- bitwhack.iv &= ~ ((Tcl_WideUInt) 1 << 63);
+ if (bitwhack.iv & (UINT64_C(1) << 63)) {
+ bitwhack.iv &= ~ (UINT64_C(1) << 63);
*buffer++ = '-';
}
*buffer++ = 'N';
*buffer++ = 'a';
*buffer++ = 'N';
- bitwhack.iv &= (((Tcl_WideUInt) 1) << 51) - 1;
+ bitwhack.iv &= ((UINT64_C(1)) << 51) - 1;
if (bitwhack.iv != 0) {
- sprintf(buffer, "(%" TCL_LL_MODIFIER "x)", bitwhack.iv);
+ sprintf(buffer, "(%" PRIx64 ")", bitwhack.iv);
} else {
*buffer = '\0';
}
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 9f46b9d..273d1f7 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -27,8 +27,8 @@
* internal representation to keep track of how much space is used vs.
* allocated.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 1999 by Scriptics Corporation.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1999 Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -418,7 +418,7 @@ Tcl_GetCharLength(
*/
if (TclIsPureByteArray(objPtr)) {
- (void) TclGetByteArrayFromObj(objPtr, &numChars);
+ (void) Tcl_GetByteArrayFromObj(objPtr, &numChars);
return numChars;
}
@@ -517,7 +517,7 @@ Tcl_GetUniChar(
if (TclIsPureByteArray(objPtr)) {
size_t length = 0;
- unsigned char *bytes = TclGetByteArrayFromObj(objPtr, &length);
+ unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, &length);
if (index >= length) {
return -1;
}
@@ -573,7 +573,7 @@ Tcl_GetUniChar(
/*
*----------------------------------------------------------------------
*
- * Tcl_GetUnicodeFromObj --
+ * Tcl_GetUnicodeFromObj/TclGetUnicodeFromObj --
*
* Get the Unicode form of the String object with length. If the object
* is not already a String object, it will be converted to one. If the
@@ -589,8 +589,9 @@ Tcl_GetUniChar(
*----------------------------------------------------------------------
*/
+#undef Tcl_GetUnicodeFromObj
Tcl_UniChar *
-Tcl_GetUnicodeFromObj(
+TclGetUnicodeFromObj(
Tcl_Obj *objPtr, /* The object to find the unicode string
* for. */
int *lengthPtr) /* If non-NULL, the location where the string
@@ -608,6 +609,30 @@ Tcl_GetUnicodeFromObj(
}
if (lengthPtr != NULL) {
+ *lengthPtr = (int)stringPtr->numChars;
+ }
+ return stringPtr->unicode;
+}
+
+Tcl_UniChar *
+Tcl_GetUnicodeFromObj(
+ Tcl_Obj *objPtr, /* The object to find the unicode string
+ * for. */
+ size_t *lengthPtr) /* If non-NULL, the location where the string
+ * rep's unichar length should be stored. If
+ * NULL, no length is stored. */
+{
+ String *stringPtr;
+
+ SetStringFromAny(NULL, objPtr);
+ stringPtr = GET_STRING(objPtr);
+
+ if (stringPtr->hasUnicode == 0) {
+ FillUnicodeRep(objPtr);
+ stringPtr = GET_STRING(objPtr);
+ }
+
+ if (lengthPtr != NULL) {
*lengthPtr = stringPtr->numChars;
}
return stringPtr->unicode;
@@ -655,7 +680,7 @@ Tcl_GetRange(
*/
if (TclIsPureByteArray(objPtr)) {
- unsigned char *bytes = TclGetByteArrayFromObj(objPtr, &length);
+ unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, &length);
if (last >= length) {
last = length - 1;
@@ -1162,7 +1187,7 @@ Tcl_AppendToObj(
const char *bytes, /* Points to the bytes to append to the
* object. */
size_t length) /* The number of bytes to append from "bytes".
- * If -1, then append all bytes up to NUL
+ * If TCL_INDEX_NONE, then append all bytes up to NUL
* byte. */
{
Tcl_AppendLimitedToObj(objPtr, bytes, length, TCL_INDEX_NONE, NULL);
@@ -1287,8 +1312,8 @@ Tcl_AppendObjToObj(
size_t lengthSrc = 0;
- (void) TclGetByteArrayFromObj(objPtr, &length);
- (void) TclGetByteArrayFromObj(appendObjPtr, &lengthSrc);
+ (void) Tcl_GetByteArrayFromObj(objPtr, &length);
+ (void) Tcl_GetByteArrayFromObj(appendObjPtr, &lengthSrc);
/*
* Grow buffer enough for the append.
@@ -1308,7 +1333,7 @@ Tcl_AppendObjToObj(
*/
TclAppendBytesToByteArray(objPtr,
- Tcl_GetByteArrayFromObj(appendObjPtr, NULL), lengthSrc);
+ TclGetByteArrayFromObj(appendObjPtr, NULL), lengthSrc);
return;
}
@@ -1331,11 +1356,11 @@ Tcl_AppendObjToObj(
if (TclHasIntRep(appendObjPtr, &tclStringType)) {
Tcl_UniChar *unicode =
- TclGetUnicodeFromObj(appendObjPtr, &numChars);
+ Tcl_GetUnicodeFromObj(appendObjPtr, &numChars);
AppendUnicodeToUnicodeRep(objPtr, unicode, numChars);
} else {
- bytes = TclGetStringFromObj(appendObjPtr, &length);
+ bytes = Tcl_GetStringFromObj(appendObjPtr, &length);
AppendUtfToUnicodeRep(objPtr, bytes, length);
}
return;
@@ -1347,7 +1372,7 @@ Tcl_AppendObjToObj(
* characters in the final (appended-to) object.
*/
- bytes = TclGetStringFromObj(appendObjPtr, &length);
+ bytes = Tcl_GetStringFromObj(appendObjPtr, &length);
numChars = stringPtr->numChars;
if ((numChars != TCL_INDEX_NONE) && TclHasIntRep(appendObjPtr, &tclStringType)) {
@@ -1690,7 +1715,7 @@ Tcl_AppendFormatToObj(
if (Tcl_IsShared(appendObj)) {
Tcl_Panic("%s called with shared object", "Tcl_AppendFormatToObj");
}
- (void)TclGetStringFromObj(appendObj, &originalLength);
+ (void)Tcl_GetStringFromObj(appendObj, &originalLength);
limit = (size_t)INT_MAX - originalLength;
/*
@@ -2084,7 +2109,7 @@ Tcl_AppendFormatToObj(
TclNewIntObj(pure, l);
}
Tcl_IncrRefCount(pure);
- bytes = TclGetStringFromObj(pure, &length);
+ bytes = Tcl_GetStringFromObj(pure, &length);
/*
* Already did the sign above.
@@ -2368,7 +2393,7 @@ Tcl_AppendFormatToObj(
}
}
- (void)TclGetStringFromObj(segment, &segmentNumBytes);
+ (void)Tcl_GetStringFromObj(segment, &segmentNumBytes);
if (segmentNumBytes > limit) {
if (allocSegment) {
Tcl_DecrRefCount(segment);
@@ -2720,7 +2745,7 @@ TclGetStringStorage(
String *stringPtr;
if (!TclHasIntRep(objPtr, &tclStringType) || objPtr->bytes == NULL) {
- return TclGetStringFromObj(objPtr, sizePtr);
+ return Tcl_GetStringFromObj(objPtr, sizePtr);
}
stringPtr = GET_STRING(objPtr);
@@ -2777,13 +2802,13 @@ TclStringRepeat(
if (binary) {
/* Result will be pure byte array. Pre-size it */
- (void)TclGetByteArrayFromObj(objPtr, &length);
+ (void)Tcl_GetByteArrayFromObj(objPtr, &length);
} else if (unichar) {
/* Result will be pure Tcl_UniChar array. Pre-size it. */
- (void)TclGetUnicodeFromObj(objPtr, &length);
+ (void)Tcl_GetUnicodeFromObj(objPtr, &length);
} else {
/* Result will be concat of string reps. Pre-size it. */
- (void)TclGetStringFromObj(objPtr, &length);
+ (void)Tcl_GetStringFromObj(objPtr, &length);
}
if (length == 0) {
@@ -2812,7 +2837,7 @@ TclStringRepeat(
done *= 2;
}
TclAppendBytesToByteArray(objResultPtr,
- Tcl_GetByteArrayFromObj(objResultPtr, NULL),
+ TclGetByteArrayFromObj(objResultPtr, NULL),
(count - done) * length);
} else if (unichar) {
/*
@@ -2973,7 +2998,7 @@ TclStringCat(
*/
if (TclIsPureByteArray(objPtr)) {
- (void)TclGetByteArrayFromObj(objPtr, &numBytes); /* PANIC? */
+ (void)Tcl_GetByteArrayFromObj(objPtr, &numBytes); /* PANIC? */
if (numBytes) {
last = objc - oc;
@@ -2997,7 +3022,7 @@ TclStringCat(
if ((objPtr->bytes == NULL) || (objPtr->length)) {
size_t numChars;
- (void)TclGetUnicodeFromObj(objPtr, &numChars); /* PANIC? */
+ (void)Tcl_GetUnicodeFromObj(objPtr, &numChars); /* PANIC? */
if (numChars) {
last = objc - oc;
if (length == 0) {
@@ -3028,7 +3053,7 @@ TclStringCat(
/* No string rep; Take the chance we can avoid making it */
pendingPtr = objPtr;
} else {
- (void)TclGetStringFromObj(objPtr, &length); /* PANIC? */
+ (void)Tcl_GetStringFromObj(objPtr, &length); /* PANIC? */
}
} while (--oc && (length == 0) && (pendingPtr == NULL));
@@ -3054,14 +3079,14 @@ TclStringCat(
do {
Tcl_Obj *objPtr = *ov++;
- (void)TclGetStringFromObj(objPtr, &numBytes); /* PANIC? */
+ (void)Tcl_GetStringFromObj(objPtr, &numBytes); /* PANIC? */
} while (--oc && numBytes == 0 && pendingPtr->bytes == NULL);
if (numBytes) {
last = objc -oc -1;
}
if (oc || numBytes) {
- (void)TclGetStringFromObj(pendingPtr, &length);
+ (void)Tcl_GetStringFromObj(pendingPtr, &length);
}
if (length == 0) {
if (numBytes) {
@@ -3114,7 +3139,7 @@ TclStringCat(
size_t start = 0;
objResultPtr = *objv++; objc--;
- (void)TclGetByteArrayFromObj(objResultPtr, &start);
+ (void)Tcl_GetByteArrayFromObj(objResultPtr, &start);
dst = Tcl_SetByteArrayLength(objResultPtr, length) + start;
} else {
objResultPtr = Tcl_NewByteArrayObj(NULL, length);
@@ -3131,7 +3156,7 @@ TclStringCat(
if (TclIsPureByteArray(objPtr)) {
size_t more = 0;
- unsigned char *src = TclGetByteArrayFromObj(objPtr, &more);
+ unsigned char *src = Tcl_GetByteArrayFromObj(objPtr, &more);
memcpy(dst, src, more);
dst += more;
}
@@ -3146,7 +3171,7 @@ TclStringCat(
objResultPtr = *objv++; objc--;
/* Ugly interface! Force resize of the unicode array. */
- (void)TclGetUnicodeFromObj(objResultPtr, &start);
+ (void)Tcl_GetUnicodeFromObj(objResultPtr, &start);
Tcl_InvalidateStringRep(objResultPtr);
if (0 == Tcl_AttemptSetObjLength(objResultPtr, length)) {
if (interp) {
@@ -3182,7 +3207,7 @@ TclStringCat(
if ((objPtr->bytes == NULL) || (objPtr->length)) {
size_t more;
- Tcl_UniChar *src = TclGetUnicodeFromObj(objPtr, &more);
+ Tcl_UniChar *src = Tcl_GetUnicodeFromObj(objPtr, &more);
memcpy(dst, src, more * sizeof(Tcl_UniChar));
dst += more;
}
@@ -3196,7 +3221,7 @@ TclStringCat(
objResultPtr = *objv++; objc--;
- (void)TclGetStringFromObj(objResultPtr, &start);
+ (void)Tcl_GetStringFromObj(objResultPtr, &start);
if (0 == Tcl_AttemptSetObjLength(objResultPtr, length)) {
if (interp) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -3229,7 +3254,7 @@ TclStringCat(
if ((objPtr->bytes == NULL) || (objPtr->length)) {
size_t more;
- char *src = TclGetStringFromObj(objPtr, &more);
+ char *src = Tcl_GetStringFromObj(objPtr, &more);
memcpy(dst, src, more);
dst += more;
@@ -3293,8 +3318,8 @@ TclStringCmp(
* arrays anyway, and we have no memcasecmp() for some reason... :^)
*/
- s1 = (char *) TclGetByteArrayFromObj(value1Ptr, &s1len);
- s2 = (char *) TclGetByteArrayFromObj(value2Ptr, &s2len);
+ s1 = (char *) Tcl_GetByteArrayFromObj(value1Ptr, &s1len);
+ s2 = (char *) Tcl_GetByteArrayFromObj(value2Ptr, &s2len);
memCmpFn = memcmp;
} else if (TclHasIntRep(value1Ptr, &tclStringType)
&& TclHasIntRep(value2Ptr, &tclStringType)) {
@@ -3306,8 +3331,8 @@ TclStringCmp(
*/
if (nocase) {
- s1 = (char *) TclGetUnicodeFromObj(value1Ptr, &s1len);
- s2 = (char *) TclGetUnicodeFromObj(value2Ptr, &s2len);
+ s1 = (char *) Tcl_GetUnicodeFromObj(value1Ptr, &s1len);
+ s2 = (char *) Tcl_GetUnicodeFromObj(value2Ptr, &s2len);
memCmpFn = (memCmpFn_t)TclUniCharNcasecmp;
} else {
s1len = Tcl_GetCharLength(value1Ptr);
@@ -3344,7 +3369,7 @@ TclStringCmp(
case -1:
s1 = 0;
s1len = 0;
- s2 = TclGetStringFromObj(value2Ptr, &s2len);
+ s2 = Tcl_GetStringFromObj(value2Ptr, &s2len);
break;
case 0:
match = -1;
@@ -3359,7 +3384,7 @@ TclStringCmp(
case -1:
s2 = 0;
s2len = 0;
- s1 = TclGetStringFromObj(value1Ptr, &s1len);
+ s1 = Tcl_GetStringFromObj(value1Ptr, &s1len);
break;
case 0:
match = 1;
@@ -3370,8 +3395,8 @@ TclStringCmp(
goto matchdone;
}
} else {
- s1 = TclGetStringFromObj(value1Ptr, &s1len);
- s2 = TclGetStringFromObj(value2Ptr, &s2len);
+ s1 = Tcl_GetStringFromObj(value1Ptr, &s1len);
+ s2 = Tcl_GetStringFromObj(value2Ptr, &s2len);
}
if (!nocase && checkEq) {
/*
@@ -3473,10 +3498,10 @@ TclStringFirst(
if (TclIsPureByteArray(needle) && TclIsPureByteArray(haystack)) {
unsigned char *end, *check, *bh;
- unsigned char *bn = TclGetByteArrayFromObj(needle, &ln);
+ unsigned char *bn = Tcl_GetByteArrayFromObj(needle, &ln);
/* Find bytes in bytes */
- bh = TclGetByteArrayFromObj(haystack, &lh);
+ bh = Tcl_GetByteArrayFromObj(haystack, &lh);
if ((lh < ln) || (start > lh - ln)) {
/* Don't start the loop if there cannot be a valid answer */
goto firstEnd;
@@ -3519,8 +3544,8 @@ TclStringFirst(
* do only the well-defined Tcl_UniChar array search.
*/
- un = TclGetUnicodeFromObj(needle, &ln);
- uh = TclGetUnicodeFromObj(haystack, &lh);
+ un = Tcl_GetUnicodeFromObj(needle, &ln);
+ uh = Tcl_GetUnicodeFromObj(haystack, &lh);
if ((lh < ln) || (start > lh - ln)) {
/* Don't start the loop if there cannot be a valid answer */
goto firstEnd;
@@ -3579,8 +3604,8 @@ TclStringLast(
}
if (TclIsPureByteArray(needle) && TclIsPureByteArray(haystack)) {
- unsigned char *check, *bh = TclGetByteArrayFromObj(haystack, &lh);
- unsigned char *bn = TclGetByteArrayFromObj(needle, &ln);
+ unsigned char *check, *bh = Tcl_GetByteArrayFromObj(haystack, &lh);
+ unsigned char *bn = Tcl_GetByteArrayFromObj(needle, &ln);
if (last + 1 >= lh + 1) {
last = lh - 1;
@@ -3602,8 +3627,8 @@ TclStringLast(
goto lastEnd;
}
- uh = TclGetUnicodeFromObj(haystack, &lh);
- un = TclGetUnicodeFromObj(needle, &ln);
+ uh = Tcl_GetUnicodeFromObj(haystack, &lh);
+ un = Tcl_GetUnicodeFromObj(needle, &ln);
if (last + 1 >= lh + 1) {
last = lh - 1;
@@ -3676,15 +3701,18 @@ TclStringReverse(
String *stringPtr;
Tcl_UniChar ch = 0;
int inPlace = flags & TCL_STRING_IN_PLACE;
+#if TCL_UTF_MAX < 4
+ int needFlip = 0;
+#endif
if (TclIsPureByteArray(objPtr)) {
size_t numBytes = 0;
- unsigned char *from = TclGetByteArrayFromObj(objPtr, &numBytes);
+ unsigned char *from = Tcl_GetByteArrayFromObj(objPtr, &numBytes);
if (!inPlace || Tcl_IsShared(objPtr)) {
objPtr = Tcl_NewByteArrayObj(NULL, numBytes);
}
- ReverseBytes(Tcl_GetByteArrayFromObj(objPtr, NULL), from, numBytes);
+ ReverseBytes(Tcl_GetByteArrayFromObj(objPtr, (size_t *)NULL), from, numBytes);
return objPtr;
}
@@ -3694,10 +3722,9 @@ TclStringReverse(
if (stringPtr->hasUnicode) {
Tcl_UniChar *from = Tcl_GetUnicode(objPtr);
Tcl_UniChar *src = from + stringPtr->numChars;
+ Tcl_UniChar *to;
if (!inPlace || Tcl_IsShared(objPtr)) {
- Tcl_UniChar *to;
-
/*
* Create a non-empty, pure unicode value, so we can coax
* Tcl_SetObjLength into growing the unicode rep buffer.
@@ -3707,19 +3734,54 @@ TclStringReverse(
Tcl_SetObjLength(objPtr, stringPtr->numChars);
to = Tcl_GetUnicode(objPtr);
while (--src >= from) {
+#if TCL_UTF_MAX < 4
+ ch = *src;
+ if ((ch & 0xF800) == 0xD800) {
+ needFlip = 1;
+ }
+ *to++ = ch;
+#else
*to++ = *src;
+#endif
}
} else {
/*
* Reversing in place.
*/
+#if TCL_UTF_MAX < 4
+ to = src;
+#endif
while (--src > from) {
ch = *src;
+#if TCL_UTF_MAX < 4
+ if ((ch & 0xF800) == 0xD800) {
+ needFlip = 1;
+ }
+#endif
*src = *from;
*from++ = ch;
}
}
+#if TCL_UTF_MAX < 4
+ if (needFlip) {
+ /*
+ * Flip back surrogate pairs.
+ */
+
+ from = to - stringPtr->numChars;
+ while (--to >= from) {
+ ch = *to;
+ if ((ch & 0xFC00) == 0xD800) {
+ if ((to-1 >= from) && ((to[-1] & 0xFC00) == 0xDC00)) {
+ to[0] = to[-1];
+ to[-1] = ch;
+ --to;
+ }
+ }
+ }
+ }
+#endif
}
if (objPtr->bytes) {
@@ -3743,8 +3805,8 @@ TclStringReverse(
* Pass 1. Reverse the bytes of each multi-byte character.
*/
- size_t charCount = 0;
size_t bytesLeft = numBytes;
+ int chw;
while (bytesLeft) {
/*
@@ -3753,18 +3815,16 @@ TclStringReverse(
* skip calling Tcl_UtfCharComplete() here.
*/
- size_t bytesInChar = TclUtfToUniChar(from, &ch);
+ size_t bytesInChar = TclUtfToUCS4(from, &chw);
ReverseBytes((unsigned char *)to, (unsigned char *)from,
bytesInChar);
to += bytesInChar;
from += bytesInChar;
bytesLeft -= bytesInChar;
- charCount++;
}
from = to = objPtr->bytes;
- stringPtr->numChars = charCount;
}
/* Pass 2. Reverse all the bytes. */
ReverseBytes((unsigned char *)to, (unsigned char *)from, numBytes);
@@ -3829,7 +3889,7 @@ TclStringReplace(
if (TclIsPureByteArray(objPtr)) {
size_t numBytes = 0;
- unsigned char *bytes = TclGetByteArrayFromObj(objPtr, &numBytes);
+ unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, &numBytes);
if (insertPtr == NULL) {
/* Replace something with nothing. */
@@ -3853,7 +3913,7 @@ TclStringReplace(
if (TclIsPureByteArray(insertPtr)) {
size_t newBytes = 0;
unsigned char *iBytes
- = TclGetByteArrayFromObj(insertPtr, &newBytes);
+ = Tcl_GetByteArrayFromObj(insertPtr, &newBytes);
if (count == newBytes && inPlace && !Tcl_IsShared(objPtr)) {
/*
@@ -3897,7 +3957,7 @@ TclStringReplace(
/* The traditional implementation... */
{
size_t numChars;
- Tcl_UniChar *ustring = TclGetUnicodeFromObj(objPtr, &numChars);
+ Tcl_UniChar *ustring = Tcl_GetUnicodeFromObj(objPtr, &numChars);
/* TODO: Is there an in-place option worth pursuing here? */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 9c4c2d03..51e62fc 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -3,7 +3,7 @@
*
* This file contains the initializers for the Tcl stub vectors.
*
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1998-1999 Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -72,7 +72,7 @@ static void uniCodePanic() {
Tcl_Panic("This extension uses a deprecated function, not available now: Tcl is compiled with -DTCL_UTF_MAX==%d", TCL_UTF_MAX);
}
# define Tcl_GetUnicode (int *(*)(Tcl_Obj *))(void *)uniCodePanic
-# define Tcl_GetUnicodeFromObj (Tcl_UniChar *(*)(Tcl_Obj *, int *))(void *)uniCodePanic
+# define Tcl_GetUnicodeFromObj (Tcl_UniChar *(*)(Tcl_Obj *, size_t *))(void *)uniCodePanic
# define Tcl_NewUnicodeObj (Tcl_Obj *(*)(const Tcl_UniChar *, size_t))(void *)uniCodePanic
# define Tcl_SetUnicodeObj (void(*)(Tcl_Obj *, const Tcl_UniChar *, size_t))(void *)uniCodePanic
#endif
@@ -128,6 +128,7 @@ static void uniCodePanic() {
#define TclBN_mp_to_radix mp_to_radix
#define TclBN_mp_to_ubin mp_to_ubin
#define TclBN_mp_ubin_size mp_ubin_size
+#define TclBN_mp_unpack mp_unpack
#define TclBN_mp_xor mp_xor
#define TclBN_mp_zero mp_zero
#define TclBN_s_mp_add s_mp_add
@@ -144,13 +145,24 @@ static void uniCodePanic() {
#define TclBN_mp_toom_sqr s_mp_toom_sqr
#define TclpCreateTempFile_ TclpCreateTempFile
-#define TclUnixWaitForFile_ TclUnixWaitForFile
+#define TclGetAndDetachPids_ TclGetAndDetachPids
+#define TclpCreateCommandChannel_ TclpCreateCommandChannel
+#define TclpCloseFile_ TclpCloseFile
+#define TclpMakeFile_ TclpMakeFile
+#define TclpOpenFile_ TclpOpenFile
#ifndef MAC_OSX_TCL /* On UNIX, fill with other stub entries */
-#define TclMacOSXGetFileAttribute (int (*)(Tcl_Interp *, int, Tcl_Obj *, Tcl_Obj **))(void *)TclpCreateProcess
-#define TclMacOSXSetFileAttribute (int (*)(Tcl_Interp *, int, Tcl_Obj *, Tcl_Obj *))(void *)isatty
-#define TclMacOSXCopyFileAttributes (int (*)(const char *, const char *, const Tcl_StatBuf *))(void *)TclUnixCopyFile
-#define TclMacOSXMatchType (int (*)(Tcl_Interp *, const char *, const char *, Tcl_StatBuf *, Tcl_GlobTypeData *))(void *)TclpMakeFile
-#define TclMacOSXNotifierAddRunLoopMode (void (*)(const void *))(void *)TclpOpenFile
+# define Tcl_MacOSXOpenVersionedBundleResources 0
+# define Tcl_MacOSXNotifierAddRunLoopMode 0
+#endif
+#define TclMacOSXNotifierAddRunLoopMode Tcl_MacOSXNotifierAddRunLoopMode
+#ifdef _WIN32
+# define Tcl_CreateFileHandler 0
+# define Tcl_DeleteFileHandler 0
+# define Tcl_GetOpenFile 0
+# define TclpCreatePipe_ TclpCreatePipe
+#else
+# define TclpIsAtty isatty
+# define TclpCreatePipe_ (int (*)(TclFile *, TclFile *))(void *)TclUnixCopyFile
#endif
#ifdef _WIN32
@@ -158,6 +170,7 @@ static void uniCodePanic() {
# define TclUnixCopyFile 0
# define TclUnixOpenTemporaryFile 0
# define TclpReaddir 0
+# undef TclpIsAtty
# define TclpIsAtty 0
#elif defined(__CYGWIN__)
# define TclpIsAtty isatty
@@ -246,7 +259,14 @@ static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){
#endif /* TCL_WIDE_INT_IS_LONG */
-#endif /* __CYGWIN__ */
+#else /* __CYGWIN__ */
+# define TclWinGetTclInstance (void *(*)(void))(void *)TclpCreateProcess
+# define TclpGetPid (size_t(*)(Tcl_Pid))(void *)TclUnixWaitForFile
+# define TclWinConvertError (void(*)(int))(void *)TclGetAndDetachPids
+# define TclWinFlushDirtyChannels 0
+# define TclWinNoBackslash 0
+# define TclWinAddProcess 0
+#endif
/*
* WARNING: The contents of this file is automatically generated by the
@@ -308,14 +328,14 @@ static const TclIntStubs tclIntStubs = {
0, /* 34 */
0, /* 35 */
0, /* 36 */
- TclGetLoadedPackages, /* 37 */
+ 0, /* 37 */
TclGetNamespaceForQualName, /* 38 */
TclGetObjInterpProc, /* 39 */
TclGetOpenMode, /* 40 */
TclGetOriginalCommand, /* 41 */
TclpGetUserHome, /* 42 */
0, /* 43 */
- TclGuessPackageName, /* 44 */
+ 0, /* 44 */
TclHideUnsafeCommands, /* 45 */
TclInExit, /* 46 */
0, /* 47 */
@@ -538,62 +558,62 @@ static const TclIntPlatStubs tclIntPlatStubs = {
TCL_STUB_MAGIC,
0,
#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MAC_OSX_TCL) /* UNIX */
- TclGetAndDetachPids, /* 0 */
+ TclWinConvertError, /* 0 */
TclpCloseFile, /* 1 */
TclpCreateCommandChannel, /* 2 */
TclpCreatePipe, /* 3 */
- TclpCreateProcess, /* 4 */
- TclUnixWaitForFile_, /* 5 */
+ TclWinGetTclInstance, /* 4 */
+ TclUnixWaitForFile, /* 5 */
TclpMakeFile, /* 6 */
TclpOpenFile, /* 7 */
- TclUnixWaitForFile, /* 8 */
+ TclpGetPid, /* 8 */
TclpCreateTempFile, /* 9 */
0, /* 10 */
- 0, /* 11 */
+ TclGetAndDetachPids, /* 11 */
0, /* 12 */
0, /* 13 */
- TclUnixCopyFile, /* 14 */
- TclMacOSXGetFileAttribute, /* 15 */
- TclMacOSXSetFileAttribute, /* 16 */
- TclMacOSXCopyFileAttributes, /* 17 */
- TclMacOSXMatchType, /* 18 */
+ TclpCreatePipe_, /* 14 */
+ TclpCreateProcess, /* 15 */
+ TclpIsAtty, /* 16 */
+ TclUnixCopyFile, /* 17 */
+ 0, /* 18 */
TclMacOSXNotifierAddRunLoopMode, /* 19 */
- 0, /* 20 */
+ TclWinAddProcess, /* 20 */
0, /* 21 */
TclpCreateTempFile_, /* 22 */
0, /* 23 */
- 0, /* 24 */
+ TclWinNoBackslash, /* 24 */
0, /* 25 */
0, /* 26 */
- 0, /* 27 */
+ TclWinFlushDirtyChannels, /* 27 */
0, /* 28 */
TclWinCPUID, /* 29 */
TclUnixOpenTemporaryFile, /* 30 */
#endif /* UNIX */
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
TclWinConvertError, /* 0 */
- 0, /* 1 */
- 0, /* 2 */
- 0, /* 3 */
+ TclpCloseFile, /* 1 */
+ TclpCreateCommandChannel, /* 2 */
+ TclpCreatePipe, /* 3 */
TclWinGetTclInstance, /* 4 */
TclUnixWaitForFile, /* 5 */
- 0, /* 6 */
- 0, /* 7 */
+ TclpMakeFile, /* 6 */
+ TclpOpenFile, /* 7 */
TclpGetPid, /* 8 */
- 0, /* 9 */
+ TclpCreateTempFile, /* 9 */
0, /* 10 */
TclGetAndDetachPids, /* 11 */
- TclpCloseFile, /* 12 */
- TclpCreateCommandChannel, /* 13 */
- TclpCreatePipe, /* 14 */
+ TclpCloseFile_, /* 12 */
+ TclpCreateCommandChannel_, /* 13 */
+ TclpCreatePipe_, /* 14 */
TclpCreateProcess, /* 15 */
TclpIsAtty, /* 16 */
TclUnixCopyFile, /* 17 */
- TclpMakeFile, /* 18 */
- TclpOpenFile, /* 19 */
+ TclpMakeFile_, /* 18 */
+ TclpOpenFile_, /* 19 */
TclWinAddProcess, /* 20 */
0, /* 21 */
- TclpCreateTempFile, /* 22 */
+ TclpCreateTempFile_, /* 22 */
0, /* 23 */
TclWinNoBackslash, /* 24 */
0, /* 25 */
@@ -604,34 +624,34 @@ static const TclIntPlatStubs tclIntPlatStubs = {
TclUnixOpenTemporaryFile, /* 30 */
#endif /* WIN */
#ifdef MAC_OSX_TCL /* MACOSX */
- TclGetAndDetachPids, /* 0 */
+ TclWinConvertError, /* 0 */
TclpCloseFile, /* 1 */
TclpCreateCommandChannel, /* 2 */
TclpCreatePipe, /* 3 */
- TclpCreateProcess, /* 4 */
- TclUnixWaitForFile_, /* 5 */
+ TclWinGetTclInstance, /* 4 */
+ TclUnixWaitForFile, /* 5 */
TclpMakeFile, /* 6 */
TclpOpenFile, /* 7 */
- TclUnixWaitForFile, /* 8 */
+ TclpGetPid, /* 8 */
TclpCreateTempFile, /* 9 */
0, /* 10 */
- 0, /* 11 */
+ TclGetAndDetachPids, /* 11 */
0, /* 12 */
0, /* 13 */
- TclUnixCopyFile, /* 14 */
- TclMacOSXGetFileAttribute, /* 15 */
- TclMacOSXSetFileAttribute, /* 16 */
- TclMacOSXCopyFileAttributes, /* 17 */
- TclMacOSXMatchType, /* 18 */
+ TclpCreatePipe_, /* 14 */
+ TclpCreateProcess, /* 15 */
+ TclpIsAtty, /* 16 */
+ TclUnixCopyFile, /* 17 */
+ 0, /* 18 */
TclMacOSXNotifierAddRunLoopMode, /* 19 */
- 0, /* 20 */
+ TclWinAddProcess, /* 20 */
0, /* 21 */
TclpCreateTempFile_, /* 22 */
0, /* 23 */
- 0, /* 24 */
+ TclWinNoBackslash, /* 24 */
0, /* 25 */
0, /* 26 */
- 0, /* 27 */
+ TclWinFlushDirtyChannels, /* 27 */
0, /* 28 */
TclWinCPUID, /* 29 */
TclUnixOpenTemporaryFile, /* 30 */
@@ -641,10 +661,9 @@ static const TclIntPlatStubs tclIntPlatStubs = {
static const TclPlatStubs tclPlatStubs = {
TCL_STUB_MAGIC,
0,
-#ifdef MAC_OSX_TCL /* MACOSX */
0, /* 0 */
Tcl_MacOSXOpenVersionedBundleResources, /* 1 */
-#endif /* MACOSX */
+ Tcl_MacOSXNotifierAddRunLoopMode, /* 2 */
};
const TclTomMathStubs tclTomMathStubs = {
@@ -721,7 +740,7 @@ const TclTomMathStubs tclTomMathStubs = {
TclBN_mp_set_u64, /* 68 */
TclBN_mp_get_mag_u64, /* 69 */
TclBN_mp_set_i64, /* 70 */
- 0, /* 71 */
+ TclBN_mp_unpack, /* 71 */
0, /* 72 */
0, /* 73 */
0, /* 74 */
@@ -751,24 +770,8 @@ const TclStubs tclStubs = {
Tcl_DbCkalloc, /* 6 */
Tcl_DbCkfree, /* 7 */
Tcl_DbCkrealloc, /* 8 */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
Tcl_CreateFileHandler, /* 9 */
-#endif /* UNIX */
-#if defined(_WIN32) /* WIN */
- 0, /* 9 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
- Tcl_CreateFileHandler, /* 9 */
-#endif /* MACOSX */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
- Tcl_DeleteFileHandler, /* 10 */
-#endif /* UNIX */
-#if defined(_WIN32) /* WIN */
- 0, /* 10 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
Tcl_DeleteFileHandler, /* 10 */
-#endif /* MACOSX */
Tcl_SetTimer, /* 11 */
Tcl_Sleep, /* 12 */
Tcl_WaitForEvent, /* 13 */
@@ -791,7 +794,7 @@ const TclStubs tclStubs = {
TclFreeObj, /* 30 */
Tcl_GetBoolean, /* 31 */
Tcl_GetBooleanFromObj, /* 32 */
- Tcl_GetByteArrayFromObj, /* 33 */
+ TclGetByteArrayFromObj, /* 33 */
Tcl_GetDouble, /* 34 */
Tcl_GetDoubleFromObj, /* 35 */
0, /* 36 */
@@ -799,7 +802,7 @@ const TclStubs tclStubs = {
Tcl_GetIntFromObj, /* 38 */
Tcl_GetLongFromObj, /* 39 */
Tcl_GetObjType, /* 40 */
- Tcl_GetStringFromObj, /* 41 */
+ TclGetStringFromObj, /* 41 */
Tcl_InvalidateStringRep, /* 42 */
Tcl_ListObjAppendList, /* 43 */
Tcl_ListObjAppendElement, /* 44 */
@@ -925,15 +928,7 @@ const TclStubs tclStubs = {
Tcl_GetParent, /* 164 */
Tcl_GetNameOfExecutable, /* 165 */
Tcl_GetObjResult, /* 166 */
-#if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */
Tcl_GetOpenFile, /* 167 */
-#endif /* UNIX */
-#if defined(_WIN32) /* WIN */
- 0, /* 167 */
-#endif /* WIN */
-#ifdef MAC_OSX_TCL /* MACOSX */
- Tcl_GetOpenFile, /* 167 */
-#endif /* MACOSX */
Tcl_GetPathType, /* 168 */
Tcl_Gets, /* 169 */
Tcl_GetsObj, /* 170 */
@@ -1200,7 +1195,7 @@ const TclStubs tclStubs = {
Tcl_AttemptDbCkrealloc, /* 431 */
Tcl_AttemptSetObjLength, /* 432 */
Tcl_GetChannelThread, /* 433 */
- Tcl_GetUnicodeFromObj, /* 434 */
+ TclGetUnicodeFromObj, /* 434 */
0, /* 435 */
0, /* 436 */
Tcl_SubstObj, /* 437 */
@@ -1415,6 +1410,11 @@ const TclStubs tclStubs = {
Tcl_UtfToUniChar, /* 646 */
Tcl_UniCharToUtfDString, /* 647 */
Tcl_UtfToUniCharDString, /* 648 */
+ 0, /* 649 */
+ 0, /* 650 */
+ Tcl_GetStringFromObj, /* 651 */
+ Tcl_GetUnicodeFromObj, /* 652 */
+ Tcl_GetByteArrayFromObj, /* 653 */
};
/* !END!: Do not edit above this line. */
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index dbc9d40..32ca1f1 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -4,8 +4,8 @@
* Stub object that will be statically linked into extensions that want
* to access Tcl.
*
- * Copyright (c) 1998-1999 by Scriptics Corporation.
- * Copyright (c) 1998 Paul Duffin.
+ * Copyright © 1998-1999 Scriptics Corporation.
+ * Copyright © 1998 Paul Duffin.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -56,10 +56,11 @@ Tcl_InitStubs(
int exact,
int magic)
{
- Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *)interp;
const char *actualVersion = NULL;
ClientData pkgData = NULL;
const TclStubs *stubsPtr = iPtr->stubTable;
+ const char *tclName = (((exact&0xFF00) >= 0x900) ? "tcl" : "Tcl");
/*
* We can't optimize this check by caching tclStubsPtr because that
@@ -73,7 +74,7 @@ Tcl_InitStubs(
return NULL;
}
- actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData);
+ actualVersion = stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 0, &pkgData);
if (actualVersion == NULL) {
return NULL;
}
@@ -93,11 +94,11 @@ Tcl_InitStubs(
}
if (*p || ISDIGIT(*q)) {
/* Construct error message */
- stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL);
+ stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 1, NULL);
return NULL;
}
} else {
- actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL);
+ actualVersion = stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 1, NULL);
if (actualVersion == NULL) {
return NULL;
}
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 91e3b49..df61dbb 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -6,10 +6,10 @@
* commands are not normally included in Tcl applications; they're only
* used for testing.
*
- * Copyright (c) 1993-1994 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 Ajuba Solutions.
- * Copyright (c) 2003 by Kevin B. Kenny. All rights reserved.
+ * Copyright © 1993-1994 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 1998-2000 Ajuba Solutions.
+ * Copyright © 2003 Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -460,7 +460,7 @@ Tcltest_Init(
}
/* TIP #268: Full patchlevel instead of just major.minor */
- if (Tcl_PkgProvideEx(interp, "Tcltest", TCL_PATCH_LEVEL, NULL) == TCL_ERROR) {
+ if (Tcl_PkgProvideEx(interp, "tcl::test", TCL_PATCH_LEVEL, NULL) == TCL_ERROR) {
return TCL_ERROR;
}
@@ -4773,7 +4773,7 @@ GetTimesObjCmd(
Tcl_Free(objv);
/* TclGetString 100000 times */
- fprintf(stderr, "TclGetStringFromObj of \"12345\" 100000 times\n");
+ fprintf(stderr, "Tcl_GetStringFromObj of \"12345\" 100000 times\n");
objPtr = Tcl_NewStringObj("12345", -1);
Tcl_GetTime(&start);
for (i = 0; i < 100000; i++) {
@@ -4781,7 +4781,7 @@ GetTimesObjCmd(
}
Tcl_GetTime(&stop);
timePer = (stop.sec - start.sec)*1000000 + (stop.usec - start.usec);
- fprintf(stderr, " %.3f usec per TclGetStringFromObj of \"12345\"\n",
+ fprintf(stderr, " %.3f usec per Tcl_GetStringFromObj of \"12345\"\n",
timePer/100000);
/* Tcl_GetIntFromObj 100000 times */
@@ -6914,8 +6914,10 @@ TestUtfNextCmd(
/* Run Tcl_UtfNext with many more possible bytes at src[end], all should give the same result */
result = Tcl_UtfNext(buffer + 1);
if (first != result) {
- first = buffer;
- break;
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "Tcl_UtfNext is not supposed to read src[end]\n"
+ "Different result when src[end] is %#x", UCHAR(p[-1])));
+ return TCL_ERROR;
}
}
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index 39b81f8..7de787e 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -6,9 +6,9 @@
* These commands are not normally included in Tcl applications; they're
* only used for testing.
*
- * Copyright (c) 1995-1998 Sun Microsystems, Inc.
- * Copyright (c) 1999 by Scriptics Corporation.
- * Copyright (c) 2005 by Kevin B. Kenny. All rights reserved.
+ * Copyright © 1995-1998 Sun Microsystems, Inc.
+ * Copyright © 1999 Scriptics Corporation.
+ * Copyright © 2005 Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1168,6 +1168,7 @@ TeststringobjCmd(
{
Tcl_UniChar *unicode;
int varIndex, option, i, length;
+ size_t size;
#define MAX_STRINGS 11
const char *index, *string, *strings[MAX_STRINGS+1];
String *strPtr;
@@ -1300,12 +1301,12 @@ TeststringobjCmd(
* is "copy on write".
*/
- string = Tcl_GetStringFromObj(objv[3], &length);
+ string = Tcl_GetStringFromObj(objv[3], &size);
if ((varPtr[varIndex] != NULL)
&& !Tcl_IsShared(varPtr[varIndex])) {
- Tcl_SetStringObj(varPtr[varIndex], string, length);
+ Tcl_SetStringObj(varPtr[varIndex], string, size);
} else {
- SetVarToObj(varPtr, varIndex, Tcl_NewStringObj(string, length));
+ SetVarToObj(varPtr, varIndex, Tcl_NewStringObj(string, size));
}
Tcl_SetObjResult(interp, varPtr[varIndex]);
break;
@@ -1357,18 +1358,18 @@ TeststringobjCmd(
SetVarToObj(varPtr, varIndex, Tcl_DuplicateObj(varPtr[varIndex]));
}
- string = Tcl_GetStringFromObj(varPtr[varIndex], &length);
+ string = Tcl_GetStringFromObj(varPtr[varIndex], &size);
if (Tcl_GetIntFromObj(interp, objv[3], &i) != TCL_OK) {
return TCL_ERROR;
}
- if ((i < 0) || (i > length)) {
+ if ((i < 0) || ((size_t)i > size)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"index value out of range", -1));
return TCL_ERROR;
}
- Tcl_AppendToObj(varPtr[varIndex], string + i, length - i);
+ Tcl_AppendToObj(varPtr[varIndex], string + i, size - i);
Tcl_SetObjResult(interp, varPtr[varIndex]);
break;
case 11: /* appendself2 */
@@ -1388,18 +1389,18 @@ TeststringobjCmd(
SetVarToObj(varPtr, varIndex, Tcl_DuplicateObj(varPtr[varIndex]));
}
- unicode = Tcl_GetUnicodeFromObj(varPtr[varIndex], &length);
+ unicode = Tcl_GetUnicodeFromObj(varPtr[varIndex], &size);
if (Tcl_GetIntFromObj(interp, objv[3], &i) != TCL_OK) {
return TCL_ERROR;
}
- if ((i < 0) || (i > length)) {
+ if ((i < 0) || ((size_t)i > size)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"index value out of range", -1));
return TCL_ERROR;
}
- TclAppendUnicodeToObj(varPtr[varIndex], unicode + i, length - i);
+ TclAppendUnicodeToObj(varPtr[varIndex], unicode + i, size - i);
Tcl_SetObjResult(interp, varPtr[varIndex]);
break;
}
diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c
index 1a577d9..b1fe936 100644
--- a/generic/tclTestProcBodyObj.c
+++ b/generic/tclTestProcBodyObj.c
@@ -5,7 +5,7 @@
* creation of Tcl procedures whose body argument is a Tcl_Obj of type
* "procbody" rather than a string.
*
- * Copyright (c) 1998 by Scriptics 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.
@@ -20,7 +20,7 @@
* name and version of this package
*/
-static const char packageName[] = "procbodytest";
+static const char packageName[] = "tcl::procbodytest";
static const char packageVersion[] = "1.1";
/*
@@ -75,7 +75,7 @@ static const CmdTable safeCommands[] = {
*
* Procbodytest_Init --
*
- * This function initializes the "procbodytest" package.
+ * This function initializes the "tcl::procbodytest" package.
*
* Results:
* A standard Tcl result.
@@ -99,7 +99,7 @@ Procbodytest_Init(
*
* Procbodytest_SafeInit --
*
- * This function initializes the "procbodytest" package.
+ * This function initializes the "tcl::procbodytest" package.
*
* Results:
* A standard Tcl result.
@@ -315,7 +315,7 @@ ProcBodyTestProcObjCmd(
* procbodytest::check
*
* Performs an internal check that the Tcl_PkgPresent() command returns
- * the same version number as was registered when the procbodytest package
+ * the same version number as was registered when the tcl::procbodytest package
* was provided. Places a boolean in the interp result indicating the
* test outcome.
*
diff --git a/generic/tclThread.c b/generic/tclThread.c
index c5ed9e3..22845dd 100644
--- a/generic/tclThread.c
+++ b/generic/tclThread.c
@@ -4,8 +4,8 @@
* This file implements Platform independent thread operations. Most of
* the real work is done in the platform dependent files.
*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * Copyright (c) 2008 by George Peter Staplin
+ * Copyright © 1998 Sun Microsystems, Inc.
+ * Copyright © 2008 George Peter Staplin
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index 1ff5997..9749807 100644
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -6,7 +6,7 @@
* fixed size blocks from block caches.
*
* The Initial Developer of the Original Code is America Online, Inc.
- * Portions created by AOL are Copyright (C) 1999 America Online, Inc.
+ * Portions created by AOL are Copyright © 1999 America Online, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclThreadJoin.c b/generic/tclThreadJoin.c
index 483a6c0..e50a6b9 100644
--- a/generic/tclThreadJoin.c
+++ b/generic/tclThreadJoin.c
@@ -6,7 +6,7 @@
* provide the functionality of joining threads. This code is currently
* not necessary on Unix.
*
- * Copyright (c) 2000 by Scriptics Corporation
+ * Copyright © 2000 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/generic/tclThreadStorage.c b/generic/tclThreadStorage.c
index 2622352..6af1b24 100644
--- a/generic/tclThreadStorage.c
+++ b/generic/tclThreadStorage.c
@@ -4,8 +4,8 @@
* This file implements platform independent thread storage operations to
* work around system limits on the number of thread-specific variables.
*
- * Copyright (c) 2003-2004 by Joe Mistachkin
- * Copyright (c) 2008 by George Peter Staplin
+ * Copyright © 2003-2004 Joe Mistachkin
+ * Copyright © 2008 George Peter Staplin
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index f566eb2..f440ec0 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -6,8 +6,8 @@
* Some of this code is based on work done by Richard Hipp on behalf of
* Conservation Through Innovation, Limited, with their permission.
*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved.
+ * Copyright © 1998 Sun Microsystems, Inc.
+ * Copyright © 2006-2008 Joe Mistachkin. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -368,9 +368,9 @@ ThreadObjCmd(
if (result == TCL_OK) {
Tcl_SetIntObj(Tcl_GetObjResult(interp), status);
} else {
- char buf[20];
+ char buf[TCL_INTEGER_SPACE];
- sprintf(buf, "%" TCL_LL_MODIFIER "d", id);
+ sprintf(buf, "%" TCL_LL_MODIFIER "d", (long long)id);
Tcl_AppendResult(interp, "cannot join thread ", buf, NULL);
}
return result;
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index 84332a0..eff2f8a 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -4,7 +4,7 @@
* This file provides timer event management facilities for Tcl,
* including the "after" command.
*
- * Copyright (c) 1997 by Sun Microsystems, Inc.
+ * Copyright © 1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -893,10 +893,10 @@ Tcl_AfterObjCmd(
} else {
commandPtr = Tcl_ConcatObj(objc-2, objv+2);
}
- command = TclGetStringFromObj(commandPtr, &length);
+ command = Tcl_GetStringFromObj(commandPtr, &length);
for (afterPtr = assocPtr->firstAfterPtr; afterPtr != NULL;
afterPtr = afterPtr->nextPtr) {
- tempCommand = TclGetStringFromObj(afterPtr->commandPtr,
+ tempCommand = Tcl_GetStringFromObj(afterPtr->commandPtr,
&tempLength);
if ((length == tempLength)
&& !memcmp(command, tempCommand, length)) {
diff --git a/generic/tclTomMath.decls b/generic/tclTomMath.decls
index a47f7ef..ea310e0 100644
--- a/generic/tclTomMath.decls
+++ b/generic/tclTomMath.decls
@@ -7,7 +7,7 @@
# If you edit this file, advance the revision number (and the epoch
# if the new stubs are not backward compatible) in tclTomMathDecls.h
#
-# Copyright (c) 2005 by Kevin B. Kenny. All rights reserved.
+# Copyright © 2005 Kevin B. Kenny. All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -216,6 +216,10 @@ declare 69 {
declare 70 {
void TclBN_mp_set_i64(mp_int *a, int64_t i)
}
+declare 71 {
+ mp_err MP_WUR TclBN_mp_unpack(mp_int *rop, size_t count, mp_order order, size_t size,
+ mp_endian endian, size_t nails, const void *op)
+}
# Added in libtommath 1.1.0
# No longer in use: replaced by mp_and()
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h
index 7a4fb9a..4e259c7 100644
--- a/generic/tclTomMathDecls.h
+++ b/generic/tclTomMathDecls.h
@@ -53,7 +53,11 @@
#define MP_FREE(mem, size) TclBNFree(mem)
#ifndef MODULE_SCOPE
-# define MODULE_SCOPE extern
+# ifdef __cplusplus
+# define MODULE_SCOPE extern "C"
+# else
+# define MODULE_SCOPE extern
+# endif
#endif
#ifdef __cplusplus
@@ -133,6 +137,7 @@ MODULE_SCOPE mp_err TclBN_mp_div_3(const mp_int *a, mp_int *q, mp_digit *r);
#define mp_to_radix TclBN_mp_to_radix
#define mp_to_ubin TclBN_mp_to_ubin
#define mp_ubin_size TclBN_mp_ubin_size
+#define mp_unpack TclBN_mp_unpack
#define mp_xor TclBN_mp_xor
#define mp_zero TclBN_mp_zero
#define s_mp_add TclBN_s_mp_add
@@ -313,7 +318,11 @@ EXTERN void TclBN_mp_set_u64(mp_int *a, uint64_t i);
EXTERN uint64_t TclBN_mp_get_mag_u64(const mp_int *a) MP_WUR;
/* 70 */
EXTERN void TclBN_mp_set_i64(mp_int *a, int64_t i);
-/* Slot 71 is reserved */
+/* 71 */
+EXTERN mp_err TclBN_mp_unpack(mp_int *rop, size_t count,
+ mp_order order, size_t size,
+ mp_endian endian, size_t nails,
+ const void *op) MP_WUR;
/* Slot 72 is reserved */
/* Slot 73 is reserved */
/* Slot 74 is reserved */
@@ -405,7 +414,7 @@ typedef struct TclTomMathStubs {
void (*tclBN_mp_set_u64) (mp_int *a, uint64_t i); /* 68 */
uint64_t (*tclBN_mp_get_mag_u64) (const mp_int *a) MP_WUR; /* 69 */
void (*tclBN_mp_set_i64) (mp_int *a, int64_t i); /* 70 */
- void (*reserved71)(void);
+ mp_err (*tclBN_mp_unpack) (mp_int *rop, size_t count, mp_order order, size_t size, mp_endian endian, size_t nails, const void *op) MP_WUR; /* 71 */
void (*reserved72)(void);
void (*reserved73)(void);
void (*reserved74)(void);
@@ -550,7 +559,8 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
(tclTomMathStubsPtr->tclBN_mp_get_mag_u64) /* 69 */
#define TclBN_mp_set_i64 \
(tclTomMathStubsPtr->tclBN_mp_set_i64) /* 70 */
-/* Slot 71 is reserved */
+#define TclBN_mp_unpack \
+ (tclTomMathStubsPtr->tclBN_mp_unpack) /* 71 */
/* Slot 72 is reserved */
/* Slot 73 is reserved */
/* Slot 74 is reserved */
diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c
index 60ed123..149ee34 100644
--- a/generic/tclTomMathInterface.c
+++ b/generic/tclTomMathInterface.c
@@ -6,7 +6,7 @@
* This file contains procedures that are used as a 'glue' layer between
* Tcl and libtommath.
*
- * Copyright (c) 2005 by Kevin B. Kenny. All rights reserved.
+ * Copyright © 2005 Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclTomMathStubLib.c b/generic/tclTomMathStubLib.c
index 7bebe12..c0786c9 100644
--- a/generic/tclTomMathStubLib.c
+++ b/generic/tclTomMathStubLib.c
@@ -4,8 +4,8 @@
* Stub object that will be statically linked into extensions that want
* to access Tcl.
*
- * Copyright (c) 1998-1999 by Scriptics Corporation.
- * Copyright (c) 1998 Paul Duffin.
+ * Copyright © 1998-1999 Scriptics Corporation.
+ * Copyright © 1998 Paul Duffin.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 10935c9..39ead67 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -3,10 +3,10 @@
*
* This file contains code to handle most trace management.
*
- * Copyright (c) 1987-1993 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 Scriptics Corporation.
- * Copyright (c) 2002 ActiveState Corporation.
+ * Copyright © 1987-1993 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 1998-2000 Scriptics Corporation.
+ * Copyright © 2002 ActiveState Corporation.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -279,7 +279,7 @@ Tcl_TraceObjCmd(
TclNewObj(opsList);
Tcl_IncrRefCount(opsList);
- flagOps = TclGetStringFromObj(objv[3], &numFlags);
+ flagOps = Tcl_GetStringFromObj(objv[3], &numFlags);
if (numFlags == 0) {
Tcl_DecrRefCount(opsList);
goto badVarOps;
@@ -465,7 +465,7 @@ TraceExecutionObjCmd(
break;
}
}
- command = TclGetStringFromObj(objv[5], &commandLength);
+ command = Tcl_GetStringFromObj(objv[5], &commandLength);
length = commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)Tcl_Alloc(
@@ -702,7 +702,7 @@ TraceCommandObjCmd(
}
}
- command = TclGetStringFromObj(objv[5], &commandLength);
+ command = Tcl_GetStringFromObj(objv[5], &commandLength);
length = commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)Tcl_Alloc(
@@ -905,7 +905,7 @@ TraceVariableObjCmd(
break;
}
}
- command = TclGetStringFromObj(objv[5], &commandLength);
+ command = Tcl_GetStringFromObj(objv[5], &commandLength);
length = commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
CombinedTraceVarInfo *ctvarPtr = (CombinedTraceVarInfo *)Tcl_Alloc(
diff --git a/generic/tclUniData.c b/generic/tclUniData.c
index ad47dda..f6e0c6b 100644
--- a/generic/tclUniData.c
+++ b/generic/tclUniData.c
@@ -5,7 +5,7 @@
* automatically generated by the tools/uniParse.tcl script. Do not
* modify this file by hand.
*
- * Copyright (c) 1998 by Scriptics Corporation.
+ * Copyright © 1998 Scriptics Corporation.
* All rights reserved.
*/
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index ae87e1b..fde30c5 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -3,7 +3,7 @@
*
* Routines for manipulating UTF-8 strings.
*
- * Copyright (c) 1997-1998 Sun Microsystems, Inc.
+ * Copyright © 1997-1998 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -2636,12 +2636,25 @@ TclUniCharToUCS4(
* by the Tcl_UniChar string. */
{
if (((src[0] & 0xFC00) == 0xD800) && ((src[1] & 0xFC00) == 0xDC00)) {
- *ucs4Ptr = (((src[0] & 0x3FF) << 10) | (src[01] & 0x3FF)) + 0x10000;
+ *ucs4Ptr = (((src[0] & 0x3FF) << 10) | (src[1] & 0x3FF)) + 0x10000;
return 2;
}
*ucs4Ptr = src[0];
return 1;
}
+
+const Tcl_UniChar *TclUCS4Prev(const Tcl_UniChar *src, const Tcl_UniChar *ptr) {
+ if (src <= ptr + 1) {
+ return ptr;
+ }
+ if (((src[-1] & 0xFC00) == 0xDC00) && ((src[-2] & 0xFC00) == 0xD800)) {
+ return src - 2;
+ }
+ return src - 1;
+}
+
+
+
#endif
/*
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index ac1cd35..55b12ac 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -4,9 +4,9 @@
* This file contains utility functions that are used by many Tcl
* commands.
*
- * Copyright (c) 1987-1993 The Regents of the University of California.
- * Copyright (c) 1994-1998 Sun Microsystems, Inc.
- * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
+ * Copyright © 1987-1993 The Regents of the University of California.
+ * Copyright © 1994-1998 Sun Microsystems, Inc.
+ * Copyright © 2001 Kevin B. Kenny. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1653,9 +1653,13 @@ TclTrimRight(
do {
const char *q = trim;
- size_t pInc = 0, bytesLeft = numTrim;
+ size_t pInc = 0, bytesLeft = numTrim;
pp = TclUtfPrev(p, bytes);
+#if TCL_UTF_MAX < 4 /* Needed because TclUtfPrev() cannot always jump back */
+ /* sufficiently. See [d43f96c1a8] */
+ pp = TclUtfPrev(pp, bytes);
+#endif
do {
pp += pInc;
pInc = TclUtfToUCS4(pp, &ch1);
@@ -1666,14 +1670,14 @@ TclTrimRight(
*/
do {
- size_t qInc = TclUtfToUCS4(q, &ch2);
+ pInc = TclUtfToUCS4(q, &ch2);
if (ch1 == ch2) {
break;
}
- q += qInc;
- bytesLeft -= qInc;
+ q += pInc;
+ bytesLeft -= pInc;
} while (bytesLeft);
if (bytesLeft == 0) {
@@ -1719,7 +1723,7 @@ TclTrimLeft(
* rely on (trim[numTrim] == '\0'). */
{
const char *p = bytes;
- int ch1, ch2;
+ int ch1, ch2;
/* Empty strings -> nothing to do */
if ((numBytes == 0) || (numTrim == 0)) {
@@ -1956,7 +1960,7 @@ Tcl_ConcatObj(
if (TclListObjIsCanonical(objPtr)) {
continue;
}
- (void)TclGetStringFromObj(objPtr, &length);
+ (void)Tcl_GetStringFromObj(objPtr, &length);
if (length > 0) {
break;
}
@@ -1993,7 +1997,7 @@ Tcl_ConcatObj(
*/
for (i = 0; i < objc; i++) {
- element = TclGetStringFromObj(objv[i], &elemLength);
+ element = Tcl_GetStringFromObj(objv[i], &elemLength);
bytesNeeded += elemLength;
}
@@ -2010,7 +2014,7 @@ Tcl_ConcatObj(
for (i = 0; i < objc; i++) {
size_t triml, trimr;
- element = TclGetStringFromObj(objv[i], &elemLength);
+ element = Tcl_GetStringFromObj(objv[i], &elemLength);
/* Trim away the leading/trailing whitespace. */
triml = TclTrim(element, elemLength, CONCAT_TRIM_SET,
@@ -2493,15 +2497,15 @@ TclStringMatchObj(
if (TclHasIntRep(strObj, &tclStringType) || (strObj->typePtr == NULL)) {
Tcl_UniChar *udata, *uptn;
- udata = TclGetUnicodeFromObj(strObj, &length);
- uptn = TclGetUnicodeFromObj(ptnObj, &plen);
+ udata = Tcl_GetUnicodeFromObj(strObj, &length);
+ uptn = Tcl_GetUnicodeFromObj(ptnObj, &plen);
match = TclUniCharMatch(udata, length, uptn, plen, flags);
} else if (TclIsPureByteArray(strObj) && TclIsPureByteArray(ptnObj)
&& !flags) {
unsigned char *data, *ptn;
- data = TclGetByteArrayFromObj(strObj, &length);
- ptn = TclGetByteArrayFromObj(ptnObj, &plen);
+ data = Tcl_GetByteArrayFromObj(strObj, &length);
+ ptn = Tcl_GetByteArrayFromObj(ptnObj, &plen);
match = TclByteArrayMatch(data, length, ptn, plen, 0);
} else {
match = Tcl_StringCaseMatch(TclGetString(strObj),
@@ -2629,7 +2633,7 @@ TclDStringAppendObj(
Tcl_Obj *objPtr)
{
size_t length;
- const char *bytes = TclGetStringFromObj(objPtr, &length);
+ const char *bytes = Tcl_GetStringFromObj(objPtr, &length);
return Tcl_DStringAppend(dsPtr, bytes, length);
}
@@ -3452,7 +3456,7 @@ GetEndOffsetFromObj(
while ((irPtr = TclFetchIntRep(objPtr, &endOffsetType)) == NULL) {
Tcl_ObjIntRep ir;
size_t length;
- const char *bytes = TclGetStringFromObj(objPtr, &length);
+ const char *bytes = Tcl_GetStringFromObj(objPtr, &length);
if (*bytes != 'e') {
int numType;
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 3de3a89..b3aee51 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -7,11 +7,11 @@
* The implementation of arrays is modelled after an initial
* implementation by Mark Diekhans and Karl Lehenbauer.
*
- * Copyright (c) 1987-1994 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
- * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
- * Copyright (c) 2007 Miguel Sofer
+ * Copyright © 1987-1994 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 1998-1999 Scriptics Corporation.
+ * Copyright © 2001 Kevin B. Kenny. All rights reserved.
+ * Copyright © 2007 Miguel Sofer
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -665,7 +665,7 @@ TclObjLookupVarEx(
*/
size_t len;
- const char *part1 = TclGetStringFromObj(part1Ptr, &len);
+ const char *part1 = Tcl_GetStringFromObj(part1Ptr, &len);
if ((len > 1) && (part1[len - 1] == ')')) {
const char *part2 = strchr(part1, '(');
@@ -848,7 +848,7 @@ TclLookupSimpleVar(
ResolverScheme *resPtr;
int isNew, i, result;
size_t varLen;
- const char *varName = TclGetStringFromObj(varNamePtr, &varLen);
+ const char *varName = Tcl_GetStringFromObj(varNamePtr, &varLen);
varPtr = NULL;
varNsPtr = NULL; /* Set non-NULL if a nonlocal variable. */
@@ -983,7 +983,7 @@ TclLookupSimpleVar(
Tcl_Obj *objPtr = *objPtrPtr;
if (objPtr) {
- localNameStr = TclGetStringFromObj(objPtr, &localLen);
+ localNameStr = Tcl_GetStringFromObj(objPtr, &localLen);
if ((varLen == localLen) && (varName[0] == localNameStr[0])
&& !memcmp(varName, localNameStr, varLen)) {
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 5495537..b7f6fda 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -4,8 +4,8 @@
* Implementation of the ZIP filesystem used in TIP 430
* Adapted from the implentation for AndroWish.
*
- * Copyright (c) 2016-2017 Sean Woods <yoda@etoyoc.com>
- * Copyright (c) 2013-2015 Christian Werner <chw@ch-werner.de>
+ * Copyright © 2016-2017 Sean Woods <yoda@etoyoc.com>
+ * Copyright © 2013-2015 Christian Werner <chw@ch-werner.de>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -38,8 +38,6 @@
#include "zutil.h"
#include "crc32.h"
-#ifdef CFG_RUNTIME_DLLFILE
-
/*
** We are compiling as part of the core.
** TIP430 style zipfs prefix
@@ -50,22 +48,6 @@
#define ZIPFS_APP_MOUNT "//zipfs:/app"
#define ZIPFS_ZIP_MOUNT "//zipfs:/lib/tcl"
-#else /* !CFG_RUNTIME_DLLFILE */
-
-/*
-** We are compiling from the /compat folder of tclconfig
-** Pre TIP430 style zipfs prefix
-** //zipfs:/ doesn't work straight out of the box on either windows or Unix
-** without other changes made to tip 430
-*/
-
-#define ZIPFS_VOLUME "zipfs:/"
-#define ZIPFS_VOLUME_LEN 7
-#define ZIPFS_APP_MOUNT "zipfs:/app"
-#define ZIPFS_ZIP_MOUNT "zipfs:/lib/tcl"
-
-#endif /* CFG_RUNTIME_DLLFILE */
-
/*
* Various constants and offsets found in ZIP archive files
*/
@@ -228,7 +210,7 @@ typedef struct ZipFile {
typedef struct ZipEntry {
char *name; /* The full pathname of the virtual file */
ZipFile *zipFilePtr; /* The ZIP file holding this virtual file */
- Tcl_WideInt offset; /* Data offset into memory mapped ZIP file */
+ size_t offset; /* Data offset into memory mapped ZIP file */
int numBytes; /* Uncompressed size of the virtual file */
int numCompressedBytes; /* Compressed size of the virtual file */
int compressMethod; /* Compress method */
@@ -303,7 +285,9 @@ static const char *zipfs_literal_tcl_library = NULL;
static inline int DescribeMounted(Tcl_Interp *interp,
const char *mountPoint);
static inline int ListMountPoints(Tcl_Interp *interp);
+#if !defined(STATIC_BUILD)
static int ZipfsAppHookFindTclInit(const char *archive);
+#endif
static int ZipFSPathInFilesystemProc(Tcl_Obj *pathPtr,
void **clientDataPtr);
static Tcl_Obj * ZipFSFilesystemPathTypeProc(Tcl_Obj *pathPtr);
@@ -332,7 +316,7 @@ static int ZipChannelClose(void *instanceData,
static Tcl_DriverGetHandleProc ZipChannelGetFile;
static int ZipChannelRead(void *instanceData, char *buf,
int toRead, int *errloc);
-static Tcl_WideInt ZipChannelWideSeek(void *instanceData, Tcl_WideInt offset,
+static long long ZipChannelWideSeek(void *instanceData, long long offset,
int mode, int *errloc);
static void ZipChannelWatchChannel(void *instanceData,
int mask);
@@ -2044,7 +2028,7 @@ ZipAddFile(
const char *zpath;
int crc, flush, zpathlen;
size_t nbyte, nbytecompr, len, olen, align = 0;
- Tcl_WideInt pos[3];
+ long long pos[3];
int mtime = 0, isNew, compMeth;
unsigned long keys[3], keys0[3];
char obuf[4096];
@@ -2398,7 +2382,7 @@ ZipFSMkZipOrImgObjCmd(
Tcl_Channel out;
int pwlen = 0, count, ret = TCL_ERROR, lobjc;
size_t len, slen = 0, i = 0;
- Tcl_WideInt pos[3];
+ long long pos[3];
Tcl_Obj **lobjv, *list = NULL;
ZipEntry *z;
Tcl_HashEntry *hPtr;
@@ -3035,7 +3019,7 @@ ZipFSListObjCmd(
}
if (objc == 3) {
size_t n;
- char *what = TclGetStringFromObj(objv[1], &n);
+ char *what = Tcl_GetStringFromObj(objv[1], &n);
if ((n >= 2) && (strncmp(what, "-glob", n) == 0)) {
pattern = TclGetString(objv[2]);
@@ -3115,7 +3099,7 @@ TclZipfs_TclLibrary(void)
{
Tcl_Obj *vfsInitScript;
int found;
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(STATIC_BUILD)
HMODULE hModule;
WCHAR wName[MAX_PATH + LIBRARY_SIZE];
char dllName[(MAX_PATH + LIBRARY_SIZE) * 3];
@@ -3149,6 +3133,7 @@ TclZipfs_TclLibrary(void)
* that we must mount the zip file and dll before releasing to search.
*/
+#if !defined(STATIC_BUILD)
#if defined(_WIN32)
hModule = (HMODULE)TclWinGetTclInstance();
GetModuleFileNameW(hModule, wName, MAX_PATH);
@@ -3157,30 +3142,18 @@ TclZipfs_TclLibrary(void)
if (ZipfsAppHookFindTclInit(dllName) == TCL_OK) {
return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
}
-#elif /* !_WIN32 && */ defined(CFG_RUNTIME_DLLFILE)
- if (ZipfsAppHookFindTclInit(
- CFG_RUNTIME_LIBDIR "/" CFG_RUNTIME_DLLFILE) == TCL_OK) {
- return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
- }
-#endif /* _WIN32 || CFG_RUNTIME_DLLFILE */
-
- /*
- * If we're configured to know about a ZIP archive we should use, do that.
- */
-
-#ifdef CFG_RUNTIME_ZIPFILE
- if (ZipfsAppHookFindTclInit(
- CFG_RUNTIME_LIBDIR "/" CFG_RUNTIME_ZIPFILE) == TCL_OK) {
- return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
- }
+#else
if (ZipfsAppHookFindTclInit(
- CFG_RUNTIME_SCRDIR "/" CFG_RUNTIME_ZIPFILE) == TCL_OK) {
- return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
- }
- if (ZipfsAppHookFindTclInit(CFG_RUNTIME_ZIPFILE) == TCL_OK) {
+#ifdef __CYGWIN__
+ CFG_RUNTIME_BINDIR
+#else
+ CFG_RUNTIME_LIBDIR
+#endif
+ "/" CFG_RUNTIME_DLLFILE) == TCL_OK) {
return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
}
-#endif /* CFG_RUNTIME_ZIPFILE */
+#endif /* _WIN32 */
+#endif /* !defined(STATIC_BUILD) */
/*
* If anything set the cache (but subsequently failed) go with that
@@ -3430,10 +3403,10 @@ ZipChannelWrite(
*-------------------------------------------------------------------------
*/
-static Tcl_WideInt
+static long long
ZipChannelWideSeek(
void *instanceData,
- Tcl_WideInt offset,
+ long long offset,
int mode,
int *errloc)
{
@@ -3884,7 +3857,7 @@ ZipChannelOpen(
}
wrapchan:
- sprintf(cname, "zipfs_%" TCL_LL_MODIFIER "x_%d", z->offset,
+ sprintf(cname, "zipfs_%" TCL_Z_MODIFIER "x_%d", z->offset,
ZipFS.idCount++);
z->zipFilePtr->numOpen++;
Unlock();
@@ -4130,13 +4103,13 @@ ZipFSMatchInDirectoryProc(
* The prefix that gets prepended to results.
*/
- prefix = TclGetStringFromObj(pathPtr, &prefixLen);
+ prefix = Tcl_GetStringFromObj(pathPtr, &prefixLen);
/*
* The (normalized) path we're searching.
*/
- path = TclGetStringFromObj(normPathPtr, &len);
+ path = Tcl_GetStringFromObj(normPathPtr, &len);
Tcl_DStringInit(&dsPref);
Tcl_DStringAppend(&dsPref, prefix, prefixLen);
@@ -4308,7 +4281,7 @@ ZipFSPathInFilesystemProc(
return -1;
}
- path = TclGetStringFromObj(pathPtr, &len);
+ path = Tcl_GetStringFromObj(pathPtr, &len);
if (strncmp(path, ZIPFS_VOLUME, ZIPFS_VOLUME_LEN) != 0) {
return -1;
}
@@ -4737,7 +4710,7 @@ TclZipfs_Init(
Tcl_NewStringObj("::tcl::zipfs::find", -1));
Tcl_CreateObjCommand(interp, "::tcl::zipfs::tcl_library_init",
ZipFSTclLibraryObjCmd, NULL, NULL);
- Tcl_PkgProvideEx(interp, "zipfs", "2.0", NULL);
+ Tcl_PkgProvideEx(interp, "tcl::zipfs", "2.0", NULL);
}
return TCL_OK;
#else /* !HAVE_ZLIB */
@@ -4747,6 +4720,7 @@ TclZipfs_Init(
#endif /* HAVE_ZLIB */
}
+#if !defined(STATIC_BUILD)
static int
ZipfsAppHookFindTclInit(
const char *archive)
@@ -4783,6 +4757,7 @@ ZipfsAppHookFindTclInit(
return TCL_ERROR;
}
+#endif
static void
ZipfsExitHandler(
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 154325a..da45b2e 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -3,9 +3,9 @@
*
* This file provides the interface to the Zlib library.
*
- * Copyright (C) 2004-2005 Pascal Scheffers <pascal@scheffers.net>
- * Copyright (C) 2005 Unitas Software B.V.
- * Copyright (c) 2008-2012 Donal K. Fellows
+ * Copyright © 2004-2005 Pascal Scheffers <pascal@scheffers.net>
+ * Copyright © 2005 Unitas Software B.V.
+ * Copyright © 2008-2012 Donal K. Fellows
*
* Parts written by Jean-Claude Wippler, as part of Tclkit, placed in the
* public domain March 2003.
@@ -443,7 +443,7 @@ GenerateHeader(
if (GetValue(interp, dictObj, "comment", &value) != TCL_OK) {
goto error;
} else if (value != NULL) {
- valueStr = TclGetStringFromObj(value, &length);
+ valueStr = Tcl_GetStringFromObj(value, &length);
Tcl_UtfToExternal(NULL, latin1enc, valueStr, length, 0, NULL,
headerPtr->nativeCommentBuf, MAX_COMMENT_LEN-1, NULL, &len,
NULL);
@@ -464,7 +464,7 @@ GenerateHeader(
if (GetValue(interp, dictObj, "filename", &value) != TCL_OK) {
goto error;
} else if (value != NULL) {
- valueStr = TclGetStringFromObj(value, &length);
+ valueStr = Tcl_GetStringFromObj(value, &length);
Tcl_UtfToExternal(NULL, latin1enc, valueStr, length, 0, NULL,
headerPtr->nativeFilenameBuf, MAXPATHLEN-1, NULL, &len, NULL);
headerPtr->nativeFilenameBuf[len] = '\0';
@@ -595,7 +595,7 @@ SetInflateDictionary(
{
if (compDictObj != NULL) {
size_t length = 0;
- unsigned char *bytes = TclGetByteArrayFromObj(compDictObj, &length);
+ unsigned char *bytes = Tcl_GetByteArrayFromObj(compDictObj, &length);
return inflateSetDictionary(strm, bytes, length);
}
@@ -609,7 +609,7 @@ SetDeflateDictionary(
{
if (compDictObj != NULL) {
size_t length = 0;
- unsigned char *bytes = TclGetByteArrayFromObj(compDictObj, &length);
+ unsigned char *bytes = Tcl_GetByteArrayFromObj(compDictObj, &length);
return deflateSetDictionary(strm, bytes, length);
}
@@ -1386,7 +1386,7 @@ Tcl_ZlibStreamGet(
if (Tcl_IsShared(itemObj)) {
itemObj = Tcl_DuplicateObj(itemObj);
}
- itemPtr = TclGetByteArrayFromObj(itemObj, &itemLen);
+ itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen);
Tcl_IncrRefCount(itemObj);
zshPtr->currentInput = itemObj;
zshPtr->stream.next_in = itemPtr;
@@ -1458,7 +1458,7 @@ Tcl_ZlibStreamGet(
if (Tcl_IsShared(itemObj)) {
itemObj = Tcl_DuplicateObj(itemObj);
}
- itemPtr = TclGetByteArrayFromObj(itemObj, &itemLen);
+ itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen);
Tcl_IncrRefCount(itemObj);
zshPtr->currentInput = itemObj;
zshPtr->stream.next_in = itemPtr;
@@ -1507,7 +1507,7 @@ Tcl_ZlibStreamGet(
count = 0;
for (i=0; i<listLen; i++) {
Tcl_ListObjIndex(NULL, zshPtr->outData, i, &itemObj);
- (void) TclGetByteArrayFromObj(itemObj, &itemLen);
+ (void) Tcl_GetByteArrayFromObj(itemObj, &itemLen);
if (i == 0) {
count += itemLen - zshPtr->outPos;
} else {
@@ -1532,7 +1532,7 @@ Tcl_ZlibStreamGet(
*/
Tcl_ListObjIndex(NULL, zshPtr->outData, 0, &itemObj);
- itemPtr = TclGetByteArrayFromObj(itemObj, &itemLen);
+ itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen);
if (itemLen-zshPtr->outPos + dataPos >= count) {
size_t len = count - dataPos;
@@ -3481,7 +3481,7 @@ ZlibTransformGetOption(
} else {
if (cd->compDictObj) {
size_t length;
- const char *str = TclGetStringFromObj(cd->compDictObj, &length);
+ const char *str = Tcl_GetStringFromObj(cd->compDictObj, &length);
Tcl_DStringAppend(dsPtr, str, length);
}
@@ -3721,7 +3721,7 @@ ZlibStackChannelTransform(
if (compDictObj != NULL) {
cd->compDictObj = Tcl_DuplicateObj(compDictObj);
Tcl_IncrRefCount(cd->compDictObj);
- Tcl_GetByteArrayFromObj(cd->compDictObj, NULL);
+ TclGetByteArrayFromObj(cd->compDictObj, NULL);
}
if (format == TCL_ZLIB_FORMAT_RAW) {
@@ -3969,7 +3969,10 @@ TclZlibInit(
* Formally provide the package as a Tcl built-in.
*/
- return Tcl_PkgProvideEx(interp, "zlib", TCL_ZLIB_VERSION, NULL);
+#ifndef TCL_NO_DEPRECATED
+ Tcl_PkgProvideEx(interp, "zlib", TCL_ZLIB_VERSION, NULL);
+#endif
+ return Tcl_PkgProvideEx(interp, "tcl::zlib", TCL_ZLIB_VERSION, NULL);
}
/*
diff --git a/library/auto.tcl b/library/auto.tcl
index 41ef1a0..dc37328 100644
--- a/library/auto.tcl
+++ b/library/auto.tcl
@@ -3,8 +3,8 @@
# utility procs formerly in init.tcl dealing with auto execution of commands
# and can be auto loaded themselves.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1998 Sun Microsystems, Inc.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1998 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -70,60 +70,70 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
# gives the end-user ultimate control to work-around any bugs, or
# to customize.
- if {[info exists env($enVarName)]} {
- lappend dirs $env($enVarName)
- }
+ if {[info exists env($enVarName)]} {
+ lappend dirs $env($enVarName)
+ }
catch {
- set found 0
+ set found 0
set root [zipfs root]
- set mountpoint [file join $root lib [string tolower $basename]]
- lappend dirs [file join $root app ${basename}_library]
- lappend dirs [file join $root lib $mountpoint ${basename}_library]
- lappend dirs [file join $root lib $mountpoint]
+ set mountpoint [file join $root lib $basename]
+ lappend dirs [file join $root app ${basename}_library]
+ lappend dirs [file join $root lib $mountpoint ${basename}_library]
+ lappend dirs [file join $root lib $mountpoint]
if {![zipfs exists [file join $root app ${basename}_library]] \
- && ![zipfs exists $mountpoint]} {
- set found 0
- foreach pkgdat [info loaded] {
- lassign $pkgdat dllfile dllpkg
- if {[string tolower $dllpkg] ne [string tolower $basename]} continue
- if {$dllfile eq {}} {
- # Loaded statically
- break
- }
- set found 1
- zipfs mount $mountpoint $dllfile
- break
- }
- if {!$found} {
- set paths {}
- lappend paths [file join $root app]
- lappend paths [::${basename}::pkgconfig get libdir,runtime]
- lappend paths [::${basename}::pkgconfig get bindir,runtime]
- if {[catch {::${basename}::pkgconfig get zipfile,runtime} zipfile]} {
- set zipfile [string tolower \
- "lib${basename}_[join [list {*}[split $version .] {*}$patch] _].zip"]
- }
- lappend paths [file dirname [file join [pwd] [info nameofexecutable]]]
- foreach path $paths {
- set archive [file join $path $zipfile]
- if {![file exists $archive]} continue
- zipfs mount $mountpoint $archive
- if {[zipfs exists [file join $mountpoint ${basename}_library $initScript]]} {
- lappend dirs [file join $mountpoint ${basename}_library]
- set found 1
- break
- } elseif {[zipfs exists [file join $mountpoint $initScript]]} {
- lappend dirs [file join $mountpoint $initScript]
- set found 1
- break
- } else {
- catch {zipfs unmount $archive}
- }
- }
- }
- }
- }
+ && ![zipfs exists $mountpoint]} {
+ set found 0
+ foreach pkgdat [info loaded] {
+ lassign $pkgdat dllfile dllpkg
+ if {$dllpkg ne $basename} continue
+ if {$dllfile eq {}} {
+ # Loaded statically
+ break
+ }
+ set found 1
+ zipfs mount $mountpoint $dllfile
+ break
+ }
+ if {!$found} {
+ set paths {}
+ if {![catch {::${basename}::pkgconfig get libdir,runtime} dir]} {
+ lappend paths $dir
+ } else {
+ catch {lappend paths [::tcl::pkgconfig get libdir,runtime]}
+ }
+ if {![catch {::${basename}::pkgconfig get bindir,runtime} dir]} {
+ lappend paths $dir
+ } else {
+ catch {lappend paths [::tcl::pkgconfig get bindir,runtime]}
+ }
+ if {[catch {::${basename}::pkgconfig get dllfile,runtime} dllfile]} {
+ set dllfile "lib${basename}${version}[info sharedlibextension]"
+ }
+ set dir [file dirname [file join [pwd] [info nameofexecutable]]]
+ lappend paths $dir
+ lappend paths [file join [file dirname $dir] lib]
+ foreach path $paths {
+ set archive [file join $path $dllfile]
+ if {![file exists $archive]} {
+ continue
+ }
+ zipfs mount $mountpoint $archive
+ if {[zipfs exists [file join $mountpoint ${basename}_library $initScript]]} {
+ lappend dirs [file join $mountpoint ${basename}_library]
+ set found 1
+ break
+ } elseif {[zipfs exists [file join $mountpoint $initScript]]} {
+ lappend dirs [file join $mountpoint $initScript]
+ set found 1
+ break
+ } else {
+ catch {zipfs unmount $archive}
+ }
+ }
+ }
+ }
+ }
# 2. In the package script directory registered within the
# configuration of the package itself.
@@ -158,11 +168,11 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
# ../../../foo1.0.1/library
# (From unix/arch directory in parallel build hierarchy)
- set parentDir [file dirname [file dirname [info nameofexecutable]]]
- set grandParentDir [file dirname $parentDir]
- lappend dirs [file join $parentDir lib $basename$version]
- lappend dirs [file join $grandParentDir lib $basename$version]
- lappend dirs [file join $parentDir library]
+ set parentDir [file dirname [file dirname [info nameofexecutable]]]
+ set grandParentDir [file dirname $parentDir]
+ lappend dirs [file join $parentDir lib $basename$version]
+ lappend dirs [file join $grandParentDir lib $basename$version]
+ lappend dirs [file join $parentDir library]
if {0} {
lappend dirs [file join $grandParentDir library]
lappend dirs [file join $grandParentDir $basename$patch library]
@@ -185,19 +195,19 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
}
set seen($norm) {}
- set the_library $i
- set file [file join $i $initScript]
+ set the_library $i
+ set file [file join $i $initScript]
# source everything when in a safe interpreter because we have a
# source command, but no file exists command
- if {[interp issafe] || [file exists $file]} {
- if {![catch {uplevel #0 [list source $file]} msg opts]} {
- return
- }
+ if {[interp issafe] || [file exists $file]} {
+ if {![catch {uplevel #0 [list source $file]} msg opts]} {
+ return
+ }
append errors "$file: $msg\n"
append errors [dict get $opts -errorinfo]\n
- }
+ }
}
unset -nocomplain the_library
set msg "Can't find a usable $initScript in the following directories: \n"
@@ -236,7 +246,7 @@ if {[interp issafe]} {
proc auto_mkindex {dir args} {
if {[interp issafe]} {
- error "can't generate index within safe interpreter"
+ error "can't generate index within safe interpreter"
}
set oldDir [pwd]
@@ -292,7 +302,7 @@ proc auto_mkindex_old {dir args} {
set f ""
set error [catch {
set f [open $file]
- fconfigure $f -encoding utf-8 -eofchar \032
+ fconfigure $f -encoding utf-8 -eofchar "\032 {}"
while {[gets $f line] >= 0} {
if {[regexp {^proc[ ]+([^ ]*)} $line match procName]} {
set procName [lindex [auto_qualify $procName "::"] 0]
@@ -404,7 +414,7 @@ proc auto_mkindex_parser::mkindex {file} {
set scriptFile $file
set fid [open $file]
- fconfigure $fid -encoding utf-8 -eofchar \032
+ fconfigure $fid -encoding utf-8 -eofchar "\032 {}"
set contents [read $fid]
close $fid
@@ -424,7 +434,7 @@ proc auto_mkindex_parser::mkindex {file} {
$parser eval $contents
foreach name $imports {
- catch {$parser eval [list _%@namespace forget $name]}
+ catch {$parser eval [list _%@namespace forget $name]}
}
return $index
}
@@ -494,9 +504,9 @@ proc auto_mkindex_parser::commandInit {name arglist body} {
set ns [namespace qualifiers $name]
set tail [namespace tail $name]
if {$ns eq ""} {
- set fakeName [namespace current]::_%@fake_$tail
+ set fakeName [namespace current]::_%@fake_$tail
} else {
- set fakeName [namespace current]::[string map {:: _} _%@fake_$name]
+ set fakeName [namespace current]::[string map {:: _} _%@fake_$name]
}
proc $fakeName $arglist $body
@@ -505,8 +515,8 @@ proc auto_mkindex_parser::commandInit {name arglist body} {
# the fully qualified names, and have the procs point to the aliases.
if {[string match *::* $name]} {
- set exportCmd [list _%@namespace export [namespace tail $name]]
- $parser eval [list _%@namespace eval $ns $exportCmd]
+ set exportCmd [list _%@namespace export [namespace tail $name]]
+ $parser eval [list _%@namespace eval $ns $exportCmd]
# The following proc definition does not work if you want to tolerate
# space or something else diabolical in the procedure name, (i.e.,
@@ -518,11 +528,11 @@ proc auto_mkindex_parser::commandInit {name arglist body} {
# A gold star to someone that can make test autoMkindex-3.3 work
# properly
- set alias [namespace tail $fakeName]
- $parser invokehidden proc $name {args} "_%@eval {$alias} \$args"
- $parser alias $alias $fakeName
+ set alias [namespace tail $fakeName]
+ $parser invokehidden proc $name {args} "_%@eval {$alias} \$args"
+ $parser alias $alias $fakeName
} else {
- $parser alias $name $fakeName
+ $parser alias $name $fakeName
}
return
}
@@ -544,18 +554,18 @@ proc auto_mkindex_parser::fullname {name} {
variable contextStack
if {![string match ::* $name]} {
- foreach ns $contextStack {
- set name "${ns}::$name"
- if {[string match ::* $name]} {
- break
- }
- }
+ foreach ns $contextStack {
+ set name "${ns}::$name"
+ if {[string match ::* $name]} {
+ break
+ }
+ }
}
if {[namespace qualifiers $name] eq ""} {
- set name [namespace tail $name]
+ set name [namespace tail $name]
} elseif {![string match ::* $name]} {
- set name "::$name"
+ set name "::$name"
}
# Earlier, mkindex replaced all $'s with \0. Now, we have to reverse that
@@ -645,27 +655,27 @@ auto_mkindex_parser::hook {
auto_mkindex_parser::command namespace {op args} {
switch -- $op {
- eval {
- variable parser
- variable contextStack
+ eval {
+ variable parser
+ variable contextStack
- set name [lindex $args 0]
- set args [lrange $args 1 end]
+ set name [lindex $args 0]
+ set args [lrange $args 1 end]
- set contextStack [linsert $contextStack 0 $name]
+ set contextStack [linsert $contextStack 0 $name]
$parser eval [list _%@namespace eval $name] $args
- set contextStack [lrange $contextStack 1 end]
- }
- import {
- variable parser
- variable imports
- foreach pattern $args {
- if {$pattern ne "-force"} {
- lappend imports $pattern
- }
- }
- catch {$parser eval "_%@namespace import $args"}
- }
+ set contextStack [lrange $contextStack 1 end]
+ }
+ import {
+ variable parser
+ variable imports
+ foreach pattern $args {
+ if {$pattern ne "-force"} {
+ lappend imports $pattern
+ }
+ }
+ catch {$parser eval "_%@namespace import $args"}
+ }
ensemble {
variable parser
variable contextStack
diff --git a/library/clock.tcl b/library/clock.tcl
index 54919f2..150ae3c 100644
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -9,7 +9,7 @@
#
#----------------------------------------------------------------------
#
-# Copyright (c) 2004,2005,2006,2007 by Kevin B. Kenny
+# Copyright © 2004-2007 Kevin B. Kenny
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
diff --git a/library/cookiejar/cookiejar.tcl b/library/cookiejar/cookiejar.tcl
index 6e0d6c6..e99e1c9 100644
--- a/library/cookiejar/cookiejar.tcl
+++ b/library/cookiejar/cookiejar.tcl
@@ -132,7 +132,7 @@ package provide cookiejar \
# The implementation of the cookiejar package
::oo::define ::http::cookiejar {
self {
- method configure {{optionName "\u0000\u0000"} {optionValue "\u0000\u0000"}} {
+ method configure {{optionName "\x00\x00"} {optionValue "\x00\x00"}} {
set tbl {
-domainfile {domainfile set}
-domainlist {domainlist set}
@@ -149,14 +149,14 @@ package provide cookiejar \
dict lappend tbl -purgeold [namespace code {
my IntervalTrigger PostponePurge
}]
- if {$optionName eq "\u0000\u0000"} {
+ if {$optionName eq "\x00\x00"} {
return [dict keys $tbl]
}
set opt [::tcl::prefix match -message "option" \
[dict keys $tbl] $optionName]
set setter [lassign [dict get $tbl $opt] varname]
namespace upvar [namespace current] $varname var
- if {$optionValue ne "\u0000\u0000"} {
+ if {$optionValue ne "\x00\x00"} {
{*}$setter var $optionValue
}
return $var
diff --git a/library/cookiejar/idna.tcl b/library/cookiejar/idna.tcl
index afc7128..658dcd6 100644
--- a/library/cookiejar/idna.tcl
+++ b/library/cookiejar/idna.tcl
@@ -7,7 +7,7 @@
#
# This implementation includes code from that RFC, translated to Tcl; the
# other parts are:
-# Copyright (c) 2014 Donal K. Fellows
+# Copyright © 2014 Donal K. Fellows
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -27,9 +27,9 @@ namespace eval ::tcl::idna {
proc IDNAencode hostname {
set parts {}
# Split term from RFC 3490, Sec 3.1
- foreach part [split $hostname "\u002E\u3002\uFF0E\uFF61"] {
+ foreach part [split $hostname "\x2E\u3002\uFF0E\uFF61"] {
if {[regexp {[^-A-Za-z0-9]} $part]} {
- if {[regexp {[^-A-Za-z0-9\u00a1-\uffff]} $part ch]} {
+ if {[regexp {[^-A-Za-z0-9\xA1-\uFFFF]} $part ch]} {
scan $ch %c c
if {$ch < "!" || $ch > "~"} {
set ch [format "\\u%04x" $c]
@@ -51,7 +51,7 @@ namespace eval ::tcl::idna {
proc IDNAdecode hostname {
set parts {}
# Split term from RFC 3490, Sec 3.1
- foreach part [split $hostname "\u002E\u3002\uFF0E\uFF61"] {
+ foreach part [split $hostname "\x2E\u3002\uFF0E\uFF61"] {
if {[string match -nocase "xn--*" $part]} {
set part [punydecode [string range $part 4 end]]
}
@@ -116,7 +116,7 @@ namespace eval ::tcl::idna {
# Handle the basic code points:
foreach ch $string {
- if {$ch < "\u0080"} {
+ if {$ch < "\x80"} {
if {$case eq ""} {
append output $ch
} elseif {[string is true $case]} {
diff --git a/library/dde/pkgIndex.tcl b/library/dde/pkgIndex.tcl
index a87db33..5d1727d 100644
--- a/library/dde/pkgIndex.tcl
+++ b/library/dde/pkgIndex.tcl
@@ -1,3 +1,3 @@
if {![package vsatisfies [package provide Tcl] 8.5-]} return
if {[info sharedlibextension] != ".dll"} return
-package ifneeded dde 1.4.3 [list load [file join $dir tcldde14.dll] dde]
+package ifneeded dde 1.4.4 [list load [file join $dir tcldde14.dll] Dde]
diff --git a/library/history.tcl b/library/history.tcl
index ef9099b..4867021 100644
--- a/library/history.tcl
+++ b/library/history.tcl
@@ -2,7 +2,7 @@
#
# Implementation of the history command.
#
-# Copyright (c) 1997 Sun Microsystems, Inc.
+# Copyright © 1997 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/library/init.tcl b/library/init.tcl
index f73d9e2..dbfaaa7 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -3,11 +3,11 @@
# Default system startup file for Tcl-based applications. Defines
# "unknown" procedure and auto-load facilities.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 Scriptics Corporation.
-# Copyright (c) 2004 by Kevin B. Kenny.
-# Copyright (c) 2018 by Sean Woods
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
+# Copyright © 2004 Kevin B. Kenny.
+# Copyright © 2018 Sean Woods
#
# All rights reserved.
#
@@ -19,7 +19,7 @@
if {[info commands package] == ""} {
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
}
-package require -exact Tcl 9.0a2
+package require -exact tcl 9.0a2
# Compute the auto path to use in this interpreter.
# The values on the path come from several locations:
@@ -442,7 +442,7 @@ proc auto_load_index {} {
continue
} else {
set error [catch {
- fconfigure $f -eofchar \032
+ fconfigure $f -encoding utf-8 -eofchar "\032 {}"
set id [gets $f]
if {$id eq "# Tcl autoload index file, version 2.0"} {
eval [read $f]
diff --git a/library/install.tcl b/library/install.tcl
index 8d37d78..ce8e80b 100644
--- a/library/install.tcl
+++ b/library/install.tcl
@@ -35,7 +35,7 @@ proc ::practcl::_pkgindex_directory {path} {
# Read the file, and override assumptions as needed
###
set fin [open $file r]
- fconfigure $fin -encoding utf-8 -eofchar \032
+ fconfigure $fin -encoding utf-8 -eofchar "\032 {}"
set dat [read $fin]
close $fin
# Look for a teapot style Package statement
@@ -59,7 +59,7 @@ proc ::practcl::_pkgindex_directory {path} {
foreach file [glob -nocomplain $path/*.tcl] {
if { [file tail $file] == "version_info.tcl" } continue
set fin [open $file r]
- fconfigure $fin -encoding utf-8 -eofchar \032
+ fconfigure $fin -encoding utf-8 -eofchar "\032 {}"
set dat [read $fin]
close $fin
if {![regexp "package provide" $dat]} continue
@@ -79,7 +79,7 @@ proc ::practcl::_pkgindex_directory {path} {
return $buffer
}
set fin [open $pkgidxfile r]
- fconfigure $fin -encoding utf-8 -eofchar \032
+ fconfigure $fin -encoding utf-8 -eofchar "\032 {}"
set dat [read $fin]
close $fin
set trace 0
@@ -202,7 +202,7 @@ proc ::practcl::installDir {d1 d2} {
} elseif {[file isfile $f]} {
file copy -force $f [file join $d2 $ftail]
if {$::tcl_platform(platform) eq {unix}} {
- file attributes [file join $d2 $ftail] -permissions 0644
+ file attributes [file join $d2 $ftail] -permissions 0o644
} else {
file attributes [file join $d2 $ftail] -readonly 1
}
@@ -210,7 +210,7 @@ proc ::practcl::installDir {d1 d2} {
}
if {$::tcl_platform(platform) eq {unix}} {
- file attributes $d2 -permissions 0755
+ file attributes $d2 -permissions 0o755
} else {
file attributes $d2 -readonly 1
}
diff --git a/library/manifest.txt b/library/manifest.txt
index 51da565..08529da 100644
--- a/library/manifest.txt
+++ b/library/manifest.txt
@@ -10,9 +10,9 @@ apply {{dir} {
1 opt 0.4.8 {opt optparse.tcl}
0 cookiejar 0.2.0 {cookiejar cookiejar.tcl}
0 tcl::idna 1.0.1 {cookiejar idna.tcl}
- 0 platform 1.0.14 {platform platform.tcl}
+ 0 platform 1.0.17 {platform platform.tcl}
0 platform::shell 1.1.4 {platform shell.tcl}
- 1 tcltest 2.5.3 {tcltest tcltest.tcl}
+ 1 tcltest 2.5.4 {tcltest tcltest.tcl}
} {
if {$isafe && !$safe} continue
package ifneeded $package $version [list source [file join $dir {*}$file]]
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl
index b488b9c..12ab43f 100644
--- a/library/msgcat/msgcat.tcl
+++ b/library/msgcat/msgcat.tcl
@@ -4,9 +4,9 @@
# message catalog facility for Tcl programs. It should be
# loaded with the command "package require msgcat".
#
-# Copyright (c) 2010-2018 by Harald Oehlmann.
-# Copyright (c) 1998-2000 by Ajuba Solutions.
-# Copyright (c) 1998 by Mark Harrison.
+# Copyright © 2010-2018 Harald Oehlmann.
+# Copyright © 1998-2000 Ajuba Solutions.
+# Copyright © 1998 Mark Harrison.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl
index 1639379..454b923 100644
--- a/library/opt/optparse.tcl
+++ b/library/opt/optparse.tcl
@@ -601,7 +601,7 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} {
return [expr {$arg ? 1 : 0}]
}
choice {
- if {[lsearch -exact $typeArgs $arg] < 0} {
+ if {$arg ni $typeArgs} {
error "invalid choice"
}
return $arg
diff --git a/library/package.tcl b/library/package.tcl
index ac9a3dc..5f0795f 100644
--- a/library/package.tcl
+++ b/library/package.tcl
@@ -3,8 +3,8 @@
# utility procs formerly in init.tcl which can be loaded on demand
# for package management.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1998 Sun Microsystems, Inc.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1998 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/library/parray.tcl b/library/parray.tcl
index a9c2cb1..984bf47 100644
--- a/library/parray.tcl
+++ b/library/parray.tcl
@@ -1,8 +1,8 @@
# parray:
# Print the contents of a global array on stdout.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994 Sun Microsystems, Inc.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl
index 5970a3f..7983831 100644
--- a/library/platform/pkgIndex.tcl
+++ b/library/platform/pkgIndex.tcl
@@ -1,3 +1,3 @@
-package ifneeded platform 1.0.14 [list source [file join $dir platform.tcl]]
+package ifneeded platform 1.0.17 [list source [file join $dir platform.tcl]]
package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]]
diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl
index 35a22a3..e01334e 100644
--- a/library/platform/platform.tcl
+++ b/library/platform/platform.tcl
@@ -29,8 +29,10 @@
# are on "Windows NT" or "Windows XP" or whatever.
#
# Machine specific
+# % amd64 -> x86_64
# % arm* -> arm
# % sun4* -> sparc
+# % ia32* -> ix86
# % intel -> ix86
# % i*86* -> ix86
# % Power* -> powerpc
@@ -71,6 +73,7 @@ proc ::platform::generic {} {
set cpu sparc
}
intel -
+ ia32* -
i*86* {
set cpu ix86
}
@@ -80,6 +83,7 @@ proc ::platform::generic {} {
set cpu ix86
}
}
+ ppc -
"Power*" {
set cpu powerpc
}
@@ -94,9 +98,6 @@ proc ::platform::generic {} {
}
switch -glob -- $plat {
- cygwin* {
- set plat cygwin
- }
windows {
if {$tcl_platform(platform) == "unix"} {
set plat cygwin
@@ -149,6 +150,9 @@ proc ::platform::generic {} {
osf1 {
set plat tru64
}
+ default {
+ set plat [lindex [split $plat _-] 0]
+ }
}
return "${plat}-${cpu}"
@@ -175,11 +179,16 @@ proc ::platform::identify {} {
}
macosx {
set major [lindex [split $tcl_platform(osVersion) .] 0]
- if {$major > 8} {
+ if {$major > 19} {
+ set minor [lindex [split $tcl_platform(osVersion) .] 1]
+ incr major -9
+ append plat $major.[expr {$minor - 1}]
+ } else {
incr major -4
append plat 10.$major
return "${plat}-${cpu}"
}
+ return "${plat}-${cpu}"
}
linux {
# Look for the libc*.so and determine its version
@@ -330,7 +339,7 @@ proc ::platform::patterns {id} {
lappend res macosx-universal macosx-i386-x86_64
}
macosx*-* {
- # 10.5+
+ # 10.5+,11.0+
if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} {
switch -exact -- $cpu {
@@ -338,17 +347,39 @@ proc ::platform::patterns {id} {
lappend alt i386-x86_64
lappend alt universal
}
- x86_64 { lappend alt i386-x86_64 }
+ x86_64 {
+ if {[lindex [split $::tcl_platform(osVersion) .] 0] < 19} {
+ set alt i386-x86_64
+ } else {
+ set alt {}
+ }
+ }
+ arm {
+ lappend alt x86_64
+ }
default { set alt {} }
}
if {$v ne ""} {
foreach {major minor} [split $v .] break
- # Add 10.5 to 10.minor to patterns.
set res {}
+ if {$major eq 11} {
+ # Add 11.0 to 11.minor to patterns.
+ for {set j $minor} {$j >= 0} {incr j -1} {
+ lappend res macosx${major}.${j}-${cpu}
+ foreach a $alt {
+ lappend res macosx${major}.${j}-$a
+ }
+ }
+ set major 10
+ set minor 15
+ }
+ # Add 10.5 to 10.minor to patterns.
for {set j $minor} {$j >= 5} {incr j -1} {
- lappend res macosx${major}.${j}-${cpu}
+ if {$cpu ne "arm"} {
+ lappend res macosx${major}.${j}-${cpu}
+ }
foreach a $alt {
lappend res macosx${major}.${j}-$a
}
@@ -378,7 +409,7 @@ proc ::platform::patterns {id} {
# ### ### ### ######### ######### #########
## Ready
-package provide platform 1.0.14
+package provide platform 1.0.17
# ### ### ### ######### ######### #########
## Demo application
diff --git a/library/reg/pkgIndex.tcl b/library/registry/pkgIndex.tcl
index 0413df6..5c73f30 100644
--- a/library/reg/pkgIndex.tcl
+++ b/library/registry/pkgIndex.tcl
@@ -1,4 +1,4 @@
if {![package vsatisfies [package provide Tcl] 8.5-]} return
if {[info sharedlibextension] != ".dll"} return
-package ifneeded registry 1.3.5 \
- [list load [file join $dir tclreg13.dll] registry]
+package ifneeded registry 1.3.6 \
+ [list load [file join $dir tclregistry13.dll] Registry]
diff --git a/library/safe.tcl b/library/safe.tcl
index 7eea772..3bdf728 100644
--- a/library/safe.tcl
+++ b/library/safe.tcl
@@ -7,7 +7,7 @@
#
# See the safe.n man page for details.
#
-# Copyright (c) 1996-1997 Sun Microsystems, Inc.
+# Copyright © 1996-1997 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -980,7 +980,7 @@ proc ::safe::AliasSource {child args} {
set replacementMsg "script error"
set code [catch {
set f [open $realfile]
- fconfigure $f -encoding $encoding -eofchar \032
+ fconfigure $f -encoding $encoding -eofchar "\032 {}"
set contents [read $f]
close $f
::interp eval $child [list info script $file]
diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl
index a56a0d6..da78df0 100644
--- a/library/tcltest/pkgIndex.tcl
+++ b/library/tcltest/pkgIndex.tcl
@@ -9,4 +9,4 @@
# full path name of this file's directory.
if {![package vsatisfies [package provide Tcl] 8.5-]} {return}
-package ifneeded tcltest 2.5.3 [list source [file join $dir tcltest.tcl]]
+package ifneeded tcltest 2.5.4 [list source [file join $dir tcltest.tcl]]
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 4df25e4..eb47963 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -11,8 +11,8 @@
# Microsystems.
#
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# Copyright (c) 2000 by Ajuba Solutions
+# Copyright (c) 1998-1999 Scriptics Corporation.
+# Copyright (c) 2000 Ajuba Solutions
# Contributions from Don Porter, NIST, 2002. (not subject to US copyright)
# All rights reserved.
@@ -22,7 +22,7 @@ namespace eval tcltest {
# When the version number changes, be sure to update the pkgIndex.tcl file,
# and the install directory in the Makefiles. When the minor version
# changes (new feature) be sure to update the man page as well.
- variable Version 2.5.3
+ variable Version 2.5.4
# Compatibility support for dumb variables defined in tcltest 1
# Do not use these. Call [package provide Tcl] and [info patchlevel]
@@ -41,7 +41,9 @@ namespace eval tcltest {
outputChannel testConstraint
# Export commands that are duplication (candidates for deprecation)
- namespace export bytestring ;# dups [encoding convertfrom identity]
+ if {![package vsatisfies [package provide Tcl] 8.7-]} {
+ namespace export bytestring ;# dups [encoding convertfrom identity]
+ }
namespace export debug ;# [configure -debug]
namespace export errorFile ;# [configure -errfile]
namespace export limitConstraints ;# [configure -limitconstraints]
@@ -397,6 +399,9 @@ namespace eval tcltest {
}
default {
set outputChannel [open $filename a]
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ fconfigure $outputChannel -encoding utf-8
+ }
set ChannelsWeOpened($outputChannel) 1
# If we created the file in [temporaryDirectory], then
@@ -441,6 +446,9 @@ namespace eval tcltest {
}
default {
set errorChannel [open $filename a]
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ fconfigure $errorChannel -encoding utf-8
+ }
set ChannelsWeOpened($errorChannel) 1
# If we created the file in [temporaryDirectory], then
@@ -640,7 +648,7 @@ namespace eval tcltest {
proc IsVerbose {level} {
variable Option
- return [expr {[lsearch -exact $Option(-verbose) $level] >= 0}]
+ return [expr {$level in $Option(-verbose)}]
}
# Default verbosity is to show bodies of failed tests
@@ -783,6 +791,9 @@ namespace eval tcltest {
variable Option
if {$Option(-loadfile) eq {}} {return}
set tmp [open $Option(-loadfile) r]
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ fconfigure $tmp -encoding utf-8
+ }
loadScript [read $tmp]
close $tmp
}
@@ -1269,7 +1280,7 @@ proc tcltest::DefineConstraintInitializers {} {
ConstraintInitializer nonBlockFiles {
set code [expr {[catch {set f [open defs r]}]
- || [catch {chan configure $f -blocking off}]}]
+ || [catch {fconfigure $f -blocking off}]}]
catch {close $f}
set code
}
@@ -1328,6 +1339,9 @@ proc tcltest::DefineConstraintInitializers {} {
ConstraintInitializer stdio {
set code 0
if {![catch {set f [open "|[list [interpreter]]" w]}]} {
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ fconfigure $f -encoding utf-8
+ }
if {![catch {puts $f exit}]} {
if {![catch {close $f}]} {
set code 1
@@ -2175,6 +2189,9 @@ proc tcltest::test {name description args} {
set testFile [file normalize [uplevel 1 {info script}]]
if {[file readable $testFile]} {
set testFd [open $testFile r]
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ fconfigure $testFd -encoding utf-8
+ }
set testLine [expr {[lsearch -regexp \
[split [read $testFd] "\n"] \
"^\[ \t\]*test [string map {. \\.} $name] "] + 1}]
@@ -2883,6 +2900,9 @@ proc tcltest::runAllTests { {shell ""} } {
if {[catch {
incr numTestFiles
set pipeFd [open $cmd "r"]
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ fconfigure $pipeFd -encoding utf-8
+ }
while {[gets $pipeFd line] >= 0} {
if {[regexp [join {
{^([^:]+):\t}
@@ -3079,7 +3099,10 @@ proc tcltest::makeFile {contents name {directory ""}} {
putting ``$contents'' into $fullName"
set fd [open $fullName w]
- chan configure $fd -translation lf
+ fconfigure $fd -translation lf
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ fconfigure $fd -encoding utf-8
+ }
if {[string index $contents end] eq "\n"} {
puts -nonewline $fd $contents
} else {
@@ -3228,6 +3251,9 @@ proc tcltest::viewFile {name {directory ""}} {
}
set fullName [file join $directory $name]
set f [open $fullName]
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ fconfigure $f -encoding utf-8
+ }
set data [read -nonewline $f]
close $f
return $data
@@ -3249,6 +3275,9 @@ proc tcltest::viewFile {name {directory ""}} {
# construct improperly formed strings in this manner, because it involves
# exposing that Tcl uses UTF-8 internally.
#
+# This function doesn't work any more in Tcl 8.7, since the 'identity'
+# is gone (TIP #345)
+#
# Arguments:
# string being converted
#
@@ -3258,8 +3287,10 @@ proc tcltest::viewFile {name {directory ""}} {
# Side effects:
# None
-proc tcltest::bytestring {string} {
- return [encoding convertfrom identity $string]
+if {![package vsatisfies [package provide Tcl] 8.7-]} {
+ proc tcltest::bytestring {string} {
+ return [encoding convertfrom identity $string]
+ }
}
# tcltest::OpenFiles --
diff --git a/library/tm.tcl b/library/tm.tcl
index 3c0ec22..c1a8f8a 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -316,7 +316,7 @@ proc ::tcl::tm::UnknownHandler {original name args} {
proc ::tcl::tm::Defaults {} {
global env tcl_platform
- regexp {^(\d+)\.(\d+)} [package provide Tcl] - major minor
+ regexp {^(\d+)\.(\d+)} [package provide tcl] - major minor
set exe [file normalize [info nameofexecutable]]
# Note that we're using [::list], not [list] because [list] means
@@ -359,7 +359,7 @@ proc ::tcl::tm::Defaults {} {
# Calls 'path add' to paths to the list of module search paths.
proc ::tcl::tm::roots {paths} {
- regexp {^(\d+)\.(\d+)} [package provide Tcl] - major minor
+ regexp {^(\d+)\.(\d+)} [package provide tcl] - major minor
foreach pa $paths {
set p [file join $pa tcl$major]
for {set n $minor} {$n >= 0} {incr n -1} {
diff --git a/library/tzdata/Africa/Accra b/library/tzdata/Africa/Accra
index f43f751..3f755f6 100644
--- a/library/tzdata/Africa/Accra
+++ b/library/tzdata/Africa/Accra
@@ -2,51 +2,65 @@
set TZData(:Africa/Accra) {
{-9223372036854775808 -52 0 LMT}
- {-1640995148 0 0 GMT}
- {-1556841600 1200 1 GMT}
- {-1546388400 0 0 GMT}
- {-1525305600 1200 1 GMT}
- {-1514852400 0 0 GMT}
- {-1493769600 1200 1 GMT}
- {-1483316400 0 0 GMT}
- {-1462233600 1200 1 GMT}
- {-1451780400 0 0 GMT}
- {-1430611200 1200 1 GMT}
- {-1420158000 0 0 GMT}
- {-1399075200 1200 1 GMT}
- {-1388622000 0 0 GMT}
- {-1367539200 1200 1 GMT}
- {-1357086000 0 0 GMT}
- {-1336003200 1200 1 GMT}
- {-1325550000 0 0 GMT}
- {-1304380800 1200 1 GMT}
- {-1293927600 0 0 GMT}
- {-1272844800 1200 1 GMT}
- {-1262391600 0 0 GMT}
- {-1241308800 1200 1 GMT}
- {-1230855600 0 0 GMT}
- {-1209772800 1200 1 GMT}
- {-1199319600 0 0 GMT}
- {-1178150400 1200 1 GMT}
- {-1167697200 0 0 GMT}
- {-1146614400 1200 1 GMT}
- {-1136161200 0 0 GMT}
- {-1115078400 1200 1 GMT}
- {-1104625200 0 0 GMT}
- {-1083542400 1200 1 GMT}
- {-1073089200 0 0 GMT}
- {-1051920000 1200 1 GMT}
- {-1041466800 0 0 GMT}
- {-1020384000 1200 1 GMT}
- {-1009930800 0 0 GMT}
- {-988848000 1200 1 GMT}
- {-978394800 0 0 GMT}
- {-957312000 1200 1 GMT}
- {-946858800 0 0 GMT}
- {-925689600 1200 1 GMT}
- {-915236400 0 0 GMT}
- {-894153600 1200 1 GMT}
- {-883700400 0 0 GMT}
- {-862617600 1200 1 GMT}
- {-852164400 0 0 GMT}
+ {-1709337548 0 0 GMT}
+ {-1581206400 1200 1 +0020}
+ {-1577917200 0 0 GMT}
+ {-1556834400 1200 1 +0020}
+ {-1546294800 0 0 GMT}
+ {-1525298400 1200 1 +0020}
+ {-1514758800 0 0 GMT}
+ {-1493762400 1200 1 +0020}
+ {-1483222800 0 0 GMT}
+ {-1462226400 1200 1 +0020}
+ {-1451686800 0 0 GMT}
+ {-1430604000 1200 1 +0020}
+ {-1420064400 0 0 GMT}
+ {-1399068000 1200 1 +0020}
+ {-1388528400 0 0 GMT}
+ {-1367532000 1200 1 +0020}
+ {-1356992400 0 0 GMT}
+ {-1335996000 1200 1 +0020}
+ {-1325456400 0 0 GMT}
+ {-1304373600 1200 1 +0020}
+ {-1293834000 0 0 GMT}
+ {-1272837600 1200 1 +0020}
+ {-1262298000 0 0 GMT}
+ {-1241301600 1200 1 +0020}
+ {-1230762000 0 0 GMT}
+ {-1209765600 1200 1 +0020}
+ {-1199226000 0 0 GMT}
+ {-1178143200 1200 1 +0020}
+ {-1167603600 0 0 GMT}
+ {-1146607200 1200 1 +0020}
+ {-1136067600 0 0 GMT}
+ {-1115071200 1200 1 +0020}
+ {-1104531600 0 0 GMT}
+ {-1083535200 1200 1 +0020}
+ {-1072995600 0 0 GMT}
+ {-1051912800 1200 1 +0020}
+ {-1041373200 0 0 GMT}
+ {-1020376800 1200 1 +0020}
+ {-1009837200 0 0 GMT}
+ {-988840800 1200 1 +0020}
+ {-978301200 0 0 GMT}
+ {-957304800 1200 1 +0020}
+ {-946765200 0 0 GMT}
+ {-936309600 1200 1 +0020}
+ {-915142800 0 0 GMT}
+ {-904773600 1200 1 +0020}
+ {-883606800 0 0 GMT}
+ {-880329600 1800 0 +0030}
+ {-756952200 0 0 GMT}
+ {-610149600 1800 1 +0030}
+ {-599610600 0 0 GMT}
+ {-578613600 1800 1 +0030}
+ {-568074600 0 0 GMT}
+ {-546991200 1800 1 +0030}
+ {-536452200 0 0 GMT}
+ {-515455200 1800 1 +0030}
+ {-504916200 0 0 GMT}
+ {-483919200 1800 1 +0030}
+ {-473380200 0 0 GMT}
+ {-452383200 1800 1 +0030}
+ {-441844200 0 0 GMT}
}
diff --git a/library/tzdata/Africa/Juba b/library/tzdata/Africa/Juba
index a0dbf5e..043d95f 100644
--- a/library/tzdata/Africa/Juba
+++ b/library/tzdata/Africa/Juba
@@ -36,4 +36,5 @@ set TZData(:Africa/Juba) {
{483487200 10800 1 CAST}
{498171600 7200 0 CAT}
{947930400 10800 0 EAT}
+ {1612126800 7200 0 CAT}
}
diff --git a/library/tzdata/Africa/Lagos b/library/tzdata/Africa/Lagos
index 079572f..8750661 100644
--- a/library/tzdata/Africa/Lagos
+++ b/library/tzdata/Africa/Lagos
@@ -1,6 +1,9 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Africa/Lagos) {
- {-9223372036854775808 816 0 LMT}
- {-1588464816 3600 0 WAT}
+ {-9223372036854775808 815 0 LMT}
+ {-2035584815 0 0 GMT}
+ {-1940889600 815 0 LMT}
+ {-1767226415 1800 0 +0030}
+ {-1588465800 3600 0 WAT}
}
diff --git a/library/tzdata/Africa/Nairobi b/library/tzdata/Africa/Nairobi
index 715dc45..b4c3b97 100644
--- a/library/tzdata/Africa/Nairobi
+++ b/library/tzdata/Africa/Nairobi
@@ -2,8 +2,9 @@
set TZData(:Africa/Nairobi) {
{-9223372036854775808 8836 0 LMT}
- {-1309746436 10800 0 EAT}
- {-1262314800 9000 0 +0230}
- {-946780200 9900 0 +0245}
- {-315629100 10800 0 EAT}
+ {-1946168836 9000 0 +0230}
+ {-1309746600 10800 0 EAT}
+ {-1261969200 9000 0 +0230}
+ {-1041388200 9900 0 +0245}
+ {-865305900 10800 0 EAT}
}
diff --git a/library/tzdata/America/Belize b/library/tzdata/America/Belize
index 5b46388..3b3f9e4 100644
--- a/library/tzdata/America/Belize
+++ b/library/tzdata/America/Belize
@@ -51,8 +51,51 @@ set TZData(:America/Belize) {
{-911759400 -21600 0 CST}
{-891194400 -19800 1 -0530}
{-879705000 -21600 0 CST}
- {-859744800 -19800 1 -0530}
- {-848255400 -21600 0 CST}
+ {-868212000 -18000 1 CWT}
+ {-769395600 -18000 1 CPT}
+ {-758746800 -21600 0 CST}
+ {-701892000 -19800 1 -0530}
+ {-690402600 -21600 0 CST}
+ {-670442400 -19800 1 -0530}
+ {-658953000 -21600 0 CST}
+ {-638992800 -19800 1 -0530}
+ {-627503400 -21600 0 CST}
+ {-606938400 -19800 1 -0530}
+ {-596053800 -21600 0 CST}
+ {-575488800 -19800 1 -0530}
+ {-564604200 -21600 0 CST}
+ {-544039200 -19800 1 -0530}
+ {-532549800 -21600 0 CST}
+ {-512589600 -19800 1 -0530}
+ {-501100200 -21600 0 CST}
+ {-481140000 -19800 1 -0530}
+ {-469650600 -21600 0 CST}
+ {-449690400 -19800 1 -0530}
+ {-438201000 -21600 0 CST}
+ {-417636000 -19800 1 -0530}
+ {-406751400 -21600 0 CST}
+ {-386186400 -19800 1 -0530}
+ {-375301800 -21600 0 CST}
+ {-354736800 -19800 1 -0530}
+ {-343247400 -21600 0 CST}
+ {-323287200 -19800 1 -0530}
+ {-311797800 -21600 0 CST}
+ {-291837600 -19800 1 -0530}
+ {-280348200 -21600 0 CST}
+ {-259783200 -19800 1 -0530}
+ {-248898600 -21600 0 CST}
+ {-228333600 -19800 1 -0530}
+ {-217449000 -21600 0 CST}
+ {-196884000 -19800 1 -0530}
+ {-185999400 -21600 0 CST}
+ {-165434400 -19800 1 -0530}
+ {-153945000 -21600 0 CST}
+ {-133984800 -19800 1 -0530}
+ {-122495400 -21600 0 CST}
+ {-102535200 -19800 1 -0530}
+ {-91045800 -21600 0 CST}
+ {-70480800 -19800 1 -0530}
+ {-59596200 -21600 0 CST}
{123919200 -18000 1 CDT}
{129618000 -21600 0 CST}
{409039200 -18000 1 CDT}
diff --git a/library/tzdata/America/Grand_Turk b/library/tzdata/America/Grand_Turk
index da5f09b..414b0f9 100644
--- a/library/tzdata/America/Grand_Turk
+++ b/library/tzdata/America/Grand_Turk
@@ -77,8 +77,7 @@ set TZData(:America/Grand_Turk) {
{1383458400 -18000 0 EST}
{1394348400 -14400 1 EDT}
{1414908000 -18000 0 EST}
- {1425798000 -14400 1 EDT}
- {1446361200 -14400 0 AST}
+ {1425798000 -14400 0 AST}
{1520751600 -14400 0 EDT}
{1541311200 -18000 0 EST}
{1552201200 -14400 1 EDT}
diff --git a/library/tzdata/America/Nassau b/library/tzdata/America/Nassau
index 1c35e93..292c56d 100644
--- a/library/tzdata/America/Nassau
+++ b/library/tzdata/America/Nassau
@@ -3,6 +3,11 @@
set TZData(:America/Nassau) {
{-9223372036854775808 -18570 0 LMT}
{-1825095030 -18000 0 EST}
+ {-873140400 -14400 1 EWT}
+ {-788904000 -18000 0 EST}
+ {-786222000 -14400 1 EWT}
+ {-769395600 -14400 1 EPT}
+ {-763848000 -18000 0 EST}
{-179341200 -14400 1 EDT}
{-163620000 -18000 0 EST}
{-147891600 -14400 1 EDT}
diff --git a/library/tzdata/Antarctica/Macquarie b/library/tzdata/Antarctica/Macquarie
index e8ed043..82b2b9f 100644
--- a/library/tzdata/Antarctica/Macquarie
+++ b/library/tzdata/Antarctica/Macquarie
@@ -5,7 +5,7 @@ set TZData(:Antarctica/Macquarie) {
{-2214259200 36000 0 AEST}
{-1680508800 39600 1 AEDT}
{-1669892400 39600 0 AEDT}
- {-1665392400 36000 0 AEST}
+ {-1665388800 36000 0 AEST}
{-1601719200 0 0 -00}
{-94730400 36000 0 AEST}
{-71136000 39600 1 AEDT}
diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza
index 9b73dcc..95523c9 100644
--- a/library/tzdata/Asia/Gaza
+++ b/library/tzdata/Asia/Gaza
@@ -3,16 +3,18 @@
set TZData(:Asia/Gaza) {
{-9223372036854775808 8272 0 LMT}
{-2185409872 7200 0 EEST}
- {-933645600 10800 1 EEST}
- {-857358000 7200 0 EEST}
+ {-933638400 10800 1 EEST}
+ {-923097600 7200 0 EEST}
+ {-919036800 10800 1 EEST}
+ {-857347200 7200 0 EEST}
{-844300800 10800 1 EEST}
- {-825822000 7200 0 EEST}
- {-812685600 10800 1 EEST}
- {-794199600 7200 0 EEST}
- {-779853600 10800 1 EEST}
- {-762656400 7200 0 EEST}
+ {-825811200 7200 0 EEST}
+ {-812678400 10800 1 EEST}
+ {-794188800 7200 0 EEST}
+ {-779846400 10800 1 EEST}
+ {-762652800 7200 0 EEST}
{-748310400 10800 1 EEST}
- {-731127600 7200 0 EEST}
+ {-731116800 7200 0 EEST}
{-682653600 7200 0 EET}
{-399088800 10800 1 EEST}
{-386650800 7200 0 EET}
@@ -40,12 +42,12 @@ set TZData(:Asia/Gaza) {
{150843600 7200 0 IST}
{167176800 10800 1 IDT}
{178664400 7200 0 IST}
- {334015200 10800 1 IDT}
- {337644000 7200 0 IST}
- {452556000 10800 1 IDT}
- {462232800 7200 0 IST}
+ {334101600 10800 1 IDT}
+ {337730400 7200 0 IST}
+ {452642400 10800 1 IDT}
+ {462319200 7200 0 IST}
{482277600 10800 1 IDT}
- {495579600 7200 0 IST}
+ {494370000 7200 0 IST}
{516751200 10800 1 IDT}
{526424400 7200 0 IST}
{545436000 10800 1 IDT}
@@ -110,7 +112,7 @@ set TZData(:Asia/Gaza) {
{1395957600 10800 1 EEST}
{1414098000 7200 0 EET}
{1427493600 10800 1 EEST}
- {1445547600 7200 0 EET}
+ {1445551200 7200 0 EET}
{1458946800 10800 1 EEST}
{1477692000 7200 0 EET}
{1490396400 10800 1 EEST}
@@ -118,165 +120,165 @@ set TZData(:Asia/Gaza) {
{1521846000 10800 1 EEST}
{1540591200 7200 0 EET}
{1553810400 10800 1 EEST}
- {1572040800 7200 0 EET}
- {1585260000 10800 1 EEST}
- {1604095200 7200 0 EET}
- {1616709600 10800 1 EEST}
+ {1572037200 7200 0 EET}
+ {1585346400 10800 1 EEST}
+ {1603490400 7200 0 EET}
+ {1616796000 10800 1 EEST}
{1635544800 7200 0 EET}
- {1648159200 10800 1 EEST}
+ {1648245600 10800 1 EEST}
{1666994400 7200 0 EET}
- {1680213600 10800 1 EEST}
+ {1679695200 10800 1 EEST}
{1698444000 7200 0 EET}
- {1711663200 10800 1 EEST}
+ {1711749600 10800 1 EEST}
{1729893600 7200 0 EET}
- {1743112800 10800 1 EEST}
+ {1743199200 10800 1 EEST}
{1761343200 7200 0 EET}
- {1774562400 10800 1 EEST}
- {1793397600 7200 0 EET}
- {1806012000 10800 1 EEST}
+ {1774648800 10800 1 EEST}
+ {1792792800 7200 0 EET}
+ {1806098400 10800 1 EEST}
{1824847200 7200 0 EET}
- {1838066400 10800 1 EEST}
+ {1837548000 10800 1 EEST}
{1856296800 7200 0 EET}
- {1869516000 10800 1 EEST}
+ {1868997600 10800 1 EEST}
{1887746400 7200 0 EET}
- {1900965600 10800 1 EEST}
+ {1901052000 10800 1 EEST}
{1919196000 7200 0 EET}
- {1932415200 10800 1 EEST}
+ {1932501600 10800 1 EEST}
{1950645600 7200 0 EET}
- {1963864800 10800 1 EEST}
+ {1963951200 10800 1 EEST}
{1982700000 7200 0 EET}
- {1995314400 10800 1 EEST}
+ {1995400800 10800 1 EEST}
{2014149600 7200 0 EET}
- {2027368800 10800 1 EEST}
+ {2026850400 10800 1 EEST}
{2045599200 7200 0 EET}
- {2058818400 10800 1 EEST}
+ {2058300000 10800 1 EEST}
{2077048800 7200 0 EET}
- {2090268000 10800 1 EEST}
+ {2090354400 10800 1 EEST}
{2108498400 7200 0 EET}
- {2121717600 10800 1 EEST}
- {2140552800 7200 0 EET}
- {2153167200 10800 1 EEST}
+ {2121804000 10800 1 EEST}
+ {2139948000 7200 0 EET}
+ {2153253600 10800 1 EEST}
{2172002400 7200 0 EET}
- {2184616800 10800 1 EEST}
+ {2184703200 10800 1 EEST}
{2203452000 7200 0 EET}
- {2216671200 10800 1 EEST}
+ {2216152800 10800 1 EEST}
{2234901600 7200 0 EET}
- {2248120800 10800 1 EEST}
+ {2248207200 10800 1 EEST}
{2266351200 7200 0 EET}
- {2279570400 10800 1 EEST}
+ {2279656800 10800 1 EEST}
{2297800800 7200 0 EET}
- {2311020000 10800 1 EEST}
- {2329855200 7200 0 EET}
- {2342469600 10800 1 EEST}
+ {2311106400 10800 1 EEST}
+ {2329250400 7200 0 EET}
+ {2342556000 10800 1 EEST}
{2361304800 7200 0 EET}
- {2374524000 10800 1 EEST}
+ {2374005600 10800 1 EEST}
{2392754400 7200 0 EET}
- {2405973600 10800 1 EEST}
+ {2405455200 10800 1 EEST}
{2424204000 7200 0 EET}
- {2437423200 10800 1 EEST}
+ {2437509600 10800 1 EEST}
{2455653600 7200 0 EET}
- {2468872800 10800 1 EEST}
- {2487708000 7200 0 EET}
- {2500322400 10800 1 EEST}
+ {2468959200 10800 1 EEST}
+ {2487103200 7200 0 EET}
+ {2500408800 10800 1 EEST}
{2519157600 7200 0 EET}
- {2531772000 10800 1 EEST}
+ {2531858400 10800 1 EEST}
{2550607200 7200 0 EET}
- {2563826400 10800 1 EEST}
+ {2563308000 10800 1 EEST}
{2582056800 7200 0 EET}
- {2595276000 10800 1 EEST}
+ {2595362400 10800 1 EEST}
{2613506400 7200 0 EET}
- {2626725600 10800 1 EEST}
+ {2626812000 10800 1 EEST}
{2644956000 7200 0 EET}
- {2658175200 10800 1 EEST}
- {2677010400 7200 0 EET}
- {2689624800 10800 1 EEST}
+ {2658261600 10800 1 EEST}
+ {2676405600 7200 0 EET}
+ {2689711200 10800 1 EEST}
{2708460000 7200 0 EET}
- {2721679200 10800 1 EEST}
+ {2721160800 10800 1 EEST}
{2739909600 7200 0 EET}
- {2753128800 10800 1 EEST}
+ {2752610400 10800 1 EEST}
{2771359200 7200 0 EET}
- {2784578400 10800 1 EEST}
+ {2784664800 10800 1 EEST}
{2802808800 7200 0 EET}
- {2816028000 10800 1 EEST}
+ {2816114400 10800 1 EEST}
{2834258400 7200 0 EET}
- {2847477600 10800 1 EEST}
+ {2847564000 10800 1 EEST}
{2866312800 7200 0 EET}
- {2878927200 10800 1 EEST}
+ {2879013600 10800 1 EEST}
{2897762400 7200 0 EET}
- {2910981600 10800 1 EEST}
+ {2910463200 10800 1 EEST}
{2929212000 7200 0 EET}
- {2942431200 10800 1 EEST}
+ {2941912800 10800 1 EEST}
{2960661600 7200 0 EET}
- {2973880800 10800 1 EEST}
+ {2973967200 10800 1 EEST}
{2992111200 7200 0 EET}
- {3005330400 10800 1 EEST}
- {3024165600 7200 0 EET}
- {3036780000 10800 1 EEST}
+ {3005416800 10800 1 EEST}
+ {3023560800 7200 0 EET}
+ {3036866400 10800 1 EEST}
{3055615200 7200 0 EET}
- {3068229600 10800 1 EEST}
+ {3068316000 10800 1 EEST}
{3087064800 7200 0 EET}
- {3100284000 10800 1 EEST}
+ {3099765600 10800 1 EEST}
{3118514400 7200 0 EET}
- {3131733600 10800 1 EEST}
+ {3131820000 10800 1 EEST}
{3149964000 7200 0 EET}
- {3163183200 10800 1 EEST}
+ {3163269600 10800 1 EEST}
{3181413600 7200 0 EET}
- {3194632800 10800 1 EEST}
- {3213468000 7200 0 EET}
- {3226082400 10800 1 EEST}
+ {3194719200 10800 1 EEST}
+ {3212863200 7200 0 EET}
+ {3226168800 10800 1 EEST}
{3244917600 7200 0 EET}
- {3258136800 10800 1 EEST}
+ {3257618400 10800 1 EEST}
{3276367200 7200 0 EET}
- {3289586400 10800 1 EEST}
+ {3289068000 10800 1 EEST}
{3307816800 7200 0 EET}
- {3321036000 10800 1 EEST}
+ {3321122400 10800 1 EEST}
{3339266400 7200 0 EET}
- {3352485600 10800 1 EEST}
- {3371320800 7200 0 EET}
- {3383935200 10800 1 EEST}
+ {3352572000 10800 1 EEST}
+ {3370716000 7200 0 EET}
+ {3384021600 10800 1 EEST}
{3402770400 7200 0 EET}
- {3415384800 10800 1 EEST}
+ {3415471200 10800 1 EEST}
{3434220000 7200 0 EET}
- {3447439200 10800 1 EEST}
+ {3446920800 10800 1 EEST}
{3465669600 7200 0 EET}
- {3478888800 10800 1 EEST}
+ {3478975200 10800 1 EEST}
{3497119200 7200 0 EET}
- {3510338400 10800 1 EEST}
+ {3510424800 10800 1 EEST}
{3528568800 7200 0 EET}
- {3541788000 10800 1 EEST}
- {3560623200 7200 0 EET}
- {3573237600 10800 1 EEST}
+ {3541874400 10800 1 EEST}
+ {3560018400 7200 0 EET}
+ {3573324000 10800 1 EEST}
{3592072800 7200 0 EET}
- {3605292000 10800 1 EEST}
+ {3604773600 10800 1 EEST}
{3623522400 7200 0 EET}
- {3636741600 10800 1 EEST}
+ {3636223200 10800 1 EEST}
{3654972000 7200 0 EET}
- {3668191200 10800 1 EEST}
+ {3668277600 10800 1 EEST}
{3686421600 7200 0 EET}
- {3699640800 10800 1 EEST}
+ {3699727200 10800 1 EEST}
{3717871200 7200 0 EET}
- {3731090400 10800 1 EEST}
+ {3731176800 10800 1 EEST}
{3749925600 7200 0 EET}
- {3762540000 10800 1 EEST}
+ {3762626400 10800 1 EEST}
{3781375200 7200 0 EET}
- {3794594400 10800 1 EEST}
+ {3794076000 10800 1 EEST}
{3812824800 7200 0 EET}
- {3826044000 10800 1 EEST}
+ {3825525600 10800 1 EEST}
{3844274400 7200 0 EET}
- {3857493600 10800 1 EEST}
+ {3857580000 10800 1 EEST}
{3875724000 7200 0 EET}
- {3888943200 10800 1 EEST}
- {3907778400 7200 0 EET}
- {3920392800 10800 1 EEST}
+ {3889029600 10800 1 EEST}
+ {3907173600 7200 0 EET}
+ {3920479200 10800 1 EEST}
{3939228000 7200 0 EET}
- {3951842400 10800 1 EEST}
+ {3951928800 10800 1 EEST}
{3970677600 7200 0 EET}
- {3983896800 10800 1 EEST}
+ {3983378400 10800 1 EEST}
{4002127200 7200 0 EET}
- {4015346400 10800 1 EEST}
+ {4015432800 10800 1 EEST}
{4033576800 7200 0 EET}
- {4046796000 10800 1 EEST}
+ {4046882400 10800 1 EEST}
{4065026400 7200 0 EET}
- {4078245600 10800 1 EEST}
- {4097080800 7200 0 EET}
+ {4078332000 10800 1 EEST}
+ {4096476000 7200 0 EET}
}
diff --git a/library/tzdata/Asia/Hebron b/library/tzdata/Asia/Hebron
index fe8f7e1..3fdcd65 100644
--- a/library/tzdata/Asia/Hebron
+++ b/library/tzdata/Asia/Hebron
@@ -3,16 +3,18 @@
set TZData(:Asia/Hebron) {
{-9223372036854775808 8423 0 LMT}
{-2185410023 7200 0 EEST}
- {-933645600 10800 1 EEST}
- {-857358000 7200 0 EEST}
+ {-933638400 10800 1 EEST}
+ {-923097600 7200 0 EEST}
+ {-919036800 10800 1 EEST}
+ {-857347200 7200 0 EEST}
{-844300800 10800 1 EEST}
- {-825822000 7200 0 EEST}
- {-812685600 10800 1 EEST}
- {-794199600 7200 0 EEST}
- {-779853600 10800 1 EEST}
- {-762656400 7200 0 EEST}
+ {-825811200 7200 0 EEST}
+ {-812678400 10800 1 EEST}
+ {-794188800 7200 0 EEST}
+ {-779846400 10800 1 EEST}
+ {-762652800 7200 0 EEST}
{-748310400 10800 1 EEST}
- {-731127600 7200 0 EEST}
+ {-731116800 7200 0 EEST}
{-682653600 7200 0 EET}
{-399088800 10800 1 EEST}
{-386650800 7200 0 EET}
@@ -40,12 +42,12 @@ set TZData(:Asia/Hebron) {
{150843600 7200 0 IST}
{167176800 10800 1 IDT}
{178664400 7200 0 IST}
- {334015200 10800 1 IDT}
- {337644000 7200 0 IST}
- {452556000 10800 1 IDT}
- {462232800 7200 0 IST}
+ {334101600 10800 1 IDT}
+ {337730400 7200 0 IST}
+ {452642400 10800 1 IDT}
+ {462319200 7200 0 IST}
{482277600 10800 1 IDT}
- {495579600 7200 0 IST}
+ {494370000 7200 0 IST}
{516751200 10800 1 IDT}
{526424400 7200 0 IST}
{545436000 10800 1 IDT}
@@ -109,7 +111,7 @@ set TZData(:Asia/Hebron) {
{1395957600 10800 1 EEST}
{1414098000 7200 0 EET}
{1427493600 10800 1 EEST}
- {1445547600 7200 0 EET}
+ {1445551200 7200 0 EET}
{1458946800 10800 1 EEST}
{1477692000 7200 0 EET}
{1490396400 10800 1 EEST}
@@ -117,165 +119,165 @@ set TZData(:Asia/Hebron) {
{1521846000 10800 1 EEST}
{1540591200 7200 0 EET}
{1553810400 10800 1 EEST}
- {1572040800 7200 0 EET}
- {1585260000 10800 1 EEST}
- {1604095200 7200 0 EET}
- {1616709600 10800 1 EEST}
+ {1572037200 7200 0 EET}
+ {1585346400 10800 1 EEST}
+ {1603490400 7200 0 EET}
+ {1616796000 10800 1 EEST}
{1635544800 7200 0 EET}
- {1648159200 10800 1 EEST}
+ {1648245600 10800 1 EEST}
{1666994400 7200 0 EET}
- {1680213600 10800 1 EEST}
+ {1679695200 10800 1 EEST}
{1698444000 7200 0 EET}
- {1711663200 10800 1 EEST}
+ {1711749600 10800 1 EEST}
{1729893600 7200 0 EET}
- {1743112800 10800 1 EEST}
+ {1743199200 10800 1 EEST}
{1761343200 7200 0 EET}
- {1774562400 10800 1 EEST}
- {1793397600 7200 0 EET}
- {1806012000 10800 1 EEST}
+ {1774648800 10800 1 EEST}
+ {1792792800 7200 0 EET}
+ {1806098400 10800 1 EEST}
{1824847200 7200 0 EET}
- {1838066400 10800 1 EEST}
+ {1837548000 10800 1 EEST}
{1856296800 7200 0 EET}
- {1869516000 10800 1 EEST}
+ {1868997600 10800 1 EEST}
{1887746400 7200 0 EET}
- {1900965600 10800 1 EEST}
+ {1901052000 10800 1 EEST}
{1919196000 7200 0 EET}
- {1932415200 10800 1 EEST}
+ {1932501600 10800 1 EEST}
{1950645600 7200 0 EET}
- {1963864800 10800 1 EEST}
+ {1963951200 10800 1 EEST}
{1982700000 7200 0 EET}
- {1995314400 10800 1 EEST}
+ {1995400800 10800 1 EEST}
{2014149600 7200 0 EET}
- {2027368800 10800 1 EEST}
+ {2026850400 10800 1 EEST}
{2045599200 7200 0 EET}
- {2058818400 10800 1 EEST}
+ {2058300000 10800 1 EEST}
{2077048800 7200 0 EET}
- {2090268000 10800 1 EEST}
+ {2090354400 10800 1 EEST}
{2108498400 7200 0 EET}
- {2121717600 10800 1 EEST}
- {2140552800 7200 0 EET}
- {2153167200 10800 1 EEST}
+ {2121804000 10800 1 EEST}
+ {2139948000 7200 0 EET}
+ {2153253600 10800 1 EEST}
{2172002400 7200 0 EET}
- {2184616800 10800 1 EEST}
+ {2184703200 10800 1 EEST}
{2203452000 7200 0 EET}
- {2216671200 10800 1 EEST}
+ {2216152800 10800 1 EEST}
{2234901600 7200 0 EET}
- {2248120800 10800 1 EEST}
+ {2248207200 10800 1 EEST}
{2266351200 7200 0 EET}
- {2279570400 10800 1 EEST}
+ {2279656800 10800 1 EEST}
{2297800800 7200 0 EET}
- {2311020000 10800 1 EEST}
- {2329855200 7200 0 EET}
- {2342469600 10800 1 EEST}
+ {2311106400 10800 1 EEST}
+ {2329250400 7200 0 EET}
+ {2342556000 10800 1 EEST}
{2361304800 7200 0 EET}
- {2374524000 10800 1 EEST}
+ {2374005600 10800 1 EEST}
{2392754400 7200 0 EET}
- {2405973600 10800 1 EEST}
+ {2405455200 10800 1 EEST}
{2424204000 7200 0 EET}
- {2437423200 10800 1 EEST}
+ {2437509600 10800 1 EEST}
{2455653600 7200 0 EET}
- {2468872800 10800 1 EEST}
- {2487708000 7200 0 EET}
- {2500322400 10800 1 EEST}
+ {2468959200 10800 1 EEST}
+ {2487103200 7200 0 EET}
+ {2500408800 10800 1 EEST}
{2519157600 7200 0 EET}
- {2531772000 10800 1 EEST}
+ {2531858400 10800 1 EEST}
{2550607200 7200 0 EET}
- {2563826400 10800 1 EEST}
+ {2563308000 10800 1 EEST}
{2582056800 7200 0 EET}
- {2595276000 10800 1 EEST}
+ {2595362400 10800 1 EEST}
{2613506400 7200 0 EET}
- {2626725600 10800 1 EEST}
+ {2626812000 10800 1 EEST}
{2644956000 7200 0 EET}
- {2658175200 10800 1 EEST}
- {2677010400 7200 0 EET}
- {2689624800 10800 1 EEST}
+ {2658261600 10800 1 EEST}
+ {2676405600 7200 0 EET}
+ {2689711200 10800 1 EEST}
{2708460000 7200 0 EET}
- {2721679200 10800 1 EEST}
+ {2721160800 10800 1 EEST}
{2739909600 7200 0 EET}
- {2753128800 10800 1 EEST}
+ {2752610400 10800 1 EEST}
{2771359200 7200 0 EET}
- {2784578400 10800 1 EEST}
+ {2784664800 10800 1 EEST}
{2802808800 7200 0 EET}
- {2816028000 10800 1 EEST}
+ {2816114400 10800 1 EEST}
{2834258400 7200 0 EET}
- {2847477600 10800 1 EEST}
+ {2847564000 10800 1 EEST}
{2866312800 7200 0 EET}
- {2878927200 10800 1 EEST}
+ {2879013600 10800 1 EEST}
{2897762400 7200 0 EET}
- {2910981600 10800 1 EEST}
+ {2910463200 10800 1 EEST}
{2929212000 7200 0 EET}
- {2942431200 10800 1 EEST}
+ {2941912800 10800 1 EEST}
{2960661600 7200 0 EET}
- {2973880800 10800 1 EEST}
+ {2973967200 10800 1 EEST}
{2992111200 7200 0 EET}
- {3005330400 10800 1 EEST}
- {3024165600 7200 0 EET}
- {3036780000 10800 1 EEST}
+ {3005416800 10800 1 EEST}
+ {3023560800 7200 0 EET}
+ {3036866400 10800 1 EEST}
{3055615200 7200 0 EET}
- {3068229600 10800 1 EEST}
+ {3068316000 10800 1 EEST}
{3087064800 7200 0 EET}
- {3100284000 10800 1 EEST}
+ {3099765600 10800 1 EEST}
{3118514400 7200 0 EET}
- {3131733600 10800 1 EEST}
+ {3131820000 10800 1 EEST}
{3149964000 7200 0 EET}
- {3163183200 10800 1 EEST}
+ {3163269600 10800 1 EEST}
{3181413600 7200 0 EET}
- {3194632800 10800 1 EEST}
- {3213468000 7200 0 EET}
- {3226082400 10800 1 EEST}
+ {3194719200 10800 1 EEST}
+ {3212863200 7200 0 EET}
+ {3226168800 10800 1 EEST}
{3244917600 7200 0 EET}
- {3258136800 10800 1 EEST}
+ {3257618400 10800 1 EEST}
{3276367200 7200 0 EET}
- {3289586400 10800 1 EEST}
+ {3289068000 10800 1 EEST}
{3307816800 7200 0 EET}
- {3321036000 10800 1 EEST}
+ {3321122400 10800 1 EEST}
{3339266400 7200 0 EET}
- {3352485600 10800 1 EEST}
- {3371320800 7200 0 EET}
- {3383935200 10800 1 EEST}
+ {3352572000 10800 1 EEST}
+ {3370716000 7200 0 EET}
+ {3384021600 10800 1 EEST}
{3402770400 7200 0 EET}
- {3415384800 10800 1 EEST}
+ {3415471200 10800 1 EEST}
{3434220000 7200 0 EET}
- {3447439200 10800 1 EEST}
+ {3446920800 10800 1 EEST}
{3465669600 7200 0 EET}
- {3478888800 10800 1 EEST}
+ {3478975200 10800 1 EEST}
{3497119200 7200 0 EET}
- {3510338400 10800 1 EEST}
+ {3510424800 10800 1 EEST}
{3528568800 7200 0 EET}
- {3541788000 10800 1 EEST}
- {3560623200 7200 0 EET}
- {3573237600 10800 1 EEST}
+ {3541874400 10800 1 EEST}
+ {3560018400 7200 0 EET}
+ {3573324000 10800 1 EEST}
{3592072800 7200 0 EET}
- {3605292000 10800 1 EEST}
+ {3604773600 10800 1 EEST}
{3623522400 7200 0 EET}
- {3636741600 10800 1 EEST}
+ {3636223200 10800 1 EEST}
{3654972000 7200 0 EET}
- {3668191200 10800 1 EEST}
+ {3668277600 10800 1 EEST}
{3686421600 7200 0 EET}
- {3699640800 10800 1 EEST}
+ {3699727200 10800 1 EEST}
{3717871200 7200 0 EET}
- {3731090400 10800 1 EEST}
+ {3731176800 10800 1 EEST}
{3749925600 7200 0 EET}
- {3762540000 10800 1 EEST}
+ {3762626400 10800 1 EEST}
{3781375200 7200 0 EET}
- {3794594400 10800 1 EEST}
+ {3794076000 10800 1 EEST}
{3812824800 7200 0 EET}
- {3826044000 10800 1 EEST}
+ {3825525600 10800 1 EEST}
{3844274400 7200 0 EET}
- {3857493600 10800 1 EEST}
+ {3857580000 10800 1 EEST}
{3875724000 7200 0 EET}
- {3888943200 10800 1 EEST}
- {3907778400 7200 0 EET}
- {3920392800 10800 1 EEST}
+ {3889029600 10800 1 EEST}
+ {3907173600 7200 0 EET}
+ {3920479200 10800 1 EEST}
{3939228000 7200 0 EET}
- {3951842400 10800 1 EEST}
+ {3951928800 10800 1 EEST}
{3970677600 7200 0 EET}
- {3983896800 10800 1 EEST}
+ {3983378400 10800 1 EEST}
{4002127200 7200 0 EET}
- {4015346400 10800 1 EEST}
+ {4015432800 10800 1 EEST}
{4033576800 7200 0 EET}
- {4046796000 10800 1 EEST}
+ {4046882400 10800 1 EEST}
{4065026400 7200 0 EET}
- {4078245600 10800 1 EEST}
- {4097080800 7200 0 EET}
+ {4078332000 10800 1 EEST}
+ {4096476000 7200 0 EET}
}
diff --git a/library/tzdata/Asia/Jerusalem b/library/tzdata/Asia/Jerusalem
index e1e84f4..596deb3 100644
--- a/library/tzdata/Asia/Jerusalem
+++ b/library/tzdata/Asia/Jerusalem
@@ -4,47 +4,49 @@ set TZData(:Asia/Jerusalem) {
{-9223372036854775808 8454 0 LMT}
{-2840149254 8440 0 JMT}
{-1641003640 7200 0 IST}
- {-933645600 10800 1 IDT}
- {-857358000 7200 0 IST}
+ {-933638400 10800 1 IDT}
+ {-923097600 7200 0 IST}
+ {-919036800 10800 1 IDT}
+ {-857347200 7200 0 IST}
{-844300800 10800 1 IDT}
- {-825822000 7200 0 IST}
- {-812685600 10800 1 IDT}
- {-794199600 7200 0 IST}
- {-779853600 10800 1 IDT}
- {-762656400 7200 0 IST}
+ {-825811200 7200 0 IST}
+ {-812678400 10800 1 IDT}
+ {-794188800 7200 0 IST}
+ {-779846400 10800 1 IDT}
+ {-762652800 7200 0 IST}
{-748310400 10800 1 IDT}
- {-731127600 7200 0 IST}
- {-681962400 14400 1 IDDT}
- {-673243200 10800 1 IDT}
- {-667962000 7200 0 IST}
- {-652327200 10800 1 IDT}
- {-636426000 7200 0 IST}
- {-622087200 10800 1 IDT}
+ {-731116800 7200 0 IST}
+ {-681955200 14400 1 IDDT}
+ {-673228800 10800 1 IDT}
+ {-667958400 7200 0 IST}
+ {-652320000 10800 1 IDT}
+ {-636422400 7200 0 IST}
+ {-622080000 10800 1 IDT}
{-608947200 7200 0 IST}
- {-591847200 10800 1 IDT}
+ {-591840000 10800 1 IDT}
{-572486400 7200 0 IST}
{-558576000 10800 1 IDT}
{-542851200 7200 0 IST}
{-527731200 10800 1 IDT}
{-514425600 7200 0 IST}
- {-490845600 10800 1 IDT}
- {-482986800 7200 0 IST}
- {-459475200 10800 1 IDT}
- {-451537200 7200 0 IST}
- {-428551200 10800 1 IDT}
+ {-490838400 10800 1 IDT}
+ {-482976000 7200 0 IST}
+ {-459388800 10800 1 IDT}
+ {-451526400 7200 0 IST}
+ {-428544000 10800 1 IDT}
{-418262400 7200 0 IST}
- {-400032000 10800 1 IDT}
- {-387428400 7200 0 IST}
+ {-400118400 10800 1 IDT}
+ {-387417600 7200 0 IST}
{142380000 10800 1 IDT}
{150843600 7200 0 IST}
{167176800 10800 1 IDT}
{178664400 7200 0 IST}
- {334015200 10800 1 IDT}
- {337644000 7200 0 IST}
- {452556000 10800 1 IDT}
- {462232800 7200 0 IST}
+ {334101600 10800 1 IDT}
+ {337730400 7200 0 IST}
+ {452642400 10800 1 IDT}
+ {462319200 7200 0 IST}
{482277600 10800 1 IDT}
- {495579600 7200 0 IST}
+ {494370000 7200 0 IST}
{516751200 10800 1 IDT}
{526424400 7200 0 IST}
{545436000 10800 1 IDT}
diff --git a/library/tzdata/Atlantic/Bermuda b/library/tzdata/Atlantic/Bermuda
index 2d4d983..40ab5d7 100644
--- a/library/tzdata/Atlantic/Bermuda
+++ b/library/tzdata/Atlantic/Bermuda
@@ -2,7 +2,34 @@
set TZData(:Atlantic/Bermuda) {
{-9223372036854775808 -15558 0 LMT}
- {-1262281242 -14400 0 AST}
+ {-2524506042 -15558 0 BMT}
+ {-1664307642 -11958 1 BMT}
+ {-1648932042 -15558 0 BMT}
+ {-1632080442 -11958 1 BMT}
+ {-1618692042 -15558 0 BST}
+ {-1262281242 -14400 0 AT}
+ {-882727200 -10800 1 ADT}
+ {-858538800 -14400 0 AST}
+ {-845229600 -10800 1 ADT}
+ {-825879600 -14400 0 AST}
+ {-814384800 -10800 1 ADT}
+ {-793825200 -14400 0 AST}
+ {-782935200 -10800 1 ADT}
+ {-762375600 -14400 0 AST}
+ {-713988000 -10800 1 ADT}
+ {-703710000 -14400 0 AST}
+ {-681933600 -10800 1 ADT}
+ {-672865200 -14400 0 AST}
+ {-650484000 -10800 1 ADT}
+ {-641415600 -14400 0 AST}
+ {-618429600 -10800 1 ADT}
+ {-609966000 -14400 0 AST}
+ {-586980000 -10800 1 ADT}
+ {-578516400 -14400 0 AST}
+ {-555530400 -10800 1 ADT}
+ {-546462000 -14400 0 AST}
+ {-429127200 -10800 1 ADT}
+ {-415825200 -14400 0 AST}
{136360800 -10800 0 ADT}
{152082000 -14400 0 AST}
{167810400 -10800 1 ADT}
diff --git a/library/tzdata/Australia/Adelaide b/library/tzdata/Australia/Adelaide
index 7e1b04e..5f7c1a4 100644
--- a/library/tzdata/Australia/Adelaide
+++ b/library/tzdata/Australia/Adelaide
@@ -4,14 +4,14 @@ set TZData(:Australia/Adelaide) {
{-9223372036854775808 33260 0 LMT}
{-2364110060 32400 0 ACST}
{-2230189200 34200 0 ACST}
- {-1672565340 37800 1 ACDT}
- {-1665390600 34200 0 ACST}
+ {-1672558200 37800 1 ACDT}
+ {-1665387000 34200 0 ACST}
{-883639800 37800 1 ACDT}
- {-876126600 34200 0 ACST}
+ {-876123000 34200 0 ACST}
{-860398200 37800 1 ACDT}
- {-844677000 34200 0 ACST}
+ {-844673400 34200 0 ACST}
{-828343800 37800 1 ACDT}
- {-813227400 34200 0 ACST}
+ {-813223800 34200 0 ACST}
{31501800 34200 0 ACST}
{57688200 37800 1 ACDT}
{67969800 34200 0 ACST}
diff --git a/library/tzdata/Australia/Brisbane b/library/tzdata/Australia/Brisbane
index 8422ae6..325313a 100644
--- a/library/tzdata/Australia/Brisbane
+++ b/library/tzdata/Australia/Brisbane
@@ -3,14 +3,14 @@
set TZData(:Australia/Brisbane) {
{-9223372036854775808 36728 0 LMT}
{-2366791928 36000 0 AEST}
- {-1672567140 39600 1 AEDT}
- {-1665392400 36000 0 AEST}
+ {-1672560000 39600 1 AEDT}
+ {-1665388800 36000 0 AEST}
{-883641600 39600 1 AEDT}
- {-876128400 36000 0 AEST}
+ {-876124800 36000 0 AEST}
{-860400000 39600 1 AEDT}
- {-844678800 36000 0 AEST}
+ {-844675200 36000 0 AEST}
{-828345600 39600 1 AEDT}
- {-813229200 36000 0 AEST}
+ {-813225600 36000 0 AEST}
{31500000 36000 0 AEST}
{57686400 39600 1 AEDT}
{67968000 36000 0 AEST}
diff --git a/library/tzdata/Australia/Broken_Hill b/library/tzdata/Australia/Broken_Hill
index c428061..2534b70 100644
--- a/library/tzdata/Australia/Broken_Hill
+++ b/library/tzdata/Australia/Broken_Hill
@@ -5,14 +5,14 @@ set TZData(:Australia/Broken_Hill) {
{-2364110748 36000 0 AEST}
{-2314951200 32400 0 ACST}
{-2230189200 34200 0 ACST}
- {-1672565340 37800 1 ACDT}
- {-1665390600 34200 0 ACST}
+ {-1672558200 37800 1 ACDT}
+ {-1665387000 34200 0 ACST}
{-883639800 37800 1 ACDT}
- {-876126600 34200 0 ACST}
+ {-876123000 34200 0 ACST}
{-860398200 37800 1 ACDT}
- {-844677000 34200 0 ACST}
+ {-844673400 34200 0 ACST}
{-828343800 37800 1 ACDT}
- {-813227400 34200 0 ACST}
+ {-813223800 34200 0 ACST}
{31501800 34200 0 ACST}
{57688200 37800 1 ACDT}
{67969800 34200 0 ACST}
diff --git a/library/tzdata/Australia/Currie b/library/tzdata/Australia/Currie
index 936327b..3315aa3 100644
--- a/library/tzdata/Australia/Currie
+++ b/library/tzdata/Australia/Currie
@@ -1,273 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Australia/Currie) {
- {-9223372036854775808 34528 0 LMT}
- {-2345794528 36000 0 AEST}
- {-1680508800 39600 1 AEDT}
- {-1669892400 39600 0 AEDT}
- {-1665392400 36000 0 AEST}
- {-883641600 39600 1 AEDT}
- {-876128400 36000 0 AEST}
- {-860400000 39600 1 AEDT}
- {-844678800 36000 0 AEST}
- {-828345600 39600 1 AEDT}
- {-813229200 36000 0 AEST}
- {47138400 36000 0 AEST}
- {57686400 39600 1 AEDT}
- {67968000 36000 0 AEST}
- {89136000 39600 1 AEDT}
- {100022400 36000 0 AEST}
- {120585600 39600 1 AEDT}
- {131472000 36000 0 AEST}
- {152035200 39600 1 AEDT}
- {162921600 36000 0 AEST}
- {183484800 39600 1 AEDT}
- {194976000 36000 0 AEST}
- {215539200 39600 1 AEDT}
- {226425600 36000 0 AEST}
- {246988800 39600 1 AEDT}
- {257875200 36000 0 AEST}
- {278438400 39600 1 AEDT}
- {289324800 36000 0 AEST}
- {309888000 39600 1 AEDT}
- {320774400 36000 0 AEST}
- {341337600 39600 1 AEDT}
- {352224000 36000 0 AEST}
- {372787200 39600 1 AEDT}
- {386092800 36000 0 AEST}
- {404841600 39600 1 AEDT}
- {417542400 36000 0 AEST}
- {436291200 39600 1 AEDT}
- {447177600 36000 0 AEST}
- {467740800 39600 1 AEDT}
- {478627200 36000 0 AEST}
- {499190400 39600 1 AEDT}
- {510076800 36000 0 AEST}
- {530035200 39600 1 AEDT}
- {542736000 36000 0 AEST}
- {562089600 39600 1 AEDT}
- {574790400 36000 0 AEST}
- {594144000 39600 1 AEDT}
- {606240000 36000 0 AEST}
- {625593600 39600 1 AEDT}
- {637689600 36000 0 AEST}
- {657043200 39600 1 AEDT}
- {670348800 36000 0 AEST}
- {686678400 39600 1 AEDT}
- {701798400 36000 0 AEST}
- {718128000 39600 1 AEDT}
- {733248000 36000 0 AEST}
- {749577600 39600 1 AEDT}
- {764697600 36000 0 AEST}
- {781027200 39600 1 AEDT}
- {796147200 36000 0 AEST}
- {812476800 39600 1 AEDT}
- {828201600 36000 0 AEST}
- {844531200 39600 1 AEDT}
- {859651200 36000 0 AEST}
- {875980800 39600 1 AEDT}
- {891100800 36000 0 AEST}
- {907430400 39600 1 AEDT}
- {922550400 36000 0 AEST}
- {938880000 39600 1 AEDT}
- {954000000 36000 0 AEST}
- {967305600 39600 1 AEDT}
- {985449600 36000 0 AEST}
- {1002384000 39600 1 AEDT}
- {1017504000 36000 0 AEST}
- {1033833600 39600 1 AEDT}
- {1048953600 36000 0 AEST}
- {1065283200 39600 1 AEDT}
- {1080403200 36000 0 AEST}
- {1096732800 39600 1 AEDT}
- {1111852800 36000 0 AEST}
- {1128182400 39600 1 AEDT}
- {1143907200 36000 0 AEST}
- {1159632000 39600 1 AEDT}
- {1174752000 36000 0 AEST}
- {1191686400 39600 1 AEDT}
- {1207411200 36000 0 AEST}
- {1223136000 39600 1 AEDT}
- {1238860800 36000 0 AEST}
- {1254585600 39600 1 AEDT}
- {1270310400 36000 0 AEST}
- {1286035200 39600 1 AEDT}
- {1301760000 36000 0 AEST}
- {1317484800 39600 1 AEDT}
- {1333209600 36000 0 AEST}
- {1349539200 39600 1 AEDT}
- {1365264000 36000 0 AEST}
- {1380988800 39600 1 AEDT}
- {1396713600 36000 0 AEST}
- {1412438400 39600 1 AEDT}
- {1428163200 36000 0 AEST}
- {1443888000 39600 1 AEDT}
- {1459612800 36000 0 AEST}
- {1475337600 39600 1 AEDT}
- {1491062400 36000 0 AEST}
- {1506787200 39600 1 AEDT}
- {1522512000 36000 0 AEST}
- {1538841600 39600 1 AEDT}
- {1554566400 36000 0 AEST}
- {1570291200 39600 1 AEDT}
- {1586016000 36000 0 AEST}
- {1601740800 39600 1 AEDT}
- {1617465600 36000 0 AEST}
- {1633190400 39600 1 AEDT}
- {1648915200 36000 0 AEST}
- {1664640000 39600 1 AEDT}
- {1680364800 36000 0 AEST}
- {1696089600 39600 1 AEDT}
- {1712419200 36000 0 AEST}
- {1728144000 39600 1 AEDT}
- {1743868800 36000 0 AEST}
- {1759593600 39600 1 AEDT}
- {1775318400 36000 0 AEST}
- {1791043200 39600 1 AEDT}
- {1806768000 36000 0 AEST}
- {1822492800 39600 1 AEDT}
- {1838217600 36000 0 AEST}
- {1853942400 39600 1 AEDT}
- {1869667200 36000 0 AEST}
- {1885996800 39600 1 AEDT}
- {1901721600 36000 0 AEST}
- {1917446400 39600 1 AEDT}
- {1933171200 36000 0 AEST}
- {1948896000 39600 1 AEDT}
- {1964620800 36000 0 AEST}
- {1980345600 39600 1 AEDT}
- {1996070400 36000 0 AEST}
- {2011795200 39600 1 AEDT}
- {2027520000 36000 0 AEST}
- {2043244800 39600 1 AEDT}
- {2058969600 36000 0 AEST}
- {2075299200 39600 1 AEDT}
- {2091024000 36000 0 AEST}
- {2106748800 39600 1 AEDT}
- {2122473600 36000 0 AEST}
- {2138198400 39600 1 AEDT}
- {2153923200 36000 0 AEST}
- {2169648000 39600 1 AEDT}
- {2185372800 36000 0 AEST}
- {2201097600 39600 1 AEDT}
- {2216822400 36000 0 AEST}
- {2233152000 39600 1 AEDT}
- {2248876800 36000 0 AEST}
- {2264601600 39600 1 AEDT}
- {2280326400 36000 0 AEST}
- {2296051200 39600 1 AEDT}
- {2311776000 36000 0 AEST}
- {2327500800 39600 1 AEDT}
- {2343225600 36000 0 AEST}
- {2358950400 39600 1 AEDT}
- {2374675200 36000 0 AEST}
- {2390400000 39600 1 AEDT}
- {2406124800 36000 0 AEST}
- {2422454400 39600 1 AEDT}
- {2438179200 36000 0 AEST}
- {2453904000 39600 1 AEDT}
- {2469628800 36000 0 AEST}
- {2485353600 39600 1 AEDT}
- {2501078400 36000 0 AEST}
- {2516803200 39600 1 AEDT}
- {2532528000 36000 0 AEST}
- {2548252800 39600 1 AEDT}
- {2563977600 36000 0 AEST}
- {2579702400 39600 1 AEDT}
- {2596032000 36000 0 AEST}
- {2611756800 39600 1 AEDT}
- {2627481600 36000 0 AEST}
- {2643206400 39600 1 AEDT}
- {2658931200 36000 0 AEST}
- {2674656000 39600 1 AEDT}
- {2690380800 36000 0 AEST}
- {2706105600 39600 1 AEDT}
- {2721830400 36000 0 AEST}
- {2737555200 39600 1 AEDT}
- {2753280000 36000 0 AEST}
- {2769609600 39600 1 AEDT}
- {2785334400 36000 0 AEST}
- {2801059200 39600 1 AEDT}
- {2816784000 36000 0 AEST}
- {2832508800 39600 1 AEDT}
- {2848233600 36000 0 AEST}
- {2863958400 39600 1 AEDT}
- {2879683200 36000 0 AEST}
- {2895408000 39600 1 AEDT}
- {2911132800 36000 0 AEST}
- {2926857600 39600 1 AEDT}
- {2942582400 36000 0 AEST}
- {2958912000 39600 1 AEDT}
- {2974636800 36000 0 AEST}
- {2990361600 39600 1 AEDT}
- {3006086400 36000 0 AEST}
- {3021811200 39600 1 AEDT}
- {3037536000 36000 0 AEST}
- {3053260800 39600 1 AEDT}
- {3068985600 36000 0 AEST}
- {3084710400 39600 1 AEDT}
- {3100435200 36000 0 AEST}
- {3116764800 39600 1 AEDT}
- {3132489600 36000 0 AEST}
- {3148214400 39600 1 AEDT}
- {3163939200 36000 0 AEST}
- {3179664000 39600 1 AEDT}
- {3195388800 36000 0 AEST}
- {3211113600 39600 1 AEDT}
- {3226838400 36000 0 AEST}
- {3242563200 39600 1 AEDT}
- {3258288000 36000 0 AEST}
- {3274012800 39600 1 AEDT}
- {3289737600 36000 0 AEST}
- {3306067200 39600 1 AEDT}
- {3321792000 36000 0 AEST}
- {3337516800 39600 1 AEDT}
- {3353241600 36000 0 AEST}
- {3368966400 39600 1 AEDT}
- {3384691200 36000 0 AEST}
- {3400416000 39600 1 AEDT}
- {3416140800 36000 0 AEST}
- {3431865600 39600 1 AEDT}
- {3447590400 36000 0 AEST}
- {3463315200 39600 1 AEDT}
- {3479644800 36000 0 AEST}
- {3495369600 39600 1 AEDT}
- {3511094400 36000 0 AEST}
- {3526819200 39600 1 AEDT}
- {3542544000 36000 0 AEST}
- {3558268800 39600 1 AEDT}
- {3573993600 36000 0 AEST}
- {3589718400 39600 1 AEDT}
- {3605443200 36000 0 AEST}
- {3621168000 39600 1 AEDT}
- {3636892800 36000 0 AEST}
- {3653222400 39600 1 AEDT}
- {3668947200 36000 0 AEST}
- {3684672000 39600 1 AEDT}
- {3700396800 36000 0 AEST}
- {3716121600 39600 1 AEDT}
- {3731846400 36000 0 AEST}
- {3747571200 39600 1 AEDT}
- {3763296000 36000 0 AEST}
- {3779020800 39600 1 AEDT}
- {3794745600 36000 0 AEST}
- {3810470400 39600 1 AEDT}
- {3826195200 36000 0 AEST}
- {3842524800 39600 1 AEDT}
- {3858249600 36000 0 AEST}
- {3873974400 39600 1 AEDT}
- {3889699200 36000 0 AEST}
- {3905424000 39600 1 AEDT}
- {3921148800 36000 0 AEST}
- {3936873600 39600 1 AEDT}
- {3952598400 36000 0 AEST}
- {3968323200 39600 1 AEDT}
- {3984048000 36000 0 AEST}
- {4000377600 39600 1 AEDT}
- {4016102400 36000 0 AEST}
- {4031827200 39600 1 AEDT}
- {4047552000 36000 0 AEST}
- {4063276800 39600 1 AEDT}
- {4079001600 36000 0 AEST}
- {4094726400 39600 1 AEDT}
+if {![info exists TZData(Australia/Hobart)]} {
+ LoadTimeZoneFile Australia/Hobart
}
+set TZData(:Australia/Currie) $TZData(:Australia/Hobart)
diff --git a/library/tzdata/Australia/Darwin b/library/tzdata/Australia/Darwin
index e77605d..13f13ee 100644
--- a/library/tzdata/Australia/Darwin
+++ b/library/tzdata/Australia/Darwin
@@ -4,12 +4,12 @@ set TZData(:Australia/Darwin) {
{-9223372036854775808 31400 0 LMT}
{-2364108200 32400 0 ACST}
{-2230189200 34200 0 ACST}
- {-1672565340 37800 1 ACDT}
- {-1665390600 34200 0 ACST}
+ {-1672558200 37800 1 ACDT}
+ {-1665387000 34200 0 ACST}
{-883639800 37800 1 ACDT}
- {-876126600 34200 0 ACST}
+ {-876123000 34200 0 ACST}
{-860398200 37800 1 ACDT}
- {-844677000 34200 0 ACST}
+ {-844673400 34200 0 ACST}
{-828343800 37800 1 ACDT}
- {-813227400 34200 0 ACST}
+ {-813223800 34200 0 ACST}
}
diff --git a/library/tzdata/Australia/Eucla b/library/tzdata/Australia/Eucla
index 8008980..1d81a3d 100644
--- a/library/tzdata/Australia/Eucla
+++ b/library/tzdata/Australia/Eucla
@@ -3,12 +3,12 @@
set TZData(:Australia/Eucla) {
{-9223372036854775808 30928 0 LMT}
{-2337928528 31500 0 +0945}
- {-1672562640 35100 1 +0945}
- {-1665387900 31500 0 +0945}
+ {-1672555500 35100 1 +0945}
+ {-1665384300 31500 0 +0945}
{-883637100 35100 1 +0945}
- {-876123900 31500 0 +0945}
+ {-876120300 31500 0 +0945}
{-860395500 35100 1 +0945}
- {-844674300 31500 0 +0945}
+ {-844670700 31500 0 +0945}
{-836473500 35100 0 +0945}
{152039700 35100 1 +0945}
{162926100 31500 0 +0945}
diff --git a/library/tzdata/Australia/Hobart b/library/tzdata/Australia/Hobart
index bf5adf0..5ff675e 100644
--- a/library/tzdata/Australia/Hobart
+++ b/library/tzdata/Australia/Hobart
@@ -4,14 +4,18 @@ set TZData(:Australia/Hobart) {
{-9223372036854775808 35356 0 LMT}
{-2345795356 36000 0 AEST}
{-1680508800 39600 1 AEDT}
- {-1669892400 39600 0 AEDT}
- {-1665392400 36000 0 AEST}
+ {-1665388800 36000 0 AEST}
+ {-1646640000 39600 1 AEDT}
+ {-1635753600 36000 0 AEST}
+ {-1615190400 39600 1 AEDT}
+ {-1604304000 36000 0 AEST}
+ {-1583920800 36000 0 AEST}
{-883641600 39600 1 AEDT}
- {-876128400 36000 0 AEST}
+ {-876124800 36000 0 AEST}
{-860400000 39600 1 AEDT}
- {-844678800 36000 0 AEST}
+ {-844675200 36000 0 AEST}
{-828345600 39600 1 AEDT}
- {-813229200 36000 0 AEST}
+ {-813225600 36000 0 AEST}
{-94730400 36000 0 AEST}
{-71136000 39600 1 AEDT}
{-55411200 36000 0 AEST}
diff --git a/library/tzdata/Australia/Lindeman b/library/tzdata/Australia/Lindeman
index 91ad0a6..1be6962 100644
--- a/library/tzdata/Australia/Lindeman
+++ b/library/tzdata/Australia/Lindeman
@@ -3,14 +3,14 @@
set TZData(:Australia/Lindeman) {
{-9223372036854775808 35756 0 LMT}
{-2366790956 36000 0 AEST}
- {-1672567140 39600 1 AEDT}
- {-1665392400 36000 0 AEST}
+ {-1672560000 39600 1 AEDT}
+ {-1665388800 36000 0 AEST}
{-883641600 39600 1 AEDT}
- {-876128400 36000 0 AEST}
+ {-876124800 36000 0 AEST}
{-860400000 39600 1 AEDT}
- {-844678800 36000 0 AEST}
+ {-844675200 36000 0 AEST}
{-828345600 39600 1 AEDT}
- {-813229200 36000 0 AEST}
+ {-813225600 36000 0 AEST}
{31500000 36000 0 AEST}
{57686400 39600 1 AEDT}
{67968000 36000 0 AEST}
diff --git a/library/tzdata/Australia/Melbourne b/library/tzdata/Australia/Melbourne
index 81777df..77e9067 100644
--- a/library/tzdata/Australia/Melbourne
+++ b/library/tzdata/Australia/Melbourne
@@ -3,14 +3,14 @@
set TZData(:Australia/Melbourne) {
{-9223372036854775808 34792 0 LMT}
{-2364111592 36000 0 AEST}
- {-1672567140 39600 1 AEDT}
- {-1665392400 36000 0 AEST}
+ {-1672560000 39600 1 AEDT}
+ {-1665388800 36000 0 AEST}
{-883641600 39600 1 AEDT}
- {-876128400 36000 0 AEST}
+ {-876124800 36000 0 AEST}
{-860400000 39600 1 AEDT}
- {-844678800 36000 0 AEST}
+ {-844675200 36000 0 AEST}
{-828345600 39600 1 AEDT}
- {-813229200 36000 0 AEST}
+ {-813225600 36000 0 AEST}
{31500000 36000 0 AEST}
{57686400 39600 1 AEDT}
{67968000 36000 0 AEST}
diff --git a/library/tzdata/Australia/Perth b/library/tzdata/Australia/Perth
index 6ccbca8..4ed3cba 100644
--- a/library/tzdata/Australia/Perth
+++ b/library/tzdata/Australia/Perth
@@ -3,12 +3,12 @@
set TZData(:Australia/Perth) {
{-9223372036854775808 27804 0 LMT}
{-2337925404 28800 0 AWST}
- {-1672559940 32400 1 AWDT}
- {-1665385200 28800 0 AWST}
+ {-1672552800 32400 1 AWDT}
+ {-1665381600 28800 0 AWST}
{-883634400 32400 1 AWDT}
- {-876121200 28800 0 AWST}
+ {-876117600 28800 0 AWST}
{-860392800 32400 1 AWDT}
- {-844671600 28800 0 AWST}
+ {-844668000 28800 0 AWST}
{-836470800 32400 0 AWST}
{152042400 32400 1 AWDT}
{162928800 28800 0 AWST}
diff --git a/library/tzdata/Australia/Sydney b/library/tzdata/Australia/Sydney
index b1c4411..fd01af6 100644
--- a/library/tzdata/Australia/Sydney
+++ b/library/tzdata/Australia/Sydney
@@ -3,14 +3,14 @@
set TZData(:Australia/Sydney) {
{-9223372036854775808 36292 0 LMT}
{-2364113092 36000 0 AEST}
- {-1672567140 39600 1 AEDT}
- {-1665392400 36000 0 AEST}
+ {-1672560000 39600 1 AEDT}
+ {-1665388800 36000 0 AEST}
{-883641600 39600 1 AEDT}
- {-876128400 36000 0 AEST}
+ {-876124800 36000 0 AEST}
{-860400000 39600 1 AEDT}
- {-844678800 36000 0 AEST}
+ {-844675200 36000 0 AEST}
{-828345600 39600 1 AEDT}
- {-813229200 36000 0 AEST}
+ {-813225600 36000 0 AEST}
{31500000 36000 0 AEST}
{57686400 39600 1 AEDT}
{67968000 36000 0 AEST}
diff --git a/library/tzdata/Europe/Volgograd b/library/tzdata/Europe/Volgograd
index 3938683..2ce2dfe 100644
--- a/library/tzdata/Europe/Volgograd
+++ b/library/tzdata/Europe/Volgograd
@@ -69,4 +69,5 @@ set TZData(:Europe/Volgograd) {
{1301180400 14400 0 +04}
{1414274400 10800 0 +03}
{1540681200 14400 0 +04}
+ {1609020000 10800 0 +03}
}
diff --git a/library/tzdata/Indian/Mahe b/library/tzdata/Indian/Mahe
index 3dd5b40..dcafc36 100644
--- a/library/tzdata/Indian/Mahe
+++ b/library/tzdata/Indian/Mahe
@@ -2,5 +2,5 @@
set TZData(:Indian/Mahe) {
{-9223372036854775808 13308 0 LMT}
- {-2006653308 14400 0 +04}
+ {-1988163708 14400 0 +04}
}
diff --git a/library/tzdata/Pacific/Efate b/library/tzdata/Pacific/Efate
index a026ee1..5a22546 100644
--- a/library/tzdata/Pacific/Efate
+++ b/library/tzdata/Pacific/Efate
@@ -3,9 +3,11 @@
set TZData(:Pacific/Efate) {
{-9223372036854775808 40396 0 LMT}
{-1829387596 39600 0 +11}
+ {125409600 43200 1 +11}
+ {133876800 39600 0 +11}
{433256400 43200 1 +11}
{448977600 39600 0 +11}
- {467298000 43200 1 +11}
+ {464706000 43200 1 +11}
{480427200 39600 0 +11}
{496760400 43200 1 +11}
{511876800 39600 0 +11}
diff --git a/library/word.tcl b/library/word.tcl
index 0d66a32..58ff4dc 100644
--- a/library/word.tcl
+++ b/library/word.tcl
@@ -4,8 +4,8 @@
# strings. This file is primarily needed so Tk text and entry widgets behave
# properly for different platforms.
#
-# Copyright (c) 1996 by Sun Microsystems, Inc.
-# Copyright (c) 1998 by Scritpics Corporation.
+# Copyright © 1996 Sun Microsystems, Inc.
+# Copyright © 1998 Scritpics 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/tommath.h b/libtommath/tommath.h
index 8f2867e..053bf09 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -237,22 +237,13 @@ TOOM_SQR_CUTOFF;
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 405)
# define MP_DEPRECATED(x) __attribute__((deprecated("replaced by " #x)))
-#elif defined(_MSC_VER) && _MSC_VER >= 1500
-# define MP_DEPRECATED(x) __declspec(deprecated("replaced by " #x))
-#else
-# define MP_DEPRECATED(x)
-#endif
-
-#ifndef MP_NO_DEPRECATED_PRAGMA
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 301)
# define PRIVATE_MP_DEPRECATED_PRAGMA(s) _Pragma(#s)
# define MP_DEPRECATED_PRAGMA(s) PRIVATE_MP_DEPRECATED_PRAGMA(GCC warning s)
#elif defined(_MSC_VER) && _MSC_VER >= 1500
+# define MP_DEPRECATED(x) __declspec(deprecated("replaced by " #x))
# define MP_DEPRECATED_PRAGMA(s) __pragma(message(s))
-#endif
-#endif
-
-#ifndef MP_DEPRECATED_PRAGMA
+#else
+# define MP_DEPRECATED(s)
# define MP_DEPRECATED_PRAGMA(s)
#endif
@@ -341,11 +332,7 @@ mp_err mp_init_u64(mp_int *a, uint64_t b) MP_WUR;
uint32_t mp_get_mag_u32(const mp_int *a) MP_WUR;
uint64_t mp_get_mag_u64(const mp_int *a) MP_WUR;
unsigned long mp_get_mag_ul(const mp_int *a) MP_WUR;
-#ifdef _MSC_VER
-#define mp_get_mag_ull(a) ((unsigned __int64)mp_get_mag_u64(a))
-#else
-unsigned long long mp_get_mag_ull(const mp_int *a) MP_WUR;
-#endif
+#define mp_get_mag_ull(a) ((unsigned long long)mp_get_mag_u64(a))
/* get integer, set integer (long) */
long mp_get_l(const mp_int *a) MP_WUR;
@@ -357,27 +344,15 @@ mp_err mp_init_l(mp_int *a, long b) MP_WUR;
void mp_set_ul(mp_int *a, unsigned long b);
mp_err mp_init_ul(mp_int *a, unsigned long b) MP_WUR;
-#ifdef _MSC_VER
/* get integer, set integer (long long) */
-#define mp_get_ll(a) ((__int64)mp_get_i64(a))
+#define mp_get_ll(a) ((long long)mp_get_i64(a))
#define mp_set_ll(a,b) mp_set_i64(a,b)
#define mp_init_ll(a,b) mp_init_i64(a,b)
/* get integer, set integer (unsigned long long) */
-#define mp_get_ull(a) ((unsigned __int64)mp_get_i64(a))
+#define mp_get_ull(a) ((unsigned long long)mp_get_i64(a))
#define mp_set_ull(a,b) mp_set_u64(a,b)
#define mp_init_ull(a,b) mp_init_u64(a,b)
-#else
-/* get integer, set integer (long long) */
-long long mp_get_ll(const mp_int *a) MP_WUR;
-void mp_set_ll(mp_int *a, long long b);
-mp_err mp_init_ll(mp_int *a, long long b) MP_WUR;
-
-/* get integer, set integer (unsigned long long) */
-#define mp_get_ull(a) ((unsigned long long)mp_get_ll(a))
-void mp_set_ull(mp_int *a, unsigned long long b);
-mp_err mp_init_ull(mp_int *a, unsigned long long b) MP_WUR;
-#endif
/* set to single unsigned digit, up to MP_DIGIT_MAX */
void mp_set(mp_int *a, mp_digit b);
@@ -386,14 +361,10 @@ mp_err mp_init_set(mp_int *a, mp_digit b) MP_WUR;
/* get integer, set integer and init with integer (deprecated) */
MP_DEPRECATED(mp_get_mag_u32/mp_get_u32) unsigned long mp_get_int(const mp_int *a) MP_WUR;
MP_DEPRECATED(mp_get_mag_ul/mp_get_ul) unsigned long mp_get_long(const mp_int *a) MP_WUR;
-#ifdef _MSC_VER
-MP_DEPRECATED(mp_get_mag_ull/mp_get_ull) unsigned __int64 mp_get_long_long(const mp_int *a) MP_WUR;
-#endif
+MP_DEPRECATED(mp_get_mag_ull/mp_get_ull) unsigned long long mp_get_long_long(const mp_int *a) MP_WUR;
MP_DEPRECATED(mp_set_ul) mp_err mp_set_int(mp_int *a, unsigned long b);
MP_DEPRECATED(mp_set_ul) mp_err mp_set_long(mp_int *a, unsigned long b);
-#ifdef _MSC_VER
-MP_DEPRECATED(mp_set_ull) mp_err mp_set_long_long(mp_int *a, unsigned __int64 b);
-#endif
+MP_DEPRECATED(mp_set_ull) mp_err mp_set_long_long(mp_int *a, unsigned long long b);
MP_DEPRECATED(mp_init_ul) mp_err mp_init_set_int(mp_int *a, unsigned long b) MP_WUR;
/* copy, b = a */
diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile
index 93fd843..1ee3bf1 100644
--- a/macosx/GNUmakefile
+++ b/macosx/GNUmakefile
@@ -88,7 +88,7 @@ space := ${empty} ${empty}
objdir = $(subst ${space},\ ,${OBJ_DIR})
develop_make_args := BUILD_STYLE=Development CONFIGURE_ARGS=--enable-symbols
-deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install \
+deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install-strip \
EXTRA_CFLAGS=-DNDEBUG
embedded_make_args := EMBEDDED_BUILD=1
install_make_args := INSTALL_BUILD=1
@@ -144,7 +144,7 @@ ${objdir}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure \
mkdir -p "${OBJ_DIR}" && cd "${OBJ_DIR}" && \
if [ ${UNIX_DIR}/configure -nt config.status ]; then ${UNIX_DIR}/configure -C \
--prefix="${PREFIX}" --bindir="${BINDIR}" --libdir="${LIBDIR}" \
- --mandir="${MANDIR}" --enable-framework --enable-dtrace \
+ --mandir="${MANDIR}" --enable-framework --enable-dtrace --disable-zipfs \
${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}; else ./config.status; fi
build-${PROJECT}: ${objdir}/Makefile
diff --git a/macosx/Tcl-Common.xcconfig b/macosx/Tcl-Common.xcconfig
index a2ab26e..84c6303 100644
--- a/macosx/Tcl-Common.xcconfig
+++ b/macosx/Tcl-Common.xcconfig
@@ -19,7 +19,7 @@ GCC_NO_COMMON_BLOCKS = YES
GCC_DYNAMIC_NO_PIC = YES
GCC_VERSION = 4.2
GCC = gcc-$(GCC_VERSION)
-WARNING_CFLAGS = -Wall -Wextra -Wshadow -Wwrite-strings -Wpointer-arith -Wc++-compat -Wdeclaration-after-statement -Winit-self -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS)
+WARNING_CFLAGS = -Wall -Wextra -Wshadow -Wwrite-strings -Wpointer-arith -Wc++-compat -Winit-self -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS)
BINDIR = $(PREFIX)/bin
CFLAGS = $(CFLAGS)
CPPFLAGS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) $(CPPFLAGS)
diff --git a/macosx/Tcl.xcode/project.pbxproj b/macosx/Tcl.xcode/project.pbxproj
index 8004ffe..a069011 100644
--- a/macosx/Tcl.xcode/project.pbxproj
+++ b/macosx/Tcl.xcode/project.pbxproj
@@ -770,15 +770,8 @@
F96D442908F272B8004A47F5 /* loadICU.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = loadICU.tcl; sourceTree = "<group>"; };
F96D442A08F272B8004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D442B08F272B8004A47F5 /* makeTestCases.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = makeTestCases.tcl; sourceTree = "<group>"; };
- F96D442C08F272B8004A47F5 /* man2help.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2help.tcl; sourceTree = "<group>"; };
- F96D442D08F272B8004A47F5 /* man2help2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2help2.tcl; sourceTree = "<group>"; };
- F96D442E08F272B8004A47F5 /* man2html.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2html.tcl; sourceTree = "<group>"; };
- F96D442F08F272B8004A47F5 /* man2html1.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2html1.tcl; sourceTree = "<group>"; };
- F96D443008F272B8004A47F5 /* man2html2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2html2.tcl; sourceTree = "<group>"; };
- F96D443108F272B8004A47F5 /* man2tcl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = man2tcl.c; sourceTree = "<group>"; };
F96D443208F272B8004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
F96D443308F272B8004A47F5 /* regexpTestLib.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = regexpTestLib.tcl; sourceTree = "<group>"; };
- F96D443508F272B8004A47F5 /* tcl.hpj.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.hpj.in; sourceTree = "<group>"; };
F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "tcltk-man2html.tcl"; sourceTree = "<group>"; };
F96D443A08F272B9004A47F5 /* tclZIC.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclZIC.tcl; sourceTree = "<group>"; };
F96D443B08F272B9004A47F5 /* uniClass.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniClass.tcl; sourceTree = "<group>"; };
@@ -838,7 +831,6 @@
F96D447D08F272BA004A47F5 /* stub16.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stub16.c; sourceTree = "<group>"; };
F96D447E08F272BA004A47F5 /* tcl.dsp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.dsp; sourceTree = "<group>"; };
F96D447F08F272BA004A47F5 /* tcl.dsw */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.dsw; sourceTree = "<group>"; };
- F96D448008F272BA004A47F5 /* tcl.hpj.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.hpj.in; sourceTree = "<group>"; };
F96D448108F272BA004A47F5 /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; };
F96D448208F272BA004A47F5 /* tcl.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.rc; sourceTree = "<group>"; };
F96D448308F272BA004A47F5 /* tclAppInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclAppInit.c; sourceTree = "<group>"; };
@@ -1649,17 +1641,9 @@
F96D442708F272B8004A47F5 /* index.tcl */,
F96D442808F272B8004A47F5 /* installData.tcl */,
F96D442908F272B8004A47F5 /* loadICU.tcl */,
- F96D442A08F272B8004A47F5 /* Makefile.in */,
F96D442B08F272B8004A47F5 /* makeTestCases.tcl */,
- F96D442C08F272B8004A47F5 /* man2help.tcl */,
- F96D442D08F272B8004A47F5 /* man2help2.tcl */,
- F96D442E08F272B8004A47F5 /* man2html.tcl */,
- F96D442F08F272B8004A47F5 /* man2html1.tcl */,
- F96D443008F272B8004A47F5 /* man2html2.tcl */,
- F96D443108F272B8004A47F5 /* man2tcl.c */,
F96D443208F272B8004A47F5 /* README */,
F96D443308F272B8004A47F5 /* regexpTestLib.tcl */,
- F96D443508F272B8004A47F5 /* tcl.hpj.in */,
F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */,
F96D443A08F272B9004A47F5 /* tclZIC.tcl */,
F92D7F100DE777240033A13A /* tsdPerf.tcl */,
@@ -1744,7 +1728,6 @@
F96D447D08F272BA004A47F5 /* stub16.c */,
F96D447E08F272BA004A47F5 /* tcl.dsp */,
F96D447F08F272BA004A47F5 /* tcl.dsw */,
- F96D448008F272BA004A47F5 /* tcl.hpj.in */,
F96D448108F272BA004A47F5 /* tcl.m4 */,
F96D448208F272BA004A47F5 /* tcl.rc */,
F96D448308F272BA004A47F5 /* tclAppInit.c */,
diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj
index 6528616..2b08bf9 100644
--- a/macosx/Tcl.xcodeproj/project.pbxproj
+++ b/macosx/Tcl.xcodeproj/project.pbxproj
@@ -770,15 +770,8 @@
F96D442908F272B8004A47F5 /* loadICU.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = loadICU.tcl; sourceTree = "<group>"; };
F96D442A08F272B8004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D442B08F272B8004A47F5 /* makeTestCases.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = makeTestCases.tcl; sourceTree = "<group>"; };
- F96D442C08F272B8004A47F5 /* man2help.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2help.tcl; sourceTree = "<group>"; };
- F96D442D08F272B8004A47F5 /* man2help2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2help2.tcl; sourceTree = "<group>"; };
- F96D442E08F272B8004A47F5 /* man2html.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2html.tcl; sourceTree = "<group>"; };
- F96D442F08F272B8004A47F5 /* man2html1.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2html1.tcl; sourceTree = "<group>"; };
- F96D443008F272B8004A47F5 /* man2html2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2html2.tcl; sourceTree = "<group>"; };
- F96D443108F272B8004A47F5 /* man2tcl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = man2tcl.c; sourceTree = "<group>"; };
F96D443208F272B8004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
F96D443308F272B8004A47F5 /* regexpTestLib.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = regexpTestLib.tcl; sourceTree = "<group>"; };
- F96D443508F272B8004A47F5 /* tcl.hpj.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.hpj.in; sourceTree = "<group>"; };
F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "tcltk-man2html.tcl"; sourceTree = "<group>"; };
F96D443A08F272B9004A47F5 /* tclZIC.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclZIC.tcl; sourceTree = "<group>"; };
F96D443B08F272B9004A47F5 /* uniClass.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniClass.tcl; sourceTree = "<group>"; };
@@ -838,7 +831,6 @@
F96D447D08F272BA004A47F5 /* stub16.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stub16.c; sourceTree = "<group>"; };
F96D447E08F272BA004A47F5 /* tcl.dsp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.dsp; sourceTree = "<group>"; };
F96D447F08F272BA004A47F5 /* tcl.dsw */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.dsw; sourceTree = "<group>"; };
- F96D448008F272BA004A47F5 /* tcl.hpj.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.hpj.in; sourceTree = "<group>"; };
F96D448108F272BA004A47F5 /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; };
F96D448208F272BA004A47F5 /* tcl.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.rc; sourceTree = "<group>"; };
F96D448308F272BA004A47F5 /* tclAppInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclAppInit.c; sourceTree = "<group>"; };
@@ -1643,23 +1635,13 @@
isa = PBXGroup;
children = (
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */,
- F96D43D208F272B8004A47F5 /* configure */,
- F96D43D308F272B8004A47F5 /* configure.ac */,
F96D442508F272B8004A47F5 /* genStubs.tcl */,
F96D442708F272B8004A47F5 /* index.tcl */,
F96D442808F272B8004A47F5 /* installData.tcl */,
F96D442908F272B8004A47F5 /* loadICU.tcl */,
- F96D442A08F272B8004A47F5 /* Makefile.in */,
F96D442B08F272B8004A47F5 /* makeTestCases.tcl */,
- F96D442C08F272B8004A47F5 /* man2help.tcl */,
- F96D442D08F272B8004A47F5 /* man2help2.tcl */,
- F96D442E08F272B8004A47F5 /* man2html.tcl */,
- F96D442F08F272B8004A47F5 /* man2html1.tcl */,
- F96D443008F272B8004A47F5 /* man2html2.tcl */,
- F96D443108F272B8004A47F5 /* man2tcl.c */,
F96D443208F272B8004A47F5 /* README */,
F96D443308F272B8004A47F5 /* regexpTestLib.tcl */,
- F96D443508F272B8004A47F5 /* tcl.hpj.in */,
F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */,
F96D443A08F272B9004A47F5 /* tclZIC.tcl */,
F92D7F100DE777240033A13A /* tsdPerf.tcl */,
@@ -1744,7 +1726,6 @@
F96D447D08F272BA004A47F5 /* stub16.c */,
F96D447E08F272BA004A47F5 /* tcl.dsp */,
F96D447F08F272BA004A47F5 /* tcl.dsw */,
- F96D448008F272BA004A47F5 /* tcl.hpj.in */,
F96D448108F272BA004A47F5 /* tcl.m4 */,
F96D448208F272BA004A47F5 /* tcl.rc */,
F96D448308F272BA004A47F5 /* tclAppInit.c */,
diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c
index 09fc4b6..57ed0b9 100644
--- a/macosx/tclMacOSXBundle.c
+++ b/macosx/tclMacOSXBundle.c
@@ -4,8 +4,8 @@
* This file implements functions that inspect CFBundle structures on
* MacOS X.
*
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2003-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2003-2009 Daniel A. Steffen <das@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c
index 70e94b6..b1961e9 100644
--- a/macosx/tclMacOSXFCmd.c
+++ b/macosx/tclMacOSXFCmd.c
@@ -4,7 +4,7 @@
* This file implements the MacOSX specific portion of file manipulation
* subcommands of the "file" command.
*
- * Copyright (c) 2003-2007 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2003-2007 Daniel A. Steffen <das@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -641,7 +641,7 @@ SetOSTypeFromAny(
Tcl_Encoding encoding = Tcl_GetEncoding(NULL, "macRoman");
size_t length;
- string = TclGetStringFromObj(objPtr, &length);
+ string = Tcl_GetStringFromObj(objPtr, &length);
Tcl_UtfToExternalDString(encoding, string, length, &ds);
if (Tcl_DStringLength(&ds) > 4) {
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c
index 04f6025..4a0b73c 100644
--- a/macosx/tclMacOSXNotify.c
+++ b/macosx/tclMacOSXNotify.c
@@ -5,9 +5,9 @@
* based notifier, which is the lowest-level part of the Tcl event loop.
* This file works together with generic/tclNotify.c.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -239,7 +239,7 @@ static OSSpinLock notifierLock = SPINLOCK_INIT;
#define SpinLockLockDbg(p) \
if (!SpinLockTry(p)) { \
- Tcl_WideInt s = TclpGetWideClicks(), e; \
+ long long s = TclpGetWideClicks(), e; \
\
SpinLockLock(p); \
e = TclpGetWideClicks(); \
@@ -700,7 +700,7 @@ Tcl_InitNotifier(void)
/*
*----------------------------------------------------------------------
*
- * TclMacOSXNotifierAddRunLoopMode --
+ * Tcl_MacOSXNotifierAddRunLoopMode --
*
* Add the tcl notifier RunLoop source, observer and timer (if any)
* to the given RunLoop mode.
@@ -715,7 +715,7 @@ Tcl_InitNotifier(void)
*/
void
-TclMacOSXNotifierAddRunLoopMode(
+Tcl_MacOSXNotifierAddRunLoopMode(
const void *runLoopMode)
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -2138,10 +2138,10 @@ AtForkChild(void)
#else /* HAVE_COREFOUNDATION */
void
-TclMacOSXNotifierAddRunLoopMode(
+Tcl_MacOSXNotifierAddRunLoopMode(
const void *runLoopMode)
{
- Tcl_Panic("TclMacOSXNotifierAddRunLoopMode: "
+ Tcl_Panic("Tcl_MacOSXNotifierAddRunLoopMode: "
"Tcl not built with CoreFoundation support");
}
diff --git a/tests-perf/clock.perf.tcl b/tests-perf/clock.perf.tcl
index c0da0ab..7bcee75 100644
--- a/tests-perf/clock.perf.tcl
+++ b/tests-perf/clock.perf.tcl
@@ -9,7 +9,7 @@
#
# ------------------------------------------------------------------------
#
-# Copyright (c) 2014 Serg G. Brester (aka sebres)
+# Copyright © 2014 Serg G. Brester (aka sebres)
#
# See the file "license.terms" for information on usage and redistribution
# of this file.
diff --git a/tests-perf/test-performance.tcl b/tests-perf/test-performance.tcl
index af8ee96..e805b43 100644
--- a/tests-perf/test-performance.tcl
+++ b/tests-perf/test-performance.tcl
@@ -9,7 +9,7 @@
#
# ------------------------------------------------------------------------
#
-# Copyright (c) 2014 Serg G. Brester (aka sebres)
+# Copyright © 2014 Serg G. Brester (aka sebres)
#
# See the file "license.terms" for information on usage and redistribution
# of this file.
diff --git a/tests-perf/timer-event.perf.tcl b/tests-perf/timer-event.perf.tcl
index f68a56a..5d1d3c6 100644
--- a/tests-perf/timer-event.perf.tcl
+++ b/tests-perf/timer-event.perf.tcl
@@ -9,7 +9,7 @@
#
# ------------------------------------------------------------------------
#
-# Copyright (c) 2014 Serg G. Brester (aka sebres)
+# Copyright © 2014 Serg G. Brester (aka sebres)
#
# See the file "license.terms" for information on usage and redistribution
# of this file.
diff --git a/tests/aaa_exit.test b/tests/aaa_exit.test
index d4d2a7c..fffc1cc 100644
--- a/tests/aaa_exit.test
+++ b/tests/aaa_exit.test
@@ -4,9 +4,9 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 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/tests/all.tcl b/tests/all.tcl
index c72334a..8cd0cf4 100644
--- a/tests/all.tcl
+++ b/tests/all.tcl
@@ -4,14 +4,13 @@
# tests. Execute it by invoking "source all.tcl" when running tcltest
# in this directory.
#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# Copyright (c) 2000 by Ajuba Solutions
+# Copyright © 1998-1999 Scriptics Corporation.
+# Copyright © 2000 Ajuba Solutions
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
package prefer latest
-package require Tcl 8.5-
package require tcltest 2.5
namespace import ::tcltest::*
diff --git a/tests/append.test b/tests/append.test
index ef4a194..a174615 100644
--- a/tests/append.test
+++ b/tests/append.test
@@ -4,9 +4,9 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -32,7 +32,7 @@ test append-1.3 {append command} {
test append-2.1 {long appends} {
set x ""
- for {set i 0} {$i < 1000} {set i [expr $i+1]} {
+ for {set i 0} {$i < 1000} {incr i} {
append x "foobar "
}
set y "foobar"
@@ -158,7 +158,7 @@ test append-5.1 {long lappends} -setup {
if {$l != $size} {
return "length mismatch: should have been $size, was $l"
}
- for {set i 0} {$i < $size} {set i [expr $i+1]} {
+ for {set i 0} {$i < $size} {incr i} {
set j [lindex $var $i]
if {$j ne "item $i"} {
return "element $i should have been \"item $i\", was \"$j\""
diff --git a/tests/appendComp.test b/tests/appendComp.test
index 66941a9..66f2a5c 100644
--- a/tests/appendComp.test
+++ b/tests/appendComp.test
@@ -4,9 +4,9 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -41,7 +41,7 @@ test appendComp-1.3 {append command} {
test appendComp-2.1 {long appends} {
proc foo {} {
set x ""
- for {set i 0} {$i < 1000} {set i [expr $i+1]} {
+ for {set i 0} {$i < 1000} {incr i} {
append x "foobar "
}
set y "foobar"
@@ -223,7 +223,7 @@ test appendComp-5.1 {long lappends} -setup {
}
} -body {
set x ""
- for {set i 0} {$i < 300} {set i [expr $i+1]} {
+ for {set i 0} {$i < 300} {incr i} {
lappend x "item $i"
}
check $x 300
diff --git a/tests/apply.test b/tests/apply.test
index 227d3c1..e2be172 100644
--- a/tests/apply.test
+++ b/tests/apply.test
@@ -4,10 +4,10 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# Copyright (c) 2005-2006 Miguel Sofer
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
+# Copyright © 2005-2006 Miguel Sofer
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -25,7 +25,7 @@ testConstraint memory [llength [info commands memory]]
# Tests for wrong number of arguments
-test apply-1.1 {too few arguments} -returnCodes error -body {
+test apply-1.1 {not enough arguments} -returnCodes error -body {
apply
} -result {wrong # args: should be "apply lambdaExpr ?arg ...?"}
diff --git a/tests/assemble.test b/tests/assemble.test
index d417d4b..d4e44f8 100644
--- a/tests/assemble.test
+++ b/tests/assemble.test
@@ -2,8 +2,8 @@
#
# Test suite for the 'tcl::unsupported::assemble' command
#
-# Copyright (c) 2010 by Ozgur Dogan Ugurlu.
-# Copyright (c) 2010 by Kevin B. Kenny.
+# Copyright © 2010 Ozgur Dogan Ugurlu.
+# Copyright © 2010 Kevin B. Kenny.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/tests/assocd.test b/tests/assocd.test
index 7d89daa..9a200ae 100644
--- a/tests/assocd.test
+++ b/tests/assocd.test
@@ -4,9 +4,9 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1994 The Regents of the University of California.
-# Copyright (c) 1994 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1994 The Regents of the University of California.
+# Copyright © 1994 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
}
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testgetassocdata [llength [info commands testgetassocdata]]
testConstraint testsetassocdata [llength [info commands testsetassocdata]]
diff --git a/tests/async.test b/tests/async.test
index ad058a0..0f0af0e 100644
--- a/tests/async.test
+++ b/tests/async.test
@@ -4,9 +4,9 @@
# library procedures. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright (c) 1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -17,10 +17,10 @@ if {"::tcltest" ni [namespace children]} {
}
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testasync [llength [info commands testasync]]
-testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+testConstraint knownMsvcBug [expr {![info exists ::env(CI_BUILD_WITH_MSVC)]}]
proc async1 {result code} {
global aresult acode
diff --git a/tests/autoMkindex.test b/tests/autoMkindex.test
index 8662888..214a969 100644
--- a/tests/autoMkindex.test
+++ b/tests/autoMkindex.test
@@ -3,8 +3,8 @@
# This file contains tests related to autoloading and generating the
# autoloading index.
#
-# Copyright (c) 1998 Lucent Technologies, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1998 Lucent Technologies, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -32,7 +32,7 @@ makeFile {# Test file for:
# Note that procedures and itcl class definitions can be nested inside of
# namespaces.
#
-# Copyright (c) 1993-1998 Lucent Technologies, Inc.
+# Copyright © 1993-1998 Lucent Technologies, Inc.
# This shouldn't cause any problems
namespace import -force blt::*
@@ -40,8 +40,8 @@ namespace import -force blt::*
# Should be able to handle "proc" definitions, even if they are preceded by
# white space.
-proc normal {x y} {return [expr $x+$y]}
- proc indented {x y} {return [expr $x+$y]}
+proc normal {x y} {return [expr {$x+$y}]}
+ proc indented {x y} {return [expr {$x+$y}]}
#
# Should be able to handle proc declarations within namespaces, even if they
diff --git a/tests/basic.test b/tests/basic.test
index 38ea11e..f4c57fe 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -9,8 +9,8 @@
# Sourcing this file into Tcl runs the tests and generates output for
# errors. No output means no errors were found.
#
-# Copyright (c) 1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -21,7 +21,7 @@ if {"::tcltest" ni [namespace children]} {
}
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testevalex [llength [info commands testevalex]]
testConstraint testcmdtoken [llength [info commands testcmdtoken]]
@@ -674,7 +674,7 @@ proc l3 {} {
# Do all tests once byte compiled and once with direct string evaluation
foreach noComp {0 1} {
-if $noComp {
+if {$noComp} {
interp alias {} run {} testevalex
set constraints testevalex
} else {
diff --git a/tests/binary.test b/tests/binary.test
index cf3195f..8b326d4 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -4,8 +4,8 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1997 by Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -759,7 +759,16 @@ test binary-21.12 {Tcl_BinaryObjCmd: scan} -setup {
} -body {
list [binary scan "abc def \x00ghi " A* arg1] $arg1
} -result [list 1 "abc def \x00ghi"]
-
+test binary-21.13 {Tcl_BinaryObjCmd: scan} -setup {
+ unset -nocomplain arg1
+} -body {
+ list [binary scan "abc def \x00 " C* arg1] $arg1
+} -result {1 {abc def }}
+test binary-21.12 {Tcl_BinaryObjCmd: scan} -setup {
+ unset -nocomplain arg1
+} -body {
+ list [binary scan "abc def \x00ghi" C* arg1] $arg1
+} -result {1 {abc def }}
test binary-22.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body {
binary scan abc b
} -result {not enough arguments for all format specifiers}
diff --git a/tests/chan.test b/tests/chan.test
index 5d05935..3e65433 100644
--- a/tests/chan.test
+++ b/tests/chan.test
@@ -2,7 +2,7 @@
# command. Sourcing this file into Tcl runs the tests and generates
# output for errors. No output means no errors were found.
#
-# Copyright (c) 2005 Donal K. Fellows
+# Copyright © 2005 Donal K. Fellows
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/tests/chanio.test b/tests/chanio.test
index daacdd0..04f0e3f 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -6,9 +6,9 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1994 The Regents of the University of California.
-# Copyright (c) 1994-1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1994 The Regents of the University of California.
+# Copyright © 1994-1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -36,8 +36,8 @@ namespace eval ::tcl::test::io {
catch {
::tcltest::loadTestedCommands
- package require -exact Tcltest [info patchlevel]
- set ::tcltestlib [lindex [package ifneeded Tcltest [info patchlevel]] 1]
+ package require -exact tcl::test [info patchlevel]
+ set ::tcltestlib [info loaded {} Tcltest]
}
package require tcltests
@@ -47,7 +47,8 @@ namespace eval ::tcl::test::io {
testConstraint testchannelevent [llength [info commands testchannelevent]]
testConstraint testmainthread [llength [info commands testmainthread]]
testConstraint testservicemode [llength [info commands testservicemode]]
- testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+ testConstraint notWinCI [expr {
+ $::tcl_platform(platform) ne "windows" || ![info exists ::env(CI)]}]
testConstraint notOSX [expr {$::tcl_platform(os) ne "Darwin"}]
# You need a *very* special environment to do some tests. In particular,
@@ -1886,7 +1887,7 @@ test chan-io-20.3 {Tcl_CreateChannel: initial settings} -constraints {unix} -bod
} -result {{{} {}} {auto lf}}
test chan-io-20.5 {Tcl_CreateChannel: install channel in empty slot} -setup {
set path(stdout) [makeFile {} stdout]
-} -constraints {stdio knownMsvcBug} -body {
+} -constraints {stdio notWinCI} -body {
set f [open $path(script) w]
chan puts -nonewline $f {
chan close stdout
@@ -2796,7 +2797,7 @@ test chan-io-29.34 {Tcl_Chan Close, async flush on chan close, using sockets} -s
chan puts $s $l
}
}
-} -constraints {socket tempNotMac fileevent knownMsvcBug} -body {
+} -constraints {socket tempNotMac fileevent notWinCI} -body {
proc accept {s a p} {
variable x
chan event $s readable [namespace code [list readit $s]]
@@ -3050,7 +3051,7 @@ test chan-io-30.13 {Tcl_Write crlf on block boundary, Tcl_Read auto} -setup {
string length [chan read $f]
} -cleanup {
chan close $f
-} -result [expr 700*15+1]
+} -result [expr {700*15 + 1}]
test chan-io-30.14 {Tcl_Write crlf on block boundary, Tcl_Read crlf} -setup {
file delete $path(test1)
} -body {
@@ -3067,7 +3068,7 @@ test chan-io-30.14 {Tcl_Write crlf on block boundary, Tcl_Read crlf} -setup {
string length [chan read $f]
} -cleanup {
chan close $f
-} -result [expr 700*15+1]
+} -result [expr {700*15 + 1}]
test chan-io-30.15 {Tcl_Write mixed, Tcl_Read auto} -setup {
file delete $path(test1)
} -body {
@@ -3909,7 +3910,7 @@ test chan-io-31.31 {Tcl_Write crlf on block boundary, Tcl_Gets crlf} -setup {
}
chan close $f
string length $c
-} -result [expr 700*15+1]
+} -result [expr {700*15 + 1}]
test chan-io-31.32 {Tcl_Write crlf on block boundary, Tcl_Gets auto} -setup {
file delete $path(test1)
set c ""
@@ -3929,7 +3930,7 @@ test chan-io-31.32 {Tcl_Write crlf on block boundary, Tcl_Gets auto} -setup {
}
chan close $f
string length $c
-} -result [expr 700*15+1]
+} -result [expr {700*15 + 1}]
# Test Tcl_Read and buffering.
@@ -5338,9 +5339,9 @@ test chan-io-40.1 {POSIX open access modes: RDWR} -setup {
test chan-io-40.2 {POSIX open access modes: CREAT} -setup {
file delete $path(test3)
} -constraints {unix} -body {
- set f [open $path(test3) {WRONLY CREAT} 0600]
+ set f [open $path(test3) {WRONLY CREAT} 0o600]
file stat $path(test3) stats
- set x [format "%#o" [expr $stats(mode)&0o777]]
+ set x [format 0o%03o [expr {$stats(mode) & 0o777}]]
chan puts $f "line 1"
chan close $f
set f [open $path(test3) r]
@@ -5354,8 +5355,8 @@ test chan-io-40.3 {POSIX open access modes: CREAT} -setup {
# This test only works if your umask is 2, like ouster's.
chan close [open $path(test3) {WRONLY CREAT}]
file stat $path(test3) stats
- format "%#o" [expr $stats(mode)&0o777]
-} -result [format %#5o [expr {0o666 & ~ $umaskValue}]]
+ format 0o%03o [expr {$stats(mode) & 0o777}]
+} -result [format 0o%03o [expr {0o666 & ~ $umaskValue}]]
test chan-io-40.4 {POSIX open access modes: CREAT} -setup {
file delete $path(test3)
} -body {
@@ -6501,10 +6502,10 @@ test chan-io-50.5 {testing handler deletion vs reentrant calls} -setup {
set u recursive
lappend z "del calling recursive"
set timer [after 50 lappend z timeout]
- set mode [test servicemode 1]
+ set mode [testservicemode 1]
vwait z
after cancel $timer
- test servicemode $mode
+ testservicemode $mode
lappend z "del after update"
}
}
@@ -6721,7 +6722,7 @@ test chan-io-52.6 {TclCopyChannel} -setup {
set f2 [open $path(test1) w]
chan configure $f1 -translation lf -blocking 0
chan configure $f2 -translation lf -blocking 0
- set s0 [chan copy $f1 $f2 -size [expr [file size $thisScript] + 5]]
+ set s0 [chan copy $f1 $f2 -size [expr {[file size $thisScript] + 5}]]
set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]]
chan close $f1
chan close $f2
@@ -6963,7 +6964,7 @@ test chan-io-53.5 {CopyData: error during chan copy} {socket fcopy} {
chan close $listen ;# This means the socket open never really succeeds
chan copy $in $out -command [namespace code FcopyTestDone]
variable fcopyTestDone
- if ![info exists fcopyTestDone] {
+ if {![info exists fcopyTestDone]} {
vwait [namespace which -variable fcopyTestDone] ;# The error occurs here in the b.g.
}
chan close $in
@@ -6983,7 +6984,7 @@ test chan-io-53.6 {CopyData: error during chan copy} -setup {
set out [open $path(test1) w]
chan copy $in $out -command [namespace code FcopyTestDone]
variable fcopyTestDone
- if ![info exists fcopyTestDone] {
+ if {![info exists fcopyTestDone]} {
vwait [namespace which -variable fcopyTestDone]
}
return $fcopyTestDone ;# 0 for plain end of file
@@ -7036,7 +7037,7 @@ test chan-io-53.7 {CopyData: Flooding chan copy from pipe} -setup {
vwait [namespace which -variable fcopyTestDone]
}
# -1=error 0=script error N=number of bytes
- expr ($fcopyTestDone == 0) ? $fcopyTestCount : -1
+ expr {($fcopyTestDone == 0) ? $fcopyTestCount : -1}
} -cleanup {
catch {chan close $in}
chan close $out
diff --git a/tests/clock.test b/tests/clock.test
index c51c829..37c8066 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -6,7 +6,7 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright (c) 2004 by Kevin B. Kenny. All rights reserved.
+# Copyright © 2004 Kevin B. Kenny. All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -35436,7 +35436,7 @@ test clock-32.1 {scan/format across the Gregorian change} {
# clock clicks
test clock-33.1 {clock clicks tests} {
- expr [clock clicks]+1
+ expr {[clock clicks] + 1}
concat {}
} {}
test clock-33.2 {clock clicks tests} {
@@ -35449,7 +35449,7 @@ test clock-33.3 {clock clicks tests} {
list [catch {clock clicks foo} msg] $msg
} {1 {bad option "foo": must be -milliseconds or -microseconds}}
test clock-33.4 {clock clicks tests} {
- expr [clock clicks -milliseconds]+1
+ expr {[clock clicks -milliseconds] + 1}
concat {}
} {}
test clock-33.4a {clock milliseconds} {
@@ -35470,7 +35470,7 @@ test clock-33.5 {clock clicks tests, millisecond timing test} {
expr {
($end > $start) && (($end - $start) <= 60) ?
"ok" :
- "test should have taken 0-60 ms, actually took [expr $end - $start]"}
+ "test should have taken 0-60 ms, actually took [expr {$end - $start}]"}
} {ok}
test clock-33.5a {clock tests, millisecond timing test} {
# This test can fail on a system that is so heavily loaded that
@@ -35486,7 +35486,7 @@ test clock-33.5a {clock tests, millisecond timing test} {
expr {
($end > $start) && (($end - $start) <= 60) ?
"ok" :
- "test should have taken 0-60 ms, actually took [expr $end - $start]"}
+ "test should have taken 0-60 ms, actually took [expr {$end - $start}]"}
} {ok}
test clock-33.6 {clock clicks, milli with too much abbreviation} {
list [catch { clock clicks ? } msg] $msg
@@ -35905,7 +35905,7 @@ test clock-34.68 {clock scan tests (merid and TZ)} {
# clock seconds
test clock-35.1 {clock seconds tests} {
- expr [clock seconds]+1
+ expr {[clock seconds] + 1}
concat {}
} {}
test clock-35.2 {clock seconds tests} {
@@ -36930,10 +36930,10 @@ test clock-61.2 {overflow of a wide integer on output} {*}{
}
test clock-61.3 {near-miss overflow of a wide integer on output} {
clock format 0x7fffffffffffffff -format %s -gmt true
-} [expr 0x7fffffffffffffff]
+} [expr {0x7fffffffffffffff}]
test clock-61.4 {near-miss overflow of a wide integer on output} {
clock format -0x8000000000000000 -format %s -gmt true
-} [expr -0x8000000000000000]
+} [expr {-0x8000000000000000}]
test clock-62.1 {Bug 1902423} {*}{
-setup {::tcl::clock::ClearCaches}
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index f63c868..d552d73 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -4,8 +4,8 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1996-1998 by Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1996-1998 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} {
}
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testchmod [llength [info commands testchmod]]
testConstraint testsetplatform [llength [info commands testsetplatform]]
@@ -26,7 +26,7 @@ testConstraint linkDirectory [expr {
($::tcl_platform(osVersion) >= 5.0
&& [lindex [file system [temporaryDirectory]] 1] eq "NTFS")
}]
-testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
global env
set cmdAHwd [pwd]
@@ -960,10 +960,10 @@ test cmdAH-19.11 {Tcl_FileObjCmd: exists} -constraints {unix notRoot} -setup {
} -body {
makeDirectory /tmp/tcl.foo.dir
makeFile 12345 /tmp/tcl.foo.dir/file
- file attributes /tmp/tcl.foo.dir -permissions 0000
+ file attributes /tmp/tcl.foo.dir -permissions 0
file exists /tmp/tcl.foo.dir/file
} -cleanup {
- file attributes /tmp/tcl.foo.dir -permissions 0775
+ file attributes /tmp/tcl.foo.dir -permissions 0o775
removeFile /tmp/tcl.foo.dir/file
removeDirectory /tmp/tcl.foo.dir
} -result 0
@@ -986,7 +986,7 @@ test cmdAH-19.12 {Bug 3608360: [file exists] mustn't do globbing} -setup {
catch {testsetplatform $platform}
removeFile $gorpfile
set gorpfile [makeFile "Test string" gorp.file]
-catch {file attributes $gorpfile -permissions 0765}
+catch {file attributes $gorpfile -permissions 0o765}
# avoid problems with non-local filesystems
if {[testConstraint unix] && [file exists /tmp]} {
@@ -1087,7 +1087,7 @@ test cmdAH-23.4 {Tcl_FileObjCmd: lstat} -setup {
unset -nocomplain stat
} -constraints {unix nonPortable} -body {
file lstat $linkfile stat
- list $stat(nlink) [expr $stat(mode)&0777] $stat(type)
+ list $stat(nlink) [expr {$stat(mode) & 0o777}] $stat(type)
} -result {1 511 link}
test cmdAH-23.5 {Tcl_FileObjCmd: lstat errors} {nonPortable} {
list [catch {file lstat _bogus_ stat} msg] [string tolower $msg] \
@@ -1402,7 +1402,7 @@ test cmdAH-27.4.1 {
catch {testsetplatform $platform}
removeFile $gorpfile
set gorpfile [makeFile "Test string" gorp.file]
-catch {file attributes $gorpfile -permissions 0765}
+catch {file attributes $gorpfile -permissions 0o765}
# stat
test cmdAH-28.1 {Tcl_FileObjCmd: stat} -returnCodes error -body {
@@ -1429,8 +1429,8 @@ test cmdAH-28.5 {Tcl_FileObjCmd: stat} -constraints {unix} -setup {
unset -nocomplain stat
} -body {
file stat $gorpfile stat
- expr {$stat(mode) & 0o777}
-} -result {501}
+ format 0o%03o [expr {$stat(mode) & 0o777}]
+} -result 0o765
test cmdAH-28.6 {Tcl_FileObjCmd: stat} {
list [catch {file stat _bogus_ stat} msg] [string tolower $msg] $errorCode
} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}}
@@ -1766,7 +1766,7 @@ unset -nocomplain platform
# Tcl_ForObjCmd is tested in for.test
-catch {file attributes $dirfile -permissions 0777}
+catch {file attributes $dirfile -permissions 0o777}
removeDirectory $dirfile
removeFile $gorpfile
# No idea how well [removeFile] copes with links...
diff --git a/tests/cmdIL.test b/tests/cmdIL.test
index 68f7892..83fe80e 100644
--- a/tests/cmdIL.test
+++ b/tests/cmdIL.test
@@ -2,8 +2,8 @@
# tclCmdIL.c. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -15,7 +15,7 @@ if {"::tcltest" ni [namespace children]} {
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
# Used for constraining memory leak tests
testConstraint memory [llength [info commands memory]]
@@ -514,7 +514,7 @@ test cmdIL-5.5 {lsort with list style index and sharing} -body {
foreach e $l {lappend n [list [expr {rand()}] $e]}
lindex [lsort -real -index $l $n] 1 1
}
- expr srand(1)
+ expr {srand(1)}
test_lsort 0
} -result 0 -cleanup {
rename test_lsort ""
diff --git a/tests/cmdInfo.test b/tests/cmdInfo.test
index e690002..37b8a0b 100644
--- a/tests/cmdInfo.test
+++ b/tests/cmdInfo.test
@@ -6,9 +6,9 @@
# and generates output for errors. No output means no errors were
# found.
#
-# Copyright (c) 1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -19,7 +19,7 @@ if {"::tcltest" ni [namespace children]} {
}
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testcmdinfo [llength [info commands testcmdinfo]]
testConstraint testcmdtoken [llength [info commands testcmdtoken]]
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index 0675a5d..ef9790f 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -4,9 +4,9 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -59,7 +59,7 @@ test cmdMZ-1.4 {Tcl_PwdObjCmd: failure} -setup {
# 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 000
+ file attr . -permissions 0
pwd
} -returnCodes error -cleanup {
cd $cwd
diff --git a/tests/compExpr-old.test b/tests/compExpr-old.test
index e1f1e5b..a13421b 100644
--- a/tests/compExpr-old.test
+++ b/tests/compExpr-old.test
@@ -6,8 +6,8 @@
# "compExpr.test". Sourcing this file into Tcl runs the tests and generates
# output for errors. No output means no errors were found.
#
-# Copyright (c) 1996-1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1996-1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -577,13 +577,13 @@ test compExpr-old-15.3 {CompileMathFuncCall: too many arguments} -body {
test compExpr-old-15.4 {CompileMathFuncCall: ')' found before last required arg} -body {
catch {expr sin()} msg
set ::errorInfo
-} -match glob -result {too few arguments for math function*
+} -match glob -result {not enough arguments for math function*
while *ing
"expr sin()"}
-test compExpr-old-15.5 {CompileMathFuncCall: too few arguments} -body {
+test compExpr-old-15.5 {CompileMathFuncCall: not enough arguments} -body {
catch {expr pow(1)} msg
set ::errorInfo
-} -match glob -result {too few arguments for math function*
+} -match glob -result {not enough arguments for math function*
while *ing
"expr pow(1)"}
test compExpr-old-15.6 {CompileMathFuncCall: missing ')'} -body {
diff --git a/tests/compExpr.test b/tests/compExpr.test
index 5865352..84c53de 100644
--- a/tests/compExpr.test
+++ b/tests/compExpr.test
@@ -2,8 +2,8 @@
# tclCompExpr.c. Sourcing this file into Tcl runs the tests and generates
# output for errors. No output means no errors were found.
#
-# Copyright (c) 1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -307,16 +307,16 @@ test compExpr-4.9 {CompileCondExpr procedure, error in "false" clause} {
} {0 15}
test compExpr-5.1 {CompileMathFuncCall procedure, math function found} {
- format %.6g [expr atan2(1.0, 2.0)]
+ format %.6g [expr {atan2(1.0, 2.0)}]
} 0.463648
test compExpr-5.2 {CompileMathFuncCall procedure, math function not found} -body {
expr {do_it()}
} -returnCodes error -match glob -result {* "*do_it"}
-test compExpr-5.5 {CompileMathFuncCall procedure, too few arguments} -body {
+test compExpr-5.5 {CompileMathFuncCall procedure, not enough arguments} -body {
expr {atan2(1.0)}
-} -returnCodes error -match glob -result {too few arguments for math function*}
+} -returnCodes error -match glob -result {not enough arguments for math function*}
test compExpr-5.6 {CompileMathFuncCall procedure, complex argument} {
- format %.6g [expr pow(2.1, 27.5-(24.4*(5%2)))]
+ format %.6g [expr {pow(2.1, 27.5-(24.4*(5%2)))}]
} 9.97424
test compExpr-5.7 {CompileMathFuncCall procedure, error in argument} -body {
expr {sinh(2.*)}
@@ -370,10 +370,46 @@ test compExpr-7.2 {[Bug 1869989]: expr parser memleak} -constraints memory -setu
unset end i tmp
rename getbytes {}
} -result 0
+
+proc extract {opcodes descriptor} {
+ set instructions [dict values [dict get $descriptor instructions]]
+ return [lmap i $instructions {
+ if {[lindex $i 0] in $opcodes} {string cat $i} else continue
+ }]
+}
+
+test compExpr-8.1 {TIP 582: expression comments} -setup {} -body {
+ extract {loadStk add} [tcl::unsupported::getbytecode script {expr {
+ $abc
+ # + $def
+ + $ghi
+ }}]
+} -result {loadStk loadStk add}
+test compExpr-8.2 {TIP 582: expression comments} -setup {} -body {
+ extract {loadStk add} [tcl::unsupported::getbytecode script {expr {
+ $abc
+ # + $def
+ # + $ghi }}]
+} -result loadStk
+test compExpr-8.3 {TIP 582: expression comments} -setup {} -body {
+ extract {loadStk add} [tcl::unsupported::getbytecode script {expr {
+ $abc
+ # + $def\
+ + $ghi
+ }}]
+} -result loadStk
+test compExpr-8.4 {TIP 582: expression comments} -setup {} -body {
+ extract {loadStk add} [tcl::unsupported::getbytecode script {expr {
+ $abc
+ # + $def\\
+ + $ghi
+ }}]
+} -result {loadStk loadStk add}
# cleanup
catch {unset a}
catch {unset b}
+catch {rename extract ""}
::tcltest::cleanupTests
return
diff --git a/tests/compile.test b/tests/compile.test
index 2bb1925..a50aed1 100644
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -5,8 +5,8 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1997 by Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -18,7 +18,7 @@ if {"::tcltest" ni [namespace children]} {
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
testConstraint exec [llength [info commands exec]]
testConstraint memory [llength [info commands memory]]
@@ -204,7 +204,7 @@ test compile-4.1 {TclCompileForCmd: command substituted test expression} {
set i 0
set j 0
# Should be "forever"
- for {} [expr $i < 3] {} {
+ for {} [expr {$i < 3}] {} {
set j [incr i]
if {$j > 3} break
}
@@ -278,7 +278,7 @@ test compile-7.1 {TclCompileWhileCmd: command substituted test expression} {
set i 0
set j 0
# Should be "forever"
- while [expr $i < 3] {
+ while [expr {$i < 3}] {
set j [incr i]
if {$j > 3} break
}
@@ -337,7 +337,7 @@ test compile-11.6 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body {
apply {{} { set r [list foobar] ; incr}}
} -returnCodes error -result {wrong # args: should be "incr varName ?increment?"}
test compile-11.7 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body {
- apply {{} { set r [list foobar] ; expr !a }}
+ apply {{} { set r [list foobar] ; expr [concat !a] }}
} -returnCodes error -match glob -result *
test compile-11.8 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body {
apply {{} { set r [list foobar] ; expr {!a} }}
@@ -566,7 +566,7 @@ test compile-15.5 {proper TCL_RETURN code from [return]} {
# Do all tests once byte compiled and once with direct string evaluation
foreach noComp {0 1} {
-if $noComp {
+if {$noComp} {
interp alias {} run {} testevalex
set constraints testevalex
} else {
diff --git a/tests/concat.test b/tests/concat.test
index 8ff5500..976591e 100644
--- a/tests/concat.test
+++ b/tests/concat.test
@@ -4,9 +4,9 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 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/tests/config.test b/tests/config.test
index b78e29d..2d8b593 100644
--- a/tests/config.test
+++ b/tests/config.test
@@ -5,9 +5,9 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -17,9 +17,9 @@ if {"::tcltest" ni [namespace children]} {
namespace import -force ::tcltest::*
}
-test pkgconfig-1.1 {query keys} {
+test pkgconfig-1.1 {query keys} -body {
lsort [::tcl::pkgconfig list]
-} {64bit bindir,install bindir,runtime compile_debug compile_stats debug dllfile,runtime docdir,install docdir,runtime includedir,install includedir,runtime libdir,install libdir,runtime mem_debug optimized profiled scriptdir,install scriptdir,runtime threaded zipfile,runtime}
+} -match glob -result {64bit bindir,install bindir,runtime compile_debug compile_stats debug*docdir,install docdir,runtime includedir,install includedir,runtime libdir,install libdir,runtime mem_debug optimized profiled scriptdir,install scriptdir,runtime threaded}
test pkgconfig-1.2 {query keys multiple times} {
string compare [::tcl::pkgconfig list] [::tcl::pkgconfig list]
} 0
diff --git a/tests/coroutine.test b/tests/coroutine.test
index 6d79fd7..b129c03 100644
--- a/tests/coroutine.test
+++ b/tests/coroutine.test
@@ -4,7 +4,7 @@
# found in ::tcl::unsupported. The tests will migrate to normal test files
# if/when the commands find their way into the core.
#
-# Copyright (c) 2008 by Miguel Sofer.
+# Copyright © 2008 Miguel Sofer.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -15,7 +15,7 @@ if {"::tcltest" ni [namespace children]} {
}
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testnrelevels [llength [info commands testnrelevels]]
testConstraint memory [llength [info commands memory]]
diff --git a/tests/dcall.test b/tests/dcall.test
index 7d86135..e407e48 100644
--- a/tests/dcall.test
+++ b/tests/dcall.test
@@ -4,9 +4,9 @@
# Sourcing this file into Tcl runs the tests and generates output for
# errors. No output means no errors were found.
#
-# Copyright (c) 1993 The Regents of the University of California.
-# Copyright (c) 1994 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1993 The Regents of the University of California.
+# Copyright © 1994 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
}
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testdcall [llength [info commands testdcall]]
diff --git a/tests/dict.test b/tests/dict.test
index 01e4bde..d67f703 100644
--- a/tests/dict.test
+++ b/tests/dict.test
@@ -5,7 +5,7 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 2003-2009 Donal K. Fellows
+# Copyright © 2003-2009 Donal K. Fellows
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/tests/dstring.test b/tests/dstring.test
index 8a24ebe..11c5754 100644
--- a/tests/dstring.test
+++ b/tests/dstring.test
@@ -4,9 +4,9 @@
# procedures. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1993 The Regents of the University of California.
-# Copyright (c) 1994 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1993 The Regents of the University of California.
+# Copyright © 1994 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
}
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testdstring [llength [info commands testdstring]]
if {[testConstraint testdstring]} {
diff --git a/tests/encoding.test b/tests/encoding.test
index d89d8a3..0ed7d91 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -2,8 +2,8 @@
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
-# Copyright (c) 1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -19,7 +19,7 @@ namespace eval ::tcl::test::encoding {
catch {
::tcltest::loadTestedCommands
- package require -exact Tcltest [info patchlevel]
+ package require -exact tcl::test [info patchlevel]
}
proc toutf {args} {
@@ -64,12 +64,12 @@ test encoding-1.2 {Tcl_GetEncoding: existing encoding} {testencoding} {
return $x
} {{fromutf }}
test encoding-1.3 {Tcl_GetEncoding: load encoding} {
- list [encoding convertto jis0208 \u4e4e] \
+ list [encoding convertto jis0208 乎] \
[encoding convertfrom jis0208 8C]
-} "8C \u4e4e"
+} "8C 乎"
test encoding-2.1 {Tcl_FreeEncoding: refcount == 0} {
- encoding convertto jis0208 \u4e4e
+ encoding convertto jis0208 乎
} {8C}
test encoding-2.2 {Tcl_FreeEncoding: refcount != 0} -setup {
set system [encoding system]
@@ -77,15 +77,15 @@ test encoding-2.2 {Tcl_FreeEncoding: refcount != 0} -setup {
} -constraints {testencoding} -body {
encoding system shiftjis ;# incr ref count
encoding dirs [list [pwd]]
- set x [encoding convertto shiftjis \u4e4e] ;# old one found
+ set x [encoding convertto shiftjis 乎] ;# old one found
encoding system iso8859-1
llength shiftjis ;# Shimmer away any cache of Tcl_Encoding
- lappend x [catch {encoding convertto shiftjis \u4e4e} msg] $msg
+ lappend x [catch {encoding convertto shiftjis 乎} msg] $msg
} -cleanup {
encoding system iso8859-1
encoding dirs $path
encoding system $system
-} -result "\u008c\u00c1 1 {unknown encoding \"shiftjis\"}"
+} -result "\x8C\xC1 1 {unknown encoding \"shiftjis\"}"
test encoding-3.1 {Tcl_GetEncodingName, NULL} -setup {
set old [encoding system]
@@ -137,7 +137,7 @@ test encoding-5.1 {Tcl_SetSystemEncoding} -setup {
set old [encoding system]
} -body {
encoding system jis0208
- encoding convertto \u4e4e
+ encoding convertto 乎
} -cleanup {
encoding system iso8859-1
encoding system $old
@@ -169,7 +169,7 @@ test encoding-6.2 {Tcl_CreateEncoding: replace encoding} {testencoding} {
test encoding-7.1 {Tcl_ExternalToUtfDString: small buffer} {
encoding convertfrom jis0208 8c8c8c8c
-} "\u543e\u543e\u543e\u543e"
+} "吾吾吾吾"
test encoding-7.2 {Tcl_UtfToExternalDString: big buffer} {
set a 8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C
append a $a
@@ -178,7 +178,7 @@ test encoding-7.2 {Tcl_UtfToExternalDString: big buffer} {
append a $a
set x [encoding convertfrom jis0208 $a]
list [string length $x] [string index $x 0]
-} "512 \u4e4e"
+} "512 乎"
test encoding-8.1 {Tcl_ExternalToUtf} {
set f [open [file join [temporaryDirectory] dummy] w]
@@ -191,13 +191,13 @@ test encoding-8.1 {Tcl_ExternalToUtf} {
close $f
file delete [file join [temporaryDirectory] dummy]
return $x
-} "ab\u4e4eg"
+} "ab乎g"
test encoding-9.1 {Tcl_UtfToExternalDString: small buffer} {
- encoding convertto jis0208 "\u543e\u543e\u543e\u543e"
+ encoding convertto jis0208 "吾吾吾吾"
} {8c8c8c8c}
test encoding-9.2 {Tcl_UtfToExternalDString: big buffer} {
- set a \u4e4e\u4e4e\u4e4e\u4e4e\u4e4e\u4e4e\u4e4e\u4e4e
+ set a 乎乎乎乎乎乎乎乎
append a $a
append a $a
append a $a
@@ -211,7 +211,7 @@ test encoding-9.2 {Tcl_UtfToExternalDString: big buffer} {
test encoding-10.1 {Tcl_UtfToExternal} {
set f [open [file join [temporaryDirectory] dummy] w]
fconfigure $f -translation binary -encoding shiftjis
- puts -nonewline $f "ab\u4e4eg"
+ puts -nonewline $f "ab乎g"
close $f
set f [open [file join [temporaryDirectory] dummy] r]
fconfigure $f -translation binary -encoding iso8859-1
@@ -239,25 +239,25 @@ test encoding-11.1 {LoadEncodingFile: unknown encoding} {testencoding} {
encoding system iso8859-1
encoding dirs {}
llength jis0208 ;# Shimmer any cached Tcl_Encoding in shared literal
- set x [list [catch {encoding convertto jis0208 \u4e4e} msg] $msg]
+ set x [list [catch {encoding convertto jis0208 乎} msg] $msg]
encoding dirs $path
encoding system $system
- lappend x [encoding convertto jis0208 \u4e4e]
+ lappend x [encoding convertto jis0208 乎]
} {1 {unknown encoding "jis0208"} 8C}
test encoding-11.2 {LoadEncodingFile: single-byte} {
- encoding convertfrom jis0201 \xa1
-} "\uff61"
+ encoding convertfrom jis0201 \xA1
+} "。"
test encoding-11.3 {LoadEncodingFile: double-byte} {
encoding convertfrom jis0208 8C
-} "\u4e4e"
+} 乎
test encoding-11.4 {LoadEncodingFile: multi-byte} {
- encoding convertfrom shiftjis \x8c\xc1
-} "\u4e4e"
+ encoding convertfrom shiftjis \x8C\xC1
+} 乎
test encoding-11.5 {LoadEncodingFile: escape file} {
- viewable [encoding convertto iso2022 \u4e4e]
-} [viewable "\x1b\$B8C\x1b(B"]
+ viewable [encoding convertto iso2022 乎]
+} [viewable "\x1B\$B8C\x1B(B"]
test encoding-11.5.1 {LoadEncodingFile: escape file} {
- viewable [encoding convertto iso2022-jp \u4e4e]
+ viewable [encoding convertto iso2022-jp 乎]
} [viewable "\x1b\$B8C\x1b(B"]
test encoding-11.6 {LoadEncodingFile: invalid file} -constraints {testencoding} -setup {
set system [encoding system]
@@ -272,7 +272,7 @@ test encoding-11.6 {LoadEncodingFile: invalid file} -constraints {testencoding}
fconfigure $f -translation binary
puts $f "abcdefghijklmnop"
close $f
- encoding convertto splat \u4e4e
+ encoding convertto splat 乎
} -returnCodes error -cleanup {
file delete [file join [temporaryDirectory] tmp encoding splat.enc]
removeDirectory [file join tmp encoding]
@@ -281,45 +281,50 @@ test encoding-11.6 {LoadEncodingFile: invalid file} -constraints {testencoding}
encoding dirs $path
encoding system $system
} -result {invalid encoding file "splat"}
-
+test encoding-11.8 {encoding: extended Unicode UTF-16} {
+ viewable [encoding convertto utf-16le 😹]
+} {=Ø9Þ (=\u00d89\u00de)}
+test encoding-11.9 {encoding: extended Unicode UTF-16} {
+ viewable [encoding convertto utf-16be 😹]
+} {Ø=Þ9 (\u00d8=\u00de9)}
# OpenEncodingFile is fully tested by the rest of the tests in this file.
test encoding-12.1 {LoadTableEncoding: normal encoding} {
set x [encoding convertto iso8859-3 \u0120]
append x [encoding convertto iso8859-3 \xD5]
append x [encoding convertfrom iso8859-3 \xD5]
-} "\xd5?\u120"
+} "\xD5?\u120"
test encoding-12.2 {LoadTableEncoding: single-byte encoding} {
set x [encoding convertto iso8859-3 ab\u0120g]
append x [encoding convertfrom iso8859-3 ab\xD5g]
-} "ab\xd5gab\u120g"
+} "ab\xD5gab\u120g"
test encoding-12.3 {LoadTableEncoding: multi-byte encoding} {
- set x [encoding convertto shiftjis ab\u4E4Eg]
+ set x [encoding convertto shiftjis ab乎g]
append x [encoding convertfrom shiftjis ab\x8c\xc1g]
-} "ab\x8c\xc1gab\u4e4eg"
+} "ab\x8C\xC1gab乎g"
test encoding-12.4 {LoadTableEncoding: double-byte encoding} {
- set x [encoding convertto jis0208 \u4e4e\u3b1]
+ set x [encoding convertto jis0208 乎α]
append x [encoding convertfrom jis0208 8C&A]
-} "8C&A\u4e4e\u3b1"
+} "8C&A乎α"
test encoding-12.5 {LoadTableEncoding: symbol encoding} {
- set x [encoding convertto symbol \u3b3]
- append x [encoding convertto symbol \u67]
- append x [encoding convertfrom symbol \x67]
-} "\x67\x67\u3b3"
+ set x [encoding convertto symbol γ]
+ append x [encoding convertto symbol g]
+ append x [encoding convertfrom symbol g]
+} "ggγ"
test encoding-13.1 {LoadEscapeTable} {
- viewable [set x [encoding convertto iso2022 ab\u4e4e\u68d9g]]
-} [viewable "ab\x1b\$B8C\x1b\$\(DD%\x1b(Bg"]
+ viewable [set x [encoding convertto iso2022 ab乎棙g]]
+} [viewable "ab\x1B\$B8C\x1B\$\(DD%\x1B(Bg"]
test encoding-15.1 {UtfToUtfProc} {
- encoding convertto utf-8 \xa3
-} "\xc2\xa3"
+ encoding convertto utf-8 \xA3
+} "\xC2\xA3"
test encoding-15.2 {UtfToUtfProc null character output} testbytestring {
- binary scan [testbytestring [encoding convertto utf-8 \u0000]] H* z
+ binary scan [testbytestring [encoding convertto utf-8 \x00]] H* z
set z
} 00
test encoding-15.3 {UtfToUtfProc null character input} teststringbytes {
- set y [encoding convertfrom utf-8 [encoding convertto utf-8 \u0000]]
+ set y [encoding convertfrom utf-8 [encoding convertto utf-8 \x00]]
binary scan [teststringbytes $y] H* z
set z
} c080
@@ -327,12 +332,12 @@ test encoding-15.4 {UtfToUtfProc emoji character input} -body {
set x \xED\xA0\xBD\xED\xB8\x82
set y [encoding convertfrom utf-8 \xED\xA0\xBD\xED\xB8\x82]
list [string length $x] $y
-} -result "6 \U1F602"
+} -result "6 😂"
test encoding-15.5 {UtfToUtfProc emoji character input} {
set x \xF0\x9F\x98\x82
set y [encoding convertfrom utf-8 \xF0\x9F\x98\x82]
list [string length $x] $y
-} "4 \U1F602"
+} "4 😂"
test encoding-15.6 {UtfToUtfProc emoji character output} {
set x \uDE02\uD83D\uDE02\uD83D
set y [encoding convertto utf-8 \uDE02\uD83D\uDE02\uD83D]
@@ -399,8 +404,8 @@ test encoding-15.16 {UtfToUtfProc: Invalid 4-byte UTF-8, see [ed29806ba]} {
list [string length $x] $y
} "4 \xF0\xA0\xA1\xC2"
test encoding-15.17 {UtfToUtfProc emoji character output} {
- set x \U1F602
- set y [encoding convertto utf-8 \U1F602]
+ set x 😂
+ set y [encoding convertto utf-8 😂]
binary scan $y H* z
list [string length $y] $z
} {4 f09f9882}
@@ -408,7 +413,7 @@ test encoding-15.17 {UtfToUtfProc emoji character output} {
test encoding-16.1 {Utf16ToUtfProc} -body {
set val [encoding convertfrom utf-16 NN]
list $val [format %x [scan $val %c]]
-} -result "\u4E4E 4e4e"
+} -result "乎 4e4e"
test encoding-16.2 {Utf16ToUtfProc} -body {
set val [encoding convertfrom utf-16 "\xD8\xD8\xDC\xDC"]
list $val [format %x [scan $val %c]]
@@ -530,17 +535,17 @@ test encoding-24.2 {EscapeFreeProc on open channels} {exec} {
viewable [runInSubprocess {
encoding system cp1252; # Bug #2891556 crash revelator
fconfigure stdout -encoding iso2022-jp
- puts ab\u4e4e\u68d9g
+ puts ab乎棙g
set env(TCL_FINALIZE_ON_EXIT) 1
exit
}]
-} "ab\x1b\$B8C\x1b\$(DD%\x1b(Bg (ab\\u001b\$B8C\\u001b\$(DD%\\u001b(Bg)"
+} "ab\x1B\$B8C\x1B\$(DD%\x1B(Bg (ab\\u001b\$B8C\\u001b\$(DD%\\u001b(Bg)"
test encoding-24.3 {EscapeFreeProc on open channels} {stdio} {
# Bug #219314 - if we don't free escape encodings correctly on channel
# closure, we go boom
set file [makeFile {
encoding system iso2022-jp
- set a "\u4e4e\u4e5e\u4e5f"; # 3 Japanese Kanji letters
+ set a "乎乞也"; # 3 Japanese Kanji letters
puts $a
} iso2022.tcl]
set f [open "|[list [interpreter] $file]"]
@@ -549,31 +554,31 @@ test encoding-24.3 {EscapeFreeProc on open channels} {stdio} {
close $f
removeFile iso2022.tcl
list $count [viewable $line]
-} [list 3 "\u4e4e\u4e5e\u4e5f (\\u4e4e\\u4e5e\\u4e5f)"]
+} [list 3 "乎乞也 (\\u4e4e\\u4e5e\\u4e5f)"]
test encoding-24.4 {Parse valid or invalid utf-8} {
- string length [encoding convertfrom utf-8 "\xc0\x80"]
+ string length [encoding convertfrom utf-8 "\xC0\x80"]
} 1
test encoding-24.5 {Parse valid or invalid utf-8} {
- string length [encoding convertfrom utf-8 "\xc0\x81"]
+ string length [encoding convertfrom utf-8 "\xC0\x81"]
} 2
test encoding-24.6 {Parse valid or invalid utf-8} {
- string length [encoding convertfrom utf-8 "\xc1\xbf"]
+ string length [encoding convertfrom utf-8 "\xC1\xBF"]
} 2
test encoding-24.7 {Parse valid or invalid utf-8} {
- string length [encoding convertfrom utf-8 "\xc2\x80"]
+ string length [encoding convertfrom utf-8 "\xC2\x80"]
} 1
test encoding-24.8 {Parse valid or invalid utf-8} {
- string length [encoding convertfrom utf-8 "\xe0\x80\x80"]
+ string length [encoding convertfrom utf-8 "\xE0\x80\x80"]
} 3
test encoding-24.9 {Parse valid or invalid utf-8} {
- string length [encoding convertfrom utf-8 "\xe0\x9f\xbf"]
+ string length [encoding convertfrom utf-8 "\xE0\x9F\xBF"]
} 3
test encoding-24.10 {Parse valid or invalid utf-8} {
- string length [encoding convertfrom utf-8 "\xe0\xa0\x80"]
+ string length [encoding convertfrom utf-8 "\xE0\xA0\x80"]
} 1
test encoding-24.11 {Parse valid or invalid utf-8} {
- string length [encoding convertfrom utf-8 "\xef\xbf\xbf"]
+ string length [encoding convertfrom utf-8 "\xEF\xBF\xBF"]
} 1
file delete [file join [temporaryDirectory] iso2022.txt]
diff --git a/tests/env.test b/tests/env.test
index c901148..5250ac8 100644
--- a/tests/env.test
+++ b/tests/env.test
@@ -4,9 +4,9 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
}
loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
package require tcltests
# [exec] is required here to see the actual environment received by child
@@ -102,7 +102,7 @@ proc cleanup1 {} {
variable keep {
TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH PURE_PROG_NAME DISPLAY
SHLIB_PATH SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
- DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING
+ DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING MSYSTEM
__CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG WINDIR TERM
CommonProgramFiles CommonProgramFiles(x86) ProgramFiles
ProgramFiles(x86) CommonProgramW6432 ProgramW6432
diff --git a/tests/error.test b/tests/error.test
index a111c80..064edc7 100644
--- a/tests/error.test
+++ b/tests/error.test
@@ -4,9 +4,9 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 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/tests/eval.test b/tests/eval.test
index d473fdf..5ffe309 100644
--- a/tests/eval.test
+++ b/tests/eval.test
@@ -4,9 +4,9 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994 Sun Microsystems, Inc.
+# Copyright © 1998-1999 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/tests/event.test b/tests/event.test
index 3194547..3f9735a 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -3,8 +3,8 @@
# this file into Tcl runs the tests and generates output for errors. No
# output means no errors were found.
#
-# Copyright (c) 1995-1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1995-1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -14,8 +14,8 @@ namespace import -force ::tcltest::*
catch {
::tcltest::loadTestedCommands
- package require -exact Tcltest [info patchlevel]
- set ::tcltestlib [lindex [package ifneeded Tcltest [info patchlevel]] 1]
+ package require -exact tcl::test [info patchlevel]
+ set ::tcltestlib [info loaded {} Tcltest]
}
diff --git a/tests/exec.test b/tests/exec.test
index 5082393..412cd4c 100644
--- a/tests/exec.test
+++ b/tests/exec.test
@@ -4,9 +4,9 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1991-1994 The Regents of the University of California.
-# Copyright (c) 1994-1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1991-1994 The Regents of the University of California.
+# Copyright © 1994-1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -20,13 +20,14 @@ if {"::tcltest" ni [namespace children]} {
}
loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch [list package require -exact tcl::test [info patchlevel]]
package require tcltests
# All tests require the "exec" command.
# Skip them if exec is not defined.
testConstraint exec [llength [info commands exec]]
-testConstraint noosx [expr {![info exists ::env(TRAVIS_OSX_IMAGE)] || ![string match xcode* $::env(TRAVIS_OSX_IMAGE)]}]
+# Some skips when running in a macOS CI environment
+testConstraint noosxCI [expr {![info exists ::env(MAC_CI)]}]
unset -nocomplain path
@@ -112,7 +113,7 @@ set path(sh2) [makeFile {
exit
} sh2]
set path(sleep) [makeFile {
- after [expr $argv*1000]
+ after [expr {$argv*1000}]
exit
} sleep]
set path(exit) [makeFile {
@@ -673,7 +674,9 @@ test exec-18.2 {exec cat deals with weird file names} -body {
# Note that this test cannot be adapted to work on Windows; that platform has
# no kernel support for an analog of O_APPEND. OTOH, that means we can assume
# that there is a POSIX shell...
-test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix notValgrind noosx} -setup {
+#
+# This test also fails in some cases when building with macOS
+test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix notValgrind noosxCI} -setup {
set tmpfile [makeFile {0} tmpfile.exec-19.1]
} -body {
# Note that we have to allow for the current contents of the temporary
diff --git a/tests/execute.test b/tests/execute.test
index 9bf773d..410592e 100644
--- a/tests/execute.test
+++ b/tests/execute.test