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.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/noncore/apps/opie-reader/ppm_expander.h b/noncore/apps/opie-reader/ppm_expander.h index 115988d..4278c82 100644 --- a/noncore/apps/opie-reader/ppm_expander.h +++ b/noncore/apps/opie-reader/ppm_expander.h | |||
@@ -16,33 +16,41 @@ class ppm_expander : public CExpander { | |||
16 | UCHAR *buf_in,*buf_out; | 16 | UCHAR *buf_in,*buf_out; |
17 | unsigned int bufsize; | 17 | unsigned int bufsize; |
18 | unsigned int outbytes; | 18 | unsigned int outbytes; |
19 | unsigned long blocksize; | 19 | unsigned long blocksize; |
20 | unsigned short numblocks; | 20 | unsigned short numblocks; |
21 | unsigned short curblock; | 21 | unsigned short curblock; |
22 | unsigned short maxnode; | 22 | unsigned short maxnode; |
23 | bool needppmend; | 23 | bool needppmend; |
24 | int home(); | 24 | int home(); |
25 | FILE* my_file_in; | 25 | FILE* my_file_in; |
26 | PPM_ReadBuf* my_read_buf; | 26 | PPM_ReadBuf* my_read_buf; |
27 | ppm_worker ppm; | 27 | ppm_worker ppm; |
28 | public: | 28 | public: |
29 | virtual void suspend() | ||
30 | { | ||
31 | CExpander::suspend(my_file_in); | ||
32 | } | ||
33 | virtual void unsuspend() | ||
34 | { | ||
35 | CExpander::unsuspend(my_file_in); | ||
36 | } | ||
29 | ppm_expander() : needppmend(false), my_file_in(NULL), my_read_buf(NULL) | 37 | ppm_expander() : needppmend(false), my_file_in(NULL), my_read_buf(NULL) |
30 | { | 38 | { |
31 | bufsize = 1024; | 39 | bufsize = 1024; |
32 | buf_in = new UCHAR[bufsize]; | 40 | buf_in = new UCHAR[bufsize]; |
33 | buf_out = new UCHAR[bufsize]; | 41 | buf_out = new UCHAR[bufsize]; |
34 | outbytes = 0; | 42 | outbytes = 0; |
35 | } | 43 | } |
36 | virtual int openfile(const char* infile); | 44 | virtual int OpenFile(const char* infile); |
37 | virtual int getch(); | 45 | virtual int getch(); |
38 | int locate(unsigned short block, unsigned int n); | 46 | int locate(unsigned short block, unsigned int n); |
39 | virtual ~ppm_expander(); | 47 | virtual ~ppm_expander(); |
40 | virtual unsigned int locate() { return outbytes; } | 48 | virtual unsigned int locate() { return outbytes; } |
41 | virtual void locate(unsigned int n); | 49 | virtual void locate(unsigned int n); |
42 | virtual bool hasrandomaccess() { return (numblocks > 1); } | 50 | virtual bool hasrandomaccess() { return (numblocks > 1); } |
43 | virtual void sizes(unsigned long& file, unsigned long& text); | 51 | virtual void sizes(unsigned long& file, unsigned long& text); |
44 | virtual MarkupType PreferredMarkup() | 52 | virtual MarkupType PreferredMarkup() |
45 | { | 53 | { |
46 | return cTEXT; | 54 | return cTEXT; |
47 | } | 55 | } |
48 | }; | 56 | }; |