summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/pdb.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/pdb.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/pdb.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/noncore/apps/opie-reader/pdb.cpp b/noncore/apps/opie-reader/pdb.cpp
index 3054424..dca67ff 100644
--- a/noncore/apps/opie-reader/pdb.cpp
+++ b/noncore/apps/opie-reader/pdb.cpp
@@ -1,7 +1,7 @@
1#include "pdb.h" 1#include "pdb.h"
2#include <sys/types.h> 2#ifdef _WINDOWS
3#include <sys/stat.h> 3#include <winsock2.h>
4#include <unistd.h> 4#endif
5 5
6size_t Cpdb::recordpos(int n) 6size_t Cpdb::recordpos(int n)
7{ 7{
@@ -49,13 +49,10 @@ bool Cpdb::openfile(const char *src)
49 49
50 // just holds the first few chars of the file 50 // just holds the first few chars of the file
51 //char buf[0x100]; 51 //char buf[0x100];
52 struct stat buf; 52 fseek(fin,0,SEEK_END);
53 stat(src, &buf); 53 file_length = ftell(fin);
54 file_length = buf.st_size;
55// fseek(fin,0,SEEK_END);
56// file_length = ftell(fin);
57 54
58// fseek(fin,0,SEEK_SET); 55 fseek(fin,0,SEEK_SET);
59 56
60 fread(&head, 1, sizeof(head), fin); 57 fread(&head, 1, sizeof(head), fin);
61 58