@@ -54,15 +54,17 @@ if [catch {package require Linuxcnc} msg] {
5454# since "_" is not defined for standalone usage, make a proc named "_"
5555if {" " == [info command " _" ]} {
5656 package require msgcat
57- proc _ {s} {return [::msgcat::mc $s ]}
57+ proc _ {s} {
58+ return [::msgcat::mc $s ]
59+ }
5860}
5961# -----------------------------------------------------------------------
6062
6163
6264proc ::tooledit::init { {columns " " } } {
6365 if [file readable ~/.tooleditrc] {
6466 if [catch {source ~/.tooleditrc} msg] {
65- puts stderr " [ _ " Problem reading ~/.tooleditrc" ] :" \n $msg "
67+ puts stderr " [ _ " Problem reading ~/.tooleditrc" ] :\n $msg "
6668 }
6769 if [info exists geometry] {
6870 set ::te(top,restore,geometry) $geometry
@@ -96,7 +98,7 @@ proc ::tooledit::init { {columns ""} } {
9698
9799 set ::te(filemod) 0
98100 set ::te(fmt,int) %d
99- set ::te(fmt,real) %g
101+ set ::te(fmt,real) %.9g
100102 set ::te(fmt,angle) %f
101103 set ::te(msg,last) " "
102104 set ::te(pollms) 2000
@@ -311,7 +313,7 @@ proc ::tooledit::readfile {filename} {
311313 foreach item {t p x y z a b c u v w d i j q comment} {
312314 set u($item ) " "
313315 }
314- set newline [ string tolower $newline ]
316+ # extract the comment as is (without converting it to lower case)
315317 set i1 [string first \; $newline ]
316318 if {$i1 >= 0} {
317319 set u(comment) [string range $newline [expr $i1 +1] end]
@@ -320,6 +322,7 @@ proc ::tooledit::readfile {filename} {
320322 set newline [string trim $newline ]
321323 }
322324
325+ set newline [string tolower $newline ]
323326 if {" $newline " == " " } {
324327 lappend ::te(global,comments) $u(comment)
325328 continue
0 commit comments