X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FDrawResources%2FStandardCommands.tcl;h=1d16b4bb7a1fcb1628079eb8463e3857679db965;hb=d33dea30d59dcf546a04e4c6bc64903b53aa2005;hpb=3b4c36f540c1d937e3d3f61ecc45a3ae48bc18e5 diff --git a/src/DrawResources/StandardCommands.tcl b/src/DrawResources/StandardCommands.tcl index 45a72fb525..1d16b4bb7a 100755 --- a/src/DrawResources/StandardCommands.tcl +++ b/src/DrawResources/StandardCommands.tcl @@ -96,17 +96,16 @@ proc getsourcefile {{command ""}} { global Draw_Helps Draw_Groups Draw_Files + set out {} if {$command == ""} { # help general foreach h [lsort [array names Draw_Groups]] { - puts "" - puts "" - puts $h + lappend out "" "" "$h" set i 0 foreach f [lsort $Draw_Groups($h)] { if {$i == 0} { - puts " " + lappend out "" } incr i # @@ -114,18 +113,7 @@ proc getsourcefile {{command ""}} { # foreach command_that_has_file [array names Draw_Files] { if {($command_that_has_file == $f)} { -# -# compute the length of the string to have the right spacing -# with tabs -# - set ll [string length $f] - if {($ll >= 1) && ($ll < 8)} { - puts "$f\t\t: $Draw_Files($f) " - } - if {($ll >= 8)} { - puts "$f\t: $Draw_Files($f) " - } - + lappend out [format {%-20s %s} $f $Draw_Files($f)] } } } @@ -136,17 +124,12 @@ proc getsourcefile {{command ""}} { append command "*" foreach f [lsort [array names Draw_Files]] { if {[string match $command $f]} { - puts -nonewline $f - for {set j [string length $f]} {$j < 15} {incr j} { - puts -nonewline " " - } - - puts " $Draw_Files($f)" + lappend out [format {%-20s %s} $f $Draw_Files($f)] } } } - flush stdout + return [join $out "\n"] } help getsourcefile {getsourcefile, or getsourcefile command } {DRAW General Commands}