+proc showtints {} {
+ global e_life
+ set divs 20
+ listbox .tints -width 60 -height [expr {$divs+1}]
+ for {set y 0} {$y <= $divs} {incr y} {
+ set tint [expr {($y+0.0)/$divs}]
+ puts "$y $tint"
+ .tints insert end \
+ "[format "#%2d %6f %4ds" $y $tint [expr {round(
+ $tint > 0 ? -log($tint) * $e_life : "9999"
+ )}]] The quick brown fox jumped over the lazy dog"
+ tintentry .tints $y $tint
+ }
+ pack .tints -side bottom
+}
+
+proc parseargs {} {
+ global argv
+ foreach arg $argv {
+ if {![string compare $arg --test-tints]} {
+ showtints
+ } else {
+ error "unknown option $arg"
+ }
+ }