* w32/gcc/mingw xbm patch
@ 2004-02-24 2:55 Michael Mauger
2004-02-24 8:45 ` Jason Rumney
0 siblings, 1 reply; 2+ messages in thread
From: Michael Mauger @ 2004-02-24 2:55 UTC (permalink / raw)
I proposed this patch in November, but there wasn't any action taken on
it.
See: http://mail.gnu.org/archive/html/emacs-devel/2003-11/msg00068.html
The patch declares XBM data bytes as unsigned char's explicitly. I
believe the issue is only a problem using GCC with MINGW but the patch
shouldn't hurt MSVC builds.
Without this patch, I'm seeing access violations whenever I use
Customize.
Please consider this updated patch.
Index: emacs/src/w32fns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32fns.c,v
retrieving revision 1.227
diff -u -r1.227 w32fns.c
--- emacs/src/w32fns.c 7 Feb 2004 17:17:20 -0000 1.227
+++ emacs/src/w32fns.c 24 Feb 2004 01:45:33 -0000
@@ -8243,7 +8243,7 @@
***********************************************************************/
static Lisp_Object x_find_image_file P_ ((Lisp_Object));
-static char *slurp_file P_ ((char *, int *));
+static unsigned char *slurp_file P_ ((char *, int *));
/* Find image file FILE. Look in data-directory, then
@@ -8279,13 +8279,13 @@
with xmalloc holding FILE's contents. Value is null if an error
occurred. *SIZE is set to the size of the file. */
-static char *
+static unsigned char *
slurp_file (file, size)
char *file;
int *size;
{
FILE *fp = NULL;
- char *buf = NULL;
+ unsigned char *buf = NULL;
struct stat st;
if (stat (file, &st) == 0
@@ -8316,12 +8316,14 @@
XBM images
***********************************************************************/
-static int xbm_scan P_ ((char **, char *, char *, int *));
+static int xbm_scan P_ ((unsigned char **, unsigned char *,
+ char *, int *));
static int xbm_load P_ ((struct frame *f, struct image *img));
static int xbm_load_image P_ ((struct frame *f, struct image *img,
- char *, char *));
+ unsigned char *, unsigned char *));
static int xbm_image_p P_ ((Lisp_Object object));
-static int xbm_read_bitmap_data P_ ((char *, char *, int *, int *,
+static int xbm_read_bitmap_data P_ ((unsigned char *, unsigned char *,
+ int *, int *,
unsigned char **));
static int xbm_file_p P_ ((Lisp_Object));
@@ -8511,11 +8513,11 @@
static int
xbm_scan (s, end, sval, ival)
- char **s, *end;
+ unsigned char **s, *end;
char *sval;
int *ival;
{
- int c;
+ unsigned int c;
loop:
@@ -8645,11 +8647,11 @@
static int
xbm_read_bitmap_data (contents, end, width, height, data)
- char *contents, *end;
+ unsigned char *contents, *end;
int *width, *height;
unsigned char **data;
{
- char *s = contents;
+ unsigned char *s = contents;
char buffer[BUFSIZ];
int padding_p = 0;
int v10 = 0;
@@ -8827,7 +8829,7 @@
xbm_load_image (f, img, contents, end)
struct frame *f;
struct image *img;
- char *contents, *end;
+ unsigned char *contents, *end;
{
int rc;
unsigned char *data;
@@ -8915,7 +8917,7 @@
if (STRINGP (file_name))
{
Lisp_Object file;
- char *contents;
+ unsigned char *contents;
int size;
struct gcpro gcpro1;
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: w32/gcc/mingw xbm patch
2004-02-24 2:55 w32/gcc/mingw xbm patch Michael Mauger
@ 2004-02-24 8:45 ` Jason Rumney
0 siblings, 0 replies; 2+ messages in thread
From: Jason Rumney @ 2004-02-24 8:45 UTC (permalink / raw)
Cc: emacs-devel
Michael Mauger <mmaug@yahoo.com> writes:
> I proposed this patch in November, but there wasn't any action taken on
> it.
Thanks for the reminder. This patch is sitting in a long queue of
things for me to do, but since it is so simple, I can install it now.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-24 8:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-24 2:55 w32/gcc/mingw xbm patch Michael Mauger
2004-02-24 8:45 ` Jason Rumney
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.