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.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/Aportis.h b/noncore/apps/opie-reader/Aportis.h
index 1ca5e73..af1fd3b 100644
--- a/noncore/apps/opie-reader/Aportis.h
+++ b/noncore/apps/opie-reader/Aportis.h
@@ -54,47 +54,55 @@ inline WORD SwapWord(WORD r)
54{ 54{
55 return (r>>8) + (r<<8); 55 return (r>>8) + (r<<8);
56} 56}
57 57
58inline DWORD SwapLong(DWORD r) 58inline DWORD SwapLong(DWORD r)
59{ 59{
60 return ((r>>24) & 0xFF) + (r<<24) + ((r>>8) & 0xFF00) + ((r<<8) & 0xFF0000); 60 return ((r>>24) & 0xFF) + (r<<24) + ((r>>8) & 0xFF00) + ((r<<8) & 0xFF0000);
61} 61}
62 62
63class Aportis : public CExpander, Cpdb { 63class Aportis : public CExpander, Cpdb {
64 bool peanutfile; 64 bool peanutfile;
65 void dePeanut(int&); 65 void dePeanut(int&);
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()
79 {
80 CExpander::suspend(fin);
81 }
82 virtual void unsuspend()
83 {
84 CExpander::unsuspend(fin);
85 }
78 virtual void sizes(unsigned long& _file, unsigned long& _text) 86 virtual void sizes(unsigned long& _file, unsigned long& _text)
79 { 87 {
80 _file = dwLen; 88 _file = dwLen;
81 _text = dwTLen; 89 _text = dwTLen;
82 } 90 }
83 virtual bool hasrandomaccess() { return true; } 91 virtual bool hasrandomaccess() { return true; }
84 virtual ~Aportis() {} 92 virtual ~Aportis() {}
85 Aportis(); 93 Aportis();
86 virtual int openfile(const char *src); 94 virtual int OpenFile(const char *src);
87 virtual int getch(); 95 virtual int getch();
88 virtual unsigned int locate(); 96 virtual unsigned int locate();
89 virtual void locate(unsigned int n); 97 virtual void locate(unsigned int n);
90 virtual CList<Bkmk>* getbkmklist(); 98 virtual CList<Bkmk>* getbkmklist();
91 virtual MarkupType PreferredMarkup() 99 virtual MarkupType PreferredMarkup()
92 { 100 {
93 return (peanutfile) ? cPML : cTEXT; 101 return (peanutfile) ? cPML : cTEXT;
94 } 102 }
95private: 103private:
96 bool refreshbuffer(); 104 bool refreshbuffer();
97 unsigned int GetBS(unsigned int bn); 105 unsigned int GetBS(unsigned int bn);
98}; 106};
99 107
100#endif 108#endif