author | llornkcor <llornkcor> | 2002-07-01 23:24:08 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-01 23:24:08 (UTC) |
commit | 59222a752fa4c8a1e8c2a00ee2f9e22855f12bb2 (patch) (unidiff) | |
tree | f148d4858859dac3b413e675c760acfdab24b8e6 /noncore/apps/opie-reader/ppm_expander.h | |
parent | c08be8ae22dcc1bfb83cfdec807149b161d770f5 (diff) | |
download | opie-59222a752fa4c8a1e8c2a00ee2f9e22855f12bb2.zip opie-59222a752fa4c8a1e8c2a00ee2f9e22855f12bb2.tar.gz opie-59222a752fa4c8a1e8c2a00ee2f9e22855f12bb2.tar.bz2 |
initial
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 | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/ppm_expander.h b/noncore/apps/opie-reader/ppm_expander.h new file mode 100644 index 0000000..ce95db7 --- a/dev/null +++ b/noncore/apps/opie-reader/ppm_expander.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef __ppm_expander_h | ||
2 | #define __ppm_expander_h | ||
3 | |||
4 | #include "CExpander.h" | ||
5 | #include <sys/stat.h> | ||
6 | |||
7 | |||
8 | #include "utypes.h" | ||
9 | #include "ppm.h" | ||
10 | #include "arith.h" | ||
11 | |||
12 | |||
13 | #define SYM_EOF 256 | ||
14 | |||
15 | class ppm_expander : public CExpander { | ||
16 | UCHAR *buf_in,*buf_out; | ||
17 | unsigned int bufsize; | ||
18 | unsigned int outbytes; | ||
19 | unsigned long blocksize; | ||
20 | unsigned short numblocks; | ||
21 | unsigned short curblock; | ||
22 | unsigned short maxnode; | ||
23 | bool needppmend; | ||
24 | int home(); | ||
25 | FILE* my_file_in; | ||
26 | PPM_ReadBuf* my_read_buf; | ||
27 | ppm_worker ppm; | ||
28 | public: | ||
29 | ppm_expander() : needppmend(false), my_file_in(NULL), my_read_buf(NULL) | ||
30 | { | ||
31 | bufsize = 1024; | ||
32 | buf_in = new UCHAR[bufsize]; | ||
33 | buf_out = new UCHAR[bufsize]; | ||
34 | outbytes = 0; | ||
35 | } | ||
36 | virtual int openfile(const char* infile); | ||
37 | virtual int getch(); | ||
38 | int locate(unsigned short block, unsigned int n); | ||
39 | virtual ~ppm_expander(); | ||
40 | virtual unsigned int locate() { return outbytes; } | ||
41 | virtual void locate(unsigned int n); | ||
42 | virtual bool hasrandomaccess() { return (numblocks > 1); } | ||
43 | virtual void sizes(unsigned long& file, unsigned long& text); | ||
44 | }; | ||
45 | |||
46 | #endif | ||