(Yes, this could be done more elegantly.)
src/ChangeLog addition:
2006-05-07 Aidan Kehoe <kehoea(a)parhasard.net>
* file-coding.c (output_bytes_in_ascii_and_hex):
Pass stderr_out internally-formatted data, don't use an external
format.
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: src/file-coding.c
Index: src/file-coding.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/file-coding.c,v
retrieving revision 1.52
diff -u -u -r1.52 file-coding.c
--- src/file-coding.c 2006/03/26 13:05:17 1.52
+++ src/file-coding.c 2006/05/07 12:49:51
@@ -3370,6 +3370,8 @@
UExtbyte *ascii = alloca_array (UExtbyte, n + 1);
UExtbyte *hex = alloca_array (UExtbyte, 3 * n + 1);
int i;
+ DECLARE_EISTRING (eistr_ascii);
+ DECLARE_EISTRING (eistr_hex);
for (i = 0; i < n; i++)
{
@@ -3384,7 +3386,11 @@
}
ascii[i] = '\0';
hex[3 * i - 1] = '\0';
- stderr_out ("%s %s", ascii, hex);
+
+ eicpy_ext(eistr_hex, hex, Qbinary);
+ eicpy_ext(eistr_ascii, ascii, Qbinary);
+
+ stderr_out ("%s %s", eidata(eistr_ascii), eidata(eistr_hex));
}
#endif /* DEBUG_XEMACS */
--
Aidan Kehoe,
http://www.parhasard.net/