author | llornkcor <llornkcor> | 2002-12-20 01:35:01 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-12-20 01:35:01 (UTC) |
commit | 876e1a4724a7bd75dc642e295de354241096e028 (patch) (unidiff) | |
tree | a37c5dcc9d78e04bb6b859ab89d8cf81e6745087 /noncore/apps/opie-reader/pdb.cpp | |
parent | 5fd6636ba3d94b48dd543887316c47c5388a43c2 (diff) | |
download | opie-876e1a4724a7bd75dc642e295de354241096e028.zip opie-876e1a4724a7bd75dc642e295de354241096e028.tar.gz opie-876e1a4724a7bd75dc642e295de354241096e028.tar.bz2 |
update - sorry it took so long. hope this works correctly
Diffstat (limited to 'noncore/apps/opie-reader/pdb.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/pdb.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
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,3 +1,6 @@ | |||
1 | #include "pdb.h" | 1 | #include "pdb.h" |
2 | #include <sys/types.h> | ||
3 | #include <sys/stat.h> | ||
4 | #include <unistd.h> | ||
2 | 5 | ||
3 | size_t Cpdb::recordpos(int n) | 6 | size_t Cpdb::recordpos(int n) |
@@ -47,8 +50,11 @@ bool Cpdb::openfile(const char *src) | |||
47 | // just holds the first few chars of the file | 50 | // just holds the first few chars of the file |
48 | //char buf[0x100]; | 51 | //char buf[0x100]; |
49 | fseek(fin,0,SEEK_END); | 52 | struct stat buf; |
50 | file_length = ftell(fin); | 53 | stat(src, &buf); |
54 | file_length = buf.st_size; | ||
55 | // fseek(fin,0,SEEK_END); | ||
56 | // file_length = ftell(fin); | ||
51 | 57 | ||
52 | fseek(fin,0,SEEK_SET); | 58 | // fseek(fin,0,SEEK_SET); |
53 | 59 | ||
54 | fread(&head, 1, sizeof(head), fin); | 60 | fread(&head, 1, sizeof(head), fin); |