blob: cf2d8aabb46839e778dbbd615cfca7c077e4117e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/* See LICENSE file for copyright and license details. */
#include "liblss16.h"
const char *
liblss16_decode_strerror(enum liblss16_decode_error error)
{
switch ((int)error) {
case LIBLSS16_DECODE_TRUNCATED_MAGIC:
return "Short file: magic number truncated";
case LIBLSS16_DECODE_BAD_MAGIC:
return "Invalid LSS16 file: bad magic number";
case LIBLSS16_DECODE_TRUNCATED_HEADER:
return "Short file: image header truncated";
case LIBLSS16_DECODE_BAD_IMAGE_SIZE:
return "Invalid LSS16 file: invalid image size";
case LIBLSS16_DECODE_BAD_COLOUR:
return "Invalid LSS16 file: invalid colour map";
case LIBLSS16_DECODE_BAD_ROW_PADDING:
return "Invalid LSS16 file: invalid row padding";
case LIBLSS16_DECODE_EXCESSIVE_RUN_LENGTH:
return "Invalid LSS16 file: invalid run-length encoding";
case LIBLSS16_DECODE_TRUNCATED_IMAGE:
return "Short file: image truncated";
default:
return "Unrecognised error";
}
}
|