From 8607752aa65f484ab844296ce90d2d2e5bfc2259 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 3 Nov 2020 15:32:46 +0000 Subject: Case-sensitive package names --- doc/StaticPkg.3 | 3 +- doc/zipfs.n | 2 +- generic/tclBasic.c | 1 + generic/tclLoad.c | 50 +++++++++++---------------- generic/tclOO.c | 9 ++++- generic/tclOOStubLib.c | 9 +++-- generic/tclTest.c | 2 +- generic/tclTestProcBodyObj.c | 8 ++--- generic/tclZipfs.c | 2 +- generic/tclZlib.c | 5 ++- tests/assocd.test | 2 +- tests/async.test | 2 +- tests/basic.test | 2 +- tests/chanio.test | 8 ++--- tests/cmdAH.test | 2 +- tests/cmdIL.test | 2 +- tests/cmdInfo.test | 2 +- tests/compExpr-old.test | 2 +- tests/compExpr.test | 2 +- tests/compile.test | 4 +-- tests/config.test | 4 +-- tests/coroutine.test | 2 +- tests/dcall.test | 2 +- tests/dstring.test | 2 +- tests/encoding.test | 2 +- tests/env.test | 2 +- tests/event.test | 14 ++++---- tests/exec.test | 2 +- tests/execute.test | 10 +++--- tests/expr-old.test | 2 +- tests/expr.test | 2 +- tests/fCmd.test | 2 +- tests/fileName.test | 2 +- tests/fileSystem.test | 4 +-- tests/get.test | 2 +- tests/indexObj.test | 2 +- tests/info.test | 2 +- tests/interp.test | 2 +- tests/io.test | 8 ++--- tests/ioCmd.test | 22 ++++++------ tests/ioTrans.test | 22 ++++++------ tests/iogt.test | 2 +- tests/lindex.test | 2 +- tests/link.test | 4 +-- tests/listObj.test | 2 +- tests/load.test | 68 ++++++++++++++++++------------------ tests/lrange.test | 2 +- tests/lset.test | 2 +- tests/main.test | 82 +++++++++++++++++++++----------------------- tests/misc.test | 2 +- tests/namespace.test | 2 +- tests/notify.test | 2 +- tests/nre.test | 2 +- tests/obj.test | 2 +- tests/oo.test | 24 ++++++------- tests/ooNext2.test | 2 +- tests/ooUtil.test | 2 +- tests/package.test | 8 ++--- tests/parse.test | 6 ++-- tests/parseExpr.test | 2 +- tests/parseOld.test | 2 +- tests/pkgMkIndex.test | 6 ++-- tests/platform.test | 2 +- tests/proc.test | 40 ++++++++++----------- tests/reg.test | 2 +- tests/rename.test | 2 +- tests/resolver.test | 2 +- tests/result.test | 2 +- tests/safe-zipfs.test | 8 ++--- tests/safe.test | 16 ++++----- tests/set.test | 2 +- tests/socket.test | 2 +- tests/string.test | 2 +- tests/stringObj.test | 2 +- tests/subst.test | 2 +- tests/tailcall.test | 2 +- tests/thread.test | 2 +- tests/trace.test | 2 +- tests/unixFCmd.test | 2 +- tests/unixFile.test | 2 +- tests/unload.test | 20 +++++------ tests/upvar.test | 2 +- tests/utf.test | 2 +- tests/util.test | 2 +- tests/var.test | 2 +- tests/winDde.test | 2 +- tests/winFCmd.test | 2 +- tests/winFile.test | 2 +- tests/winNotify.test | 2 +- tests/winPipe.test | 12 +++---- tests/winTime.test | 2 +- tests/zipfs.test | 2 +- tests/zlib.test | 2 +- unix/dltest/pkga.c | 2 +- unix/dltest/pkgb.c | 4 +-- unix/dltest/pkgc.c | 4 +-- unix/dltest/pkgd.c | 4 +-- unix/dltest/pkgooa.c | 2 +- unix/dltest/pkgua.c | 2 +- unix/tclAppInit.c | 2 +- win/Makefile.in | 2 +- win/tclAppInit.c | 2 +- 102 files changed, 315 insertions(+), 314 deletions(-) diff --git a/doc/StaticPkg.3 b/doc/StaticPkg.3 index b22edcc..b907aaa 100644 --- a/doc/StaticPkg.3 +++ b/doc/StaticPkg.3 @@ -22,8 +22,7 @@ already been loaded (i.e., the caller has already invoked the appropriate initialization procedure). NULL means the package has not yet been incorporated into any interpreter. .AP "const char" *pkgName in -Name of the package; should be properly capitalized (first letter -upper-case, all others lower-case). +Name of the package. .AP Tcl_PackageInitProc *initProc in Procedure to invoke to incorporate this package into a trusted interpreter. 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/tclBasic.c b/generic/tclBasic.c index 88e51be..ea17ee8 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -1175,6 +1175,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", TclGetString(Tcl_GetObjResult(interp))); diff --git a/generic/tclLoad.c b/generic/tclLoad.c index c143d0a..bea07ed 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -226,14 +226,8 @@ Tcl_LoadObjCmd( Tcl_DStringAppend(&pkgName, packageName, -1); TclDStringClear(&tmp); Tcl_DStringAppend(&tmp, pkgPtr->packageName, -1); - Tcl_UtfToLower(Tcl_DStringValue(&pkgName)); - Tcl_UtfToLower(Tcl_DStringValue(&tmp)); - if (strcmp(Tcl_DStringValue(&tmp), - Tcl_DStringValue(&pkgName)) == 0) { - namesMatch = 1; - } else { - namesMatch = 0; - } + namesMatch = (strcmp(Tcl_DStringValue(&tmp), + Tcl_DStringValue(&pkgName)) == 0); } TclDStringClear(&pkgName); @@ -359,27 +353,29 @@ Tcl_LoadObjCmd( } /* - * Fix the capitalization in the package name so that the first - * character is in caps (or title case) but the others are all - * lower-case. - */ - - Tcl_DStringSetLength(&pkgName, - Tcl_UtfToTitle(Tcl_DStringValue(&pkgName))); - - /* - * Compute the names of the two initialization functions, based on the + * Compute the names of the initialization functions, based on the * package name. */ TclDStringAppendDString(&initName, &pkgName); - TclDStringAppendLiteral(&initName, "_Init"); - TclDStringAppendDString(&safeInitName, &pkgName); + Tcl_DStringSetLength(&initName, + Tcl_UtfToTitle(Tcl_DStringValue(&initName))); + while (strchr(Tcl_DStringValue(&initName), ':') != NULL) { + char *r; + p = Tcl_DStringValue(&initName); + r = strchr((char *)p, ':'); + if ((r != NULL) && (r[1] == ':')) { + memmove(r, r+2, strlen(r+1)); + } + Tcl_DStringSetLength(&initName, strlen(p)); + } + TclDStringAppendDString(&safeInitName, &initName); TclDStringAppendLiteral(&safeInitName, "_SafeInit"); - TclDStringAppendDString(&unloadName, &pkgName); + TclDStringAppendDString(&unloadName, &initName); TclDStringAppendLiteral(&unloadName, "_Unload"); - TclDStringAppendDString(&safeUnloadName, &pkgName); + TclDStringAppendDString(&safeUnloadName, &initName); TclDStringAppendLiteral(&safeUnloadName, "_SafeUnload"); + TclDStringAppendLiteral(&initName, "_Init"); /* * Call platform-specific code to load the package and find the two @@ -663,14 +659,8 @@ Tcl_UnloadObjCmd( Tcl_DStringAppend(&pkgName, packageName, -1); TclDStringClear(&tmp); Tcl_DStringAppend(&tmp, pkgPtr->packageName, -1); - Tcl_UtfToLower(Tcl_DStringValue(&pkgName)); - Tcl_UtfToLower(Tcl_DStringValue(&tmp)); - if (strcmp(Tcl_DStringValue(&tmp), - Tcl_DStringValue(&pkgName)) == 0) { - namesMatch = 1; - } else { - namesMatch = 0; - } + namesMatch = (strcmp(Tcl_DStringValue(&tmp), + Tcl_DStringValue(&pkgName)) == 0); } TclDStringClear(&pkgName); diff --git a/generic/tclOO.c b/generic/tclOO.c index b60ab1f..e958279 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -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/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/tclTest.c b/generic/tclTest.c index a8ca463..d7f16f8 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -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; } diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index db6ec8a..437644e 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -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/tclZipfs.c b/generic/tclZipfs.c index 4a13970..ceb0833 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -4771,7 +4771,7 @@ TclZipfs_Init( Tcl_NewStringObj("::tcl::zipfs::find", -1)); Tcl_CreateObjCommand(interp, "::tcl::zipfs::tcl_library_init", ZipFSTclLibraryObjCmd, NULL, NULL); - Tcl_PkgProvide(interp, "zipfs", "2.0"); + Tcl_PkgProvide(interp, "tcl::zipfs", "2.0"); } return TCL_OK; #else /* !HAVE_ZLIB */ diff --git a/generic/tclZlib.c b/generic/tclZlib.c index ea6a1f2..05f13b5 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -3957,7 +3957,10 @@ TclZlibInit( * Formally provide the package as a Tcl built-in. */ - return Tcl_PkgProvide(interp, "zlib", TCL_ZLIB_VERSION); +#ifndef TCL_NO_DEPRECATED + Tcl_PkgProvide(interp, "zlib", TCL_ZLIB_VERSION); +#endif + return Tcl_PkgProvide(interp, "tcl::zlib", TCL_ZLIB_VERSION); } /* diff --git a/tests/assocd.test b/tests/assocd.test index 7d89daa..5185e29 100644 --- a/tests/assocd.test +++ b/tests/assocd.test @@ -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..642e295 100644 --- a/tests/async.test +++ b/tests/async.test @@ -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 testasync [llength [info commands testasync]] testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}] diff --git a/tests/basic.test b/tests/basic.test index 1711094..02a93aba 100644 --- a/tests/basic.test +++ b/tests/basic.test @@ -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]] diff --git a/tests/chanio.test b/tests/chanio.test index 858db7f..f88f266 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -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 [lindex [package ifneeded tcl::test [info patchlevel]] 1] } package require tcltests @@ -7493,7 +7493,7 @@ test chan-io-59.1 {Thread reference of channels} {testmainthread testchannel} { test chan-io-60.1 {writing illegal utf sequences} {fileevent testbytestring} { # This test will hang in older revisions of the core. set out [open $path(script) w] - chan puts $out "catch {load $::tcltestlib Tcltest}" + chan puts $out "catch {load $::tcltestlib tcl::test}" chan puts $out { chan puts [testbytestring \xe2] exit 1 @@ -7576,7 +7576,7 @@ test chan-io-70.1 {Transfer channel} -setup { lappend res [catch {chan seek $c 0 start}] set tid [thread::create -preserved] thread::send $tid [list set c $c] - thread::send $tid {load {} Tcltest} + thread::send $tid {load {} tcl::test} lappend res [thread::send $tid { testchannel splice $c set res [catch {chan seek $c 0 start}] diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 97b2e91..67c49c7 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -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]] diff --git a/tests/cmdIL.test b/tests/cmdIL.test index 0b118f8..83cbfa4 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -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]] diff --git a/tests/cmdInfo.test b/tests/cmdInfo.test index e690002..b4f6fa8 100644 --- a/tests/cmdInfo.test +++ b/tests/cmdInfo.test @@ -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/compExpr-old.test b/tests/compExpr-old.test index 7a9aa5c..48cf639 100644 --- a/tests/compExpr-old.test +++ b/tests/compExpr-old.test @@ -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]] # Big test for correct ordering of data in [expr] diff --git a/tests/compExpr.test b/tests/compExpr.test index 35d7588..f6fe333 100644 --- a/tests/compExpr.test +++ b/tests/compExpr.test @@ -14,7 +14,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]] # Constrain memory leak tests testConstraint memory [llength [info commands memory]] diff --git a/tests/compile.test b/tests/compile.test index ef6ab65..dd94b06 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -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]] @@ -500,7 +500,7 @@ test compile-13.2 {TclCompileScript: testing expected nested scripts compilation # with 1500 (1000 in debug) nested scripts (bodies). If you get SO/SF exceptions on some low-stack # boxes or systems, please don't decrease it (either provide a constraint) ti eval {foreach cmd {eval "if 1" try catch} { - set c [gencode [expr {![::tcl::pkgconfig get debug] ? 1500 : 1000}] $cmd] + set c [gencode [expr {"debug" ni [split [package provide tcl] .] ? 1500 : 1000}] $cmd] if 1 $c }} ti eval {set result} diff --git a/tests/config.test b/tests/config.test index b78e29d..bcf948e 100644 --- a/tests/config.test +++ b/tests/config.test @@ -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 {*bindir,install bindir,runtime*dllfile,runtime docdir,install docdir,runtime includedir,install includedir,runtime libdir,install libdir,runtime*scriptdir,install scriptdir,runtime*zipfile,runtime} 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..3ff325e 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -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..e2133fd 100644 --- a/tests/dcall.test +++ b/tests/dcall.test @@ -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/dstring.test b/tests/dstring.test index 8a24ebe..c571b5f 100644 --- a/tests/dstring.test +++ b/tests/dstring.test @@ -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 d0ca114..c16c7ef 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -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} { diff --git a/tests/env.test b/tests/env.test index c901148..fcbf455 100644 --- a/tests/env.test +++ b/tests/env.test @@ -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 diff --git a/tests/event.test b/tests/event.test index 3194547..3728025 100644 --- a/tests/event.test +++ b/tests/event.test @@ -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 [lindex [package ifneeded tcl::test [info patchlevel]] 1] } @@ -436,7 +436,7 @@ catch {rename bgerror {}} test event-8.1 {Tcl_CreateExitHandler procedure} {stdio testexithandler} { set child [open |[list [interpreter]] r+] - puts $child "catch {load $::tcltestlib Tcltest}" + puts $child "catch {load $::tcltestlib tcl::test}" puts $child "testexithandler create 41; testexithandler create 4" puts $child "testexithandler create 6; exit" flush $child @@ -450,7 +450,7 @@ odd 41 test event-9.1 {Tcl_DeleteExitHandler procedure} {stdio testexithandler} { set child [open |[list [interpreter]] r+] - puts $child "catch {load $::tcltestlib Tcltest}" + puts $child "catch {load $::tcltestlib tcl::test}" puts $child "testexithandler create 41; testexithandler create 4" puts $child "testexithandler create 6; testexithandler delete 41" puts $child "testexithandler create 16; exit" @@ -464,7 +464,7 @@ even 4 } test event-9.2 {Tcl_DeleteExitHandler procedure} {stdio testexithandler} { set child [open |[list [interpreter]] r+] - puts $child "catch {load $::tcltestlib Tcltest}" + puts $child "catch {load $::tcltestlib tcl::test}" puts $child "testexithandler create 41; testexithandler create 4" puts $child "testexithandler create 6; testexithandler delete 4" puts $child "testexithandler create 16; exit" @@ -478,7 +478,7 @@ odd 41 } test event-9.3 {Tcl_DeleteExitHandler procedure} {stdio testexithandler} { set child [open |[list [interpreter]] r+] - puts $child "catch {load $::tcltestlib Tcltest}" + puts $child "catch {load $::tcltestlib tcl::test}" puts $child "testexithandler create 41; testexithandler create 4" puts $child "testexithandler create 6; testexithandler delete 6" puts $child "testexithandler create 16; exit" @@ -492,7 +492,7 @@ odd 41 } test event-9.4 {Tcl_DeleteExitHandler procedure} {stdio testexithandler} { set child [open |[list [interpreter]] r+] - puts $child "catch {load $::tcltestlib Tcltest}" + puts $child "catch {load $::tcltestlib tcl::test}" puts $child "testexithandler create 41; testexithandler delete 41" puts $child "testexithandler create 16; exit" flush $child diff --git a/tests/exec.test b/tests/exec.test index 5082393..458e12a 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -20,7 +20,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 # All tests require the "exec" command. diff --git a/tests/execute.test b/tests/execute.test index daaad16..a29259d 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -20,7 +20,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]] catch {namespace delete {*}[namespace children :: test_ns_*]} catch {rename foo ""} @@ -683,12 +683,12 @@ test execute-6.11 {Tcl_ExprObj: exprcode interp validation} -setup { } -constraints testexprlongobj -body { set e { [llength {}]+1 } set result {} - load {} Tcltest child + load {} tcl::test child interp alias {} e child testexprlongobj lappend result [e $e] interp delete child interp create child - load {} Tcltest child + load {} tcl::test child interp alias {} e child testexprlongobj lappend result [e $e] } -cleanup { @@ -985,7 +985,7 @@ test execute-8.6 {Compile epoch bump in global level (bug [fa6bf38d07])} -setup interp create child child eval { package require tcltest 2.5 - catch [list package require -exact Tcltest [info patchlevel]] + catch [list package require -exact tcl::test [info patchlevel]] ::tcltest::loadTestedCommands if {[namespace which -command testbumpinterpepoch] eq ""} { proc testbumpinterpepoch {} { rename ::set ::dummy; rename ::dummy ::set } @@ -1018,7 +1018,7 @@ test execute-8.7 {Compile epoch bump in global level (bug [fa6bf38d07]), excepti interp create child child eval { package require tcltest 2.5 - catch [list package require -exact Tcltest [info patchlevel]] + catch [list package require -exact tcl::test [info patchlevel]] ::tcltest::loadTestedCommands if {[namespace which -command testbumpinterpepoch] eq ""} { proc testbumpinterpepoch {} { rename ::set ::dummy; rename ::dummy ::set } diff --git a/tests/expr-old.test b/tests/expr-old.test index 914530e..ab33e06 100644 --- a/tests/expr-old.test +++ b/tests/expr-old.test @@ -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 testexprlong [llength [info commands testexprlong]] testConstraint testexprdouble [llength [info commands testexprdouble]] diff --git a/tests/expr.test b/tests/expr.test index 5e00841..c185580 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -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]] # Determine if "long int" type is a 32 bit number and if the wide # type is a 64 bit number on this machine. diff --git a/tests/fCmd.test b/tests/fCmd.test index a1e0a6e..986e2f4 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -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]] cd [temporaryDirectory] diff --git a/tests/fileName.test b/tests/fileName.test index ac93383..bef5a22 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -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 testsetplatform [llength [info commands testsetplatform]] testConstraint testtranslatefilename [llength [info commands testtranslatefilename]] diff --git a/tests/fileSystem.test b/tests/fileSystem.test index 19066ee..93a3f51 100644 --- a/tests/fileSystem.test +++ b/tests/fileSystem.test @@ -25,7 +25,7 @@ namespace eval ::tcl::test::fileSystem { testConstraint loaddll 0 catch { ::tcltest::loadTestedCommands - package require -exact Tcltest [info patchlevel] + package require -exact tcl::test [info patchlevel] set ::ddever [package require dde] set ::ddelib [lindex [package ifneeded dde $::ddever] 1] set ::regver [package require registry] @@ -33,7 +33,7 @@ catch { testConstraint loaddll 1 } -# Test for commands defined in Tcltest executable +# Test for commands defined in tcl::test package testConstraint testfilesystem [llength [info commands ::testfilesystem]] testConstraint testsetplatform [llength [info commands ::testsetplatform]] testConstraint testsimplefilesystem [llength [info commands ::testsimplefilesystem]] diff --git a/tests/get.test b/tests/get.test index 9e7728a..071b874 100644 --- a/tests/get.test +++ b/tests/get.test @@ -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 testgetint [llength [info commands testgetint]] testConstraint testdoubleobj [llength [info commands testdoubleobj]] diff --git a/tests/indexObj.test b/tests/indexObj.test index 079eb52..0f3f2db 100644 --- a/tests/indexObj.test +++ b/tests/indexObj.test @@ -14,7 +14,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 testindexobj [llength [info commands testindexobj]] testConstraint testparseargs [llength [info commands testparseargs]] diff --git a/tests/info.test b/tests/info.test index e0ebda34..3d746f3 100644 --- a/tests/info.test +++ b/tests/info.test @@ -20,7 +20,7 @@ if {{::tcltest} ni [namespace children]} { namespace import -force ::tcltest::* } ::tcltest::loadTestedCommands -catch [list package require -exact Tcltest [info patchlevel]] +catch [list package require -exact tcl::test [info patchlevel]] testConstraint zlib [llength [info commands zlib]] # Set up namespaces needed to test operation of "info args", "info body", diff --git a/tests/interp.test b/tests/interp.test index 6ffa098..faa7a50 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -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 testinterpdelete [llength [info commands testinterpdelete]] diff --git a/tests/io.test b/tests/io.test index a3e3b6f..33ea187 100644 --- a/tests/io.test +++ b/tests/io.test @@ -31,8 +31,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 [lindex [package ifneeded tcl::test [info patchlevel]] 1] } package require tcltests @@ -8385,7 +8385,7 @@ test io-60.1 {writing illegal utf sequences} {fileevent testbytestring} { # This test will hang in older revisions of the core. set out [open $path(script) w] - puts $out "catch {load $::tcltestlib Tcltest}" + puts $out "catch {load $::tcltestlib tcl::test}" puts $out { puts [testbytestring \xe2] exit 1 @@ -8477,7 +8477,7 @@ test io-70.1 {Transfer channel} {testchannel thread} { set tid [thread::create -preserved] thread::send $tid [list set c $c] - thread::send $tid {load {} Tcltest} + thread::send $tid {load {} tcl::test} lappend res [thread::send $tid { testchannel splice $c set res [catch {seek $c 0 start}] diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 749d225..7b21baa 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -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]] package require tcltests @@ -2085,8 +2085,8 @@ test iocmd-32.0 {origin interpreter of moved channel gone} -match glob -body { set idb [interp create];#puts <<$idb>> # Magic to get the test* commands in the children - load {} Tcltest $ida - load {} Tcltest $idb + load {} tcl::test $ida + load {} tcl::test $idb # Set up channel in interpreter interp eval $ida $helperscript @@ -2123,8 +2123,8 @@ test iocmd-32.1 {origin interpreter of moved channel destroyed during access} -m set idb [interp create];#puts <<$idb>> # Magic to get the test* commands in the children - load {} Tcltest $ida - load {} Tcltest $idb + load {} tcl::test $ida + load {} tcl::test $idb # Set up channel in thread set chan [interp eval $ida $helperscript] @@ -2194,7 +2194,7 @@ proc inthread {chan script args} { # Test thread. set tid [thread::create -preserved] - thread::send $tid {load {} Tcltest} + thread::send $tid {load {} tcl::test} # Init thread configuration. # - Listed variables @@ -2833,7 +2833,7 @@ test iocmd.tf-24.17.bug3522560 {postevent for transfered channel} \ return } LOG THREAD-STARTED - load {} Tcltest + load {} tcl::test proc bgerror s { LOG BGERROR:$s } @@ -3790,10 +3790,10 @@ test iocmd.tf-32.0 {origin thread of moved channel gone} -match glob -body { #puts <<$tcltest::mainThread>>main set tida [thread::create -preserved];#puts <<$tida>> - thread::send $tida {load {} Tcltest} + thread::send $tida {load {} tcl::test} set tidb [thread::create -preserved];#puts <<$tidb>> - thread::send $tidb {load {} Tcltest} + thread::send $tidb {load {} tcl::test} # Set up channel in thread thread::send $tida $helperscript @@ -3840,9 +3840,9 @@ test iocmd.tf-32.1 {origin thread of moved channel destroyed during access} -mat #puts <<$tcltest::mainThread>>main set tida [thread::create -preserved];#puts <<$tida>> - thread::send $tida {load {} Tcltest} + thread::send $tida {load {} tcl::test} set tidb [thread::create -preserved];#puts <<$tidb>> - thread::send $tidb {load {} Tcltest} + thread::send $tidb {load {} tcl::test} # Set up channel in thread thread::send $tida $helperscript diff --git a/tests/ioTrans.test b/tests/ioTrans.test index f185117..e96d603 100644 --- a/tests/ioTrans.test +++ b/tests/ioTrans.test @@ -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]] # Custom constraints used in this file testConstraint testchannel [llength [info commands testchannel]] @@ -1163,8 +1163,8 @@ test iortrans-11.0 {origin interpreter of moved transform gone} -setup { set ida [interp create]; #puts <<$ida>> set idb [interp create]; #puts <<$idb>> # Magic to get the test* commands in the children - load {} Tcltest $ida - load {} Tcltest $idb + load {} tcl::test $ida + load {} tcl::test $idb } -constraints {testchannel} -match glob -body { # Set up channel and transform in interpreter interp eval $ida $helperscript @@ -1206,8 +1206,8 @@ test iortrans-11.1 {origin interpreter of moved transform destroyed during acces set ida [interp create]; #puts <<$ida>> set idb [interp create]; #puts <<$idb>> # Magic to get the test* commands in the children - load {} Tcltest $ida - load {} Tcltest $idb + load {} tcl::test $ida + load {} tcl::test $idb } -constraints {testchannel} -match glob -body { # Set up channel in thread set chan [interp eval $ida $helperscript] @@ -1246,7 +1246,7 @@ test iortrans-11.1 {origin interpreter of moved transform destroyed during acces test iortrans-11.2 {delete interp of reflected transform} -setup { interp create child # Magic to get the test* commands into the child - load {} Tcltest child + load {} tcl::test child } -constraints {testchannel} -body { # Get base channel into the child set c [tempchan] @@ -1285,7 +1285,7 @@ test iortrans-11.2 {delete interp of reflected transform} -setup { proc inthread {chan script args} { # Test thread. set tid [thread::create -preserved] - thread::send $tid {load {} Tcltest} + thread::send $tid {load {} tcl::test} # Init thread configuration. # - Listed variables @@ -2002,9 +2002,9 @@ test iortrans.tf-8.2 {close flushes write buffers, writes data} -setup { test iortrans.tf-11.0 {origin thread of moved transform gone} -setup { #puts <<$tcltest::mainThread>>main set tida [thread::create -preserved]; #puts <<$tida>> - thread::send $tida {load {} Tcltest} + thread::send $tida {load {} tcl::test} set tidb [thread::create -preserved]; #puts <<$tida>> - thread::send $tidb {load {} Tcltest} + thread::send $tidb {load {} tcl::test} } -constraints {testchannel thread} -match glob -body { # Set up channel in thread thread::send $tida $helperscript @@ -2046,9 +2046,9 @@ testConstraint notValgrind [expr {![testConstraint valgrind]}] test iortrans.tf-11.1 {origin thread of moved transform destroyed during access} -setup { #puts <<$tcltest::mainThread>>main set tida [thread::create -preserved]; #puts <<$tida>> - thread::send $tida {load {} Tcltest} + thread::send $tida {load {} tcl::test} set tidb [thread::create -preserved]; #puts <<$tidb>> - thread::send $tidb {load {} Tcltest} + thread::send $tidb {load {} tcl::test} } -constraints {testchannel thread notValgrind} -match glob -body { # Set up channel in thread thread::send $tida $helperscript diff --git a/tests/iogt.test b/tests/iogt.test index fb04b5b..0f1e439 100644 --- a/tests/iogt.test +++ b/tests/iogt.test @@ -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]] namespace eval ::tcl::test::iogt { namespace import ::tcltest::* diff --git a/tests/lindex.test b/tests/lindex.test index f9397d2..1e91af4 100644 --- a/tests/lindex.test +++ b/tests/lindex.test @@ -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]] set minus - testConstraint testevalex [llength [info commands testevalex]] diff --git a/tests/link.test b/tests/link.test index 89e5aa2..a95f241 100644 --- a/tests/link.test +++ b/tests/link.test @@ -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 testlink [llength [info commands testlink]] testConstraint testlinkarray [llength [info commands testlinkarray]] @@ -28,7 +28,7 @@ foreach i {int real bool string} { test link-0.1 {leak test} {testlink} { interp create i - load {} Tcltest i + load {} tcl::test i i eval { testlink create 1 0 0 0 0 0 0 0 0 0 0 0 0 0 namespace delete :: diff --git a/tests/listObj.test b/tests/listObj.test index ce6c978..1b7f848 100644 --- a/tests/listObj.test +++ b/tests/listObj.test @@ -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 testobj [llength [info commands testobj]] diff --git a/tests/load.test b/tests/load.test index c79ddf4..f6e68b9 100644 --- a/tests/load.test +++ b/tests/load.test @@ -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]] # Figure out what extension is used for shared libraries on this # platform. @@ -78,7 +78,7 @@ test load-2.1 {basic loading, with guess for package name} \ interp create -safe child test load-2.2 {loading into a safe interpreter, with package name conversion} \ [list $dll $loaded] { - load -lazy [file join $testDir pkgb$ext] pKgB child + load -lazy [file join $testDir pkgb$ext] pkgb child list [child eval pkgb_sub 44 13] [catch {child eval pkgb_unsafe} msg] $msg \ [catch {pkgb_sub 12 10} msg2] $msg2 } {31 1 {invalid command name "pkgb_unsafe"} 1 {invalid command name "pkgb_sub"}} @@ -90,7 +90,7 @@ test load-2.3 {loading with no _Init procedure} -constraints [list $dll $loaded] {TCL LOOKUP LOAD_SYMBOL *Foo_Init}] test load-2.4 {loading with no _SafeInit procedure} [list $dll $loaded] { list [catch {load [file join $testDir pkga$ext] {} child} msg] $msg -} {1 {can't use package in a safe interpreter: no Pkga_SafeInit procedure}} +} {1 {can't use package in a safe interpreter: no pkga_SafeInit procedure}} test load-3.1 {error in _Init procedure, same interpreter} \ [list $dll $loaded] { @@ -128,7 +128,7 @@ test load-4.2 {reloading package into same interpreter} -setup { catch {load [file join $testDir pkga$ext] pkga} } -constraints [list $dll $loaded] -returnCodes error -body { load [file join $testDir pkga$ext] pkgb -} -result "file \"[file join $testDir pkga$ext]\" is already loaded for package \"Pkga\"" +} -result "file \"[file join $testDir pkga$ext]\" is already loaded for package \"pkga\"" test load-5.1 {file name not specified and no static package: pick default} -setup { catch {interp delete x} @@ -139,7 +139,7 @@ test load-5.1 {file name not specified and no static package: pick default} -set info loaded x } -cleanup { interp delete x -} -result [list [list [file join $testDir pkga$ext] Pkga]] +} -result [list [list [file join $testDir pkga$ext] pkga]] # On some platforms, like SunOS 4.1.3, these tests can't be run because # they cause the process to exit. @@ -152,82 +152,82 @@ test load-6.1 {errors loading file} [list $dll $loaded] { test load-7.1 {Tcl_StaticPackage procedure} [list teststaticpkg] { set x "not loaded" - teststaticpkg Test 1 0 - load {} Test - load {} Test child + teststaticpkg test 1 0 + load {} test + load {} test child list [set x] [child eval set x] } {loaded loaded} test load-7.2 {Tcl_StaticPackage procedure} [list teststaticpkg] { set x "not loaded" - teststaticpkg Another 0 0 - load {} Another + teststaticpkg another 0 0 + load {} another child eval {set x "not loaded"} - list [catch {load {} Another child} msg] $msg \ + list [catch {load {} another child} msg] $msg \ [child eval set x] [set x] -} {1 {can't use package in a safe interpreter: no Another_SafeInit procedure} {not loaded} loaded} +} {1 {can't use package in a safe interpreter: no another_SafeInit procedure} {not loaded} loaded} test load-7.3 {Tcl_StaticPackage procedure} [list teststaticpkg] { set x "not loaded" - teststaticpkg More 0 1 - load {} More + teststaticpkg more 0 1 + load {} more set x } {not loaded} catch {load [file join $testDir pkga$ext] pkga} catch {load [file join $testDir pkgb$ext] pkgb} catch {load [file join $testDir pkge$ext] pkge} -set currentRealPackages [list [list [file join $testDir pkge$ext] Pkge] [list [file join $testDir pkgb$ext] Pkgb] [list [file join $testDir pkga$ext] Pkga]] +set currentRealPackages [list [list [file join $testDir pkge$ext] pkge] [list [file join $testDir pkgb$ext] pkgb] [list [file join $testDir pkga$ext] pkga]] test load-7.4 {Tcl_StaticPackage procedure, redundant calls} -setup { - teststaticpkg Test 1 0 - teststaticpkg Another 0 0 - teststaticpkg More 0 1 + teststaticpkg test 1 0 + teststaticpkg another 0 0 + teststaticpkg more 0 1 } -constraints [list teststaticpkg $dll $loaded] -body { - teststaticpkg Double 0 1 - teststaticpkg Double 0 1 + teststaticpkg double 0 1 + teststaticpkg double 0 1 info loaded -} -result [list {{} Double} {{} More} {{} Another} {{} Test} {*}$currentRealPackages {*}$alreadyTotalLoaded] +} -result [list {{} double} {{} more} {{} another} {{} test} {*}$currentRealPackages {*}$alreadyTotalLoaded] testConstraint teststaticpkg_8.x 0 if {[testConstraint teststaticpkg]} { catch { - teststaticpkg Test 1 1 - teststaticpkg Another 0 1 - teststaticpkg More 0 1 - teststaticpkg Double 0 1 + teststaticpkg test 1 1 + teststaticpkg another 0 1 + teststaticpkg more 0 1 + teststaticpkg double 0 1 testConstraint teststaticpkg_8.x 1 } } test load-8.1 {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] { lsort -index 1 [info loaded] -} [lsort -index 1 [list {{} Double} {{} More} {{} Another} {{} Test} {*}$currentRealPackages {*}$alreadyTotalLoaded]] +} [lsort -index 1 [list {{} double} {{} more} {{} another} {{} test} {*}$currentRealPackages {*}$alreadyTotalLoaded]] test load-8.2 {TclGetLoadedPackages procedure} -constraints {teststaticpkg_8.x} -body { info loaded gorp } -returnCodes error -result {could not find interpreter "gorp"} test load-8.3a {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] { lsort -index 1 [info loaded {}] -} [lsort -index 1 [list {{} Double} {{} More} {{} Another} {{} Test} [list [file join $testDir pkga$ext] Pkga] [list [file join $testDir pkgb$ext] Pkgb] {*}$alreadyLoaded]] +} [lsort -index 1 [list {{} double} {{} more} {{} another} {{} test} [list [file join $testDir pkga$ext] pkga] [list [file join $testDir pkgb$ext] pkgb] {*}$alreadyLoaded]] test load-8.3b {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] { lsort -index 1 [info loaded child] -} [lsort -index 1 [list {{} Test} [list [file join $testDir pkgb$ext] Pkgb]]] +} [lsort -index 1 [list {{} test} [list [file join $testDir pkgb$ext] pkgb]]] test load-8.4 {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] { load [file join $testDir pkgb$ext] pkgb list [lsort -index 1 [info loaded {}]] [lsort [info commands pkgb_*]] -} [list [lsort -index 1 [concat [list [list [file join $testDir pkgb$ext] Pkgb] {{} Double} {{} More} {{} Another} {{} Test} [list [file join $testDir pkga$ext] Pkga]] $alreadyLoaded]] {pkgb_demo pkgb_sub pkgb_unsafe}] +} [list [lsort -index 1 [concat [list [list [file join $testDir pkgb$ext] pkgb] {{} double} {{} more} {{} another} {{} test} [list [file join $testDir pkga$ext] pkga]] $alreadyLoaded]] {pkgb_demo pkgb_sub pkgb_unsafe}] interp delete child test load-9.1 {Tcl_StaticPackage, load already-loaded package into another interp} -setup { interp create child1 interp create child2 - load {} Tcltest child1 - load {} Tcltest child2 + load {} tcl::test child1 + load {} tcl::test child2 } -constraints {teststaticpkg} -body { - child1 eval { teststaticpkg Loadninepointone 0 1 } - child2 eval { teststaticpkg Loadninepointone 0 1 } + child1 eval { teststaticpkg loadninepointone 0 1 } + child2 eval { teststaticpkg loadninepointone 0 1 } list [child1 eval { info loaded {} }] \ [child2 eval { info loaded {} }] } -match glob -cleanup { interp delete child1 interp delete child2 -} -result {{{{} Loadninepointone} {* Tcltest}} {{{} Loadninepointone} {* Tcltest}}} +} -result {{{{} loadninepointone} {* tcl::test}} {{{} loadninepointone} {* tcl::test}}} test load-10.1 {load from vfs} -setup { set dir [pwd] diff --git a/tests/lrange.test b/tests/lrange.test index a20422f..0238504 100644 --- a/tests/lrange.test +++ b/tests/lrange.test @@ -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 testpurebytesobj [llength [info commands testpurebytesobj]] diff --git a/tests/lset.test b/tests/lset.test index d98a38e..5c1a0d5 100644 --- a/tests/lset.test +++ b/tests/lset.test @@ -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]] proc failTrace {name1 name2 op} { error "trace failed" diff --git a/tests/main.test b/tests/main.test index c7347b9..87e0a9a 100644 --- a/tests/main.test +++ b/tests/main.test @@ -11,12 +11,10 @@ namespace eval ::tcl::test::main { # Is [exec] defined? testConstraint exec [llength [info commands exec]] - # Is the Tcltest package loaded? - # - that is, the special C-coded testing commands in tclTest.c - # - tests use testing commands introduced in Tcltest 8.4 - testConstraint Tcltest [expr { - [llength [package provide Tcltest]] - && [package vsatisfies [package provide Tcltest] 8.5-]}] + # Is the tcl::test package loaded? + testConstraint tcl::test [expr { + [llength [package provide tcl::test]] + && [package vsatisfies [package provide tcl::test] 8.5-]}] # Procedure to simulate interactive typing of commands, line by line proc type {chan script} { @@ -192,7 +190,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-2.1 { Tcl_Main: appInitProc returns error } -constraints { - exec Tcltest + exec tcl::test } -setup { makeFile {puts "In script"} script } -body { @@ -208,7 +206,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-2.2 { Tcl_Main: appInitProc returns error } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << {puts "In script"} -appinitprocerror >& result set f [open result] @@ -221,7 +219,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-2.3 { Tcl_Main: appInitProc deletes interp } -constraints { - exec Tcltest + exec tcl::test } -setup { makeFile {puts "In script"} script } -body { @@ -237,7 +235,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-2.4 { Tcl_Main: appInitProc deletes interp } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << {puts "In script"} \ -appinitprocdeleteinterp >& result @@ -251,7 +249,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-2.5 { Tcl_Main: appInitProc closes stderr } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << {puts "In script"} \ -appinitprocclosestderr >& result @@ -336,7 +334,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-3.5 { Tcl_Main: startup script sets main loop } -constraints { - exec Tcltest + exec tcl::test } -setup { makeFile { rename exit _exit @@ -364,7 +362,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-3.6 { Tcl_Main: startup script sets main loop and closes stdin } -constraints { - exec Tcltest + exec tcl::test } -setup { makeFile { close stdin @@ -393,7 +391,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-3.7 { Tcl_Main: startup script deletes interp } -constraints { - exec Tcltest + exec tcl::test } -setup { makeFile { rename exit _exit @@ -417,7 +415,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-3.8 { Tcl_Main: startup script deletes interp and sets mainloop } -constraints { - exec Tcltest + exec tcl::test } -setup { makeFile { testsetmainloop @@ -461,7 +459,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-4.1 { Tcl_Main: rcFile evaluation deletes interp } -constraints { - exec Tcltest + exec tcl::test } -setup { set rc [makeFile {testinterpdelete {}} rc] } -body { @@ -478,7 +476,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-4.2 { Tcl_Main: rcFile evaluation closes stdin } -constraints { - exec Tcltest + exec tcl::test } -setup { set rc [makeFile {close stdin} rc] } -body { @@ -495,7 +493,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-4.3 { Tcl_Main: rcFile evaluation closes stdin and sets main loop } -constraints { - exec Tcltest + exec tcl::test } -setup { set rc [makeFile { close stdin @@ -523,7 +521,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-4.4 { Tcl_Main: rcFile evaluation sets main loop } -constraints { - exec Tcltest + exec tcl::test } -setup { set rc [makeFile { testsetmainloop @@ -550,7 +548,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-4.5 { Tcl_Main: Bug 1481986 } -constraints { - exec Tcltest + exec tcl::test } -setup { set rc [makeFile { testsetmainloop @@ -698,7 +696,7 @@ namespace eval ::tcl::test::main { Tcl_Main: interactive mode: close stdin -> main loop & [exit] & exit handlers } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { rename exit _exit @@ -722,7 +720,7 @@ namespace eval ::tcl::test::main { Tcl_Main: interactive mode: delete interp -> main loop & exit handlers, but no [exit] } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { rename exit _exit @@ -745,7 +743,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-5.10 { Tcl_Main: exit main loop in mid-interactive command } -constraints { - exec Tcltest + exec tcl::test } -setup { catch {set f [open "|[list [interpreter]]" w+]} catch {chan configure $f -blocking 0} @@ -766,7 +764,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-5.11 { Tcl_Main: EOF in interactive main loop } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { rename exit _exit @@ -788,7 +786,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-5.12 { Tcl_Main: close stdin in interactive main loop } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { rename exit _exit @@ -841,7 +839,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-6.2 { Tcl_Main: prompt deletes interp } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { set tcl_prompt1 {testinterpdelete {}} @@ -893,7 +891,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-6.5 { Tcl_Main: interactive entry to main loop } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { set tcl_interactive 1 @@ -943,7 +941,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-7.1 { Tcl_Main: [exit] defined as no-op -> still have exithandlers } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { proc exit args {} @@ -959,7 +957,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-7.2 { Tcl_Main: [exit] defined as no-op -> still have exithandlers } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { proc exit args {} @@ -979,7 +977,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.1 { StdinProc: handles non-blocking stdin } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -996,7 +994,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.2 { StdinProc: handles stdin EOF } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1018,7 +1016,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.3 { StdinProc: handles interactive stdin EOF } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1039,7 +1037,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.4 { StdinProc: handles stdin close } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1062,7 +1060,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.5 { StdinProc: handles interactive stdin close } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1086,7 +1084,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.6 { StdinProc: handles event loop re-entry } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1105,7 +1103,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.7 { StdinProc: handling of errors } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1122,7 +1120,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.8 { StdinProc: handling of errors, closed stderr } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1140,7 +1138,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.9 { StdinProc: interactive output } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1156,7 +1154,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.10 { StdinProc: interactive output, closed stdout } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1174,7 +1172,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.11 { StdinProc: prompt deletes interp } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1190,7 +1188,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.12 { StdinProc: prompt closes stdin } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << { testsetmainloop @@ -1209,7 +1207,7 @@ namespace eval ::tcl::test::main { test Tcl_Main-8.13 { Bug 1775878 } -constraints { - exec Tcltest + exec tcl::test } -body { exec [interpreter] << "testsetmainloop\nputs \\\npwd\ntestexitmainloop" >& result set f [open result] diff --git a/tests/misc.test b/tests/misc.test index 8f8516e..431fa19 100644 --- a/tests/misc.test +++ b/tests/misc.test @@ -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 testhashsystemhash [llength [info commands testhashsystemhash]] diff --git a/tests/namespace.test b/tests/namespace.test index 8209cf3..2caf1c4 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -19,7 +19,7 @@ if {"::tcltest" ni [namespace children]} { testConstraint memory [llength [info commands memory]] ::tcltest::loadTestedCommands -catch [list package require -exact Tcltest [info patchlevel]] +catch [list package require -exact tcl::test [info patchlevel]] # # REMARK: the tests for 'namespace upvar' are not done here. They are to be diff --git a/tests/notify.test b/tests/notify.test index 7375f83..d83a5b8 100644 --- a/tests/notify.test +++ b/tests/notify.test @@ -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 testevent [llength [info commands testevent]] diff --git a/tests/nre.test b/tests/nre.test index 7cf06d1..aec188c 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -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]] diff --git a/tests/obj.test b/tests/obj.test index e10cebf..66005f6 100644 --- a/tests/obj.test +++ b/tests/obj.test @@ -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 testobj [llength [info commands testobj]] testConstraint longIs32bit [expr {$tcl_platform(wordSize) == 4}] diff --git a/tests/oo.test b/tests/oo.test index b8ae30d..eb90aea 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. -package require TclOO 1.0.3 +package require tcl::oo 1.0.3 if {"::tcltest" ni [namespace children]} { package require tcltest 2.5 namespace import -force ::tcltest::* @@ -38,14 +38,14 @@ if {[testConstraint memory]} { test oo-0.1 {basic test of OO's ability to clean up its initial state} { interp create t t eval { - package require TclOO + package require tcl::oo } interp delete t } {} test oo-0.2 {basic test of OO's ability to clean up its initial state} { set i [interp create] interp eval $i { - package require TclOO + package require tcl::oo namespace delete :: } interp delete $i @@ -79,7 +79,7 @@ test oo-0.6 {cleaning the core class pair; way #1} -setup { interp create t } -body { t eval { - package require TclOO + package require tcl::oo namespace path oo list [catch {class destroy} m] $m [catch {object destroy} m] $m } @@ -90,7 +90,7 @@ test oo-0.7 {cleaning the core class pair; way #2} -setup { interp create t } -body { t eval { - package require TclOO + package require tcl::oo namespace path oo list [catch {object destroy} m] $m [catch {class destroy} m] $m } @@ -109,10 +109,10 @@ test oo-0.8 {leak in variable management} -setup { } -cleanup { foo destroy } -result 0 -test oo-0.9 {various types of presence of the TclOO package} { - list [lsearch -nocase -all -inline [package names] tcloo] \ - [package present TclOO] [expr {$::oo::patchlevel in [package versions TclOO]}] -} [list TclOO $::oo::patchlevel 1] +test oo-0.9 {various types of presence of the tcl::oo package} { + list [lsearch -nocase -all -inline [package names] tcl::oo] \ + [package present tcl::oo] [expr {$::oo::patchlevel in [package versions tcl::oo]}] +} [list tcl::oo $::oo::patchlevel 1] test oo-1.1 {basic test of OO functionality: no classes} { set result {} @@ -383,7 +383,7 @@ test oo-2.1 {basic test of OO functionality: constructor} -setup { # we're modifying the root object class's constructor interp create subinterp subinterp eval { - package require TclOO + package require tcl::oo } } -body { subinterp eval { @@ -514,7 +514,7 @@ test oo-3.1 {basic test of OO functionality: destructor} -setup { # modifying the root object class's constructor interp create subinterp subinterp eval { - package require TclOO + package require tcl::oo } } -body { subinterp eval { @@ -534,7 +534,7 @@ test oo-3.2 {basic test of OO functionality: destructor} -setup { # we're modifying the root object class's constructor interp create subinterp subinterp eval { - package require TclOO + package require tcl::oo } } -body { subinterp eval { diff --git a/tests/ooNext2.test b/tests/ooNext2.test index 0ec7cdd..6c12962 100644 --- a/tests/ooNext2.test +++ b/tests/ooNext2.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. -package require TclOO 1.0.3 +package require tcl::oo 1.0.3 if {"::tcltest" ni [namespace children]} { package require tcltest 2.5 namespace import -force ::tcltest::* diff --git a/tests/ooUtil.test b/tests/ooUtil.test index 7fc9b9c..606b625 100644 --- a/tests/ooUtil.test +++ b/tests/ooUtil.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. -package require TclOO 1.0.3 +package require tcl::oo 1.0.3 if {"::tcltest" ni [namespace children]} { package require tcltest 2.5 namespace import -force ::tcltest::* diff --git a/tests/package.test b/tests/package.test index 1223d82..278947a 100644 --- a/tests/package.test +++ b/tests/package.test @@ -18,12 +18,12 @@ if {"::tcltest" ni [namespace children]} { } ::tcltest::loadTestedCommands -catch [list package require -exact Tcltest [info patchlevel]] +catch [list package require -exact tcl::test [info patchlevel]] # Do all this in a child interp to avoid garbaging the package list set i [interp create] tcltest::loadIntoChildInterpreter $i {*}$argv -catch [list load {} Tcltest $i] +catch [list load {} tcl::test $i] interp eval $i { namespace import -force ::tcltest::* #package forget {*}[package names] @@ -577,7 +577,7 @@ test package-3.44 {Tcl_PkgRequire: exact version matching (1578344)} -setup { } -result {version conflict for package "demo": have 1.2.3, need exactly 1.2} test package-3.50 {Tcl_PkgRequire procedure, picking best stable version} -constraints testpreferstable -setup { interp create child - load {} Tcltest child + load {} tcl::test child child eval { testpreferstable package forget t @@ -1340,7 +1340,7 @@ proc prefer {args} { test package-13.0 {package prefer defaults} -body { prefer -} -result [expr {[string match {*[ab]*} [package provide Tcl]] ? "latest" : "stable"}] +} -result [expr {[string match {*[ab]*} [package provide tcl]] ? "latest" : "stable"}] test package-13.1 {package prefer defaults} -body { set ::env(TCL_PKG_PREFER_LATEST) stable ;# value not relevant! prefer diff --git a/tests/parse.test b/tests/parse.test index 0786478..0203c56 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -17,7 +17,7 @@ namespace eval ::tcl::test::parse { namespace import ::tcltest::* ::tcltest::loadTestedCommands -catch [list package require -exact Tcltest [info patchlevel]] +catch [list package require -exact tcl::test [info patchlevel]] testConstraint testparser [llength [info commands testparser]] testConstraint testbytestring [llength [info commands testbytestring]] @@ -1051,7 +1051,7 @@ test parse-19.1 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints { testevalex } -setup { interp create i - load {} Tcltest i + load {} tcl::test i i eval {proc {} args {}} interp recursionlimit i 3 } -body { @@ -1064,7 +1064,7 @@ test parse-19.2 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints { testevalex } -setup { interp create i - load {} Tcltest i + load {} tcl::test i i eval {proc {} args {}} interp recursionlimit i 2 } -body { diff --git a/tests/parseExpr.test b/tests/parseExpr.test index 8b5e429..3fbd14e 100644 --- a/tests/parseExpr.test +++ b/tests/parseExpr.test @@ -14,7 +14,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]] # Note that the Tcl expression parser (tclCompExpr.c) does not check # the semantic validity of the expressions it parses. It does not check, diff --git a/tests/parseOld.test b/tests/parseOld.test index 7218092..ede80d1 100644 --- a/tests/parseOld.test +++ b/tests/parseOld.test @@ -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 testwordend [llength [info commands testwordend]] testConstraint testbytestring [llength [info commands testbytestring]] diff --git a/tests/pkgMkIndex.test b/tests/pkgMkIndex.test index ad328f8..2d62631 100644 --- a/tests/pkgMkIndex.test +++ b/tests/pkgMkIndex.test @@ -559,8 +559,8 @@ testConstraint $dll [file exists $x] if {[testConstraint $dll]} { makeFile { -# This package provides Pkga, which is also provided by a DLL. -package provide Pkga 1.0 +# This package provides pkga, which is also provided by a DLL. +package provide pkga 1.0 proc pkga_neq { x } { return [expr {! [pkgq_eq $x]}] } @@ -576,7 +576,7 @@ test pkgMkIndex-10.1 {package in DLL and script} [list exec $dll] { set cmd [list pkg_mkIndex -lazy $fullPkgPath [file tail $x] pkga.tcl] exec [interpreter] << $cmd pkgtest::runCreatedIndex {0 {}} -lazy $fullPkgPath pkga[info sharedlibextension] pkga.tcl -} "0 {{Pkga:1.0 {tclPkgSetup {pkga[info sharedlibextension] load {pkga_eq pkga_quote}} {pkga.tcl source pkga_neq}}}}" +} "0 {{pkga:1.0 {tclPkgSetup {pkga[info sharedlibextension] load {pkga_eq pkga_quote}} {pkga.tcl source pkga_neq}}}}" test pkgMkIndex-10.2 {package in DLL hidden by -load} [list exec $dll] { # Do all [load]ing of shared libraries in another process, so we can # delete the file and not get stuck because we're holding a reference to diff --git a/tests/platform.test b/tests/platform.test index fff16fd..bdc9995 100644 --- a/tests/platform.test +++ b/tests/platform.test @@ -21,7 +21,7 @@ namespace eval ::tcl::test::platform { namespace upvar :: tcl_platform tcl_platform ::tcltest::loadTestedCommands -catch [list package require -exact Tcltest [info patchlevel]] +catch [list package require -exact tcl::test [info patchlevel]] package require tcltests testConstraint testCPUID [llength [info commands testcpuid]] diff --git a/tests/proc.test b/tests/proc.test index 4b539c4..e102681 100644 --- a/tests/proc.test +++ b/tests/proc.test @@ -18,7 +18,7 @@ if {"::tcltest" ni [namespace children]} { namespace import -force ::tcltest::* } -testConstraint procbodytest [expr {![catch {package require procbodytest}]}] +testConstraint tcl::test [expr {![catch {package require tcl::test}]}] testConstraint memory [llength [info commands memory]] catch {namespace delete {*}[namespace children :: test_ns_*]} @@ -210,14 +210,14 @@ catch {rename p ""} catch {rename t ""} # Note that the test require that procedures whose body is used to create -# procbody objects must be executed before the procbodytest::proc command is +# procbody objects must be executed before the tcl::procbodytest::proc command is # executed, so that the Proc struct is populated correctly (CompiledLocals are # added at compile time). -test proc-4.1 {TclCreateProc, procbody obj} -constraints procbodytest -body { +test proc-4.1 {TclCreateProc, procbody obj} -constraints tcl::test -body { proc p x {return "$x:$x"} set rv [p P] - procbodytest::proc t x p + tcl::procbodytest::proc t x p lappend rv [t T] } -cleanup { catch {rename p ""} @@ -229,9 +229,9 @@ test proc-4.2 {TclCreateProc, procbody obj, use compiled locals} -body { return "$x:$y" } set rv [p P] - procbodytest::proc t x p + tcl::procbodytest::proc t x p lappend rv [t T] -} -constraints procbodytest -cleanup { +} -constraints tcl::test -cleanup { catch {rename p ""} catch {rename t ""} } -result {P:p T:t} @@ -241,9 +241,9 @@ test proc-4.3 {TclCreateProc, procbody obj, too many args} -body { return "$x:$y" } set rv [p P] - procbodytest::proc t {x x1 x2} p + tcl::procbodytest::proc t {x x1 x2} p lappend rv [t T] -} -constraints procbodytest -returnCodes error -cleanup { +} -constraints tcl::test -returnCodes error -cleanup { catch {rename p ""} catch {rename t ""} } -result {procedure "t": arg list contains 3 entries, precompiled header expects 1} @@ -254,9 +254,9 @@ test proc-4.4 {TclCreateProc, procbody obj, inconsistent arg name} -body { return "$v:$w" } set rv [p P Q R] - procbodytest::proc t {x x1 z} p + tcl::procbodytest::proc t {x x1 z} p lappend rv [t S T U] -} -constraints procbodytest -returnCodes error -cleanup { +} -constraints tcl::test -returnCodes error -cleanup { catch {rename p ""} catch {rename t ""} } -result {procedure "t": formal parameter 1 is inconsistent with precompiled body} @@ -267,9 +267,9 @@ test proc-4.5 {TclCreateProc, procbody obj, inconsistent arg default type} -body return "$v:$w" } set rv [p P Q R] - procbodytest::proc t {x y z} p + tcl::procbodytest::proc t {x y z} p lappend rv [t S T U] -} -constraints procbodytest -returnCodes error -cleanup { +} -constraints tcl::test -returnCodes error -cleanup { catch {rename p ""} catch {rename t ""} } -result {procedure "t": formal parameter 2 is inconsistent with precompiled body} @@ -280,9 +280,9 @@ test proc-4.6 {TclCreateProc, procbody obj, inconsistent arg default type} -body return "$v:$w" } set rv [p P Q R] - procbodytest::proc t {x y {z Z}} p + tcl::procbodytest::proc t {x y {z Z}} p lappend rv [t S T U] -} -returnCodes error -constraints procbodytest -cleanup { +} -returnCodes error -constraints tcl::test -cleanup { catch {rename p ""} catch {rename t ""} } -result {procedure "t": formal parameter 2 is inconsistent with precompiled body} @@ -293,9 +293,9 @@ test proc-4.7 {TclCreateProc, procbody obj, inconsistent arg default value} -bod return "$v:$w" } set rv [p P Q R] - procbodytest::proc t {x y {z ZZ}} p + tcl::procbodytest::proc t {x y {z ZZ}} p lappend rv [t S T U] -} -constraints procbodytest -returnCodes error -cleanup { +} -constraints tcl::test -returnCodes error -cleanup { catch {rename p ""} catch {rename t ""} } -result {procedure "t": formal parameter "z" has default value inconsistent with precompiled body} @@ -309,10 +309,10 @@ test proc-4.8 {TclCreateProc, procbody obj, no leak on multiple iterations} -set return "$x:$y" } px x -} -constraints {procbodytest memory} -body { +} -constraints {tcl::test memory} -body { set end [getbytes] for {set i 0} {$i < 5} {incr i} { - procbodytest::proc tx x px + tcl::procbodytest::proc tx x px set tmp $end set end [getbytes] } @@ -321,8 +321,8 @@ test proc-4.8 {TclCreateProc, procbody obj, no leak on multiple iterations} -set rename getbytes {} unset -nocomplain end i tmp leakedBytes } -result 0 -test proc-4.9 {[39fed4dae5] Valid Tcl_PkgPresent return} procbodytest { - procbodytest::check +test proc-4.9 {[39fed4dae5] Valid Tcl_PkgPresent return} tcl::test { + tcl::procbodytest::check } 1 test proc-5.1 {Bytecompiling noop; test for correct argument substitution} -body { diff --git a/tests/reg.test b/tests/reg.test index 847da32..add8e91 100644 --- a/tests/reg.test +++ b/tests/reg.test @@ -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]] # All tests require the testregexp command, return if this # command doesn't exist diff --git a/tests/rename.test b/tests/rename.test index ddda909..702a6d0 100644 --- a/tests/rename.test +++ b/tests/rename.test @@ -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 testdel [llength [info commands testdel]] diff --git a/tests/resolver.test b/tests/resolver.test index 9916529..8693cdc 100644 --- a/tests/resolver.test +++ b/tests/resolver.test @@ -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 testinterpresolver [llength [info commands testinterpresolver]] diff --git a/tests/result.test b/tests/result.test index f1f5fb7..7790578 100644 --- a/tests/result.test +++ b/tests/result.test @@ -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]] # Some tests require the testsaveresult command diff --git a/tests/safe-zipfs.test b/tests/safe-zipfs.test index 73703e4..bbae4ba 100644 --- a/tests/safe-zipfs.test +++ b/tests/safe-zipfs.test @@ -13,8 +13,6 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. -package require Tcl 8.5- - if {"::tcltest" ni [namespace children]} { package require tcltest 2.5 namespace import -force ::tcltest::* @@ -53,10 +51,10 @@ proc mapAndSortList {map listIn} { # thus un-autoindexed) APIs in this test result arguments: catch {safe::interpConfigure} -# testing that nested and statics do what is advertised (we use a static -# package - Tcltest - but it might be absent if we're in standard tclsh) +# testing that nested and statics do what is advertised (we use a +# package - tcl::test - but it might be absent if we're in standard tclsh) -testConstraint TcltestPackage [expr {![catch {package require Tcltest}]}] +testConstraint tcl::test [expr {![catch {package require tcl::test}]}] # Tests 5.* test the example files before using them to test safe interpreters. diff --git a/tests/safe.test b/tests/safe.test index 1177e19..6e5afc4 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -54,9 +54,9 @@ proc mapAndSortList {map listIn} { catch {safe::interpConfigure} # testing that nested and statics do what is advertised (we use a static -# package - Tcltest - but it might be absent if we're in standard tclsh) +# package - tcl::test - but it might be absent if we're in standard tclsh) -testConstraint TcltestPackage [expr {![catch {package require Tcltest}]}] +testConstraint tcl::test [expr {![catch {package require tcl::test}]}] test safe-1.1 {safe::interpConfigure syntax} -returnCodes error -body { safe::interpConfigure @@ -1158,14 +1158,14 @@ test safe-9.24 {interpConfigure change the access path; check module loading; st # See comments on lsort after test safe-9.20. catch {teststaticpkg Safepkg1 0 0} -test safe-10.1 {testing statics loading} -constraints TcltestPackage -setup { +test safe-10.1 {testing statics loading} -constraints tcl::test -setup { set i [safe::interpCreate] } -body { interp eval $i {load {} Safepkg1} } -returnCodes error -cleanup { safe::interpDelete $i } -result {load of binary library for package Safepkg1 failed: can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} -test safe-10.1.1 {testing statics loading} -constraints TcltestPackage -setup { +test safe-10.1.1 {testing statics loading} -constraints tcl::test -setup { set i [safe::interpCreate] } -body { catch {interp eval $i {load {} Safepkg1}} m o @@ -1178,7 +1178,7 @@ test safe-10.1.1 {testing statics loading} -constraints TcltestPackage -setup { "load {} Safepkg1" invoked from within "interp eval $i {load {} Safepkg1}"} -test safe-10.2 {testing statics loading / -nostatics} -constraints TcltestPackage -body { +test safe-10.2 {testing statics loading / -nostatics} -constraints tcl::test -body { set i [safe::interpCreate -nostatics] interp eval $i {load {} Safepkg1} } -returnCodes error -cleanup { @@ -1186,18 +1186,18 @@ test safe-10.2 {testing statics loading / -nostatics} -constraints TcltestPackag } -result {permission denied (static package)} test safe-10.3 {testing nested statics loading / no nested by default} -setup { set i [safe::interpCreate] -} -constraints TcltestPackage -body { +} -constraints tcl::test -body { interp eval $i {interp create x; load {} Safepkg1 x} } -returnCodes error -cleanup { safe::interpDelete $i } -result {permission denied (nested load)} -test safe-10.4 {testing nested statics loading / -nestedloadok} -constraints TcltestPackage -body { +test safe-10.4 {testing nested statics loading / -nestedloadok} -constraints tcl::test -body { set i [safe::interpCreate -nestedloadok] interp eval $i {interp create x; load {} Safepkg1 x} } -returnCodes error -cleanup { safe::interpDelete $i } -result {load of binary library for package Safepkg1 failed: can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} -test safe-10.4.1 {testing nested statics loading / -nestedloadok} -constraints TcltestPackage -body { +test safe-10.4.1 {testing nested statics loading / -nestedloadok} -constraints tcl::test -body { set i [safe::interpCreate -nestedloadok] catch {interp eval $i {interp create x; load {} Safepkg1 x}} m o dict get $o -errorinfo diff --git a/tests/set.test b/tests/set.test index 303c2d7..30c6c6d 100644 --- a/tests/set.test +++ b/tests/set.test @@ -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 testset2 [llength [info commands testset2]] diff --git a/tests/socket.test b/tests/socket.test index 759008f..82f5968 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -66,7 +66,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]] ::tcltest::loadTestedCommands if {[info exists ::env(TRAVIS_OSX_IMAGE)] && [string match xcode* $::env(TRAVIS_OSX_IMAGE)]} { diff --git a/tests/string.test b/tests/string.test index 4817bec..d03ac67 100644 --- a/tests/string.test +++ b/tests/string.test @@ -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]] # Helper commands to test various optimizations, code paths, and special cases. proc makeByteArray {s} {binary format a* $s} diff --git a/tests/stringObj.test b/tests/stringObj.test index ca6c323..ed43924 100644 --- a/tests/stringObj.test +++ b/tests/stringObj.test @@ -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 testobj [llength [info commands testobj]] testConstraint testbytestring [llength [info commands testbytestring]] diff --git a/tests/subst.test b/tests/subst.test index 4361d95..635177c 100644 --- a/tests/subst.test +++ b/tests/subst.test @@ -16,7 +16,7 @@ if {"::tcltest" ni [namespace children]} { namespace import -force ::tcltest::* } ::tcltest::loadTestedCommands -catch [list package require -exact Tcltest [info patchlevel]] +catch [list package require -exact tcl::test [info patchlevel]] testConstraint testbytestring [llength [info commands testbytestring]] diff --git a/tests/tailcall.test b/tests/tailcall.test index 3704333..10945db 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -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]] diff --git a/tests/thread.test b/tests/thread.test index 0a35d1b..262192b 100644 --- a/tests/thread.test +++ b/tests/thread.test @@ -20,7 +20,7 @@ if {"::tcltest" ni [namespace children]} { # be fully finalized, which avoids valgrind "still reachable" reports. ::tcltest::loadTestedCommands -catch [list package require -exact Tcltest [info patchlevel]] +catch [list package require -exact tcl::test [info patchlevel]] package require tcltests # Some tests require the testthread command diff --git a/tests/trace.test b/tests/trace.test index c1e1a24..1bf3bdf 100644 --- a/tests/trace.test +++ b/tests/trace.test @@ -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 testcmdtrace [llength [info commands testcmdtrace]] testConstraint testevalobjv [llength [info commands testevalobjv]] diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test index 1ecaeef..ebc55dc 100644 --- a/tests/unixFCmd.test +++ b/tests/unixFCmd.test @@ -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 testchmod [llength [info commands testchmod]] diff --git a/tests/unixFile.test b/tests/unixFile.test index 492e5d0..2ba758b 100644 --- a/tests/unixFile.test +++ b/tests/unixFile.test @@ -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 testfindexecutable [llength [info commands testfindexecutable]] diff --git a/tests/unload.test b/tests/unload.test index 815ff31..ca007ef 100644 --- a/tests/unload.test +++ b/tests/unload.test @@ -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]] # Figure out what extension is used for shared libraries on this # platform. @@ -135,17 +135,17 @@ child eval { set pkgua_detached {} set pkgua_unloaded {} } -test unload-3.1 {basic loading of non-unloadable package in a safe interpreter, with package name conversion} \ +test unload-3.1 {basic loading of non-unloadable package in a safe interpreter} \ [list $dll $loaded] { catch {rename pkgb_sub {}} - load [file join $testDir pkgb$ext] pKgB child + load [file join $testDir pkgb$ext] pkgb child list [child eval pkgb_sub 44 13] [catch {child eval pkgb_unsafe} msg] $msg \ [catch {pkgb_sub 12 10} msg2] $msg2 } {31 1 {invalid command name "pkgb_unsafe"} 1 {invalid command name "pkgb_sub"}} -test unload-3.2 {basic loading of unloadable package in a safe interpreter, with package name conversion} \ +test unload-3.2 {basic loading of unloadable package in a safe interpreter} \ [list $dll $loaded] { list [child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] \ - [load [file join $testDir pkgua$ext] pKgUA child] \ + [load [file join $testDir pkgua$ext] pkgua child] \ [child eval pkgua_eq abc def] \ [lsort [child eval info commands pkgua_*]] \ [child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] @@ -157,7 +157,7 @@ test unload-3.3 {unloading of a package that has never been loaded from a safe i } -result {file "*" has never been loaded in this interpreter} test unload-3.4 {basic unloading of a non-unloadable package from a safe interpreter, with guess for package name} -setup { if {[lsearch -index 1 [info loaded child] Pkgb] < 0} { - load [file join $testDir pkgb$ext] pKgB child + load [file join $testDir pkgb$ext] pkgb child } } -constraints [list $dll $loaded] -returnCodes error -match glob -body { unload [file join $testDir pkgb$ext] {} child @@ -218,7 +218,7 @@ test unload-4.1 {loading of unloadable package in trusted interpreter, with gues [list $pkgua_loaded $pkgua_detached $pkgua_unloaded] } -result {{{} {} {}} {} 0 {pkgua_eq pkgua_quote} {. {} {}}} ## Load package in child-safe interpreter... -test unload-4.2 {basic loading of unloadable package in a safe interpreter, with package name conversion} -setup { +test unload-4.2 {basic loading of unloadable package in a safe interpreter} -setup { child eval { set pkgua_loaded "" set pkgua_detached "" @@ -227,17 +227,17 @@ test unload-4.2 {basic loading of unloadable package in a safe interpreter, with incr load(C) } -constraints [list $dll $loaded] -body { list [child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] \ - [load [file join $testDir pkgua$ext] pKgUA child] \ + [load [file join $testDir pkgua$ext] pkgua child] \ [child eval pkgua_eq abc def] \ [lsort [child eval info commands pkgua_*]] \ [child eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] } -result {{{} {} {}} {} 0 {pkgua_eq pkgua_quote} {. {} {}}} ## Load package in child-trusted interpreter... -test unload-4.3 {basic loading of unloadable package in a second trusted interpreter, with package name conversion} -setup { +test unload-4.3 {basic loading of unloadable package in a second trusted interpreter} -setup { incr load(T) } -constraints [list $dll $loaded] -body { list [child-trusted eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] \ - [load [file join $testDir pkgua$ext] pkguA child-trusted] \ + [load [file join $testDir pkgua$ext] pkgua child-trusted] \ [child-trusted eval pkgua_eq abc def] \ [lsort [child-trusted eval info commands pkgua_*]] \ [child-trusted eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] diff --git a/tests/upvar.test b/tests/upvar.test index 9e44a79..170721f 100644 --- a/tests/upvar.test +++ b/tests/upvar.test @@ -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 testupvar [llength [info commands testupvar]] diff --git a/tests/utf.test b/tests/utf.test index 935830c..eacff20 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -14,7 +14,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 ucs2 [expr {[format %c 0x010000] eq "\uFFFD"}] testConstraint fullutf [expr {[format %c 0x010000] ne "\uFFFD"}] diff --git a/tests/util.test b/tests/util.test index d8e5507..9dadcb9 100644 --- a/tests/util.test +++ b/tests/util.test @@ -13,7 +13,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 controversialNaN 1 testConstraint testbytestring [llength [info commands testbytestring]] diff --git a/tests/var.test b/tests/var.test index 19b7703..f326616 100644 --- a/tests/var.test +++ b/tests/var.test @@ -20,7 +20,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 testupvar [llength [info commands testupvar]] testConstraint testgetvarfullname [llength [info commands testgetvarfullname]] diff --git a/tests/winDde.test b/tests/winDde.test index d2fb8a0..9f2423b 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -14,7 +14,7 @@ if {"::tcltest" ni [namespace children]} { namespace import -force ::tcltest::* } -testConstraint debug [::tcl::pkgconfig get debug] +testConstraint debug [expr {"debug" in [split [package provide Tcl] .]}] testConstraint dde 0 if {[testConstraint win]} { if {![catch { diff --git a/tests/winFCmd.test b/tests/winFCmd.test index 70db379..c390de3 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -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]] # Initialise the test constraints diff --git a/tests/winFile.test b/tests/winFile.test index 2c0988a..07bee07 100644 --- a/tests/winFile.test +++ b/tests/winFile.test @@ -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 testvolumetype [llength [info commands testvolumetype]] testConstraint notNTFS 0 diff --git a/tests/winNotify.test b/tests/winNotify.test index 0433b4a..05682b4 100644 --- a/tests/winNotify.test +++ b/tests/winNotify.test @@ -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 testeventloop [expr {[info commands testeventloop] != {}}] diff --git a/tests/winPipe.test b/tests/winPipe.test index 919e336..9680dab 100644 --- a/tests/winPipe.test +++ b/tests/winPipe.test @@ -20,8 +20,8 @@ unset -nocomplain path 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 [lindex [package ifneeded tcl::test [info patchlevel]] 1] } set org_pwd [pwd] @@ -203,7 +203,7 @@ test winpipe-4.1 {Tcl_WaitPid} {win exec cat32} { test winpipe-4.2 {Tcl_WaitPid: return of exception codes, SIGFPE} {win exec testexcept notWine} { set f [open "|[list [interpreter]]" w+] set pid [pid $f] - puts $f "load $::tcltestlib Tcltest" + puts $f "load $::tcltestlib tcl::test" puts $f "testexcept float_underflow" set status [catch {close $f}] list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2] @@ -211,7 +211,7 @@ test winpipe-4.2 {Tcl_WaitPid: return of exception codes, SIGFPE} {win exec test test winpipe-4.3 {Tcl_WaitPid: return of exception codes, SIGSEGV} {win exec testexcept notWine} { set f [open "|[list [interpreter]]" w+] set pid [pid $f] - puts $f "load $::tcltestlib Tcltest" + puts $f "load $::tcltestlib tcl::test" puts $f "testexcept access_violation" set status [catch {close $f}] list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2] @@ -219,7 +219,7 @@ test winpipe-4.3 {Tcl_WaitPid: return of exception codes, SIGSEGV} {win exec tes test winpipe-4.4 {Tcl_WaitPid: return of exception codes, SIGILL} {win exec testexcept notWine} { set f [open "|[list [interpreter]]" w+] set pid [pid $f] - puts $f "load $::tcltestlib Tcltest" + puts $f "load $::tcltestlib tcl::test" puts $f "testexcept illegal_instruction" set status [catch {close $f}] list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2] @@ -227,7 +227,7 @@ test winpipe-4.4 {Tcl_WaitPid: return of exception codes, SIGILL} {win exec test test winpipe-4.5 {Tcl_WaitPid: return of exception codes, SIGINT} {win exec testexcept notWine} { set f [open "|[list [interpreter]]" w+] set pid [pid $f] - puts $f "load $::tcltestlib Tcltest" + puts $f "load $::tcltestlib tcl::test" puts $f "testexcept ctrl+c" set status [catch {close $f}] list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2] diff --git a/tests/winTime.test b/tests/winTime.test index 19e4c58..c03e316 100644 --- a/tests/winTime.test +++ b/tests/winTime.test @@ -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 testwinclock [llength [info commands testwinclock]] testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}] diff --git a/tests/zipfs.test b/tests/zipfs.test index 017193b..55654e4 100644 --- a/tests/zipfs.test +++ b/tests/zipfs.test @@ -31,7 +31,7 @@ set tmpdir [file join $CWD tmp] file mkdir $tmpdir test zipfs-0.0 {zipfs basics} -constraints zipfs -body { - package require zipfs + package require tcl::zipfs } -result {2.0} test zipfs-0.1 {zipfs basics} -constraints zipfs -body { expr {${ziproot} in [file volumes]} diff --git a/tests/zlib.test b/tests/zlib.test index 7ddf1d7..47dc7f0 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -34,7 +34,7 @@ test zlib-1.3 {zlib basics} -constraints zlib -body { zlib::pkgconfig list } -result zlibVersion test zlib-1.4 {zlib basics} -constraints zlib -body { - package present zlib + package present tcl::zlib } -result 2.0.1 test zlib-2.1 {zlib compress/decompress} zlib { diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c index b2267a7..c2d814f 100644 --- a/unix/dltest/pkga.c +++ b/unix/dltest/pkga.c @@ -129,7 +129,7 @@ Pkga_Init( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "Pkga", "1.0"); + code = Tcl_PkgProvide(interp, "pkga", "1.0"); if (code != TCL_OK) { return code; } diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 32e2d73..8d8d123 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -152,7 +152,7 @@ Pkgb_Init( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "Pkgb", "2.3"); + code = Tcl_PkgProvide(interp, "pkgb", "2.3"); if (code != TCL_OK) { return code; } @@ -189,7 +189,7 @@ Pkgb_SafeInit( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "Pkgb", "2.3"); + code = Tcl_PkgProvide(interp, "pkgb", "2.3"); if (code != TCL_OK) { return code; } diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c index a2c4db1..46f6e86 100644 --- a/unix/dltest/pkgc.c +++ b/unix/dltest/pkgc.c @@ -121,7 +121,7 @@ Pkgc_Init( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "Pkgc", "1.7.2"); + code = Tcl_PkgProvide(interp, "pkgc", "1.7.2"); if (code != TCL_OK) { return code; } @@ -158,7 +158,7 @@ Pkgc_SafeInit( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "Pkgc", "1.7.2"); + code = Tcl_PkgProvide(interp, "pkgc", "1.7.2"); if (code != TCL_OK) { return code; } diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c index e0986f7..d64c807 100644 --- a/unix/dltest/pkgd.c +++ b/unix/dltest/pkgd.c @@ -121,7 +121,7 @@ Pkgd_Init( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "Pkgd", "7.3"); + code = Tcl_PkgProvide(interp, "pkgd", "7.3"); if (code != TCL_OK) { return code; } @@ -158,7 +158,7 @@ Pkgd_SafeInit( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "Pkgd", "7.3"); + code = Tcl_PkgProvide(interp, "pkgd", "7.3"); if (code != TCL_OK) { return code; } diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c index 9aebc3f..7d0c98b 100644 --- a/unix/dltest/pkgooa.c +++ b/unix/dltest/pkgooa.c @@ -138,7 +138,7 @@ Pkgooa_Init( tclOOStubsPtr = &stubsCopy; - code = Tcl_PkgProvide(interp, "Pkgooa", "1.0"); + code = Tcl_PkgProvide(interp, "pkgooa", "1.0"); if (code != TCL_OK) { return code; } diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c index 1c7b46f..c5102a8 100644 --- a/unix/dltest/pkgua.c +++ b/unix/dltest/pkgua.c @@ -213,7 +213,7 @@ Pkgua_Init( PkguaInitTokensHashTable(); - code = Tcl_PkgProvide(interp, "Pkgua", "1.0"); + code = Tcl_PkgProvide(interp, "pkgua", "1.0"); if (code != TCL_OK) { return code; } diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index 3587f35..88b396b 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -124,7 +124,7 @@ Tcl_AppInit( if (Tcltest_Init(interp) == TCL_ERROR) { return TCL_ERROR; } - Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, Tcltest_SafeInit); + Tcl_StaticPackage(interp, "tcl::test", Tcltest_Init, Tcltest_SafeInit); #endif /* TCL_TEST */ /* diff --git a/win/Makefile.in b/win/Makefile.in index fac21a8..3c3303d 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -158,7 +158,7 @@ TEST_LIB_FILE = @LIBPREFIX@tcltest$(VER)${DLLSUFFIX}${LIBSUFFIX} TEST_LOAD_PRMS = lappend ::auto_path {$(ROOT_DIR_WIN_NATIVE)/tests};\ package ifneeded dde 1.4.3 [list load [file normalize ${DDE_DLL_FILE}] dde];\ package ifneeded registry 1.3.5 [list load [file normalize ${REG_DLL_FILE}] registry] -TEST_LOAD_FACILITIES = package ifneeded Tcltest ${VERSION}@TCL_PATCH_LEVEL@ [list load [file normalize ${TEST_DLL_FILE}] Tcltest];\ +TEST_LOAD_FACILITIES = package ifneeded tcl::test ${VERSION}@TCL_PATCH_LEVEL@ [list load [file normalize ${TEST_DLL_FILE}] tcl::test];\ $(TEST_LOAD_PRMS) ZLIB_DLL_FILE = zlib1.dll TOMMATH_DLL_FILE = libtommath.dll diff --git a/win/tclAppInit.c b/win/tclAppInit.c index de5f788..0418911 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -180,7 +180,7 @@ Tcl_AppInit( if (Tcltest_Init(interp) == TCL_ERROR) { return TCL_ERROR; } - Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, Tcltest_SafeInit); + Tcl_StaticPackage(interp, "tcl::test", Tcltest_Init, Tcltest_SafeInit); #endif /* TCL_TEST */ /* -- cgit v0.12 From e69d8e8e92d1212f636f7e4bf4e70d4c66be5305 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 3 Nov 2020 16:24:01 +0000 Subject: Correct casing in some error-messages --- generic/tclLoad.c | 22 +++++++++++++++++++--- tests/load.test | 4 ++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/generic/tclLoad.c b/generic/tclLoad.c index bea07ed..eb60562 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -429,6 +429,22 @@ Tcl_LoadObjCmd( */ Tcl_ResetResult(interp); + } else { + Tcl_DStringAppend(&initName, pkgPtr->packageName, -1); + Tcl_DStringSetLength(&initName, + Tcl_UtfToTitle(Tcl_DStringValue(&initName))); + while (strchr(Tcl_DStringValue(&initName), ':') != NULL) { + char *r; + p = Tcl_DStringValue(&initName); + r = strchr((char *)p, ':'); + if ((r != NULL) && (r[1] == ':')) { + memmove(r, r+2, strlen(r+1)); + } + Tcl_DStringSetLength(&initName, strlen(p)); + } + TclDStringAppendDString(&safeInitName, &initName); + TclDStringAppendLiteral(&safeInitName, "_SafeInit"); + TclDStringAppendLiteral(&initName, "_Init"); } /* @@ -440,7 +456,7 @@ Tcl_LoadObjCmd( if (pkgPtr->safeInitProc == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't use package in a safe interpreter: no" - " %s_SafeInit procedure", pkgPtr->packageName)); + " %s procedure", Tcl_DStringValue(&safeInitName))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "UNSAFE", NULL); code = TCL_ERROR; @@ -450,8 +466,8 @@ Tcl_LoadObjCmd( } else { if (pkgPtr->initProc == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "can't attach package to interpreter: no %s_Init procedure", - pkgPtr->packageName)); + "can't attach package to interpreter: no %s procedure", + Tcl_DStringValue(&initName))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "ENTRYPOINT", NULL); code = TCL_ERROR; diff --git a/tests/load.test b/tests/load.test index f6e68b9..674d2a5 100644 --- a/tests/load.test +++ b/tests/load.test @@ -90,7 +90,7 @@ test load-2.3 {loading with no _Init procedure} -constraints [list $dll $loaded] {TCL LOOKUP LOAD_SYMBOL *Foo_Init}] test load-2.4 {loading with no _SafeInit procedure} [list $dll $loaded] { list [catch {load [file join $testDir pkga$ext] {} child} msg] $msg -} {1 {can't use package in a safe interpreter: no pkga_SafeInit procedure}} +} {1 {can't use package in a safe interpreter: no Pkga_SafeInit procedure}} test load-3.1 {error in _Init procedure, same interpreter} \ [list $dll $loaded] { @@ -164,7 +164,7 @@ test load-7.2 {Tcl_StaticPackage procedure} [list teststaticpkg] { child eval {set x "not loaded"} list [catch {load {} another child} msg] $msg \ [child eval set x] [set x] -} {1 {can't use package in a safe interpreter: no another_SafeInit procedure} {not loaded} loaded} +} {1 {can't use package in a safe interpreter: no Another_SafeInit procedure} {not loaded} loaded} test load-7.3 {Tcl_StaticPackage procedure} [list teststaticpkg] { set x "not loaded" teststaticpkg more 0 1 -- cgit v0.12 From ce3437bf88fd92c384b8a1f5af837b8854e9e14b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 3 Nov 2020 16:40:32 +0000 Subject: Undo experimental unrelated changes --- tests/compile.test | 2 +- tests/config.test | 4 ++-- tests/winDde.test | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/compile.test b/tests/compile.test index dd94b06..04d5aea 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -500,7 +500,7 @@ test compile-13.2 {TclCompileScript: testing expected nested scripts compilation # with 1500 (1000 in debug) nested scripts (bodies). If you get SO/SF exceptions on some low-stack # boxes or systems, please don't decrease it (either provide a constraint) ti eval {foreach cmd {eval "if 1" try catch} { - set c [gencode [expr {"debug" ni [split [package provide tcl] .] ? 1500 : 1000}] $cmd] + set c [gencode [expr {![::tcl::pkgconfig get debug] ? 1500 : 1000}] $cmd] if 1 $c }} ti eval {set result} diff --git a/tests/config.test b/tests/config.test index bcf948e..b78e29d 100644 --- a/tests/config.test +++ b/tests/config.test @@ -17,9 +17,9 @@ if {"::tcltest" ni [namespace children]} { namespace import -force ::tcltest::* } -test pkgconfig-1.1 {query keys} -body { +test pkgconfig-1.1 {query keys} { lsort [::tcl::pkgconfig list] -} -match glob -result {*bindir,install bindir,runtime*dllfile,runtime docdir,install docdir,runtime includedir,install includedir,runtime libdir,install libdir,runtime*scriptdir,install scriptdir,runtime*zipfile,runtime} +} {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} test pkgconfig-1.2 {query keys multiple times} { string compare [::tcl::pkgconfig list] [::tcl::pkgconfig list] } 0 diff --git a/tests/winDde.test b/tests/winDde.test index 9f2423b..d2fb8a0 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -14,7 +14,7 @@ if {"::tcltest" ni [namespace children]} { namespace import -force ::tcltest::* } -testConstraint debug [expr {"debug" in [split [package provide Tcl] .]}] +testConstraint debug [::tcl::pkgconfig get debug] testConstraint dde 0 if {[testConstraint win]} { if {![catch { -- cgit v0.12 From efe33a9fd944a5b41f05a2b571d462b536ad2e57 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 4 Nov 2020 08:55:50 +0000 Subject: Vary dltest package names for test purposes --- tests/load.test | 18 +++++++++--------- tests/unload.test | 4 ++-- unix/dltest/pkgb.c | 6 +++--- unix/dltest/pkgd.c | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/load.test b/tests/load.test index 674d2a5..c97a5b5 100644 --- a/tests/load.test +++ b/tests/load.test @@ -78,7 +78,7 @@ test load-2.1 {basic loading, with guess for package name} \ interp create -safe child test load-2.2 {loading into a safe interpreter, with package name conversion} \ [list $dll $loaded] { - load -lazy [file join $testDir pkgb$ext] pkgb child + load -lazy [file join $testDir pkgb$ext] Pkgb child list [child eval pkgb_sub 44 13] [catch {child eval pkgb_unsafe} msg] $msg \ [catch {pkgb_sub 12 10} msg2] $msg2 } {31 1 {invalid command name "pkgb_unsafe"} 1 {invalid command name "pkgb_sub"}} @@ -127,7 +127,7 @@ test load-4.1 {reloading package into same interpreter} [list $dll $loaded] { test load-4.2 {reloading package into same interpreter} -setup { catch {load [file join $testDir pkga$ext] pkga} } -constraints [list $dll $loaded] -returnCodes error -body { - load [file join $testDir pkga$ext] pkgb + load [file join $testDir pkga$ext] Pkgb } -result "file \"[file join $testDir pkga$ext]\" is already loaded for package \"pkga\"" test load-5.1 {file name not specified and no static package: pick default} -setup { @@ -172,9 +172,9 @@ test load-7.3 {Tcl_StaticPackage procedure} [list teststaticpkg] { set x } {not loaded} catch {load [file join $testDir pkga$ext] pkga} -catch {load [file join $testDir pkgb$ext] pkgb} +catch {load [file join $testDir pkgb$ext] Pkgb} catch {load [file join $testDir pkge$ext] pkge} -set currentRealPackages [list [list [file join $testDir pkge$ext] pkge] [list [file join $testDir pkgb$ext] pkgb] [list [file join $testDir pkga$ext] pkga]] +set currentRealPackages [list [list [file join $testDir pkge$ext] pkge] [list [file join $testDir pkgb$ext] Pkgb] [list [file join $testDir pkga$ext] pkga]] test load-7.4 {Tcl_StaticPackage procedure, redundant calls} -setup { teststaticpkg test 1 0 teststaticpkg another 0 0 @@ -204,14 +204,14 @@ test load-8.2 {TclGetLoadedPackages procedure} -constraints {teststaticpkg_8.x} } -returnCodes error -result {could not find interpreter "gorp"} test load-8.3a {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] { lsort -index 1 [info loaded {}] -} [lsort -index 1 [list {{} double} {{} more} {{} another} {{} test} [list [file join $testDir pkga$ext] pkga] [list [file join $testDir pkgb$ext] pkgb] {*}$alreadyLoaded]] +} [lsort -index 1 [list {{} double} {{} more} {{} another} {{} test} [list [file join $testDir pkga$ext] pkga] [list [file join $testDir pkgb$ext] Pkgb] {*}$alreadyLoaded]] test load-8.3b {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] { lsort -index 1 [info loaded child] -} [lsort -index 1 [list {{} test} [list [file join $testDir pkgb$ext] pkgb]]] +} [lsort -index 1 [list {{} test} [list [file join $testDir pkgb$ext] Pkgb]]] test load-8.4 {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] { - load [file join $testDir pkgb$ext] pkgb + load [file join $testDir pkgb$ext] Pkgb list [lsort -index 1 [info loaded {}]] [lsort [info commands pkgb_*]] -} [list [lsort -index 1 [concat [list [list [file join $testDir pkgb$ext] pkgb] {{} double} {{} more} {{} another} {{} test} [list [file join $testDir pkga$ext] pkga]] $alreadyLoaded]] {pkgb_demo pkgb_sub pkgb_unsafe}] +} [list [lsort -index 1 [concat [list [list [file join $testDir pkgb$ext] Pkgb] {{} double} {{} more} {{} another} {{} test} [list [file join $testDir pkga$ext] pkga]] $alreadyLoaded]] {pkgb_demo pkgb_sub pkgb_unsafe}] interp delete child test load-9.1 {Tcl_StaticPackage, load already-loaded package into another interp} -setup { @@ -234,7 +234,7 @@ test load-10.1 {load from vfs} -setup { cd $testDir testsimplefilesystem 1 } -constraints [list $dll $loaded testsimplefilesystem] -body { - list [catch {load simplefs:/pkgd$ext pkgd} msg] $msg + list [catch {load simplefs:/pkgd$ext PKGD} msg] $msg } -result {0 {}} -cleanup { testsimplefilesystem 0 cd $dir diff --git a/tests/unload.test b/tests/unload.test index ca007ef..b883257 100644 --- a/tests/unload.test +++ b/tests/unload.test @@ -138,7 +138,7 @@ child eval { test unload-3.1 {basic loading of non-unloadable package in a safe interpreter} \ [list $dll $loaded] { catch {rename pkgb_sub {}} - load [file join $testDir pkgb$ext] pkgb child + load [file join $testDir pkgb$ext] Pkgb child list [child eval pkgb_sub 44 13] [catch {child eval pkgb_unsafe} msg] $msg \ [catch {pkgb_sub 12 10} msg2] $msg2 } {31 1 {invalid command name "pkgb_unsafe"} 1 {invalid command name "pkgb_sub"}} @@ -157,7 +157,7 @@ test unload-3.3 {unloading of a package that has never been loaded from a safe i } -result {file "*" has never been loaded in this interpreter} test unload-3.4 {basic unloading of a non-unloadable package from a safe interpreter, with guess for package name} -setup { if {[lsearch -index 1 [info loaded child] Pkgb] < 0} { - load [file join $testDir pkgb$ext] pkgb child + load [file join $testDir pkgb$ext] Pkgb child } } -constraints [list $dll $loaded] -returnCodes error -match glob -body { unload [file join $testDir pkgb$ext] {} child diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 8d8d123..741b2a1 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -1,7 +1,7 @@ /* * pkgb.c -- * - * This file contains a simple Tcl package "pkgb" that is intended for + * This file contains a simple Tcl package "Pkgb" that is intended for * testing the Tcl dynamic loading facilities. It can be used in both * safe and unsafe interpreters. * @@ -152,7 +152,7 @@ Pkgb_Init( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "pkgb", "2.3"); + code = Tcl_PkgProvide(interp, "Pkgb", "2.3"); if (code != TCL_OK) { return code; } @@ -189,7 +189,7 @@ Pkgb_SafeInit( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "pkgb", "2.3"); + code = Tcl_PkgProvide(interp, "Pkgb", "2.3"); if (code != TCL_OK) { return code; } diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c index d64c807..d3af83f 100644 --- a/unix/dltest/pkgd.c +++ b/unix/dltest/pkgd.c @@ -1,7 +1,7 @@ /* * pkgd.c -- * - * This file contains a simple Tcl package "pkgd" that is intended for + * This file contains a simple Tcl package "PKGD" that is intended for * testing the Tcl dynamic loading facilities. It can be used in both * safe and unsafe interpreters. * @@ -121,7 +121,7 @@ Pkgd_Init( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "pkgd", "7.3"); + code = Tcl_PkgProvide(interp, "PKGD", "7.3"); if (code != TCL_OK) { return code; } @@ -158,7 +158,7 @@ Pkgd_SafeInit( if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } - code = Tcl_PkgProvide(interp, "pkgd", "7.3"); + code = Tcl_PkgProvide(interp, "PKGD", "7.3"); if (code != TCL_OK) { return code; } -- cgit v0.12 From 1704d23d60d9f21edb117206e36ce0cf911ef376 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 24 Nov 2020 14:45:38 +0000 Subject: Fix testcases on Windows. Use more "info loaded" as appropriate --- tests/chanio.test | 2 +- tests/event.test | 2 +- tests/io.test | 2 +- tests/winDde.test | 2 +- tests/winPipe.test | 2 +- win/Makefile.in | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/chanio.test b/tests/chanio.test index 16244e2..4f5c328 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -37,7 +37,7 @@ namespace eval ::tcl::test::io { catch { ::tcltest::loadTestedCommands package require -exact tcl::test [info patchlevel] - set ::tcltestlib [lindex [package ifneeded tcl::test [info patchlevel]] 1] + set ::tcltestlib [info loaded {} Tcltest] } package require tcltests diff --git a/tests/event.test b/tests/event.test index ba52e30..85c17d6 100644 --- a/tests/event.test +++ b/tests/event.test @@ -15,7 +15,7 @@ namespace import -force ::tcltest::* catch { ::tcltest::loadTestedCommands package require -exact tcl::test [info patchlevel] - set ::tcltestlib [lindex [package ifneeded tcl::test [info patchlevel]] 1] + set ::tcltestlib [info loaded {} Tcltest] } diff --git a/tests/io.test b/tests/io.test index 0aa4ebf..230a7e1 100644 --- a/tests/io.test +++ b/tests/io.test @@ -32,7 +32,7 @@ namespace eval ::tcl::test::io { catch { ::tcltest::loadTestedCommands package require -exact tcl::test [info patchlevel] - set ::tcltestlib [lindex [package ifneeded tcl::test [info patchlevel]] 1] + set ::tcltestlib [info loaded {} Tcltest] } package require tcltests diff --git a/tests/winDde.test b/tests/winDde.test index 9d15357..2b85d5c 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -20,7 +20,7 @@ if {[testConstraint win]} { if {![catch { ::tcltest::loadTestedCommands set ::ddever [package require dde 1.4.3] - set ::ddelib [info loaded "" Dde]}]} { + set ::ddelib [info loaded {} Dde]}]} { testConstraint dde 1 } } diff --git a/tests/winPipe.test b/tests/winPipe.test index 25b5517..d1418cf 100644 --- a/tests/winPipe.test +++ b/tests/winPipe.test @@ -21,7 +21,7 @@ unset -nocomplain path catch { ::tcltest::loadTestedCommands package require -exact tcl::test [info patchlevel] - set ::tcltestlib [lindex [package ifneeded tcl::test [info patchlevel]] 1] + set ::tcltestlib [info loaded {} Tcltest] } set org_pwd [pwd] diff --git a/win/Makefile.in b/win/Makefile.in index fe3dfa1..2351209 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -158,7 +158,7 @@ TEST_LIB_FILE = @LIBPREFIX@tcltest$(VER)${DLLSUFFIX}${LIBSUFFIX} TEST_LOAD_PRMS = lappend ::auto_path {$(ROOT_DIR_WIN_NATIVE)/tests};\ package ifneeded dde 1.4.3 [list load [file normalize ${DDE_DLL_FILE}]];\ package ifneeded registry 1.3.5 [list load [file normalize ${REG_DLL_FILE}]] -TEST_LOAD_FACILITIES = package ifneeded tcl::test ${VERSION}@TCL_PATCH_LEVEL@ [list load [file normalize ${TEST_DLL_FILE}]];\ +TEST_LOAD_FACILITIES = package ifneeded tcl::test ${VERSION}@TCL_PATCH_LEVEL@ [list load [file normalize ${TEST_DLL_FILE}] Tcltest];\ $(TEST_LOAD_PRMS) ZLIB_DLL_FILE = zlib1.dll TOMMATH_DLL_FILE = libtommath.dll -- cgit v0.12 From fc553a3ea1d03db6f403d77152f27239bc8cd422 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 25 Nov 2020 00:41:24 +0000 Subject: Experimental branch: building single file distributions --- .github/workflows/onefiledist.yml | 102 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/onefiledist.yml diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml new file mode 100644 index 0000000..1c0b72f --- /dev/null +++ b/.github/workflows/onefiledist.yml @@ -0,0 +1,102 @@ +name: Build +on: [push] +jobs: + linux: + name: Linux + runs-on: ubuntu-20.04 + defaults: + run: + shell: bash + working-directory: unix + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Prepare + run: | + touch generic/tclStubInit.c generic/tclOOStubInit.c + mkdir 1dist + working-directory: . + - name: Configure + run: ./configure --disable-symbols --disable-shared --enable-zipfs + - name: Build + run: | + make tclsh tclzipfile + sed -n '/^VERSION /{s/.*= /TCL_VER=/;p;q;}' < Makefile >> $GITHUB_ENV + echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV + - name: Package + run: | + cat ../unix/tclsh $TCL_ZIP > tclsh${TCL_VER}_unofficial + chmod +x tclsh${TCL_VER}_unofficial + tar -cf tclsh${TCL_VER}_unofficial.tar tclsh${TCL_VER}_unofficial + working-directory: 1dist + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: Tclsh ${{ env.TCL_VER }} Linux single-file build (unofficial) + path: 1dist/*.tar + macos: + name: macOS + runs-on: macos-latest + defaults: + run: + shell: bash + working-directory: unix + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Prepare + run: | + touch generic/tclStubInit.c generic/tclOOStubInit.c + mkdir 1dist + working-directory: . + - name: Configure + run: ./configure --disable-symbols --disable-shared --enable-zipfs + - name: Build + run: | + make tclsh tclzipfile + sed -n '/^VERSION /{s/.*= /TCL_VER=/;p;q;}' < Makefile >> $GITHUB_ENV + echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV + - name: Package + run: | + cat ../unix/tclsh $TCL_ZIP > tclsh${TCL_VER}_unofficial + chmod +x tclsh${TCL_VER}_unofficial + tar -cf tclsh${TCL_VER}_unofficial.tar tclsh${TCL_VER}_unofficial + working-directory: 1dist + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: Tclsh ${{ env.TCL_VER }} macOS single-file build (unofficial) + path: 1dist/*.tar + win: + name: Windows + runs-on: windows-latest + defaults: + run: + shell: bash + working-directory: win + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install MSYS2 and Make + run: choco install msys2 make + - name: Prepare + run: | + touch generic/tclStubInit.c generic/tclOOStubInit.c + mkdir 1dist + working-directory: . + - name: Configure + run: ./configure --disable-symbols --disable-shared --enable-zipfs + - name: Build + run: | + make tclsh tclzipfile + sed -n '/^VERSION /{s/.*= /TCL_VER=/;p;q;}' < Makefile >> $GITHUB_ENV + echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV + - name: Package + run: | + cat ../win/tclsh*.exe $TCL_ZIP > tclsh${TCL_VER}_unofficial.exe + working-directory: 1dist + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: Tclsh ${{ env.TCL_VER }} Windows single-file build (unofficial) + path: '1dist/*_unofficial.exe' -- cgit v0.12 From f33056b162c2a62e8094b431bddb877526816e23 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 25 Nov 2020 08:15:16 +0000 Subject: Slightly friendlier "jobs" labels. Fix exact OS (Linux/Mac/Windows) we want to build on, not just "latest" --- .github/workflows/linux-build.yml | 2 +- .github/workflows/mac-build.yml | 10 +++++----- .github/workflows/win-build.yml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index a8693c5..a620aa9 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -2,7 +2,7 @@ name: Linux on: [push] jobs: gcc: - runs-on: ubuntu-20.04 + runs-on: ubuntu-18.04 strategy: matrix: cfgopt: diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index c3748c0..c9bec7e 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -1,8 +1,8 @@ name: macOS on: [push] jobs: - with-Xcode: - runs-on: macos-latest + xcode: + runs-on: macos-10.15 defaults: run: shell: bash @@ -20,8 +20,8 @@ jobs: env: ERROR_ON_FAILURES: 1 MAC_CI: 1 - Unix-like: - runs-on: macos-latest + clang: + runs-on: macos-10.15 strategy: matrix: symbols: @@ -44,7 +44,7 @@ jobs: working-directory: generic - name: Configure (symbols=${{ matrix.symbols }} dtrace=${{ matrix.dtrace }}) # Note that macOS is always a 64 bit platform - run: ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) + run: ./configure --enable-64bit --enable-framework ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) env: CFGOPT: --enable-symbols=${{ matrix.symbols }} --enable-dtrace=${{ matrix.dtrace }} - name: Build diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 6232788..7e9c416 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -1,8 +1,8 @@ name: Windows on: [push] jobs: - MSVC: - runs-on: windows-latest + msvc: + runs-on: windows-2016 defaults: run: shell: powershell @@ -33,8 +33,8 @@ jobs: } env: ERROR_ON_FAILURES: 1 - MSYS-gcc: - runs-on: windows-latest + gcc: + runs-on: windows-2016 defaults: run: shell: bash -- cgit v0.12 From cada5eb9bd3970ea301a1f4f00c0dd541e7c9015 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 25 Nov 2020 09:13:55 +0000 Subject: Name of target is different --- .github/workflows/onefiledist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 1c0b72f..55cda01 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -88,7 +88,7 @@ jobs: run: ./configure --disable-symbols --disable-shared --enable-zipfs - name: Build run: | - make tclsh tclzipfile + make binaries libraries tclzipfile sed -n '/^VERSION /{s/.*= /TCL_VER=/;p;q;}' < Makefile >> $GITHUB_ENV echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV - name: Package -- cgit v0.12 From 49ad442ac6b8cd1cbb23405c6098f7393fb6da53 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 25 Nov 2020 11:16:46 +0000 Subject: Switch to older Ubuntu so that we build with older glibc. Thanks to morganw for testing. --- .github/workflows/onefiledist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 55cda01..205673b 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -3,7 +3,7 @@ on: [push] jobs: linux: name: Linux - runs-on: ubuntu-20.04 + runs-on: ubuntu-16.04 defaults: run: shell: bash -- cgit v0.12 From 7d9d9597aadcf9f74871bd23e95dff03e10fd84f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Nov 2020 07:23:16 +0000 Subject: grammar --- doc/Tcl.n | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12 From 9393b695b2f3fa0c1405224320873d5b49dd7adc Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Nov 2020 07:37:40 +0000 Subject: squelch warning by using proper format specifiers --- generic/tclExecute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 54c147d..c8767df 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -5566,14 +5566,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); -- cgit v0.12 From fd1bc4abd1fa146225e27ff46fffed783ea52b61 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Nov 2020 07:52:00 +0000 Subject: More TCL_UNUSED --- generic/tclExecute.c | 2 +- generic/tclLoadNone.c | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index c8767df..63dd8e6 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -9696,7 +9696,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. */ diff --git a/generic/tclLoadNone.c b/generic/tclLoadNone.c index 588c2cb..e9f79e2 100644 --- a/generic/tclLoadNone.c +++ b/generic/tclLoadNone.c @@ -63,8 +63,8 @@ TclpDlopen( 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; } @@ -72,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 " -- cgit v0.12 From 6ad60f8b3b06f698cc20a5f8b6becb499ee9ecd7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Nov 2020 14:43:22 +0000 Subject: Get rid of "register" keyword, forbidden in c++20. Fix some more warnings, discovered in c20/c++20 mode --- generic/regcomp.c | 6 +++--- generic/tclAssembly.c | 2 +- generic/tclBinary.c | 8 ++++---- generic/tclCmdAH.c | 10 +++++----- generic/tclCmdIL.c | 26 +++++++++++++------------- generic/tclDisassemble.c | 6 +++--- generic/tclHash.c | 42 +++++++++++++++++++++--------------------- generic/tclHistory.c | 4 ++-- generic/tclIndexObj.c | 16 ++++++++-------- generic/tclInterp.c | 8 ++++---- generic/tclOO.c | 12 ++++++------ generic/tclOOBasic.c | 4 ++-- generic/tclOODefineCmds.c | 2 +- generic/tclOOMethod.c | 24 ++++++++++++------------ generic/tclParse.c | 44 ++++++++++++++++++++++---------------------- generic/tclPipe.c | 4 ++-- generic/tclStrToD.c | 4 ++-- generic/tclStubInit.c | 2 +- generic/tclThreadAlloc.c | 22 +++++++++++----------- unix/tclUnixCompat.c | 16 ++++++++-------- 20 files changed, 131 insertions(+), 131 deletions(-) diff --git a/generic/regcomp.c b/generic/regcomp.c index 219c16a..d828b44 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -341,13 +341,13 @@ compile( re->re_info = 0; /* bits get set during parse */ re->re_csize = sizeof(chr); re->re_guts = NULL; - re->re_fns = VS(&functions); + re->re_fns = (char *)&functions; /* * More complex setup, malloced things. */ - re->re_guts = VS(MALLOC(sizeof(struct guts))); + re->re_guts = (char *)(MALLOC(sizeof(struct guts))); if (re->re_guts == NULL) { return freev(v, REG_ESPACE); } @@ -512,7 +512,7 @@ freev( struct vars *v, int err) { - register int ret; + int ret; if (v->re != NULL) { rfree(v->re); diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 2f8ab29..94cb53c 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -840,7 +840,7 @@ CompileAssembleObj( Interp *iPtr = (Interp *) interp; /* Internals of the interpreter */ CompileEnv compEnv; /* Compilation environment structure */ - register ByteCode *codePtr = NULL; + ByteCode *codePtr = NULL; /* Bytecode resulting from the assembly */ Namespace* namespacePtr; /* Namespace in which variable and command * names in the bytecode resolve */ diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 78cdd42..8520ec7 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -2146,8 +2146,8 @@ ScanNumber( if (*numberCachePtrPtr == NULL) { return Tcl_NewLongObj(value); } else { - register Tcl_HashTable *tablePtr = *numberCachePtrPtr; - register Tcl_HashEntry *hPtr; + Tcl_HashTable *tablePtr = *numberCachePtrPtr; + Tcl_HashEntry *hPtr; int isNew; hPtr = Tcl_CreateHashEntry(tablePtr, INT2PTR(value), &isNew); @@ -2155,7 +2155,7 @@ ScanNumber( return Tcl_GetHashValue(hPtr); } if (tablePtr->numEntries <= BINARY_SCAN_MAX_CACHE) { - register Tcl_Obj *objPtr = Tcl_NewLongObj(value); + Tcl_Obj *objPtr = Tcl_NewLongObj(value); Tcl_IncrRefCount(objPtr); Tcl_SetHashValue(hPtr, objPtr); @@ -2274,7 +2274,7 @@ DeleteScanNumberCache( hEntry = Tcl_FirstHashEntry(numberCachePtr, &search); while (hEntry != NULL) { - register Tcl_Obj *value = Tcl_GetHashValue(hEntry); + Tcl_Obj *value = Tcl_GetHashValue(hEntry); if (value != NULL) { Tcl_DecrRefCount(value); diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 46ee157..58749fc 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -173,7 +173,7 @@ Tcl_CaseObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register int i; + int i; int body, result, caseObjc; const char *stringPtr, *arg; Tcl_Obj *const *caseObjv; @@ -982,7 +982,7 @@ TclNREvalObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; Interp *iPtr = (Interp *) interp; CmdFrame *invoker = NULL; int word = 0; @@ -2493,7 +2493,7 @@ StoreStatData( * store in varName. */ { Tcl_Obj *field, *value; - register unsigned short mode; + unsigned short mode; /* * Assume Tcl_ObjSetVar2() does not keep a copy of the field name! @@ -2870,7 +2870,7 @@ EachloopCmd( Tcl_Obj *const objv[]) { int numLists = (objc-2) / 2; - register struct ForeachState *statePtr; + struct ForeachState *statePtr; int i, j, result; if (objc < 4 || (objc%2 != 0)) { @@ -2995,7 +2995,7 @@ ForeachLoopStep( Tcl_Interp *interp, int result) { - register struct ForeachState *statePtr = data[0]; + struct ForeachState *statePtr = data[0]; /* * Process the result code from this run of the [foreach] body. Note that diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index c662c22..85416a1 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -472,7 +472,7 @@ InfoArgsCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; const char *name; Proc *procPtr; CompiledLocal *localPtr; @@ -535,7 +535,7 @@ InfoBodyCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; const char *name; Proc *procPtr; Tcl_Obj *bodyPtr, *resultPtr; @@ -650,7 +650,7 @@ InfoCommandsCmd( { const char *cmdName, *pattern; const char *simplePattern; - register Tcl_HashEntry *entryPtr; + Tcl_HashEntry *entryPtr; Tcl_HashSearch search; Namespace *nsPtr; Namespace *globalNsPtr = (Namespace *) Tcl_GetGlobalNamespace(interp); @@ -1846,7 +1846,7 @@ InfoProcsCmd( Namespace *currNsPtr = (Namespace *) Tcl_GetCurrentNamespace(interp); Tcl_Obj *listPtr, *elemObjPtr; int specificNsInPattern = 0;/* Init. to avoid compiler warning. */ - register Tcl_HashEntry *entryPtr; + Tcl_HashEntry *entryPtr; Tcl_HashSearch search; Command *cmdPtr, *realCmdPtr; @@ -2344,7 +2344,7 @@ int Tcl_LinsertObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ - register int objc, /* Number of arguments. */ + int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *listPtr; @@ -2426,8 +2426,8 @@ int Tcl_ListObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ - register int objc, /* Number of arguments. */ - register Tcl_Obj *const objv[]) + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* The argument objects. */ { /* @@ -2463,7 +2463,7 @@ Tcl_LlengthObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - register Tcl_Obj *const objv[]) + Tcl_Obj *const objv[]) /* Argument objects. */ { int listLen, result; @@ -2509,7 +2509,7 @@ Tcl_LrangeObjCmd( ClientData notUsed, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - register Tcl_Obj *const objv[]) + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj **elemPtrs; @@ -2603,8 +2603,8 @@ int Tcl_LrepeatObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ - register int objc, /* Number of arguments. */ - register Tcl_Obj *const objv[]) + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* The argument objects. */ { int elementCount, i, totalElems; @@ -2669,7 +2669,7 @@ Tcl_LrepeatObjCmd( CLANG_ASSERT(dataArray || totalElems == 0 ); if (objc == 1) { - register Tcl_Obj *tmpPtr = objv[0]; + Tcl_Obj *tmpPtr = objv[0]; tmpPtr->refCount += elementCount; for (i=0 ; iprocPtr; unsigned char opCode = *pc; - register const InstructionDesc *instDesc = &tclInstructionTable[opCode]; + const InstructionDesc *instDesc = &tclInstructionTable[opCode]; unsigned char *codeStart = codePtr->codeStart; unsigned pcOffset = pc - codeStart; int opnd = 0, i, j, numBytes = 1; @@ -853,8 +853,8 @@ PrintSourceToObj( const char *stringPtr, /* The string to print. */ int maxChars) /* Maximum number of chars to print. */ { - register const char *p; - register int i = 0, len; + const char *p; + int i = 0, len; if (stringPtr == NULL) { Tcl_AppendToObj(appendObj, "\"\"", -1); diff --git a/generic/tclHash.c b/generic/tclHash.c index 193664d..bcf6eee 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -126,7 +126,7 @@ const Tcl_HashKeyType tclStringHashKeyType = { void Tcl_InitHashTable( - register Tcl_HashTable *tablePtr, + Tcl_HashTable *tablePtr, /* Pointer to table record, which is supplied * by the caller. */ int keyType) /* Type of keys to use in table: @@ -164,7 +164,7 @@ Tcl_InitHashTable( void Tcl_InitCustomHashTable( - register Tcl_HashTable *tablePtr, + Tcl_HashTable *tablePtr, /* Pointer to table record, which is supplied * by the caller. */ int keyType, /* Type of keys to use in table: @@ -284,7 +284,7 @@ CreateHashEntry( int *newPtr) /* Store info here telling whether a new entry * was created. */ { - register Tcl_HashEntry *hPtr; + Tcl_HashEntry *hPtr; const Tcl_HashKeyType *typePtr; unsigned int hash; int index; @@ -415,7 +415,7 @@ void Tcl_DeleteHashEntry( Tcl_HashEntry *entryPtr) { - register Tcl_HashEntry *prevPtr; + Tcl_HashEntry *prevPtr; const Tcl_HashKeyType *typePtr; Tcl_HashTable *tablePtr; Tcl_HashEntry **bucketPtr; @@ -490,9 +490,9 @@ Tcl_DeleteHashEntry( void Tcl_DeleteHashTable( - register Tcl_HashTable *tablePtr) /* Table to delete. */ + Tcl_HashTable *tablePtr) /* Table to delete. */ { - register Tcl_HashEntry *hPtr, *nextPtr; + Tcl_HashEntry *hPtr, *nextPtr; const Tcl_HashKeyType *typePtr; int i; @@ -598,7 +598,7 @@ Tcl_FirstHashEntry( Tcl_HashEntry * Tcl_NextHashEntry( - register Tcl_HashSearch *searchPtr) + Tcl_HashSearch *searchPtr) /* Place to store information about progress * through the table. Must have been * initialized by calling @@ -645,7 +645,7 @@ Tcl_HashStats( #define NUM_COUNTERS 10 int count[NUM_COUNTERS], overflow, i, j; double average, tmp; - register Tcl_HashEntry *hPtr; + Tcl_HashEntry *hPtr; char *result, *p; /* @@ -715,7 +715,7 @@ AllocArrayEntry( void *keyPtr) /* Key to store in the hash table entry. */ { int *array = (int *) keyPtr; - register int *iPtr1, *iPtr2; + int *iPtr1, *iPtr2; Tcl_HashEntry *hPtr; int count; unsigned int size; @@ -759,8 +759,8 @@ CompareArrayKeys( void *keyPtr, /* New key to compare. */ Tcl_HashEntry *hPtr) /* Existing key to compare. */ { - register const int *iPtr1 = (const int *) keyPtr; - register const int *iPtr2 = (const int *) hPtr->key.words; + const int *iPtr1 = (const int *) keyPtr; + const int *iPtr2 = (const int *) hPtr->key.words; Tcl_HashTable *tablePtr = hPtr->tablePtr; int count; @@ -798,8 +798,8 @@ HashArrayKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { - register const int *array = (const int *) keyPtr; - register unsigned int result; + const int *array = (const int *) keyPtr; + unsigned int result; int count; for (result = 0, count = tablePtr->keyType; count > 0; @@ -867,8 +867,8 @@ CompareStringKeys( void *keyPtr, /* New key to compare. */ Tcl_HashEntry *hPtr) /* Existing key to compare. */ { - register const char *p1 = (const char *) keyPtr; - register const char *p2 = (const char *) hPtr->key.string; + const char *p1 = (const char *) keyPtr; + const char *p2 = (const char *) hPtr->key.string; return !strcmp(p1, p2); } @@ -895,9 +895,9 @@ HashStringKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { - register const char *string = keyPtr; - register unsigned int result; - register char c; + const char *string = keyPtr; + unsigned int result; + char c; /* * I tried a zillion different hash functions and asked many other people @@ -1016,12 +1016,12 @@ BogusCreate( static void RebuildTable( - register Tcl_HashTable *tablePtr) /* Table to enlarge. */ + Tcl_HashTable *tablePtr) /* Table to enlarge. */ { int count, index, oldSize = tablePtr->numBuckets; Tcl_HashEntry **oldBuckets = tablePtr->buckets; - register Tcl_HashEntry **oldChainPtr, **newChainPtr; - register Tcl_HashEntry *hPtr; + Tcl_HashEntry **oldChainPtr, **newChainPtr; + Tcl_HashEntry *hPtr; const Tcl_HashKeyType *typePtr; /* Avoid outgrowing capability of the memory allocators */ diff --git a/generic/tclHistory.c b/generic/tclHistory.c index b08e352..24f6d65 100644 --- a/generic/tclHistory.c +++ b/generic/tclHistory.c @@ -61,7 +61,7 @@ Tcl_RecordAndEval( * TCL_EVAL_GLOBAL means use Tcl_GlobalEval * instead of Tcl_Eval. */ { - register Tcl_Obj *cmdPtr; + Tcl_Obj *cmdPtr; int length = strlen(cmd); int result; @@ -214,7 +214,7 @@ DeleteHistoryObjs( ClientData clientData, Tcl_Interp *interp) { - register HistoryObjs *histObjsPtr = clientData; + HistoryObjs *histObjsPtr = clientData; TclDecrRefCount(histObjsPtr->historyObj); TclDecrRefCount(histObjsPtr->addObj); diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index b200f6f..7e23931 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -415,9 +415,9 @@ UpdateStringOfIndex( Tcl_Obj *objPtr) { IndexRep *indexRep = objPtr->internalRep.twoPtrValue.ptr1; - register char *buf; - register unsigned len; - register const char *indexStr = EXPAND_OF(indexRep); + char *buf; + unsigned len; + const char *indexStr = EXPAND_OF(indexRep); len = strlen(indexStr); buf = ckalloc(len + 1); @@ -927,7 +927,7 @@ Tcl_WrongNumArgs( */ if (origObjv[i]->typePtr == &indexType) { - register IndexRep *indexRep = + IndexRep *indexRep = origObjv[i]->internalRep.twoPtrValue.ptr1; elementStr = EXPAND_OF(indexRep); @@ -977,7 +977,7 @@ Tcl_WrongNumArgs( */ if (objv[i]->typePtr == &indexType) { - register IndexRep *indexRep = objv[i]->internalRep.twoPtrValue.ptr1; + IndexRep *indexRep = objv[i]->internalRep.twoPtrValue.ptr1; Tcl_AppendStringsToObj(objPtr, EXPAND_OF(indexRep), NULL); } else { @@ -1069,14 +1069,14 @@ Tcl_ParseArgsObjv( * successful exit. Will include the name of * the command. */ int nrem; /* Size of leftovers.*/ - register const Tcl_ArgvInfo *infoPtr; + const Tcl_ArgvInfo *infoPtr; /* Pointer to the current entry in the table * of argument descriptions. */ const Tcl_ArgvInfo *matchPtr; /* Descriptor that matches current argument */ Tcl_Obj *curArg; /* Current argument */ const char *str = NULL; - register char c; /* Second character of current arg (used for + char c; /* Second character of current arg (used for * quick check for matching; use 2nd char. * because first char. will almost always be * '-'). */ @@ -1324,7 +1324,7 @@ PrintUsage( /* Array of command-specific argument * descriptions. */ { - register const Tcl_ArgvInfo *infoPtr; + const Tcl_ArgvInfo *infoPtr; int width, numSpaces; #define NUM_SPACES 20 static const char spaces[] = " "; diff --git a/generic/tclInterp.c b/generic/tclInterp.c index e1a6d20..4f5b300 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -3283,7 +3283,7 @@ int Tcl_LimitExceeded( Tcl_Interp *interp) { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; return iPtr->limit.exceeded != 0; } @@ -3314,10 +3314,10 @@ int Tcl_LimitReady( Tcl_Interp *interp) { - register Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *) interp; if (iPtr->limit.active != 0) { - register int ticker = ++iPtr->limit.granularityTicker; + int ticker = ++iPtr->limit.granularityTicker; if ((iPtr->limit.active & TCL_LIMIT_COMMANDS) && ((iPtr->limit.cmdGranularity == 1) || @@ -3361,7 +3361,7 @@ Tcl_LimitCheck( Tcl_Interp *interp) { Interp *iPtr = (Interp *) interp; - register int ticker = iPtr->limit.granularityTicker; + int ticker = iPtr->limit.granularityTicker; if (Tcl_InterpDeleted(interp)) { return TCL_OK; diff --git a/generic/tclOO.c b/generic/tclOO.c index f8a0f12..053abfe 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -797,7 +797,7 @@ MyDeleted( ClientData clientData) /* Reference to the object whose [my] has been * squelched. */ { - register Object *oPtr = clientData; + Object *oPtr = clientData; oPtr->myCommand = NULL; } @@ -1632,7 +1632,7 @@ Tcl_NewObjectInstance( int skip) /* Number of arguments to _not_ pass to the * constructor. */ { - register Class *classPtr = (Class *) cls; + Class *classPtr = (Class *) cls; Object *oPtr; ClientData clientData[4]; @@ -1700,7 +1700,7 @@ TclNRNewObjectInstance( Tcl_Object *objectPtr) /* Place to write the object reference upon * successful allocation. */ { - register Class *classPtr = (Class *) cls; + Class *classPtr = (Class *) cls; CallContext *contextPtr; Tcl_InterpState state; Object *oPtr; @@ -2558,7 +2558,7 @@ TclOOObjectCmdCore( methodNamePtr = objv[1]; if (oPtr->mapMethodNameProc != NULL) { - register Class **startClsPtr = &startCls; + Class **startClsPtr = &startCls; Tcl_Obj *mappedMethodName = Tcl_DuplicateObj(methodNamePtr); result = oPtr->mapMethodNameProc(interp, (Tcl_Object) oPtr, @@ -2615,7 +2615,7 @@ TclOOObjectCmdCore( if (startCls != NULL) { for (; contextPtr->index < contextPtr->callPtr->numChain; contextPtr->index++) { - register struct MInvoke *miPtr = + struct MInvoke *miPtr = &contextPtr->callPtr->chain[contextPtr->index]; if (miPtr->isFilter) { @@ -2753,7 +2753,7 @@ TclNRObjectContextInvokeNext( Tcl_Obj *const *objv, int skip) { - register CallContext *contextPtr = (CallContext *) context; + CallContext *contextPtr = (CallContext *) context; if (contextPtr->index + 1 >= contextPtr->callPtr->numChain) { /* diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 0a1e1eb..b7f70e7 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -399,7 +399,7 @@ TclOO_Object_Eval( { CallContext *contextPtr = (CallContext *) context; Tcl_Object object = Tcl_ObjectContextObject(context); - register const int skip = Tcl_ObjectContextSkippedArgs(context); + const int skip = Tcl_ObjectContextSkippedArgs(context); CallFrame *framePtr, **framePtrPtr = &framePtr; Tcl_Obj *scriptPtr; CmdFrame *invoker; @@ -1028,7 +1028,7 @@ TclOOSelfObjCmd( Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", NULL); return TCL_ERROR; } else { - register struct MInvoke *miPtr = &CurrentlyInvoked(contextPtr); + struct MInvoke *miPtr = &CurrentlyInvoked(contextPtr); Object *oPtr; const char *type; diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index 2ace60c..aeee165 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -610,7 +610,7 @@ FindCommand( { int length; const char *nameStr, *string = Tcl_GetStringFromObj(stringObj, &length); - register Namespace *const nsPtr = (Namespace *) namespacePtr; + Namespace *const nsPtr = (Namespace *) namespacePtr; FOREACH_HASH_DECLS; Tcl_Command cmd, cmd2; diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 493c936..cd3c2c2 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -149,8 +149,8 @@ Tcl_NewInstanceMethod( ClientData clientData) /* Some data associated with the particular * method to be created. */ { - register Object *oPtr = (Object *) object; - register Method *mPtr; + Object *oPtr = (Object *) object; + Method *mPtr; Tcl_HashEntry *hPtr; int isNew; @@ -217,8 +217,8 @@ Tcl_NewMethod( ClientData clientData) /* Some data associated with the particular * method to be created. */ { - register Class *clsPtr = (Class *) cls; - register Method *mPtr; + Class *clsPtr = (Class *) cls; + Method *mPtr; Tcl_HashEntry *hPtr; int isNew; @@ -336,7 +336,7 @@ TclOONewProcInstanceMethod( * interested. */ { int argsLen; - register ProcedureMethod *pmPtr; + ProcedureMethod *pmPtr; Tcl_Method method; if (Tcl_ListObjLength(interp, argsObj, &argsLen) != TCL_OK) { @@ -388,7 +388,7 @@ TclOONewProcMethod( * interested. */ { int argsLen; /* -1 => delete argsObj before exit */ - register ProcedureMethod *pmPtr; + ProcedureMethod *pmPtr; const char *procName; Tcl_Method method; @@ -790,7 +790,7 @@ PushMethodCallFrame( * frame. */ { Namespace *nsPtr = (Namespace *) contextPtr->oPtr->namespacePtr; - register int result; + int result; const char *namePtr; CallFrame **framePtrPtr = &fdPtr->framePtr; @@ -822,7 +822,7 @@ PushMethodCallFrame( */ if (pmPtr->flags & USE_DECLARER_NS) { - register Method *mPtr = + Method *mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr; if (mPtr->declaringClassPtr != NULL) { @@ -895,7 +895,7 @@ PushMethodCallFrame( fdPtr->efi.fields[1].proc = pmPtr->gfivProc; fdPtr->efi.fields[1].clientData = pmPtr; } else { - register Tcl_Method method = + Tcl_Method method = Tcl_ObjectContextMethod((Tcl_ObjectContext) contextPtr); if (Tcl_MethodDeclarerObject(method) != NULL) { @@ -1271,7 +1271,7 @@ static void DeleteProcedureMethod( ClientData clientData) { - register ProcedureMethod *pmPtr = clientData; + ProcedureMethod *pmPtr = clientData; if (pmPtr->refCount-- <= 1) { DeleteProcedureMethodRecord(pmPtr); @@ -1364,7 +1364,7 @@ TclOONewForwardInstanceMethod( * prefix to forward to. */ { int prefixLen; - register ForwardMethod *fmPtr; + ForwardMethod *fmPtr; if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) { return NULL; @@ -1403,7 +1403,7 @@ TclOONewForwardMethod( * prefix to forward to. */ { int prefixLen; - register ForwardMethod *fmPtr; + ForwardMethod *fmPtr; if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) { return NULL; diff --git a/generic/tclParse.c b/generic/tclParse.c index 57b2b35..5bbaf93 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -236,19 +236,19 @@ Tcl_ParseCommand( * NULL, then no error message is provided. */ const char *start, /* First character of string containing one or * more Tcl commands. */ - register int numBytes, /* Total number of bytes in string. If < 0, + int numBytes, /* Total number of bytes in string. If < 0, * the script consists of all bytes up to the * first null character. */ int nested, /* Non-zero means this is a nested command: * close bracket should be considered a * command terminator. If zero, then close * bracket has no special meaning. */ - register Tcl_Parse *parsePtr) + Tcl_Parse *parsePtr) /* Structure to fill in with information about * the parsed command; any previous * information in the structure is ignored. */ { - register const char *src; /* Points to current character in the + const char *src; /* Points to current character in the * command. */ char type; /* Result returned by CHAR_TYPE(*src). */ Tcl_Token *tokenPtr; /* Pointer to token being filled in. */ @@ -684,14 +684,14 @@ TclIsBareword( static int ParseWhiteSpace( const char *src, /* First character to parse. */ - register int numBytes, /* Max number of bytes to scan. */ + int numBytes, /* Max number of bytes to scan. */ int *incompletePtr, /* Set this boolean memory to true if parsing * indicates an incomplete command. */ char *typePtr) /* Points to location to store character type * of character that ends run of whitespace */ { - register char type = TYPE_NORMAL; - register const char *p = src; + char type = TYPE_NORMAL; + const char *p = src; while (1) { while (numBytes && ((type = CHAR_TYPE(*p)) & TYPE_SPACE)) { @@ -784,7 +784,7 @@ ParseHex( * conversion is to be written. */ { int result = 0; - register const char *p = src; + const char *p = src; while (numBytes--) { unsigned char digit = UCHAR(*p); @@ -842,7 +842,7 @@ TclParseBackslash( * written. At most TCL_UTF_MAX bytes will be * written there. */ { - register const char *p = src+1; + const char *p = src+1; int result; int count; char buf[TCL_UTF_MAX] = ""; @@ -1037,12 +1037,12 @@ TclParseBackslash( static int ParseComment( const char *src, /* First character to parse. */ - register int numBytes, /* Max number of bytes to scan. */ + int numBytes, /* Max number of bytes to scan. */ Tcl_Parse *parsePtr) /* Information about parse in progress. * Updated if parsing indicates an incomplete * command. */ { - register const char *p = src; + const char *p = src; while (numBytes) { char type; @@ -1121,8 +1121,8 @@ ParseComment( static int ParseTokens( - register const char *src, /* First character to parse. */ - register int numBytes, /* Max number of bytes to scan. */ + const char *src, /* First character to parse. */ + int numBytes, /* Max number of bytes to scan. */ int mask, /* Specifies when to stop parsing. The parse * stops at the first unquoted character whose * CHAR_TYPE contains any of the bits in @@ -1400,7 +1400,7 @@ Tcl_ParseVarName( * NULL, then no error message is provided. */ const char *start, /* Start of variable substitution string. * First character must be "$". */ - register int numBytes, /* Total number of bytes in string. If < 0, + int numBytes, /* Total number of bytes in string. If < 0, * the string consists of all bytes up to the * first null character. */ Tcl_Parse *parsePtr, /* Structure to fill in with information about @@ -1411,7 +1411,7 @@ Tcl_ParseVarName( * reinitialize it. */ { Tcl_Token *tokenPtr; - register const char *src; + const char *src; int varIndex; unsigned array; @@ -1592,13 +1592,13 @@ Tcl_ParseVarName( const char * Tcl_ParseVar( Tcl_Interp *interp, /* Context for looking up variable. */ - register const char *start, /* Start of variable substitution. First + const char *start, /* Start of variable substitution. First * character must be "$". */ const char **termPtr) /* If non-NULL, points to word to fill in with * character just after last one in the * variable specifier. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; int code; Tcl_Parse *parsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse)); @@ -1677,10 +1677,10 @@ Tcl_ParseBraces( * NULL, then no error message is provided. */ const char *start, /* Start of string enclosed in braces. The * first character must be {'. */ - register int numBytes, /* Total number of bytes in string. If < 0, + int numBytes, /* Total number of bytes in string. If < 0, * the string consists of all bytes up to the * first null character. */ - register Tcl_Parse *parsePtr, + Tcl_Parse *parsePtr, /* Structure to fill in with information about * the string. */ int append, /* Non-zero means append tokens to existing @@ -1693,7 +1693,7 @@ Tcl_ParseBraces( * successful. */ { Tcl_Token *tokenPtr; - register const char *src; + const char *src; int startIndex, level, length; if (numBytes < 0 && start) { @@ -1818,7 +1818,7 @@ Tcl_ParseBraces( */ { - register int openBrace = 0; + int openBrace = 0; while (--src > start) { switch (*src) { @@ -1878,10 +1878,10 @@ Tcl_ParseQuotedString( * NULL, then no error message is provided. */ const char *start, /* Start of the quoted string. The first * character must be '"'. */ - register int numBytes, /* Total number of bytes in string. If < 0, + int numBytes, /* Total number of bytes in string. If < 0, * the string consists of all bytes up to the * first null character. */ - register Tcl_Parse *parsePtr, + Tcl_Parse *parsePtr, /* Structure to fill in with information about * the string. */ int append, /* Non-zero means append tokens to existing diff --git a/generic/tclPipe.c b/generic/tclPipe.c index bd49bec..7d5fab0 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -183,7 +183,7 @@ Tcl_DetachPids( * array pointed to by pidPtr. */ Tcl_Pid *pidPtr) /* Array of pids to detach. */ { - register Detached *detPtr; + Detached *detPtr; int i; Tcl_MutexLock(&pipeMutex); @@ -219,7 +219,7 @@ Tcl_DetachPids( void Tcl_ReapDetachedProcs(void) { - register Detached *detPtr; + Detached *detPtr; Detached *nextPtr, *prevPtr; int status; Tcl_Pid pid; diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 749abcf..2e66864 100644 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -2849,7 +2849,7 @@ QuickConversion( } ilim = ilim1; --k; - d *= 10.0; + d = d * 10.0; ++ieps; } @@ -2866,7 +2866,7 @@ QuickConversion( retval = ckalloc(len + 1); if (ilim == 0) { - d -= 5.; + d = d - 5.; if (d > eps.d) { *retval = '1'; *decpt = k; diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index bab9d5e..51e6a81 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -370,7 +370,7 @@ static Tcl_Obj *dbNewLongObj( int line ) { #ifdef TCL_MEM_DEBUG - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; TclDbNewObj(objPtr, file, line); objPtr->bytes = NULL; diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index 2ee758e..5a1e8ca 100644 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -257,7 +257,7 @@ TclFreeAllocCache( { Cache *cachePtr = arg; Cache **nextPtrPtr; - register unsigned int bucket; + unsigned int bucket; /* * Flush blocks. @@ -314,7 +314,7 @@ TclpAlloc( { Cache *cachePtr; Block *blockPtr; - register int bucket; + int bucket; size_t size; #ifndef __LP64__ @@ -546,8 +546,8 @@ TclpRealloc( Tcl_Obj * TclThreadAllocObj(void) { - register Cache *cachePtr; - register Tcl_Obj *objPtr; + Cache *cachePtr; + Tcl_Obj *objPtr; GETCACHE(cachePtr); @@ -557,7 +557,7 @@ TclThreadAllocObj(void) */ if (cachePtr->numObjects == 0) { - register int numMove; + int numMove; Tcl_MutexLock(objLockPtr); numMove = sharedPtr->numObjects; @@ -718,7 +718,7 @@ MoveObjs( Cache *toPtr, int numMove) { - register Tcl_Obj *objPtr = fromPtr->firstObjPtr; + Tcl_Obj *objPtr = fromPtr->firstObjPtr; Tcl_Obj *fromFirstObjPtr = objPtr; toPtr->numObjects += numMove; @@ -819,7 +819,7 @@ Block2Ptr( int bucket, unsigned int reqSize) { - register void *ptr; + void *ptr; blockPtr->magicNum1 = blockPtr->magicNum2 = MAGIC; blockPtr->sourceBucket = bucket; @@ -835,7 +835,7 @@ static Block * Ptr2Block( char *ptr) { - register Block *blockPtr; + Block *blockPtr; blockPtr = (((Block *) ptr) - 1); if (blockPtr->magicNum1 != MAGIC || blockPtr->magicNum2 != MAGIC) { @@ -969,8 +969,8 @@ GetBlocks( Cache *cachePtr, int bucket) { - register Block *blockPtr; - register int n; + Block *blockPtr; + int n; /* * First, atttempt to move blocks from the shared cache. Note the @@ -1015,7 +1015,7 @@ GetBlocks( } if (cachePtr->buckets[bucket].numFree == 0) { - register size_t size; + size_t size; /* * If no blocks could be moved from shared, first look for a larger diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index 451a409..00e9737 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -556,17 +556,17 @@ TclpGetHostByName( ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); #if defined(HAVE_GETHOSTBYNAME_R_5) - int h_errno; + int local_errno; return gethostbyname_r(name, &tsdPtr->hent, tsdPtr->hbuf, - sizeof(tsdPtr->hbuf), &h_errno); + sizeof(tsdPtr->hbuf), &local_errno); #elif defined(HAVE_GETHOSTBYNAME_R_6) struct hostent *hePtr = NULL; - int h_errno, result; + int local_errno, result; result = gethostbyname_r(name, &tsdPtr->hent, tsdPtr->hbuf, - sizeof(tsdPtr->hbuf), &hePtr, &h_errno); + sizeof(tsdPtr->hbuf), &hePtr, &local_errno); return (result == 0) ? hePtr : NULL; #elif defined(HAVE_GETHOSTBYNAME_R_3) @@ -626,17 +626,17 @@ TclpGetHostByAddr( ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); #if defined(HAVE_GETHOSTBYADDR_R_7) - int h_errno; + int local_errno; return gethostbyaddr_r(addr, length, type, &tsdPtr->hent, tsdPtr->hbuf, - sizeof(tsdPtr->hbuf), &h_errno); + sizeof(tsdPtr->hbuf), &local_errno); #elif defined(HAVE_GETHOSTBYADDR_R_8) struct hostent *hePtr; - int h_errno; + int local_errno; return (gethostbyaddr_r(addr, length, type, &tsdPtr->hent, tsdPtr->hbuf, - sizeof(tsdPtr->hbuf), &hePtr, &h_errno) == 0) + sizeof(tsdPtr->hbuf), &hePtr, &local_errno) == 0) ? &tsdPtr->hent : NULL; #else #define NEED_COPYHOSTENT 1 -- cgit v0.12 From 005227c53d0c7a0ed39198673b0938c88b1513d5 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 26 Nov 2020 20:09:11 +0000 Subject: Try to use a .dmg for macOS distribution --- .github/workflows/onefiledist.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 205673b..3f3b3e5 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -44,10 +44,16 @@ jobs: 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 - name: Prepare run: | touch generic/tclStubInit.c generic/tclOOStubInit.c mkdir 1dist + echo "CREATE_DMG=$(cd create-dmg;pwd)/create-dmg" >> $GITHUB_ENV working-directory: . - name: Configure run: ./configure --disable-symbols --disable-shared --enable-zipfs @@ -58,15 +64,22 @@ jobs: echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV - name: Package run: | - cat ../unix/tclsh $TCL_ZIP > tclsh${TCL_VER}_unofficial - chmod +x tclsh${TCL_VER}_unofficial - tar -cf tclsh${TCL_VER}_unofficial.tar tclsh${TCL_VER}_unofficial + mkdir contents + cat ../unix/tclsh $TCL_ZIP > contents/tclsh${TCL_VER}_unofficial + chmod +x contents/tclsh${TCL_VER}_unofficial + $CREATE_DMG \ + --volname "Tcl ${{ env.TCL_VER }} (unofficial)" \ + --window-pos 200 120 \ + --window-size 800 400 \ + --app-drop-link 600 185 \ + "Tcl-${{ env.TCL_VER }}-(unofficial).dmg" \ + "contents/" working-directory: 1dist - name: Upload uses: actions/upload-artifact@v2 with: name: Tclsh ${{ env.TCL_VER }} macOS single-file build (unofficial) - path: 1dist/*.tar + path: 1dist/*.dmg win: name: Windows runs-on: windows-latest -- cgit v0.12 From 2ed258bb674b5894ae0d21fe8405234b97731dbe Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 27 Nov 2020 07:41:58 +0000 Subject: Fix winFCmd testcase. Add --disable-shared and TCL_UTF_MAX=4 builds to github actions --- .github/workflows/linux-build.yml | 1 + .github/workflows/mac-build.yml | 22 +++++++++------------- .github/workflows/win-build.yml | 13 +++++++------ tests/winFCmd.test | 34 +++++----------------------------- 4 files changed, 22 insertions(+), 48 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index a620aa9..e8fab61 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -10,6 +10,7 @@ jobs: - "--disable-shared" - "--enable-symbols" - "--enable-symbols=mem" + - "CFLAGS=-DTCL_UTF_MAX=4" defaults: run: shell: bash diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index c9bec7e..5029794 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -24,12 +24,11 @@ jobs: runs-on: macos-10.15 strategy: matrix: - symbols: - - "no" - - "mem" - dtrace: - - "no" - - "yes" + cfgopt: + - "" + - "--disable-shared" + - "--enable-symbols" + - "--enable-symbols=mem" defaults: run: shell: bash @@ -39,14 +38,14 @@ jobs: uses: actions/checkout@v2 - name: Prepare run: | - touch tclStubInit.c tclOOStubInit.c + touch tclStubInit.c mkdir "$HOME/install" working-directory: generic - - name: Configure (symbols=${{ matrix.symbols }} dtrace=${{ matrix.dtrace }}) + - name: Configure ${{ matrix.cfgopt }} # Note that macOS is always a 64 bit platform - run: ./configure --enable-64bit --enable-framework ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) + run: ./configure --enable-64bit --enable-dtrace --enable-framework ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) env: - CFGOPT: --enable-symbols=${{ matrix.symbols }} --enable-dtrace=${{ matrix.dtrace }} + CFGOPT: ${{ matrix.cfgopt }} - name: Build run: | make all tcltest @@ -56,6 +55,3 @@ jobs: env: ERROR_ON_FAILURES: 1 MAC_CI: 1 - - name: Trial Installation - run: | - make install diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 7e9c416..5e6b6ba 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -41,10 +41,11 @@ jobs: working-directory: win strategy: matrix: - symbols: - - "no" - - "mem" - - "all" + cfgopt: + - "" + - "--disable-shared" + - "--enable-symbols" + - "--enable-symbols=mem" # Using powershell means we need to explicitly stop on failure steps: - name: Checkout @@ -56,11 +57,11 @@ jobs: touch tclStubInit.c mkdir "${HOME}/install" working-directory: generic - - name: Configure (symbols=${{ matrix.symbols }}) + - name: Configure (symbols=${{ matrix.cfgopt }}) run: | ./configure ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) env: - CFGOPT: --enable-64bit --enable-symbols=${{ matrix.symbols }} + CFGOPT: --enable-64bit ${{ matrix.cfgopt }} - name: Build run: make all - name: Build Test Harness diff --git a/tests/winFCmd.test b/tests/winFCmd.test index f93f225..6256fda 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -1033,18 +1033,16 @@ if {$d eq "C"} { set dd "D" } else { set dd "C" } test winFCmd-16.10 {Windows file normalization} {win} { file norm ${dd}:foo } "${dd}:/foo" -test winFCmd-16.11 {Windows file normalization} -constraints {win cdrom} \ --body { +test winFCmd-16.11 {Windows file normalization} -body { cd ${d}: cd $cdrom cd ${d}: cd $cdrom # Must not crash set result "no crash" -} -cleanup { +} -constraints {win cdrom} -cleanup { cd $pwd } -result {no crash} - test winFCmd-16.12 {Windows file normalization - no crash} \ -constraints win -setup { set oldhome "" @@ -1060,7 +1058,6 @@ test winFCmd-16.12 {Windows file normalization - no crash} \ set ::env(HOME) $oldhome cd $pwd } -result {no crash} - test winFCmd-16.13 {Windows file normalization} -constraints win -setup { set oldhome "" catch {set oldhome $::env(HOME)} @@ -1104,7 +1101,7 @@ test winFCmd-17.1 {Windows bad permissions cd} -constraints win -body { eval lappend d [glob -nocomplain \ -types hidden -dir $dd "System Volume Information"] } - # Old versions of Tcl gave a misleading error that the + # Old versions of Tcl gave a misleading error that the # directory in question didn't exist. if {[llength $d] && [catch {cd [lindex $d 0]} err]} { regsub ".*: " $err "" err @@ -1122,68 +1119,52 @@ unset d dd pwd test winFCmd-18.1 {Windows reserved path names} -constraints win -body { file pathtype com1 } -result "absolute" - test winFCmd-18.1.2 {Windows reserved path names} -constraints win -body { file pathtype com4 } -result "absolute" - test winFCmd-18.1.3 {Windows reserved path names} -constraints win -body { file pathtype com9 } -result "absolute" - test winFCmd-18.1.4 {Windows reserved path names} -constraints win -body { file pathtype lpt3 } -result "absolute" - test winFCmd-18.1.5 {Windows reserved path names} -constraints win -body { file pathtype lpt9 } -result "absolute" - test winFCmd-18.1.6 {Windows reserved path names} -constraints win -body { file pathtype nul } -result "absolute" - test winFCmd-18.1.7 {Windows reserved path names} -constraints win -body { file pathtype null } -result "relative" - test winFCmd-18.2 {Windows reserved path names} -constraints win -body { file pathtype com1: } -result "absolute" - test winFCmd-18.3 {Windows reserved path names} -constraints win -body { file pathtype COM1 } -result "absolute" - test winFCmd-18.4 {Windows reserved path names} -constraints win -body { file pathtype CoM1: } -result "absolute" - test winFCmd-18.5 {Windows reserved path names} -constraints win -body { file normalize com1: } -result COM1 - test winFCmd-18.6 {Windows reserved path names} -constraints win -body { file normalize COM1: } -result COM1 - test winFCmd-18.7 {Windows reserved path names} -constraints win -body { file normalize cOm1 } -result COM1 - test winFCmd-18.8 {Windows reserved path names} -constraints win -body { file normalize cOm1: } -result COM1 - test winFCmd-19.1 {Windows extended path names} -constraints nt -body { file normalize //?/c:/windows/win.ini } -result //?/c:/windows/win.ini - test winFCmd-19.2 {Windows extended path names} -constraints nt -body { file normalize //?/c:/windows/../windows/win.ini } -result //?/c:/windows/win.ini - test winFCmd-19.3 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) tcl[string repeat x 20].tmp] set tmpfile [file normalize $tmpfile] @@ -1195,7 +1176,6 @@ test winFCmd-19.3 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {}] - test winFCmd-19.4 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) tcl[string repeat x 20].tmp] set tmpfile //?/[file normalize $tmpfile] @@ -1207,7 +1187,6 @@ test winFCmd-19.4 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {}] - test winFCmd-19.5 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) tcl[string repeat x 248].tmp] set tmpfile [file normalize $tmpfile] @@ -1215,11 +1194,10 @@ test winFCmd-19.5 {Windows extended path names} -constraints nt -setup { list [catch { set f [open $tmpfile [list WRONLY CREAT]] close $f - } res] errormsg ;#$res + } res] $res } -cleanup { catch {file delete $tmpfile} -} -result [list 1 errormsg] - +} -result [list 0 {}] test winFCmd-19.6 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) tcl[string repeat x 248].tmp] set tmpfile //?/[file normalize $tmpfile] @@ -1231,7 +1209,6 @@ test winFCmd-19.6 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {}] - test winFCmd-19.7 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] set tmpfile [file normalize $tmpfile] @@ -1243,7 +1220,6 @@ test winFCmd-19.7 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {} [list tcl[pid].tmp]] - test winFCmd-19.8 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] set tmpfile //?/[file normalize $tmpfile] -- cgit v0.12 From 8c7898b5d20bdb61b808f3da8856859ebe6deec7 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 27 Nov 2020 09:58:46 +0000 Subject: Better version ID, trying to track down weird macOS problem --- .github/workflows/onefiledist.yml | 45 +++++++++++++++++++++++---------------- tools/addVerToFile.tcl | 9 ++++++++ 2 files changed, 36 insertions(+), 18 deletions(-) create mode 100755 tools/addVerToFile.tcl diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 3f3b3e5..f077861 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -7,7 +7,6 @@ jobs: defaults: run: shell: bash - working-directory: unix steps: - name: Checkout uses: actions/checkout@v2 @@ -15,24 +14,27 @@ jobs: 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 tclzipfile - sed -n '/^VERSION /{s/.*= /TCL_VER=/;p;q;}' < Makefile >> $GITHUB_ENV + make shell SCRIPT="$VER_PATH $GITHUB_ENV" echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV + working-directory: unix - name: Package run: | cat ../unix/tclsh $TCL_ZIP > tclsh${TCL_VER}_unofficial - chmod +x tclsh${TCL_VER}_unofficial - tar -cf tclsh${TCL_VER}_unofficial.tar tclsh${TCL_VER}_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_VER }} Linux single-file build (unofficial) + name: Tclsh ${{ env.TCL_PATCHLEVEL }} Linux single-file build (unofficial) path: 1dist/*.tar macos: name: macOS @@ -40,7 +42,6 @@ jobs: defaults: run: shell: bash - working-directory: unix steps: - name: Checkout uses: actions/checkout@v2 @@ -51,34 +52,40 @@ jobs: ref: v1.0.8 - name: Prepare run: | - touch generic/tclStubInit.c generic/tclOOStubInit.c + echo "::group::Listing configuration" + find . -ls || true + echo "::endgroup::" mkdir 1dist + touch generic/tclStubInit.c generic/tclOOStubInit.c || true + echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV echo "CREATE_DMG=$(cd create-dmg;pwd)/create-dmg" >> $GITHUB_ENV - working-directory: . - name: Configure run: ./configure --disable-symbols --disable-shared --enable-zipfs + working-directory: unix - name: Build run: | make tclsh tclzipfile - sed -n '/^VERSION /{s/.*= /TCL_VER=/;p;q;}' < Makefile >> $GITHUB_ENV + 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 - cat ../unix/tclsh $TCL_ZIP > contents/tclsh${TCL_VER}_unofficial - chmod +x contents/tclsh${TCL_VER}_unofficial + cat $TCL_BIN $TCL_ZIP > contents/tclsh${TCL_PATCHLEVEL}_unofficial + chmod +x contents/tclsh${TCL_PATCHLEVEL}_unofficial $CREATE_DMG \ - --volname "Tcl ${{ env.TCL_VER }} (unofficial)" \ + --volname "Tcl ${{ env.TCL_PATCHLEVEL }} (unofficial)" \ --window-pos 200 120 \ --window-size 800 400 \ --app-drop-link 600 185 \ - "Tcl-${{ env.TCL_VER }}-(unofficial).dmg" \ + "Tcl-${{ env.TCL_PATCHLEVEL }}-(unofficial).dmg" \ "contents/" working-directory: 1dist - name: Upload uses: actions/upload-artifact@v2 with: - name: Tclsh ${{ env.TCL_VER }} macOS single-file build (unofficial) + name: Tclsh ${{ env.TCL_PATCHLEVEL }} macOS single-file build (unofficial) path: 1dist/*.dmg win: name: Windows @@ -86,7 +93,6 @@ jobs: defaults: run: shell: bash - working-directory: win steps: - name: Checkout uses: actions/checkout@v2 @@ -95,21 +101,24 @@ jobs: - 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 tclzipfile - sed -n '/^VERSION /{s/.*= /TCL_VER=/;p;q;}' < Makefile >> $GITHUB_ENV + make shell SCRIPT="$VER_PATH $GITHUB_ENV" echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV + working-directory: win - name: Package run: | - cat ../win/tclsh*.exe $TCL_ZIP > tclsh${TCL_VER}_unofficial.exe + cat ../win/tclsh*.exe $TCL_ZIP > tclsh${TCL_PATCHLEVEL}_unofficial.exe working-directory: 1dist - name: Upload uses: actions/upload-artifact@v2 with: - name: Tclsh ${{ env.TCL_VER }} Windows single-file build (unofficial) + name: Tclsh ${{ env.TCL_PATCHLEVEL }} Windows single-file build (unofficial) path: '1dist/*_unofficial.exe' diff --git a/tools/addVerToFile.tcl b/tools/addVerToFile.tcl new file mode 100755 index 0000000..bfc39e2 --- /dev/null +++ b/tools/addVerToFile.tcl @@ -0,0 +1,9 @@ +#!/usr/bin/env tclsh +if {$argc < 1} { + error "need a filename argument" +} +lassign $argv filename +set f [open $filename a] +puts $f "TCL_VERSION=[info tclversion]" +puts $f "TCL_PATCHLEVEL=[info patchlevel]" +close $f -- cgit v0.12 From 5bf4c011e1e583ad9be1bae5a6e38cae7cbb81e7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 27 Nov 2020 14:28:18 +0000 Subject: label change in win-build.yml --- .github/workflows/win-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 5e6b6ba..2aeccaf 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -57,7 +57,7 @@ jobs: touch tclStubInit.c mkdir "${HOME}/install" working-directory: generic - - name: Configure (symbols=${{ matrix.cfgopt }}) + - name: Configure ${{ matrix.cfgopt }} run: | ./configure ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) env: -- cgit v0.12 From 0cb78052e48dae9b266b3a8291a1d5c65b1e2487 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 27 Nov 2020 18:07:05 +0000 Subject: That's the best we can do without entering the morass that is signing/notarization on macOS; Windows now uses the right version IDs --- .github/workflows/onefiledist.yml | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index f077861..0fb6ba5 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -1,4 +1,4 @@ -name: Build +name: Build Binaries on: [push] jobs: linux: @@ -27,7 +27,7 @@ jobs: working-directory: unix - name: Package run: | - cat ../unix/tclsh $TCL_ZIP > tclsh${TCL_VER}_unofficial + cat ../unix/tclsh $TCL_ZIP > tclsh${TCL_PATCHLEVEL}_unofficial chmod +x tclsh${TCL_PATCHLEVEL}_unofficial tar -cf tclsh${TCL_PATCHLEVEL}_unofficial.tar tclsh${TCL_PATCHLEVEL}_unofficial working-directory: 1dist @@ -50,11 +50,9 @@ jobs: with: repository: create-dmg/create-dmg ref: v1.0.8 + path: create-dmg - name: Prepare run: | - echo "::group::Listing configuration" - find . -ls || true - echo "::endgroup::" mkdir 1dist touch generic/tclStubInit.c generic/tclOOStubInit.c || true echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV @@ -74,12 +72,21 @@ jobs: mkdir contents cat $TCL_BIN $TCL_ZIP > contents/tclsh${TCL_PATCHLEVEL}_unofficial chmod +x contents/tclsh${TCL_PATCHLEVEL}_unofficial + cat > contents/README.txt <> $GITHUB_ENV working-directory: win - name: Package run: | - cat ../win/tclsh*.exe $TCL_ZIP > tclsh${TCL_PATCHLEVEL}_unofficial.exe + cat ../win/tclsh*.exe $TCL_ZIP > combined.exe + working-directory: 1dist + - name: Get Exact Version + run: | + ./combined.exe $VER_PATH $GITHUB_ENV + working-directory: 1dist + - name: Set Executable Name + run: | + mv combined.exe tclsh${TCL_PATCHLEVEL}_unofficial.exe working-directory: 1dist - name: Upload uses: actions/upload-artifact@v2 -- cgit v0.12 From 15194461b1ae5479887c7348dfcba4c11a01fe30 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 30 Nov 2020 08:21:20 +0000 Subject: Cherry-pick part of "msys2-fixes_v001" branch: build/test fixes for msys2 --- tests/env.test | 4 ++-- unix/configure | 4 ++-- unix/tcl.m4 | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/env.test b/tests/env.test index a7aa162..1824ebc 100644 --- a/tests/env.test +++ b/tests/env.test @@ -84,7 +84,7 @@ set printenvScript [makeFile { foreach name { 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 ProgramFiles CommonProgramW6432 ProgramW6432 } { @@ -116,7 +116,7 @@ foreach name [array names env] { if {[string toupper $name] ni { TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH 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 SECURITYSESSIONID LANG WINDIR TERM CONNOMPROGRAMFILES PROGRAMFILES COMMONPROGRAMW6432 PROGRAMW6432 }} { diff --git a/unix/configure b/unix/configure index 1c0c2be..1e48efa 100755 --- a/unix/configure +++ b/unix/configure @@ -6931,7 +6931,7 @@ fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - CYGWIN_*|MINGW32*) + CYGWIN_*|MINGW32*|MSYS_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" @@ -8853,7 +8853,7 @@ fi case $system in AIX-*) ;; BSD/OS*) ;; - CYGWIN_*|MINGW32_*) ;; + CYGWIN_*|MINGW32*|MSYS_*) ;; IRIX*) ;; NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 4c96316..449d7af 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1247,7 +1247,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - CYGWIN_*|MINGW32*) + CYGWIN_*|MINGW32*|MSYS_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" @@ -2060,7 +2060,7 @@ dnl # preprocessing tests use only CPPFLAGS. case $system in AIX-*) ;; BSD/OS*) ;; - CYGWIN_*|MINGW32_*) ;; + CYGWIN_*|MINGW32_*|MSYS_*) ;; IRIX*) ;; NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; -- cgit v0.12 From eb342fb1e00f5aa398c9e889ac6a7e47d1ab5e5b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 30 Nov 2020 08:52:04 +0000 Subject: Update README.md --- README.md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index fd4ef2a..ce7298e 100644 --- a/README.md +++ b/README.md @@ -5,20 +5,9 @@ This is the **Tcl 8.6.10** source distribution. You can get any source release of Tcl from [our distribution site](https://sourceforge.net/projects/tcl/files/Tcl/). -8.6.10 -[![Build Status](https://github.com/tcltk/tcl/workflows/Linux%20Build%20and%20Test/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux+Build+and+Test%22+branch%3Acore-8-6-branch) -[![Build Status](https://github.com/tcltk/tcl/workflows/Windows%20Build%20and%20Test/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows+Build+and+Test%22+branch%3Acore-8-6-branch) -[![Build Status](https://github.com/tcltk/tcl/workflows/macOS%20Build%20and%20Test/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS+Build+and+Test%22+branch%3Acore-8-6-branch) -
-8.7a4 -[![Build Status](https://github.com/tcltk/tcl/workflows/Linux%20Build%20and%20Test/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux+Build+and+Test%22+branch%3Acore-8-branch) -[![Build Status](https://github.com/tcltk/tcl/workflows/Windows%20Build%20and%20Test/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows+Build+and+Test%22+branch%3Acore-8-branch) -[![Build Status](https://github.com/tcltk/tcl/workflows/macOS%20Build%20and%20Test/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS+Build+and+Test%22+branch%3Acore-8-branch) -
-9.0a2 -[![Build Status](https://github.com/tcltk/tcl/workflows/Linux%20Build%20and%20Test/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux+Build+and+Test%22+branch%3Amain) -[![Build Status](https://github.com/tcltk/tcl/workflows/Windows%20Build%20and%20Test/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows+Build+and+Test%22+branch%3Amain) -[![Build Status](https://github.com/tcltk/tcl/workflows/macOS%20Build%20and%20Test/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS+Build+and+Test%22+branch%3Amain) +[![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) ## Contents 1. [Introduction](#intro) -- cgit v0.12 From 2ac074313bbc4ff0bb4399ffb362e1b400ca2f64 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 30 Nov 2020 12:18:19 +0000 Subject: Fix [6b1c6bb09c]: Extended plane character does not encode correctly to UTF-16 with TCL_UTF_MAX==4 Als use more of TIP #587 in encoding.test --- generic/tclEncoding.c | 6 +-- tests/encoding.test | 103 ++++++++++++++++++++++++++------------------------ 2 files changed, 57 insertions(+), 52 deletions(-) diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 48ab3cf..ff3c44c 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -2570,7 +2570,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); @@ -2582,10 +2582,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); diff --git a/tests/encoding.test b/tests/encoding.test index a63d33f..c0a3a69 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -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,7 +535,7 @@ 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乎\u68d9g set env(TCL_FINALIZE_ON_EXIT) 1 exit }] @@ -540,7 +545,7 @@ test encoding-24.3 {EscapeFreeProc on open channels} {stdio} { # closure, we go boom set file [makeFile { encoding system iso2022-jp - set a "\u4e4e\u4e5e\u4e5f"; # 3 Japanese Kanji letters + set a "乎\u4e5e\u4e5f"; # 3 Japanese Kanji letters puts $a } iso2022.tcl] set f [open "|[list [interpreter] $file]"] @@ -549,7 +554,7 @@ 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 "乎\u4e5e\u4e5f (\\u4e4e\\u4e5e\\u4e5f)"] test encoding-24.4 {Parse valid or invalid utf-8} { string length [encoding convertfrom utf-8 "\xc0\x80"] -- cgit v0.12 From 87439e7d28331cfc8c620fe77d2e696b7e3bb223 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 30 Nov 2020 13:32:00 +0000 Subject: Fix [b6a7fc9243]. Also add (back) \*(qo, which might be used in older man-pages --- tools/tcltk-man2html-utils.tcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl index 5b2a831..5f8431b 100644 --- a/tools/tcltk-man2html-utils.tcl +++ b/tools/tcltk-man2html-utils.tcl @@ -185,7 +185,6 @@ proc process-text {text} { {\(Tp} "þ" \ {\(em} "—" \ {\(en} "–" \ - {\(bu} "•" \ {\(fm} "′" \ {\(mi} "−" \ {\(.i} "ı" \ @@ -200,6 +199,8 @@ proc process-text {text} { {\(eu} "€" \ {\fP} {\fR} \ {\.} . \ + {\(bu} "•" \ + {\*(qo} "ô" \ ] # This might make a few invalid mappings, but we don't use them foreach c {a c e g i l n o s t u y z A C E G I L N O S T U Y Z} { -- cgit v0.12 From 17de94982b2d1f3b93a9237eb2371fbdd53695cb Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 30 Nov 2020 14:16:23 +0000 Subject: doc update: 16-bit DOS appllications are not supported any more. Use &bull; in stead of &#8226; representing bullets in html --- doc/exec.n | 15 ++------------- tools/tcltk-man2html-utils.tcl | 8 ++++---- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/doc/exec.n b/doc/exec.n index 99dfdc5..04b5269 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/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl index 5f8431b..34222e3 100644 --- a/tools/tcltk-man2html-utils.tcl +++ b/tools/tcltk-man2html-utils.tcl @@ -50,7 +50,7 @@ proc indexfile {} { proc copyright {copyright {level {}}} { # We don't actually generate a separate copyright page anymore #set page "${level}copyright.htm" - #return "Copyright © [htmlize-text [lrange $copyright 2 end]]" + #return "Copyright © [htmlize-text [lrange $copyright 2 end]]" # obfuscate any email addresses that may appear in name set who [string map {@ (at)} [lrange $copyright 2 end]] return "Copyright © [htmlize-text $who]" @@ -199,7 +199,7 @@ proc process-text {text} { {\(eu} "€" \ {\fP} {\fR} \ {\.} . \ - {\(bu} "•" \ + {\(bu} "•" \ {\*(qo} "ô" \ ] # This might make a few invalid mappings, but we don't use them @@ -573,7 +573,7 @@ proc output-IP-list {context code rest} { if {[regexp {^\[[\da-f]+\]|\(?[\da-f]+\)$} $rest]} { set dl "
    " set enddl "
" - } elseif {"•" eq $rest} { + } elseif {"•" eq $rest} { set dl "
    " set enddl "
" } @@ -599,7 +599,7 @@ proc output-IP-list {context code rest} { man-puts "$para
  • " } elseif {[regexp {^\(?([\da-f]+)\)$} $rest -> value]} { man-puts "$para
  • " - } elseif {"•" eq $rest} { + } elseif {"•" eq $rest} { man-puts "$para
  • " } else { man-puts "$para
    [long-toc $rest]
    " -- cgit v0.12 From fa960af76021db9b505bcf86ebb894073b6db99d Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 30 Nov 2020 16:52:50 +0000 Subject: Minor fixes + copy editing :). See [https://github.com/tcltk/tcl/pull/8] --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ce7298e..742a3e6 100644 --- a/README.md +++ b/README.md @@ -31,19 +31,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. ## 2. 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/8.6.html). Detailed release notes can be found at the @@ -90,16 +90,16 @@ about building Tcl from sources [online](https://www.tcl-lang.org/doc/howto/compile.html). ## 4. 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 ## 5. 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. -- cgit v0.12 From 53a9a5dc8fdd7aac66544c1c0db83f8943ed8ba6 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Dec 2020 08:49:30 +0000 Subject: Missing '_' in unix/tcl.m4 (Only relevant for mingw) --- unix/configure | 4 ++-- unix/tcl.m4 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unix/configure b/unix/configure index 1e48efa..c0f6d5b 100755 --- a/unix/configure +++ b/unix/configure @@ -6931,7 +6931,7 @@ fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - CYGWIN_*|MINGW32*|MSYS_*) + CYGWIN_*|MINGW32_*|MSYS_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" @@ -8853,7 +8853,7 @@ fi case $system in AIX-*) ;; BSD/OS*) ;; - CYGWIN_*|MINGW32*|MSYS_*) ;; + CYGWIN_*|MINGW32_*|MSYS_*) ;; IRIX*) ;; NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 449d7af..0a76b0d 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1247,7 +1247,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - CYGWIN_*|MINGW32*|MSYS_*) + CYGWIN_*|MINGW32_*|MSYS_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" -- cgit v0.12 From d9fa72d22a6c7c823f0267fdabce5a9f307a7743 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Dec 2020 11:54:35 +0000 Subject: Handle 5 test-failures on Cygwin/Msys --- tests/winFCmd.test | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/winFCmd.test b/tests/winFCmd.test index 04c4fd9..500b114 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -5,7 +5,7 @@ # 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 (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. @@ -1383,7 +1383,7 @@ test winFCmd-19.3 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {}] -test winFCmd-19.4 {Windows extended path names} -constraints nt -setup { +test winFCmd-19.4 {Windows extended path names} -constraints {win nt} -setup { set tmpfile [file join $::env(TEMP) tcl[string repeat x 20].tmp] set tmpfile //?/[file normalize $tmpfile] } -body { @@ -1405,7 +1405,7 @@ test winFCmd-19.5 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {}] -test winFCmd-19.6 {Windows extended path names} -constraints nt -setup { +test winFCmd-19.6 {Windows extended path names} -constraints {win nt} -setup { set tmpfile [file join $::env(TEMP) tcl[string repeat x 248].tmp] set tmpfile //?/[file normalize $tmpfile] } -body { @@ -1416,7 +1416,7 @@ test winFCmd-19.6 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {}] -test winFCmd-19.7 {Windows extended path names} -constraints nt -setup { +test winFCmd-19.7 {Windows extended path names} -constraints {win nt} -setup { set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] set tmpfile [file normalize $tmpfile] } -body { @@ -1427,7 +1427,7 @@ test winFCmd-19.7 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {} [list tcl[pid].tmp]] -test winFCmd-19.8 {Windows extended path names} -constraints nt -setup { +test winFCmd-19.8 {Windows extended path names} -constraints {win nt} -setup { set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] set tmpfile //?/[file normalize $tmpfile] } -body { @@ -1439,7 +1439,7 @@ test winFCmd-19.8 {Windows extended path names} -constraints nt -setup { catch {file delete $tmpfile} } -result [list 0 {} [list "tcl[pid].tmp "]] -test winFCmd-19.9 {Windows devices path names} -constraints nt -body { +test winFCmd-19.9 {Windows devices path names} -constraints {win nt} -body { file normalize //./com1 } -result //./com1 -- cgit v0.12 From 3ae4ed89d048fa82b852ea788b27088e72892efd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Dec 2020 12:17:18 +0000 Subject: Remove incomplete stuff from .project: It is not enough to make actual building from within Eclipse possible --- .project | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.project b/.project index 27fef70..eddd834 100644 --- a/.project +++ b/.project @@ -5,22 +5,7 @@ - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature -- cgit v0.12 From 5878b9510bf288f9e34e2bc65799101b209fec06 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Dec 2020 15:15:28 +0000 Subject: Fix 2 testcases in Windows. Cause: tcltest::makeFile should assume the same encoding as the "source" command uses (TIP #589) Aso remove the ::tcltest::bytestring command: It doesn't work any more starting Tcl 8.7 since the "identity" encoding is gone (TIP #345) --- library/tcltest/tcltest.tcl | 16 +++++++++++++--- tests/encoding.test | 24 ++++++++++++------------ 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 285a33d..32500c8 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -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] @@ -3080,6 +3082,9 @@ proc tcltest::makeFile {contents name {directory ""}} { set fd [open $fullName w] chan configure $fd -translation lf + if {[package vsatisfies [package provide Tcl] 8.7-]} { + chan configure $fd -encoding utf-8 + } if {[string index $contents end] eq "\n"} { puts -nonewline $fd $contents } else { @@ -3249,6 +3254,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 +3266,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/tests/encoding.test b/tests/encoding.test index c0a3a69..362a611 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -535,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乎\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 "乎\u4e5e\u4e5f"; # 3 Japanese Kanji letters + set a "乎乞也"; # 3 Japanese Kanji letters puts $a } iso2022.tcl] set f [open "|[list [interpreter] $file]"] @@ -554,31 +554,31 @@ test encoding-24.3 {EscapeFreeProc on open channels} {stdio} { close $f removeFile iso2022.tcl list $count [viewable $line] -} [list 3 "乎\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] -- cgit v0.12 From 7c3b884ac2d10d1ca50e15b96506b6eda5e04442 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Dec 2020 15:28:03 +0000 Subject: Another TIP #589 side-effect: Make sure that the encoding used in ::tcltest::viewFile matches the one in ::tcltest::makeFile --- library/tcltest/tcltest.tcl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 32500c8..33ad322 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -1271,7 +1271,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 } @@ -3081,9 +3081,9 @@ 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-]} { - chan configure $fd -encoding utf-8 + fconfigure $fd -encoding utf-8 } if {[string index $contents end] eq "\n"} { puts -nonewline $fd $contents @@ -3233,6 +3233,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 -- cgit v0.12 From fc7a2d97e0d4c2c2bfc5c978843c1126cdc441b1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Dec 2020 16:25:30 +0000 Subject: Remove redunant piece of SC_ENABLE_SHARED: The AC_ARG_ENABLE already generates this part, resulting in duplicate code in the "configure" script --- unix/configure | 8 -------- unix/tcl.m4 | 8 -------- win/configure | 8 -------- win/tcl.m4 | 8 -------- 4 files changed, 32 deletions(-) diff --git a/unix/configure b/unix/configure index c0f6d5b..b8c95f4 100755 --- a/unix/configure +++ b/unix/configure @@ -6277,14 +6277,6 @@ if test "${enable_shared+set}" = set; then else tcl_ok=yes fi; - - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval - else - tcl_ok=yes - fi - if test "$tcl_ok" = "yes" ; then echo "$as_me:$LINENO: result: shared" >&5 echo "${ECHO_T}shared" >&6 diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 0a76b0d..57df84d 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -534,14 +534,6 @@ AC_DEFUN([SC_ENABLE_SHARED], [ AC_HELP_STRING([--enable-shared], [build and link with shared libraries (default: on)]), [tcl_ok=$enableval], [tcl_ok=yes]) - - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval - else - tcl_ok=yes - fi - if test "$tcl_ok" = "yes" ; then AC_MSG_RESULT([shared]) SHARED_BUILD=1 diff --git a/win/configure b/win/configure index 019fa72..1ad2225 100755 --- a/win/configure +++ b/win/configure @@ -3126,14 +3126,6 @@ if test "${enable_shared+set}" = set; then else tcl_ok=yes fi; - - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval - else - tcl_ok=yes - fi - if test "$tcl_ok" = "yes" ; then echo "$as_me:$LINENO: result: shared" >&5 echo "${ECHO_T}shared" >&6 diff --git a/win/tcl.m4 b/win/tcl.m4 index 4932788..8704378 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -364,14 +364,6 @@ AC_DEFUN([SC_ENABLE_SHARED], [ AC_ARG_ENABLE(shared, [ --enable-shared build and link with shared libraries (default: on)], [tcl_ok=$enableval], [tcl_ok=yes]) - - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval - else - tcl_ok=yes - fi - if test "$tcl_ok" = "yes" ; then AC_MSG_RESULT([shared]) SHARED_BUILD=1 -- cgit v0.12 From 2f8611013d1b61ea5656aacaf27909eaee6e528f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Dec 2020 16:35:59 +0000 Subject: Do 4 types of windows builds (just as we did on Travis) --- .github/workflows/win-build.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 2aeccaf..f59b2d7 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -7,6 +7,13 @@ jobs: run: shell: powershell working-directory: win + strategy: + matrix: + cfgopt: + - "OPTS=threads" + - "OPTS=static,msvcrt,threads" + - "OPTS=symbols,threads" + - "OPTS=memdbg,threads" # Using powershell means we need to explicitly stop on failure steps: - name: Checkout @@ -15,19 +22,19 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 - name: Build run: | - &nmake -f makefile.vc all + &nmake -f makefile.vc ${{ matrix.cfgopt }} all if ($lastexitcode -ne 0) { throw "nmake exit code: $lastexitcode" } - name: Build Test Harness run: | - &nmake -f makefile.vc tcltest + &nmake -f makefile.vc ${{ matrix.cfgopt }} tcltest if ($lastexitcode -ne 0) { throw "nmake exit code: $lastexitcode" } - name: Run Tests run: | - &nmake -f makefile.vc test + &nmake -f makefile.vc ${{ matrix.cfgopt }} test if ($lastexitcode -ne 0) { throw "nmake exit code: $lastexitcode" } @@ -61,7 +68,7 @@ jobs: run: | ./configure ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) env: - CFGOPT: --enable-64bit ${{ matrix.cfgopt }} + CFGOPT: --enable-64bit --enable-threads ${{ matrix.cfgopt }} - name: Build run: make all - name: Build Test Harness -- cgit v0.12 From 9727e58e7d335ffd3a43602fbcab4a99e5dc7758 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Dec 2020 16:41:10 +0000 Subject: Add options to workflow step titles --- .github/workflows/win-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index f59b2d7..637ca7e 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -20,19 +20,19 @@ jobs: uses: actions/checkout@v2 - name: Init MSVC uses: ilammy/msvc-dev-cmd@v1 - - name: Build + - 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 + - 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 + - name: Run Tests ${{ matrix.cfgopt }} run: | &nmake -f makefile.vc ${{ matrix.cfgopt }} test if ($lastexitcode -ne 0) { -- cgit v0.12 From 02c730b29850204b02de5c9c1e70c52fd0fd9a65 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 2 Dec 2020 11:19:57 +0000 Subject: Fix linker message on windows: LINK : warming LNK4108: /ALIGN specified without /DRIVER; image may not run. This options was only useful on MSVC++ 5.0 and earlier, which is no longer supported --- win/makefile.vc | 3 --- win/rules.vc | 13 ------------- 2 files changed, 16 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index f8ac7e2..eaf6888 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -489,9 +489,6 @@ lflags = $(lflags) -nodefaultlib:libucrt.lib !if $(ALIGN98_HACK) && !$(STATIC_BUILD) ### Align sections for PE size savings. lflags = $(lflags) -opt:nowin98 -!else if !$(ALIGN98_HACK) && $(STATIC_BUILD) -### Align sections for speed in loading by choosing the virtual page size. -lflags = $(lflags) -align:4096 !endif !if $(LOIMPACT) diff --git a/win/rules.vc b/win/rules.vc index a4c94ff..753df14 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -193,19 +193,6 @@ COMPILERFLAGS = $(COMPILERFLAGS) -QIA64_Bx LINKER_TESTFLAGS = /DLL /NOENTRY /OUT:nmhlp-out.txt !endif -!if "$(MACHINE)" == "IX86" -### test for -align:4096, when align:512 will do. -!if [nmakehlp -l -opt:nowin98 $(LINKER_TESTFLAGS)] -!message *** Linker has 'Win98 alignment problem' -ALIGN98_HACK = 1 -!else -!message *** Linker does not have 'Win98 alignment problem' -ALIGN98_HACK = 0 -!endif -!else -ALIGN98_HACK = 0 -!endif - LINKERFLAGS = !if [nmakehlp -l -ltcg $(LINKER_TESTFLAGS)] -- cgit v0.12 From c387e380dea36d13e5809aeea05acb5fa1663830 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 2 Dec 2020 11:57:04 +0000 Subject: Don't use -opt:nowin98 linker option any more. See: [https://bugzilla.mozilla.org/show_bug.cgi?id=130372] --- win/rules.vc | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/win/rules.vc b/win/rules.vc index f3e5439..ab43909 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -1481,18 +1481,6 @@ lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug) lflags = $(lflags) -nodefaultlib:libucrt.lib !endif -# Old linkers (Visual C++ 6 in particular) will link for fast loading -# on Win98. Since we do not support Win98 any more, we specify nowin98 -# as recommended for NT and later. However, this is only required by -# IX86 on older compilers and only needed if we are not doing a static build. - -!if "$(MACHINE)" == "IX86" && !$(STATIC_BUILD) -!if [nmakehlp -l -opt:nowin98 $(LINKER_TESTFLAGS)] -# Align sections for PE size savings. -lflags = $(lflags) -opt:nowin98 -!endif -!endif - dlllflags = $(lflags) -dll conlflags = $(lflags) -subsystem:console guilflags = $(lflags) -subsystem:windows -- cgit v0.12 From b1517df3ff0aa3be2bb952a719ffbbc27d69e226 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 3 Dec 2020 09:09:25 +0000 Subject: Simplify some \\u???? escape sequences to \\x?? --- library/cookiejar/cookiejar.tcl | 6 +++--- library/cookiejar/idna.tcl | 8 ++++---- tools/makeHeader.tcl | 2 +- tools/regexpTestLib.tcl | 2 +- tools/tcltk-man2html-utils.tcl | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/library/cookiejar/cookiejar.tcl b/library/cookiejar/cookiejar.tcl index 6c8e82b..cfa73ae 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 88c2b9d..658dcd6 100644 --- a/library/cookiejar/idna.tcl +++ b/library/cookiejar/idna.tcl @@ -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/tools/makeHeader.tcl b/tools/makeHeader.tcl index dd2f199..c72219f 100644 --- a/tools/makeHeader.tcl +++ b/tools/makeHeader.tcl @@ -25,7 +25,7 @@ namespace eval makeHeader { } set XFORM {[format \\\\\\\\u%04x {*}[scan & %c]]} - subst [regsub -all {[^\u0020-\u007e]} [string map $MAP $str] $XFORM] + subst [regsub -all {[^\x20-\x7E]} [string map $MAP $str] $XFORM] } #################################################################### diff --git a/tools/regexpTestLib.tcl b/tools/regexpTestLib.tcl index a94d90f..bdb7d90 100644 --- a/tools/regexpTestLib.tcl +++ b/tools/regexpTestLib.tcl @@ -192,7 +192,7 @@ proc convertTestLine {currentLine len lineNum srcLineNum} { # if and \r substitutions are made, do not wrap re, flags, # str, and result in braces - set noBraces [regsub -all {R} $currentLine {\\\u000D} currentLine] + set noBraces [regsub -all {R} $currentLine {\\\x0D} currentLine] regsub -all {T} $currentLine {\\t} currentLine regsub -all {V} $currentLine {\\v} currentLine if {[regexp {=} $flags] == 1} { diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl index 94440d5..2d82bb1 100644 --- a/tools/tcltk-man2html-utils.tcl +++ b/tools/tcltk-man2html-utils.tcl @@ -130,8 +130,8 @@ proc htmlize-text {text {charmap {}}} { \" {"} \ {<} {<} \ {>} {>} \ - \u201c "“" \ - \u201d "”" + \u201C "“" \ + \u201D "”" return [string map $charmap $text] } @@ -1303,8 +1303,8 @@ proc make-manpage-section {outputDir sectionDescriptor} { global manual overall_title tcltkdesc verbose global excluded_pages forced_index_pages process_first_patterns - set LQ \u201c - set RQ \u201d + set LQ \u201C + set RQ \u201D lassign $sectionDescriptor \ manual(wing-glob) \ -- cgit v0.12 From 482091f871d7accfad3e007ec7672a3cb2cc39f1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 3 Dec 2020 09:31:00 +0000 Subject: Extend "platform" package for msys2 -> platform 1.0.15 --- library/platform/pkgIndex.tcl | 2 +- library/platform/platform.tcl | 5 ++++- unix/Makefile.in | 4 ++-- win/Makefile.in | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 5970a3f..46a0ed4 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.15 [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..87d720b 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -97,6 +97,9 @@ proc ::platform::generic {} { cygwin* { set plat cygwin } + msys* { + set plat msystem + } windows { if {$tcl_platform(platform) == "unix"} { set plat cygwin @@ -378,7 +381,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.14 +package provide platform 1.0.15 # ### ### ### ######### ######### ######### ## Demo application diff --git a/unix/Makefile.in b/unix/Makefile.in index fd44f4e..e29f422 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -791,8 +791,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs @echo "Installing package tcltest 2.5.3 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.5.3.tm; - @echo "Installing package platform 1.0.14 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.14.tm; + @echo "Installing package platform 1.0.15 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.15.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm; diff --git a/win/Makefile.in b/win/Makefile.in index 8835232..89af617 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -673,8 +673,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.5.2.tm; @echo "Installing package tcltest 2.5.3 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.5.3.tm; - @echo "Installing package platform 1.0.14 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.14.tm; + @echo "Installing package platform 1.0.15 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.15.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.4.tm; @echo "Installing encodings"; -- cgit v0.12 From a3322b06acaf0cf6fef649e67625c47bceb77305 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 3 Dec 2020 09:37:28 +0000 Subject: Fix syntax error in win/makefile.vc --- win/makefile.vc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index eaf6888..692d209 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -486,11 +486,6 @@ lflags = $(lflags) -profile lflags = $(lflags) -nodefaultlib:libucrt.lib !endif -!if $(ALIGN98_HACK) && !$(STATIC_BUILD) -### Align sections for PE size savings. -lflags = $(lflags) -opt:nowin98 -!endif - !if $(LOIMPACT) lflags = $(lflags) -ws:aggressive !endif -- cgit v0.12 From defc33228dae46280943ff6cc62d3a4a3284e056 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 3 Dec 2020 13:51:18 +0000 Subject: Use 0o??? notation for octal numbers in tools and testcases in stead of 0???. Although it still works in 8.6, it is deprecated an will be removed in 9.0. --- tests/chanio.test | 4 ++-- tests/cmdAH.test | 14 +++++++------- tests/cmdMZ.test | 2 +- tests/fCmd.test | 48 ++++++++++++++++++++++++------------------------ tests/fileName.test | 4 ++-- tests/fileSystem.test | 2 +- tests/tcltest.test | 4 ++-- tests/unixFCmd.test | 34 +++++++++++++++++----------------- tools/installData.tcl | 4 ++-- 9 files changed, 58 insertions(+), 58 deletions(-) diff --git a/tests/chanio.test b/tests/chanio.test index 1f9e19b..ffb4e91 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -5336,14 +5336,14 @@ test chan-io-40.2 {POSIX open access modes: CREAT} -setup { } -constraints {unix} -body { set f [open $path(test3) {WRONLY CREAT} 0600] 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] lappend x [chan gets $f] } -cleanup { chan close $f -} -result {0600 {line 1}} +} -result {0o600 {line 1}} test chan-io-40.3 {POSIX open access modes: CREAT} -setup { file delete $path(test3) } -constraints {unix umask} -body { diff --git a/tests/cmdAH.test b/tests/cmdAH.test index d64ebbb..bb3ad98 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -965,10 +965,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 0o000 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 @@ -991,7 +991,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]} { @@ -1407,7 +1407,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 { @@ -1434,8 +1434,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}}} @@ -1715,7 +1715,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/cmdMZ.test b/tests/cmdMZ.test index 0f42f2f..fb2ca4a 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -63,7 +63,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 0o000 pwd } -returnCodes error -cleanup { cd $cwd diff --git a/tests/fCmd.test b/tests/fCmd.test index 09f91f7..efffe99 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -624,10 +624,10 @@ test fCmd-6.23 {CopyRenameOneFile: TclpCopyDirectory failed} -setup { cleanup $tmpspace } -constraints {xdev notRoot} -body { file mkdir td1/td2/td3 - file attributes td1 -permissions 0000 + file attributes td1 -permissions 0o000 file rename td1 $tmpspace } -returnCodes error -cleanup { - file attributes td1 -permissions 0755 + file attributes td1 -permissions 0o755 cleanup } -match regexp -result {^error renaming "td1"( to "/tmp/tcl\d+/td1")?: permission denied$} test fCmd-6.24 {CopyRenameOneFile: error uses original name} -setup { @@ -635,10 +635,10 @@ test fCmd-6.24 {CopyRenameOneFile: error uses original name} -setup { } -constraints {unix notRoot} -body { file mkdir ~/td1/td2 set td1name [file join [file dirname ~] [file tail ~] td1] - file attributes $td1name -permissions 0000 + file attributes $td1name -permissions 0o000 file copy ~/td1 td1 } -returnCodes error -cleanup { - file attributes $td1name -permissions 0755 + file attributes $td1name -permissions 0o755 file delete -force ~/td1 } -result {error copying "~/td1": permission denied} test fCmd-6.25 {CopyRenameOneFile: error uses original name} -setup { @@ -647,10 +647,10 @@ test fCmd-6.25 {CopyRenameOneFile: error uses original name} -setup { file mkdir td2 file mkdir ~/td1 set td1name [file join [file dirname ~] [file tail ~] td1] - file attributes $td1name -permissions 0000 + file attributes $td1name -permissions 0o000 file copy td2 ~/td1 } -returnCodes error -cleanup { - file attributes $td1name -permissions 0755 + file attributes $td1name -permissions 0o755 file delete -force ~/td1 } -result {error copying "td2" to "~/td1/td2": permission denied} test fCmd-6.26 {CopyRenameOneFile: doesn't use original name} -setup { @@ -658,10 +658,10 @@ test fCmd-6.26 {CopyRenameOneFile: doesn't use original name} -setup { } -constraints {unix notRoot} -body { file mkdir ~/td1/td2 set td2name [file join [file dirname ~] [file tail ~] td1 td2] - file attributes $td2name -permissions 0000 + file attributes $td2name -permissions 0o000 file copy ~/td1 td1 } -returnCodes error -cleanup { - file attributes $td2name -permissions 0755 + file attributes $td2name -permissions 0o755 file delete -force ~/td1 } -result "error copying \"~/td1\" to \"td1\": \"[file join $::env(HOME) td1 td2]\": permission denied" test fCmd-6.27 {CopyRenameOneFile: TclpCopyDirectory failed} -setup { @@ -676,10 +676,10 @@ test fCmd-6.28 {CopyRenameOneFile: TclpCopyDirectory failed} -setup { cleanup $tmpspace } -constraints {notRoot xdev} -body { file mkdir td1/td2/td3 - file attributes td1/td2/td3 -permissions 0000 + file attributes td1/td2/td3 -permissions 0o000 file rename td1 $tmpspace } -returnCodes error -cleanup { - file attributes td1/td2/td3 -permissions 0755 + file attributes td1/td2/td3 -permissions 0o755 cleanup $tmpspace } -match glob -result {error renaming "td1" to "/tmp/tcl*/td1": "td1/td2/td3": permission denied} test fCmd-6.29 {CopyRenameOneFile: TclpCopyDirectory passed} -setup { @@ -1343,10 +1343,10 @@ test fCmd-12.8 {renamefile: generic error} -setup { } -constraints {unix notRoot} -body { file mkdir tfa file mkdir tfa/dir - file attributes tfa -permissions 0555 + file attributes tfa -permissions 0o555 catch {file rename tfa/dir tfa2} } -cleanup { - catch {file attributes tfa -permissions 0777} + catch {file attributes tfa -permissions 0o777} file delete -force tfa } -result {1} test fCmd-12.9 {renamefile: moving a file across volumes} -setup { @@ -1529,10 +1529,10 @@ test fCmd-14.8 {copyfile: copy directory failing} -setup { catch {file delete -force -- tfa} } -constraints {unix notRoot} -body { file mkdir tfa/dir/a/b/c - file attributes tfa/dir -permissions 0000 + file attributes tfa/dir -permissions 0o000 catch {file copy tfa tfa2} } -cleanup { - file attributes tfa/dir -permissions 0777 + file attributes tfa/dir -permissions 0o777 file delete -force tfa tfa2 } -result {1} @@ -1572,10 +1572,10 @@ test fCmd-15.4 {TclMakeDirsCmd - stat failing} -setup { } -constraints {unix notRoot} -body { file mkdir tfa createfile tfa/file - file attributes tfa -permissions 0000 + file attributes tfa -permissions 0o000 catch {file mkdir tfa/file} } -cleanup { - file attributes tfa -permissions 0777 + file attributes tfa -permissions 0o777 file delete -force tfa } -result {1} test fCmd-15.5 {TclMakeDirsCmd: - making a directory several levels deep} -setup { @@ -1672,7 +1672,7 @@ test fCmd-16.9 {error while deleting file} -setup { } -constraints {unix notRoot} -body { file mkdir tfa createfile tfa/a - file attributes tfa -permissions 0555 + file attributes tfa -permissions 0o555 catch {file delete tfa/a} ####### ####### If any directory in a tree that is being removed does not have @@ -1680,7 +1680,7 @@ test fCmd-16.9 {error while deleting file} -setup { ####### with "rm -rf" ####### } -cleanup { - file attributes tfa -permissions 0777 + file attributes tfa -permissions 0o777 file delete -force tfa } -result {1} test fCmd-16.10 {deleting multiple files} -constraints {notRoot} -setup { @@ -1702,10 +1702,10 @@ test fCmd-17.1 {mkdir stat failing on target but not ENOENT} -setup { catch {file delete -force -- tfa1} } -constraints {unix notRoot} -body { file mkdir tfa1 - file attributes tfa1 -permissions 0555 + file attributes tfa1 -permissions 0o555 catch {file mkdir tfa1/tfa2} } -cleanup { - file attributes tfa1 -permissions 0777 + file attributes tfa1 -permissions 0o777 file delete -force tfa1 } -result {1} test fCmd-17.2 {mkdir several levels deep - relative} -setup { @@ -1913,10 +1913,10 @@ test fCmd-19.2 {rmdir error besides EEXIST} -setup { } -constraints {unix notRoot} -body { file mkdir tfa file mkdir tfa/a - file attributes tfa -permissions 0555 + file attributes tfa -permissions 0o555 catch {file delete tfa/a} } -cleanup { - file attributes tfa -permissions 0777 + file attributes tfa -permissions 0o777 file delete -force tfa } -result {1} test fCmd-19.3 {recursive remove} -constraints {notRoot} -setup { @@ -1941,10 +1941,10 @@ test fCmd-20.1 {TraverseUnixTree : failure opening a subdirectory directory} -se } -constraints {unix notRoot} -body { file mkdir tfa file mkdir tfa/a - file attributes tfa/a -permissions 0000 + file attributes tfa/a -permissions 0o000 catch {file delete -force tfa} } -cleanup { - file attributes tfa/a -permissions 0777 + file attributes tfa/a -permissions 0o777 file delete -force tfa } -result {1} test fCmd-20.2 {TraverseUnixTree : recursive delete of large directory: Bug 1034337} -setup { diff --git a/tests/fileName.test b/tests/fileName.test index 0411ea8..2648049 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -1327,7 +1327,7 @@ unset globname # AFS, "000" protection doesn't prevent access by owner, so the following test # is not portable. -catch {file attributes globTest/a1 -permissions 0000} +catch {file attributes globTest/a1 -permissions 0o000} test filename-15.1 {unix specific globbing} {unix nonPortable} { string tolower [list [catch {glob globTest/a1/*} msg] $msg $errorCode] } {1 {couldn't read directory "globtest/a1": permission denied} {posix eacces {permission denied}}} @@ -1339,7 +1339,7 @@ test filename-15.3 {unix specific no complain: no errors, good result} \ # test fails because if an error occurs, the interp's result is reset... glob -nocomplain globTest/a2 globTest/a1/* globTest/a3 } {globTest/a2 globTest/a3} -catch {file attributes globTest/a1 -permissions 0755} +catch {file attributes globTest/a1 -permissions 0o755} test filename-15.4 {unix specific no complain: no errors, good result} \ {unix nonPortable} { # test fails because if an error occurs, the interp's result is reset... diff --git a/tests/fileSystem.test b/tests/fileSystem.test index 7e06a23..8af4f53 100644 --- a/tests/fileSystem.test +++ b/tests/fileSystem.test @@ -695,7 +695,7 @@ test filesystem-7.5 {cross-filesystem file copy with -force} -setup { # First copy should succeed set res [catch {file copy simplefs:/simplefile file2} err] lappend res $err - file attributes file2 -permissions 0000 + file attributes file2 -permissions 0o000 # Second copy should fail (no -force) lappend res [catch {file copy simplefs:/simplefile file2} err] lappend res $err diff --git a/tests/tcltest.test b/tests/tcltest.test index 5e2485b..9b1bb4b 100644 --- a/tests/tcltest.test +++ b/tests/tcltest.test @@ -546,8 +546,8 @@ makeDirectory notreadable makeDirectory notwriteable switch -- $::tcl_platform(platform) { unix { - file attributes $notReadableDir -permissions 00333 - file attributes $notWriteableDir -permissions 00555 + file attributes $notReadableDir -permissions 0o333 + file attributes $notWriteableDir -permissions 0o555 } default { # note in FAT/NTFS we won't be able to protect directory with read-only attribute... diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test index c98e3f0..991e489 100644 --- a/tests/unixFCmd.test +++ b/tests/unixFCmd.test @@ -96,10 +96,10 @@ test unixFCmd-1.1 {TclpRenameFile: EACCES} -setup { cleanup } -constraints {unix notRoot} -body { file mkdir td1/td2/td3 - file attributes td1/td2 -permissions 0000 + file attributes td1/td2 -permissions 0o000 file rename td1/td2/td3 td2 } -returnCodes error -cleanup { - file attributes td1/td2 -permissions 0755 + file attributes td1/td2 -permissions 0o755 cleanup } -result {error renaming "td1/td2/td3": permission denied} test unixFCmd-1.2 {TclpRenameFile: EEXIST} -setup { @@ -221,12 +221,12 @@ test unixFCmd-2.5 {TclpCopyFile: copy attributes} -setup { cleanup } -constraints {unix notRoot} -body { close [open tf1 a] - file attributes tf1 -permissions 0472 + file attributes tf1 -permissions 0o472 file copy tf1 tf2 - file attributes tf2 -permissions + format 0o%03o [file attributes tf2 -permissions] } -cleanup { cleanup -} -result 00472 ;# i.e. perms field of [exec ls -l tf2] is -r--rwx-w- +} -result 0o472 ;# i.e. perms field of [exec ls -l tf2] is -r--rwx-w- test unixFCmd-3.1 {CopyFile not done} {emptyTest unix notRoot} { } {} @@ -336,15 +336,15 @@ test unixFCmd-17.1 {SetPermissionsAttribute} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -body { close [open foo.test w] - list [file attributes foo.test -permissions 0000] \ - [file attributes foo.test -permissions] + list [file attributes foo.test -permissions 0o000] \ + [format 0o%03o [file attributes foo.test -permissions]] } -cleanup { file delete -force -- foo.test -} -result {{} 00000} +} -result {{} 0o000} test unixFCmd-17.2 {SetPermissionsAttribute} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -returnCodes error -body { - file attributes foo.test -permissions 0000 + file attributes foo.test -permissions 0o000 } -result {could not set permissions for file "foo.test": no such file or directory} test unixFCmd-17.3 {SetPermissionsAttribute} -setup { catch {file delete -force -- foo.test} @@ -370,16 +370,16 @@ proc permcheck {testnum permList expected} { set result {} foreach permstr $permList { file attributes foo.test -permissions $permstr - lappend result [file attributes foo.test -permissions] + lappend result [format 0o%03o [file attributes foo.test -permissions]] } set result } $expected } -permcheck unixFCmd-17.5 rwxrwxrwx 00777 -permcheck unixFCmd-17.6 r--r---w- 00442 -permcheck unixFCmd-17.7 {0 u+rwx,g+r u-w o+rwx} {00000 00740 00540 00547} -permcheck unixFCmd-17.11 --x--x--x 00111 -permcheck unixFCmd-17.12 {0 a+rwx} {00000 00777} +permcheck unixFCmd-17.5 rwxrwxrwx 0o777 +permcheck unixFCmd-17.6 r--r---w- 0o442 +permcheck unixFCmd-17.7 {0 u+rwx,g+r u-w o+rwx} {0o000 0o740 0o540 0o547} +permcheck unixFCmd-17.11 --x--x--x 0o111 +permcheck unixFCmd-17.12 {0 a+rwx} {0o000 0o777} file delete -force -- foo.test test unixFCmd-18.1 {Unix pwd} -constraints {unix notRoot nonPortable} -setup { @@ -390,11 +390,11 @@ test unixFCmd-18.1 {Unix pwd} -constraints {unix notRoot nonPortable} -setup { set nd $cd/tstdir file mkdir $nd cd $nd - file attributes $nd -permissions 0000 + file attributes $nd -permissions 0o000 pwd } -returnCodes error -cleanup { cd $cd - file attributes $nd -permissions 0755 + file attributes $nd -permissions 0o755 file delete $nd } -match glob -result {error getting working directory name:*} diff --git a/tools/installData.tcl b/tools/installData.tcl index dd7976b..4a3b1ee 100644 --- a/tools/installData.tcl +++ b/tools/installData.tcl @@ -32,7 +32,7 @@ proc copyDir {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 } @@ -40,7 +40,7 @@ proc copyDir {d1 d2} { } if {$::tcl_platform(platform) eq {unix}} { - file attributes $d2 -permissions 0755 + file attributes $d2 -permissions 0o755 } else { file attributes $d2 -readonly 1 } -- cgit v0.12 From c99f35416608c70d8e277b38405429a50b64bd84 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 3 Dec 2020 13:57:56 +0000 Subject: two more 0o??? notations --- tests/chanio.test | 4 ++-- tests/io.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/chanio.test b/tests/chanio.test index ffb4e91..5586015 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -5350,8 +5350,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 %#4o [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 { diff --git a/tests/io.test b/tests/io.test index e45b5ef..71f6e50 100644 --- a/tests/io.test +++ b/tests/io.test @@ -5655,8 +5655,8 @@ test io-40.3 {POSIX open access modes: CREAT} {unix umask} { set f [open $path(test3) {WRONLY CREAT}] close $f file stat $path(test3) stats - format "%#o" [expr $stats(mode)&0o777] -} [format %#4o [expr {0o666 & ~ $umaskValue}]] + format "0o%03o" [expr $stats(mode)&0o777] +} [format "0o%03o" [expr {0o666 & ~ $umaskValue}]] test io-40.4 {POSIX open access modes: CREAT} { file delete $path(test3) set f [open $path(test3) w] -- cgit v0.12 From efb126543f991101ab3703d8f659d64674a54cd2 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Thu, 3 Dec 2020 16:50:23 +0000 Subject: Add makefile.vc target sfe for single-file executable --- win/makefile.vc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/win/makefile.vc b/win/makefile.vc index e752169..b8d3c11 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -179,6 +179,9 @@ VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) !include versions.vc +# Single file Tclsh +TCLSFE = $(OUT_DIR)\$(PROJECT)sfe$(VERSION).exe + DDEDOTVERSION = 1.4 DDEVERSION = $(DDEDOTVERSION:.=) @@ -458,6 +461,13 @@ core: setup $(TCLLIB) $(TCLSTUBLIB) shell: setup $(TCLSH) dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll $(OUT_DIR)\libtommath.dll all: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs +!if $(STATIC_BUILD) && $(TCL_USE_STATIC_PACKAGES) +sfe: setup $(TCLSH) $(TCLSTUBLIB) $(TCLSFE) +!else +sfe: + @echo Single file executables need static build of Tcl. Specify "static" and "staticpkg" in OPTS. +!endif + tcltest: setup $(TCLTEST) dlls install: install-binaries install-libraries install-docs install-pkgs !if $(SYMBOLS) @@ -597,6 +607,24 @@ genstubs: $(GENERICDIR:\=/)/tclOO.decls !endif +#--------------------------------------------------------------------- +# Build a single file executable version of Tcl +#--------------------------------------------------------------------- +!if $(STATIC_BUILD) && $(TCL_USE_STATIC_PACKAGES) +$(OUT_DIR)\tcl_library.zip: + @echo Building Tcl library zip file + @echo file delete -force tcl_library > "$(OUT_DIR)\zipper.tcl" + @echo file delete -force tcl_library.zip >> "$(OUT_DIR)\zipper.tcl" + @echo file copy ../../library tcl_library >> "$(OUT_DIR)\zipper.tcl" + @echo file rename tcl_library/manifest.txt tcl_library/pkgIndex.tcl >> "$(OUT_DIR)\zipper.tcl" + @echo zipfs mkzip {$@} tcl_library tcl_library >> "$(OUT_DIR)\zipper.tcl" + @cd "$(OUT_DIR)" && $(TCLSH) zipper.tcl + +$(TCLSFE): $(OUT_DIR)\tcl_library.zip + @echo Building single-file exe from $(TCLSH) and $(OUT_DIR)\tcl_library.zip + @copy /y /b "$(TCLSH)"+"$(OUT_DIR)\tcl_library.zip" "$@" +!endif + #--------------------------------------------------------------------- # Build the Windows HTML help file. -- cgit v0.12 From ebd7b1edb756eea5aa2bdb46d4634ba80de8fccc Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 4 Dec 2020 09:58:37 +0000 Subject: Fix 4 socket testcases on Msys (those fail on Cygwin too) --- tests/socket.test | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/socket.test b/tests/socket.test index d5f9c94..b590fc7 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -285,6 +285,8 @@ proc getPort sock { # Some tests in this file are known to hang *occasionally* on OSX; stop the # worst offenders. testConstraint notOSX [expr {$::tcl_platform(os) ne "Darwin"}] +# Here "Windows" means derived platforms as Cygwin or Msys2 too. +testConstraint notWindows [expr {![regexp {^(Windows|MSYS|CYGWIN)} $::tcl_platform(os)]}] # ---------------------------------------------------------------------- @@ -909,7 +911,7 @@ test socket_$af-5.1 {byte order problems, socket numbers, htons} -body { return {htons problem, should be disallowed, are you running as SU?} } return {couldn't open socket: not owner} -} -constraints [list socket supported_$af unix notRoot notOSX] -result {couldn't open socket: not owner} +} -constraints [list socket supported_$af unix notRoot notOSX notWindows] -result {couldn't open socket: not owner} test socket_$af-5.2 {byte order problems, socket numbers, htons} -body { if {![catch {socket -server dodo 0x10000} msg]} { close $msg @@ -923,7 +925,7 @@ test socket_$af-5.3 {byte order problems, socket numbers, htons} -body { return {htons problem, should be disallowed, are you running as SU?} } return {couldn't open socket: not owner} -} -constraints [list socket supported_$af unix notRoot notOSX] -result {couldn't open socket: not owner} +} -constraints [list socket supported_$af unix notRoot notOSX notWindows] -result {couldn't open socket: not owner} test socket_$af-6.1 {accept callback error} -constraints [list socket supported_$af stdio] -setup { proc myHandler {msg options} { -- cgit v0.12 From 9a3e53bd90302b78155f1fd7a561b3274d54316e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 4 Dec 2020 10:00:56 +0000 Subject: TclWordEnd was removed in 8.1, so those testcases cannot be run anymore --- tests/parseOld.test | 66 ----------------------------------------------------- 1 file changed, 66 deletions(-) diff --git a/tests/parseOld.test b/tests/parseOld.test index c8f82cf..4e441d1 100644 --- a/tests/parseOld.test +++ b/tests/parseOld.test @@ -451,72 +451,6 @@ expr 1+1 ]" } {2} -test parseOld-14.1 {TclWordEnd procedure} {testwordend} { - testwordend " \n abc" -} {c} -test parseOld-14.2 {TclWordEnd procedure} {testwordend} { - testwordend " \\\n" -} {} -test parseOld-14.3 {TclWordEnd procedure} {testwordend} { - testwordend " \\\n " -} { } -test parseOld-14.4 {TclWordEnd procedure} {testwordend} { - testwordend {"abc"} -} {"} -#" Emacs formatting :^( -test parseOld-14.5 {TclWordEnd procedure} {testwordend} { - testwordend {{xyz}} -} \} -test parseOld-14.6 {TclWordEnd procedure} {testwordend} { - testwordend {{a{}b{}\}} xyz} -} "\} xyz" -test parseOld-14.7 {TclWordEnd procedure} {testwordend} { - testwordend {abc[this is a]def ghi} -} {f ghi} -test parseOld-14.8 {TclWordEnd procedure} {testwordend} { - testwordend "puts\\\n\n " -} "s\\\n\n " -test parseOld-14.9 {TclWordEnd procedure} {testwordend} { - testwordend "puts\\\n " -} "s\\\n " -test parseOld-14.10 {TclWordEnd procedure} {testwordend} { - testwordend "puts\\\n xyz" -} "s\\\n xyz" -test parseOld-14.11 {TclWordEnd procedure} {testwordend} { - testwordend {a$x.$y(a long index) foo} -} ") foo" -test parseOld-14.12 {TclWordEnd procedure} {testwordend} { - testwordend {abc; def} -} {; def} -test parseOld-14.13 {TclWordEnd procedure} {testwordend} { - testwordend {abc def} -} {c def} -test parseOld-14.14 {TclWordEnd procedure} {testwordend} { - testwordend {abc def} -} {c def} -test parseOld-14.15 {TclWordEnd procedure} {testwordend} { - testwordend "abc\ndef" -} "c\ndef" -test parseOld-14.16 {TclWordEnd procedure} {testwordend} { - testwordend "abc" -} {c} -test parseOld-14.17 {TclWordEnd procedure} {testwordend} { - testwordend "a\000bc" -} {c} -test parseOld-14.18 {TclWordEnd procedure} {testwordend} { - testwordend \[a\000\] -} {]} -test parseOld-14.19 {TclWordEnd procedure} {testwordend} { - testwordend \"a\000\" -} {"} -#" Emacs formatting :^( -test parseOld-14.20 {TclWordEnd procedure} {testwordend} { - testwordend a{\000}b -} {b} -test parseOld-14.21 {TclWordEnd procedure} {testwordend} { - testwordend " \000b" -} {b} - test parseOld-15.1 {TclScriptEnd procedure} { info complete {puts [ expr 1+1 -- cgit v0.12 From cd48044e1b95257568e26686e58e9c293a81a82d Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 4 Dec 2020 10:19:51 +0000 Subject: Backport "tcltest" package from 8.7. No changes when running on 8.5 or 8.6 --- library/tcltest/tcltest.tcl | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 4df25e4..7dc75d7 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. @@ -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] @@ -1269,7 +1271,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 } @@ -3079,7 +3081,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 +3233,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 +3257,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 +3269,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 -- -- cgit v0.12 From e5bf8e9ed0ed0eac93c860963c9ee98ecffe4d3f Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Sat, 5 Dec 2020 02:51:10 +0000 Subject: Fix suffix on single file exe name --- win/makefile.vc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win/makefile.vc b/win/makefile.vc index 3e2e0d1..8e83a8f 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -25,6 +25,7 @@ # shell -- Just builds the shell and the core. # core -- Only builds the core [tclXX.(dll|lib)]. # all -- Builds everything. +# sfe -- Build static single file executable. # test -- Builds and runs the test suite. # tcltest -- Just builds the test shell. # install -- Installs the built binaries and libraries to $(INSTALLDIR) @@ -180,7 +181,7 @@ VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) !include versions.vc # Single file Tclsh -TCLSFE = $(OUT_DIR)\$(PROJECT)sfe$(VERSION).exe +TCLSFE = $(OUT_DIR)\$(PROJECT)sfe$(VERSION)$(SUFX).exe DDEDOTVERSION = 1.4 DDEVERSION = $(DDEDOTVERSION:.=) -- cgit v0.12 -- cgit v0.12 From fc71c7c2fce04d50b5c1baa8306a02510bc30f73 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Sun, 6 Dec 2020 08:06:03 +0000 Subject: nmake builds: extract {TCL,TK}_RELEASE_SERIAL and patch letters from {tcl,tk}.h --- win/rules.vc | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/win/rules.vc b/win/rules.vc index ab43909..c70effb 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -24,7 +24,7 @@ _RULES_VC = 1 # For modifications that are not backward-compatible, you *must* change # the major version. RULES_VERSION_MAJOR = 1 -RULES_VERSION_MINOR = 6 +RULES_VERSION_MINOR = 7 # The PROJECT macro must be defined by parent makefile. !if "$(PROJECT)" == "" @@ -907,10 +907,14 @@ WARNINGS = $(WARNINGS) -Wp64 # Sets the following macros: # TCL_MAJOR_VERSION # TCL_MINOR_VERSION +# TCL_RELEASE_SERIAL # TCL_PATCH_LEVEL +# TCL_PATCH_LETTER # TCL_VERSION # TK_MAJOR_VERSION # TK_MINOR_VERSION +# TK_RELEASE_SERIAL +# TK_PATCH_LEVEL # TK_PATCH_LEVEL # TK_VERSION # DOTVERSION - set as (for example) 2.5 @@ -925,6 +929,9 @@ WARNINGS = $(WARNINGS) -Wp64 !if [echo TCL_MINOR_VERSION = \>> versions.vc] \ && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc] !endif +!if [echo TCL_RELEASE_SERIAL = \>> versions.vc] \ + && [nmakehlp -V "$(_TCL_H)" TCL_RELEASE_SERIAL >> versions.vc] +!endif !if [echo TCL_PATCH_LEVEL = \>> versions.vc] \ && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc] !endif @@ -936,6 +943,9 @@ WARNINGS = $(WARNINGS) -Wp64 !if [echo TK_MINOR_VERSION = \>> versions.vc] \ && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc] !endif +!if [echo TK_RELEASE_SERIAL = \>> versions.vc] \ + && [nmakehlp -V "$(_TK_H)" TK_RELEASE_SERIAL >> versions.vc] +!endif !if [echo TK_PATCH_LEVEL = \>> versions.vc] \ && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc] !endif @@ -945,9 +955,26 @@ WARNINGS = $(WARNINGS) -Wp64 TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) TCL_DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION) +!if [nmakehlp -f $(TCL_PATCH_LEVEL) "a"] +TCL_PATCH_LETTER = a +!elseif [nmakehlp -f $(TCL_PATCH_LEVEL) "b"] +TCL_PATCH_LETTER = b +!else +TCL_PATCH_LETTER = . +!endif + !if defined(_TK_H) + TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION) TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION) +!if [nmakehlp -f $(TK_PATCH_LEVEL) "a"] +TK_PATCH_LETTER = a +!elseif [nmakehlp -f $(TK_PATCH_LEVEL) "b"] +TK_PATCH_LETTER = b +!else +TK_PATCH_LETTER = . +!endif + !endif # Set DOTVERSION and VERSION -- cgit v0.12 From f3f92eae518acec341076587cea780dffbd9a7a5 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Sun, 6 Dec 2020 10:39:22 +0000 Subject: nmake: Generate libtcl_VERSION.zip as per TIP 430 --- win/makefile.vc | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 8e83a8f..4116d25 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -457,13 +457,13 @@ TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT) # Project specific targets #--------------------------------------------------------------------- -release: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs +release: setup $(TCLSH) $(TCLSTUBLIB) dlls libtclzip pkgs core: setup $(TCLLIB) $(TCLSTUBLIB) shell: setup $(TCLSH) dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll $(OUT_DIR)\libtommath.dll all: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs !if $(STATIC_BUILD) && $(TCL_USE_STATIC_PACKAGES) -sfe: setup $(TCLSH) $(TCLSTUBLIB) $(TCLSFE) +sfe: setup $(TCLSH) $(TCLSTUBLIB) libtclzip $(TCLSFE) !else sfe: @echo Single file executables need static build of Tcl. Specify "static" and "staticpkg" in OPTS. @@ -611,21 +611,32 @@ genstubs: #--------------------------------------------------------------------- # Build a single file executable version of Tcl #--------------------------------------------------------------------- -!if $(STATIC_BUILD) && $(TCL_USE_STATIC_PACKAGES) -$(OUT_DIR)\tcl_library.zip: +LIBTCLVFS = $(OUT_DIR)\libtcl.vfs +!if "$(TCL_PATCH_LETTER)" == "." +LIBTCLZIP = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_RELEASE_SERIAL).zip +!else +LIBTCLZIP = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip +!endif + +libtclzip: $(OUT_DIR)\$(LIBTCLZIP) +$(OUT_DIR)\$(LIBTCLZIP): .PHONY @echo Building Tcl library zip file - @echo file delete -force tcl_library > "$(OUT_DIR)\zipper.tcl" - @echo file delete -force tcl_library.zip >> "$(OUT_DIR)\zipper.tcl" - @echo file copy ../../library tcl_library >> "$(OUT_DIR)\zipper.tcl" - @echo file rename tcl_library/manifest.txt tcl_library/pkgIndex.tcl >> "$(OUT_DIR)\zipper.tcl" - @echo zipfs mkzip {$@} tcl_library tcl_library >> "$(OUT_DIR)\zipper.tcl" + @if exist "$(LIBTCLVFS)" $(RMDIR) "$(LIBTCLVFS)" + @$(MKDIR) "$(LIBTCLVFS)" + @$(CPYDIR) $(LIBDIR) "$(LIBTCLVFS)\tcl_library" + @move /y "$(LIBTCLVFS)\tcl_library\manifest.txt" "$(LIBTCLVFS)\tcl_library\pkgIndex.tcl" + @echo file delete -force {$@} > "$(OUT_DIR)\zipper.tcl" + @echo zipfs mkzip {$@} {$(LIBTCLVFS)} {$(LIBTCLVFS)} >> "$(OUT_DIR)\zipper.tcl" @cd "$(OUT_DIR)" && $(TCLSH) zipper.tcl -$(TCLSFE): $(OUT_DIR)\tcl_library.zip - @echo Building single-file exe from $(TCLSH) and $(OUT_DIR)\tcl_library.zip - @copy /y /b "$(TCLSH)"+"$(OUT_DIR)\tcl_library.zip" "$@" +!if $(STATIC_BUILD) && $(TCL_USE_STATIC_PACKAGES) +$(TCLSFE): $(OUT_DIR)\$(LIBTCLZIP) + @echo Building single-file exe from $(TCLSH) + @copy /y /b "$(TCLSH)"+"$(OUT_DIR)\$(LIBTCLZIP)" "$@" !endif +.PHONY: + #--------------------------------------------------------------------- # Build the Windows HTML help file. -- cgit v0.12 From cf333de0987ad12a325909be7ae372f50d2d28a1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 7 Dec 2020 13:53:21 +0000 Subject: rules.vc: Make sure that 3th "load" argument is titlecased in pkgIndex.tcl --- win/makefile.vc | 2 +- win/rules.vc | 6 +++--- win/targets.vc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 3c6b86e..60b6bf0 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -16,7 +16,7 @@ # General usage: # nmake [-nologo] -f makefile.vc [TARGET|MACRODEF [TARGET|MACRODEF] [...]] # -# For MACRODEF, see TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) +# For MACRODEF, see TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) # or examine Sections 6-8 in rules.vc. # # Possible values of TARGET are: diff --git a/win/rules.vc b/win/rules.vc index c70effb..a0084a4 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -6,7 +6,7 @@ # compiler switches, defining common targets and macros. The Tcl makefile # directly includes this. Extensions include it via "rules-ext.vc". # -# See TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) for +# See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for # detailed documentation. # # See the file "license.terms" for information on usage and redistribution @@ -1565,11 +1565,11 @@ default-target: $(DEFAULT_BUILD_TARGET) !if $(MULTIPLATFORM_INSTALL) default-pkgindex: @echo package ifneeded $(PRJ_PACKAGE_TCLNAME) $(DOTVERSION) \ - [list load [file join $$dir $(PLATFORM_IDENTIFY) $(PRJLIBNAME)]] > $(OUT_DIR)\pkgIndex.tcl + [list load [file join $$dir $(PLATFORM_IDENTIFY) $(PRJLIBNAME)] [string totitle $(PRJ_PACKAGE_TCLNAME)]] > $(OUT_DIR)\pkgIndex.tcl !else default-pkgindex: @echo package ifneeded $(PRJ_PACKAGE_TCLNAME) $(DOTVERSION) \ - [list load [file join $$dir $(PRJLIBNAME)]] > $(OUT_DIR)\pkgIndex.tcl + [list load [file join $$dir $(PRJLIBNAME)] [string totitle $(PRJ_PACKAGE_TCLNAME)]] > $(OUT_DIR)\pkgIndex.tcl !endif default-pkgindex-tea: diff --git a/win/targets.vc b/win/targets.vc index 6bfebc7..077e8f7 100644 --- a/win/targets.vc +++ b/win/targets.vc @@ -4,7 +4,7 @@ # Part of the nmake based build system for Tcl and its extensions. # This file defines some standard targets for the convenience of extensions # and can be optionally included by the extension makefile. -# See TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) for docs. +# See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for docs. $(PROJECT): setup pkgindex $(PRJLIB) -- cgit v0.12 From f6bd13629fa5edb7707fc6adb73029c9a09b5e1f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 7 Dec 2020 14:25:31 +0000 Subject: In configure/make Windows build, static builds include dde and registry extension statically too implicitly --- .github/workflows/win-build.yml | 2 +- .travis.yml | 13 ++----------- win/buildall.vc.bat | 4 ++-- win/tcl.dsp | 12 ++++++------ win/tclAppInit.c | 4 ++-- 5 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 9615e85..0c0e597 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -11,7 +11,7 @@ jobs: matrix: cfgopt: - "" - - "OPTS=static,msvcrt" + - "OPTS=static,staticpkg,msvcrt" - "OPTS=symbols" - "OPTS=memdbg" # Using powershell means we need to explicitly stop on failure diff --git a/.travis.yml b/.travis.yml index 6438d66..f166e82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -257,15 +257,6 @@ 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 - - name: "Windows/MSVC/StaticPackage" - os: windows - compiler: cl - env: *vcenv - before_install: *vcpreinst - install: [] - script: - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc all tcltest - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc test - name: "Windows/MSVC/Debug" @@ -321,8 +312,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,staticpkg,msvcrt' '-f' makefile.vc all tcltest + - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc test - name: "Windows/MSVC-x86/Debug" os: windows compiler: cl diff --git a/win/buildall.vc.bat b/win/buildall.vc.bat index cb136be..3dc14c1 100755 --- a/win/buildall.vc.bat +++ b/win/buildall.vc.bat @@ -68,8 +68,8 @@ if errorlevel 1 goto error :: Build the static core and shell. :: -set OPTS=static,msvcrt -if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt +set OPTS=static,staticpkg,msvcrt +if not %SYMBOLS%.==. set OPTS=symbols,static,staticpkg,msvcrt nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1 if errorlevel 1 goto error diff --git a/win/tcl.dsp b/win/tcl.dsp index fe1b859..dc23f86 100644 --- a/win/tcl.dsp +++ b/win/tcl.dsp @@ -34,7 +34,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release\tcl_Dynamic" -# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=none MSVCDIR=IDE" +# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" # PROP BASE Target_File "Release\tclsh87.exe" # PROP BASE Bsc_Name "" @@ -43,7 +43,7 @@ CFG=tcl - Win32 Debug Static # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release\tcl_Dynamic" -# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=threads MSVCDIR=IDE" +# PROP Cmd_Line "nmake -nologo -f makefile.vc MSVCDIR=IDE" # PROP Rebuild_Opt "clean release" # PROP Target_File "Release\tclsh87t.exe" # PROP Bsc_Name "" @@ -76,7 +76,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug\tcl_Static" -# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static MSVCDIR=IDE" +# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static,staticpkg,msvcrt MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" # PROP BASE Target_File "Debug\tclsh87sg.exe" # PROP BASE Bsc_Name "" @@ -85,7 +85,7 @@ CFG=tcl - Win32 Debug Static # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug\tcl_Static" -# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static MSVCDIR=IDE" +# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static,staticpkg,msvcrt MSVCDIR=IDE" # PROP Rebuild_Opt "-a" # PROP Target_File "Debug\tclsh87sg.exe" # PROP Bsc_Name "" @@ -97,7 +97,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release\tcl_Static" -# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=static MSVCDIR=IDE" +# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=static,staticpkg,msvcrt MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" # PROP BASE Target_File "Release\tclsh87s.exe" # PROP BASE Bsc_Name "" @@ -106,7 +106,7 @@ CFG=tcl - Win32 Debug Static # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release\tcl_Static" -# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=static MSVCDIR=IDE" +# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=static,staticpkg,msvcrt MSVCDIR=IDE" # PROP Rebuild_Opt "-a" # PROP Target_File "Release\tclsh87s.exe" # PROP Bsc_Name "" diff --git a/win/tclAppInit.c b/win/tclAppInit.c index 3ab9fc8..52ead8e 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -29,7 +29,7 @@ extern Tcl_PackageInitProc Tcltest_Init; extern Tcl_PackageInitProc Tcltest_SafeInit; #endif /* TCL_TEST */ -#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES +#if defined(STATIC_BUILD) extern Tcl_PackageInitProc Registry_Init; extern Tcl_PackageInitProc Dde_Init; extern Tcl_PackageInitProc Dde_SafeInit; @@ -164,7 +164,7 @@ Tcl_AppInit( return TCL_ERROR; } -#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES +#if defined(STATIC_BUILD) if (Registry_Init(interp) == TCL_ERROR) { return TCL_ERROR; } -- cgit v0.12 From 49baa37b9ceaea45c5bc3648673a4c7b786d76cf Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 7 Dec 2020 15:08:16 +0000 Subject: Put dde/registry obj-files in the stub library in stead of the static library. Needed to combine --disable-shared build of Tk with --enable-shared build of Tcl in a single executable --- win/Makefile.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win/Makefile.in b/win/Makefile.in index a0daf24..298b72d 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -559,9 +559,9 @@ $(CAT32): cat32.$(OBJEXT) # The following targets are configured by autoconf to generate either a shared # library or static library -${TCL_STUB_LIB_FILE}: ${STUB_OBJS} +${TCL_STUB_LIB_FILE}: ${STUB_OBJS} ${DDE_OBJS} ${REG_OBJS} @$(RM) ${TCL_STUB_LIB_FILE} - @MAKE_STUB_LIB@ ${STUB_OBJS} + @MAKE_STUB_LIB@ ${STUB_OBJS} ${DDE_OBJS} ${REG_OBJS} @POST_MAKE_LIB@ ${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ @TOMMATH_DLL_FILE@ ${TCL_ZIP_FILE} @@ -575,12 +575,12 @@ ${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ @TOMMATH_DLL_FILE@ ${TCL || echo 'ignore zip-error by adjust sfx process (not executable?)'; \ fi -${TCL_LIB_FILE}: ${TCL_OBJS} ${DDE_OBJS} ${REG_OBJS} +${TCL_LIB_FILE}: ${TCL_OBJS} @$(RM) ${TCL_LIB_FILE} @MAKE_LIB@ ${TCL_OBJS} ${DDE_OBJS} ${REG_OBJS} @POST_MAKE_LIB@ -${DDE_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${DDE_OBJS} +${DDE_DLL_FILE}: ${TCL_STUB_LIB_FILE} @MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) $(COPY) tclsh.exe.manifest ${DDE_DLL_FILE}.manifest -- cgit v0.12 From 99a90efbfdf094cdb59e8136873498c98322b1b3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 8 Dec 2020 10:14:49 +0000 Subject: TIP #590 follow-up: Adapt documentation and tclStubLib.c --- doc/abstract.n | 2 +- doc/callback.n | 2 +- doc/class.n | 2 +- doc/classvariable.n | 2 +- doc/clock.n | 2 +- doc/copy.n | 2 +- doc/define.n | 2 +- doc/fpclassify.n | 2 +- doc/link.n | 2 +- doc/mathfunc.n | 2 +- doc/mathop.n | 2 +- doc/msgcat.n | 2 +- doc/my.n | 2 +- doc/next.n | 2 +- doc/object.n | 2 +- doc/self.n | 2 +- doc/singleton.n | 2 +- doc/tcltest.n | 1 - generic/tclStubLib.c | 11 ++++++----- tools/makeHeader.tcl | 2 +- 20 files changed, 24 insertions(+), 24 deletions(-) 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/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/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 6a887d9..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 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 9046203..19969da 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/fpclassify.n b/doc/fpclassify.n index 41c658c..22d365e 100644 --- a/doc/fpclassify.n +++ b/doc/fpclassify.n @@ -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 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/mathfunc.n b/doc/mathfunc.n index 3b7d915..004b7e3 100644 --- a/doc/mathfunc.n +++ b/doc/mathfunc.n @@ -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 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/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/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/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/generic/tclStubLib.c b/generic/tclStubLib.c index 22e8b9b..4f7240d 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -54,10 +54,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 @@ -67,11 +68,11 @@ Tcl_InitStubs( if (!stubsPtr || (stubsPtr->magic != (((exact&0xFF00) >= 0x900) ? magic : TCL_STUB_MAGIC))) { iPtr->result = (char *)"interpreter uses an incompatible stubs mechanism"; - iPtr->freeProc = 0; + iPtr->freeProc = 0; /* TCL_STATIC */ 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; } @@ -91,11 +92,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/tools/makeHeader.tcl b/tools/makeHeader.tcl index c72219f..1d961c9 100644 --- a/tools/makeHeader.tcl +++ b/tools/makeHeader.tcl @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -package require Tcl 8.6 +package require Tcl 8.6- namespace eval makeHeader { -- cgit v0.12 From 35231ec0d7e1ee42dedbc1c26152e097589659fb Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 8 Dec 2020 10:30:05 +0000 Subject: Skip testcases filesystem-7.1.[1|2] with msvc OPTS=staticpkg: This isn't supposed to work --- tests/fileSystem.test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fileSystem.test b/tests/fileSystem.test index 500202d..d5a7c01 100644 --- a/tests/fileSystem.test +++ b/tests/fileSystem.test @@ -27,10 +27,10 @@ catch { ::tcltest::loadTestedCommands package require -exact tcl::test [info patchlevel] set ::ddever [package require dde] - set ::ddelib [lindex [package ifneeded dde $::ddever] 1] + set ::ddelib [info loaded {} Dde] set ::regver [package require registry] - set ::reglib [lindex [package ifneeded registry $::regver] 1] - testConstraint loaddll 1 + set ::reglib [info loaded {} Registry] + testConstraint loaddll [expr {$::ddelib ne "" && $::reglib ne ""}] } # Test for commands defined in tcl::test package -- cgit v0.12 From 070d566ad50608ade5e3566caeb1cdeac6ea81a7 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Tue, 8 Dec 2020 10:46:12 +0000 Subject: TIP 430: generate and attach library zip --- win/makefile.vc | 106 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 43 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index eb0dd74..bb41f1c 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -25,7 +25,6 @@ # shell -- Just builds the shell and the core. # core -- Only builds the core [tclXX.(dll|lib)]. # all -- Builds everything. -# sfe -- Build static single file executable. # test -- Builds and runs the test suite. # tcltest -- Just builds the test shell. # install -- Installs the built binaries and libraries to $(INSTALLDIR) @@ -53,17 +52,23 @@ # turn on the 64-bit compiler, if your SDK has it. # # Basic macros and options usable on the commandline (see rules.vc for more info): -# OPTS=msvcrt,nothreads,pdbs,profile,static,staticpkg,symbols,thrdalloc,time64bit,unchecked,utfmax,none +# OPTS=msvcrt,noembed,nothreads,pdbs,profile,static,staticpkg,symbols,thrdalloc,time64bit,unchecked,utfmax,none # Sets special options for the core. The default is for none. # Any combination of the above may be used (comma separated). # 'none' will over-ride everything to nothing. # +# noembed = Without this option, the Tcl core library scripts +# are embedded into the executable if "static" is +# specified in OPTS, or into the DLL otherwise. If +# "noembed" is specified, the scripts are not embedded +# but copied to the installation target (as in 8.6). # msvcrt = Affects the static option only to switch it from # using libcmt(d) as the C runtime [by default] to # msvcrt(d). This is useful for static embedding # support. +# none = Overrides all other options to nothing. # nothreads = Turns off full multithreading support (default on). -# pbds = Produce separate debug symbol files. +# pdbs = Produce separate debug symbol files. # profile = Adds profiling hooks. Map file is assumed. # static = Builds a static library of the core instead of a # dll. The shell will be static (and large), as well. @@ -146,6 +151,15 @@ RCFILE = tcl.rc DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION) VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) + +!if [nmakehlp -f $(OPTS) "noembed"] +!message *** Option noembed specified. Tcl script library will not be appended to binary. +TCL_EMBED_SCRIPTS = 0 +!else +!message *** Tcl script library will be appended to binary. +TCL_EMBED_SCRIPTS = 1 +!endif + # We need versions of various core packages to generate appropriate # file names during installation. !if [echo REM = This file is generated from makefile.vc > versions.vc] @@ -180,16 +194,13 @@ VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) !include versions.vc -# Single file Tclsh -TCLSFE = $(OUT_DIR)\$(PROJECT)sfe$(VERSION)$(SUFX).exe - DDEDOTVERSION = 1.4 DDEVERSION = $(DDEDOTVERSION:.=) REGDOTVERSION = 1.3 REGVERSION = $(REGDOTVERSION:.=) -TCLREGLIBNAME = $(PROJECT)reg$(REGVERSION)$(SUFX:t=).$(EXT) +TCLREGLIBNAME = $(PROJECT)registry$(REGVERSION)$(SUFX:t=).$(EXT) TCLREGLIB = $(OUT_DIR)\$(TCLREGLIBNAME) TCLDDELIBNAME = $(PROJECT)dde$(DDEVERSION)$(SUFX:t=).$(EXT) @@ -436,6 +447,15 @@ TCLSTUBOBJS = \ TOMMATHDIR = $(ROOT)\libtommath PKGSDIR = $(ROOT)\pkgs +# TIP430 ZIP file +LIBTCLVFS = $(OUT_DIR)\libtcl.vfs +!if "$(TCL_PATCH_LETTER)" == "." +LIBTCLZIP = $(OUT_DIR)\libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_RELEASE_SERIAL).zip +!else +LIBTCLZIP = $(OUT_DIR)\libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip +!endif + + # Additional include and C macro definitions for the implicit rules # defined in rules.vc PRJ_INCLUDES = -I"$(TOMMATHDIR)" @@ -457,16 +477,19 @@ TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT) # Project specific targets #--------------------------------------------------------------------- -release: setup $(TCLSH) $(TCLSTUBLIB) dlls libtclzip pkgs +release: setup $(TCLSH) $(TCLSTUBLIB) dlls libtclzip embed pkgs core: setup $(TCLLIB) $(TCLSTUBLIB) shell: setup $(TCLSH) dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll $(OUT_DIR)\libtommath.dll -all: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs -!if $(STATIC_BUILD) && $(TCL_USE_STATIC_PACKAGES) -sfe: setup $(TCLSH) $(TCLSTUBLIB) libtclzip $(TCLSFE) +libtclzip: core dlls $(LIBTCLZIP) +all: setup $(TCLSH) $(TCLSTUBLIB) dlls libtclzip embed pkgs +embed: setup $(TCLSH) $(TCLSTUBLIB) libtclzip +!if $(TCL_EMBED_SCRIPTS) +!if $(STATIC_BUILD) + @copy /y /b "$(TCLSH)"+"$(LIBTCLZIP)" "$(TCLSH)" !else -sfe: - @echo Single file executables need static build of Tcl. Specify "static" and "staticpkg" in OPTS. + @copy /y /b "$(TCLLIB)"+"$(LIBTCLZIP)" "$(TCLLIB)" +!endif !endif tcltest: setup $(TCLTEST) dlls @@ -560,6 +583,21 @@ $(OUT_DIR)\tommath.lib: $(TOMMATHDIR)\win32\tommath.lib $(COPY) $(TOMMATHDIR)\win32\tommath.lib $(OUT_DIR)\tommath.lib !endif +$(LIBTCLZIP): .PHONY + @echo Building Tcl library zip file + @if exist "$(LIBTCLVFS)" $(RMDIR) "$(LIBTCLVFS)" + @$(MKDIR) "$(LIBTCLVFS)" + @$(CPYDIR) $(LIBDIR) "$(LIBTCLVFS)\tcl_library" + @move /y "$(LIBTCLVFS)\tcl_library\manifest.txt" "$(LIBTCLVFS)\tcl_library\pkgIndex.tcl" > NUL +!if ! $(TCL_USE_STATIC_PACKAGES) +# Remove the registry and dde directories as the DLLS are still external + @$(RMDIR) "$(LIBTCLVFS)\tcl_library\registry" + @$(RMDIR) "$(LIBTCLVFS)\tcl_library\dde" +!endif + @echo file delete -force {$@} > "$(OUT_DIR)\zipper.tcl" + @echo zipfs mkzip {$@} {$(LIBTCLVFS)} {$(LIBTCLVFS)} >> "$(OUT_DIR)\zipper.tcl" + @cd "$(OUT_DIR)" && $(TCLSH) zipper.tcl + pkgs: @for /d %d in ($(PKGSDIR)\*) do \ @@ -609,36 +647,6 @@ genstubs: !endif #--------------------------------------------------------------------- -# Build a single file executable version of Tcl -#--------------------------------------------------------------------- -LIBTCLVFS = $(OUT_DIR)\libtcl.vfs -!if "$(TCL_PATCH_LETTER)" == "." -LIBTCLZIP = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_RELEASE_SERIAL).zip -!else -LIBTCLZIP = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip -!endif - -libtclzip: $(OUT_DIR)\$(LIBTCLZIP) -$(OUT_DIR)\$(LIBTCLZIP): .PHONY - @echo Building Tcl library zip file - @if exist "$(LIBTCLVFS)" $(RMDIR) "$(LIBTCLVFS)" - @$(MKDIR) "$(LIBTCLVFS)" - @$(CPYDIR) $(LIBDIR) "$(LIBTCLVFS)\tcl_library" - @move /y "$(LIBTCLVFS)\tcl_library\manifest.txt" "$(LIBTCLVFS)\tcl_library\pkgIndex.tcl" - @echo file delete -force {$@} > "$(OUT_DIR)\zipper.tcl" - @echo zipfs mkzip {$@} {$(LIBTCLVFS)} {$(LIBTCLVFS)} >> "$(OUT_DIR)\zipper.tcl" - @cd "$(OUT_DIR)" && $(TCLSH) zipper.tcl - -!if $(STATIC_BUILD) && $(TCL_USE_STATIC_PACKAGES) -$(TCLSFE): $(OUT_DIR)\$(LIBTCLZIP) - @echo Building single-file exe from $(TCLSH) - @copy /y /b "$(TCLSH)"+"$(OUT_DIR)\$(LIBTCLZIP)" "$@" -!endif - -.PHONY: - - -#--------------------------------------------------------------------- # Build the Windows HTML help file. #--------------------------------------------------------------------- @@ -965,6 +973,7 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata @$(CPY) "$(GENERICDIR)\tclTomMath.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(GENERICDIR)\tclTomMathDecls.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(TOMMATHDIR)\tommath.h" "$(INCLUDE_INSTALL_DIR)\" +!if !$(TCL_EMBED_SCRIPTS) @echo Installing library files to $(SCRIPT_INSTALL_DIR) @$(CPY) "$(ROOT)\library\history.tcl" "$(SCRIPT_INSTALL_DIR)\" @$(CPY) "$(ROOT)\library\init.tcl" "$(SCRIPT_INSTALL_DIR)\" @@ -976,12 +985,15 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata @$(CPY) "$(ROOT)\library\package.tcl" "$(SCRIPT_INSTALL_DIR)\" @$(CPY) "$(ROOT)\library\word.tcl" "$(SCRIPT_INSTALL_DIR)\" @$(CPY) "$(ROOT)\library\auto.tcl" "$(SCRIPT_INSTALL_DIR)\" +!endif @$(CPY) "$(OUT_DIR)\tclConfig.sh" "$(LIB_INSTALL_DIR)\" @$(CPY) "$(WIN_DIR)\tclooConfig.sh" "$(LIB_INSTALL_DIR)\" + @$(CPY) "$(LIBTCLZIP)" "$(LIB_INSTALL_DIR)\" @$(CPY) "$(WIN_DIR)\rules.vc" "$(LIB_INSTALL_DIR)\nmake\" @$(CPY) "$(WIN_DIR)\targets.vc" "$(LIB_INSTALL_DIR)\nmake\" @$(CPY) "$(WIN_DIR)\nmakehlp.c" "$(LIB_INSTALL_DIR)\nmake\" @$(CPY) "$(OUT_DIR)\tcl.nmake" "$(LIB_INSTALL_DIR)\nmake\" +!if !$(TCL_EMBED_SCRIPTS) @echo Installing package cookiejar $(PKG_COOKIEJAR_VER) @$(CPY) "$(ROOT)\library\cookiejar\*.tcl" \ "$(SCRIPT_INSTALL_DIR)\cookiejar0.2\" @@ -1005,6 +1017,7 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata @echo Installing package platform::shell $(PKG_SHELL_VER) as a Tcl Module @$(COPY) "$(ROOT)\library\platform\shell.tcl" \ "$(MODULE_INSTALL_DIR)\8.4\platform\shell-$(PKG_SHELL_VER).tm" +!endif @echo Installing $(TCLDDELIBNAME) !if $(STATIC_BUILD) !if !$(TCL_USE_STATIC_PACKAGES) @@ -1025,22 +1038,28 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata @$(CPY) "$(ROOT)\library\registry\pkgIndex.tcl" \ "$(LIB_INSTALL_DIR)\registry$(REGDOTVERSION)\" !endif +!if !$(TCL_EMBED_SCRIPTS) @echo Installing encodings @$(CPY) "$(ROOT)\library\encoding\*.enc" \ "$(SCRIPT_INSTALL_DIR)\encoding\" +!endif # "emacs font-lock highlighting fix install-tzdata: +!if !$(TCL_EMBED_SCRIPTS) @echo Installing time zone data @set TCL_LIBRARY=$(ROOT:\=/)/library @$(TCLSH_NATIVE) "$(ROOT:\=/)/tools/installData.tcl" \ "$(ROOT:\=/)/library/tzdata" "$(SCRIPT_INSTALL_DIR)/tzdata" +!endif install-msgs: +!if !$(TCL_EMBED_SCRIPTS) @echo Installing message catalogs @set TCL_LIBRARY=$(ROOT:\=/)/library @$(TCLSH_NATIVE) "$(ROOT:\=/)/tools/installData.tcl" \ "$(ROOT:\=/)/library/msgs" "$(SCRIPT_INSTALL_DIR)/msgs" +!endif install-pdbs: @echo Installing debug symbols @@ -1070,6 +1089,7 @@ tidy: clean: default-clean clean-pkgs hose: default-hose realclean: hose +.PHONY: # Local Variables: # mode: makefile -- cgit v0.12 From 56dbbded838fc6f8e95af96bbbc20519e8a98089 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 8 Dec 2020 15:31:15 +0000 Subject: Add -finput-charset=UTF-8 and -fextended-identifiers to gcc (and clang). All C sources can now use UTF-8, as far as gcc/clang/msvc support it. Not used yet --- .github/workflows/linux-build.yml | 4 +++- .github/workflows/win-build.yml | 5 +++++ generic/regc_color.c | 2 +- generic/regc_cvec.c | 2 +- generic/regc_lex.c | 2 +- generic/regc_locale.c | 2 +- generic/regc_nfa.c | 2 +- generic/regcomp.c | 2 +- generic/rege_dfa.c | 2 +- generic/regerror.c | 2 +- generic/regexec.c | 2 +- generic/regfree.c | 2 +- generic/regfronts.c | 2 +- generic/tclAlloc.c | 6 +++--- generic/tclAssembly.c | 4 ++-- generic/tclAsync.c | 4 ++-- generic/tclBasic.c | 14 +++++++------- generic/tclBinary.c | 4 ++-- generic/tclCkalloc.c | 6 +++--- generic/tclClock.c | 6 +++--- generic/tclCmdAH.c | 4 ++-- generic/tclCmdIL.c | 12 ++++++------ generic/tclCmdMZ.c | 10 +++++----- generic/tclCompCmds.c | 8 ++++---- generic/tclCompCmdsGR.c | 8 ++++---- generic/tclCompCmdsSZ.c | 8 ++++---- generic/tclCompile.c | 4 ++-- generic/tclConfig.c | 2 +- generic/tclDictObj.c | 2 +- generic/tclDisassemble.c | 6 +++--- generic/tclEncoding.c | 2 +- generic/tclEnsemble.c | 2 +- generic/tclEnv.c | 4 ++-- generic/tclEvent.c | 6 +++--- generic/tclExecute.c | 14 +++++++------- generic/tclFCmd.c | 2 +- generic/tclFileName.c | 4 ++-- generic/tclGet.c | 4 ++-- generic/tclHash.c | 4 ++-- generic/tclHistory.c | 4 ++-- generic/tclIO.c | 4 ++-- generic/tclIOCmd.c | 2 +- generic/tclIOGT.c | 4 ++-- generic/tclIORChan.c | 2 +- generic/tclIORTrans.c | 2 +- generic/tclIOSock.c | 2 +- generic/tclIOUtil.c | 6 +++--- generic/tclIndexObj.c | 6 +++--- generic/tclInterp.c | 4 ++-- generic/tclLink.c | 8 ++++---- generic/tclListObj.c | 6 +++--- generic/tclLiteral.c | 4 ++-- generic/tclLoad.c | 2 +- generic/tclLoadNone.c | 2 +- generic/tclMain.c | 6 +++--- generic/tclNamesp.c | 10 +++++----- generic/tclNotify.c | 6 +++--- generic/tclOO.c | 4 ++-- generic/tclOOBasic.c | 2 +- generic/tclOOCall.c | 2 +- generic/tclOODefineCmds.c | 2 +- generic/tclOOInfo.c | 2 +- generic/tclOOMethod.c | 2 +- generic/tclObj.c | 10 +++++----- generic/tclOptimize.c | 2 +- generic/tclPanic.c | 6 +++--- generic/tclParse.c | 4 ++-- generic/tclPathObj.c | 2 +- generic/tclPipe.c | 2 +- generic/tclPkg.c | 4 ++-- generic/tclPkgConfig.c | 2 +- generic/tclPosixStr.c | 4 ++-- generic/tclPreserve.c | 4 ++-- generic/tclProc.c | 8 ++++---- generic/tclProcess.c | 2 +- generic/tclRegexp.c | 6 +++--- generic/tclResolve.c | 2 +- generic/tclResult.c | 2 +- generic/tclScan.c | 2 +- generic/tclStrToD.c | 2 +- generic/tclStringObj.c | 4 ++-- generic/tclStubInit.c | 2 +- generic/tclStubLib.c | 4 ++-- generic/tclTest.c | 8 ++++---- generic/tclTestObj.c | 6 +++--- generic/tclTestProcBodyObj.c | 2 +- generic/tclThread.c | 4 ++-- generic/tclThreadAlloc.c | 2 +- generic/tclThreadJoin.c | 2 +- generic/tclThreadStorage.c | 4 ++-- generic/tclThreadTest.c | 4 ++-- generic/tclTimer.c | 2 +- generic/tclTomMathInterface.c | 2 +- generic/tclTomMathStubLib.c | 4 ++-- generic/tclTrace.c | 8 ++++---- generic/tclUniData.c | 2 +- generic/tclUtf.c | 2 +- generic/tclUtil.c | 6 +++--- generic/tclVar.c | 10 +++++----- generic/tclZipfs.c | 4 ++-- generic/tclZlib.c | 6 +++--- macosx/tclMacOSXBundle.c | 4 ++-- macosx/tclMacOSXFCmd.c | 2 +- macosx/tclMacOSXNotify.c | 6 +++--- unix/configure | 4 ++-- unix/dltest/pkga.c | 2 +- unix/dltest/pkgb.c | 2 +- unix/dltest/pkgc.c | 2 +- unix/dltest/pkgd.c | 2 +- unix/dltest/pkge.c | 2 +- unix/dltest/pkgooa.c | 2 +- unix/dltest/pkgua.c | 4 ++-- unix/tcl.m4 | 4 ++-- unix/tclEpollNotfy.c | 4 ++-- unix/tclKqueueNotfy.c | 4 ++-- unix/tclLoadAix.c | 4 ++-- unix/tclLoadDl.c | 2 +- unix/tclLoadDyld.c | 4 ++-- unix/tclLoadNext.c | 2 +- unix/tclLoadOSF.c | 2 +- unix/tclLoadShl.c | 2 +- unix/tclSelectNotfy.c | 2 +- unix/tclUnixChan.c | 4 ++-- unix/tclUnixEvent.c | 2 +- unix/tclUnixFCmd.c | 4 ++-- unix/tclUnixFile.c | 2 +- unix/tclUnixInit.c | 4 ++-- unix/tclUnixNotfy.c | 4 ++-- unix/tclUnixPipe.c | 4 ++-- unix/tclUnixSock.c | 2 +- unix/tclUnixTest.c | 4 ++-- unix/tclUnixThrd.c | 6 +++--- unix/tclUnixTime.c | 2 +- unix/tclXtNotify.c | 2 +- unix/tclXtTest.c | 2 +- win/configure | 4 ++-- win/tcl.m4 | 4 ++-- win/tclWin32Dll.c | 4 ++-- win/tclWinChan.c | 2 +- win/tclWinConsole.c | 2 +- win/tclWinError.c | 2 +- win/tclWinFCmd.c | 2 +- win/tclWinFile.c | 2 +- win/tclWinInit.c | 4 ++-- win/tclWinLoad.c | 2 +- win/tclWinNotify.c | 2 +- win/tclWinPanic.c | 2 +- win/tclWinPipe.c | 2 +- win/tclWinSerial.c | 2 +- win/tclWinSock.c | 2 +- win/tclWinTest.c | 2 +- win/tclWinThrd.c | 6 +++--- win/tclWinTime.c | 2 +- 153 files changed, 293 insertions(+), 286 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index e6095f9..e7a9849 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -7,10 +7,12 @@ jobs: matrix: cfgopt: - "" + - "CFLAGS=-DTCL_UTF_MAX=4" + - "CFLAGS=-DTCL_NO_DEPRECATED=1" - "--disable-shared" - "--enable-symbols" - "--enable-symbols=mem" - - "CFLAGS=-DTCL_UTF_MAX=4" + - "CC=g++" defaults: run: shell: bash diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 0c0e597..36cdf69 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -11,6 +11,8 @@ jobs: matrix: cfgopt: - "" + - "OPTS=utfmax" + - "OPTS=nodep" - "OPTS=static,staticpkg,msvcrt" - "OPTS=symbols" - "OPTS=memdbg" @@ -51,9 +53,12 @@ jobs: matrix: cfgopt: - "" + - "CFLAGS=-DTCL_UTF_MAX=4" + - "CFLAGS=-DTCL_NO_DEPRECATED=1" - "--disable-shared" - "--enable-symbols" - "--enable-symbols=mem" + - "CC=g++" # Using powershell means we need to explicitly stop on failure steps: - name: Checkout 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 a303ec6..2914cbb 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 diff --git a/generic/regc_locale.c b/generic/regc_locale.c index c90dd64..2aea16d 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 3be5172..471d13b 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 500dfe2..6606d41 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 e7260cd..c085ac6 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/tclAlloc.c b/generic/tclAlloc.c index 4a84255..81cd646 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. * diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 605758b..a20cd1a 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. diff --git a/generic/tclAsync.c b/generic/tclAsync.c index c432e4f..3a09304 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 ea17ee8..2ed4270 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 - * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved. - * Copyright (c) 2008 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, 2002 Kevin B. Kenny. All rights reserved. + * Copyright © 2007 Daniel A. Steffen + * Copyright © 2006-2008 Joe Mistachkin. All rights reserved. + * 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. diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 8a3541b..1b36244 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. diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index f761521..6cf3c4c 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 e5608b9..eb52244 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 (c) 1991-1995 Karl Lehenbauer & 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 7973154..c09ad95 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. diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index da8dc65..beb55c0 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. diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index f3111be..3906810 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. diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index beee208..13589b2 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. diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c index cebd8f5..da557a4 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. diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index 26698a8..0bac52b 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. diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 2ab92da..6ffb3dd 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. diff --git a/generic/tclConfig.c b/generic/tclConfig.c index 3bdcd38..540187f 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 + * Copyright © 2002 Andreas Kupries * * 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/tclDictObj.c b/generic/tclDictObj.c index 9c11df6..a0ce8a4 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. diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c index 8ccc303..f5cc8b7 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. diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index ff3c44c..c4ef159 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. diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 23516f8..929f3ef 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. diff --git a/generic/tclEnv.c b/generic/tclEnv.c index 96d050d..ad55645 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 76a45ae..bf3be38 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 63dd8e6..d5f843b 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 - * 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 + * 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. diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index f9636d8..5e39fc2 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. diff --git a/generic/tclFileName.c b/generic/tclFileName.c index c3f3bf0..8cbd298 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. diff --git a/generic/tclGet.c b/generic/tclGet.c index 12e0e79..3dbc545 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/tclHash.c b/generic/tclHash.c index 584b5e1..df1036b 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 3a52a20..02e15a0 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 1547489..2afd2cf 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 diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index e28f9de..2ab31e4 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. diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c index 353998f..95a8e0e 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. diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index e50c96f..888d946 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. diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 3c5f133..29c5158 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. diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c index adf729a..87a79db 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 322941a..191837e 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. diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 6ae2075..f08278b 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. diff --git a/generic/tclInterp.c b/generic/tclInterp.c index f724175..a263a66 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. diff --git a/generic/tclLink.c b/generic/tclLink.c index 13bf6c4..02b19aa 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. diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 332e6aa..0cc1c11 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. diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index 22eff3c..fe1b00d 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. diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 13fea29..8b8aa2b 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. diff --git a/generic/tclLoadNone.c b/generic/tclLoadNone.c index e9f79e2..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. diff --git a/generic/tclMain.c b/generic/tclMain.c index cc9a829..13231b5 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. diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index e493db1..f57b7e1 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 diff --git a/generic/tclNotify.c b/generic/tclNotify.c index 65b4197..b43413d 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 e958279..405d5d0 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. diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 19f68fc..6ea4681 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. diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index 9191989..b7df93e 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 e1d88ec..8cf3eb3 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. diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index c9e136c..4e5b55b 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 f65462e..f111461 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. diff --git a/generic/tclObj.c b/generic/tclObj.c index 6e17141..e8134df 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 + * 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 * * 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/tclOptimize.c b/generic/tclOptimize.c index 4383c62..de28b0c 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. diff --git a/generic/tclPanic.c b/generic/tclPanic.c index da5c134..394661f 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 b863ff2..df6c9bf 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 diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 8b1f199..e4826ad 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. diff --git a/generic/tclPipe.c b/generic/tclPipe.c index e9ad4e6..699d559 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 89fb0c4..c3f2f17 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 + * Copyright © 1996 Sun Microsystems, Inc. + * Copyright © 2006 Andreas Kupries * * 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/tclPkgConfig.c b/generic/tclPkgConfig.c index 12df68e..c8f0357 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 + * Copyright © 2002 Andreas Kupries * * 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/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 d60ebec..b32dd63 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 20af5fe..b3de29a 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 + * 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 * * 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/tclProcess.c b/generic/tclProcess.c index 7bd5e1a..fcb7bfd 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 99135d3..f161782 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 diff --git a/generic/tclResolve.c b/generic/tclResolve.c index ca53014..ff88ffd 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 1fb2ad0..ba42e46 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. diff --git a/generic/tclScan.c b/generic/tclScan.c index 67fe6f3..f35b376 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 35850d2..2f870c6 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. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 03aceaf..ecb8f53 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. diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 0204bca..4b0e968 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. diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 4f7240d..46d2f90 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. diff --git a/generic/tclTest.c b/generic/tclTest.c index 03f8842..45b5ca3 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. diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index bd5d92e..f7ad7b3 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. diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index 437644e..38cfaaa 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. diff --git a/generic/tclThread.c b/generic/tclThread.c index 76aaf4b..0e6e874 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 eb8a35d..ad508b9 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 0aff0a7..ba789d3 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 74c23af..b2de9b4 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 0bb55e1..c484fb6 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. diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 6b94cbb..bd9e321 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. 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 d189581..acb0fa4 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. 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 525cd50..5db7343 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. diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 170a85e..1288738 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. diff --git a/generic/tclVar.c b/generic/tclVar.c index 0f0bc25..51c51f8 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. diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index ceb0833..e84b490 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 - * Copyright (c) 2013-2015 Christian Werner + * Copyright © 2016-2017 Sean Woods + * Copyright © 2013-2015 Christian Werner * * 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/tclZlib.c b/generic/tclZlib.c index 05f13b5..fc3be60 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 - * Copyright (C) 2005 Unitas Software B.V. - * Copyright (c) 2008-2012 Donal K. Fellows + * Copyright © 2004-2005 Pascal Scheffers + * 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. diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index af15287..6707ef0 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 + * Copyright © 2001-2009 Apple Inc. + * Copyright © 2003-2009 Daniel A. Steffen * * 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 52c43e7..a70a789 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 + * Copyright © 2003-2007 Daniel A. Steffen * * 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/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index ee271e1..3bf5e08 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 + * Copyright © 1995-1997 Sun Microsystems, Inc. + * Copyright © 2001-2009, Apple Inc. + * Copyright © 2005-2009 Daniel A. Steffen * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/unix/configure b/unix/configure index 473ac13..e2f45b1 100755 --- a/unix/configure +++ b/unix/configure @@ -5027,12 +5027,12 @@ fi if test "$GCC" = yes; then : CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" case "${CC}" in *++|*++-*) ;; *) - CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -Wdeclaration-after-statement" + CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement" ;; esac diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c index c2d814f..e00f996 100644 --- a/unix/dltest/pkga.c +++ b/unix/dltest/pkga.c @@ -4,7 +4,7 @@ * This file contains a simple Tcl package "pkga" that is intended for * testing the Tcl dynamic loading facilities. * - * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright © 1995 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/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 741b2a1..3210669 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -5,7 +5,7 @@ * testing the Tcl dynamic loading facilities. It can be used in both * safe and unsafe interpreters. * - * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright © 1995 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/unix/dltest/pkgc.c b/unix/dltest/pkgc.c index 46f6e86..2b46986 100644 --- a/unix/dltest/pkgc.c +++ b/unix/dltest/pkgc.c @@ -5,7 +5,7 @@ * testing the Tcl dynamic loading facilities. It can be used in both * safe and unsafe interpreters. * - * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright © 1995 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/unix/dltest/pkgd.c b/unix/dltest/pkgd.c index d3af83f..5c799f5 100644 --- a/unix/dltest/pkgd.c +++ b/unix/dltest/pkgd.c @@ -5,7 +5,7 @@ * testing the Tcl dynamic loading facilities. It can be used in both * safe and unsafe interpreters. * - * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright © 1995 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/unix/dltest/pkge.c b/unix/dltest/pkge.c index f46ca74..26a4b79 100644 --- a/unix/dltest/pkge.c +++ b/unix/dltest/pkge.c @@ -5,7 +5,7 @@ * testing the Tcl dynamic loading facilities. Its Init procedure returns * an error in order to test how this is handled. * - * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright © 1995 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/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c index 7d0c98b..ff1cf1f 100644 --- a/unix/dltest/pkgooa.c +++ b/unix/dltest/pkgooa.c @@ -4,7 +4,7 @@ * This file contains a simple Tcl package "pkgooa" that is intended for * testing the Tcl dynamic loading facilities. * - * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright © 1995 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/unix/dltest/pkgua.c b/unix/dltest/pkgua.c index c5102a8..0ab3e23 100644 --- a/unix/dltest/pkgua.c +++ b/unix/dltest/pkgua.c @@ -4,8 +4,8 @@ * This file contains a simple Tcl package "pkgua" that is intended for * testing the Tcl dynamic unloading facilities. * - * Copyright (c) 1995 Sun Microsystems, Inc. - * Copyright (c) 2004 Georgios Petasis + * Copyright © 1995 Sun Microsystems, Inc. + * Copyright © 2004 Georgios Petasis * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/unix/tcl.m4 b/unix/tcl.m4 index c9d9e3a..01ccead 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -958,12 +958,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g AS_IF([test "$GCC" = yes], [ CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" case "${CC}" in *++|*++-*) ;; *) - CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -Wdeclaration-after-statement" + CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement" ;; esac diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c index 406b7ca..3a99e6d 100644 --- a/unix/tclEpollNotfy.c +++ b/unix/tclEpollNotfy.c @@ -5,8 +5,8 @@ * Linux-specific 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 (c) 2016 Lucio Andrés Illanes Albornoz + * Copyright © 1995-1997 Sun Microsystems, Inc. + * Copyright © 2016 Lucio Andrés Illanes Albornoz * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/unix/tclKqueueNotfy.c b/unix/tclKqueueNotfy.c index 4daab7c..2f1d8e6 100644 --- a/unix/tclKqueueNotfy.c +++ b/unix/tclKqueueNotfy.c @@ -6,8 +6,8 @@ * level part of the Tcl event loop. This file works together with * generic/tclNotify.c. * - * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * Copyright (c) 2016 Lucio Andrés Illanes Albornoz + * Copyright © 1995-1997 Sun Microsystems, Inc. + * Copyright © 2016 Lucio Andrés Illanes Albornoz * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/unix/tclLoadAix.c b/unix/tclLoadAix.c index fea9494..17fca04 100644 --- a/unix/tclLoadAix.c +++ b/unix/tclLoadAix.c @@ -9,7 +9,7 @@ * different from the notice used elsewhere in Tcl. The file has been * modified to incorporate the file dlfcn.h in-line. * - * Copyright (c) 1992,1993,1995,1996, Jens-Uwe Mager, Helios Software GmbH + * Copyright © 1992,1993,1995,1996, Jens-Uwe Mager, Helios Software GmbH * Not derived from licensed software. * * Permission is granted to freely use, copy, modify, and redistribute @@ -23,7 +23,7 @@ /* * @(#)dlfcn.c 1.7 revision of 95/08/14 19:08:38 - * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH + * This is an unpublished work copyright © 1992 HELIOS Software GmbH * 30159 Hannover, Germany */ diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 2a09037..342dff6 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -4,7 +4,7 @@ * This procedure provides a version of the TclLoadFile that works with * the "dlopen" and "dlsym" library procedures for dynamic loading. * - * 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/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index de738e9..017793d 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -6,8 +6,8 @@ * Original version of his file (superseded long ago) provided by * Wilfredo Sanchez (wsanchez@apple.com). * - * Copyright (c) 1995 Apple Computer, Inc. - * Copyright (c) 2001-2007 Daniel A. Steffen + * Copyright © 1995 Apple Computer, Inc. + * Copyright © 2001-2007 Daniel A. Steffen * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/unix/tclLoadNext.c b/unix/tclLoadNext.c index 3f59998..ee39326 100644 --- a/unix/tclLoadNext.c +++ b/unix/tclLoadNext.c @@ -4,7 +4,7 @@ * This procedure provides a version of the TclLoadFile that works with * NeXTs rld_* dynamic loading. This file provided by Pedja Bogdanovich. * - * 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/unix/tclLoadOSF.c b/unix/tclLoadOSF.c index b8423dd..7fd0cf3 100644 --- a/unix/tclLoadOSF.c +++ b/unix/tclLoadOSF.c @@ -26,7 +26,7 @@ * * John Robert LoVerso * - * 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/unix/tclLoadShl.c b/unix/tclLoadShl.c index 876896a..11eaa83 100644 --- a/unix/tclLoadShl.c +++ b/unix/tclLoadShl.c @@ -5,7 +5,7 @@ * the "shl_load" and "shl_findsym" library procedures for dynamic * loading (e.g. for HP machines). * - * 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/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c index 5f30857..1d16114 100644 --- a/unix/tclSelectNotfy.c +++ b/unix/tclSelectNotfy.c @@ -5,7 +5,7 @@ * Unix 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 © 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/unix/tclUnixChan.c b/unix/tclUnixChan.c index 9273b8e..71ff61d 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -4,8 +4,8 @@ * Common channel driver for Unix channels based on files, command pipes * and TCP sockets. * - * 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. diff --git a/unix/tclUnixEvent.c b/unix/tclUnixEvent.c index 40aac6f..aff7797 100644 --- a/unix/tclUnixEvent.c +++ b/unix/tclUnixEvent.c @@ -3,7 +3,7 @@ * * This file implements Unix specific event related routines. * - * 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/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index eee47d7..4d08c1d 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -5,7 +5,7 @@ * subcommands of the "file" command. All filename arguments should * already be translated to native format. * - * 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. @@ -13,7 +13,7 @@ * Portions of this code were derived from NetBSD source code which has the * following copyright notice: * - * Copyright (c) 1988, 1993, 1994 + * Copyright © 1988, 1993, 1994 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index fdf7904..203a118 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -4,7 +4,7 @@ * This file contains wrappers around UNIX file handling functions. * These wrappers mask differences between Windows and UNIX. * - * Copyright (c) 1995-1998 Sun Microsystems, Inc. + * Copyright © 1995-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/unix/tclUnixInit.c b/unix/tclUnixInit.c index 12cbd2c..704224f 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -3,8 +3,8 @@ * * Contains the Unix-specific interpreter initialization functions. * - * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * Copyright (c) 1999 by Scriptics Corporation. + * Copyright © 1995-1997 Sun Microsystems, Inc. + * Copyright © 1999 Scriptics Corporation. * All rights reserved. */ diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index 6b1ec3d..d992d65 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -4,8 +4,8 @@ * This file contains subroutines shared by all notifier backend * implementations on *nix platforms. * - * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * Copyright (c) 2016 Lucio Andrés Illanes Albornoz + * Copyright © 1995-1997 Sun Microsystems, Inc. + * Copyright © 2016 Lucio Andrés Illanes Albornoz * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 5d02486..e7199bc 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -4,8 +4,8 @@ * This file implements the UNIX-specific exec pipeline functions, the * "pipe" channel driver, and the "pid" Tcl command. * - * Copyright (c) 1991-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1991-1994 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/unix/tclUnixSock.c b/unix/tclUnixSock.c index 8c9386c..076678c 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -3,7 +3,7 @@ * * This file contains Unix-specific socket related code. * - * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright © 1995 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/unix/tclUnixTest.c b/unix/tclUnixTest.c index b06abdf0..80e8081 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -3,8 +3,8 @@ * * Contains platform specific test commands for the Unix platform. * - * Copyright (c) 1996-1997 Sun Microsystems, Inc. - * Copyright (c) 1998 by Scriptics Corporation. + * Copyright © 1996-1997 Sun Microsystems, Inc. + * 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/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 92399f4..8a16d0b 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -3,9 +3,9 @@ * * This file implements the UNIX-specific thread support. * - * Copyright (c) 1991-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 2008 by George Peter Staplin + * Copyright © 1991-1994 The Regents of the University of California. + * Copyright © 1994-1997 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/unix/tclUnixTime.c b/unix/tclUnixTime.c index 07b3065..ead7b0c 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -4,7 +4,7 @@ * Contains Unix specific versions of Tcl functions that obtain time * values from the operating system. * - * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright © 1995 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/unix/tclXtNotify.c b/unix/tclXtNotify.c index cf99fb2..68ee578 100644 --- a/unix/tclXtNotify.c +++ b/unix/tclXtNotify.c @@ -4,7 +4,7 @@ * This file contains the notifier driver implementation for the Xt * intrinsics. * - * 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/unix/tclXtTest.c b/unix/tclXtTest.c index 6c09a50..afac493 100644 --- a/unix/tclXtTest.c +++ b/unix/tclXtTest.c @@ -3,7 +3,7 @@ * * Contains commands for Xt notifier specific tests on Unix. * - * 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/win/configure b/win/configure index 89bec9f..8830ea8 100755 --- a/win/configure +++ b/win/configure @@ -4207,7 +4207,7 @@ $as_echo "using shared flags" >&6; } CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= @@ -4216,7 +4216,7 @@ $as_echo "using shared flags" >&6; } CFLAGS_WARNING="${CFLAGS_WARNING} -Wno-format" ;; *) - CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -Wdeclaration-after-statement" + CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement" ;; esac diff --git a/win/tcl.m4 b/win/tcl.m4 index fa21b2d..ec1442b 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -665,7 +665,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= @@ -674,7 +674,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_WARNING="${CFLAGS_WARNING} -Wno-format" ;; *) - CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -Wdeclaration-after-statement" + CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement" ;; esac diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index f667b05..cb9f8c8 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -4,8 +4,8 @@ * This file contains the DLL entry point and other low-level bit bashing * code that needs inline assembly. * - * Copyright (c) 1995-1996 Sun Microsystems, Inc. - * Copyright (c) 1998-2000 Scriptics Corporation. + * Copyright © 1995-1996 Sun Microsystems, Inc. + * Copyright © 1998-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/win/tclWinChan.c b/win/tclWinChan.c index 544c000..03671f9 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -4,7 +4,7 @@ * Channel drivers for Windows channels based on files, command pipes and * TCP sockets. * - * 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/win/tclWinConsole.c b/win/tclWinConsole.c index 3b8753b..0556646 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -4,7 +4,7 @@ * This file implements the Windows-specific console functions, and the * "console" channel driver. * - * Copyright (c) 1999 by Scriptics Corp. + * Copyright © 1999 Scriptics Corp. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/win/tclWinError.c b/win/tclWinError.c index 7b885df..e85becc 100644 --- a/win/tclWinError.c +++ b/win/tclWinError.c @@ -4,7 +4,7 @@ * This file contains code for converting from Win32 errors to errno * errors. * - * Copyright (c) 1995-1996 by Sun Microsystems, Inc. + * Copyright © 1995-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/win/tclWinFCmd.c b/win/tclWinFCmd.c index ad4bae1..c88621c 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -4,7 +4,7 @@ * This file implements the Windows specific 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. diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 89f485a..b1727af 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -6,7 +6,7 @@ * files, which can be manipulated through the Win32 console redirection * interfaces. * - * Copyright (c) 1995-1998 Sun Microsystems, Inc. + * Copyright © 1995-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/win/tclWinInit.c b/win/tclWinInit.c index 5c3901b..29393ce 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -3,8 +3,8 @@ * * Contains the Windows-specific interpreter initialization functions. * - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 1998-1999 Scriptics Corporation. * All rights reserved. * * See the file "license.terms" for information on usage and redistribution of diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index caaca42..656148a 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -5,7 +5,7 @@ * the Windows "LoadLibrary" and "GetProcAddress" API for dynamic * loading. * - * 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/win/tclWinNotify.c b/win/tclWinNotify.c index 7d5249d..fff7910 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -5,7 +5,7 @@ * 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 © 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/win/tclWinPanic.c b/win/tclWinPanic.c index fbd3e46..364673e 100644 --- a/win/tclWinPanic.c +++ b/win/tclWinPanic.c @@ -3,7 +3,7 @@ * * Contains the Windows-specific command-line panic proc. * - * Copyright (c) 2013 by Jan Nijtmans. + * Copyright © 2013 Jan Nijtmans. * All rights reserved. * * See the file "license.terms" for information on usage and redistribution of diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index a93688d..6a9d9a9 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -4,7 +4,7 @@ * This file implements the Windows-specific exec pipeline functions, the * "pipe" channel driver, and the "pid" Tcl command. * - * Copyright (c) 1996-1997 by 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. diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index f0035b9..32f4c31 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -4,7 +4,7 @@ * This file implements the Windows-specific serial port functions, and * the "serial" channel driver. * - * Copyright (c) 1999 by Scriptics Corp. + * Copyright © 1999 Scriptics Corp. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 48b3cee..a31e1a2 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -3,7 +3,7 @@ * * This file contains Windows-specific socket related code. * - * 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/win/tclWinTest.c b/win/tclWinTest.c index 91a3010..e924b1a 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -3,7 +3,7 @@ * * Contains commands for platform specific tests on Windows. * - * Copyright (c) 1996 Sun Microsystems, Inc. + * Copyright © 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/win/tclWinThrd.c b/win/tclWinThrd.c index abd4f84..1095a6c 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -3,9 +3,9 @@ * * This file implements the Windows-specific thread operations. * - * Copyright (c) 1998 by Sun Microsystems, Inc. - * Copyright (c) 1999 by Scriptics Corporation - * Copyright (c) 2008 by George Peter Staplin + * Copyright © 1998 Sun Microsystems, Inc. + * Copyright © 1999 Scriptics Corporation + * 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/win/tclWinTime.c b/win/tclWinTime.c index ef2b9d2..b18c83f 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -4,7 +4,7 @@ * Contains Windows specific versions of Tcl functions that obtain time * values from the operating system. * - * Copyright 1995-1998 by Sun Microsystems, Inc. + * Copyright © 1995-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. -- cgit v0.12 From 9f88ecdd970f8304aa68a8ff7662ce0bf167dfed Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Wed, 9 Dec 2020 04:31:07 +0000 Subject: nmake: subsume staticpkg option within static builds --- win/makefile.vc | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index bb41f1c..03a7ead 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -151,12 +151,24 @@ RCFILE = tcl.rc DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION) VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) +# The staticpkg option is not longer supported in Tcl 8.7 +# though extensions may still be using it. If specified together +# with "static", ignore it as that is now the default for +# static build. For non-static builds, no longer supported +# now (was permitted in 8.6) +!if $(TCL_USE_STATIC_PACKAGES) +!if $(STATIC_BUILD) +!message *** NOTE: The "staticpkg" option redundant in 8.7. +!else +!message *** NOTE: The "staticpkg" option ignored for shared library builds. +!endif +!endif !if [nmakehlp -f $(OPTS) "noembed"] -!message *** Option noembed specified. Tcl script library will not be appended to binary. +!message *** Option noembed specified. Tcl script library will not be appended to the binary. TCL_EMBED_SCRIPTS = 0 !else -!message *** Tcl script library will be appended to binary. +!message *** Tcl script library will be appended to the binary. TCL_EMBED_SCRIPTS = 1 !endif @@ -210,12 +222,6 @@ TCLTEST = $(OUT_DIR)\$(PROJECT)test.exe TCLSHOBJS = \ $(TMP_DIR)\tclAppInit.obj \ -!if !$(STATIC_BUILD) -!if $(TCL_USE_STATIC_PACKAGES) - $(TMP_DIR)\tclWinReg.obj \ - $(TMP_DIR)\tclWinDde.obj \ -!endif -!endif $(TMP_DIR)\tclsh.res TCLTESTOBJS = \ @@ -225,10 +231,6 @@ TCLTESTOBJS = \ $(TMP_DIR)\tclThreadTest.obj \ $(TMP_DIR)\tclWinTest.obj \ !if !$(STATIC_BUILD) -!if $(TCL_USE_STATIC_PACKAGES) - $(TMP_DIR)\tclWinReg.obj \ - $(TMP_DIR)\tclWinDde.obj \ -!endif $(OUT_DIR)\tommath.lib \ !endif $(TMP_DIR)\testMain.obj @@ -589,7 +591,7 @@ $(LIBTCLZIP): .PHONY @$(MKDIR) "$(LIBTCLVFS)" @$(CPYDIR) $(LIBDIR) "$(LIBTCLVFS)\tcl_library" @move /y "$(LIBTCLVFS)\tcl_library\manifest.txt" "$(LIBTCLVFS)\tcl_library\pkgIndex.tcl" > NUL -!if ! $(TCL_USE_STATIC_PACKAGES) +!if ! $(STATIC_BUILD) # Remove the registry and dde directories as the DLLS are still external @$(RMDIR) "$(LIBTCLVFS)\tcl_library\registry" @$(RMDIR) "$(LIBTCLVFS)\tcl_library\dde" @@ -794,7 +796,6 @@ gendate: $(TMP_DIR)\testMain.obj: $(WIN_DIR)\tclAppInit.c $(cc32) $(appcflags) /DTCL_TEST /DUNICODE /D_UNICODE \ - /DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \ -Fo$@ $? $(TMP_DIR)\tclMainW.obj: $(GENERICDIR)\tclMain.c @@ -834,7 +835,6 @@ $(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c $(TMP_DIR)\tclAppInit.obj: $(WIN_DIR)\tclAppInit.c $(cc32) $(appcflags) /DUNICODE /D_UNICODE \ - /DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \ -Fo$@ $? ### The following objects should be built using the stub interfaces @@ -1019,21 +1019,13 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata "$(MODULE_INSTALL_DIR)\8.4\platform\shell-$(PKG_SHELL_VER).tm" !endif @echo Installing $(TCLDDELIBNAME) -!if $(STATIC_BUILD) -!if !$(TCL_USE_STATIC_PACKAGES) - @$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\" -!endif -!else +!if !$(STATIC_BUILD) @$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\dde$(DDEDOTVERSION)\" @$(CPY) "$(ROOT)\library\dde\pkgIndex.tcl" \ "$(LIB_INSTALL_DIR)\dde$(DDEDOTVERSION)\" !endif @echo Installing $(TCLREGLIBNAME) -!if $(STATIC_BUILD) -!if !$(TCL_USE_STATIC_PACKAGES) - @$(CPY) "$(TCLREGLIB)" "$(LIB_INSTALL_DIR)\" -!endif -!else +!if !$(STATIC_BUILD) @$(CPY) "$(TCLREGLIB)" "$(LIB_INSTALL_DIR)\registry$(REGDOTVERSION)\" @$(CPY) "$(ROOT)\library\registry\pkgIndex.tcl" \ "$(LIB_INSTALL_DIR)\registry$(REGDOTVERSION)\" -- cgit v0.12 From 3fbbf14bf2dd4f6187f68bf7990c71f266f489f3 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Wed, 9 Dec 2020 06:17:50 +0000 Subject: nmake: make zipfs mount point consistent with Unix/autoconf --- win/makefile.vc | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 03a7ead..a813f38 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -811,12 +811,38 @@ $(TMP_DIR)\tclTestObj.obj: $(GENERICDIR)\tclTestObj.c $(TMP_DIR)\tclWinTest.obj: $(WIN_DIR)\tclWinTest.c $(CCAPPCMD) $? +# Following the lead of the autoconf based make, we define the +# CFG_RUNTIME_DLLFILE flag specifically for tclZipfs and tclPkgConfig +# and not as part of the global defines. Moreover, for tclZipfs, +# we define only CFG_RUNTIME_DLLFILE to force use of //zipfs: +# as the zip fs root. However it is defined as empty. See tclPkgConfig.obj +# comments as to why. +# We do not define other CFG_RUNTIME_ZIPFILE at all because +# that causes the zipfs code to go looking at directories that existed +# on the *build* system as opposed to the target runtime system. This +# is the case even if the value is defined as an empty string. $(TMP_DIR)\tclZipfs.obj: $(GENERICDIR)\tclZipfs.c - $(cc32) $(pkgcflags) -I$(COMPATDIR)\zlib -I$(COMPATDIR)\zlib\contrib\minizip -Fo$@ $? + $(cc32) $(pkgcflags) \ + -DCFG_RUNTIME_DLLFILE="\"\"" \ + -I$(COMPATDIR)\zlib -I$(COMPATDIR)\zlib\contrib\minizip \ + -Fo$@ $? $(TMP_DIR)\tclZlib.obj: $(GENERICDIR)\tclZlib.c $(cc32) $(pkgcflags) -I$(COMPATDIR)\zlib -Fo$@ $? +# Following the lead of the autoconf based make, we define the +# CFG_RUNTIME_DLLFILE and CFG_RUNTIME_ZIPFILE flags specifically for tclPkgConfig +# and not as part of the global defines. These are all defined +# as empty strings because they are intended to represent paths +# at *runtime*, not build time. This may make sense on Unix systems +# where end-user does configure and make on the target system. It +# makes no sense on Windows where binary distributions may be installed +# anywhere. Storing build time paths as runtime paths is misleading +# at best and inefficient at worst as the code goes looking for +# files and directories that do not exist. +# Note: the same is true for the other CFG_RUNTIME* and CFG_INSTALL* +# settings as well but they are historical and I do not want to change +# them. $(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c $(cc32) $(pkgcflags) \ /DCFG_INSTALL_LIBDIR="\"$(LIB_INSTALL_DIR:\=\\)\"" \ @@ -829,8 +855,8 @@ $(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c /DCFG_RUNTIME_SCRDIR="\"$(SCRIPT_INSTALL_DIR:\=\\)\"" \ /DCFG_RUNTIME_INCDIR="\"$(INCLUDE_INSTALL_DIR:\=\\)\"" \ /DCFG_RUNTIME_DOCDIR="\"$(DOC_INSTALL_DIR:\=\\)\"" \ - /DCFG_RUNTIME_DLLFILE="\"$(CFG_RUNTIME_DLLFILE:\=\\)\"" \ - /DCFG_RUNTIME_ZIPFILE="\"$(CFG_RUNTIME_ZIPFILE:\=\\)\"" \ + /DCFG_RUNTIME_DLLFILE="\"\"" \ + /DCFG_RUNTIME_ZIPFILE="\"\"" \ -Fo$@ $? $(TMP_DIR)\tclAppInit.obj: $(WIN_DIR)\tclAppInit.c -- cgit v0.12 From f67b351466fbc8af63d45a45e05338d6e0b94858 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 9 Dec 2020 09:17:19 +0000 Subject: nmake: OPTS=msvcrt is now the default, even for static builds. Use OPTS=nomsvcrt if you don't want that. Add more comments in win/*.vc files, describing what's going on.^C --- .github/workflows/win-build.yml | 4 ++-- .travis.yml | 16 ++++++++-------- win/buildall.vc.bat | 4 ++-- win/makefile.vc | 23 ++++++++++------------- win/rules.vc | 7 ++++--- win/tcl.dsp | 8 ++++---- 6 files changed, 30 insertions(+), 32 deletions(-) diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 36cdf69..c5b2147 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -12,8 +12,8 @@ jobs: cfgopt: - "" - "OPTS=utfmax" - - "OPTS=nodep" - - "OPTS=static,staticpkg,msvcrt" + - "CHECKS=nodep" + - "OPTS=static" - "OPTS=symbols" - "OPTS=memdbg" # Using powershell means we need to explicitly stop on failure diff --git a/.travis.yml b/.travis.yml index f166e82..c06b489 100644 --- a/.travis.yml +++ b/.travis.yml @@ -248,8 +248,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 @@ -257,8 +257,8 @@ jobs: before_install: *vcpreinst install: [] script: - - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc all tcltest - - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,staticpkg,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 @@ -303,8 +303,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 @@ -312,8 +312,8 @@ jobs: before_install: *vcpreinst install: [] script: - - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,staticpkg,msvcrt' '-f' makefile.vc all tcltest - - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,staticpkg,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 diff --git a/win/buildall.vc.bat b/win/buildall.vc.bat index 3dc14c1..941f27e 100755 --- a/win/buildall.vc.bat +++ b/win/buildall.vc.bat @@ -68,8 +68,8 @@ if errorlevel 1 goto error :: Build the static core and shell. :: -set OPTS=static,staticpkg,msvcrt -if not %SYMBOLS%.==. set OPTS=symbols,static,staticpkg,msvcrt +set OPTS=static +if not %SYMBOLS%.==. set OPTS=symbols,static nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1 if errorlevel 1 goto error diff --git a/win/makefile.vc b/win/makefile.vc index a813f38..f693bf3 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -52,7 +52,7 @@ # turn on the 64-bit compiler, if your SDK has it. # # Basic macros and options usable on the commandline (see rules.vc for more info): -# OPTS=msvcrt,noembed,nothreads,pdbs,profile,static,staticpkg,symbols,thrdalloc,time64bit,unchecked,utfmax,none +# OPTS=msvcrt,noembed,nothreads,pdbs,profile,static,symbols,thrdalloc,time64bit,unchecked,utfmax,none # Sets special options for the core. The default is for none. # Any combination of the above may be used (comma separated). # 'none' will over-ride everything to nothing. @@ -62,28 +62,25 @@ # specified in OPTS, or into the DLL otherwise. If # "noembed" is specified, the scripts are not embedded # but copied to the installation target (as in 8.6). -# msvcrt = Affects the static option only to switch it from -# using libcmt(d) as the C runtime [by default] to -# msvcrt(d). This is useful for static embedding +# nomsvcrt = Affects the static option only to switch it from +# using msvcrt(d) as the C runtime [by default] to +# libcmt(d). This is useful for static embedding # support. # none = Overrides all other options to nothing. # nothreads = Turns off full multithreading support (default on). -# pdbs = Produce separate debug symbol files. -# profile = Adds profiling hooks. Map file is assumed. +# pdbs = Produce separate debug symbol files. +# profile = Adds profiling hooks. Map file is assumed. # static = Builds a static library of the core instead of a -# dll. The shell will be static (and large), as well. -# staticpkg = Affects the static option only to switch -# tclshXX.exe to have the dde and registry extension linked -# inside it. -# symbols = Adds symbols for step debugging. +# dll. The shell will be static (and large), and +# have the dde and registry extensions linked inside. +# symbols = Adds symbols for step debugging. # thrdalloc = Use the thread allocator (shared global free pool). # time64bit = Forces a build using 64-bit time_t for 32-bit build # (CRT library should support this). # unchecked = Allows a symbols build to not use the debug # enabled runtime (msvcrt.dll not msvcrtd.dll # or libcmt.lib not libcmtd.lib). -# utfmax = Forces a build allowing 4-byte UTF-8 sequences -# internally. +# utfmax = Forces a build using UTF-32 representation internally. # # STATS=compdbg,memdbg,none # Sets optional memory and bytecode compiler debugging code added diff --git a/win/rules.vc b/win/rules.vc index a0084a4..76d93cd 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -667,9 +667,10 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg # MSVCRT - 1 -> link to dynamic C runtime even when building static Tcl build # 0 -> link to static C runtime for static Tcl build. # Does not impact shared Tcl builds (STATIC_BUILD == 0) +# Default: 1 for Tcl 8.7 and up, 0 otherwise. # TCL_USE_STATIC_PACKAGES - 1 -> statically link the registry and dde extensions -# in the Tcl shell. 0 -> keep them as shared libraries -# Does not impact shared Tcl builds. +# in the Tcl and Wish shell. 0 -> keep them as shared libraries. Does +# not impact shared Tcl builds. Implied by STATIC_BUILD since Tcl 8.7. # USE_THREAD_ALLOC - 1 -> Use a shared global free pool for allocation. # 0 -> Use the non-thread allocator. # UNCHECKED - 1 -> when doing a debug build with symbols, use the release @@ -724,7 +725,7 @@ MSVCRT = 0 !if [nmakehlp -f $(OPTS) "msvcrt"] !message *** Doing msvcrt !else -!if $(STATIC_BUILD) +!if "$(TCL_MAJOR_VERSION)" == "8" && "$(TCL_MINOR_VERSION)" < "7" && $(STATIC_BUILD) MSVCRT = 0 !endif !endif diff --git a/win/tcl.dsp b/win/tcl.dsp index dc23f86..750aac9 100644 --- a/win/tcl.dsp +++ b/win/tcl.dsp @@ -76,7 +76,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug\tcl_Static" -# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static,staticpkg,msvcrt MSVCDIR=IDE" +# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" # PROP BASE Target_File "Debug\tclsh87sg.exe" # PROP BASE Bsc_Name "" @@ -85,7 +85,7 @@ CFG=tcl - Win32 Debug Static # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug\tcl_Static" -# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static,staticpkg,msvcrt MSVCDIR=IDE" +# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=symbols,static MSVCDIR=IDE" # PROP Rebuild_Opt "-a" # PROP Target_File "Debug\tclsh87sg.exe" # PROP Bsc_Name "" @@ -97,7 +97,7 @@ CFG=tcl - Win32 Debug Static # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release\tcl_Static" -# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=static,staticpkg,msvcrt MSVCDIR=IDE" +# PROP BASE Cmd_Line "nmake -nologo -f makefile.vc OPTS=static MSVCDIR=IDE" # PROP BASE Rebuild_Opt "-a" # PROP BASE Target_File "Release\tclsh87s.exe" # PROP BASE Bsc_Name "" @@ -106,7 +106,7 @@ CFG=tcl - Win32 Debug Static # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release\tcl_Static" -# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=static,staticpkg,msvcrt MSVCDIR=IDE" +# PROP Cmd_Line "nmake -nologo -f makefile.vc OPTS=static MSVCDIR=IDE" # PROP Rebuild_Opt "-a" # PROP Target_File "Release\tclsh87s.exe" # PROP Bsc_Name "" -- cgit v0.12 From 84bbce0e297b91b5cac1c910a2d38db643a20c77 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 9 Dec 2020 09:56:37 +0000 Subject: Fix github actions Windows build --- .github/workflows/win-build.yml | 1 - win/makefile.vc | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index c5b2147..7520704 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -58,7 +58,6 @@ jobs: - "--disable-shared" - "--enable-symbols" - "--enable-symbols=mem" - - "CC=g++" # Using powershell means we need to explicitly stop on failure steps: - name: Checkout diff --git a/win/makefile.vc b/win/makefile.vc index f693bf3..a5465ce 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -590,8 +590,10 @@ $(LIBTCLZIP): .PHONY @move /y "$(LIBTCLVFS)\tcl_library\manifest.txt" "$(LIBTCLVFS)\tcl_library\pkgIndex.tcl" > NUL !if ! $(STATIC_BUILD) # Remove the registry and dde directories as the DLLS are still external - @$(RMDIR) "$(LIBTCLVFS)\tcl_library\registry" - @$(RMDIR) "$(LIBTCLVFS)\tcl_library\dde" + @del "$(LIBTCLVFS)\tcl_library\registry\pkgIndex.tcl" + @rmdir "$(LIBTCLVFS)\tcl_library\registry" + @del "$(LIBTCLVFS)\tcl_library\dde\pkgIndex.tcl" + @rmdir "$(LIBTCLVFS)\tcl_library\dde" !endif @echo file delete -force {$@} > "$(OUT_DIR)\zipper.tcl" @echo zipfs mkzip {$@} {$(LIBTCLVFS)} {$(LIBTCLVFS)} >> "$(OUT_DIR)\zipper.tcl" -- cgit v0.12 From 5d4116b63829ba46f63a5ec7434710edc4b98943 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 10 Dec 2020 09:00:02 +0000 Subject: sync win/rules.vc with Tcl 8.7. No change for 8.6 --- win/rules.vc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/win/rules.vc b/win/rules.vc index a0084a4..76d93cd 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -667,9 +667,10 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg # MSVCRT - 1 -> link to dynamic C runtime even when building static Tcl build # 0 -> link to static C runtime for static Tcl build. # Does not impact shared Tcl builds (STATIC_BUILD == 0) +# Default: 1 for Tcl 8.7 and up, 0 otherwise. # TCL_USE_STATIC_PACKAGES - 1 -> statically link the registry and dde extensions -# in the Tcl shell. 0 -> keep them as shared libraries -# Does not impact shared Tcl builds. +# in the Tcl and Wish shell. 0 -> keep them as shared libraries. Does +# not impact shared Tcl builds. Implied by STATIC_BUILD since Tcl 8.7. # USE_THREAD_ALLOC - 1 -> Use a shared global free pool for allocation. # 0 -> Use the non-thread allocator. # UNCHECKED - 1 -> when doing a debug build with symbols, use the release @@ -724,7 +725,7 @@ MSVCRT = 0 !if [nmakehlp -f $(OPTS) "msvcrt"] !message *** Doing msvcrt !else -!if $(STATIC_BUILD) +!if "$(TCL_MAJOR_VERSION)" == "8" && "$(TCL_MINOR_VERSION)" < "7" && $(STATIC_BUILD) MSVCRT = 0 !endif !endif -- cgit v0.12 From 20e0998a323f571ddb5f5aaf9789dcc8fa6b06b7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 10 Dec 2020 09:38:24 +0000 Subject: Use more 0o??? syntax for octal. Clean up build *.yml files --- .github/workflows/linux-build.yml | 3 ++- .github/workflows/mac-build.yml | 3 ++- .travis.yml | 3 --- tests/chanio.test | 2 +- tests/unixFCmd.test | 4 ++-- tests/unixFile.test | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index bf0a4cb..3d56638 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -20,7 +20,8 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Prepare - run: touch tclStubInit.c tclOOStubInit.c + run: | + touch tclStubInit.c tclOOStubInit.c working-directory: generic - name: Configure ${{ matrix.cfgopt }} run: | diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 3302265..c1144ab 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -11,7 +11,8 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Prepare - run: touch tclStubInit.c tclOOStubInit.c + run: | + touch tclStubInit.c tclOOStubInit.c working-directory: generic - name: Build run: make all diff --git a/.travis.yml b/.travis.yml index d2e3ca9..eb1ec0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -190,7 +190,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 - PATH="$PATH:$VCDIR" - cd ${BUILD_DIR} @@ -297,7 +296,6 @@ jobs: - BUILD_DIR=win - CFGOPT="--enable-64bit" before_install: &makepreinst - - rm -rf tests/safe-stock8*.test - touch generic/tclStubInit.c generic/tclOOStubInit.c - choco install -y make - cd ${BUILD_DIR} @@ -374,7 +372,6 @@ jobs: script: - make dist before_install: - - rm -rf tests/safe-stock8*.test - touch generic/tclStubInit.c generic/tclOOStubInit.c - cd ${BUILD_DIR} install: diff --git a/tests/chanio.test b/tests/chanio.test index 5586015..28da530 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -5334,7 +5334,7 @@ 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 0o%03o [expr {$stats(mode) & 0o777}]] chan puts $f "line 1" diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test index 991e489..4b1687f 100644 --- a/tests/unixFCmd.test +++ b/tests/unixFCmd.test @@ -137,11 +137,11 @@ test unixFCmd-1.7 {TclpRenameFile: EXDEV} -setup { cleanup } -constraints {unix notRoot} -body { file mkdir foo/bar - file attr foo -perm 040555 + file attr foo -perm 0o40555 file rename foo/bar /tmp } -returnCodes error -cleanup { catch {file delete /tmp/bar} - catch {file attr foo -perm 040777} + catch {file attr foo -perm 0o40777} catch {file delete -force foo} } -match glob -result {*: permission denied} test unixFCmd-1.8 {Checking EINTR Bug} {unix notRoot nonPortable} { diff --git a/tests/unixFile.test b/tests/unixFile.test index 492e5d0..3669cce 100644 --- a/tests/unixFile.test +++ b/tests/unixFile.test @@ -24,7 +24,7 @@ cd [temporaryDirectory] catch { set oldPath $env(PATH) - file attributes [makeFile "" junk] -perm 0777 + file attributes [makeFile "" junk] -perm 0o777 } set absPath [file join [temporaryDirectory] junk] -- cgit v0.12 From c69d9fda477d73e88273b55ef9e129a7e0ee8690 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 10 Dec 2020 12:17:50 +0000 Subject: Potential fix for [ed5be77734]: win: "comx:" not recognized as serial port. (concluded from code inspection, not tested yet) --- generic/tclFileName.c | 4 ++-- win/tclWinFile.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 15f93f4..cfd76e6 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -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; } } diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 6cfeae1..2fa2258 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -1250,7 +1250,7 @@ WinIsReserved( if (path[4] == '\0') { return 4; - } else if (path [4] == ':' && path[5] == '\0') { + } else if (path[4] == ':' && path[5] == '\0') { return 4; } } else if ((path[2] == 'n' || path[2] == 'N') && path[3] == '\0') { @@ -1271,7 +1271,7 @@ WinIsReserved( if (path[4] == '\0') { return 4; - } else if (path [4] == ':' && path[5] == '\0') { + } else if (path[4] == ':' && path[5] == '\0') { return 4; } } @@ -3101,6 +3101,7 @@ TclNativeCreateNativeRep( } MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, nativePathPtr, len + 1); + nativePathPtr[len] = 0; /* * If path starts with "//?/" or "\\?\" (extended path), translate any -- cgit v0.12 From 45c9e44c82a3494ca972276c1454a9bda8e0900e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 10 Dec 2020 12:31:37 +0000 Subject: Tweak: account for terminating '\0' --- win/tclWinFile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 2fa2258..2967cce 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -3100,7 +3100,7 @@ TclNativeCreateNativeRep( goto done; } MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, nativePathPtr, - len + 1); + len + 2); nativePathPtr[len] = 0; /* -- cgit v0.12 From f4ec29ceb25d347536aee82060c3402bc87a94e8 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 10 Dec 2020 18:05:34 +0000 Subject: Update "platform" package to handle Big Sur version numbering. Also remove special case for cygwin/msys2, just make it more generic --- library/platform/platform.tcl | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index 87d720b..2e54a33 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -94,12 +94,6 @@ proc ::platform::generic {} { } switch -glob -- $plat { - cygwin* { - set plat cygwin - } - msys* { - set plat msystem - } windows { if {$tcl_platform(platform) == "unix"} { set plat cygwin @@ -152,6 +146,9 @@ proc ::platform::generic {} { osf1 { set plat tru64 } + default { + set plat [lindex [split $plat _-] 0] + } } return "${plat}-${cpu}" @@ -178,11 +175,15 @@ proc ::platform::identify {} { } macosx { set major [lindex [split $tcl_platform(osVersion) .] 0] - if {$major > 8} { + if {$major > 19} { + incr major -20 + append plat 11.$major + } else { incr major -4 append plat 10.$major return "${plat}-${cpu}" } + return "${plat}-${cpu}" } linux { # Look for the libc*.so and determine its version @@ -333,7 +334,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 { @@ -341,15 +342,28 @@ proc ::platform::patterns {id} { lappend alt i386-x86_64 lappend alt universal } - x86_64 { lappend alt i386-x86_64 } + x86_64 { + lappend alt i386-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} foreach a $alt { -- cgit v0.12 From 33d854e95be01bb573345bfed26870e67ee8338f Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Fri, 11 Dec 2020 07:57:41 +0000 Subject: nmake: build nmakehlp with -DNDEBUG, sync rules.vc for 8.7 --- win/rules-ext.vc | 2 +- win/rules.vc | 34 ++++++++++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/win/rules-ext.vc b/win/rules-ext.vc index 531e070..6da5689 100644 --- a/win/rules-ext.vc +++ b/win/rules-ext.vc @@ -31,7 +31,7 @@ macro to the name of the project makefile. # We extract version numbers using the nmakehlp program. For now use # the local copy of nmakehlp. Once we locate Tcl, we will use that # one if it is newer. -!if [$(CC) -nologo "nmakehlp.c" -link -subsystem:console > nul] +!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul] !endif # First locate the Tcl directory that we are working with. diff --git a/win/rules.vc b/win/rules.vc index 76d93cd..909799c 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -24,7 +24,7 @@ _RULES_VC = 1 # For modifications that are not backward-compatible, you *must* change # the major version. RULES_VERSION_MAJOR = 1 -RULES_VERSION_MINOR = 7 +RULES_VERSION_MINOR = 8 # The PROJECT macro must be defined by parent makefile. !if "$(PROJECT)" == "" @@ -1115,14 +1115,29 @@ OUT_DIR = $(TMP_DIR) # The name of the stubs library for the project being built STUBPREFIX = $(PROJECT)stub +# # Set up paths to various Tcl executables and libraries needed by extensions -!if $(DOING_TCL) +# + +# TIP 430. Unused for 8.6 but no harm defining it to allow a common rules.vc +!if "$(TCL_PATCH_LETTER)" == "." +TCLSCRIPTZIPNAME = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_RELEASE_SERIAL).zip +!else +TCLSCRIPTZIPNAME = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip +!endif +!if "$(TK_PATCH_LETTER)" == "." +TKSCRIPTZIPNAME = libtk_$(TK_MAJOR_VERSION)_$(TK_MINOR_VERSION)_$(TK_RELEASE_SERIAL).zip +!else +TKSCRIPTZIPNAME = libtk_$(TK_MAJOR_VERSION)_$(TK_MINOR_VERSION)_$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip +!endif +!if $(DOING_TCL) TCLSHNAME = $(PROJECT)sh$(VERSION)$(SUFX).exe TCLSH = $(OUT_DIR)\$(TCLSHNAME) TCLIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib TCLLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT) TCLLIB = $(OUT_DIR)\$(TCLLIBNAME) +TCLSCRIPTZIP = $(OUT_DIR)\$(TCLSCRIPTZIPNAME) TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib TCLSTUBLIB = $(OUT_DIR)\$(TCLSTUBLIBNAME) @@ -1150,6 +1165,7 @@ TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)t$(SUFX:t=).lib TCL_LIBRARY = $(_TCLDIR)\lib TCLREGLIB = $(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib TCLDDELIB = $(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib +TCLSCRIPTZIP = $(_TCLDIR)\lib\$(TCLSCRIPTZIPNAME) TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target TCL_INCLUDES = -I"$(_TCLDIR)\include" @@ -1169,6 +1185,7 @@ TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)t$(SUFX:t=).lib TCL_LIBRARY = $(_TCLDIR)\library TCLREGLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib TCLDDELIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib +TCLSCRIPTZIP = $(_TCLDIR)\win\$(BUILDDIRTOP)\$(TCLSCRIPTZIPNAME) TCLTOOLSDIR = $(_TCLDIR)\tools TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win" @@ -1201,7 +1218,8 @@ WISH = $(OUT_DIR)\$(WISHNAME) TKSTUBLIB = $(OUT_DIR)\$(TKSTUBLIBNAME) TKIMPLIB = $(OUT_DIR)\$(TKIMPLIBNAME) TKLIB = $(OUT_DIR)\$(TKLIBNAME) -TK_INCLUDES = -I"$(WIN_DIR)" -I"$(GENERICDIR)" +TK_INCLUDES = -I"$(WIN_DIR)" -I"$(GENERICDIR)" +TKSCRIPTZIP = $(OUT_DIR)\$(TKSCRIPTZIPNAME) !else # effectively NEED_TK @@ -1216,7 +1234,10 @@ TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME) !endif TK_INCLUDES = -I"$(_TKDIR)\include" +TKSCRIPTZIP = $(_TKDIR)\lib\$(TKSCRIPTZIPNAME) + !else # Building against Tk sources + WISH = $(_TKDIR)\win\$(BUILDDIRTOP)\$(WISHNAME) TKSTUBLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSTUBLIBNAME) TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME) @@ -1227,7 +1248,10 @@ TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME) !endif TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib" +TKSCRIPTZIP = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSCRIPTZIPNAME) + !endif # TKINSTALL + tklibs = "$(TKSTUBLIB)" "$(TKIMPLIB)" !endif # $(DOING_TK) @@ -1616,6 +1640,8 @@ default-install-pdbs: @if not exist "$(LIB_INSTALL_DIR)" mkdir "$(LIB_INSTALL_DIR)" @$(CPY) "$(OUT_DIR)\*.pdb" "$(LIB_INSTALL_DIR)\" +# "emacs font-lock highlighting fix + default-install-docs-html: @echo Installing documentation files to '$(DOC_INSTALL_DIR)' @if not exist "$(DOC_INSTALL_DIR)" mkdir "$(DOC_INSTALL_DIR)" @@ -1781,7 +1807,7 @@ TCLNMAKECONFIG = "$(_TCLDIR)\lib\nmake\tcl.nmake" !endif !else # !$(TCLINSTALL) - building against Tcl source !if exist("$(OUT_DIR)\tcl.nmake") -TCLNMAKECONFIG = "$(OUT_DIR)\tcl.nmake" +TCLNMAKECONFIG = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl.nmake"" !endif !endif # TCLINSTALL -- cgit v0.12