Explicitly request literal mode after .Xr.
[netbsd-mini2440.git] / dist / nvi / tcl_scripts / wc.tcl
blob357c65440250d10b59ebaf4435a3f4fe3bcec1cb
1 # Id: wc.tcl,v 8.2 1995/11/18 12:59:12 bostic Exp (Berkeley) Date: 1995/11/18 12:59:12
3 proc wc {} {
4 global viScreenId
5 global viStartLine
6 global viStopLine
8 set lines [viLastLine $viScreenId]
9 set output ""
10 set words 0
11 for {set i $viStartLine} {$i <= $viStopLine} {incr i} {
12 set outLine [split [string trim [viGetLine $viScreenId $i]]]
13 set words [expr $words + [llength $outLine]]
15 viMsg $viScreenId "$words words"