From 8dca48b3ea3da0ceffda79d4047b1ef2c75e569c Mon Sep 17 00:00:00 2001 From: ehouse Date: Sun, 29 Mar 2009 18:13:09 +0000 Subject: [PATCH] Useful ftell, commented out. --- xwords4/dawg/dawg2dict.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xwords4/dawg/dawg2dict.pl b/xwords4/dawg/dawg2dict.pl index d6526d113..b4565cd34 100755 --- a/xwords4/dawg/dawg2dict.pl +++ b/xwords4/dawg/dawg2dict.pl @@ -28,6 +28,9 @@ my $gDoRaw = 0; my $gFileType; my $gNodeSize; +use Fcntl 'SEEK_CUR'; +sub systell { sysseek($_[0], 0, SEEK_CUR) } + sub usage() { print STDERR "USAGE: $0 " . "[-raw] " @@ -177,8 +180,10 @@ sub prepXWD($$$$) { getSpecials( $fh, $nSpecials, \@specials ); mergeSpecials( $facRef, \@specials ); +# printf STDERR "at 0x%x before offset read\n", systell($fh); sysread( $fh, $buf, 4 ); $$startRef = unpack( 'N', $buf ); +# print STDERR "startRef=$$startRef\n"; my @nodes = readNodesToEnd( $fh );