aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-06-11 20:54:09 -0700
committerPaul Eggert2011-06-11 20:54:09 -0700
commit2d3c217e8ccd3ddfdd57ee9f46a2f2599d6d67c6 (patch)
tree36cb5ed5a8252a12ecacad0f642f04e9c4ca9ca2 /src
parent73dba34265faf12a46cef1edabe066af3159122a (diff)
parent1384b89ea7e51c190ab1df16e38cbef1d02400b4 (diff)
downloademacs-2d3c217e8ccd3ddfdd57ee9f46a2f2599d6d67c6.tar.gz
emacs-2d3c217e8ccd3ddfdd57ee9f46a2f2599d6d67c6.zip
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/image.c145
-rw-r--r--src/makefile.w32-in7
3 files changed, 74 insertions, 90 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index db1f1c82f35..712e4269840 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
12011-06-11 Paul Eggert <eggert@cs.ucla.edu> 12011-06-12 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * buffer.c (Qclone_number): Remove for now, as it's unused. 3 * buffer.c (Qclone_number): Remove for now, as it's unused.
4 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing. 4 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
@@ -27,6 +27,16 @@
27 * xterm.h: Likewise. 27 * xterm.h: Likewise.
28 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF. 28 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
29 29
302011-06-12 Juanma Barranquero <lekktu@gmail.com>
31
32 * makefile.w32-in: Update dependencies.
33 (LISP_H): Add lib/intprops.h.
34
352011-06-11 Chong Yidong <cyd@stupidchicken.com>
36
37 * image.c (gif_load): Add animation frame delay to the metadata.
38 (syms_of_image): Use DEFSYM. New symbol `delay'.
39
302011-06-11 Martin Rudalics <rudalics@gmx.at> 402011-06-11 Martin Rudalics <rudalics@gmx.at>
31 41
32 * window.c (delete_deletable_window): Re-add. 42 * window.c (delete_deletable_window): Re-add.
diff --git a/src/image.c b/src/image.c
index b381e990dab..495bfdc0eef 100644
--- a/src/image.c
+++ b/src/image.c
@@ -564,7 +564,6 @@ static Lisp_Object Qxbm;
564/* Keywords. */ 564/* Keywords. */
565 565
566Lisp_Object QCascent, QCmargin, QCrelief; 566Lisp_Object QCascent, QCmargin, QCrelief;
567static Lisp_Object Qcount, Qextension_data;
568Lisp_Object QCconversion; 567Lisp_Object QCconversion;
569static Lisp_Object QCheuristic_mask; 568static Lisp_Object QCheuristic_mask;
570static Lisp_Object QCcolor_symbols; 569static Lisp_Object QCcolor_symbols;
@@ -573,6 +572,7 @@ static Lisp_Object QCcrop, QCrotation;
573 572
574/* Other symbols. */ 573/* Other symbols. */
575 574
575static Lisp_Object Qcount, Qextension_data, Qdelay;
576static Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic; 576static Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic;
577 577
578/* Function prototypes. */ 578/* Function prototypes. */
@@ -7315,16 +7315,31 @@ gif_load (struct frame *f, struct image *img)
7315 img->lisp_data = Qnil; 7315 img->lisp_data = Qnil;
7316 if (gif->SavedImages[idx].ExtensionBlockCount > 0) 7316 if (gif->SavedImages[idx].ExtensionBlockCount > 0)
7317 { 7317 {
7318 unsigned int delay = 0;
7318 ExtensionBlock *ext = gif->SavedImages[idx].ExtensionBlocks; 7319 ExtensionBlock *ext = gif->SavedImages[idx].ExtensionBlocks;
7319 for (i = 0; i < gif->SavedImages[idx].ExtensionBlockCount; i++, ext++) 7320 for (i = 0; i < gif->SavedImages[idx].ExtensionBlockCount; i++, ext++)
7320 /* Append (... FUNCTION "BYTES") */ 7321 /* Append (... FUNCTION "BYTES") */
7321 img->lisp_data = Fcons (make_unibyte_string (ext->Bytes, ext->ByteCount), 7322 {
7322 Fcons (make_number (ext->Function), 7323 img->lisp_data
7323 img->lisp_data)); 7324 = Fcons (make_number (ext->Function),
7325 Fcons (make_unibyte_string (ext->Bytes, ext->ByteCount),
7326 img->lisp_data));
7327 if (ext->Function == GIF_LOCAL_DESCRIPTOR_EXTENSION
7328 && ext->ByteCount == 4)
7329 {
7330 delay = ext->Bytes[2] << CHAR_BIT;
7331 delay |= ext->Bytes[1];
7332 }
7333 }
7324 img->lisp_data = Fcons (Qextension_data, 7334 img->lisp_data = Fcons (Qextension_data,
7325 Fcons (Fnreverse (img->lisp_data), 7335 Fcons (img->lisp_data, Qnil));
7326 Qnil)); 7336 if (delay)
7337 img->lisp_data
7338 = Fcons (Qdelay,
7339 Fcons (make_float (((double) delay) * 0.01),
7340 img->lisp_data));
7327 } 7341 }
7342
7328 if (gif->ImageCount > 1) 7343 if (gif->ImageCount > 1)
7329 img->lisp_data = Fcons (Qcount, 7344 img->lisp_data = Fcons (Qcount,
7330 Fcons (make_number (gif->ImageCount), 7345 Fcons (make_number (gif->ImageCount),
@@ -8688,75 +8703,49 @@ as a ratio to the frame height and width. If the value is
8688non-numeric, there is no explicit limit on the size of images. */); 8703non-numeric, there is no explicit limit on the size of images. */);
8689 Vmax_image_size = make_float (MAX_IMAGE_SIZE); 8704 Vmax_image_size = make_float (MAX_IMAGE_SIZE);
8690 8705
8691 Qpbm = intern_c_string ("pbm"); 8706 DEFSYM (Qpbm, "pbm");
8692 staticpro (&Qpbm);
8693 ADD_IMAGE_TYPE (Qpbm); 8707 ADD_IMAGE_TYPE (Qpbm);
8694 8708
8695 Qxbm = intern_c_string ("xbm"); 8709 DEFSYM (Qxbm, "xbm");
8696 staticpro (&Qxbm);
8697 ADD_IMAGE_TYPE (Qxbm); 8710 ADD_IMAGE_TYPE (Qxbm);
8698 8711
8699 define_image_type (&xbm_type, 1); 8712 define_image_type (&xbm_type, 1);
8700 define_image_type (&pbm_type, 1); 8713 define_image_type (&pbm_type, 1);
8701 8714
8702 Qcount = intern_c_string ("count"); 8715 DEFSYM (Qcount, "count");
8703 staticpro (&Qcount); 8716 DEFSYM (Qextension_data, "extension-data");
8704 Qextension_data = intern_c_string ("extension-data"); 8717 DEFSYM (Qdelay, "delay");
8705 staticpro (&Qextension_data); 8718
8706 8719 DEFSYM (QCascent, ":ascent");
8707 QCascent = intern_c_string (":ascent"); 8720 DEFSYM (QCmargin, ":margin");
8708 staticpro (&QCascent); 8721 DEFSYM (QCrelief, ":relief");
8709 QCmargin = intern_c_string (":margin"); 8722 DEFSYM (QCconversion, ":conversion");
8710 staticpro (&QCmargin); 8723 DEFSYM (QCcolor_symbols, ":color-symbols");
8711 QCrelief = intern_c_string (":relief"); 8724 DEFSYM (QCheuristic_mask, ":heuristic-mask");
8712 staticpro (&QCrelief); 8725 DEFSYM (QCindex, ":index");
8713 QCconversion = intern_c_string (":conversion"); 8726 DEFSYM (QCgeometry, ":geometry");
8714 staticpro (&QCconversion); 8727 DEFSYM (QCcrop, ":crop");
8715 QCcolor_symbols = intern_c_string (":color-symbols"); 8728 DEFSYM (QCrotation, ":rotation");
8716 staticpro (&QCcolor_symbols); 8729 DEFSYM (QCmatrix, ":matrix");
8717 QCheuristic_mask = intern_c_string (":heuristic-mask"); 8730 DEFSYM (QCcolor_adjustment, ":color-adjustment");
8718 staticpro (&QCheuristic_mask); 8731 DEFSYM (QCmask, ":mask");
8719 QCindex = intern_c_string (":index"); 8732
8720 staticpro (&QCindex); 8733 DEFSYM (Qlaplace, "laplace");
8721 QCgeometry = intern_c_string (":geometry"); 8734 DEFSYM (Qemboss, "emboss");
8722 staticpro (&QCgeometry); 8735 DEFSYM (Qedge_detection, "edge-detection");
8723 QCcrop = intern_c_string (":crop"); 8736 DEFSYM (Qheuristic, "heuristic");
8724 staticpro (&QCcrop); 8737
8725 QCrotation = intern_c_string (":rotation"); 8738 DEFSYM (Qpostscript, "postscript");
8726 staticpro (&QCrotation);
8727 QCmatrix = intern_c_string (":matrix");
8728 staticpro (&QCmatrix);
8729 QCcolor_adjustment = intern_c_string (":color-adjustment");
8730 staticpro (&QCcolor_adjustment);
8731 QCmask = intern_c_string (":mask");
8732 staticpro (&QCmask);
8733
8734 Qlaplace = intern_c_string ("laplace");
8735 staticpro (&Qlaplace);
8736 Qemboss = intern_c_string ("emboss");
8737 staticpro (&Qemboss);
8738 Qedge_detection = intern_c_string ("edge-detection");
8739 staticpro (&Qedge_detection);
8740 Qheuristic = intern_c_string ("heuristic");
8741 staticpro (&Qheuristic);
8742
8743 Qpostscript = intern_c_string ("postscript");
8744 staticpro (&Qpostscript);
8745#ifdef HAVE_GHOSTSCRIPT 8739#ifdef HAVE_GHOSTSCRIPT
8746 ADD_IMAGE_TYPE (Qpostscript); 8740 ADD_IMAGE_TYPE (Qpostscript);
8747 QCloader = intern_c_string (":loader"); 8741 DEFSYM (QCloader, ":loader");
8748 staticpro (&QCloader); 8742 DEFSYM (QCbounding_box, ":bounding-box");
8749 QCbounding_box = intern_c_string (":bounding-box"); 8743 DEFSYM (QCpt_width, ":pt-width");
8750 staticpro (&QCbounding_box); 8744 DEFSYM (QCpt_height, ":pt-height");
8751 QCpt_width = intern_c_string (":pt-width");
8752 staticpro (&QCpt_width);
8753 QCpt_height = intern_c_string (":pt-height");
8754 staticpro (&QCpt_height);
8755#endif /* HAVE_GHOSTSCRIPT */ 8745#endif /* HAVE_GHOSTSCRIPT */
8756 8746
8757#ifdef HAVE_NTGUI 8747#ifdef HAVE_NTGUI
8758 Qlibpng_version = intern_c_string ("libpng-version"); 8748 DEFSYM (Qlibpng_version, "libpng-version");
8759 staticpro (&Qlibpng_version);
8760 Fset (Qlibpng_version, 8749 Fset (Qlibpng_version,
8761#if HAVE_PNG 8750#if HAVE_PNG
8762 make_number (PNG_LIBPNG_VER) 8751 make_number (PNG_LIBPNG_VER)
@@ -8767,53 +8756,43 @@ non-numeric, there is no explicit limit on the size of images. */);
8767#endif 8756#endif
8768 8757
8769#if defined (HAVE_XPM) || defined (HAVE_NS) 8758#if defined (HAVE_XPM) || defined (HAVE_NS)
8770 Qxpm = intern_c_string ("xpm"); 8759 DEFSYM (Qxpm, "xpm");
8771 staticpro (&Qxpm);
8772 ADD_IMAGE_TYPE (Qxpm); 8760 ADD_IMAGE_TYPE (Qxpm);
8773#endif 8761#endif
8774 8762
8775#if defined (HAVE_JPEG) || defined (HAVE_NS) 8763#if defined (HAVE_JPEG) || defined (HAVE_NS)
8776 Qjpeg = intern_c_string ("jpeg"); 8764 DEFSYM (Qjpeg, "jpeg");
8777 staticpro (&Qjpeg);
8778 ADD_IMAGE_TYPE (Qjpeg); 8765 ADD_IMAGE_TYPE (Qjpeg);
8779#endif 8766#endif
8780 8767
8781#if defined (HAVE_TIFF) || defined (HAVE_NS) 8768#if defined (HAVE_TIFF) || defined (HAVE_NS)
8782 Qtiff = intern_c_string ("tiff"); 8769 DEFSYM (Qtiff, "tiff");
8783 staticpro (&Qtiff);
8784 ADD_IMAGE_TYPE (Qtiff); 8770 ADD_IMAGE_TYPE (Qtiff);
8785#endif 8771#endif
8786 8772
8787#if defined (HAVE_GIF) || defined (HAVE_NS) 8773#if defined (HAVE_GIF) || defined (HAVE_NS)
8788 Qgif = intern_c_string ("gif"); 8774 DEFSYM (Qgif, "gif");
8789 staticpro (&Qgif);
8790 ADD_IMAGE_TYPE (Qgif); 8775 ADD_IMAGE_TYPE (Qgif);
8791#endif 8776#endif
8792 8777
8793#if defined (HAVE_PNG) || defined (HAVE_NS) 8778#if defined (HAVE_PNG) || defined (HAVE_NS)
8794 Qpng = intern_c_string ("png"); 8779 DEFSYM (Qpng, "png");
8795 staticpro (&Qpng);
8796 ADD_IMAGE_TYPE (Qpng); 8780 ADD_IMAGE_TYPE (Qpng);
8797#endif 8781#endif
8798 8782
8799#if defined (HAVE_IMAGEMAGICK) 8783#if defined (HAVE_IMAGEMAGICK)
8800 Qimagemagick = intern_c_string ("imagemagick"); 8784 DEFSYM (Qimagemagick, "imagemagick");
8801 staticpro (&Qimagemagick);
8802 ADD_IMAGE_TYPE (Qimagemagick); 8785 ADD_IMAGE_TYPE (Qimagemagick);
8803#endif 8786#endif
8804 8787
8805#if defined (HAVE_RSVG) 8788#if defined (HAVE_RSVG)
8806 Qsvg = intern_c_string ("svg"); 8789 DEFSYM (Qsvg, "svg");
8807 staticpro (&Qsvg);
8808 ADD_IMAGE_TYPE (Qsvg); 8790 ADD_IMAGE_TYPE (Qsvg);
8809#ifdef HAVE_NTGUI 8791#ifdef HAVE_NTGUI
8810 /* Other libraries used directly by svg code. */ 8792 /* Other libraries used directly by svg code. */
8811 Qgdk_pixbuf = intern_c_string ("gdk-pixbuf"); 8793 DEFSYM (Qgdk_pixbuf, "gdk-pixbuf");
8812 staticpro (&Qgdk_pixbuf); 8794 DEFSYM (Qglib, "glib");
8813 Qglib = intern_c_string ("glib"); 8795 DEFSYM (Qgobject, "gobject");
8814 staticpro (&Qglib);
8815 Qgobject = intern_c_string ("gobject");
8816 staticpro (&Qgobject);
8817#endif /* HAVE_NTGUI */ 8796#endif /* HAVE_NTGUI */
8818#endif /* HAVE_RSVG */ 8797#endif /* HAVE_RSVG */
8819 8798
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 8da589a7115..d4fafcfc047 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -388,6 +388,7 @@ CONFIG_H = $(EMACS_ROOT)/src/s/ms-w32.h \
388 $(EMACS_ROOT)/nt/inc/sys/stat.h 388 $(EMACS_ROOT)/nt/inc/sys/stat.h
389LISP_H = $(SRC)/lisp.h \ 389LISP_H = $(SRC)/lisp.h \
390 $(SRC)/globals.h \ 390 $(SRC)/globals.h \
391 $(EMACS_ROOT)/lib/intprops.h \
391 $(EMACS_ROOT)/nt/inc/inttypes.h \ 392 $(EMACS_ROOT)/nt/inc/inttypes.h \
392 $(EMACS_ROOT)/nt/inc/stdint.h 393 $(EMACS_ROOT)/nt/inc/stdint.h
393PROCESS_H = $(SRC)/process.h \ 394PROCESS_H = $(SRC)/process.h \
@@ -566,7 +567,6 @@ $(BLD)/ccl.$(O) : \
566$(BLD)/character.$(O) : \ 567$(BLD)/character.$(O) : \
567 $(SRC)/character.c \ 568 $(SRC)/character.c \
568 $(CONFIG_H) \ 569 $(CONFIG_H) \
569 $(EMACS_ROOT)/lib/intprops.h \
570 $(LISP_H) \ 570 $(LISP_H) \
571 $(SRC)/buffer.h \ 571 $(SRC)/buffer.h \
572 $(SRC)/character.h \ 572 $(SRC)/character.h \
@@ -654,7 +654,6 @@ $(BLD)/data.$(O) : \
654 $(SRC)/data.c \ 654 $(SRC)/data.c \
655 $(CONFIG_H) \ 655 $(CONFIG_H) \
656 $(EMACS_ROOT)/nt/inc/sys/time.h \ 656 $(EMACS_ROOT)/nt/inc/sys/time.h \
657 $(EMACS_ROOT)/lib/intprops.h \
658 $(LISP_H) \ 657 $(LISP_H) \
659 $(SRC)/buffer.h \ 658 $(SRC)/buffer.h \
660 $(SRC)/ccl.h \ 659 $(SRC)/ccl.h \
@@ -752,7 +751,6 @@ $(BLD)/editfns.$(O) : \
752 $(EMACS_ROOT)/nt/inc/pwd.h \ 751 $(EMACS_ROOT)/nt/inc/pwd.h \
753 $(EMACS_ROOT)/nt/inc/unistd.h \ 752 $(EMACS_ROOT)/nt/inc/unistd.h \
754 $(EMACS_ROOT)/nt/inc/sys/time.h \ 753 $(EMACS_ROOT)/nt/inc/sys/time.h \
755 $(EMACS_ROOT)/lib/intprops.h \
756 $(EMACS_ROOT)/lib/strftime.h \ 754 $(EMACS_ROOT)/lib/strftime.h \
757 $(EMACS_ROOT)/lib/verify.h \ 755 $(EMACS_ROOT)/lib/verify.h \
758 $(LISP_H) \ 756 $(LISP_H) \
@@ -1034,7 +1032,6 @@ $(BLD)/insdel.$(O) : \
1034 $(SRC)/insdel.c \ 1032 $(SRC)/insdel.c \
1035 $(CONFIG_H) \ 1033 $(CONFIG_H) \
1036 $(EMACS_ROOT)/nt/inc/sys/time.h \ 1034 $(EMACS_ROOT)/nt/inc/sys/time.h \
1037 $(EMACS_ROOT)/lib/intprops.h \
1038 $(LISP_H) \ 1035 $(LISP_H) \
1039 $(SRC)/atimer.h \ 1036 $(SRC)/atimer.h \
1040 $(SRC)/blockinput.h \ 1037 $(SRC)/blockinput.h \
@@ -1052,7 +1049,6 @@ $(BLD)/intervals.$(O) : \
1052 $(SRC)/intervals.c \ 1049 $(SRC)/intervals.c \
1053 $(CONFIG_H) \ 1050 $(CONFIG_H) \
1054 $(EMACS_ROOT)/nt/inc/sys/time.h \ 1051 $(EMACS_ROOT)/nt/inc/sys/time.h \
1055 $(EMACS_ROOT)/lib/intprops.h \
1056 $(LISP_H) \ 1052 $(LISP_H) \
1057 $(SRC)/buffer.h \ 1053 $(SRC)/buffer.h \
1058 $(SRC)/coding.h \ 1054 $(SRC)/coding.h \
@@ -1305,7 +1301,6 @@ $(BLD)/print.$(O) : \
1305 $(EMACS_ROOT)/nt/inc/unistd.h \ 1301 $(EMACS_ROOT)/nt/inc/unistd.h \
1306 $(EMACS_ROOT)/nt/inc/sys/time.h \ 1302 $(EMACS_ROOT)/nt/inc/sys/time.h \
1307 $(EMACS_ROOT)/lib/ftoastr.h \ 1303 $(EMACS_ROOT)/lib/ftoastr.h \
1308 $(EMACS_ROOT)/lib/intprops.h \
1309 $(LISP_H) \ 1304 $(LISP_H) \
1310 $(PROCESS_H) \ 1305 $(PROCESS_H) \
1311 $(SRC)/atimer.h \ 1306 $(SRC)/atimer.h \