author | llornkcor <llornkcor> | 2002-09-14 02:19:09 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-09-14 02:19:09 (UTC) |
commit | 2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975 (patch) (side-by-side diff) | |
tree | eeed16b5f80dd5883991a7a06133f5f7a6936256 /noncore/apps/opie-reader/ztxt.h | |
parent | 5a95ed6a000a56849b8f093deea500214856c626 (diff) | |
download | opie-2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975.zip opie-2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975.tar.gz opie-2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975.tar.bz2 |
update by Tim
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, 17 insertions, 15 deletions
diff --git a/noncore/apps/opie-reader/ztxt.h b/noncore/apps/opie-reader/ztxt.h index 6352cfc..7be45c0 100644 --- a/noncore/apps/opie-reader/ztxt.h +++ b/noncore/apps/opie-reader/ztxt.h @@ -1,18 +1,17 @@ #ifndef __ztxt_h #define __ztxt_h #include "CExpander.h" -#include "zlib/zlib.h" -//#include <zlib.h> +#include <zlib.h> #include "pdb.h" /* * Stuff common to both Weasel Reader and makeztxt * * $Id$ * */ #ifndef _WEASEL_COMMON_H_ #define _WEASEL_COMMON_H_ 1 @@ -68,36 +67,39 @@ class ztxt : public CExpander, Cpdb UInt32 buffersize; UInt32 buffercontent; UInt8* expandedtextbuffer; UInt8* compressedtextbuffer; z_stream zstream; size_t bufferpos; UInt16 bufferrec; zTXT_record0 hdr0; size_t currentpos; void home(); public: virtual void sizes(unsigned long& _file, unsigned long& _text) - { - _file = file_length; - _text = ntohl(hdr0.size); - } + { + _file = file_length; + _text = ntohl(hdr0.size); + } virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); } virtual ~ztxt() - { - if (expandedtextbuffer != NULL) delete [] expandedtextbuffer; - if (compressedtextbuffer != NULL) delete [] compressedtextbuffer; - if (bInit) - { - inflateEnd(&zstream); - } - } + { + if (expandedtextbuffer != NULL) delete [] expandedtextbuffer; + if (compressedtextbuffer != NULL) delete [] compressedtextbuffer; + if (bInit) + { + inflateEnd(&zstream); + } + } ztxt(); virtual int openfile(const char *src); virtual int getch(); virtual unsigned int locate(); virtual void locate(unsigned int n); virtual CList<Bkmk>* getbkmklist(); + virtual MarkupType PreferredMarkup() + { + return cTEXT; + } }; #endif - |