Diffstat (limited to 'noncore/apps/opie-reader/Palm2QImage.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Palm2QImage.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/Palm2QImage.cpp b/noncore/apps/opie-reader/Palm2QImage.cpp index c6907eb..361755f 100644 --- a/noncore/apps/opie-reader/Palm2QImage.cpp +++ b/noncore/apps/opie-reader/Palm2QImage.cpp | |||
@@ -1,33 +1,34 @@ | |||
1 | /* -*- mode: c; indent-tabs-mode: nil; -*- */ | 1 | /* -*- mode: c; indent-tabs-mode: nil; -*- */ |
2 | |||
2 | #include <stdio.h> | 3 | #include <stdio.h> |
3 | #include <stdlib.h> | 4 | #include <stdlib.h> |
4 | #include <string.h> | 5 | #include <string.h> |
5 | #ifndef _WINDOWS | 6 | #ifndef _WINDOWS |
6 | #include <unistd.h> /* for link */ | 7 | #include <unistd.h> /* for link */ |
7 | #endif | 8 | #endif |
8 | #include <sys/types.h> | 9 | #include <sys/types.h> |
9 | #include <sys/stat.h> | 10 | #include <sys/stat.h> |
10 | #include <stdarg.h> | 11 | #include <stdarg.h> |
11 | 12 | ||
12 | #include <qimage.h> | 13 | #include <qimage.h> |
13 | 14 | ||
14 | /***********************************************************************/ | 15 | /***********************************************************************/ |
15 | /***********************************************************************/ | 16 | /***********************************************************************/ |
16 | /***** *****/ | 17 | /***** *****/ |
17 | /***** Code to decode the Palm image format to JPEG *****/ | 18 | /***** Code to decode the Palm image format to JPEG *****/ |
18 | /***** *****/ | 19 | /***** *****/ |
19 | /***********************************************************************/ | 20 | /***********************************************************************/ |
20 | /***********************************************************************/ | 21 | /***********************************************************************/ |
21 | 22 | ||
22 | #define READ_BIGENDIAN_SHORT(p) (((p)[0] << 8)|((p)[1])) | 23 | #define READ_BIGENDIAN_SHORT(p) (((p)[0] << 8)|((p)[1])) |
23 | #define READ_BIGENDIAN_LONG(p) (((p)[0] << 24)|((p)[1] << 16)|((p)[2] << 8)|((p)[3])) | 24 | #define READ_BIGENDIAN_LONG(p) (((p)[0] << 24)|((p)[1] << 16)|((p)[2] << 8)|((p)[3])) |
24 | 25 | ||
25 | #define PALM_IS_COMPRESSED_FLAG 0x8000 | 26 | #define PALM_IS_COMPRESSED_FLAG 0x8000 |
26 | #define PALM_HAS_COLORMAP_FLAG 0x4000 | 27 | #define PALM_HAS_COLORMAP_FLAG 0x4000 |
27 | #define PALM_HAS_TRANSPARENCY_FLAG 0x2000 | 28 | #define PALM_HAS_TRANSPARENCY_FLAG 0x2000 |
28 | #define PALM_DIRECT_COLOR_FLAG 0x0400 | 29 | #define PALM_DIRECT_COLOR_FLAG 0x0400 |
29 | #define PALM_4_BYTE_FIELD_FLAG 0x0200 | 30 | #define PALM_4_BYTE_FIELD_FLAG 0x0200 |
30 | 31 | ||
31 | #define PALM_COMPRESSION_SCANLINE 0x00 | 32 | #define PALM_COMPRESSION_SCANLINE 0x00 |
32 | #define PALM_COMPRESSION_RLE 0x01 | 33 | #define PALM_COMPRESSION_RLE 0x01 |
33 | #define PALM_COMPRESSION_PACKBITS 0x02 | 34 | #define PALM_COMPRESSION_PACKBITS 0x02 |