Lines Matching refs:fd

181   set fd [open corrupt.db r+]
182 fconfigure $fd -encoding binary -translation binary
183 seek $fd [expr 1024*3 + 12]
184 set zCelloffset [read $fd 2]
186 seek $fd [expr 1024*3 + $iCelloffset]
187 puts -nonewline $fd "\00\00\00\00"
188 close $fd
229 set fd [open corrupt.db r+]
230 fconfigure $fd -encoding binary -translation binary
231 seek $fd [expr 1024 + 12]
232 set zCelloffset [read $fd 2]
234 seek $fd [expr 1024 + $iCelloffset]
235 set zChildPage [read $fd 4]
236 seek $fd [expr 2*1024 + 12]
237 set zCelloffset [read $fd 2]
239 seek $fd [expr 2*1024 + $iCelloffset]
240 puts -nonewline $fd $zChildPage
241 close $fd
358 set fd [open corrupt.db r+]
359 seek $fd 0 end
360 puts -nonewline $fd [string repeat x $nAppend]
361 close $fd
394 set fd [open corrupt.db r+]
395 fconfigure $fd -translation binary -encoding binary
396 seek $fd [expr 1024*2 + 8]
397 set zRightChild [read $fd 4]
399 seek $fd [expr 1024*($iRightChild-1)]
400 puts -nonewline $fd "\x0D"
401 close $fd
412 set fd [open corrupt.db r+]
413 fconfigure $fd -translation binary -encoding binary
414 seek $fd [expr 1024*2 + 12]
415 set zCellOffset [read $fd 2]
417 seek $fd [expr 1024*2 + $iCellOffset]
418 set zChild [read $fd 4]
420 seek $fd [expr 1024*($iChild-1)+3]
421 puts -nonewline $fd "\xFFFF"
422 close $fd
433 set fd [open corrupt.db r+]
434 fconfigure $fd -translation binary -encoding binary
435 seek $fd [expr 1024*1 + 8]
436 set zRightChild [read $fd 4]
438 seek $fd [expr 1024*($iRightChild-1)]
439 puts -nonewline $fd "\x0A"
440 close $fd
461 set fd [open corrupt.db r+]
462 fconfigure $fd -translation binary -encoding binary
463 seek $fd 108
464 set zRightChild [read $fd 4]
466 seek $fd [expr 1024*($iRightChild-1)+3]
467 puts -nonewline $fd "\x00\x00"
468 close $fd