diff options
| author | Karoly Lorentey | 2005-06-15 12:57:51 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-06-15 12:57:51 +0000 |
| commit | ef85512e51f043d73788f00a2aed13cccde0682c (patch) | |
| tree | fc1fa1378533250f260ef8eaa9a84ae882d9df84 /src/image.c | |
| parent | 8736257554f49445f7b4402ac7a9436b38ce6452 (diff) | |
| parent | ef88a9999004e6c26148c8d280d6a41f623d7249 (diff) | |
| download | emacs-ef85512e51f043d73788f00a2aed13cccde0682c.tar.gz emacs-ef85512e51f043d73788f00a2aed13cccde0682c.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 80-82, 350-422)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-350
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-351
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-352
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-353
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-354
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-355
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-356
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-357
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-358
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-359
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-360
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-361
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-362
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-363
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-364
Remove "-face" suffix from widget faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-365
Remove "-face" suffix from custom faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-366
Remove "-face" suffix from change-log faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-367
Remove "-face" suffix from compilation faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-368
Remove "-face" suffix from diff-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-369
lisp/longlines.el (longlines-visible-face): Face removed
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-370
Remove "-face" suffix from woman faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-371
Remove "-face" suffix from whitespace-highlight face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-372
Remove "-face" suffix from ruler-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-373
Remove "-face" suffix from show-paren faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374
Remove "-face" suffix from log-view faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-375
Remove "-face" suffix from smerge faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-376
Remove "-face" suffix from show-tabs faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-377
Remove "-face" suffix from highlight-changes faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-378
Remove "-face" suffix from and downcase info faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-379
Remove "-face" suffix from pcvs faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-380
Update uses of renamed pcvs faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-381
Tweak ChangeLog
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-382
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-383
Remove "-face" suffix from strokes-char face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-384
Remove "-face" suffix from compare-windows face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-385
Remove "-face" suffix from calendar faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-386
Remove "-face" suffix from diary-button face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-387
Remove "-face" suffix from testcover faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-388
Remove "-face" suffix from viper faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-389
Remove "-face" suffix from org faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-390
Remove "-face" suffix from sgml-namespace face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-391
Remove "-face" suffix from table-cell face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-392
Remove "-face" suffix from tex-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-393
Remove "-face" suffix from texinfo-heading face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-394
Remove "-face" suffix from flyspell faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-395
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-396
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-397
Remove "-face" suffix from gomoku faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-398
Remove "-face" suffix from mpuz faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-399
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-400
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-401
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-402
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-403
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-404
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-405
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-406
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-407
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-408
Remove "-face" suffix from Buffer-menu-buffer face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-409
Remove "-face" suffix from antlr-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-410
Remove "-face" suffix from ebrowse faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-411
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-412
Remove "-face" suffix from flymake faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Remove "-face" suffix from idlwave faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-414
Remove "-face" suffix from sh-script faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-415
Remove "-face" suffix from vhdl-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-416
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-417
Remove "-face" suffix from which-func face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-418
Remove "-face" suffix from cperl-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-419
Remove "-face" suffix from ld-script faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-420
Fix cperl-mode font-lock problem
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-421
Tweak which-func face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-422
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-80
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-81
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-82
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-350
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 86 |
1 files changed, 53 insertions, 33 deletions
diff --git a/src/image.c b/src/image.c index 15e835fef3b..462294b33b4 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1972,7 +1972,8 @@ x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap) | |||
| 1972 | and store its handle in *pixmap. */ | 1972 | and store its handle in *pixmap. */ |
| 1973 | *pixmap = CreateDIBSection (hdc, &((*ximg)->info), | 1973 | *pixmap = CreateDIBSection (hdc, &((*ximg)->info), |
| 1974 | (depth < 16) ? DIB_PAL_COLORS : DIB_RGB_COLORS, | 1974 | (depth < 16) ? DIB_PAL_COLORS : DIB_RGB_COLORS, |
| 1975 | &((*ximg)->data), NULL, 0); | 1975 | /* casting avoids a GCC warning */ |
| 1976 | (void **)&((*ximg)->data), NULL, 0); | ||
| 1976 | 1977 | ||
| 1977 | /* Realize display palette and garbage all frames. */ | 1978 | /* Realize display palette and garbage all frames. */ |
| 1978 | release_frame_dc (f, hdc); | 1979 | release_frame_dc (f, hdc); |
| @@ -5517,7 +5518,8 @@ pbm_load (f, img) | |||
| 5517 | /* Maybe fill in the background field while we have ximg handy. */ | 5518 | /* Maybe fill in the background field while we have ximg handy. */ |
| 5518 | 5519 | ||
| 5519 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) | 5520 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) |
| 5520 | IMAGE_BACKGROUND (img, f, ximg); | 5521 | /* Casting avoids a GCC warning. */ |
| 5522 | IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); | ||
| 5521 | 5523 | ||
| 5522 | /* Put the image into a pixmap. */ | 5524 | /* Put the image into a pixmap. */ |
| 5523 | x_put_x_image (f, ximg, img->pixmap, width, height); | 5525 | x_put_x_image (f, ximg, img->pixmap, width, height); |
| @@ -5843,9 +5845,11 @@ png_load (f, img) | |||
| 5843 | tbr.bytes += sizeof (sig); | 5845 | tbr.bytes += sizeof (sig); |
| 5844 | } | 5846 | } |
| 5845 | 5847 | ||
| 5846 | /* Initialize read and info structs for PNG lib. */ | 5848 | /* Initialize read and info structs for PNG lib. Casting return |
| 5847 | png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, | 5849 | value avoids a GCC warning on W32. */ |
| 5848 | my_png_error, my_png_warning); | 5850 | png_ptr = (png_structp)fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, |
| 5851 | NULL, my_png_error, | ||
| 5852 | my_png_warning); | ||
| 5849 | if (!png_ptr) | 5853 | if (!png_ptr) |
| 5850 | { | 5854 | { |
| 5851 | if (fp) fclose (fp); | 5855 | if (fp) fclose (fp); |
| @@ -5853,7 +5857,8 @@ png_load (f, img) | |||
| 5853 | return 0; | 5857 | return 0; |
| 5854 | } | 5858 | } |
| 5855 | 5859 | ||
| 5856 | info_ptr = fn_png_create_info_struct (png_ptr); | 5860 | /* Casting return value avoids a GCC warning on W32. */ |
| 5861 | info_ptr = (png_infop)fn_png_create_info_struct (png_ptr); | ||
| 5857 | if (!info_ptr) | 5862 | if (!info_ptr) |
| 5858 | { | 5863 | { |
| 5859 | fn_png_destroy_read_struct (&png_ptr, NULL, NULL); | 5864 | fn_png_destroy_read_struct (&png_ptr, NULL, NULL); |
| @@ -5862,7 +5867,8 @@ png_load (f, img) | |||
| 5862 | return 0; | 5867 | return 0; |
| 5863 | } | 5868 | } |
| 5864 | 5869 | ||
| 5865 | end_info = fn_png_create_info_struct (png_ptr); | 5870 | /* Casting return value avoids a GCC warning on W32. */ |
| 5871 | end_info = (png_infop)fn_png_create_info_struct (png_ptr); | ||
| 5866 | if (!end_info) | 5872 | if (!end_info) |
| 5867 | { | 5873 | { |
| 5868 | fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); | 5874 | fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); |
| @@ -6135,8 +6141,9 @@ png_load (f, img) | |||
| 6135 | img->width = width; | 6141 | img->width = width; |
| 6136 | img->height = height; | 6142 | img->height = height; |
| 6137 | 6143 | ||
| 6138 | /* Maybe fill in the background field while we have ximg handy. */ | 6144 | /* Maybe fill in the background field while we have ximg handy. |
| 6139 | IMAGE_BACKGROUND (img, f, ximg); | 6145 | Casting avoids a GCC warning. */ |
| 6146 | IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); | ||
| 6140 | 6147 | ||
| 6141 | /* Put the image into the pixmap, then free the X image and its buffer. */ | 6148 | /* Put the image into the pixmap, then free the X image and its buffer. */ |
| 6142 | x_put_x_image (f, ximg, img->pixmap, width, height); | 6149 | x_put_x_image (f, ximg, img->pixmap, width, height); |
| @@ -6145,9 +6152,9 @@ png_load (f, img) | |||
| 6145 | /* Same for the mask. */ | 6152 | /* Same for the mask. */ |
| 6146 | if (mask_img) | 6153 | if (mask_img) |
| 6147 | { | 6154 | { |
| 6148 | /* Fill in the background_transparent field while we have the mask | 6155 | /* Fill in the background_transparent field while we have the |
| 6149 | handy. */ | 6156 | mask handy. Casting avoids a GCC warning. */ |
| 6150 | image_background_transparent (img, f, mask_img); | 6157 | image_background_transparent (img, f, (XImagePtr_or_DC)mask_img); |
| 6151 | 6158 | ||
| 6152 | x_put_x_image (f, mask_img, img->mask, img->width, img->height); | 6159 | x_put_x_image (f, mask_img, img->mask, img->width, img->height); |
| 6153 | x_destroy_x_image (mask_img); | 6160 | x_destroy_x_image (mask_img); |
| @@ -6265,8 +6272,8 @@ jpeg_image_p (object) | |||
| 6265 | #endif /* HAVE_STLIB_H */ | 6272 | #endif /* HAVE_STLIB_H */ |
| 6266 | 6273 | ||
| 6267 | #if defined (HAVE_NTGUI) && !defined (__WIN32__) | 6274 | #if defined (HAVE_NTGUI) && !defined (__WIN32__) |
| 6268 | /* jpeglib.h will define boolean differently depending on __WIN32__, | 6275 | /* In older releases of the jpeg library, jpeglib.h will define boolean |
| 6269 | so make sure it is defined. */ | 6276 | differently depending on __WIN32__, so make sure it is defined. */ |
| 6270 | #define __WIN32__ 1 | 6277 | #define __WIN32__ 1 |
| 6271 | #endif | 6278 | #endif |
| 6272 | 6279 | ||
| @@ -6494,8 +6501,9 @@ jpeg_load (f, img) | |||
| 6494 | } | 6501 | } |
| 6495 | 6502 | ||
| 6496 | /* Customize libjpeg's error handling to call my_error_exit when an | 6503 | /* Customize libjpeg's error handling to call my_error_exit when an |
| 6497 | error is detected. This function will perform a longjmp. */ | 6504 | error is detected. This function will perform a longjmp. |
| 6498 | cinfo.err = fn_jpeg_std_error (&mgr.pub); | 6505 | Casting return value avoids a GCC warning on W32. */ |
| 6506 | cinfo.err = (struct jpeg_error_mgr *)fn_jpeg_std_error (&mgr.pub); | ||
| 6499 | mgr.pub.error_exit = my_error_exit; | 6507 | mgr.pub.error_exit = my_error_exit; |
| 6500 | 6508 | ||
| 6501 | if ((rc = setjmp (mgr.setjmp_buffer)) != 0) | 6509 | if ((rc = setjmp (mgr.setjmp_buffer)) != 0) |
| @@ -6606,7 +6614,8 @@ jpeg_load (f, img) | |||
| 6606 | 6614 | ||
| 6607 | /* Maybe fill in the background field while we have ximg handy. */ | 6615 | /* Maybe fill in the background field while we have ximg handy. */ |
| 6608 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) | 6616 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) |
| 6609 | IMAGE_BACKGROUND (img, f, ximg); | 6617 | /* Casting avoids a GCC warning. */ |
| 6618 | IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); | ||
| 6610 | 6619 | ||
| 6611 | /* Put the image into the pixmap. */ | 6620 | /* Put the image into the pixmap. */ |
| 6612 | x_put_x_image (f, ximg, img->pixmap, width, height); | 6621 | x_put_x_image (f, ximg, img->pixmap, width, height); |
| @@ -6932,8 +6941,9 @@ tiff_load (f, img) | |||
| 6932 | return 0; | 6941 | return 0; |
| 6933 | } | 6942 | } |
| 6934 | 6943 | ||
| 6935 | /* Try to open the image file. */ | 6944 | /* Try to open the image file. Casting return value avoids a |
| 6936 | tiff = fn_TIFFOpen (SDATA (file), "r"); | 6945 | GCC warning on W32. */ |
| 6946 | tiff = (TIFF *)fn_TIFFOpen (SDATA (file), "r"); | ||
| 6937 | if (tiff == NULL) | 6947 | if (tiff == NULL) |
| 6938 | { | 6948 | { |
| 6939 | image_error ("Cannot open `%s'", file, Qnil); | 6949 | image_error ("Cannot open `%s'", file, Qnil); |
| @@ -6948,14 +6958,15 @@ tiff_load (f, img) | |||
| 6948 | memsrc.len = SBYTES (specified_data); | 6958 | memsrc.len = SBYTES (specified_data); |
| 6949 | memsrc.index = 0; | 6959 | memsrc.index = 0; |
| 6950 | 6960 | ||
| 6951 | tiff = fn_TIFFClientOpen ("memory_source", "r", &memsrc, | 6961 | /* Casting return value avoids a GCC warning on W32. */ |
| 6952 | (TIFFReadWriteProc) tiff_read_from_memory, | 6962 | tiff = (TIFF *)fn_TIFFClientOpen ("memory_source", "r", &memsrc, |
| 6953 | (TIFFReadWriteProc) tiff_write_from_memory, | 6963 | (TIFFReadWriteProc) tiff_read_from_memory, |
| 6954 | tiff_seek_in_memory, | 6964 | (TIFFReadWriteProc) tiff_write_from_memory, |
| 6955 | tiff_close_memory, | 6965 | tiff_seek_in_memory, |
| 6956 | tiff_size_of_memory, | 6966 | tiff_close_memory, |
| 6957 | tiff_mmap_memory, | 6967 | tiff_size_of_memory, |
| 6958 | tiff_unmap_memory); | 6968 | tiff_mmap_memory, |
| 6969 | tiff_unmap_memory); | ||
| 6959 | 6970 | ||
| 6960 | if (!tiff) | 6971 | if (!tiff) |
| 6961 | { | 6972 | { |
| @@ -7018,7 +7029,8 @@ tiff_load (f, img) | |||
| 7018 | 7029 | ||
| 7019 | /* Maybe fill in the background field while we have ximg handy. */ | 7030 | /* Maybe fill in the background field while we have ximg handy. */ |
| 7020 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) | 7031 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) |
| 7021 | IMAGE_BACKGROUND (img, f, ximg); | 7032 | /* Casting avoids a GCC warning on W32. */ |
| 7033 | IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); | ||
| 7022 | 7034 | ||
| 7023 | /* Put the image into the pixmap, then free the X image and its buffer. */ | 7035 | /* Put the image into the pixmap, then free the X image and its buffer. */ |
| 7024 | x_put_x_image (f, ximg, img->pixmap, width, height); | 7036 | x_put_x_image (f, ximg, img->pixmap, width, height); |
| @@ -7126,6 +7138,11 @@ gif_image_p (object) | |||
| 7126 | #ifdef HAVE_GIF | 7138 | #ifdef HAVE_GIF |
| 7127 | 7139 | ||
| 7128 | #if defined (HAVE_NTGUI) || defined (MAC_OS) | 7140 | #if defined (HAVE_NTGUI) || defined (MAC_OS) |
| 7141 | /* winuser.h might define DrawText to DrawTextA or DrawTextW. | ||
| 7142 | Undefine before redefining to avoid a preprocessor warning. */ | ||
| 7143 | #ifdef DrawText | ||
| 7144 | #undef DrawText | ||
| 7145 | #endif | ||
| 7129 | /* avoid conflict with QuickdrawText.h */ | 7146 | /* avoid conflict with QuickdrawText.h */ |
| 7130 | #define DrawText gif_DrawText | 7147 | #define DrawText gif_DrawText |
| 7131 | #include <gif_lib.h> | 7148 | #include <gif_lib.h> |
| @@ -7239,8 +7256,9 @@ gif_load (f, img) | |||
| 7239 | return 0; | 7256 | return 0; |
| 7240 | } | 7257 | } |
| 7241 | 7258 | ||
| 7242 | /* Open the GIF file. */ | 7259 | /* Open the GIF file. Casting return value avoids a GCC warning |
| 7243 | gif = fn_DGifOpenFileName (SDATA (file)); | 7260 | on W32. */ |
| 7261 | gif = (GifFileType *)fn_DGifOpenFileName (SDATA (file)); | ||
| 7244 | if (gif == NULL) | 7262 | if (gif == NULL) |
| 7245 | { | 7263 | { |
| 7246 | image_error ("Cannot open `%s'", file, Qnil); | 7264 | image_error ("Cannot open `%s'", file, Qnil); |
| @@ -7256,7 +7274,8 @@ gif_load (f, img) | |||
| 7256 | memsrc.len = SBYTES (specified_data); | 7274 | memsrc.len = SBYTES (specified_data); |
| 7257 | memsrc.index = 0; | 7275 | memsrc.index = 0; |
| 7258 | 7276 | ||
| 7259 | gif = fn_DGifOpen(&memsrc, gif_read_from_memory); | 7277 | /* Casting return value avoids a GCC warning on W32. */ |
| 7278 | gif = (GifFileType *)fn_DGifOpen(&memsrc, gif_read_from_memory); | ||
| 7260 | if (!gif) | 7279 | if (!gif) |
| 7261 | { | 7280 | { |
| 7262 | image_error ("Cannot open memory source `%s'", img->spec, Qnil); | 7281 | image_error ("Cannot open memory source `%s'", img->spec, Qnil); |
| @@ -7390,7 +7409,8 @@ gif_load (f, img) | |||
| 7390 | 7409 | ||
| 7391 | /* Maybe fill in the background field while we have ximg handy. */ | 7410 | /* Maybe fill in the background field while we have ximg handy. */ |
| 7392 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) | 7411 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) |
| 7393 | IMAGE_BACKGROUND (img, f, ximg); | 7412 | /* Casting avoids a GCC warning. */ |
| 7413 | IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); | ||
| 7394 | 7414 | ||
| 7395 | /* Put the image into the pixmap, then free the X image and its buffer. */ | 7415 | /* Put the image into the pixmap, then free the X image and its buffer. */ |
| 7396 | x_put_x_image (f, ximg, img->pixmap, width, height); | 7416 | x_put_x_image (f, ximg, img->pixmap, width, height); |
| @@ -7400,7 +7420,7 @@ gif_load (f, img) | |||
| 7400 | return 1; | 7420 | return 1; |
| 7401 | } | 7421 | } |
| 7402 | 7422 | ||
| 7403 | #else | 7423 | #else /* !HAVE_GIF */ |
| 7404 | 7424 | ||
| 7405 | #ifdef MAC_OS | 7425 | #ifdef MAC_OS |
| 7406 | static int | 7426 | static int |