summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-31 08:59:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-31 08:59:28 (GMT)
commit91189c426903448dfa31ba4983c5d3035cb351a5 (patch)
treedc374756a9260acda12b9b8afc397affcb7c3f9c /library
parentf5d0aa6e2254e5bc7b53ad639b36ee06453c361a (diff)
downloadtcl-91189c426903448dfa31ba4983c5d3035cb351a5.zip
tcl-91189c426903448dfa31ba4983c5d3035cb351a5.tar.gz
tcl-91189c426903448dfa31ba4983c5d3035cb351a5.tar.bz2
More code review, e.g. use Tcl_SetObjResult in stead of Tcl_SetResult, preventing a (char *) type case. No functional changes.
Diffstat (limited to 'library')
-rw-r--r--library/clock.tcl16
-rw-r--r--library/init.tcl6
2 files changed, 11 insertions, 11 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index 1f3c669..471deff 100644
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -519,7 +519,7 @@ proc ::tcl::clock::Initialize {} {
# Return the merged translation catalog for the ::tcl::clock namespace
# Searching of catalog is similar to "msgcat::mc".
#
-# Contrary to "msgcat::mc" may additionally load a package catalog
+# Contrary to "msgcat::mc" may additionally load a package catalog
# on demand.
#
# Arguments:
@@ -826,7 +826,7 @@ proc ::tcl::clock::LoadWindowsDateTimeFormats { locale } {
proc ::tcl::clock::LocalizeFormat { locale format {fmtkey {}} } {
variable LocaleFormats
-
+
if { $fmtkey eq {} } { set fmtkey FMT_$format }
if { [catch {
set locfmt [dict get $LocaleFormats $locale $fmtkey]
@@ -836,10 +836,10 @@ proc ::tcl::clock::LocalizeFormat { locale format {fmtkey {}} } {
if { [catch {
set mlst [dict get $LocaleFormats $locale MLST]
}] } {
-
+
# message catalog dictionary:
set mcd [mcget $locale]
-
+
# Handle locale-dependent format groups by mapping them out of the format
# string. Note that the order of the [string map] operations is
# significant because later formats can refer to later ones; for example
@@ -864,7 +864,7 @@ proc ::tcl::clock::LocalizeFormat { locale format {fmtkey {}} } {
dict set LocaleFormats $locale MLST $mlst
}
- # translate copy of format (don't use format object here, because otherwise
+ # translate copy of format (don't use format object here, because otherwise
# it can lose its internal representation (string map - convert to unicode)
set locfmt [string map $mlst [string range " $format" 1 end]]
@@ -872,10 +872,10 @@ proc ::tcl::clock::LocalizeFormat { locale format {fmtkey {}} } {
dict set LocaleFormats $locale $fmtkey $locfmt
}
- # Save original format as long as possible, because of internal
+ # Save original format as long as possible, because of internal
# representation (performance).
# Note that in this case such format will be never localized (also
- # using another locales). To prevent this return a duplicate (but
+ # using another locales). To prevent this return a duplicate (but
# it may be slower).
if {$locfmt eq $format} {
set locfmt $format
@@ -934,7 +934,7 @@ proc ::tcl::clock::GetSystemTimeZone {} {
if { [dict exists $TimeZoneBad $timezone] } {
set timezone :localtime
}
-
+
# tell backend - current system timezone:
configure -system-tz $timezone
diff --git a/library/init.tcl b/library/init.tcl
index de69730..e500e3d 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -157,7 +157,7 @@ if {[interp issafe]} {
package unknown {::tcl::tm::UnknownHandler ::tclPkgUnknown}
} else {
# Default known auto_index (avoid loading auto index implicit after interp create):
-
+
array set ::auto_index {
::tcl::tm::UnknownHandler {source [info library]/tm.tcl}
::tclPkgUnknown {source [info library]/package.tcl}
@@ -431,7 +431,7 @@ proc auto_load {cmd {namespace {}}} {
# workaround non canonical auto_index entries that might be around
# from older auto_mkindex versions
if {$cmd ni $nameList} {lappend nameList $cmd}
-
+
# try to load (and create sub-cmd handler "_sub_load_cmd" for further usage):
foreach name $nameList [set _sub_load_cmd {
# via auto_index:
@@ -461,7 +461,7 @@ proc auto_load {cmd {namespace {}}} {
}
}
}]
-
+
# load auto_index if possible:
if {![info exists auto_path]} {
return 0