author | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
commit | 118d03d815a7615b9c53363218a7ac45b3f4c514 (patch) (unidiff) | |
tree | 356953e2413cddcec0f35bd47bb6439767da7051 /noncore/apps/opie-reader/pdb.cpp | |
parent | 00894537decf01c5a5cdc565b2740b5e67a2e90f (diff) | |
download | opie-118d03d815a7615b9c53363218a7ac45b3f4c514.zip opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.gz opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.bz2 |
Incorporated TimWs current source tree and make it compile
Diffstat (limited to 'noncore/apps/opie-reader/pdb.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/pdb.cpp | 15 |
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,6 +1,6 @@ | |||
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 | ||
6 | size_t Cpdb::recordpos(int n) | 6 | size_t Cpdb::recordpos(int n) |
@@ -50,11 +50,8 @@ bool Cpdb::openfile(const char *src) | |||
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); |