Gitweb links:

...log 
http://git.netsurf-browser.org/libnsgif.git/shortlog/947586eb1b14c267ee996ba655af13899488c0f3
...commit 
http://git.netsurf-browser.org/libnsgif.git/commit/947586eb1b14c267ee996ba655af13899488c0f3
...tree 
http://git.netsurf-browser.org/libnsgif.git/tree/947586eb1b14c267ee996ba655af13899488c0f3

The branch, tlsa/rewrite has been updated
  discards  eebf25066c18fbf04b8324030f1989870bb0f38e (commit)
       via  947586eb1b14c267ee996ba655af13899488c0f3 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (eebf25066c18fbf04b8324030f1989870bb0f38e)
            \
             N -- N -- N (947586eb1b14c267ee996ba655af13899488c0f3)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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=947586eb1b14c267ee996ba655af13899488c0f3
commit 947586eb1b14c267ee996ba655af13899488c0f3
Author: Michael Drake <t...@netsurf-browser.org>
Commit: Michael Drake <t...@netsurf-browser.org>

    GIF: Constify raw source data.

diff --git a/include/libnsgif.h b/include/libnsgif.h
index ae6691c..36f59a4 100644
--- a/include/libnsgif.h
+++ b/include/libnsgif.h
@@ -15,8 +15,8 @@
 #ifndef _LIBNSGIF_H_
 #define _LIBNSGIF_H_
 
+#include <stdint.h>
 #include <stdbool.h>
-#include <inttypes.h>
 
 /* Error return values */
 typedef enum {
@@ -100,7 +100,7 @@ typedef struct gif_animation {
         /** callbacks for bitmap functions */
         gif_bitmap_callback_vt bitmap_callbacks;
         /** pointer to GIF data */
-        unsigned char *gif_data;
+        const uint8_t *gif_data;
         /** width of GIF (may increase during decoding) */
         unsigned int width;
         /** heigth of GIF (may increase during decoding) */
@@ -173,7 +173,7 @@ void gif_create(gif_animation *gif, gif_bitmap_callback_vt 
*bitmap_callbacks);
  *         - GIF_OK for successful decoding
  *         - GIF_WORKING for successful decoding if more frames are expected
  */
-gif_result gif_initialise(gif_animation *gif, size_t size, unsigned char 
*data);
+gif_result gif_initialise(gif_animation *gif, size_t size, const uint8_t 
*data);
 
 /**
  * Decodes a GIF frame.
diff --git a/src/libnsgif.c b/src/libnsgif.c
index c2a8c73..7d48b7e 100644
--- a/src/libnsgif.c
+++ b/src/libnsgif.c
@@ -527,7 +527,7 @@ static gif_result gif__update_bitmap(
  */
 static gif_result gif__parse_extension_graphic_control(
                struct gif_frame *frame,
-               uint8_t *data,
+               const uint8_t *data,
                size_t len)
 {
        /* 6-byte Graphic Control Extension is:
@@ -583,7 +583,7 @@ static gif_result gif__parse_extension_graphic_control(
  */
 static gif_result gif__parse_extension_application(
                struct gif_animation *gif,
-               uint8_t *data,
+               const uint8_t *data,
                size_t len)
 {
        /* 14-byte+ Application Extension is:
@@ -619,11 +619,11 @@ static gif_result gif__parse_extension_application(
 static gif_result gif__parse_frame_extensions(
                struct gif_animation *gif,
                struct gif_frame *frame,
-               uint8_t **pos,
+               const uint8_t **pos,
                bool decode)
 {
-       uint8_t *gif_data = *pos;
-       uint8_t *gif_end = gif->gif_data + gif->buffer_size;
+       const uint8_t *gif_data = *pos;
+       const uint8_t *gif_end = gif->gif_data + gif->buffer_size;
        int gif_bytes = gif_end - gif_data;
 
        /* Initialise the extensions */
@@ -727,7 +727,7 @@ static gif_result gif__parse_frame_extensions(
 static gif_result gif__parse_image_descriptor(
                struct gif_animation *gif,
                struct gif_frame *frame,
-               uint8_t **pos,
+               const uint8_t **pos,
                bool decode)
 {
        const uint8_t *data = *pos;
@@ -783,7 +783,7 @@ static gif_result gif__parse_image_descriptor(
 static gif_result gif__parse_colour_table(
                struct gif_animation *gif,
                struct gif_frame *frame,
-               uint8_t **pos,
+               const uint8_t **pos,
                bool decode)
 {
        unsigned colour_table_size;
@@ -840,10 +840,10 @@ static gif_result gif__parse_colour_table(
 static gif_result gif__parse_image_data(
                struct gif_animation *gif,
                struct gif_frame *frame,
-               uint8_t **pos,
+               const uint8_t **pos,
                bool decode)
 {
-       uint8_t *data = *pos;
+       const uint8_t *data = *pos;
        size_t len = gif->gif_data + gif->buffer_size - data;
        uint32_t frame_idx = frame - gif->frames;
        uint8_t minimum_code_size;
@@ -970,9 +970,9 @@ static gif_result gif__process_frame(
                uint32_t frame_idx,
                bool decode)
 {
-       uint8_t *pos;
-       uint8_t *end;
        gif_result ret;
+       const uint8_t *pos;
+       const uint8_t *end;
        struct gif_frame *frame;
 
        frame = gif__get_frame(gif, frame_idx);
@@ -980,7 +980,7 @@ static gif_result gif__process_frame(
                return GIF_INSUFFICIENT_MEMORY;
        }
 
-       end = (uint8_t *)(gif->gif_data + gif->buffer_size);
+       end = gif->gif_data + gif->buffer_size;
 
        if (decode) {
                pos = gif->gif_data + frame->frame_pointer;
@@ -1055,9 +1055,9 @@ void gif_create(gif_animation *gif, 
gif_bitmap_callback_vt *bitmap_callbacks)
 
 
 /* exported function documented in libnsgif.h */
-gif_result gif_initialise(gif_animation *gif, size_t size, unsigned char *data)
+gif_result gif_initialise(gif_animation *gif, size_t size, const uint8_t *data)
 {
-       uint8_t *gif_data;
+       const uint8_t *gif_data;
        uint32_t index;
        gif_result ret;
 


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

Summary of changes:
 include/libnsgif.h |    2 +-
 src/libnsgif.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/libnsgif.h b/include/libnsgif.h
index d0d16ac..36f59a4 100644
--- a/include/libnsgif.h
+++ b/include/libnsgif.h
@@ -173,7 +173,7 @@ void gif_create(gif_animation *gif, gif_bitmap_callback_vt 
*bitmap_callbacks);
  *         - GIF_OK for successful decoding
  *         - GIF_WORKING for successful decoding if more frames are expected
  */
-gif_result gif_initialise(gif_animation *gif, size_t size, unsigned char 
*data);
+gif_result gif_initialise(gif_animation *gif, size_t size, const uint8_t 
*data);
 
 /**
  * Decodes a GIF frame.
diff --git a/src/libnsgif.c b/src/libnsgif.c
index 21f319e..7d48b7e 100644
--- a/src/libnsgif.c
+++ b/src/libnsgif.c
@@ -1055,7 +1055,7 @@ void gif_create(gif_animation *gif, 
gif_bitmap_callback_vt *bitmap_callbacks)
 
 
 /* exported function documented in libnsgif.h */
-gif_result gif_initialise(gif_animation *gif, size_t size, unsigned char *data)
+gif_result gif_initialise(gif_animation *gif, size_t size, const uint8_t *data)
 {
        const uint8_t *gif_data;
        uint32_t index;


-- 
NetSurf GIF Decoder
_______________________________________________
netsurf-commits mailing list -- netsurf-commits@netsurf-browser.org
To unsubscribe send an email to netsurf-commits-le...@netsurf-browser.org

Reply via email to