use static local variable for units
This commit is contained in:
parent
61582251c7
commit
b6eceebc26
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
if {![exists -proc pretty_size]} {
|
if {![exists -proc pretty_size]} {
|
||||||
proc pretty_size {size} {
|
proc pretty_size {size} {{units {bytes KiB MiB GiB TiB}}} {
|
||||||
set units {bytes KiB MiB GiB TiB}
|
|
||||||
|
|
||||||
# for {set i 0; set l [llength $units]; incr l -1} {
|
# for {set i 0; set l [llength $units]; incr l -1} {
|
||||||
# $size > 1023 && $i < $l} {incr i} {
|
# $size > 1023 && $i < $l} {incr i} {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user