summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ZText.h3
-rw-r--r--noncore/apps/opie-reader/ztxt.h27
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,16 +1,17 @@
1#ifndef __Text_h 1#ifndef __Text_h
2#define __Text_h 2#define __Text_h
3#include <stdio.h> 3#include <stdio.h>
4#include <zlib.h> 4#include "zlib/zlib.h"
5//#include <zlib.h>
5#include <sys/stat.h> 6#include <sys/stat.h>
6 7
7#include "CExpander.h" 8#include "CExpander.h"
8 9
9class Text: public CExpander { 10class Text: public CExpander {
10 gzFile file; 11 gzFile file;
11 unsigned long fsize; 12 unsigned long fsize;
12public: 13public:
13 Text() : file(NULL) {}; 14 Text() : file(NULL) {};
14 virtual ~Text() 15 virtual ~Text()
15 { 16 {
16 if (file != NULL) gzclose(file); 17 if (file != NULL) gzclose(file);
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,17 +1,18 @@
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 <zlib.h>
6#include "pdb.h" 7#include "pdb.h"
7/* 8/*
8 * Stuff common to both Weasel Reader and makeztxt 9 * Stuff common to both Weasel Reader and makeztxt
9 * 10 *
10 * $Id$ 11 * $Id$
11 * 12 *
12 */ 13 */
13 14
14#ifndef _WEASEL_COMMON_H_ 15#ifndef _WEASEL_COMMON_H_
15#define _WEASEL_COMMON_H_ 1 16#define _WEASEL_COMMON_H_ 1
16 17
17 18
@@ -67,36 +68,36 @@ class ztxt : public CExpander, Cpdb
67 UInt32 buffersize; 68 UInt32 buffersize;
68 UInt32 buffercontent; 69 UInt32 buffercontent;
69 UInt8* expandedtextbuffer; 70 UInt8* expandedtextbuffer;
70 UInt8* compressedtextbuffer; 71 UInt8* compressedtextbuffer;
71 z_stream zstream; 72 z_stream zstream;
72 size_t bufferpos; 73 size_t bufferpos;
73 UInt16 bufferrec; 74 UInt16 bufferrec;
74 zTXT_record0 hdr0; 75 zTXT_record0 hdr0;
75 size_t currentpos; 76 size_t currentpos;
76 void home(); 77 void home();
77 public: 78 public:
78 virtual void sizes(unsigned long& _file, unsigned long& _text) 79 virtual void sizes(unsigned long& _file, unsigned long& _text)
79 { 80 {
80 _file = file_length; 81 _file = file_length;
81 _text = ntohl(hdr0.size); 82 _text = ntohl(hdr0.size);
82 } 83 }
83 virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); } 84 virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); }
84 virtual ~ztxt() 85 virtual ~ztxt()
85 { 86 {
86 if (expandedtextbuffer != NULL) delete [] expandedtextbuffer; 87 if (expandedtextbuffer != NULL) delete [] expandedtextbuffer;
87 if (compressedtextbuffer != NULL) delete [] compressedtextbuffer; 88 if (compressedtextbuffer != NULL) delete [] compressedtextbuffer;
88 if (bInit) 89 if (bInit)
89 { 90 {
90 inflateEnd(&zstream); 91 inflateEnd(&zstream);
91 } 92 }
92 } 93 }
93 ztxt(); 94 ztxt();
94 virtual int openfile(const char *src); 95 virtual int openfile(const char *src);
95 virtual int getch(); 96 virtual int getch();
96 virtual unsigned int locate(); 97 virtual unsigned int locate();
97 virtual void locate(unsigned int n); 98 virtual void locate(unsigned int n);
98 virtual CList<Bkmk>* getbkmklist(); 99 virtual CList<Bkmk>* getbkmklist();
99}; 100};
100 101
101#endif 102#endif
102 103