[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src ChangeLog image.c
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/src ChangeLog image.c |
Date: |
Thu, 13 Aug 2009 17:01:26 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 09/08/13 17:01:25
Modified files:
src : ChangeLog image.c
Log message:
* image.c (xbm_read_bitmap_data): New arg inhibit_image_error.
(xbm_load_image): Caller changed.
(xbm_file_p): Avoid signalling an image_error.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7682&r2=1.7683
http://cvs.savannah.gnu.org/viewcvs/emacs/src/image.c?cvsroot=emacs&r1=1.121&r2=1.122
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7682
retrieving revision 1.7683
diff -u -b -r1.7682 -r1.7683
--- ChangeLog 13 Aug 2009 13:21:46 -0000 1.7682
+++ ChangeLog 13 Aug 2009 17:01:21 -0000 1.7683
@@ -1,3 +1,9 @@
+2009-08-13 Chong Yidong <address@hidden>
+
+ * image.c (xbm_read_bitmap_data): New arg inhibit_image_error.
+ (xbm_load_image): Caller changed.
+ (xbm_file_p): Avoid signalling an image_error.
+
2009-08-13 Nick Roberts <address@hidden>
* process.c (create_pty): New function.
Index: image.c
===================================================================
RCS file: /sources/emacs/emacs/src/image.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -b -r1.121 -r1.122
--- image.c 4 Mar 2009 12:59:11 -0000 1.121
+++ image.c 13 Aug 2009 17:01:25 -0000 1.122
@@ -2543,7 +2543,7 @@
static int xbm_image_p P_ ((Lisp_Object object));
static int xbm_read_bitmap_data P_ ((struct frame *f,
unsigned char *, unsigned char *,
- int *, int *, unsigned char **));
+ int *, int *, unsigned char **, int));
static int xbm_file_p P_ ((Lisp_Object));
@@ -2934,14 +2934,17 @@
buffer's end. Set *WIDTH and *HEIGHT to the width and height of
the image. Return in *DATA the bitmap data allocated with xmalloc.
Value is non-zero if successful. DATA null means just test if
- CONTENTS looks like an in-memory XBM file. */
+ CONTENTS looks like an in-memory XBM file. If INHIBIT_IMAGE_ERROR
+ is non-zero, inhibit the call to image_error when the image size is
+ invalid (the bitmap remains unread). */
static int
-xbm_read_bitmap_data (f, contents, end, width, height, data)
+xbm_read_bitmap_data (f, contents, end, width, height, data,
inhibit_image_error)
struct frame *f;
unsigned char *contents, *end;
int *width, *height;
unsigned char **data;
+ int inhibit_image_error;
{
unsigned char *s = contents;
char buffer[BUFSIZ];
@@ -2993,6 +2996,7 @@
if (!check_image_size (f, *width, *height))
{
+ if (!inhibit_image_error)
image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
goto failure;
}
@@ -3098,7 +3102,8 @@
unsigned char *data;
int success_p = 0;
- rc = xbm_read_bitmap_data (f, contents, end, &img->width, &img->height,
&data);
+ rc = xbm_read_bitmap_data (f, contents, end, &img->width, &img->height,
+ &data, 0);
if (rc)
{
unsigned long foreground = FRAME_FOREGROUND_PIXEL (f);
@@ -3153,9 +3158,8 @@
int w, h;
return (STRINGP (data)
&& xbm_read_bitmap_data (NULL, SDATA (data),
- (SDATA (data)
- + SBYTES (data)),
- &w, &h, NULL));
+ (SDATA (data) + SBYTES (data)),
+ &w, &h, NULL, 1));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/src ChangeLog image.c,
Chong Yidong <=