From 876e1a4724a7bd75dc642e295de354241096e028 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Fri, 20 Dec 2002 01:35:01 +0000 Subject: update - sorry it took so long. hope this works correctly --- (limited to 'noncore/apps/opie-reader/pdb.cpp') diff --git a/noncore/apps/opie-reader/pdb.cpp b/noncore/apps/opie-reader/pdb.cpp index 68b904e..3054424 100644 --- a/noncore/apps/opie-reader/pdb.cpp +++ b/noncore/apps/opie-reader/pdb.cpp @@ -1,4 +1,7 @@ #include "pdb.h" +#include +#include +#include size_t Cpdb::recordpos(int n) { @@ -46,10 +49,13 @@ bool Cpdb::openfile(const char *src) // just holds the first few chars of the file // char buf[0x100]; - fseek(fin,0,SEEK_END); - file_length = ftell(fin); + struct stat buf; + stat(src, &buf); + file_length = buf.st_size; +// fseek(fin,0,SEEK_END); +// file_length = ftell(fin); - fseek(fin,0,SEEK_SET); +// fseek(fin,0,SEEK_SET); fread(&head, 1, sizeof(head), fin); -- cgit v0.9.0.2