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.h | |
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.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/pdb.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/noncore/apps/opie-reader/pdb.h b/noncore/apps/opie-reader/pdb.h index eac3ae6..7a6580d 100644 --- a/noncore/apps/opie-reader/pdb.h +++ b/noncore/apps/opie-reader/pdb.h | |||
@@ -10,16 +10,18 @@ | |||
10 | 10 | ||
11 | #ifndef __PDB_H__ | 11 | #ifndef __PDB_H__ |
12 | #define __PDB_H__ | 12 | #define __PDB_H__ |
13 | 13 | ||
14 | #ifndef _WINDOWS | 14 | #ifndef _WINDOWS |
15 | #include <netinet/in.h> | 15 | #include <netinet/in.h> |
16 | #endif | 16 | #endif |
17 | #include <stdio.h> | 17 | #include <stdio.h> |
18 | #include "useqpe.h" | ||
19 | #include "CExpander.h" | ||
18 | 20 | ||
19 | /* Normal Palm typedefs */ | 21 | /* Normal Palm typedefs */ |
20 | typedef unsigned char UInt8; | 22 | typedef unsigned char UInt8; |
21 | typedef unsigned short UInt16; | 23 | typedef unsigned short UInt16; |
22 | typedef signed short Int16; | 24 | typedef signed short Int16; |
23 | typedef unsigned long UInt32; | 25 | typedef unsigned long UInt32; |
24 | typedef UInt32 LocalID; | 26 | typedef UInt32 LocalID; |
25 | 27 | ||
@@ -71,23 +73,29 @@ typedef struct { | |||
71 | // 3 bytes of this is used (in | 73 | // 3 bytes of this is used (in |
72 | // RecordEntryType.uniqueID). | 74 | // RecordEntryType.uniqueID). |
73 | // We are keeping 4 bytes for | 75 | // We are keeping 4 bytes for |
74 | // alignment purposes. | 76 | // alignment purposes. |
75 | RecordListType recordList; // first record list | 77 | RecordListType recordList; // first record list |
76 | } DatabaseHdrType; | 78 | } DatabaseHdrType; |
77 | 79 | ||
78 | 80 | ||
79 | class Cpdb | 81 | class Cpdb : public CExpander |
80 | { | 82 | { |
81 | protected: | 83 | protected: |
82 | size_t file_length; | 84 | size_t file_length; |
83 | FILE* fin; | 85 | FILE* fin; |
84 | size_t recordpos(int); | 86 | size_t recordpos(int); |
85 | size_t recordlength(int); | 87 | size_t recordlength(int); |
86 | void gotorecordnumber(int); | 88 | void gotorecordnumber(int); |
87 | DatabaseHdrType head; | 89 | DatabaseHdrType head; |
88 | bool openfile(const char* src); | 90 | bool openpdbfile(const char* src); |
89 | Cpdb() : fin(NULL) {} | 91 | Cpdb() : fin(NULL) {} |
90 | ~Cpdb() { if (fin != NULL) fclose(fin); } | 92 | ~Cpdb(); |
93 | #ifdef USEQPE | ||
94 | void suspend(); | ||
95 | void unsuspend(); | ||
96 | #endif | ||
97 | public: | ||
98 | virtual void sizes(unsigned long& _file, unsigned long& _text) = 0; | ||
91 | }; | 99 | }; |
92 | #endif | 100 | #endif |
93 | 101 | ||