changeset 78788:c077ece08ff6

(our_memory_fill_input_buffer) <buffer>: Move to file scope and rename to omfib_buffer for clarity. (gif_load) <interlace_start, interlace_increment>: Move to file scope.
author Glenn Morris <rgm@gnu.org>
date Fri, 14 Sep 2007 07:44:30 +0000
parents 96a27ec4e6c5
children 864bdaa7821e
files src/image.c
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/image.c	Fri Sep 14 07:36:14 2007 +0000
+++ b/src/image.c	Fri Sep 14 07:44:30 2007 +0000
@@ -6769,18 +6769,19 @@
    whenever more data is needed.  We read the whole image in one step,
    so this only adds a fake end of input marker at the end.  */
 
+static JOCTET omfib_buffer[2];
+
 static boolean
 our_memory_fill_input_buffer (cinfo)
      j_decompress_ptr cinfo;
 {
   /* Insert a fake EOI marker.  */
   struct jpeg_source_mgr *src = cinfo->src;
-  static JOCTET buffer[2];
-
-  buffer[0] = (JOCTET) 0xFF;
-  buffer[1] = (JOCTET) JPEG_EOI;
-
-  src->next_input_byte = buffer;
+
+  omfib_buffer[0] = (JOCTET) 0xFF;
+  omfib_buffer[1] = (JOCTET) JPEG_EOI;
+
+  src->next_input_byte = omfib_buffer;
   src->bytes_in_buffer = 2;
   return 1;
 }
@@ -7750,6 +7751,9 @@
 /* Load GIF image IMG for use on frame F.  Value is non-zero if
    successful.  */
 
+static int interlace_start[] = {0, 4, 2, 1};
+static int interlace_increment[] = {8, 8, 4, 2};
+
 static int
 gif_load (f, img)
      struct frame *f;
@@ -7920,8 +7924,6 @@
 
   if (gif->SavedImages[ino].ImageDesc.Interlace)
     {
-      static int interlace_start[] = {0, 4, 2, 1};
-      static int interlace_increment[] = {8, 8, 4, 2};
       int pass;
       int row = interlace_start[0];