vrshoot

diff libs/libjpeg/cderror.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/libjpeg/cderror.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,132 @@
     1.4 +/*
     1.5 + * cderror.h
     1.6 + *
     1.7 + * Copyright (C) 1994-1997, Thomas G. Lane.
     1.8 + * This file is part of the Independent JPEG Group's software.
     1.9 + * For conditions of distribution and use, see the accompanying README file.
    1.10 + *
    1.11 + * This file defines the error and message codes for the cjpeg/djpeg
    1.12 + * applications.  These strings are not needed as part of the JPEG library
    1.13 + * proper.
    1.14 + * Edit this file to add new codes, or to translate the message strings to
    1.15 + * some other language.
    1.16 + */
    1.17 +
    1.18 +/*
    1.19 + * To define the enum list of message codes, include this file without
    1.20 + * defining macro JMESSAGE.  To create a message string table, include it
    1.21 + * again with a suitable JMESSAGE definition (see jerror.c for an example).
    1.22 + */
    1.23 +#ifndef JMESSAGE
    1.24 +#ifndef CDERROR_H
    1.25 +#define CDERROR_H
    1.26 +/* First time through, define the enum list */
    1.27 +#define JMAKE_ENUM_LIST
    1.28 +#else
    1.29 +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
    1.30 +#define JMESSAGE(code,string)
    1.31 +#endif /* CDERROR_H */
    1.32 +#endif /* JMESSAGE */
    1.33 +
    1.34 +#ifdef JMAKE_ENUM_LIST
    1.35 +
    1.36 +typedef enum {
    1.37 +
    1.38 +#define JMESSAGE(code,string)	code ,
    1.39 +
    1.40 +#endif /* JMAKE_ENUM_LIST */
    1.41 +
    1.42 +JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */
    1.43 +
    1.44 +#ifdef BMP_SUPPORTED
    1.45 +JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")
    1.46 +JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported")
    1.47 +JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")
    1.48 +JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
    1.49 +JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
    1.50 +JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
    1.51 +JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
    1.52 +JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
    1.53 +JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
    1.54 +JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image")
    1.55 +JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image")
    1.56 +#endif /* BMP_SUPPORTED */
    1.57 +
    1.58 +#ifdef GIF_SUPPORTED
    1.59 +JMESSAGE(JERR_GIF_BUG, "GIF output got confused")
    1.60 +JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d")
    1.61 +JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB")
    1.62 +JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")
    1.63 +JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
    1.64 +JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
    1.65 +JMESSAGE(JTRC_GIF_BADVERSION,
    1.66 +	 "Warning: unexpected GIF version number '%c%c%c'")
    1.67 +JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
    1.68 +JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
    1.69 +JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
    1.70 +JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring")
    1.71 +JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image")
    1.72 +JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
    1.73 +#endif /* GIF_SUPPORTED */
    1.74 +
    1.75 +#ifdef PPM_SUPPORTED
    1.76 +JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
    1.77 +JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
    1.78 +JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")
    1.79 +JMESSAGE(JTRC_PGM, "%ux%u PGM image")
    1.80 +JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
    1.81 +JMESSAGE(JTRC_PPM, "%ux%u PPM image")
    1.82 +JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image")
    1.83 +#endif /* PPM_SUPPORTED */
    1.84 +
    1.85 +#ifdef RLE_SUPPORTED
    1.86 +JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library")
    1.87 +JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB")
    1.88 +JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE")
    1.89 +JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file")
    1.90 +JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header")
    1.91 +JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header")
    1.92 +JMESSAGE(JERR_RLE_NOT, "Not an RLE file")
    1.93 +JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE")
    1.94 +JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup")
    1.95 +JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file")
    1.96 +JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d")
    1.97 +JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file")
    1.98 +JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d")
    1.99 +JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d")
   1.100 +#endif /* RLE_SUPPORTED */
   1.101 +
   1.102 +#ifdef TARGA_SUPPORTED
   1.103 +JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format")
   1.104 +JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file")
   1.105 +JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB")
   1.106 +JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image")
   1.107 +JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image")
   1.108 +JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image")
   1.109 +#else
   1.110 +JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")
   1.111 +#endif /* TARGA_SUPPORTED */
   1.112 +
   1.113 +JMESSAGE(JERR_BAD_CMAP_FILE,
   1.114 +	 "Color map file is invalid or of unsupported format")
   1.115 +JMESSAGE(JERR_TOO_MANY_COLORS,
   1.116 +	 "Output file format cannot handle %d colormap entries")
   1.117 +JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
   1.118 +#ifdef TARGA_SUPPORTED
   1.119 +JMESSAGE(JERR_UNKNOWN_FORMAT,
   1.120 +	 "Unrecognized input file format --- perhaps you need -targa")
   1.121 +#else
   1.122 +JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
   1.123 +#endif
   1.124 +JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format")
   1.125 +
   1.126 +#ifdef JMAKE_ENUM_LIST
   1.127 +
   1.128 +  JMSG_LASTADDONCODE
   1.129 +} ADDON_MESSAGE_CODE;
   1.130 +
   1.131 +#undef JMAKE_ENUM_LIST
   1.132 +#endif /* JMAKE_ENUM_LIST */
   1.133 +
   1.134 +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
   1.135 +#undef JMESSAGE