Lines Matching refs:fd
103 proc get2byte {fd offset} {
104 seek $fd $offset
105 set bin [read $fd 2]
109 proc get4byte {fd offset} {
110 seek $fd $offset
111 set bin [read $fd 4]
115 proc put4byte {fd offset val} {
116 seek $fd $offset
118 puts -nonewline $fd $bin
124 set fd [open test.db r+]
125 fconfigure $fd -encoding binary -translation binary
126 set nChild [get2byte $fd 103]
127 set offChild [get2byte $fd [expr 100+12+($nChild-2)*2]]
128 set pgnoChild [get4byte $fd $offChild]
129 put4byte $fd $offChild 1
130 close $fd