/* 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"; } }