# HG changeset patch # User Gerd Moellmann # Date 954408450 0 # Node ID 2812a333e74679221d4408211a323bc72e2f951a # Parent 4a7f44c0b33dd1d7d0a2e1541d9a2b004c691583 (free_image_cache): Free the cache structure itself last, after all its members have been freed. diff -r 4a7f44c0b33d -r 2812a333e746 src/xfns.c --- a/src/xfns.c Thu Mar 30 01:12:14 2000 +0000 +++ b/src/xfns.c Thu Mar 30 09:27:30 2000 +0000 @@ -5383,8 +5383,8 @@ for (i = 0; i < c->used; ++i) free_image (f, c->images[i]); xfree (c->images); + xfree (c->buckets); xfree (c); - xfree (c->buckets); FRAME_X_IMAGE_CACHE (f) = NULL; } } @@ -5841,7 +5841,7 @@ Both the file and data forms may contain the additional entries `:background COLOR' and `:foreground COLOR'. If not present, foreground and background of the frame on which the image is - displayed, is used. */ + displayed is used. */ static int xbm_image_p (object) @@ -6111,7 +6111,6 @@ if (v10) { - for (i = 0; i < nbytes; i += 2) { int val = value; @@ -7957,6 +7956,7 @@ jmp_buf setjmp_buffer; }; + static void my_error_exit (cinfo) j_common_ptr cinfo; @@ -7965,6 +7965,7 @@ longjmp (mgr->setjmp_buffer, 1); } + /* Init source method for JPEG data source manager. Called by jpeg_read_header() before any data is actually read. See libjpeg.doc from the JPEG lib distribution. */ @@ -8329,6 +8330,7 @@ } tiff_memory_source; + static size_t tiff_read_from_memory (data, buf, size) thandle_t data; @@ -8344,6 +8346,7 @@ return size; } + static size_t tiff_write_from_memory (data, buf, size) thandle_t data; @@ -8353,6 +8356,7 @@ return (size_t) -1; } + static toff_t tiff_seek_in_memory (data, off, whence) thandle_t data; @@ -8387,6 +8391,7 @@ return src->index; } + static int tiff_close_memory (data) thandle_t data; @@ -8395,6 +8400,7 @@ return 0; } + static int tiff_mmap_memory (data, pbase, psize) thandle_t data; @@ -8405,6 +8411,7 @@ return 0; } + static void tiff_unmap_memory (data, base, size) thandle_t data; @@ -8414,6 +8421,7 @@ /* We don't need to do this. */ } + static toff_t tiff_size_of_memory (data) thandle_t data; @@ -8421,6 +8429,7 @@ return ((tiff_memory_source *) data)->len; } + /* Load TIFF image IMG for use on frame F. Value is non-zero if successful. */ @@ -8612,6 +8621,7 @@ NULL }; + /* Return non-zero if OBJECT is a valid GIF image specification. */ static int @@ -8630,6 +8640,7 @@ return fmt[GIF_FILE].count + fmt[GIF_DATA].count == 1; } + /* Reading a GIF image from memory Based on the PNG memory stuff to a certain extent. */ @@ -8641,6 +8652,7 @@ } gif_memory_source; + /* Make the current memory source available to gif_read_from_memory. It's done this way because not all versions of libungif support a UserData field in the GifFileType structure. */ @@ -9747,7 +9759,7 @@ /* Let the row go over the full width of the frame. */ row->full_width_p = 1; - /* There's a glyph at the end of rows that is use to place + /* There's a glyph at the end of rows that is used to place the cursor there. Don't include the width of this glyph. */ if (row->used[TEXT_AREA]) {