diff options
| author | Paul Eggert | 2011-06-10 22:46:16 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-10 22:46:16 -0700 |
| commit | fc83f7d3d422039f041bbcc4f0cb75a1699421ad (patch) | |
| tree | ab145d16fb805bf749fcab7f7c70554242eab111 /src | |
| parent | e41e9a0e24877b0bc81e08df396f59115f8636da (diff) | |
| parent | cca693976c52acf26f5130848931d274522c69f9 (diff) | |
| download | emacs-fc83f7d3d422039f041bbcc4f0cb75a1699421ad.tar.gz emacs-fc83f7d3d422039f041bbcc4f0cb75a1699421ad.zip | |
Merge from trunk.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 38 | ||||
| -rw-r--r-- | src/buffer.h | 1 | ||||
| -rw-r--r-- | src/data.c | 5 | ||||
| -rw-r--r-- | src/ftfont.c | 2 | ||||
| -rw-r--r-- | src/image.c | 61 | ||||
| -rw-r--r-- | src/minibuf.c | 2 | ||||
| -rw-r--r-- | src/window.c | 32 | ||||
| -rw-r--r-- | src/window.h | 4 |
8 files changed, 83 insertions, 62 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fa9ed02614a..9c2662699be 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 2011-06-10 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-06-11 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t, | 3 | * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t, |
| 4 | not to EMACS_INT, to avoid GCC warning. | 4 | not to EMACS_INT, to avoid GCC warning. |
| @@ -70,6 +70,42 @@ | |||
| 70 | 70 | ||
| 71 | * alloc.c (Fmake_string): Check for out-of-range init. | 71 | * alloc.c (Fmake_string): Check for out-of-range init. |
| 72 | 72 | ||
| 73 | 2011-06-10 Paul Eggert <eggert@cs.ucla.edu> | ||
| 74 | |||
| 75 | * buffer.h: Include <time.h>, for time_t. | ||
| 76 | Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra. | ||
| 77 | |||
| 78 | Fix minor problems found by static checking. | ||
| 79 | |||
| 80 | * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't. | ||
| 81 | |||
| 82 | Make identifiers static if they are not used in other modules. | ||
| 83 | * data.c (Qcompiled_function, Qframe, Qvector): | ||
| 84 | * image.c (QimageMagick, Qsvg): | ||
| 85 | * minibuf.c (Qmetadata): | ||
| 86 | * window.c (resize_window_check, resize_root_window): Now static. | ||
| 87 | * window.h (resize_window_check, resize_root_window): Remove decls. | ||
| 88 | |||
| 89 | * window.c (window_deletion_count, delete_deletable_window): | ||
| 90 | Remove; unused. | ||
| 91 | (window_body_lines): Now static. | ||
| 92 | (Fdelete_other_windows_internal): Mark vars as initialized. | ||
| 93 | Make sure 'resize_failed' is initialized. | ||
| 94 | (run_window_configuration_change_hook): Rename local to avoid shadowing. | ||
| 95 | (resize_window_apply): Remove unused local. | ||
| 96 | * window.h (delete_deletable_window): Remove decl. | ||
| 97 | |||
| 98 | * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing. | ||
| 99 | (imagemagick_load_image): Fix pointer signedness problem by changing | ||
| 100 | last arg from unsigned char * to char *. All uses changed. | ||
| 101 | Also, fix a local for similar reasons. | ||
| 102 | Remove unused locals. Remove locals to avoid shadowing. | ||
| 103 | (fn_rsvg_handle_free): Remove; unused. | ||
| 104 | (svg_load, svg_load_image): Fix pointer signedness problem. | ||
| 105 | (imagemagick_load_image): Don't use garbage pointer image_wand. | ||
| 106 | |||
| 107 | * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals. | ||
| 108 | |||
| 73 | 2011-06-10 Chong Yidong <cyd@stupidchicken.com> | 109 | 2011-06-10 Chong Yidong <cyd@stupidchicken.com> |
| 74 | 110 | ||
| 75 | * image.c (gif_load): Fix omitted cast error introduced by | 111 | * image.c (gif_load): Fix omitted cast error introduced by |
diff --git a/src/buffer.h b/src/buffer.h index 725e4edb638..dc1d62beb00 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -18,6 +18,7 @@ GNU General Public License for more details. | |||
| 18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License |
| 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | 20 | ||
| 21 | #include <time.h> /* for time_t */ | ||
| 21 | 22 | ||
| 22 | /* Accessing the parameters of the current buffer. */ | 23 | /* Accessing the parameters of the current buffer. */ |
| 23 | 24 | ||
diff --git a/src/data.c b/src/data.c index 85e6952efa5..57d7753e393 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -89,8 +89,9 @@ Lisp_Object Qinteger; | |||
| 89 | static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay; | 89 | static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay; |
| 90 | Lisp_Object Qwindow; | 90 | Lisp_Object Qwindow; |
| 91 | static Lisp_Object Qfloat, Qwindow_configuration; | 91 | static Lisp_Object Qfloat, Qwindow_configuration; |
| 92 | static Lisp_Object Qprocess, Qcompiled_function; | 92 | static Lisp_Object Qprocess; |
| 93 | Lisp_Object Qbuffer, Qframe, Qvector; | 93 | static Lisp_Object Qcompiled_function, Qframe, Qvector; |
| 94 | Lisp_Object Qbuffer; | ||
| 94 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; | 95 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; |
| 95 | static Lisp_Object Qsubrp, Qmany, Qunevalled; | 96 | static Lisp_Object Qsubrp, Qmany, Qunevalled; |
| 96 | Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; | 97 | Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; |
diff --git a/src/ftfont.c b/src/ftfont.c index cd8829a3e51..5037d54bc2f 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -1612,7 +1612,6 @@ ftfont_get_metrics (MFLTFont *font, MFLTGlyphString *gstring, | |||
| 1612 | if (g->code != FONT_INVALID_CODE) | 1612 | if (g->code != FONT_INVALID_CODE) |
| 1613 | { | 1613 | { |
| 1614 | FT_Glyph_Metrics *m; | 1614 | FT_Glyph_Metrics *m; |
| 1615 | int lbearing, rbearing, ascent, descent, xadv; | ||
| 1616 | 1615 | ||
| 1617 | if (FT_Load_Glyph (ft_face, g->code, FT_LOAD_DEFAULT) != 0) | 1616 | if (FT_Load_Glyph (ft_face, g->code, FT_LOAD_DEFAULT) != 0) |
| 1618 | abort (); | 1617 | abort (); |
| @@ -1867,7 +1866,6 @@ ftfont_drive_otf (MFLTFont *font, | |||
| 1867 | { | 1866 | { |
| 1868 | MFLTGlyph *g; | 1867 | MFLTGlyph *g; |
| 1869 | int min_from, max_to; | 1868 | int min_from, max_to; |
| 1870 | int j; | ||
| 1871 | int feature_idx = otfg->positioning_type >> 4; | 1869 | int feature_idx = otfg->positioning_type >> 4; |
| 1872 | 1870 | ||
| 1873 | g = out->glyphs + out->used; | 1871 | g = out->glyphs + out->used; |
diff --git a/src/image.c b/src/image.c index 7d15a4725c5..f36e097b58c 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -7365,7 +7365,7 @@ gif_load (struct frame *f, struct image *img) | |||
| 7365 | ***********************************************************************/ | 7365 | ***********************************************************************/ |
| 7366 | #if defined (HAVE_IMAGEMAGICK) | 7366 | #if defined (HAVE_IMAGEMAGICK) |
| 7367 | 7367 | ||
| 7368 | Lisp_Object Qimagemagick; | 7368 | static Lisp_Object Qimagemagick; |
| 7369 | 7369 | ||
| 7370 | static int imagemagick_image_p (Lisp_Object); | 7370 | static int imagemagick_image_p (Lisp_Object); |
| 7371 | static int imagemagick_load (struct frame *, struct image *); | 7371 | static int imagemagick_load (struct frame *, struct image *); |
| @@ -7456,6 +7456,14 @@ imagemagick_image_p (Lisp_Object object) | |||
| 7456 | #define DrawRectangle DrawRectangleGif | 7456 | #define DrawRectangle DrawRectangleGif |
| 7457 | #include <wand/MagickWand.h> | 7457 | #include <wand/MagickWand.h> |
| 7458 | 7458 | ||
| 7459 | /* ImageMagick 6.5.3 through 6.6.5 hid PixelGetMagickColor for some reason. | ||
| 7460 | Emacs seems to work fine with the hidden version, so unhide it. */ | ||
| 7461 | #include <magick/version.h> | ||
| 7462 | #if 0x653 <= MagickLibVersion && MagickLibVersion <= 0x665 | ||
| 7463 | extern WandExport void PixelGetMagickColor (const PixelWand *, | ||
| 7464 | MagickPixelPacket *); | ||
| 7465 | #endif | ||
| 7466 | |||
| 7459 | /* Helper function for imagemagick_load, which does the actual loading | 7467 | /* Helper function for imagemagick_load, which does the actual loading |
| 7460 | given contents and size, apart from frame and image structures, | 7468 | given contents and size, apart from frame and image structures, |
| 7461 | passed from imagemagick_load. Uses librimagemagick to do most of | 7469 | passed from imagemagick_load. Uses librimagemagick to do most of |
| @@ -7471,7 +7479,7 @@ imagemagick_image_p (Lisp_Object object) | |||
| 7471 | static int | 7479 | static int |
| 7472 | imagemagick_load_image (struct frame *f, struct image *img, | 7480 | imagemagick_load_image (struct frame *f, struct image *img, |
| 7473 | unsigned char *contents, unsigned int size, | 7481 | unsigned char *contents, unsigned int size, |
| 7474 | unsigned char *filename) | 7482 | char *filename) |
| 7475 | { | 7483 | { |
| 7476 | unsigned long width; | 7484 | unsigned long width; |
| 7477 | unsigned long height; | 7485 | unsigned long height; |
| @@ -7479,8 +7487,6 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7479 | MagickBooleanType status; | 7487 | MagickBooleanType status; |
| 7480 | 7488 | ||
| 7481 | XImagePtr ximg; | 7489 | XImagePtr ximg; |
| 7482 | Lisp_Object specified_bg; | ||
| 7483 | XColor background; | ||
| 7484 | int x; | 7490 | int x; |
| 7485 | int y; | 7491 | int y; |
| 7486 | 7492 | ||
| @@ -7491,7 +7497,7 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7491 | MagickPixelPacket pixel; | 7497 | MagickPixelPacket pixel; |
| 7492 | Lisp_Object image; | 7498 | Lisp_Object image; |
| 7493 | Lisp_Object value; | 7499 | Lisp_Object value; |
| 7494 | Lisp_Object crop, geometry; | 7500 | Lisp_Object crop; |
| 7495 | long ino; | 7501 | long ino; |
| 7496 | int desired_width, desired_height; | 7502 | int desired_width, desired_height; |
| 7497 | double rotation; | 7503 | double rotation; |
| @@ -7552,23 +7558,18 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7552 | im_image = ReadImage (image_info, exception); | 7558 | im_image = ReadImage (image_info, exception); |
| 7553 | DestroyExceptionInfo (exception); | 7559 | DestroyExceptionInfo (exception); |
| 7554 | 7560 | ||
| 7555 | if (im_image != NULL) | 7561 | if (im_image == NULL) |
| 7556 | { | 7562 | goto imagemagick_no_wand; |
| 7557 | image_wand = NewMagickWandFromImage (im_image); | 7563 | image_wand = NewMagickWandFromImage (im_image); |
| 7558 | DestroyImage(im_image); | 7564 | DestroyImage(im_image); |
| 7559 | status = MagickTrue; | ||
| 7560 | } | ||
| 7561 | else | ||
| 7562 | status = MagickFalse; | ||
| 7563 | } | 7565 | } |
| 7564 | else | 7566 | else |
| 7565 | { | 7567 | { |
| 7566 | image_wand = NewMagickWand (); | 7568 | image_wand = NewMagickWand (); |
| 7567 | status = MagickReadImageBlob (image_wand, contents, size); | 7569 | if (MagickReadImageBlob (image_wand, contents, size) == MagickFalse) |
| 7570 | goto imagemagick_error; | ||
| 7568 | } | 7571 | } |
| 7569 | 7572 | ||
| 7570 | if (status == MagickFalse) goto imagemagick_error; | ||
| 7571 | |||
| 7572 | /* If width and/or height is set in the display spec assume we want | 7573 | /* If width and/or height is set in the display spec assume we want |
| 7573 | to scale to those values. If either h or w is unspecified, the | 7574 | to scale to those values. If either h or w is unspecified, the |
| 7574 | unspecified should be calculated from the specified to preserve | 7575 | unspecified should be calculated from the specified to preserve |
| @@ -7609,7 +7610,7 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7609 | than the alternatives, but it still reads the entire image into memory | 7610 | than the alternatives, but it still reads the entire image into memory |
| 7610 | before croping, which is aparently difficult to avoid when using | 7611 | before croping, which is aparently difficult to avoid when using |
| 7611 | imagemagick. */ | 7612 | imagemagick. */ |
| 7612 | int w, h, x, y; | 7613 | int w, h; |
| 7613 | w = XFASTINT (XCAR (crop)); | 7614 | w = XFASTINT (XCAR (crop)); |
| 7614 | crop = XCDR (crop); | 7615 | crop = XCDR (crop); |
| 7615 | if (CONSP (crop) && INTEGERP (XCAR (crop))) | 7616 | if (CONSP (crop) && INTEGERP (XCAR (crop))) |
| @@ -7723,7 +7724,7 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7723 | method is also well tested. Some aspects of this method are | 7724 | method is also well tested. Some aspects of this method are |
| 7724 | ad-hoc and needs to be more researched. */ | 7725 | ad-hoc and needs to be more researched. */ |
| 7725 | int imagedepth = 24;/*MagickGetImageDepth(image_wand);*/ | 7726 | int imagedepth = 24;/*MagickGetImageDepth(image_wand);*/ |
| 7726 | char* exportdepth = imagedepth <= 8 ? "I" : "BGRP";/*"RGBP";*/ | 7727 | const char *exportdepth = imagedepth <= 8 ? "I" : "BGRP";/*"RGBP";*/ |
| 7727 | /* Try to create a x pixmap to hold the imagemagick pixmap. */ | 7728 | /* Try to create a x pixmap to hold the imagemagick pixmap. */ |
| 7728 | if (!x_create_x_image_and_pixmap (f, width, height, imagedepth, | 7729 | if (!x_create_x_image_and_pixmap (f, width, height, imagedepth, |
| 7729 | &ximg, &img->pixmap)) | 7730 | &ximg, &img->pixmap)) |
| @@ -7796,6 +7797,7 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7796 | 7797 | ||
| 7797 | imagemagick_error: | 7798 | imagemagick_error: |
| 7798 | DestroyMagickWand (image_wand); | 7799 | DestroyMagickWand (image_wand); |
| 7800 | imagemagick_no_wand: | ||
| 7799 | MagickWandTerminus (); | 7801 | MagickWandTerminus (); |
| 7800 | /* TODO more cleanup. */ | 7802 | /* TODO more cleanup. */ |
| 7801 | image_error ("Error parsing IMAGEMAGICK image `%s'", img->spec, Qnil); | 7803 | image_error ("Error parsing IMAGEMAGICK image `%s'", img->spec, Qnil); |
| @@ -7825,7 +7827,7 @@ imagemagick_load (struct frame *f, struct image *img) | |||
| 7825 | image_error ("Cannot find image file `%s'", file_name, Qnil); | 7827 | image_error ("Cannot find image file `%s'", file_name, Qnil); |
| 7826 | return 0; | 7828 | return 0; |
| 7827 | } | 7829 | } |
| 7828 | success_p = imagemagick_load_image (f, img, 0, 0, SDATA (file)); | 7830 | success_p = imagemagick_load_image (f, img, 0, 0, SSDATA (file)); |
| 7829 | } | 7831 | } |
| 7830 | /* Else its not a file, its a lisp object. Load the image from a | 7832 | /* Else its not a file, its a lisp object. Load the image from a |
| 7831 | lisp object rather than a file. */ | 7833 | lisp object rather than a file. */ |
| @@ -7890,7 +7892,7 @@ static int svg_load_image (struct frame *, struct image *, | |||
| 7890 | 7892 | ||
| 7891 | /* The symbol `svg' identifying images of this type. */ | 7893 | /* The symbol `svg' identifying images of this type. */ |
| 7892 | 7894 | ||
| 7893 | Lisp_Object Qsvg; | 7895 | static Lisp_Object Qsvg; |
| 7894 | 7896 | ||
| 7895 | /* Indices of image specification fields in svg_format, below. */ | 7897 | /* Indices of image specification fields in svg_format, below. */ |
| 7896 | 7898 | ||
| @@ -7973,7 +7975,6 @@ DEF_IMGLIB_FN (void, rsvg_handle_get_dimensions); | |||
| 7973 | DEF_IMGLIB_FN (gboolean, rsvg_handle_write); | 7975 | DEF_IMGLIB_FN (gboolean, rsvg_handle_write); |
| 7974 | DEF_IMGLIB_FN (gboolean, rsvg_handle_close); | 7976 | DEF_IMGLIB_FN (gboolean, rsvg_handle_close); |
| 7975 | DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf); | 7977 | DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf); |
| 7976 | DEF_IMGLIB_FN (void, rsvg_handle_free); | ||
| 7977 | 7978 | ||
| 7978 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_width); | 7979 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_width); |
| 7979 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_height); | 7980 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_height); |
| @@ -8006,7 +8007,6 @@ init_svg_functions (Lisp_Object libraries) | |||
| 8006 | LOAD_IMGLIB_FN (library, rsvg_handle_write); | 8007 | LOAD_IMGLIB_FN (library, rsvg_handle_write); |
| 8007 | LOAD_IMGLIB_FN (library, rsvg_handle_close); | 8008 | LOAD_IMGLIB_FN (library, rsvg_handle_close); |
| 8008 | LOAD_IMGLIB_FN (library, rsvg_handle_get_pixbuf); | 8009 | LOAD_IMGLIB_FN (library, rsvg_handle_get_pixbuf); |
| 8009 | LOAD_IMGLIB_FN (library, rsvg_handle_free); | ||
| 8010 | 8010 | ||
| 8011 | LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_width); | 8011 | LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_width); |
| 8012 | LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_height); | 8012 | LOAD_IMGLIB_FN (gdklib, gdk_pixbuf_get_height); |
| @@ -8032,7 +8032,6 @@ init_svg_functions (Lisp_Object libraries) | |||
| 8032 | #define fn_rsvg_handle_write rsvg_handle_write | 8032 | #define fn_rsvg_handle_write rsvg_handle_write |
| 8033 | #define fn_rsvg_handle_close rsvg_handle_close | 8033 | #define fn_rsvg_handle_close rsvg_handle_close |
| 8034 | #define fn_rsvg_handle_get_pixbuf rsvg_handle_get_pixbuf | 8034 | #define fn_rsvg_handle_get_pixbuf rsvg_handle_get_pixbuf |
| 8035 | #define fn_rsvg_handle_free rsvg_handle_free | ||
| 8036 | 8035 | ||
| 8037 | #define fn_gdk_pixbuf_get_width gdk_pixbuf_get_width | 8036 | #define fn_gdk_pixbuf_get_width gdk_pixbuf_get_width |
| 8038 | #define fn_gdk_pixbuf_get_height gdk_pixbuf_get_height | 8037 | #define fn_gdk_pixbuf_get_height gdk_pixbuf_get_height |
| @@ -8074,7 +8073,7 @@ svg_load (struct frame *f, struct image *img) | |||
| 8074 | } | 8073 | } |
| 8075 | 8074 | ||
| 8076 | /* Read the entire file into memory. */ | 8075 | /* Read the entire file into memory. */ |
| 8077 | contents = slurp_file (SDATA (file), &size); | 8076 | contents = slurp_file (SSDATA (file), &size); |
| 8078 | if (contents == NULL) | 8077 | if (contents == NULL) |
| 8079 | { | 8078 | { |
| 8080 | image_error ("Error loading SVG image `%s'", img->spec, Qnil); | 8079 | image_error ("Error loading SVG image `%s'", img->spec, Qnil); |
| @@ -8117,7 +8116,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * | |||
| 8117 | { | 8116 | { |
| 8118 | RsvgHandle *rsvg_handle; | 8117 | RsvgHandle *rsvg_handle; |
| 8119 | RsvgDimensionData dimension_data; | 8118 | RsvgDimensionData dimension_data; |
| 8120 | GError *error = NULL; | 8119 | GError *err = NULL; |
| 8121 | GdkPixbuf *pixbuf; | 8120 | GdkPixbuf *pixbuf; |
| 8122 | int width; | 8121 | int width; |
| 8123 | int height; | 8122 | int height; |
| @@ -8136,13 +8135,13 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * | |||
| 8136 | rsvg_handle = fn_rsvg_handle_new (); | 8135 | rsvg_handle = fn_rsvg_handle_new (); |
| 8137 | 8136 | ||
| 8138 | /* Parse the contents argument and fill in the rsvg_handle. */ | 8137 | /* Parse the contents argument and fill in the rsvg_handle. */ |
| 8139 | fn_rsvg_handle_write (rsvg_handle, contents, size, &error); | 8138 | fn_rsvg_handle_write (rsvg_handle, contents, size, &err); |
| 8140 | if (error) goto rsvg_error; | 8139 | if (err) goto rsvg_error; |
| 8141 | 8140 | ||
| 8142 | /* The parsing is complete, rsvg_handle is ready to used, close it | 8141 | /* The parsing is complete, rsvg_handle is ready to used, close it |
| 8143 | for further writes. */ | 8142 | for further writes. */ |
| 8144 | fn_rsvg_handle_close (rsvg_handle, &error); | 8143 | fn_rsvg_handle_close (rsvg_handle, &err); |
| 8145 | if (error) goto rsvg_error; | 8144 | if (err) goto rsvg_error; |
| 8146 | 8145 | ||
| 8147 | fn_rsvg_handle_get_dimensions (rsvg_handle, &dimension_data); | 8146 | fn_rsvg_handle_get_dimensions (rsvg_handle, &dimension_data); |
| 8148 | if (! check_image_size (f, dimension_data.width, dimension_data.height)) | 8147 | if (! check_image_size (f, dimension_data.width, dimension_data.height)) |
| @@ -8182,7 +8181,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * | |||
| 8182 | color. */ | 8181 | color. */ |
| 8183 | specified_bg = image_spec_value (img->spec, QCbackground, NULL); | 8182 | specified_bg = image_spec_value (img->spec, QCbackground, NULL); |
| 8184 | if (!STRINGP (specified_bg) | 8183 | if (!STRINGP (specified_bg) |
| 8185 | || !x_defined_color (f, SDATA (specified_bg), &background, 0)) | 8184 | || !x_defined_color (f, SSDATA (specified_bg), &background, 0)) |
| 8186 | { | 8185 | { |
| 8187 | #ifndef HAVE_NS | 8186 | #ifndef HAVE_NS |
| 8188 | background.pixel = FRAME_BACKGROUND_PIXEL (f); | 8187 | background.pixel = FRAME_BACKGROUND_PIXEL (f); |
| @@ -8257,7 +8256,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * | |||
| 8257 | /* FIXME: Use error->message so the user knows what is the actual | 8256 | /* FIXME: Use error->message so the user knows what is the actual |
| 8258 | problem with the image. */ | 8257 | problem with the image. */ |
| 8259 | image_error ("Error parsing SVG image `%s'", img->spec, Qnil); | 8258 | image_error ("Error parsing SVG image `%s'", img->spec, Qnil); |
| 8260 | fn_g_error_free (error); | 8259 | fn_g_error_free (err); |
| 8261 | return 0; | 8260 | return 0; |
| 8262 | } | 8261 | } |
| 8263 | 8262 | ||
diff --git a/src/minibuf.c b/src/minibuf.c index 8f1987298b3..1b555035cfe 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1895,7 +1895,7 @@ the values STRING, PREDICATE and `lambda'. */) | |||
| 1895 | return Qt; | 1895 | return Qt; |
| 1896 | } | 1896 | } |
| 1897 | 1897 | ||
| 1898 | Lisp_Object Qmetadata; | 1898 | static Lisp_Object Qmetadata; |
| 1899 | extern Lisp_Object Qbuffer; | 1899 | extern Lisp_Object Qbuffer; |
| 1900 | 1900 | ||
| 1901 | DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, | 1901 | DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, |
diff --git a/src/window.c b/src/window.c index 31a25286bcc..7a026b3a1c7 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -82,6 +82,7 @@ static int foreach_window_1 (struct window *, | |||
| 82 | int (* fn) (struct window *, void *), | 82 | int (* fn) (struct window *, void *), |
| 83 | void *); | 83 | void *); |
| 84 | static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object); | 84 | static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object); |
| 85 | static int resize_window_check (struct window *, int); | ||
| 85 | static void resize_window_apply (struct window *, int); | 86 | static void resize_window_apply (struct window *, int); |
| 86 | static Lisp_Object select_window (Lisp_Object, Lisp_Object, int); | 87 | static Lisp_Object select_window (Lisp_Object, Lisp_Object, int); |
| 87 | 88 | ||
| @@ -121,9 +122,6 @@ static int window_initialized; | |||
| 121 | /* Hook to run when window config changes. */ | 122 | /* Hook to run when window config changes. */ |
| 122 | static Lisp_Object Qwindow_configuration_change_hook; | 123 | static Lisp_Object Qwindow_configuration_change_hook; |
| 123 | 124 | ||
| 124 | /* Incremented by 1 whenever a window is deleted. */ | ||
| 125 | static int window_deletion_count; | ||
| 126 | |||
| 127 | /* Used by the function window_scroll_pixel_based */ | 125 | /* Used by the function window_scroll_pixel_based */ |
| 128 | static int window_scroll_pixel_based_preserve_x; | 126 | static int window_scroll_pixel_based_preserve_x; |
| 129 | static int window_scroll_pixel_based_preserve_y; | 127 | static int window_scroll_pixel_based_preserve_y; |
| @@ -1974,14 +1972,6 @@ recombine_windows (Lisp_Object window) | |||
| 1974 | } | 1972 | } |
| 1975 | } | 1973 | } |
| 1976 | } | 1974 | } |
| 1977 | |||
| 1978 | /* If WINDOW can be deleted, delete it. */ | ||
| 1979 | Lisp_Object | ||
| 1980 | delete_deletable_window (Lisp_Object window) | ||
| 1981 | { | ||
| 1982 | if (!NILP (call1 (Qwindow_deletable_p, window))) | ||
| 1983 | call1 (Qdelete_window, window); | ||
| 1984 | } | ||
| 1985 | 1975 | ||
| 1986 | /*********************************************************************** | 1976 | /*********************************************************************** |
| 1987 | Window List | 1977 | Window List |
| @@ -2643,7 +2633,7 @@ selected frame and no others. */) | |||
| 2643 | return Qnil; | 2633 | return Qnil; |
| 2644 | } | 2634 | } |
| 2645 | 2635 | ||
| 2646 | Lisp_Object | 2636 | static Lisp_Object |
| 2647 | resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizontal, Lisp_Object ignore) | 2637 | resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizontal, Lisp_Object ignore) |
| 2648 | { | 2638 | { |
| 2649 | return call4 (Qresize_root_window, window, delta, horizontal, ignore); | 2639 | return call4 (Qresize_root_window, window, delta, horizontal, ignore); |
| @@ -2669,9 +2659,9 @@ window-start value is reasonable when this function is called. */) | |||
| 2669 | { | 2659 | { |
| 2670 | struct window *w, *r, *s; | 2660 | struct window *w, *r, *s; |
| 2671 | struct frame *f; | 2661 | struct frame *f; |
| 2672 | Lisp_Object sibling, pwindow, swindow, delta; | 2662 | Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; |
| 2673 | EMACS_INT startpos; | 2663 | EMACS_INT startpos IF_LINT (= 0); |
| 2674 | int top, new_top, resize_failed; | 2664 | int top IF_LINT (= 0), new_top, resize_failed; |
| 2675 | 2665 | ||
| 2676 | w = decode_any_window (window); | 2666 | w = decode_any_window (window); |
| 2677 | XSETWINDOW (window, w); | 2667 | XSETWINDOW (window, w); |
| @@ -2757,10 +2747,10 @@ window-start value is reasonable when this function is called. */) | |||
| 2757 | windows_or_buffers_changed++; | 2747 | windows_or_buffers_changed++; |
| 2758 | Vwindow_list = Qnil; | 2748 | Vwindow_list = Qnil; |
| 2759 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; | 2749 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; |
| 2750 | resize_failed = 0; | ||
| 2760 | 2751 | ||
| 2761 | if (NILP (w->buffer)) | 2752 | if (NILP (w->buffer)) |
| 2762 | { | 2753 | { |
| 2763 | resize_failed = 0; | ||
| 2764 | /* Resize subwindows vertically. */ | 2754 | /* Resize subwindows vertically. */ |
| 2765 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); | 2755 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); |
| 2766 | w->top_line = r->top_line; | 2756 | w->top_line = r->top_line; |
| @@ -3078,12 +3068,12 @@ run_window_configuration_change_hook (struct frame *f) | |||
| 3078 | if (!NILP (Flocal_variable_p (Qwindow_configuration_change_hook, | 3068 | if (!NILP (Flocal_variable_p (Qwindow_configuration_change_hook, |
| 3079 | buffer))) | 3069 | buffer))) |
| 3080 | { | 3070 | { |
| 3081 | int count = SPECPDL_INDEX (); | 3071 | int inner_count = SPECPDL_INDEX (); |
| 3082 | record_unwind_protect (select_window_norecord, Fselected_window ()); | 3072 | record_unwind_protect (select_window_norecord, Fselected_window ()); |
| 3083 | select_window_norecord (window); | 3073 | select_window_norecord (window); |
| 3084 | run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook, | 3074 | run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook, |
| 3085 | buffer)); | 3075 | buffer)); |
| 3086 | unbind_to (count, Qnil); | 3076 | unbind_to (inner_count, Qnil); |
| 3087 | } | 3077 | } |
| 3088 | } | 3078 | } |
| 3089 | } | 3079 | } |
| @@ -3533,7 +3523,7 @@ Note: This function does not operate on any subwindows of WINDOW. */) | |||
| 3533 | Note: This function does not check any of `window-fixed-size-p', | 3523 | Note: This function does not check any of `window-fixed-size-p', |
| 3534 | `window-min-height' or `window-min-width'. It does check that window | 3524 | `window-min-height' or `window-min-width'. It does check that window |
| 3535 | sizes do not drop below one line (two columns). */ | 3525 | sizes do not drop below one line (two columns). */ |
| 3536 | int | 3526 | static int |
| 3537 | resize_window_check (struct window *w, int horflag) | 3527 | resize_window_check (struct window *w, int horflag) |
| 3538 | { | 3528 | { |
| 3539 | struct window *c; | 3529 | struct window *c; |
| @@ -3617,7 +3607,7 @@ resize_window_check (struct window *w, int horflag) | |||
| 3617 | static void | 3607 | static void |
| 3618 | resize_window_apply (struct window *w, int horflag) | 3608 | resize_window_apply (struct window *w, int horflag) |
| 3619 | { | 3609 | { |
| 3620 | struct window *c, *p; | 3610 | struct window *c; |
| 3621 | int pos; | 3611 | int pos; |
| 3622 | 3612 | ||
| 3623 | /* Note: Assigning new_normal requires that the new total size of the | 3613 | /* Note: Assigning new_normal requires that the new total size of the |
| @@ -3809,7 +3799,7 @@ resize_frame_windows (struct frame *f, int size, int horflag) | |||
| 3809 | DEFUN ("split-window-internal", Fsplit_window_internal, Ssplit_window_internal, 4, 4, 0, | 3799 | DEFUN ("split-window-internal", Fsplit_window_internal, Ssplit_window_internal, 4, 4, 0, |
| 3810 | doc: /* Split window OLD. | 3800 | doc: /* Split window OLD. |
| 3811 | Second argument TOTAL-SIZE specifies the number of lines or columns of the | 3801 | Second argument TOTAL-SIZE specifies the number of lines or columns of the |
| 3812 | new window. In any case TOTAL-SIZE must be a positive integer | 3802 | new window. In any case TOTAL-SIZE must be a positive integer |
| 3813 | 3803 | ||
| 3814 | Third argument SIDE nil (or `below') specifies that the new window shall | 3804 | Third argument SIDE nil (or `below') specifies that the new window shall |
| 3815 | be located below WINDOW. SIDE `above' means the new window shall be | 3805 | be located below WINDOW. SIDE `above' means the new window shall be |
diff --git a/src/window.h b/src/window.h index 236464775d3..1ebc99055a5 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -924,10 +924,6 @@ extern void init_window (void); | |||
| 924 | extern void syms_of_window (void); | 924 | extern void syms_of_window (void); |
| 925 | extern void keys_of_window (void); | 925 | extern void keys_of_window (void); |
| 926 | extern void resize_frame_windows (struct frame *, int, int); | 926 | extern void resize_frame_windows (struct frame *, int, int); |
| 927 | extern int resize_window_check (struct window *, int); | ||
| 928 | extern Lisp_Object delete_deletable_window (Lisp_Object); | ||
| 929 | extern Lisp_Object resize_root_window (Lisp_Object, Lisp_Object, Lisp_Object, | ||
| 930 | Lisp_Object); | ||
| 931 | 927 | ||
| 932 | 928 | ||
| 933 | #endif /* not WINDOW_H_INCLUDED */ | 929 | #endif /* not WINDOW_H_INCLUDED */ |