summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ppm_expander.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/ppm_expander.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ppm_expander.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/ppm_expander.h b/noncore/apps/opie-reader/ppm_expander.h
index ccc89c2..c5f8a17 100644
--- a/noncore/apps/opie-reader/ppm_expander.h
+++ b/noncore/apps/opie-reader/ppm_expander.h
@@ -1,23 +1,23 @@
1#ifndef __ppm_expander_h 1#ifndef __ppm_expander_h
2#define __ppm_expander_h 2#define __ppm_expander_h
3 3
4#include "CExpander.h" 4#include "CExpander.h"
5#include <sys/stat.h> 5#include <sys/stat.h>
6 6
7 7
8#include "utypes.h" 8#include "utypes.h"
9#include "ppm.h" 9#include "ppm.h"
10#include "arith.h"
11 10
11class PPM_ReadBuf;
12 12
13#define SYM_EOF 256 13#define SYM_EOF 256
14 14
15class ppm_expander : public CExpander { 15class 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;
@@ -27,24 +27,27 @@ class ppm_expander : public CExpander {
27 ppm_worker ppm; 27 ppm_worker ppm;
28public: 28public:
29 QString about() { return QString("ppms Codec (c) Tim Wentford\nCompression code (c) Fabrice Bellard"); } 29 QString about() { return QString("ppms Codec (c) Tim Wentford\nCompression code (c) Fabrice Bellard"); }
30#ifdef USEQPE 30#ifdef USEQPE
31 void suspend() 31 void suspend()
32 { 32 {
33 CExpander::suspend(my_file_in); 33 CExpander::suspend(my_file_in);
34 } 34 }
35 void unsuspend() 35 void unsuspend()
36 { 36 {
37 CExpander::unsuspend(my_file_in); 37 CExpander::unsuspend(my_file_in);
38 } 38 }
39#else
40 void suspend() {}
41 void unsuspend() {}
39#endif 42#endif
40 ppm_expander() : needppmend(false), my_file_in(NULL), my_read_buf(NULL) 43 ppm_expander() : needppmend(false), my_file_in(NULL), my_read_buf(NULL)
41 { 44 {
42 bufsize = 1024; 45 bufsize = 1024;
43 buf_in = new UCHAR[bufsize]; 46 buf_in = new UCHAR[bufsize];
44 buf_out = new UCHAR[bufsize]; 47 buf_out = new UCHAR[bufsize];
45 outbytes = 0; 48 outbytes = 0;
46 } 49 }
47 int OpenFile(const char* infile); 50 int OpenFile(const char* infile);
48 int getch(); 51 int getch();
49 void locate(unsigned short block, unsigned int n); 52 void locate(unsigned short block, unsigned int n);
50 virtual ~ppm_expander(); 53 virtual ~ppm_expander();