# HG changeset patch # User aidan # Date 1165831470 0 # Node ID e1f65870f845f512d35dd93169a2650a49e72a2c # Parent 460f57788910b1e81a1535ef5f687e2edde218d6 [xemacs-hg @ 2006-12-11 10:04:27 by aidan] 2006-12-11 Aidan Kehoe * glyphs-eimage.c (png_warning_func): * glyphs-eimage.c (png_instantiate): * glyphs-eimage.c (tiff_warning_func): Decode external binary data as such before passing it to warn_when_safe(). diff -r 460f57788910 -r e1f65870f845 src/ChangeLog --- a/src/ChangeLog Sun Dec 10 22:51:10 2006 +0000 +++ b/src/ChangeLog Mon Dec 11 10:04:30 2006 +0000 @@ -1,3 +1,11 @@ +2006-12-11 Aidan Kehoe + + * glyphs-eimage.c (png_warning_func): + * glyphs-eimage.c (png_instantiate): + * glyphs-eimage.c (tiff_warning_func): + Decode external binary data as such before passing it to + warn_when_safe(). + 2006-12-09 Vin Shelton * sound.c (init_native_sound): Fix typo in call to GTK_DEVICE diff -r 460f57788910 -r e1f65870f845 src/glyphs-eimage.c --- a/src/glyphs-eimage.c Sun Dec 10 22:51:10 2006 +0000 +++ b/src/glyphs-eimage.c Mon Dec 11 10:04:30 2006 +0000 @@ -827,7 +827,10 @@ static void png_warning_func (png_structp UNUSED (png_ptr), png_const_charp msg) { - warn_when_safe (Qpng, Qinfo, "%s", msg); + DECLARE_EISTRING (eimsg); + + eicpy_ext(eimsg, msg, Qbinary); + warn_when_safe (Qpng, Qinfo, "%s", eidata(eimsg)); } struct png_unwind_data @@ -1018,16 +1021,21 @@ unobtrusive. */ { int i; + DECLARE_EISTRING (key); + DECLARE_EISTRING (text); for (i = 0 ; i < info_ptr->num_text ; i++) { /* How paranoid do I have to be about no trailing NULLs, and using (int)info_ptr->text[i].text_length, and strncpy and a temp string somewhere? */ + eireset(key); + eireset(text); + eicpy_ext(key, info_ptr->text[i].key, Qbinary); + eicpy_ext(text, info_ptr->text[i].text, Qbinary); warn_when_safe (Qpng, Qinfo, "%s - %s", - info_ptr->text[i].key, - info_ptr->text[i].text); + eidata(key), eidata(text)); } } #endif @@ -1221,6 +1229,8 @@ #else char warn_str[1024]; #endif + DECLARE_EISTRING (eimodule); + DECLARE_EISTRING (eiwarnstr); va_start (vargs, fmt); #ifdef HAVE_VSNPRINTF @@ -1229,8 +1239,13 @@ vsprintf (warn_str, fmt, vargs); #endif va_end (vargs); + + eicpy_ext(eimodule, module, Qbinary); + eicpy_ext(eiwarnstr, warn_str, Qbinary); + warn_when_safe (Qtiff, Qinfo, "%s - %s", - module, warn_str); + eidata(eimodule), + eidata(eiwarnstr)); } static void