OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/hostdependX86LINUX64.git] / util / X86LINUX64 / lib / blt2.5 / demos / scripts / bgtest.tcl
1
2 set fid [open "../README" "r"]
3 set data [read $fid]
4 close $fid
5
6 regsub -all "\r|\n|\t" $data " " data 
7 set data [split $data " "]
8
9 set count 0
10 set maxWords 500
11 foreach word $data {
12     if { $word == "" }  {
13         continue
14     }
15     if { $count & 0x1 } {
16         puts -nonewline stderr "($word)"
17         flush stderr
18     } else {
19         puts -nonewline stdout "($word)"
20         flush stdout
21     }
22     incr count
23     if { ($count % 10) == 0 } {
24         puts stdout ""
25         puts stderr ""
26         flush stdout
27         flush stderr
28     }
29     if { $count > $maxWords } {
30         break
31     }
32     after 500
33 }
34 exit 0
35