NOTE: This patch has been committed. The version below is
informational only (whitespace differences have been removed).
Dear reviewers,
this should fix recently observed crashes related to image
specifiers. This was due to an unfinished part of my previous patch that
I had forgotten about. My apologies.
src/ChangeLog addition:
2007-11-05 Didier Verna <didier(a)xemacs.org>
* glyphs.c (potential_pixmap_file_instanciator): Fix comment
describing its behavior.
* glyphs.c (xbm_mask_file_munging): Update semantics of file and
mask_file arguments to reflect recent changes in
potential_pixmap_file_instanciator (see patch below).
* glyphs-x.c (autodetect_normalize): Update call to
xbm_mask_file_munging to reflect the above change.
* glyphs-gtk.c (autodetect_normalize): Ditto.
XEmacs source patch:
Diff command: cvs -q diff -u -t -b -B -w
Files affected: src/glyphs-gtk.c src/glyphs-x.c src/glyphs.c
Index: src/glyphs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs.c,v
retrieving revision 1.57
diff -u -u -t -b -B -w -r1.57 glyphs.c
--- src/glyphs.c 15 Oct 2007 09:55:50 -0000 1.57
+++ src/glyphs.c 5 Nov 2007 14:51:41 -0000
@@ -2530,9 +2530,10 @@
/* pixmap file functions */
/************************************************************************/
-/* If INSTANTIATOR refers to inline data, return Qnil.
+/* If INSTANTIATOR refers to inline data, return Qt.
If INSTANTIATOR refers to data in a file, return the full filename
- if it exists; otherwise, return a cons of (filename).
+ if it exists, Qnil if there's no console method for locating the file, or
+ (filename) if there was an error locating the file.
FILE_KEYWORD and DATA_KEYWORD are symbols specifying the
keywords used to look up the file and inline data,
@@ -2751,10 +2752,10 @@
/* This is unclean but it's fairly standard -- a number of the
bitmaps in /usr/include/X11/bitmaps use it -- so we support
it. */
- if (NILP (mask_file)
+ if (EQ (mask_file, Qt)
/* don't override explicitly specified mask data. */
&& NILP (assq_no_quit (Q_mask_data, alist))
- && !NILP (file))
+ && !EQ (file, Qt))
{
mask_file = MAYBE_LISP_CONTYPE_METH
(decode_console_type(console_type, ERROR_ME),
@@ -2834,7 +2835,6 @@
alist);
}
- /* #### FIXME: Hmmm... what about mask being Qt ?? -- dvl */
alist = xbm_mask_file_munging (alist, file, mask_file, console_type);
{
@@ -2904,11 +2904,11 @@
if (EQ (file, Qt) && EQ (mask_file, Qt)) /* no conversion necessary */
RETURN_UNGCPRO (inst);
-
- /* #### FIXME: and what about file / mask being Qt ? -- dvl */
alist = tagged_vector_to_alist (inst);
{
+ /* #### FIXME: what if EQ (file, Qt) && !EQ (mask, Qt) ? Is that possible?
+ If so, we have a problem... -- dvl */
Lisp_Object data = make_string_from_file (file);
alist = remassq_no_quit (Q_file, alist);
/* there can't be a :data at this point. */
Index: src/glyphs-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-x.c,v
retrieving revision 1.85
diff -u -u -t -b -B -w -r1.85 glyphs-x.c
--- src/glyphs-x.c 15 Oct 2007 09:55:50 -0000 1.85
+++ src/glyphs-x.c 5 Nov 2007 14:51:41 -0000
@@ -1718,7 +1718,7 @@
alist = Fcons (Fcons (Q_hotspot_y, make_int (yhot)),
alist);
- alist = xbm_mask_file_munging (alist, filename, Qnil, console_type);
+ alist = xbm_mask_file_munging (alist, filename, Qt, console_type);
{
Lisp_Object result = alist_to_tagged_vector (Qxbm, alist);
Index: src/glyphs-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-gtk.c,v
retrieving revision 1.32
diff -u -u -t -b -B -w -r1.32 glyphs-gtk.c
--- src/glyphs-gtk.c 22 Nov 2005 11:24:44 -0000 1.32
+++ src/glyphs-gtk.c 5 Nov 2007 14:51:41 -0000
@@ -1614,7 +1614,7 @@
alist = Fcons (Fcons (Q_hotspot_y, make_int (yhot)),
alist);
- alist = xbm_mask_file_munging (alist, filename, Qnil, console_type);
+ alist = xbm_mask_file_munging (alist, filename, Qt, console_type);
{
Lisp_Object result = alist_to_tagged_vector (Qxbm, alist);
--
Resistance is futile. You will be jazzimilated.
Didier Verna, didier(a)lrde.epita.fr,
http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France Fax.+33 (1) 53 14 59 22 didier(a)xemacs.org
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches