author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (unidiff) | |
tree | 1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/pdb.cpp | |
parent | e90847c784c48bd21bf8768cb38edb853b832697 (diff) | |
download | opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2 |
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/pdb.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/pdb.cpp | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/noncore/apps/opie-reader/pdb.cpp b/noncore/apps/opie-reader/pdb.cpp index dca67ff..39551cc 100644 --- a/noncore/apps/opie-reader/pdb.cpp +++ b/noncore/apps/opie-reader/pdb.cpp | |||
@@ -5,2 +5,26 @@ | |||
5 | 5 | ||
6 | #include "useqpe.h" | ||
7 | |||
8 | #ifdef USEQPE | ||
9 | void Cpdb::suspend() | ||
10 | { | ||
11 | CExpander::suspend(fin); | ||
12 | } | ||
13 | void Cpdb::unsuspend() | ||
14 | { | ||
15 | CExpander::unsuspend(fin); | ||
16 | } | ||
17 | #endif | ||
18 | |||
19 | Cpdb::~Cpdb() | ||
20 | { | ||
21 | if (fin != NULL) | ||
22 | { | ||
23 | #ifdef USEQPE | ||
24 | unsuspend(); | ||
25 | #endif | ||
26 | fclose(fin); | ||
27 | } | ||
28 | } | ||
29 | |||
6 | size_t Cpdb::recordpos(int n) | 30 | size_t Cpdb::recordpos(int n) |
@@ -34,7 +58,7 @@ void Cpdb::gotorecordnumber(int n) | |||
34 | 58 | ||
35 | bool Cpdb::openfile(const char *src) | 59 | bool Cpdb::openpdbfile(const char *src) |
36 | { | 60 | { |
61 | //qDebug("cpdb openfile:%s", src); | ||
37 | 62 | ||
38 | // printf("In openfile\n"); | 63 | // printf("In openfile\n"); |
39 | int ret = 0; | ||
40 | // printf("closing fin:%x\n",fin); | 64 | // printf("closing fin:%x\n",fin); |
@@ -51,4 +75,7 @@ bool Cpdb::openfile(const char *src) | |||
51 | //char buf[0x100]; | 75 | //char buf[0x100]; |
52 | fseek(fin,0,SEEK_END); | 76 | struct stat _stat; |
53 | file_length = ftell(fin); | 77 | stat(src,&_stat); |
78 | file_length = _stat.st_size; | ||
79 | // fseek(fin,0,SEEK_END); | ||
80 | // file_length = ftell(fin); | ||
54 | 81 | ||
@@ -58,2 +85,5 @@ bool Cpdb::openfile(const char *src) | |||
58 | 85 | ||
86 | qDebug("Database name:%s", head.name); | ||
87 | qDebug("Total number of records:%u", ntohs(head.recordList.numRecords)); | ||
88 | |||
59 | return true; | 89 | return true; |