From e1695e96b0ecc60327f8cb287517f6009eb8ddc8 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 3 Mar 2022 13:33:42 +0000 Subject: API: Single error code for end of data. --- include/nsgif.h | 7 +------ src/gif.c | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/nsgif.h b/include/nsgif.h index fe11d29..a8f384c 100644 --- a/include/nsgif.h +++ b/include/nsgif.h @@ -82,15 +82,10 @@ typedef enum { NSGIF_ERR_FRAME_COUNT, /** - * GIF source data ended without one complete frame available. + * Unexpected end of GIF source data. */ NSGIF_ERR_END_OF_DATA, - /** - * GIF source data ended with incomplete frame. - */ - NSGIF_ERR_END_OF_FRAME, - /** * The current frame cannot be displayed. */ diff --git a/src/gif.c b/src/gif.c index d2f6c61..4fdaaac 100644 --- a/src/gif.c +++ b/src/gif.c @@ -1761,8 +1761,7 @@ const char *nsgif_strerror(nsgif_error err) [NSGIF_ERR_BAD_FRAME] = "Requested frame does not exist", [NSGIF_ERR_DATA_FRAME] = "Invalid frame data", [NSGIF_ERR_FRAME_COUNT] = "Excessive number of frames", - [NSGIF_ERR_END_OF_DATA] = "Insufficient data for first frame", - [NSGIF_ERR_END_OF_FRAME] = "End of data during frame", + [NSGIF_ERR_END_OF_DATA] = "Unexpected end of GIF source data", [NSGIF_ERR_FRAME_DISPLAY] = "Frame can't be displayed", [NSGIF_ERR_ANIMATION_END] = "Animation complete", }; -- cgit v1.2.1