summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/plucker.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/plucker.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/plucker.h24
1 files changed, 12 insertions, 12 deletions
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,29 +1,29 @@
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;
22 UInt16 version; 22 UInt16 version;
23 UInt16 nRecords; 23 UInt16 nRecords;
24}; 24};
25 25
26struct CPluckerbkmk 26struct CPluckerbkmk
27{ 27{
28 UInt32 offset; 28 UInt32 offset;
29 tchar title[MAX_BMRK_LENGTH]; 29 tchar title[MAX_BMRK_LENGTH];
@@ -37,50 +37,50 @@ class CPlucker : public CExpander, Cpdb
37 size_t textlength; 37 size_t textlength;
38 UInt16 uid; 38 UInt16 uid;
39 int m_nextPara, m_nextParaIndex; 39 int m_nextPara, m_nextParaIndex;
40 CBufferFace<UInt16> m_ParaOffsets; 40 CBufferFace<UInt16> m_ParaOffsets;
41 CBufferFace<UInt16> m_ParaAttrs; 41 CBufferFace<UInt16> m_ParaAttrs;
42 UInt16 m_nParas; 42 UInt16 m_nParas;
43 CStyle mystyle; 43 CStyle mystyle;
44// bool bInit; 44// bool bInit;
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