Lines Matching refs:num
24 # of $num spaces ('num' holding the tab size). While this is certainly useful
71 proc ::textutil::tabify::tabify { string { num 8 } } {
72 return [string map [list [MakeTabStr $num] \t] $string]
75 proc ::textutil::tabify::untabify { string { num 8 } } {
76 return [string map [list \t [MakeTabStr $num]] $string]
79 proc ::textutil::tabify::MakeTabStr { num } {
83 if { $TabLen != $num } then {
84 set TabLen $num
85 set TabStr [strRepeat " " $num]
94 # positions' with tabs. $num is the requested tab size.
109 # set nextTab [expr ($currPos + $num) - ($currPos % $num)]
130 proc ::textutil::tabify::tabifyLine { line num } {
133 checkArr $num
135 set line [untabifyLine $line $num]
147 set nextTab [expr {($currPos + $num) - ($currPos % $num)}]
148 set prevTab [expr {$nextTab - $num}]
179 proc ::textutil::tabify::checkArr { num } {
183 if { $num > $TabLen2 } {
184 for { set i [expr {$TabLen2 + 1}] } { $i <= $num } { incr i } {
187 set TabLen2 $num
202 proc ::textutil::tabify::untabifyLine { line num } {
214 set dist [expr {$num - ($currPos % $num)}]
226 # 'string' might hold any number of lines, 'num' is the requested tab size.
229 proc ::textutil::tabify::tabify2 { string { num 8 } } {
237 lappend outLst [tabifyLine $line $num]
246 # 'string' might hold any number of lines, 'num' is the requested tab size.
249 proc ::textutil::tabify::untabify2 { string { num 8 } } {
252 checkArr $num
258 lappend outLst [untabifyLine $line $num]