summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-09-14 03:10:21 (UTC)
committer llornkcor <llornkcor>2002-09-14 03:10:21 (UTC)
commita17482a473c90c7e030bbf7a03b252fdaf53c2ed (patch) (unidiff)
treef97827d63f6a8d40ad9df7bc96907a2bdcfc3be2
parent2f55be65436cb05a8580f4a436f94bce9de48da7 (diff)
downloadopie-a17482a473c90c7e030bbf7a03b252fdaf53c2ed.zip
opie-a17482a473c90c7e030bbf7a03b252fdaf53c2ed.tar.gz
opie-a17482a473c90c7e030bbf7a03b252fdaf53c2ed.tar.bz2
zlib.h include dir change
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ZText.h4
-rw-r--r--noncore/apps/opie-reader/plucker.h24
-rw-r--r--noncore/apps/opie-reader/ztxt.h32
3 files changed, 30 insertions, 30 deletions
diff --git a/noncore/apps/opie-reader/ZText.h b/noncore/apps/opie-reader/ZText.h
index 9e72161..debfe8c 100644
--- a/noncore/apps/opie-reader/ZText.h
+++ b/noncore/apps/opie-reader/ZText.h
@@ -1,39 +1,39 @@
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 <sys/stat.h> 5#include <sys/stat.h>
6 6
7#include "CExpander.h" 7#include "CExpander.h"
8 8
9class Text: public CExpander { 9class Text: public CExpander {
10 gzFile file; 10 gzFile file;
11 unsigned long fsize; 11 unsigned long fsize;
12public: 12public:
13 Text() : file(NULL) {}; 13 Text() : file(NULL) {};
14 virtual ~Text() 14 virtual ~Text()
15 { 15 {
16 if (file != NULL) gzclose(file); 16 if (file != NULL) gzclose(file);
17 } 17 }
18 virtual int openfile(const char *src) 18 virtual int openfile(const char *src)
19 { 19 {
20 if (file != NULL) gzclose(file); 20 if (file != NULL) gzclose(file);
21 struct stat _stat; 21 struct stat _stat;
22 stat(src,&_stat); 22 stat(src,&_stat);
23 fsize = _stat.st_size; 23 fsize = _stat.st_size;
24 return ((file = gzopen(src,"rb")) == NULL); 24 return ((file = gzopen(src,"rb")) == NULL);
25 } 25 }
26 virtual int getch() { return gzgetc(file); } 26 virtual int getch() { return gzgetc(file); }
27 virtual unsigned int locate() { return gztell(file); } 27 virtual unsigned int locate() { return gztell(file); }
28 virtual void locate(unsigned int n) { gzseek(file,n,SEEK_SET); } 28 virtual void locate(unsigned int n) { gzseek(file,n,SEEK_SET); }
29 virtual bool hasrandomaccess() { return true; } 29 virtual bool hasrandomaccess() { return true; }
30 virtual void sizes(unsigned long& _file, unsigned long& _text) 30 virtual void sizes(unsigned long& _file, unsigned long& _text)
31 { 31 {
32 _text = _file = fsize; 32 _text = _file = fsize;
33 } 33 }
34 virtual MarkupType PreferredMarkup() 34 virtual MarkupType PreferredMarkup()
35 { 35 {
36 return cTEXT; 36 return cTEXT;
37 } 37 }
38}; 38};
39#endif 39#endif
diff --git a/noncore/apps/opie-reader/plucker.h b/noncore/apps/opie-reader/plucker.h
index 84e855c..d3ca732 100644
--- a/noncore/apps/opie-reader/plucker.h
+++ b/noncore/apps/opie-reader/plucker.h
@@ -1,21 +1,21 @@
1#ifndef __plucker_h 1#ifndef __plucker_h
2#define __plucker_h 2#define __plucker_h
3 3
4#include "CExpander.h" 4#include "CExpander.h"
5#include <zlib.h> 5#include "zlib/zlib.h"
6#include "ztxt.h" 6#include "ztxt.h"
7#include "pdb.h" 7#include "pdb.h"
8#include "CBuffer.h" 8#include "CBuffer.h"
9 9
10struct CPlucker_dataRecord 10struct CPlucker_dataRecord
11{ 11{
12 UInt16 uid; 12 UInt16 uid;
13 UInt16 nParagraphs; 13 UInt16 nParagraphs;
14 UInt16 size; 14 UInt16 size;
15 UInt8 type; 15 UInt8 type;
16 UInt8 reserved; 16 UInt8 reserved;
17}; 17};
18 18
19struct CPlucker_record0 19struct CPlucker_record0
20{ 20{
21 UInt16 uid; 21 UInt16 uid;
@@ -45,42 +45,42 @@ class CPlucker : public CExpander, Cpdb
45 UInt32 buffersize; 45 UInt32 buffersize;
46 UInt32 buffercontent; 46 UInt32 buffercontent;
47 UInt8* expandedtextbuffer; 47 UInt8* expandedtextbuffer;
48 UInt8* compressedtextbuffer; 48 UInt8* compressedtextbuffer;
49 size_t bufferpos; 49 size_t bufferpos;
50 UInt16 bufferrec; 50 UInt16 bufferrec;
51 CPlucker_record0 hdr0; 51 CPlucker_record0 hdr0;
52 size_t currentpos; 52 size_t currentpos;
53 bool expand(int); 53 bool expand(int);
54 void UnZip(size_t, UInt8*, UInt16); 54 void UnZip(size_t, UInt8*, UInt16);
55 void UnDoc(size_t, UInt8*, UInt16); 55 void UnDoc(size_t, UInt8*, UInt16);
56 void expandimg(UInt16 tgt); 56 void expandimg(UInt16 tgt);
57 void home(); 57 void home();
58 int bgetch(); 58 int bgetch();
59 public: 59 public:
60 virtual void sizes(unsigned long& _file, unsigned long& _text) 60 virtual void sizes(unsigned long& _file, unsigned long& _text)
61 { 61 {
62 _file = file_length; 62 _file = file_length;
63 _text = textlength; 63 _text = textlength;
64//ntohl(hdr0.size); 64//ntohl(hdr0.size);
65 } 65 }
66 virtual bool hasrandomaccess() { return true; } 66 virtual bool hasrandomaccess() { return true; }
67 virtual ~CPlucker() 67 virtual ~CPlucker()
68 { 68 {
69 if (expandedtextbuffer != NULL) delete [] expandedtextbuffer; 69 if (expandedtextbuffer != NULL) delete [] expandedtextbuffer;
70 if (compressedtextbuffer != NULL) delete [] compressedtextbuffer; 70 if (compressedtextbuffer != NULL) delete [] compressedtextbuffer;
71 } 71 }
72 CPlucker(); 72 CPlucker();
73 virtual int openfile(const char *src); 73 virtual int openfile(const char *src);
74 virtual int getch(); 74 virtual int getch();
75 virtual void getch(int&, CStyle&); 75 virtual void getch(int&, CStyle&);
76 virtual unsigned int locate(); 76 virtual unsigned int locate();
77 virtual void locate(unsigned int n); 77 virtual void locate(unsigned int n);
78 virtual CList<Bkmk>* getbkmklist(); 78 virtual CList<Bkmk>* getbkmklist();
79 virtual bool hyperlink(unsigned int n); 79 virtual bool hyperlink(unsigned int n);
80 virtual MarkupType PreferredMarkup() 80 virtual MarkupType PreferredMarkup()
81 { 81 {
82 return cNONE; 82 return cNONE;
83 } 83 }
84}; 84};
85 85
86#endif 86#endif
diff --git a/noncore/apps/opie-reader/ztxt.h b/noncore/apps/opie-reader/ztxt.h
index 7be45c0..20558a6 100644
--- a/noncore/apps/opie-reader/ztxt.h
+++ b/noncore/apps/opie-reader/ztxt.h
@@ -1,21 +1,21 @@
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 "pdb.h" 6#include "pdb.h"
7/* 7/*
8 * Stuff common to both Weasel Reader and makeztxt 8 * Stuff common to both Weasel Reader and makeztxt
9 * 9 *
10 * $Id$ 10 * $Id$
11 * 11 *
12 */ 12 */
13 13
14#ifndef _WEASEL_COMMON_H_ 14#ifndef _WEASEL_COMMON_H_
15#define _WEASEL_COMMON_H_ 1 15#define _WEASEL_COMMON_H_ 1
16 16
17 17
18/* Padding is no good */ 18/* Padding is no good */
19#if defined(__GNUC__) && defined(__UNIX__) 19#if defined(__GNUC__) && defined(__UNIX__)
20# pragma pack(2) 20# pragma pack(2)
21#endif 21#endif
@@ -63,43 +63,43 @@ const UInt32 ZTXT_ID = 0x5458547a;
63 63
64class ztxt : public CExpander, Cpdb 64class ztxt : public CExpander, Cpdb
65{ 65{
66 bool bInit; 66 bool bInit;
67 UInt32 buffersize; 67 UInt32 buffersize;
68 UInt32 buffercontent; 68 UInt32 buffercontent;
69 UInt8* expandedtextbuffer; 69 UInt8* expandedtextbuffer;
70 UInt8* compressedtextbuffer; 70 UInt8* compressedtextbuffer;
71 z_stream zstream; 71 z_stream zstream;
72 size_t bufferpos; 72 size_t bufferpos;
73 UInt16 bufferrec; 73 UInt16 bufferrec;
74 zTXT_record0 hdr0; 74 zTXT_record0 hdr0;
75 size_t currentpos; 75 size_t currentpos;
76 void home(); 76 void home();
77 public: 77 public:
78 virtual void sizes(unsigned long& _file, unsigned long& _text) 78 virtual void sizes(unsigned long& _file, unsigned long& _text)
79 { 79 {
80 _file = file_length; 80 _file = file_length;
81 _text = ntohl(hdr0.size); 81 _text = ntohl(hdr0.size);
82 } 82 }
83 virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); } 83 virtual bool hasrandomaccess() { return (hdr0.randomAccess != 0); }
84 virtual ~ztxt() 84 virtual ~ztxt()
85 { 85 {
86 if (expandedtextbuffer != NULL) delete [] expandedtextbuffer; 86 if (expandedtextbuffer != NULL) delete [] expandedtextbuffer;
87 if (compressedtextbuffer != NULL) delete [] compressedtextbuffer; 87 if (compressedtextbuffer != NULL) delete [] compressedtextbuffer;
88 if (bInit) 88 if (bInit)
89 { 89 {
90 inflateEnd(&zstream); 90 inflateEnd(&zstream);
91 } 91 }
92 } 92 }
93 ztxt(); 93 ztxt();
94 virtual int openfile(const char *src); 94 virtual int openfile(const char *src);
95 virtual int getch(); 95 virtual int getch();
96 virtual unsigned int locate(); 96 virtual unsigned int locate();
97 virtual void locate(unsigned int n); 97 virtual void locate(unsigned int n);
98 virtual CList<Bkmk>* getbkmklist(); 98 virtual CList<Bkmk>* getbkmklist();
99 virtual MarkupType PreferredMarkup() 99 virtual MarkupType PreferredMarkup()
100 { 100 {
101 return cTEXT; 101 return cTEXT;
102 } 102 }
103}; 103};
104 104
105#endif 105#endif