Overview
SHA1 Hash: | ebb94f75cb229fddf31e3eb8d81b9cf056593b2e |
---|---|
Date: | 2007-09-17 01:41:58 |
User: | aku |
Comment: | Semantics of the progress display extended to allow an empty maximum to signal use of an infinite (open-ended) display. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified tools/lib/log.tcl from [a68dbe32df] to [edfb9cfb1e].
@@ -12,10 +12,12 @@ # Feedback generation. # # vc::tools::log::write verbosity system text - Write message to the log. # vc::tools::log::progress verbosity system n max - Drive a progress display. +# +# Note: max empty => infinite progress display, otherwise a finite display. # Administrative operations. # # vc::tools::log::verbosity level - Set the verbosity level of the application. # vc::tools::log::verbosity? - Query the verbosity level of the application. @@ -122,11 +124,15 @@ # Progress handler. Uses \r to return to the beginning of the current # line without advancing. proc ::vc::tools::log::OUT/progress {system n max} { - puts -nonewline "$system [format %[string length $max]s $n]/$max\r" + if {$max eq {}} { + puts -nonewline "$system $n\r" + } else { + puts -nonewline "$system [format %[string length $max]s $n]/$max\r" + } flush stdout return } # -----------------------------------------------------------------------------