Gitweb links:

...log 
http://git.netsurf-browser.org/libnsgif.git/shortlog/1b0c8759f5d96e96ded4cb50bb2772103780e2eb
...commit 
http://git.netsurf-browser.org/libnsgif.git/commit/1b0c8759f5d96e96ded4cb50bb2772103780e2eb
...tree 
http://git.netsurf-browser.org/libnsgif.git/tree/1b0c8759f5d96e96ded4cb50bb2772103780e2eb

The branch, tlsa/rewrite has been updated
       via  1b0c8759f5d96e96ded4cb50bb2772103780e2eb (commit)
       via  d1762afcee8b6541a974eeb37edea2a828096b8a (commit)
      from  947586eb1b14c267ee996ba655af13899488c0f3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/libnsgif.git/commit/?id=1b0c8759f5d96e96ded4cb50bb2772103780e2eb
commit 1b0c8759f5d96e96ded4cb50bb2772103780e2eb
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    API: Fix typos in public header.

diff --git a/include/libnsgif.h b/include/libnsgif.h
index adbacbe..3087a4d 100644
--- a/include/libnsgif.h
+++ b/include/libnsgif.h
@@ -46,11 +46,11 @@ typedef struct gif_frame {
        bool virgin;
        /** whether the frame is totally opaque */
        bool opaque;
-       /** whether a forcable screen redraw is required */
+       /** whether a full image redraw is required */
        bool redraw_required;
        /** how the previous frame should be disposed; affects plotting */
        unsigned char disposal_method;
-       /** whether we acknoledge transparency */
+       /** whether we acknowledge transparency */
        bool transparency;
        /** the index designating a transparent pixel */
        unsigned int transparency_index;
@@ -89,7 +89,7 @@ typedef struct gif_bitmap_callback_vt {
        gif_bitmap_cb_set_opaque bitmap_set_opaque;
        /** Tests whether a bitmap has an opaque alpha channel. */
        gif_bitmap_cb_test_opaque bitmap_test_opaque;
-       /** The bitmap image has changed, so flush any persistant cache. */
+       /** The bitmap image has changed, so flush any persistent cache. */
        gif_bitmap_cb_modified bitmap_modified;
 } gif_bitmap_callback_vt;
 
@@ -103,7 +103,7 @@ typedef struct gif_animation {
        const uint8_t *gif_data;
        /** width of GIF (may increase during decoding) */
        unsigned int width;
-       /** heigth of GIF (may increase during decoding) */
+       /** height of GIF (may increase during decoding) */
        unsigned int height;
        /** number of frames decoded */
        unsigned int frame_count;


commitdiff 
http://git.netsurf-browser.org/libnsgif.git/commit/?id=d1762afcee8b6541a974eeb37edea2a828096b8a
commit d1762afcee8b6541a974eeb37edea2a828096b8a
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    API: Clean up public header indentation.

diff --git a/include/libnsgif.h b/include/libnsgif.h
index 36f59a4..adbacbe 100644
--- a/include/libnsgif.h
+++ b/include/libnsgif.h
@@ -20,50 +20,50 @@
 
 /* Error return values */
 typedef enum {
-        GIF_WORKING = 1,
-        GIF_OK = 0,
-        GIF_INSUFFICIENT_FRAME_DATA = -1,
-        GIF_FRAME_DATA_ERROR = -2,
-        GIF_INSUFFICIENT_DATA = -3,
-        GIF_DATA_ERROR = -4,
-        GIF_INSUFFICIENT_MEMORY = -5,
-        GIF_FRAME_NO_DISPLAY = -6,
-        GIF_END_OF_FRAME = -7
+       GIF_WORKING = 1,
+       GIF_OK = 0,
+       GIF_INSUFFICIENT_FRAME_DATA = -1,
+       GIF_FRAME_DATA_ERROR = -2,
+       GIF_INSUFFICIENT_DATA = -3,
+       GIF_DATA_ERROR = -4,
+       GIF_INSUFFICIENT_MEMORY = -5,
+       GIF_FRAME_NO_DISPLAY = -6,
+       GIF_END_OF_FRAME = -7
 } gif_result;
 
 /** GIF frame data */
 typedef struct gif_frame {
-        /** whether the frame should be displayed/animated */
-        bool display;
-        /** delay (in cs) before animating the frame */
-        unsigned int frame_delay;
-
-        /* Internal members are listed below */
-
-        /** offset (in bytes) to the GIF frame data */
-        unsigned int frame_pointer;
-        /** whether the frame has previously been used */
-        bool virgin;
-        /** whether the frame is totally opaque */
-        bool opaque;
-        /** whether a forcable screen redraw is required */
-        bool redraw_required;
-        /** how the previous frame should be disposed; affects plotting */
-        unsigned char disposal_method;
-        /** whether we acknoledge transparency */
-        bool transparency;
-        /** the index designating a transparent pixel */
-        unsigned int transparency_index;
-        /** x co-ordinate of redraw rectangle */
-        unsigned int redraw_x;
-        /** y co-ordinate of redraw rectangle */
-        unsigned int redraw_y;
-        /** width of redraw rectangle */
-        unsigned int redraw_width;
-        /** height of redraw rectangle */
-        unsigned int redraw_height;
-        /* Frame flags */
-        unsigned int flags;
+       /** whether the frame should be displayed/animated */
+       bool display;
+       /** delay (in cs) before animating the frame */
+       unsigned int frame_delay;
+
+       /* Internal members are listed below */
+
+       /** offset (in bytes) to the GIF frame data */
+       unsigned int frame_pointer;
+       /** whether the frame has previously been used */
+       bool virgin;
+       /** whether the frame is totally opaque */
+       bool opaque;
+       /** whether a forcable screen redraw is required */
+       bool redraw_required;
+       /** how the previous frame should be disposed; affects plotting */
+       unsigned char disposal_method;
+       /** whether we acknoledge transparency */
+       bool transparency;
+       /** the index designating a transparent pixel */
+       unsigned int transparency_index;
+       /** x co-ordinate of redraw rectangle */
+       unsigned int redraw_x;
+       /** y co-ordinate of redraw rectangle */
+       unsigned int redraw_y;
+       /** width of redraw rectangle */
+       unsigned int redraw_width;
+       /** height of redraw rectangle */
+       unsigned int redraw_height;
+       /* Frame flags */
+       unsigned int flags;
 } gif_frame;
 
 /* API for Bitmap callbacks */
@@ -76,81 +76,81 @@ typedef void (*gif_bitmap_cb_modified)(void *bitmap);
 
 /** Bitmap callbacks function table */
 typedef struct gif_bitmap_callback_vt {
-        /** Create a bitmap. */
-        gif_bitmap_cb_create bitmap_create;
-        /** Free a bitmap. */
-        gif_bitmap_cb_destroy bitmap_destroy;
-        /** Return a pointer to the pixel data in a bitmap. */
-        gif_bitmap_cb_get_buffer bitmap_get_buffer;
-
-        /* Members below are optional */
-
-        /** Sets whether a bitmap should be plotted opaque. */
-        gif_bitmap_cb_set_opaque bitmap_set_opaque;
-        /** Tests whether a bitmap has an opaque alpha channel. */
-        gif_bitmap_cb_test_opaque bitmap_test_opaque;
-        /** The bitmap image has changed, so flush any persistant cache. */
-        gif_bitmap_cb_modified bitmap_modified;
+       /** Create a bitmap. */
+       gif_bitmap_cb_create bitmap_create;
+       /** Free a bitmap. */
+       gif_bitmap_cb_destroy bitmap_destroy;
+       /** Return a pointer to the pixel data in a bitmap. */
+       gif_bitmap_cb_get_buffer bitmap_get_buffer;
+
+       /* Members below are optional */
+
+       /** Sets whether a bitmap should be plotted opaque. */
+       gif_bitmap_cb_set_opaque bitmap_set_opaque;
+       /** Tests whether a bitmap has an opaque alpha channel. */
+       gif_bitmap_cb_test_opaque bitmap_test_opaque;
+       /** The bitmap image has changed, so flush any persistant cache. */
+       gif_bitmap_cb_modified bitmap_modified;
 } gif_bitmap_callback_vt;
 
 /** GIF animation data */
 typedef struct gif_animation {
-        /** LZW decode context */
-        void *lzw_ctx;
-        /** callbacks for bitmap functions */
-        gif_bitmap_callback_vt bitmap_callbacks;
-        /** pointer to GIF data */
-        const uint8_t *gif_data;
-        /** width of GIF (may increase during decoding) */
-        unsigned int width;
-        /** heigth of GIF (may increase during decoding) */
-        unsigned int height;
-        /** number of frames decoded */
-        unsigned int frame_count;
-        /** number of frames partially decoded */
-        unsigned int frame_count_partial;
-        /** decoded frames */
-        gif_frame *frames;
-        /** current frame decoded to bitmap */
-        int decoded_frame;
-        /** currently decoded image; stored as bitmap from bitmap_create 
callback */
-        void *frame_image;
-        /** number of times to loop animation */
-        int loop_count;
-
-        /* Internal members are listed below */
-
-        /** current index into GIF data */
-        unsigned int buffer_position;
-        /** total number of bytes of GIF data available */
-        unsigned int buffer_size;
-        /** current number of frame holders */
-        unsigned int frame_holders;
-        /** background index */
-        unsigned int bg_index;
-        /** background colour */
-        unsigned int bg_colour;
-        /** image aspect ratio (ignored) */
-        unsigned int aspect_ratio;
-        /** size of colour table (in entries) */
-        unsigned int colour_table_size;
-        /** whether the GIF has a global colour table */
-        bool global_colours;
-        /** global colour table */
-        unsigned int *global_colour_table;
-        /** local colour table */
-        unsigned int *local_colour_table;
-        /** current colour table */
-        unsigned int *colour_table;
-
-        /** previous frame for GIF_FRAME_RESTORE */
-        void *prev_frame;
-        /** previous frame index */
-        int prev_index;
-        /** previous frame width */
-        unsigned prev_width;
-        /** previous frame height */
-        unsigned prev_height;
+       /** LZW decode context */
+       void *lzw_ctx;
+       /** callbacks for bitmap functions */
+       gif_bitmap_callback_vt bitmap_callbacks;
+       /** pointer to GIF data */
+       const uint8_t *gif_data;
+       /** width of GIF (may increase during decoding) */
+       unsigned int width;
+       /** heigth of GIF (may increase during decoding) */
+       unsigned int height;
+       /** number of frames decoded */
+       unsigned int frame_count;
+       /** number of frames partially decoded */
+       unsigned int frame_count_partial;
+       /** decoded frames */
+       gif_frame *frames;
+       /** current frame decoded to bitmap */
+       int decoded_frame;
+       /** currently decoded image; stored as bitmap from bitmap_create 
callback */
+       void *frame_image;
+       /** number of times to loop animation */
+       int loop_count;
+
+       /* Internal members are listed below */
+
+       /** current index into GIF data */
+       unsigned int buffer_position;
+       /** total number of bytes of GIF data available */
+       unsigned int buffer_size;
+       /** current number of frame holders */
+       unsigned int frame_holders;
+       /** background index */
+       unsigned int bg_index;
+       /** background colour */
+       unsigned int bg_colour;
+       /** image aspect ratio (ignored) */
+       unsigned int aspect_ratio;
+       /** size of colour table (in entries) */
+       unsigned int colour_table_size;
+       /** whether the GIF has a global colour table */
+       bool global_colours;
+       /** global colour table */
+       unsigned int *global_colour_table;
+       /** local colour table */
+       unsigned int *local_colour_table;
+       /** current colour table */
+       unsigned int *colour_table;
+
+       /** previous frame for GIF_FRAME_RESTORE */
+       void *prev_frame;
+       /** previous frame index */
+       int prev_index;
+       /** previous frame width */
+       unsigned prev_width;
+       /** previous frame height */
+       unsigned prev_height;
 } gif_animation;
 
 /**
@@ -163,7 +163,7 @@ void gif_create(gif_animation *gif, gif_bitmap_callback_vt 
*bitmap_callbacks);
  * any information that hasn't already been decoded.
  * If an error occurs, all previously decoded frames are retained.
  *
- * @return Error return value.
+ * \return Error return value.
  *         - GIF_FRAME_DATA_ERROR for GIF frame data error
  *         - GIF_INSUFFICIENT_FRAME_DATA for insufficient data to process
  *                                     any more frames
@@ -178,9 +178,7 @@ gif_result gif_initialise(gif_animation *gif, size_t size, 
const uint8_t *data);
 /**
  * Decodes a GIF frame.
  *
- * @return Error return value. If a frame does not contain any image data,
- *             GIF_OK is returned and gif->current_error is set to
- *             GIF_FRAME_NO_DISPLAY
+ * \return Error return value.
  *         - GIF_FRAME_DATA_ERROR for GIF frame data error
  *         - GIF_INSUFFICIENT_FRAME_DATA for insufficient data to complete the 
frame
  *         - GIF_DATA_ERROR for GIF error (invalid frame header)


-----------------------------------------------------------------------

Summary of changes:
 include/libnsgif.h |  228 ++++++++++++++++++++++++++--------------------------
 1 file changed, 113 insertions(+), 115 deletions(-)

diff --git a/include/libnsgif.h b/include/libnsgif.h
index 36f59a4..3087a4d 100644
--- a/include/libnsgif.h
+++ b/include/libnsgif.h
@@ -20,50 +20,50 @@
 
 /* Error return values */
 typedef enum {
-        GIF_WORKING = 1,
-        GIF_OK = 0,
-        GIF_INSUFFICIENT_FRAME_DATA = -1,
-        GIF_FRAME_DATA_ERROR = -2,
-        GIF_INSUFFICIENT_DATA = -3,
-        GIF_DATA_ERROR = -4,
-        GIF_INSUFFICIENT_MEMORY = -5,
-        GIF_FRAME_NO_DISPLAY = -6,
-        GIF_END_OF_FRAME = -7
+       GIF_WORKING = 1,
+       GIF_OK = 0,
+       GIF_INSUFFICIENT_FRAME_DATA = -1,
+       GIF_FRAME_DATA_ERROR = -2,
+       GIF_INSUFFICIENT_DATA = -3,
+       GIF_DATA_ERROR = -4,
+       GIF_INSUFFICIENT_MEMORY = -5,
+       GIF_FRAME_NO_DISPLAY = -6,
+       GIF_END_OF_FRAME = -7
 } gif_result;
 
 /** GIF frame data */
 typedef struct gif_frame {
-        /** whether the frame should be displayed/animated */
-        bool display;
-        /** delay (in cs) before animating the frame */
-        unsigned int frame_delay;
-
-        /* Internal members are listed below */
-
-        /** offset (in bytes) to the GIF frame data */
-        unsigned int frame_pointer;
-        /** whether the frame has previously been used */
-        bool virgin;
-        /** whether the frame is totally opaque */
-        bool opaque;
-        /** whether a forcable screen redraw is required */
-        bool redraw_required;
-        /** how the previous frame should be disposed; affects plotting */
-        unsigned char disposal_method;
-        /** whether we acknoledge transparency */
-        bool transparency;
-        /** the index designating a transparent pixel */
-        unsigned int transparency_index;
-        /** x co-ordinate of redraw rectangle */
-        unsigned int redraw_x;
-        /** y co-ordinate of redraw rectangle */
-        unsigned int redraw_y;
-        /** width of redraw rectangle */
-        unsigned int redraw_width;
-        /** height of redraw rectangle */
-        unsigned int redraw_height;
-        /* Frame flags */
-        unsigned int flags;
+       /** whether the frame should be displayed/animated */
+       bool display;
+       /** delay (in cs) before animating the frame */
+       unsigned int frame_delay;
+
+       /* Internal members are listed below */
+
+       /** offset (in bytes) to the GIF frame data */
+       unsigned int frame_pointer;
+       /** whether the frame has previously been used */
+       bool virgin;
+       /** whether the frame is totally opaque */
+       bool opaque;
+       /** whether a full image redraw is required */
+       bool redraw_required;
+       /** how the previous frame should be disposed; affects plotting */
+       unsigned char disposal_method;
+       /** whether we acknowledge transparency */
+       bool transparency;
+       /** the index designating a transparent pixel */
+       unsigned int transparency_index;
+       /** x co-ordinate of redraw rectangle */
+       unsigned int redraw_x;
+       /** y co-ordinate of redraw rectangle */
+       unsigned int redraw_y;
+       /** width of redraw rectangle */
+       unsigned int redraw_width;
+       /** height of redraw rectangle */
+       unsigned int redraw_height;
+       /* Frame flags */
+       unsigned int flags;
 } gif_frame;
 
 /* API for Bitmap callbacks */
@@ -76,81 +76,81 @@ typedef void (*gif_bitmap_cb_modified)(void *bitmap);
 
 /** Bitmap callbacks function table */
 typedef struct gif_bitmap_callback_vt {
-        /** Create a bitmap. */
-        gif_bitmap_cb_create bitmap_create;
-        /** Free a bitmap. */
-        gif_bitmap_cb_destroy bitmap_destroy;
-        /** Return a pointer to the pixel data in a bitmap. */
-        gif_bitmap_cb_get_buffer bitmap_get_buffer;
-
-        /* Members below are optional */
-
-        /** Sets whether a bitmap should be plotted opaque. */
-        gif_bitmap_cb_set_opaque bitmap_set_opaque;
-        /** Tests whether a bitmap has an opaque alpha channel. */
-        gif_bitmap_cb_test_opaque bitmap_test_opaque;
-        /** The bitmap image has changed, so flush any persistant cache. */
-        gif_bitmap_cb_modified bitmap_modified;
+       /** Create a bitmap. */
+       gif_bitmap_cb_create bitmap_create;
+       /** Free a bitmap. */
+       gif_bitmap_cb_destroy bitmap_destroy;
+       /** Return a pointer to the pixel data in a bitmap. */
+       gif_bitmap_cb_get_buffer bitmap_get_buffer;
+
+       /* Members below are optional */
+
+       /** Sets whether a bitmap should be plotted opaque. */
+       gif_bitmap_cb_set_opaque bitmap_set_opaque;
+       /** Tests whether a bitmap has an opaque alpha channel. */
+       gif_bitmap_cb_test_opaque bitmap_test_opaque;
+       /** The bitmap image has changed, so flush any persistent cache. */
+       gif_bitmap_cb_modified bitmap_modified;
 } gif_bitmap_callback_vt;
 
 /** GIF animation data */
 typedef struct gif_animation {
-        /** LZW decode context */
-        void *lzw_ctx;
-        /** callbacks for bitmap functions */
-        gif_bitmap_callback_vt bitmap_callbacks;
-        /** pointer to GIF data */
-        const uint8_t *gif_data;
-        /** width of GIF (may increase during decoding) */
-        unsigned int width;
-        /** heigth of GIF (may increase during decoding) */
-        unsigned int height;
-        /** number of frames decoded */
-        unsigned int frame_count;
-        /** number of frames partially decoded */
-        unsigned int frame_count_partial;
-        /** decoded frames */
-        gif_frame *frames;
-        /** current frame decoded to bitmap */
-        int decoded_frame;
-        /** currently decoded image; stored as bitmap from bitmap_create 
callback */
-        void *frame_image;
-        /** number of times to loop animation */
-        int loop_count;
-
-        /* Internal members are listed below */
-
-        /** current index into GIF data */
-        unsigned int buffer_position;
-        /** total number of bytes of GIF data available */
-        unsigned int buffer_size;
-        /** current number of frame holders */
-        unsigned int frame_holders;
-        /** background index */
-        unsigned int bg_index;
-        /** background colour */
-        unsigned int bg_colour;
-        /** image aspect ratio (ignored) */
-        unsigned int aspect_ratio;
-        /** size of colour table (in entries) */
-        unsigned int colour_table_size;
-        /** whether the GIF has a global colour table */
-        bool global_colours;
-        /** global colour table */
-        unsigned int *global_colour_table;
-        /** local colour table */
-        unsigned int *local_colour_table;
-        /** current colour table */
-        unsigned int *colour_table;
-
-        /** previous frame for GIF_FRAME_RESTORE */
-        void *prev_frame;
-        /** previous frame index */
-        int prev_index;
-        /** previous frame width */
-        unsigned prev_width;
-        /** previous frame height */
-        unsigned prev_height;
+       /** LZW decode context */
+       void *lzw_ctx;
+       /** callbacks for bitmap functions */
+       gif_bitmap_callback_vt bitmap_callbacks;
+       /** pointer to GIF data */
+       const uint8_t *gif_data;
+       /** width of GIF (may increase during decoding) */
+       unsigned int width;
+       /** height of GIF (may increase during decoding) */
+       unsigned int height;
+       /** number of frames decoded */
+       unsigned int frame_count;
+       /** number of frames partially decoded */
+       unsigned int frame_count_partial;
+       /** decoded frames */
+       gif_frame *frames;
+       /** current frame decoded to bitmap */
+       int decoded_frame;
+       /** currently decoded image; stored as bitmap from bitmap_create 
callback */
+       void *frame_image;
+       /** number of times to loop animation */
+       int loop_count;
+
+       /* Internal members are listed below */
+
+       /** current index into GIF data */
+       unsigned int buffer_position;
+       /** total number of bytes of GIF data available */
+       unsigned int buffer_size;
+       /** current number of frame holders */
+       unsigned int frame_holders;
+       /** background index */
+       unsigned int bg_index;
+       /** background colour */
+       unsigned int bg_colour;
+       /** image aspect ratio (ignored) */
+       unsigned int aspect_ratio;
+       /** size of colour table (in entries) */
+       unsigned int colour_table_size;
+       /** whether the GIF has a global colour table */
+       bool global_colours;
+       /** global colour table */
+       unsigned int *global_colour_table;
+       /** local colour table */
+       unsigned int *local_colour_table;
+       /** current colour table */
+       unsigned int *colour_table;
+
+       /** previous frame for GIF_FRAME_RESTORE */
+       void *prev_frame;
+       /** previous frame index */
+       int prev_index;
+       /** previous frame width */
+       unsigned prev_width;
+       /** previous frame height */
+       unsigned prev_height;
 } gif_animation;
 
 /**
@@ -163,7 +163,7 @@ void gif_create(gif_animation *gif, gif_bitmap_callback_vt 
*bitmap_callbacks);
  * any information that hasn't already been decoded.
  * If an error occurs, all previously decoded frames are retained.
  *
- * @return Error return value.
+ * \return Error return value.
  *         - GIF_FRAME_DATA_ERROR for GIF frame data error
  *         - GIF_INSUFFICIENT_FRAME_DATA for insufficient data to process
  *                                     any more frames
@@ -178,9 +178,7 @@ gif_result gif_initialise(gif_animation *gif, size_t size, 
const uint8_t *data);
 /**
  * Decodes a GIF frame.
  *
- * @return Error return value. If a frame does not contain any image data,
- *             GIF_OK is returned and gif->current_error is set to
- *             GIF_FRAME_NO_DISPLAY
+ * \return Error return value.
  *         - GIF_FRAME_DATA_ERROR for GIF frame data error
  *         - GIF_INSUFFICIENT_FRAME_DATA for insufficient data to complete the 
frame
  *         - GIF_DATA_ERROR for GIF error (invalid frame header)


-- 
NetSurf GIF Decoder
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to