Diffstat (limited to 'noncore/apps/opie-reader/ztxt.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/ztxt.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/noncore/apps/opie-reader/ztxt.h b/noncore/apps/opie-reader/ztxt.h index 7be45c0..20558a6 100644 --- a/noncore/apps/opie-reader/ztxt.h +++ b/noncore/apps/opie-reader/ztxt.h | |||
@@ -1,17 +1,17 @@ | |||
1 | #ifndef __ztxt_h | 1 | #ifndef __ztxt_h |
2 | #define __ztxt_h | 2 | #define __ztxt_h |
3 | 3 | ||
4 | #include "CExpander.h" | 4 | #include "CExpander.h" |
5 | #include <zlib.h> | 5 | #include "zlib/zlib.h" |
6 | #include "pdb.h" | 6 | #include "pdb.h" |
7 | /* | 7 | /* |
8 | * Stuff common to both Weasel Reader and makeztxt | 8 | * Stuff common to both Weasel Reader and makeztxt |
9 | * | 9 | * |
10 | * $Id$ | 10 | * $Id$ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #ifndef _WEASEL_COMMON_H_ | 14 | #ifndef _WEASEL_COMMON_H_ |
15 | #define _WEASEL_COMMON_H_ 1 | 15 | #define _WEASEL_COMMON_H_ 1 |
16 | 16 | ||
17 | 17 | ||
@@ -67,39 +67,39 @@ class ztxt : public CExpander, Cpdb | |||
67 | UInt32 buffersize; | 67 | UInt32 buffersize; |
68 | UInt32 buffercontent; | 68 | UInt32 buffercontent; |
69 | UInt8* expandedtextbuffer; | 69 | UInt8* expandedtextbuffer; |
70 | UInt8* compressedtextbuffer; | 70 | UInt8* compressedtextbuffer; |
71 | z_stream zstream; | 71 | z_stream zstream; |
72 | size_t bufferpos; | 72 | size_t bufferpos; |
73 | UInt16 bufferrec; | 73 | UInt16 bufferrec; |
74 | zTXT_record0 hdr0; | 74 | zTXT_record0 hdr0; |
75 | size_t currentpos; | 75 | size_t currentpos; |
76 | void home(); | 76 | void home(); |
77 | public: | 77 | public: |
78 | virtual void sizes(unsigned long& _file, unsigned long& _text) | 78 | virtual void sizes(unsigned long& _file, unsigned long& _text) |
79 | { | 79 | { |
80 | _file = file_length; | 80 | _file = file_length; |
81 | _text = ntohl(hdr0.size); | 81 | _text = ntohl(hdr0.size); |
82 | } | 82 | } |
83 | virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); } | 83 | virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); } |
84 | virtual ~ztxt() | 84 | virtual ~ztxt() |
85 | { | 85 | { |
86 | if (expandedtextbuffer != NULL) delete [] expandedtextbuffer; | 86 | if (expandedtextbuffer != NULL) delete [] expandedtextbuffer; |
87 | if (compressedtextbuffer != NULL) delete [] compressedtextbuffer; | 87 | if (compressedtextbuffer != NULL) delete [] compressedtextbuffer; |
88 | if (bInit) | 88 | if (bInit) |
89 | { | 89 | { |
90 | inflateEnd(&zstream); | 90 | inflateEnd(&zstream); |
91 | } | 91 | } |
92 | } | 92 | } |
93 | ztxt(); | 93 | ztxt(); |
94 | virtual int openfile(const char *src); | 94 | virtual int openfile(const char *src); |
95 | virtual int getch(); | 95 | virtual int getch(); |
96 | virtual unsigned int locate(); | 96 | virtual unsigned int locate(); |
97 | virtual void locate(unsigned int n); | 97 | virtual void locate(unsigned int n); |
98 | virtual CList<Bkmk>* getbkmklist(); | 98 | virtual CList<Bkmk>* getbkmklist(); |
99 | virtual MarkupType PreferredMarkup() | 99 | virtual MarkupType PreferredMarkup() |
100 | { | 100 | { |
101 | return cTEXT; | 101 | return cTEXT; |
102 | } | 102 | } |
103 | }; | 103 | }; |
104 | 104 | ||
105 | #endif | 105 | #endif |