Diffstat (limited to 'noncore/apps/opie-reader/ztxt.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/ztxt.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/noncore/apps/opie-reader/ztxt.h b/noncore/apps/opie-reader/ztxt.h index d7cb96a..709a055 100644 --- a/noncore/apps/opie-reader/ztxt.h +++ b/noncore/apps/opie-reader/ztxt.h | |||
@@ -1,12 +1,17 @@ | |||
1 | #ifndef __ztxt_h | 1 | #ifndef __ztxt_h |
2 | #define __ztxt_h | 2 | #define __ztxt_h |
3 | 3 | ||
4 | #include "useqpe.h" | ||
4 | #include "CExpander.h" | 5 | #include "CExpander.h" |
5 | #include "zlib/zlib.h" | 6 | #include <zlib.h> |
6 | #include "pdb.h" | 7 | #include "pdb.h" |
8 | #ifdef _WINDOWS | ||
9 | #include <winsock.h> | ||
10 | #endif | ||
11 | |||
7 | /* | 12 | /* |
8 | * Stuff common to both Weasel Reader and makeztxt | 13 | * Stuff common to both Weasel Reader and makeztxt |
9 | * | 14 | * |
10 | * $Id$ | 15 | * $Id$ |
11 | * | 16 | * |
12 | */ | 17 | */ |
@@ -72,42 +77,44 @@ class ztxt : public CExpander, Cpdb | |||
72 | size_t bufferpos; | 77 | size_t bufferpos; |
73 | UInt16 bufferrec; | 78 | UInt16 bufferrec; |
74 | zTXT_record0 hdr0; | 79 | zTXT_record0 hdr0; |
75 | size_t currentpos; | 80 | size_t currentpos; |
76 | void home(); | 81 | void home(); |
77 | public: | 82 | public: |
78 | virtual void suspend() | 83 | #ifdef USEQPE |
84 | void suspend() | ||
79 | { | 85 | { |
80 | CExpander::suspend(fin); | 86 | CExpander::suspend(fin); |
81 | } | 87 | } |
82 | virtual void unsuspend() | 88 | void unsuspend() |
83 | { | 89 | { |
84 | CExpander::unsuspend(fin); | 90 | CExpander::unsuspend(fin); |
85 | } | 91 | } |
86 | virtual void sizes(unsigned long& _file, unsigned long& _text) | 92 | #endif |
93 | void sizes(unsigned long& _file, unsigned long& _text) | ||
87 | { | 94 | { |
88 | _file = file_length; | 95 | _file = file_length; |
89 | _text = ntohl(hdr0.size); | 96 | _text = ntohl(hdr0.size); |
90 | } | 97 | } |
91 | virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); } | 98 | bool hasrandomaccess() { return (hdr0.randomAccess != 0); } |
92 | virtual ~ztxt() | 99 | virtual ~ztxt() |
93 | { | 100 | { |
94 | if (expandedtextbuffer != NULL) delete [] expandedtextbuffer; | 101 | if (expandedtextbuffer != NULL) delete [] expandedtextbuffer; |
95 | if (compressedtextbuffer != NULL) delete [] compressedtextbuffer; | 102 | if (compressedtextbuffer != NULL) delete [] compressedtextbuffer; |
96 | if (bInit) | 103 | if (bInit) |
97 | { | 104 | { |
98 | inflateEnd(&zstream); | 105 | inflateEnd(&zstream); |
99 | } | 106 | } |
100 | } | 107 | } |
101 | ztxt(); | 108 | ztxt(); |
102 | virtual int OpenFile(const char *src); | 109 | int OpenFile(const char *src); |
103 | virtual int getch(); | 110 | int getch(); |
104 | virtual unsigned int locate(); | 111 | unsigned int locate(); |
105 | virtual void locate(unsigned int n); | 112 | void locate(unsigned int n); |
106 | virtual CList<Bkmk>* getbkmklist(); | 113 | CList<Bkmk>* getbkmklist(); |
107 | virtual MarkupType PreferredMarkup() | 114 | MarkupType PreferredMarkup() |
108 | { | 115 | { |
109 | return cTEXT; | 116 | return cTEXT; |
110 | } | 117 | } |
111 | }; | 118 | }; |
112 | 119 | ||
113 | #endif | 120 | #endif |