Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* |
michael@0 | 2 | * jerror.h |
michael@0 | 3 | * |
michael@0 | 4 | * Copyright (C) 1994-1997, Thomas G. Lane. |
michael@0 | 5 | * Modified 1997-2009 by Guido Vollbeding. |
michael@0 | 6 | * This file is part of the Independent JPEG Group's software. |
michael@0 | 7 | * For conditions of distribution and use, see the accompanying README file. |
michael@0 | 8 | * |
michael@0 | 9 | * This file defines the error and message codes for the JPEG library. |
michael@0 | 10 | * Edit this file to add new codes, or to translate the message strings to |
michael@0 | 11 | * some other language. |
michael@0 | 12 | * A set of error-reporting macros are defined too. Some applications using |
michael@0 | 13 | * the JPEG library may wish to include this file to get the error codes |
michael@0 | 14 | * and/or the macros. |
michael@0 | 15 | */ |
michael@0 | 16 | |
michael@0 | 17 | /* |
michael@0 | 18 | * To define the enum list of message codes, include this file without |
michael@0 | 19 | * defining macro JMESSAGE. To create a message string table, include it |
michael@0 | 20 | * again with a suitable JMESSAGE definition (see jerror.c for an example). |
michael@0 | 21 | */ |
michael@0 | 22 | #ifndef JMESSAGE |
michael@0 | 23 | #ifndef JERROR_H |
michael@0 | 24 | /* First time through, define the enum list */ |
michael@0 | 25 | #define JMAKE_ENUM_LIST |
michael@0 | 26 | #else |
michael@0 | 27 | /* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ |
michael@0 | 28 | #define JMESSAGE(code,string) |
michael@0 | 29 | #endif /* JERROR_H */ |
michael@0 | 30 | #endif /* JMESSAGE */ |
michael@0 | 31 | |
michael@0 | 32 | #ifdef JMAKE_ENUM_LIST |
michael@0 | 33 | |
michael@0 | 34 | typedef enum { |
michael@0 | 35 | |
michael@0 | 36 | #define JMESSAGE(code,string) code , |
michael@0 | 37 | |
michael@0 | 38 | #endif /* JMAKE_ENUM_LIST */ |
michael@0 | 39 | |
michael@0 | 40 | JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ |
michael@0 | 41 | |
michael@0 | 42 | /* For maintenance convenience, list is alphabetical by message code name */ |
michael@0 | 43 | #if JPEG_LIB_VERSION < 70 |
michael@0 | 44 | JMESSAGE(JERR_ARITH_NOTIMPL, |
michael@0 | 45 | "Sorry, arithmetic coding is not implemented") |
michael@0 | 46 | #endif |
michael@0 | 47 | JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") |
michael@0 | 48 | JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") |
michael@0 | 49 | JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") |
michael@0 | 50 | JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") |
michael@0 | 51 | #if JPEG_LIB_VERSION >= 70 |
michael@0 | 52 | JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") |
michael@0 | 53 | #endif |
michael@0 | 54 | JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") |
michael@0 | 55 | JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") |
michael@0 | 56 | #if JPEG_LIB_VERSION >= 70 |
michael@0 | 57 | JMESSAGE(JERR_BAD_DROP_SAMPLING, |
michael@0 | 58 | "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") |
michael@0 | 59 | #endif |
michael@0 | 60 | JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") |
michael@0 | 61 | JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") |
michael@0 | 62 | JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") |
michael@0 | 63 | JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") |
michael@0 | 64 | JMESSAGE(JERR_BAD_LIB_VERSION, |
michael@0 | 65 | "Wrong JPEG library version: library is %d, caller expects %d") |
michael@0 | 66 | JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") |
michael@0 | 67 | JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") |
michael@0 | 68 | JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") |
michael@0 | 69 | JMESSAGE(JERR_BAD_PROGRESSION, |
michael@0 | 70 | "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") |
michael@0 | 71 | JMESSAGE(JERR_BAD_PROG_SCRIPT, |
michael@0 | 72 | "Invalid progressive parameters at scan script entry %d") |
michael@0 | 73 | JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") |
michael@0 | 74 | JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") |
michael@0 | 75 | JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") |
michael@0 | 76 | JMESSAGE(JERR_BAD_STRUCT_SIZE, |
michael@0 | 77 | "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") |
michael@0 | 78 | JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") |
michael@0 | 79 | JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") |
michael@0 | 80 | JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") |
michael@0 | 81 | JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") |
michael@0 | 82 | JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") |
michael@0 | 83 | JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") |
michael@0 | 84 | JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") |
michael@0 | 85 | JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") |
michael@0 | 86 | JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") |
michael@0 | 87 | JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") |
michael@0 | 88 | JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") |
michael@0 | 89 | JMESSAGE(JERR_EMS_READ, "Read from EMS failed") |
michael@0 | 90 | JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") |
michael@0 | 91 | JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") |
michael@0 | 92 | JMESSAGE(JERR_FILE_READ, "Input file read error") |
michael@0 | 93 | JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") |
michael@0 | 94 | JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") |
michael@0 | 95 | JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") |
michael@0 | 96 | JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") |
michael@0 | 97 | JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") |
michael@0 | 98 | JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") |
michael@0 | 99 | JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") |
michael@0 | 100 | JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, |
michael@0 | 101 | "Cannot transcode due to multiple use of quantization table %d") |
michael@0 | 102 | JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") |
michael@0 | 103 | JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") |
michael@0 | 104 | JMESSAGE(JERR_NOTIMPL, "Not implemented yet") |
michael@0 | 105 | JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") |
michael@0 | 106 | #if JPEG_LIB_VERSION >= 70 |
michael@0 | 107 | JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") |
michael@0 | 108 | #endif |
michael@0 | 109 | JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") |
michael@0 | 110 | JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") |
michael@0 | 111 | JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") |
michael@0 | 112 | JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") |
michael@0 | 113 | JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") |
michael@0 | 114 | JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") |
michael@0 | 115 | JMESSAGE(JERR_QUANT_COMPONENTS, |
michael@0 | 116 | "Cannot quantize more than %d color components") |
michael@0 | 117 | JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") |
michael@0 | 118 | JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") |
michael@0 | 119 | JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") |
michael@0 | 120 | JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") |
michael@0 | 121 | JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") |
michael@0 | 122 | JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") |
michael@0 | 123 | JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") |
michael@0 | 124 | JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") |
michael@0 | 125 | JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") |
michael@0 | 126 | JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") |
michael@0 | 127 | JMESSAGE(JERR_TFILE_WRITE, |
michael@0 | 128 | "Write failed on temporary file --- out of disk space?") |
michael@0 | 129 | JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") |
michael@0 | 130 | JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") |
michael@0 | 131 | JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") |
michael@0 | 132 | JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") |
michael@0 | 133 | JMESSAGE(JERR_XMS_READ, "Read from XMS failed") |
michael@0 | 134 | JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") |
michael@0 | 135 | JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) |
michael@0 | 136 | JMESSAGE(JMSG_VERSION, JVERSION) |
michael@0 | 137 | JMESSAGE(JTRC_16BIT_TABLES, |
michael@0 | 138 | "Caution: quantization tables are too coarse for baseline JPEG") |
michael@0 | 139 | JMESSAGE(JTRC_ADOBE, |
michael@0 | 140 | "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") |
michael@0 | 141 | JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") |
michael@0 | 142 | JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") |
michael@0 | 143 | JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") |
michael@0 | 144 | JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") |
michael@0 | 145 | JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") |
michael@0 | 146 | JMESSAGE(JTRC_DRI, "Define Restart Interval %u") |
michael@0 | 147 | JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") |
michael@0 | 148 | JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") |
michael@0 | 149 | JMESSAGE(JTRC_EOI, "End Of Image") |
michael@0 | 150 | JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") |
michael@0 | 151 | JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") |
michael@0 | 152 | JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, |
michael@0 | 153 | "Warning: thumbnail image size does not match data length %u") |
michael@0 | 154 | JMESSAGE(JTRC_JFIF_EXTENSION, |
michael@0 | 155 | "JFIF extension marker: type 0x%02x, length %u") |
michael@0 | 156 | JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") |
michael@0 | 157 | JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") |
michael@0 | 158 | JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") |
michael@0 | 159 | JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") |
michael@0 | 160 | JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") |
michael@0 | 161 | JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") |
michael@0 | 162 | JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") |
michael@0 | 163 | JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") |
michael@0 | 164 | JMESSAGE(JTRC_RST, "RST%d") |
michael@0 | 165 | JMESSAGE(JTRC_SMOOTH_NOTIMPL, |
michael@0 | 166 | "Smoothing not supported with nonstandard sampling ratios") |
michael@0 | 167 | JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") |
michael@0 | 168 | JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") |
michael@0 | 169 | JMESSAGE(JTRC_SOI, "Start of Image") |
michael@0 | 170 | JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") |
michael@0 | 171 | JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") |
michael@0 | 172 | JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") |
michael@0 | 173 | JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") |
michael@0 | 174 | JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") |
michael@0 | 175 | JMESSAGE(JTRC_THUMB_JPEG, |
michael@0 | 176 | "JFIF extension marker: JPEG-compressed thumbnail image, length %u") |
michael@0 | 177 | JMESSAGE(JTRC_THUMB_PALETTE, |
michael@0 | 178 | "JFIF extension marker: palette thumbnail image, length %u") |
michael@0 | 179 | JMESSAGE(JTRC_THUMB_RGB, |
michael@0 | 180 | "JFIF extension marker: RGB thumbnail image, length %u") |
michael@0 | 181 | JMESSAGE(JTRC_UNKNOWN_IDS, |
michael@0 | 182 | "Unrecognized component IDs %d %d %d, assuming YCbCr") |
michael@0 | 183 | JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") |
michael@0 | 184 | JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") |
michael@0 | 185 | JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") |
michael@0 | 186 | #if JPEG_LIB_VERSION >= 70 |
michael@0 | 187 | JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") |
michael@0 | 188 | #endif |
michael@0 | 189 | JMESSAGE(JWRN_BOGUS_PROGRESSION, |
michael@0 | 190 | "Inconsistent progression sequence for component %d coefficient %d") |
michael@0 | 191 | JMESSAGE(JWRN_EXTRANEOUS_DATA, |
michael@0 | 192 | "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") |
michael@0 | 193 | JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") |
michael@0 | 194 | JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") |
michael@0 | 195 | JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") |
michael@0 | 196 | JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") |
michael@0 | 197 | JMESSAGE(JWRN_MUST_RESYNC, |
michael@0 | 198 | "Corrupt JPEG data: found marker 0x%02x instead of RST%d") |
michael@0 | 199 | JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") |
michael@0 | 200 | JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") |
michael@0 | 201 | #if JPEG_LIB_VERSION < 70 |
michael@0 | 202 | JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") |
michael@0 | 203 | #if defined(C_ARITH_CODING_SUPPORTED) || defined(D_ARITH_CODING_SUPPORTED) |
michael@0 | 204 | JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") |
michael@0 | 205 | JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") |
michael@0 | 206 | #endif |
michael@0 | 207 | #endif |
michael@0 | 208 | |
michael@0 | 209 | #ifdef JMAKE_ENUM_LIST |
michael@0 | 210 | |
michael@0 | 211 | JMSG_LASTMSGCODE |
michael@0 | 212 | } J_MESSAGE_CODE; |
michael@0 | 213 | |
michael@0 | 214 | #undef JMAKE_ENUM_LIST |
michael@0 | 215 | #endif /* JMAKE_ENUM_LIST */ |
michael@0 | 216 | |
michael@0 | 217 | /* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ |
michael@0 | 218 | #undef JMESSAGE |
michael@0 | 219 | |
michael@0 | 220 | |
michael@0 | 221 | #ifndef JERROR_H |
michael@0 | 222 | #define JERROR_H |
michael@0 | 223 | |
michael@0 | 224 | /* Macros to simplify using the error and trace message stuff */ |
michael@0 | 225 | /* The first parameter is either type of cinfo pointer */ |
michael@0 | 226 | |
michael@0 | 227 | /* Fatal errors (print message and exit) */ |
michael@0 | 228 | #define ERREXIT(cinfo,code) \ |
michael@0 | 229 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 230 | (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) |
michael@0 | 231 | #define ERREXIT1(cinfo,code,p1) \ |
michael@0 | 232 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 233 | (cinfo)->err->msg_parm.i[0] = (p1), \ |
michael@0 | 234 | (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) |
michael@0 | 235 | #define ERREXIT2(cinfo,code,p1,p2) \ |
michael@0 | 236 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 237 | (cinfo)->err->msg_parm.i[0] = (p1), \ |
michael@0 | 238 | (cinfo)->err->msg_parm.i[1] = (p2), \ |
michael@0 | 239 | (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) |
michael@0 | 240 | #define ERREXIT3(cinfo,code,p1,p2,p3) \ |
michael@0 | 241 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 242 | (cinfo)->err->msg_parm.i[0] = (p1), \ |
michael@0 | 243 | (cinfo)->err->msg_parm.i[1] = (p2), \ |
michael@0 | 244 | (cinfo)->err->msg_parm.i[2] = (p3), \ |
michael@0 | 245 | (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) |
michael@0 | 246 | #define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ |
michael@0 | 247 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 248 | (cinfo)->err->msg_parm.i[0] = (p1), \ |
michael@0 | 249 | (cinfo)->err->msg_parm.i[1] = (p2), \ |
michael@0 | 250 | (cinfo)->err->msg_parm.i[2] = (p3), \ |
michael@0 | 251 | (cinfo)->err->msg_parm.i[3] = (p4), \ |
michael@0 | 252 | (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) |
michael@0 | 253 | #define ERREXITS(cinfo,code,str) \ |
michael@0 | 254 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 255 | strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ |
michael@0 | 256 | (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) |
michael@0 | 257 | |
michael@0 | 258 | #define MAKESTMT(stuff) do { stuff } while (0) |
michael@0 | 259 | |
michael@0 | 260 | /* Nonfatal errors (we can keep going, but the data is probably corrupt) */ |
michael@0 | 261 | #define WARNMS(cinfo,code) \ |
michael@0 | 262 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 263 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) |
michael@0 | 264 | #define WARNMS1(cinfo,code,p1) \ |
michael@0 | 265 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 266 | (cinfo)->err->msg_parm.i[0] = (p1), \ |
michael@0 | 267 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) |
michael@0 | 268 | #define WARNMS2(cinfo,code,p1,p2) \ |
michael@0 | 269 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 270 | (cinfo)->err->msg_parm.i[0] = (p1), \ |
michael@0 | 271 | (cinfo)->err->msg_parm.i[1] = (p2), \ |
michael@0 | 272 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) |
michael@0 | 273 | |
michael@0 | 274 | /* Informational/debugging messages */ |
michael@0 | 275 | #define TRACEMS(cinfo,lvl,code) \ |
michael@0 | 276 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 277 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) |
michael@0 | 278 | #define TRACEMS1(cinfo,lvl,code,p1) \ |
michael@0 | 279 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 280 | (cinfo)->err->msg_parm.i[0] = (p1), \ |
michael@0 | 281 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) |
michael@0 | 282 | #define TRACEMS2(cinfo,lvl,code,p1,p2) \ |
michael@0 | 283 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 284 | (cinfo)->err->msg_parm.i[0] = (p1), \ |
michael@0 | 285 | (cinfo)->err->msg_parm.i[1] = (p2), \ |
michael@0 | 286 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) |
michael@0 | 287 | #define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ |
michael@0 | 288 | MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ |
michael@0 | 289 | _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ |
michael@0 | 290 | (cinfo)->err->msg_code = (code); \ |
michael@0 | 291 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) |
michael@0 | 292 | #define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ |
michael@0 | 293 | MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ |
michael@0 | 294 | _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ |
michael@0 | 295 | (cinfo)->err->msg_code = (code); \ |
michael@0 | 296 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) |
michael@0 | 297 | #define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ |
michael@0 | 298 | MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ |
michael@0 | 299 | _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ |
michael@0 | 300 | _mp[4] = (p5); \ |
michael@0 | 301 | (cinfo)->err->msg_code = (code); \ |
michael@0 | 302 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) |
michael@0 | 303 | #define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ |
michael@0 | 304 | MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ |
michael@0 | 305 | _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ |
michael@0 | 306 | _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ |
michael@0 | 307 | (cinfo)->err->msg_code = (code); \ |
michael@0 | 308 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) |
michael@0 | 309 | #define TRACEMSS(cinfo,lvl,code,str) \ |
michael@0 | 310 | ((cinfo)->err->msg_code = (code), \ |
michael@0 | 311 | strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ |
michael@0 | 312 | (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) |
michael@0 | 313 | |
michael@0 | 314 | #endif /* JERROR_H */ |