From: ellson Date: Mon, 20 Oct 2008 01:53:17 +0000 (+0000) Subject: save work X-Git-Tag: LAST_LIBGRAPH~32^2~3071 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=465694c6d87f56f6b45954c7f8394de570e3435c;p=graphviz save work --- diff --git a/lib/inkpot/inkpot_lib_procs.tcl b/lib/inkpot/inkpot_lib_procs.tcl index e3b9c88cd..e52d9dcc8 100755 --- a/lib/inkpot/inkpot_lib_procs.tcl +++ b/lib/inkpot/inkpot_lib_procs.tcl @@ -12,10 +12,10 @@ proc tab_start_row { } { set indent " " if {$pos == 0} { if {$comments} { - set s " /* [uplevel 2 $rstart] */ " + set s "$indent/* [uplevel 2 $rstart] */" set w [expr 16 - [string length $s]] if {$w < 0} {set w 0} - set s $indent$s[format "%.[set w]s " " "] + set s $s[format "%.[set w]s" " "] } { set s $indent } @@ -30,6 +30,9 @@ proc tab_end_row { } { upvar 2 TAB_chan ch upvar 2 TAB_row_end rend if {$comments} { + if {$pos > 40} { + puts -nonewline $ch "\n\t\t\t\t\t" + } set w [expr 5 - $pos / 8] if {$w < 0} {set w 0} set s " /* [uplevel 2 $rend] */" @@ -65,11 +68,17 @@ proc tab_finalize { table_end } { } proc tab_elem {data} { + global comments upvar TAB_pos pos upvar TAB_chan ch - if {$pos > 64} { - puts $ch "" - set pos 0 + if {$pos > 72} { + if {$comments} { + puts -nonewline $ch "\n\t\t" + set pos 16 + } { + puts $ch "" + set pos 0 + } } if {$pos == 0} { tab_start_row } puts -nonewline $ch $data