From 2eb0767336c873190979f8ab18ddd613b21af518 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 19 Nov 2009 11:59:52 +0000 Subject: Undo Jan's needless vandalism. --- ChangeLog | 11 +++++++++-- library/auto.tcl | 4 ++-- library/clock.tcl | 20 +++++++++++--------- library/history.tcl | 4 ++-- library/safe.tcl | 6 +++--- library/tm.tcl | 2 +- 6 files changed, 28 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9ff53d..35f9302 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-11-19 Donal K. Fellows + + * library/auto.tcl (tcl_findLibrary): + * library/clock.tcl (MakeUniquePrefixRegexp, MakeParseCodeFromFields) + (SetupTimeZone, ProcessPosixTimeZone): Restored the use of a literal + * library/history.tcl (HistAdd): 'then' when following a multi- + * library/safe.tcl (interpConfigure): line test expresssion. It's an + * library/tm.tcl (UnknownHandler): aid to readability then. + 2009-11-19 Jan Nijtmans * generic/tclInt.h Make all internal initialization @@ -25,8 +34,6 @@ Tcl_CreateChannel() and its derivatives, now sometimes ignore their "chanName" argument. -2009-11-18 Jan Nijtmans - * generic/tclAsync.c Eliminate various gcc warnings (in -Wextra mode) * generic/tclBasic.c * generic/tclBinary.c diff --git a/library/auto.tcl b/library/auto.tcl index 9980b26..c69b24d 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl dealing with auto execution of commands # and can be auto loaded themselves. # -# RCS: @(#) $Id: auto.tcl,v 1.31 2009/11/18 21:23:21 nijtmans Exp $ +# RCS: @(#) $Id: auto.tcl,v 1.32 2009/11/19 11:59:53 dkf Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -88,7 +88,7 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { if { $::tcl_platform(platform) eq "unix" && $::tcl_platform(os) eq "Darwin" - } { + } then { # 4. On MacOSX, check the Resources/Scripts subdir too lappend dirs [file join $d $basename$version Resources Scripts] } diff --git a/library/clock.tcl b/library/clock.tcl index 6d6cc15..9f9bcae 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.58 2009/11/18 21:23:20 nijtmans Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.59 2009/11/19 11:59:54 dkf Exp $ # #---------------------------------------------------------------------- @@ -2172,7 +2172,7 @@ proc ::tcl::clock::MakeUniquePrefixRegexp { successors if { [dict exists $uniquePrefixMapping $prefixString] || [llength $schars] > 1 - } { + } then { append re "(?:" } @@ -2268,7 +2268,7 @@ proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } { ![string is integer $newPos] || ![string is integer $currPos] || $newPos > $currPos - } { + } then { break } if { $newPos < $currPos } { @@ -3096,7 +3096,7 @@ proc ::tcl::clock::SetupTimeZone { timezone } { } elseif { [regexp {^([-+])(\d\d)(?::?(\d\d)(?::?(\d\d))?)?} $timezone \ -> s hh mm ss] - } { + } then { # Make a fixed offset ::scan $hh %d hh @@ -3125,7 +3125,7 @@ proc ::tcl::clock::SetupTimeZone { timezone } { }] && [catch { LoadZoneinfoFile [string range $timezone 1 end] }] - } { + } then { return -code error \ -errorcode [list CLOCK badTimeZone $timezone] \ "time zone \"$timezone\" not found" @@ -3809,8 +3809,9 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { # EU end time is the last Sunday in October if { - [dict get $z startDayOfYear] eq {} && [dict get $z startMonth] eq {} - } { + [dict get $z startDayOfYear] eq {} + && [dict get $z startMonth] eq {} + } then { if {($stdSignum * $stdHours>=0) && ($stdSignum * $stdHours<=12)} { # EU dict set z startWeekOfMonth 5 @@ -3830,8 +3831,9 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { dict set z startSeconds 0 } if { - [dict get $z endDayOfYear] eq {} && [dict get $z endMonth] eq {} - } { + [dict get $z endDayOfYear] eq {} + && [dict get $z endMonth] eq {} + } then { if {($stdSignum * $stdHours>=0) && ($stdSignum * $stdHours<=12)} { # EU dict set z endMonth 10 diff --git a/library/history.tcl b/library/history.tcl index 4d21143..a1e2679 100644 --- a/library/history.tcl +++ b/library/history.tcl @@ -2,7 +2,7 @@ # # Implementation of the history command. # -# RCS: @(#) $Id: history.tcl,v 1.9 2009/11/18 21:23:20 nijtmans Exp $ +# RCS: @(#) $Id: history.tcl,v 1.10 2009/11/19 11:59:54 dkf Exp $ # # Copyright (c) 1997 Sun Microsystems, Inc. # @@ -78,7 +78,7 @@ proc ::tcl::HistAdd {event {exec {}}} { if { [prefix longest {exec {}} $exec] eq "" && [llength [info level 0]] == 3 - } { + } then { return -code error "bad argument \"$exec\": should be \"exec\"" } diff --git a/library/safe.tcl b/library/safe.tcl index 561659b..662a727 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.32 2009/11/18 21:23:21 nijtmans Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.33 2009/11/19 11:59:54 dkf Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -194,7 +194,7 @@ proc ::safe::interpConfigure {args} { if { ![::tcl::OptProcArgGiven -statics] && ![::tcl::OptProcArgGiven -noStatics] - } { + } then { set statics $state(staticsok) } else { set statics [InterpStatics] @@ -202,7 +202,7 @@ proc ::safe::interpConfigure {args} { if { [::tcl::OptProcArgGiven -nested] || [::tcl::OptProcArgGiven -nestedLoadOk] - } { + } then { set nested [InterpNested] } else { set nested $state(nestedok) diff --git a/library/tm.tcl b/library/tm.tcl index 90f8296..907f9cf 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -263,7 +263,7 @@ proc ::tcl::tm::UnknownHandler {original name args} { if { ($pkgname eq $name) && [package vsatisfies $pkgversion {*}$args] - } { + } then { set satisfied 1 # We do not abort the loop, and keep adding provide -- cgit v0.12