summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ztxt.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/ztxt.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ztxt.h42
1 files changed, 25 insertions, 17 deletions
diff --git a/noncore/apps/opie-reader/ztxt.h b/noncore/apps/opie-reader/ztxt.h
index 20558a6..d7cb96a 100644
--- a/noncore/apps/opie-reader/ztxt.h
+++ b/noncore/apps/opie-reader/ztxt.h
@@ -74,32 +74,40 @@ class ztxt : public CExpander, Cpdb
74 zTXT_record0 hdr0; 74 zTXT_record0 hdr0;
75 size_t currentpos; 75 size_t currentpos;
76 void home(); 76 void home();
77 public: 77public:
78 virtual void suspend()
79 {
80 CExpander::suspend(fin);
81 }
82 virtual void unsuspend()
83 {
84 CExpander::unsuspend(fin);
85 }
78 virtual void sizes(unsigned long& _file, unsigned long& _text) 86 virtual void sizes(unsigned long& _file, unsigned long& _text)
79 { 87 {
80 _file = file_length; 88 _file = file_length;
81 _text = ntohl(hdr0.size); 89 _text = ntohl(hdr0.size);
82 } 90 }
83 virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); } 91 virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); }
84 virtual ~ztxt() 92 virtual ~ztxt()
85 { 93 {
86 if (expandedtextbuffer != NULL) delete [] expandedtextbuffer; 94 if (expandedtextbuffer != NULL) delete [] expandedtextbuffer;
87 if (compressedtextbuffer != NULL) delete [] compressedtextbuffer; 95 if (compressedtextbuffer != NULL) delete [] compressedtextbuffer;
88 if (bInit) 96 if (bInit)
89 { 97 {
90 inflateEnd(&zstream); 98 inflateEnd(&zstream);
91 } 99 }
92 } 100 }
93 ztxt(); 101 ztxt();
94 virtual int openfile(const char *src); 102 virtual int OpenFile(const char *src);
95 virtual int getch(); 103 virtual int getch();
96 virtual unsigned int locate(); 104 virtual unsigned int locate();
97 virtual void locate(unsigned int n); 105 virtual void locate(unsigned int n);
98 virtual CList<Bkmk>* getbkmklist(); 106 virtual CList<Bkmk>* getbkmklist();
99 virtual MarkupType PreferredMarkup() 107 virtual MarkupType PreferredMarkup()
100 { 108 {
101 return cTEXT; 109 return cTEXT;
102 } 110 }
103}; 111};
104 112
105#endif 113#endif