summaryrefslogtreecommitdiff
path: root/apps/plugins/imageviewer/gif/gif_err.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/imageviewer/gif/gif_err.c')
-rw-r--r--apps/plugins/imageviewer/gif/gif_err.c99
1 files changed, 99 insertions, 0 deletions
diff --git a/apps/plugins/imageviewer/gif/gif_err.c b/apps/plugins/imageviewer/gif/gif_err.c
new file mode 100644
index 0000000000..abfb579b29
--- /dev/null
+++ b/apps/plugins/imageviewer/gif/gif_err.c
@@ -0,0 +1,99 @@
1/*****************************************************************************
2
3gif_err.c - handle error reporting for the GIF library.
4
5****************************************************************************/
6
7/* #include <stdio.h> */
8
9#include "gif_lib.h"
10#include "gif_lib_private.h"
11
12/*****************************************************************************
13 Return a string description of the last GIF error
14*****************************************************************************/
15char *
16GifErrorString(int ErrorCode)
17{
18 char *Err;
19
20 switch (ErrorCode) {
21#if 0
22 case E_GIF_ERR_OPEN_FAILED:
23 Err = "Failed to open given file";
24 break;
25 case E_GIF_ERR_WRITE_FAILED:
26 Err = "Failed to write to given file";
27 break;
28 case E_GIF_ERR_HAS_SCRN_DSCR:
29 Err = "Screen descriptor has already been set";
30 break;
31 case E_GIF_ERR_HAS_IMAG_DSCR:
32 Err = "Image descriptor is still active";
33 break;
34 case E_GIF_ERR_NO_COLOR_MAP:
35 Err = "Neither global nor local color map";
36 break;
37 case E_GIF_ERR_DATA_TOO_BIG:
38 Err = "Number of pixels bigger than width * height";
39 break;
40 case E_GIF_ERR_NOT_ENOUGH_MEM:
41 Err = "Failed to allocate required memory";
42 break;
43 case E_GIF_ERR_DISK_IS_FULL:
44 Err = "Write failed (disk full?)";
45 break;
46 case E_GIF_ERR_CLOSE_FAILED:
47 Err = "Failed to close given file";
48 break;
49 case E_GIF_ERR_NOT_WRITEABLE:
50 Err = "Given file was not opened for write";
51 break;
52#endif
53 case D_GIF_ERR_OPEN_FAILED:
54 Err = "Failed to open given file";
55 break;
56 case D_GIF_ERR_READ_FAILED:
57 Err = "Failed to read from given file";
58 break;
59 case D_GIF_ERR_NOT_GIF_FILE:
60 Err = "Data is not in GIF format";
61 break;
62 case D_GIF_ERR_NO_SCRN_DSCR:
63 Err = "No screen descriptor detected";
64 break;
65 case D_GIF_ERR_NO_IMAG_DSCR:
66 Err = "No Image Descriptor detected";
67 break;
68 case D_GIF_ERR_NO_COLOR_MAP:
69 Err = "Neither global nor local color map";
70 break;
71 case D_GIF_ERR_WRONG_RECORD:
72 Err = "Wrong record type detected";
73 break;
74 case D_GIF_ERR_DATA_TOO_BIG:
75 Err = "Number of pixels bigger than width * height";
76 break;
77 case D_GIF_ERR_NOT_ENOUGH_MEM:
78 Err = "Failed to allocate required memory";
79 break;
80 case D_GIF_ERR_CLOSE_FAILED:
81 Err = "Failed to close given file";
82 break;
83 case D_GIF_ERR_NOT_READABLE:
84 Err = "Given file was not opened for read";
85 break;
86 case D_GIF_ERR_IMAGE_DEFECT:
87 Err = "Image is defective, decoding aborted";
88 break;
89 case D_GIF_ERR_EOF_TOO_SOON:
90 Err = "Image EOF detected before image complete";
91 break;
92 default:
93 Err = NULL;
94 break;
95 }
96 return Err;
97}
98
99/* end */