author | llornkcor <llornkcor> | 2002-07-02 18:30:57 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-02 18:30:57 (UTC) |
commit | 2481ac4013794f95c53580f99b4b761142e4ee8f (patch) (side-by-side diff) | |
tree | 4f8b61c5ab815d0d3e09d518d4cb2560d185a238 | |
parent | df2935231cbc82bf03037453261bfcef1970de63 (diff) | |
download | opie-2481ac4013794f95c53580f99b4b761142e4ee8f.zip opie-2481ac4013794f95c53580f99b4b761142e4ee8f.tar.gz opie-2481ac4013794f95c53580f99b4b761142e4ee8f.tar.bz2 |
changed zlib header includes
-rw-r--r-- | noncore/apps/opie-reader/ZText.h | 3 | ||||
-rw-r--r-- | noncore/apps/opie-reader/ztxt.h | 27 |
2 files changed, 16 insertions, 14 deletions
diff --git a/noncore/apps/opie-reader/ZText.h b/noncore/apps/opie-reader/ZText.h index 2848af7..4b1b96e 100644 --- a/noncore/apps/opie-reader/ZText.h +++ b/noncore/apps/opie-reader/ZText.h @@ -1,28 +1,29 @@ #ifndef __Text_h #define __Text_h #include <stdio.h> -#include <zlib.h> +#include "zlib/zlib.h" +//#include <zlib.h> #include <sys/stat.h> #include "CExpander.h" class Text: public CExpander { gzFile file; unsigned long fsize; public: Text() : file(NULL) {}; virtual ~Text() { if (file != NULL) gzclose(file); } virtual int openfile(const char *src) { if (file != NULL) gzclose(file); struct stat _stat; stat(src,&_stat); fsize = _stat.st_size; return ((file = gzopen(src,"rb")) == NULL); } virtual int getch() { return gzgetc(file); } virtual unsigned int locate() { return gztell(file); } virtual void locate(unsigned int n) { gzseek(file,n,SEEK_SET); } diff --git a/noncore/apps/opie-reader/ztxt.h b/noncore/apps/opie-reader/ztxt.h index b8ad29c..6352cfc 100644 --- a/noncore/apps/opie-reader/ztxt.h +++ b/noncore/apps/opie-reader/ztxt.h @@ -1,29 +1,30 @@ #ifndef __ztxt_h #define __ztxt_h #include "CExpander.h" -#include <zlib.h> +#include "zlib/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 /* Padding is no good */ #if defined(__GNUC__) && defined(__UNIX__) # 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 /* Allow largest WBIT size for data. Lower with command line options @@ -55,48 +56,48 @@ struct zTXTbkmk UInt32 offset; tchar title[MAX_BMRK_LENGTH]; }; #endif const UInt32 ZTXT_ID = 0x5458547a; class ztxt : public CExpander, 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: 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(); }; #endif |