Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/libjpeg-turbo/src/cderror.h
9904 views
1
/*
2
* cderror.h
3
*
4
* This file was part of the Independent JPEG Group's software:
5
* Copyright (C) 1994-1997, Thomas G. Lane.
6
* Modified 2009-2017 by Guido Vollbeding.
7
* libjpeg-turbo Modifications:
8
* Copyright (C) 2021, 2024, D. R. Commander.
9
* For conditions of distribution and use, see the accompanying README.ijg
10
* file.
11
*
12
* This file defines the error and message codes for the cjpeg/djpeg
13
* applications. These strings are not needed as part of the JPEG library
14
* proper.
15
* Edit this file to add new codes, or to translate the message strings to
16
* some other language.
17
*/
18
19
/*
20
* To define the enum list of message codes, include this file without
21
* defining macro JMESSAGE. To create a message string table, include it
22
* again with a suitable JMESSAGE definition (see jerror.c for an example).
23
*/
24
#ifndef JMESSAGE
25
#ifndef CDERROR_H
26
#define CDERROR_H
27
/* First time through, define the enum list */
28
#define JMAKE_ENUM_LIST
29
#else
30
/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
31
#define JMESSAGE(code, string)
32
#endif /* CDERROR_H */
33
#endif /* JMESSAGE */
34
35
#ifdef JMAKE_ENUM_LIST
36
37
typedef enum {
38
39
#define JMESSAGE(code, string) code,
40
41
#endif /* JMAKE_ENUM_LIST */
42
43
JMESSAGE(JMSG_FIRSTADDONCODE = 1000, NULL) /* Must be first entry! */
44
45
JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")
46
JMESSAGE(JERR_BMP_BADDEPTH, "Only 8-, 24-, and 32-bit BMP files are supported")
47
JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")
48
JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
49
JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
50
JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
51
JMESSAGE(JERR_BMP_EMPTY, "Empty BMP image")
52
JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
53
JMESSAGE(JERR_BMP_OUTOFRANGE, "Numeric value out of range in BMP file")
54
JMESSAGE(JTRC_BMP, "%ux%u %d-bit BMP image")
55
JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
56
JMESSAGE(JTRC_BMP_OS2, "%ux%u %d-bit OS2 BMP image")
57
JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image")
58
59
JMESSAGE(JERR_GIF_BUG, "GIF output got confused")
60
JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d")
61
JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB")
62
JMESSAGE(JERR_GIF_EMPTY, "Empty GIF image")
63
JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")
64
JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
65
JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
66
JMESSAGE(JTRC_GIF_BADVERSION,
67
"Warning: unexpected GIF version number '%c%c%c'")
68
JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
69
JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
70
JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
71
JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring")
72
JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image")
73
JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
74
75
JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
76
JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
77
JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")
78
JMESSAGE(JERR_PPM_OUTOFRANGE, "Numeric value out of range in PPM file")
79
JMESSAGE(JTRC_PGM, "%ux%u PGM image (maximum color value = %u)")
80
JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image (maximum color value = %u)")
81
JMESSAGE(JTRC_PPM, "%ux%u PPM image (maximum color value = %u)")
82
JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image (maximum color value = %u)")
83
84
JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format")
85
JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file")
86
JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB")
87
JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image")
88
JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image")
89
JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image")
90
JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")
91
92
JMESSAGE(JERR_BAD_CMAP_FILE,
93
"Color map file is invalid or of unsupported format")
94
JMESSAGE(JERR_TOO_MANY_COLORS,
95
"Output file format cannot handle %d colormap entries")
96
JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
97
#ifdef TARGA_SUPPORTED
98
JMESSAGE(JERR_UNKNOWN_FORMAT,
99
"Unrecognized input file format --- perhaps you need -targa")
100
#else
101
JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
102
#endif
103
JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format")
104
105
#ifdef JMAKE_ENUM_LIST
106
107
JMSG_LASTADDONCODE
108
} ADDON_MESSAGE_CODE;
109
110
#undef JMAKE_ENUM_LIST
111
#endif /* JMAKE_ENUM_LIST */
112
113
/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
114
#undef JMESSAGE
115
116