Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: core/include/thirdparties/libjpeg/jerror.h

Issue 1265503005: clang-format all pdfium code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * jerror.h 2 * jerror.h
3 * 3 *
4 * Copyright (C) 1994-1997, Thomas G. Lane. 4 * Copyright (C) 1994-1997, Thomas G. Lane.
5 * This file is part of the Independent JPEG Group's software. 5 * This file is part of the Independent JPEG Group's software.
6 * For conditions of distribution and use, see the accompanying README file. 6 * For conditions of distribution and use, see the accompanying README file.
7 * 7 *
8 * This file defines the error and message codes for the JPEG library. 8 * This file defines the error and message codes for the JPEG library.
9 * Edit this file to add new codes, or to translate the message strings to 9 * Edit this file to add new codes, or to translate the message strings to
10 * some other language. 10 * some other language.
11 * A set of error-reporting macros are defined too. Some applications using 11 * A set of error-reporting macros are defined too. Some applications using
12 * the JPEG library may wish to include this file to get the error codes 12 * the JPEG library may wish to include this file to get the error codes
13 * and/or the macros. 13 * and/or the macros.
14 */ 14 */
15 15
16 /* 16 /*
17 * To define the enum list of message codes, include this file without 17 * To define the enum list of message codes, include this file without
18 * defining macro JMESSAGE. To create a message string table, include it 18 * defining macro JMESSAGE. To create a message string table, include it
19 * again with a suitable JMESSAGE definition (see jerror.c for an example). 19 * again with a suitable JMESSAGE definition (see jerror.c for an example).
20 */ 20 */
21 #ifndef JMESSAGE 21 #ifndef JMESSAGE
22 #ifndef JERROR_H 22 #ifndef JERROR_H
23 /* First time through, define the enum list */ 23 /* First time through, define the enum list */
24 #define JMAKE_ENUM_LIST 24 #define JMAKE_ENUM_LIST
25 #else 25 #else
26 /* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ 26 /* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
27 #define JMESSAGE(code,string) 27 #define JMESSAGE(code, string)
28 #endif /* JERROR_H */ 28 #endif /* JERROR_H */
29 #endif /* JMESSAGE */ 29 #endif /* JMESSAGE */
30 30
31 #ifdef JMAKE_ENUM_LIST 31 #ifdef JMAKE_ENUM_LIST
32 32
33 typedef enum { 33 typedef enum {
34 34
35 #define JMESSAGE(code,string)» code , 35 #define JMESSAGE(code, string) code,
36 36
37 #endif /* JMAKE_ENUM_LIST */ 37 #endif /* JMAKE_ENUM_LIST */
38 38
39 JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ 39 JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
40 40
41 /* For maintenance convenience, list is alphabetical by message code name */ 41 /* For maintenance convenience, list is alphabetical by message code name */
42 JMESSAGE(JERR_ARITH_NOTIMPL, 42 JMESSAGE(
43 "Sorry, there are legal restrictions on arithmetic coding") 43 JERR_ARITH_NOTIMPL,
44 JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") 44 "Sorry, there are legal restrictions on arithmetic coding") JMESSAGE(JERR_ BAD_ALIGN_TYPE,
45 JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") 45 "ALI"
46 JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") 46 "GN_"
47 JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") 47 "TYP"
48 JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") 48 "E "
49 JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") 49 "is "
50 JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") 50 "wro"
51 JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") 51 "ng,"
52 JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") 52 " pl"
53 JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") 53 "eas"
54 JMESSAGE(JERR_BAD_LIB_VERSION, 54 "e "
55 "Wrong JPEG library version: library is %d, caller expects %d") 55 "fi"
56 JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") 56 "x")
57 JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") 57 JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") JME SSAGE(
58 JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") 58 JERR_BAD_BUFFER_MODE,
59 JMESSAGE(JERR_BAD_PROGRESSION, 59 "Bogus buffer control mode") JMESSAGE(JERR_BAD_COMPONENT_ID,
60 "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") 60 "Invalid component ID %d in "
61 JMESSAGE(JERR_BAD_PROG_SCRIPT, 61 "SOS") JMESSAGE(JERR_BAD_DCT_COE F,
62 "Invalid progressive parameters at scan script entry %d") 62 "DCT "
63 JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") 63 "coefficient "
64 JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") 64 "out of range")
65 JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") 65 JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") JMESSAGE(
66 JMESSAGE(JERR_BAD_STRUCT_SIZE, 66 JERR_BAD_HUFF_TABLE,
67 "JPEG parameter struct mismatch: library thinks size is %u, caller expe cts %u") 67 "Bogus Huffman table definition") JMESSAGE(JERR_BAD_IN_COLORSPACE,
68 JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") 68 "Bogus input "
69 JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") 69 "colorspace")
70 JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") 70 JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") JMESSAGE(
71 JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") 71 JERR_BAD_LENGTH,
72 JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") 72 "Bogus marker length") JMESSAGE(JERR_BAD_LIB_VERSION,
73 JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") 73 "Wrong JPEG library version: "
74 JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") 74 "library is %d, caller "
75 JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") 75 "expects %d") JMESSAGE(JERR_BA D_MCU_SIZE,
76 JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") 76 "Sampl"
77 JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") 77 "ing "
78 JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") 78 "facto"
79 JMESSAGE(JERR_EMS_READ, "Read from EMS failed") 79 "rs "
80 JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") 80 "too "
81 JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") 81 "large"
82 JMESSAGE(JERR_FILE_READ, "Input file read error") 82 " for "
83 JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") 83 "inter"
84 JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") 84 "leave"
85 JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") 85 "d "
86 JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") 86 "scan")
87 JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") 87 JMESSAGE(
88 JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") 88 JERR_BAD_POOL_ID,
89 JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") 89 "Invalid memory pool code %d") JMESSAGE(JERR_BAD_PRECISION ,
90 JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, 90 "Unsupported "
91 "Cannot transcode due to multiple use of quantization table %d") 91 "JPEG data "
92 JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") 92 "precision %d")
93 JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") 93 JMESSAGE(JERR_BAD_PROGRESSION,
94 JMESSAGE(JERR_NOTIMPL, "Not implemented yet") 94 "Invalid progressive parameters Ss=%d Se=%d "
95 JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") 95 "Ah=%d Al=%d") JMESSAGE(JERR_BAD_PROG_SCRIPT,
96 JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") 96 "Invalid progressive "
97 JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") 97 "parameters at scan "
98 JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") 98 "script entry %d")
99 JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") 99 JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") JMESSAGE(
100 JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") 100 JERR_BAD_SCAN_SCRIPT,
101 JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") 101 "Invalid scan script at entry %d") JMESSAGE(JERR_B AD_STATE,
102 JMESSAGE(JERR_QUANT_COMPONENTS, 102 "Impr"
103 "Cannot quantize more than %d color components") 103 "oper"
104 JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") 104 " cal"
105 JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") 105 "l "
106 JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") 106 "to "
107 JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") 107 "JPEG"
108 JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") 108 " lib"
109 JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") 109 "rary"
110 JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") 110 " in "
111 JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") 111 "stat"
112 JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") 112 "e "
113 JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") 113 "%d")
114 JMESSAGE(JERR_TFILE_WRITE, 114 JMESSAGE(JERR_BAD_STRUCT_SIZE,
115 "Write failed on temporary file --- out of disk space?") 115 "JPEG parameter struct mismatch: "
116 JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") 116 "library thinks size is %u, caller "
117 JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") 117 "expects %u") JMESSAGE(JERR_BAD_VIRTUAL_A CCESS,
118 JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") 118 "Bogus virtual "
119 JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") 119 "array access")
120 JMESSAGE(JERR_XMS_READ, "Read from XMS failed") 120 JMESSAGE(
121 JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") 121 JERR_BUFFER_SIZE,
122 JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) 122 "Buffer passed to JPEG library is too "
123 JMESSAGE(JMSG_VERSION, JVERSION) 123 "small") JMESSAGE(JERR_CANT_SUSPEND,
124 JMESSAGE(JTRC_16BIT_TABLES, 124 "Suspension not "
125 "Caution: quantization tables are too coarse for baseline JPEG") 125 "allowed here")
126 JMESSAGE(JTRC_ADOBE, 126 JMESSAGE(
127 "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") 127 JERR_CCIR601_NOTIMPL,
128 JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") 128 "CCIR601 sampling not implemented "
129 JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") 129 "yet") JMESSAGE(JERR_COMPONENT_COUNT,
130 JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") 130 "Too many color "
131 JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") 131 "components: %d, max "
132 JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") 132 "%d")
133 JMESSAGE(JTRC_DRI, "Define Restart Interval %u") 133 JMESSAGE(JERR_CONVERSION_NOTIMPL,
134 JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") 134 "Unsupported color "
135 JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") 135 "conversion request")
136 JMESSAGE(JTRC_EOI, "End Of Image") 136 JMESSAGE(JERR_DAC_INDEX,
137 JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") 137 "Bogus DAC index %d")
138 JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") 138 JMESSAGE(
139 JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, 139 JERR_DAC_VALUE,
140 "Warning: thumbnail image size does not match data length %u") 140 "Bogus DAC value 0x%x")
141 JMESSAGE(JTRC_JFIF_EXTENSION, 141 JMESSAGE(
142 "JFIF extension marker: type 0x%02x, length %u") 142 JERR_DHT_INDEX,
143 JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") 143 "Bogus DHT index %d")
144 JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") 144 JMESSAGE(JERR_DQT_INDE X,
145 JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") 145 "Bogus DQT "
146 JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") 146 "index %d") J MESSAGE(JERR_EMPTY_IMAGE,
147 JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") 147 "Empty JPEG image (DNL not supported)") JMESSAGE(JERR_EMS_READ,
148 JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") 148 "Read from EMS failed") JMESSAGE(JERR_EMS_WRITE,
149 JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") 149 "Write to EMS failed") JMESSAGE(JERR_EOI_EXPECTED,
150 JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") 150 "Didn't expect more than one scan") JM ESSAGE(JERR_FILE_READ,
151 JMESSAGE(JTRC_RST, "RST%d") 151 "Input file read error") JMESSAGE(JERR_FILE_WRITE,
152 JMESSAGE(JTRC_SMOOTH_NOTIMPL, 152 "Output file write error --- out of dis k space?") JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL,
153 "Smoothing not supported with nonstandard sampling ratios") 153 "Fractional sampling not implemented yet") JMESSAGE(JERR_HUF F_CLEN_OVERFLOW,
154 JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") 154 "Huffman code size table overflow") JMESSAGE(JERR_HUFF_MISSING_CODE,
155 JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") 155 "Missing Huffman code table entry") JMESSAG E(JERR_IMAGE_TOO_BIG,
156 JMESSAGE(JTRC_SOI, "Start of Image") 156 "Maximum supported image dimension is %u pixels") JMESSAGE(JERR_INPUT_EMPTY,
157 JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") 157 "Empty input file") JMESSAGE(JERR_INPUT_EOF,
158 JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") 158 "Premature end of input file") JMESSAGE(JERR_MISMATCHED_QUANT_TABLE,
159 JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") 159 "Cannot transcode due to multi ple use of quantization table %d") JMESSAGE(JERR_MISSING_DATA,
160 JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") 160 "Scan script does not transmit all d ata")
161 JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") 161 JMESSAGE(
162 JMESSAGE(JTRC_THUMB_JPEG, 162 JERR_MODE_CHAN GE,
163 "JFIF extension marker: JPEG-compressed thumbnail image, length %u") 163 "Invalid "
164 JMESSAGE(JTRC_THUMB_PALETTE, 164 "color "
165 "JFIF extension marker: palette thumbnail image, length %u") 165 "quantization"
166 JMESSAGE(JTRC_THUMB_RGB, 166 " mode "
167 "JFIF extension marker: RGB thumbnail image, length %u") 167 "change") JMES SAGE(JERR_NOTIMPL,
168 JMESSAGE(JTRC_UNKNOWN_IDS, 168 "Not implemented yet") JMESSAGE(JERR_NOT_COMPILED,
169 "Unrecognized component IDs %d %d %d, assuming YCbCr") 169 "Requested feature was omitted at compile t ime")
170 JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") 170 JMESSAGE(
171 JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") 171 JERR_NO_BA CKING_STORE,
172 JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") 172 "Backing "
173 JMESSAGE(JWRN_BOGUS_PROGRESSION, 173 "store "
174 "Inconsistent progression sequence for component %d coefficient %d") 174 "not "
175 JMESSAGE(JWRN_EXTRANEOUS_DATA, 175 "supporte"
176 "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") 176 "d") JMESS AGE(JERR_NO_HUFF_TABLE,
177 JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") 177 "Huffman table 0x%02x was not defined")
178 JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") 178 JMESSAGE(
179 JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") 179 JERR_N O_IMAGE,
180 JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") 180 "JPEG"
181 JMESSAGE(JWRN_MUST_RESYNC, 181 " dat"
182 "Corrupt JPEG data: found marker 0x%02x instead of RST%d") 182 "astr"
183 JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") 183 "eam "
184 JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") 184 "cont"
185 "ains"
186 " no "
187 "imag"
188 "e")
189 JMESSA GE(
190 JE RR_NO_QUANT_TABLE,
191 "Q uantization table 0x%02x was not defined")
192 JM ESSAGE(
193 JERR_NO_SOI,
194 "Not a JPEG file: starts with 0x%02x 0x%02x")
195 JMESSAGE(
196 JERR_OUT_OF_MEMORY,
197 "Insufficient memory (case %d)")
198 JMESSAGE(
199 JERR_QUANT_COMPONENTS,
200 "Cannot quantize more than %d color components")
201 JMESSAGE(
202 JERR_QUANT_FEW_COLORS,
203 "Cannot quantize to fewer than %d colors")
204 JMESSAGE(
205 JERR_QUANT_MANY_COLORS,
206 "Cannot quantize to more than %d colors")
207 JMESSAGE(
208 JERR_SOF_DUPLICATE,
209 "Invalid JPEG file structure: two SOF markers")
210 JMESSAGE(
211 JERR_SOF_NO_SOS,
212 "Invalid JPEG file structure: missing SOS marker") JME SSAGE(JERR_SOF_UNSUPPORTED,
213 "Unsupported JPEG process: SOF type 0x%02x") JMESSAGE(JERR_SOI_DUPLICATE,
214 "Invalid JPEG file s tructure: two SOI markers") JMESSAGE(JERR_SOS_NO_SOF,
215 "Invalid JPEG file structure: SOS before SO F") JMESSAGE(JERR_TFILE_CREATE,
216 "Failed to create temporary file %s") JMESSAGE(JERR_TFILE_READ,
217 "Read failed on temp orary file") JMESSAGE(JERR_TFILE_SEEK,
218 "Seek failed on temporary file") JMESSAGE(JERR_TFILE_WRITE ,
219 "Write failed on temporary file --- out of disk space?") JMESSAGE(JERR_TOO_LITTLE_DATA,
220 "Application transferred too f ew scanlines") JMESSAGE(JERR_UNKNOWN_MARKER,
221 "Unsupported marker type 0x%02x") JMESSAGE(JERR_VIRTUAL_ BUG,
222 "Virtual arra y controller messed up") JMESSAGE(JERR_WIDTH_OVERFLOW,
223 "Image too wide for this implementation") JMES SAGE(JERR_XMS_READ,
224 "Read from XMS failed") JMESSAGE(JERR_XMS_WRITE,
225 "Write to XMS failed") JMESSAGE(JMSG_COPYR IGHT,
226 JCOPYRIGHT ) JMESSAGE(JMSG_VERSION, JVERSION) JMESSAGE(JTRC_16BIT_TABLES,
227 "Caution: quantization tables are to o coarse for baseline JPEG")
228 JMESSAGE(JTRC_ADOBE,
229 "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") JMESSAGE(JTRC_APP0,
230 "Unknown APP0 marker (not JFIF), length %u") JM ESSAGE(JTRC_APP14,
231 "Unknown APP14 marker (not Adobe), length %u") JMESSAGE(JTRC_DAC,
232 "Define Arithmeti c Table 0x%02x: 0x%02x") JMESSAGE(JTRC_DHT,
233 "Define Huffman Table 0x%02x") JMESSAGE(JTRC_D QT,
234 "Defin e Quantization Table %d precision %d") JMESSAGE(JTRC_DRI,
235 "Define Restart Interval %u") J MESSAGE(JTRC_EMS_CLOSE,
236 "Freed EMS handle %u")
237 JMESSAGE(
238 JTRC_EMS_OPEN,
239 "Obtained EMS handle %u") JMESSAGE(JTRC_EOI,
240 "End Of Ima ge")
241 JMESSAGE(
242 JTRC_HUFFBITS,
243 " %3d %3d %3d %3d %3d %3d %3d %3d") JMESSAGE(JTRC_JFIF,
244 "JFIF APP0 marker: version %d.%02d, density %dx%d %d") JMESSAGE(JTRC_ JFIF_BADTHUMBNAILSIZE,
245 "Warn ing: thumbnail image size does not match data length %u") JMESSAGE(JTRC_JFIF_EXT ENSION,
246 "JFIF extensi on marker: type 0x%02x, length %u")
247 JMESSAGE(
248 JTRC_JFIF_THUMBNAIL,
249 " with %d x %d thumbnail image") JM ESSAGE(JTRC_MISC_MARKER,
250 "Miscellaneous marker 0x%02x, length %u") JMESSAGE(JTRC_PARMLESS_MARKER,
251 "Unexpected marker 0x% 02x") JMESSAGE(JTRC_QUANTVALS,
252 " %4u %4u %4u %4u %4u %4u %4u %4u") JMESSAGE(JTRC_QUANT_3_ NCOLORS,
253 "Quantizing t o %d = %d*%d*%d colors")
254 JMESSAGE(
255 JTRC_QUANT_NCOLORS,
256 "Quantizing to %d colors")
257 JMESSAGE(
258 JTRC_QUANT_SELECTED,
259 "Selected %d colors for quanti zation")
260 JMESSAGE(
261 JTRC_RECOVERY_ACTION,
262 "At marker 0x%02x, recover y action %d")
263 JMESSAGE(
264 JTRC_RST,
265 "RST%d")
266 JMESSAGE(JTRC_SMOOTH_N OTIMPL,
267 "Smoothing no t supported with nonstandard sampling ratios") JMESSAGE(JTRC_SOF,
268 "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") JMESSAGE(JTRC_SOF_COMPONENT,
269 " Component %d: %dhx%dv q=%d") JMESSAGE(JTRC_SOI,
270 "Start of Image") JMESSAGE(JTRC_SOS,
271 "Start Of Scan: %d components") JMESSAGE(JTR C_SOS_COMPONENT,
272 " Component %d: dc=%d ac=%d") JMESSAGE(JTRC_SOS_PARAMS,
273 " Ss=%d, Se=%d, Ah=%d, Al=%d") JMESSAGE( JTRC_TFILE_CLOSE,
274 "Closed temporary file %s") JMESSAGE(JTRC_TFILE_OPEN,
275 "Opened temporary file %s")
276 JMESSAGE(
277 JTRC_THUMB_JPE G,
278 "JFIF extensio n marker: JPEG-compressed thumbnail image, length %u")
279 JMESSAGE(
280 JTRC_THUMB _PALETTE,
281 "JFIF exte nsion marker: palette thumbnail image, length %u") JMESSAGE(JTRC_THUMB_RGB,
282 "JFIF extension mark er: RGB thumbnail image, length %u") JMESSAGE(JTRC_UNKNOWN_IDS,
283 "Unrecognized component IDs %d %d %d, assuming YCbCr") JMESSAGE(JTRC_XMS_CLOSE,
284 "Freed XMS handle %u") JMESSAGE(JTRC_XMS_OPEN,
285 "Obtained XMS hand le %u") JMESSAGE(JWRN_ADOBE_XFORM,
286 "Unknown Adobe color transform code %d")
287 JMESSAGE(
288 JWRN_B OGUS_PROGRESSION,
289 "Incon sistent progression sequence for component %d coefficient %d") JMESSAGE(JWRN_EXT RANEOUS_DATA,
290 "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") JMESSAGE(JWRN_HIT_MARKER,
291 "Corrupt JPEG da ta: premature end of data segment") JMESSAGE(JWRN_HUFF_BAD_CODE,
292 "Corrupt JPEG data: bad Huffman cod e") JMESSAGE(JWRN_JFIF_MAJOR,
293 "Warning: unknown JFIF revision number %d.%02d") JMESSAGE(JWRN_JPEG _EOF,
294 "Prematur e end of JPEG file") JMESSAGE(JWRN_MUST_RESYNC,
295 "Corrupt JPEG data: found marker 0x%02x instead of RST%d")
296 JMESSA GE(
297 JW RN_NOT_SEQUENTIAL,
298 "I nvalid SOS parameters for sequential JPEG") JMESSAGE(JWRN_TOO_MUCH_DATA,
299 "Application transferred to o many scanlines")
185 300
186 #ifdef JMAKE_ENUM_LIST 301 #ifdef JMAKE_ENUM_LIST
187 302
188 JMSG_LASTMSGCODE 303 JM SG_LASTMSGCODE
189 } J_MESSAGE_CODE; 304 } J_MESSAGE_CODE;
190 305
191 #undef JMAKE_ENUM_LIST 306 #undef JMAKE_ENUM_LIST
192 #endif /* JMAKE_ENUM_LIST */ 307 #endif /* JMAKE_ENUM_LIST */
193 308
194 /* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ 309 /* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
195 #undef JMESSAGE 310 #undef JMESSAGE
196 311
197
198 #ifndef JERROR_H 312 #ifndef JERROR_H
199 #define JERROR_H 313 #define JERROR_H
200 314
201 /* Macros to simplify using the error and trace message stuff */ 315 /* Macros to simplify using the error and trace message stuff */
202 /* The first parameter is either type of cinfo pointer */ 316 /* The first parameter is either type of cinfo pointer */
203 317
204 /* Fatal errors (print message and exit) */ 318 /* Fatal errors (print message and exit) */
205 #define ERREXIT(cinfo,code) \ 319 #define ERREXIT(cinfo, code) \
206 ((cinfo)->err->msg_code = (code), \ 320 ((cinfo)->err->msg_code = (code), \
207 (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) 321 (*(cinfo)->err->error_exit)((j_common_ptr)(cinfo)))
208 #define ERREXIT1(cinfo,code,p1) \ 322 #define ERREXIT1(cinfo, code, p1) \
209 ((cinfo)->err->msg_code = (code), \ 323 ((cinfo)->err->msg_code = (code), (cinfo)->err->msg_parm.i[0] = (p1), \
210 (cinfo)->err->msg_parm.i[0] = (p1), \ 324 (*(cinfo)->err->error_exit)((j_common_ptr)(cinfo)))
211 (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) 325 #define ERREXIT2(cinfo, code, p1, p2) \
212 #define ERREXIT2(cinfo,code,p1,p2) \ 326 ((cinfo)->err->msg_code = (code), (cinfo)->err->msg_parm.i[0] = (p1), \
213 ((cinfo)->err->msg_code = (code), \ 327 (cinfo)->err->msg_parm.i[1] = (p2), \
214 (cinfo)->err->msg_parm.i[0] = (p1), \ 328 (*(cinfo)->err->error_exit)((j_common_ptr)(cinfo)))
215 (cinfo)->err->msg_parm.i[1] = (p2), \ 329 #define ERREXIT3(cinfo, code, p1, p2, p3) \
216 (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) 330 ((cinfo)->err->msg_code = (code), (cinfo)->err->msg_parm.i[0] = (p1), \
217 #define ERREXIT3(cinfo,code,p1,p2,p3) \ 331 (cinfo)->err->msg_parm.i[1] = (p2), (cinfo)->err->msg_parm.i[2] = (p3), \
218 ((cinfo)->err->msg_code = (code), \ 332 (*(cinfo)->err->error_exit)((j_common_ptr)(cinfo)))
219 (cinfo)->err->msg_parm.i[0] = (p1), \ 333 #define ERREXIT4(cinfo, code, p1, p2, p3, p4) \
220 (cinfo)->err->msg_parm.i[1] = (p2), \ 334 ((cinfo)->err->msg_code = (code), (cinfo)->err->msg_parm.i[0] = (p1), \
221 (cinfo)->err->msg_parm.i[2] = (p3), \ 335 (cinfo)->err->msg_parm.i[1] = (p2), (cinfo)->err->msg_parm.i[2] = (p3), \
222 (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) 336 (cinfo)->err->msg_parm.i[3] = (p4), \
223 #define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ 337 (*(cinfo)->err->error_exit)((j_common_ptr)(cinfo)))
224 ((cinfo)->err->msg_code = (code), \ 338 #define ERREXITS(cinfo, code, str) \
225 (cinfo)->err->msg_parm.i[0] = (p1), \ 339 ((cinfo)->err->msg_code = (code), \
226 (cinfo)->err->msg_parm.i[1] = (p2), \
227 (cinfo)->err->msg_parm.i[2] = (p3), \
228 (cinfo)->err->msg_parm.i[3] = (p4), \
229 (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
230 #define ERREXITS(cinfo,code,str) \
231 ((cinfo)->err->msg_code = (code), \
232 FXSYS_strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ 340 FXSYS_strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
233 (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) 341 (*(cinfo)->err->error_exit)((j_common_ptr)(cinfo)))
234 342
235 #define MAKESTMT(stuff)»» do { stuff } while (0) 343 #define MAKESTMT(stuff) \
344 do { \
345 stuff \
346 } while (0)
236 347
237 /* Nonfatal errors (we can keep going, but the data is probably corrupt) */ 348 /* Nonfatal errors (we can keep going, but the data is probably corrupt) */
238 #define WARNMS(cinfo,code) \ 349 #define WARNMS(cinfo, code) \
239 ((cinfo)->err->msg_code = (code), \ 350 ((cinfo)->err->msg_code = (code), \
240 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) 351 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), -1))
241 #define WARNMS1(cinfo,code,p1) \ 352 #define WARNMS1(cinfo, code, p1) \
242 ((cinfo)->err->msg_code = (code), \ 353 ((cinfo)->err->msg_code = (code), (cinfo)->err->msg_parm.i[0] = (p1), \
243 (cinfo)->err->msg_parm.i[0] = (p1), \ 354 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), -1))
244 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) 355 #define WARNMS2(cinfo, code, p1, p2) \
245 #define WARNMS2(cinfo,code,p1,p2) \ 356 ((cinfo)->err->msg_code = (code), (cinfo)->err->msg_parm.i[0] = (p1), \
246 ((cinfo)->err->msg_code = (code), \ 357 (cinfo)->err->msg_parm.i[1] = (p2), \
247 (cinfo)->err->msg_parm.i[0] = (p1), \ 358 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), -1))
248 (cinfo)->err->msg_parm.i[1] = (p2), \
249 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
250 359
251 /* Informational/debugging messages */ 360 /* Informational/debugging messages */
252 #define TRACEMS(cinfo,lvl,code) \ 361 #define TRACEMS(cinfo, lvl, code) \
253 ((cinfo)->err->msg_code = (code), \ 362 ((cinfo)->err->msg_code = (code), \
254 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) 363 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), (lvl)))
255 #define TRACEMS1(cinfo,lvl,code,p1) \ 364 #define TRACEMS1(cinfo, lvl, code, p1) \
256 ((cinfo)->err->msg_code = (code), \ 365 ((cinfo)->err->msg_code = (code), (cinfo)->err->msg_parm.i[0] = (p1), \
257 (cinfo)->err->msg_parm.i[0] = (p1), \ 366 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), (lvl)))
258 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) 367 #define TRACEMS2(cinfo, lvl, code, p1, p2) \
259 #define TRACEMS2(cinfo,lvl,code,p1,p2) \ 368 ((cinfo)->err->msg_code = (code), (cinfo)->err->msg_parm.i[0] = (p1), \
260 ((cinfo)->err->msg_code = (code), \ 369 (cinfo)->err->msg_parm.i[1] = (p2), \
261 (cinfo)->err->msg_parm.i[0] = (p1), \ 370 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), (lvl)))
262 (cinfo)->err->msg_parm.i[1] = (p2), \ 371 #define TRACEMS3(cinfo, lvl, code, p1, p2, p3) \
263 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) 372 MAKESTMT(int* _mp = (cinfo)->err->msg_parm.i; _mp[0] = (p1); _mp[1] = (p2); \
264 #define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ 373 _mp[2] = (p3); (cinfo)->err->msg_code = (code); \
265 MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ 374 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), (lvl));)
266 » _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ 375 #define TRACEMS4(cinfo, lvl, code, p1, p2, p3, p4) \
267 » (cinfo)->err->msg_code = (code); \ 376 MAKESTMT(int* _mp = (cinfo)->err->msg_parm.i; _mp[0] = (p1); _mp[1] = (p2); \
268 » (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) 377 _mp[2] = (p3); _mp[3] = (p4); (cinfo)->err->msg_code = (code); \
269 #define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ 378 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), (lvl));)
270 MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ 379 #define TRACEMS5(cinfo, lvl, code, p1, p2, p3, p4, p5) \
271 » _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ 380 MAKESTMT(int* _mp = (cinfo)->err->msg_parm.i; _mp[0] = (p1); _mp[1] = (p2); \
272 » (cinfo)->err->msg_code = (code); \ 381 _mp[2] = (p3); _mp[3] = (p4); _mp[4] = (p5); \
273 » (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) 382 (cinfo)->err->msg_code = (code); \
274 #define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ 383 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), (lvl));)
275 MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ 384 #define TRACEMS8(cinfo, lvl, code, p1, p2, p3, p4, p5, p6, p7, p8) \
276 » _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ 385 MAKESTMT(int* _mp = (cinfo)->err->msg_parm.i; _mp[0] = (p1); _mp[1] = (p2); \
277 » _mp[4] = (p5); \ 386 _mp[2] = (p3); _mp[3] = (p4); _mp[4] = (p5); _mp[5] = (p6); \
278 » (cinfo)->err->msg_code = (code); \ 387 _mp[6] = (p7); _mp[7] = (p8); (cinfo)->err->msg_code = (code); \
279 » (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) 388 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), (lvl));)
280 #define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ 389 #define TRACEMSS(cinfo, lvl, code, str) \
281 MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ 390 ((cinfo)->err->msg_code = (code), \
282 » _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
283 » _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \
284 » (cinfo)->err->msg_code = (code); \
285 » (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
286 #define TRACEMSS(cinfo,lvl,code,str) \
287 ((cinfo)->err->msg_code = (code), \
288 FXSYS_strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ 391 FXSYS_strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
289 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) 392 (*(cinfo)->err->emit_message)((j_common_ptr)(cinfo), (lvl)))
290 393
291 #endif /* JERROR_H */ 394 #endif /* JERROR_H */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698