summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ppm_expander.h
authorgroucho <groucho>2003-05-07 09:01:39 (UTC)
committer groucho <groucho>2003-05-07 09:01:39 (UTC)
commit118d03d815a7615b9c53363218a7ac45b3f4c514 (patch) (unidiff)
tree356953e2413cddcec0f35bd47bb6439767da7051 /noncore/apps/opie-reader/ppm_expander.h
parent00894537decf01c5a5cdc565b2740b5e67a2e90f (diff)
downloadopie-118d03d815a7615b9c53363218a7ac45b3f4c514.zip
opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.gz
opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.bz2
Incorporated TimWs current source tree and make it compile
Diffstat (limited to 'noncore/apps/opie-reader/ppm_expander.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ppm_expander.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/noncore/apps/opie-reader/ppm_expander.h b/noncore/apps/opie-reader/ppm_expander.h
index 4278c82..002de86 100644
--- a/noncore/apps/opie-reader/ppm_expander.h
+++ b/noncore/apps/opie-reader/ppm_expander.h
@@ -1,7 +1,8 @@
1#ifndef __ppm_expander_h 1#ifndef __ppm_expander_h
2#define __ppm_expander_h 2#define __ppm_expander_h
3 3
4#include "useqpe.h"
4#include "CExpander.h" 5#include "CExpander.h"
5#include <sys/stat.h> 6#include <sys/stat.h>
6 7
7 8
@@ -25,32 +26,34 @@ class ppm_expander : public CExpander {
25 FILE* my_file_in; 26 FILE* my_file_in;
26 PPM_ReadBuf* my_read_buf; 27 PPM_ReadBuf* my_read_buf;
27 ppm_worker ppm; 28 ppm_worker ppm;
28public: 29public:
29 virtual void suspend() 30#ifdef USEQPE
31 void suspend()
30 { 32 {
31 CExpander::suspend(my_file_in); 33 CExpander::suspend(my_file_in);
32 } 34 }
33 virtual void unsuspend() 35 void unsuspend()
34 { 36 {
35 CExpander::unsuspend(my_file_in); 37 CExpander::unsuspend(my_file_in);
36 } 38 }
39#endif
37 ppm_expander() : needppmend(false), my_file_in(NULL), my_read_buf(NULL) 40 ppm_expander() : needppmend(false), my_file_in(NULL), my_read_buf(NULL)
38 { 41 {
39 bufsize = 1024; 42 bufsize = 1024;
40 buf_in = new UCHAR[bufsize]; 43 buf_in = new UCHAR[bufsize];
41 buf_out = new UCHAR[bufsize]; 44 buf_out = new UCHAR[bufsize];
42 outbytes = 0; 45 outbytes = 0;
43 } 46 }
44 virtual int OpenFile(const char* infile); 47 int OpenFile(const char* infile);
45 virtual int getch(); 48 int getch();
46 int locate(unsigned short block, unsigned int n); 49 int locate(unsigned short block, unsigned int n);
47 virtual ~ppm_expander(); 50 virtual ~ppm_expander();
48 virtual unsigned int locate() { return outbytes; } 51 unsigned int locate() { return outbytes; }
49 virtual void locate(unsigned int n); 52 void locate(unsigned int n);
50 virtual bool hasrandomaccess() { return (numblocks > 1); } 53 bool hasrandomaccess() { return (numblocks > 1); }
51 virtual void sizes(unsigned long& file, unsigned long& text); 54 void sizes(unsigned long& file, unsigned long& text);
52 virtual MarkupType PreferredMarkup() 55 MarkupType PreferredMarkup()
53 { 56 {
54 return cTEXT; 57 return cTEXT;
55 } 58 }
56}; 59};