summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/Aportis.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/Aportis.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/Aportis.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/noncore/apps/opie-reader/Aportis.h b/noncore/apps/opie-reader/Aportis.h
index af1fd3b..202a36f 100644
--- a/noncore/apps/opie-reader/Aportis.h
+++ b/noncore/apps/opie-reader/Aportis.h
@@ -1,19 +1,19 @@
1/* 1/*
2 Derived from makedoc9 by Pat Beirne 2 Derived from makedoc9 by Pat Beirne
3*/ 3*/
4 4
5#ifndef __Aportis_h 5#ifndef __Aportis_h
6#define __Aportis_h 6#define __Aportis_h
7 7#include "useqpe.h"
8#include "CExpander.h" 8#include "CExpander.h"
9#include "pdb.h" 9#include "pdb.h"
10 10
11typedef UInt32 DWORD; 11typedef UInt32 DWORD;
12typedef UInt16 WORD; 12typedef UInt16 WORD;
13 13
14#define DISP_BITS 11 14#define DISP_BITS 11
15#define COUNT_BITS 3 15#define COUNT_BITS 3
16/* 16/*
17// all numbers in these structs are big-endian, MAC format 17// all numbers in these structs are big-endian, MAC format
18struct tDocHeader { 18struct tDocHeader {
19 char sName[32]; 19 char sName[32];
@@ -66,43 +66,45 @@ class Aportis : public CExpander, Cpdb {
66 DWORD dwLen; 66 DWORD dwLen;
67 WORD nRecs2; 67 WORD nRecs2;
68 DWORD dwTLen; 68 DWORD dwTLen;
69 WORD nRecs; 69 WORD nRecs;
70 WORD BlockSize; 70 WORD BlockSize;
71 DWORD dwRecLen; 71 DWORD dwRecLen;
72 int currentrec, currentpos; 72 int currentrec, currentpos;
73 unsigned int cbptr; 73 unsigned int cbptr;
74 unsigned int outptr; 74 unsigned int outptr;
75 unsigned char circbuf[2048]; 75 unsigned char circbuf[2048];
76 char bCompressed; 76 char bCompressed;
77public: 77public:
78 virtual void suspend() 78#ifdef USEQPE
79 void suspend()
79 { 80 {
80 CExpander::suspend(fin); 81 CExpander::suspend(fin);
81 } 82 }
82 virtual void unsuspend() 83 void unsuspend()
83 { 84 {
84 CExpander::unsuspend(fin); 85 CExpander::unsuspend(fin);
85 } 86 }
86 virtual void sizes(unsigned long& _file, unsigned long& _text) 87#endif
88 void sizes(unsigned long& _file, unsigned long& _text)
87 { 89 {
88 _file = dwLen; 90 _file = dwLen;
89 _text = dwTLen; 91 _text = dwTLen;
90 } 92 }
91 virtual bool hasrandomaccess() { return true; } 93 bool hasrandomaccess() { return true; }
92 virtual ~Aportis() {} 94 virtual ~Aportis() {}
93 Aportis(); 95 Aportis();
94 virtual int OpenFile(const char *src); 96 int OpenFile(const char *src);
95 virtual int getch(); 97 int getch();
96 virtual unsigned int locate(); 98 unsigned int locate();
97 virtual void locate(unsigned int n); 99 void locate(unsigned int n);
98 virtual CList<Bkmk>* getbkmklist(); 100 CList<Bkmk>* getbkmklist();
99 virtual MarkupType PreferredMarkup() 101 MarkupType PreferredMarkup()
100 { 102 {
101 return (peanutfile) ? cPML : cTEXT; 103 return (peanutfile) ? cPML : cTEXT;
102 } 104 }
103private: 105private:
104 bool refreshbuffer(); 106 bool refreshbuffer();
105 unsigned int GetBS(unsigned int bn); 107 unsigned int GetBS(unsigned int bn);
106}; 108};
107 109
108#endif 110#endif