diff options
Diffstat (limited to 'baseline/source/cjpeg_wrbmp/cderror.h')
| -rw-r--r-- | baseline/source/cjpeg_wrbmp/cderror.h | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/baseline/source/cjpeg_wrbmp/cderror.h b/baseline/source/cjpeg_wrbmp/cderror.h new file mode 100644 index 0000000..e479834 --- /dev/null +++ b/baseline/source/cjpeg_wrbmp/cderror.h | |||
| @@ -0,0 +1,140 @@ | |||
| 1 | |||
| 2 | /* | ||
| 3 | |||
| 4 | This program is part of the TACLeBench benchmark suite. | ||
| 5 | Version V 1.x | ||
| 6 | |||
| 7 | Name: cderror.h | ||
| 8 | |||
| 9 | Author: Thomas G. Lane. | ||
| 10 | |||
| 11 | This file is part of the Independent JPEG Group's software. | ||
| 12 | For conditions of distribution and use, see the accompanying README file. | ||
| 13 | |||
| 14 | This file defines the error and message codes for the cjpeg/djpeg | ||
| 15 | applications. These strings are not needed as part of the JPEG library | ||
| 16 | proper. | ||
| 17 | Edit this file to add new codes, or to translate the message strings to | ||
| 18 | some other language. | ||
| 19 | |||
| 20 | Source: Independent JPEG Group's software | ||
| 21 | |||
| 22 | Changes: no major functional changes | ||
| 23 | |||
| 24 | License: See the accompanying README file | ||
| 25 | |||
| 26 | */ | ||
| 27 | |||
| 28 | #ifndef CJPEG_WRBMP_JMESSAGE | ||
| 29 | #ifndef CDERROR_H | ||
| 30 | #define CDERROR_H | ||
| 31 | /*First time through, define the enum list*/ | ||
| 32 | #define CJPEG_WRBMP_JMAKE_ENUM_LIST | ||
| 33 | #else | ||
| 34 | /* Repeated inclusions of this file are no-ops unless JMESSAGE is defined*/ | ||
| 35 | #define CJPEG_WRBMP_JMESSAGE(code,string) | ||
| 36 | #endif | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #ifdef CJPEG_WRBMP_JMAKE_ENUM_LIST | ||
| 40 | |||
| 41 | typedef enum { | ||
| 42 | |||
| 43 | #define CJPEG_WRBMP_JMESSAGE(code,string) code , | ||
| 44 | |||
| 45 | #endif | ||
| 46 | |||
| 47 | CJPEG_WRBMP_JMESSAGE( JMSG_FIRSTADDONCODE = 1000, NULL ) //Must be first entry! | ||
| 48 | |||
| 49 | #ifdef CJPEG_WRBMP_BMP_SUPPORTED | ||
| 50 | CJPEG_WRBMP_JMESSAGE( JERR_BMP_BADCMAP, "Unsupported BMP colormap format" ) | ||
| 51 | CJPEG_WRBMP_JMESSAGE( JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported" ) | ||
| 52 | CJPEG_WRBMP_JMESSAGE( JERR_BMP_BADHEADER, "Invalid BMP file: bad header length" ) | ||
| 53 | CJPEG_WRBMP_JMESSAGE( JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1" ) | ||
| 54 | CJPEG_WRBMP_JMESSAGE( JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB" ) | ||
| 55 | CJPEG_WRBMP_JMESSAGE( JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported" ) | ||
| 56 | CJPEG_WRBMP_JMESSAGE( JERR_BMP_NOT, "Not a BMP file - does not start with BM" ) | ||
| 57 | CJPEG_WRBMP_JMESSAGE( JTRC_BMP, "%ux%u 24-bit BMP image" ) | ||
| 58 | CJPEG_WRBMP_JMESSAGE( JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image" ) | ||
| 59 | CJPEG_WRBMP_JMESSAGE( JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image" ) | ||
| 60 | CJPEG_WRBMP_JMESSAGE( JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image" ) | ||
| 61 | #endif | ||
| 62 | |||
| 63 | #ifdef CJPEG_WRBMP_GIF_SUPPORTED | ||
| 64 | CJPEG_WRBMP_JMESSAGE( JERR_GIF_BUG, "GIF output got confused" ) | ||
| 65 | CJPEG_WRBMP_JMESSAGE( JERR_GIF_CODESIZE, "Bogus GIF codesize %d" ) | ||
| 66 | CJPEG_WRBMP_JMESSAGE( JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB" ) | ||
| 67 | CJPEG_WRBMP_JMESSAGE( JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file" ) | ||
| 68 | CJPEG_WRBMP_JMESSAGE( JERR_GIF_NOT, "Not a GIF file" ) | ||
| 69 | CJPEG_WRBMP_JMESSAGE( JTRC_GIF, "%ux%ux%d GIF image" ) | ||
| 70 | CJPEG_WRBMP_JMESSAGE( JTRC_GIF_BADVERSION, | ||
| 71 | "Warning: unexpected GIF version number '%c%c%c'" ) | ||
| 72 | CJPEG_WRBMP_JMESSAGE( JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x" ) | ||
| 73 | CJPEG_WRBMP_JMESSAGE( JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input" ) | ||
| 74 | CJPEG_WRBMP_JMESSAGE( JWRN_GIF_BADDATA, "Corrupt data in GIF file" ) | ||
| 75 | CJPEG_WRBMP_JMESSAGE( JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring" ) | ||
| 76 | CJPEG_WRBMP_JMESSAGE( JWRN_GIF_ENDCODE, "Premature end of GIF image" ) | ||
| 77 | CJPEG_WRBMP_JMESSAGE( JWRN_GIF_NOMOREDATA, "Ran out of GIF bits" ) | ||
| 78 | #endif | ||
| 79 | |||
| 80 | #ifdef CJPEG_WRBMP_PPM_SUPPORTED | ||
| 81 | CJPEG_WRBMP_JMESSAGE( JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB" ) | ||
| 82 | CJPEG_WRBMP_JMESSAGE( JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file" ) | ||
| 83 | CJPEG_WRBMP_JMESSAGE( JERR_PPM_NOT, "Not a PPM/PGM file" ) | ||
| 84 | CJPEG_WRBMP_JMESSAGE( JTRC_PGM, "%ux%u PGM image" ) | ||
| 85 | CJPEG_WRBMP_JMESSAGE( JTRC_PGM_TEXT, "%ux%u text PGM image" ) | ||
| 86 | CJPEG_WRBMP_JMESSAGE( JTRC_PPM, "%ux%u PPM image" ) | ||
| 87 | CJPEG_WRBMP_JMESSAGE( JTRC_PPM_TEXT, "%ux%u text PPM image" ) | ||
| 88 | #endif | ||
| 89 | |||
| 90 | #ifdef RLE_SUPPORTED | ||
| 91 | CJPEG_WRBMP_JMESSAGE( JERR_RLE_BADERROR, "Bogus error code from RLE library" ) | ||
| 92 | CJPEG_WRBMP_JMESSAGE( JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB" ) | ||
| 93 | CJPEG_WRBMP_JMESSAGE( JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE" ) | ||
| 94 | CJPEG_WRBMP_JMESSAGE( JERR_RLE_EMPTY, "Empty RLE file" ) | ||
| 95 | CJPEG_WRBMP_JMESSAGE( JERR_RLE_EOF, "Premature EOF in RLE header" ) | ||
| 96 | CJPEG_WRBMP_JMESSAGE( JERR_RLE_MEM, "Insufficient memory for RLE header" ) | ||
| 97 | CJPEG_WRBMP_JMESSAGE( JERR_RLE_NOT, "Not an RLE file" ) | ||
| 98 | CJPEG_WRBMP_JMESSAGE( JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE" ) | ||
| 99 | CJPEG_WRBMP_JMESSAGE( JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup" ) | ||
| 100 | CJPEG_WRBMP_JMESSAGE( JTRC_RLE, "%ux%u full-color RLE file" ) | ||
| 101 | CJPEG_WRBMP_JMESSAGE( JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d" ) | ||
| 102 | CJPEG_WRBMP_JMESSAGE( JTRC_RLE_GRAY, "%ux%u grayscale RLE file" ) | ||
| 103 | CJPEG_WRBMP_JMESSAGE( JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d" ) | ||
| 104 | CJPEG_WRBMP_JMESSAGE( JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d" ) | ||
| 105 | #endif | ||
| 106 | |||
| 107 | #ifdef CJPEG_WRBMP_TARGA_SUPPORTED | ||
| 108 | CJPEG_WRBMP_JMESSAGE( JERR_TGA_BADCMAP, "Unsupported Targa colormap format" ) | ||
| 109 | CJPEG_WRBMP_JMESSAGE( JERR_TGA_BADPARMS, "Invalid or unsupported Targa file" ) | ||
| 110 | CJPEG_WRBMP_JMESSAGE( JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB" ) | ||
| 111 | CJPEG_WRBMP_JMESSAGE( JTRC_TGA, "%ux%u RGB Targa image" ) | ||
| 112 | CJPEG_WRBMP_JMESSAGE( JTRC_TGA_GRAY, "%ux%u grayscale Targa image" ) | ||
| 113 | CJPEG_WRBMP_JMESSAGE( JTRC_TGA_MAPPED, "%ux%u colormapped Targa image" ) | ||
| 114 | #else | ||
| 115 | CJPEG_WRBMP_JMESSAGE( JERR_TGA_NOTCOMP, "Targa support was not compiled" ) | ||
| 116 | #endif | ||
| 117 | |||
| 118 | CJPEG_WRBMP_JMESSAGE( JERR_BAD_CMAP_FILE, | ||
| 119 | "Color map file is invalid or of unsupported format" ) | ||
| 120 | CJPEG_WRBMP_JMESSAGE( JERR_TOO_MANY_COLORS, | ||
| 121 | "Output file format cannot handle %d colormap entries" ) | ||
| 122 | CJPEG_WRBMP_JMESSAGE( JERR_UNGETC_FAILED, "ungetc failed" ) | ||
| 123 | #ifdef CJPEG_WRBMP_TARGA_SUPPORTED | ||
| 124 | CJPEG_WRBMP_JMESSAGE( JERR_UNKNOWN_FORMAT, | ||
| 125 | "Unrecognized input file format --- perhaps you need -targa" ) | ||
| 126 | #else | ||
| 127 | CJPEG_WRBMP_JMESSAGE( JERR_UNKNOWN_FORMAT, "Unrecognized input file format" ) | ||
| 128 | #endif | ||
| 129 | CJPEG_WRBMP_JMESSAGE( JERR_UNSUPPORTED_FORMAT, "Unsupported output file format" ) | ||
| 130 | |||
| 131 | #ifdef CJPEG_WRBMP_JMAKE_ENUM_LIST | ||
| 132 | |||
| 133 | JMSG_LASTADDONCODE | ||
| 134 | } CJPEG_WRBMP_ADDON_MESSAGE_CODE; | ||
| 135 | |||
| 136 | #undef CJPEG_WRBMP_JMAKE_ENUM_LIST | ||
| 137 | #endif | ||
| 138 | |||
| 139 | /* Zap JMESSAGE macro so that future re-inclusions do nothing by default*/ | ||
| 140 | #undef CJPEG_WRBMP_JMESSAGE | ||
