author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff) | |
tree | 1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/ztxt.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/ztxt.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/ztxt.h | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/noncore/apps/opie-reader/ztxt.h b/noncore/apps/opie-reader/ztxt.h index 709a055..f544b01 100644 --- a/noncore/apps/opie-reader/ztxt.h +++ b/noncore/apps/opie-reader/ztxt.h @@ -1,33 +1,32 @@ #ifndef __ztxt_h #define __ztxt_h -#include "useqpe.h"
#include "CExpander.h" #include <zlib.h> #include "pdb.h" -#ifdef _WINDOWS
-#include <winsock.h>
-#endif
-
+#ifdef _WINDOWS +#include <winsock.h> +#endif + /* * Stuff common to both Weasel Reader and makeztxt * * $Id$ * */ #ifndef _WEASEL_COMMON_H_ #define _WEASEL_COMMON_H_ 1 /* Padding is no good */ #if defined(__GNUC__) && defined(__UNIX__) -# pragma pack(2) +//# pragma pack(2) #endif /* The default creator is Weasel Reader 'GPlm' */ #define GPLM_CREATOR_ID "GPlm" /* Databases of type 'zTXT' */ #define ZTXT_TYPE_ID "zTXT" /* Size of one database record */ #define RECORD_SIZE 8192 @@ -53,48 +52,39 @@ typedef struct zTXT_record0Type { UInt16 annotationRecord; /* Record # of annotation index */ UInt8 randomAccess; /* 1 if compressed w/Z_FULL_FLUSH */ UInt8 padding[0x20 - 19]; /* Pad to a size of 0x20 bytes */ } zTXT_record0; struct zTXTbkmk { UInt32 offset; - tchar title[MAX_BMRK_LENGTH]; + unsigned char title[MAX_BMRK_LENGTH]; }; #endif const UInt32 ZTXT_ID = 0x5458547a; -class ztxt : public CExpander, Cpdb +class ztxt : public Cpdb { bool bInit; 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: -#ifdef USEQPE
- void suspend() - { - CExpander::suspend(fin); - } - void unsuspend() - { - CExpander::unsuspend(fin); - }
-#endif + QString about() { return QString("Weasel codec (c) Tim Wentford"); } void sizes(unsigned long& _file, unsigned long& _text) { _file = file_length; _text = ntohl(hdr0.size); } bool hasrandomaccess() { return (hdr0.randomAccess != 0); } virtual ~ztxt() { |