Hi, Vin, thank you for the report!
Ar an tríú lá is fiche de mí Bealtaine, scríobh Vin Shelton:
> UExtbyte *ascii = alloca_array (UExtbyte, n + 1);
> UExtbyte *hex = alloca_array (UExtbyte, 3 * n + 1);
>
> [...]
>
> - 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 */
Unfortunately, the 21.5 build is now failing on windows, this is using
Visual Studio 6.0.
e:\cygwin\usr\local\src\xemacs-21.5-2006-05-23\src\file-coding.c(3390)
: error C2440: 'initializing' : cannot convert from 'unsigned char *'
to 'const char *'
Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
Whisky tango foxtrot, over. UExtbyte is as much an unsigned char as is
Ibyte, and it worked with the former and not with the latter?
Anyway. I’m installing GCC 4, which warns about this sort of thing and will
allow me to avoid it in the future. For this particular issue, the below
should work; please tell me if your builds fail again after it being
committed. (The GCC 4 installation is not yet finished.)
APPROVE COMMIT
NOTE: This patch has been committed.
src/ChangeLog addition:
2006-05-23 Aidan Kehoe <kehoea(a)parhasard.net>
* file-coding.c (output_bytes_in_ascii_and_hex):
Fix a Win32 build failure introduced by my last commit.
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.53
diff -u -u -r1.53 file-coding.c
--- src/file-coding.c 2006/05/22 20:28:01 1.53
+++ src/file-coding.c 2006/05/23 19:25:27
@@ -3390,7 +3390,8 @@
eicpy_ext(eistr_hex, hex, Qbinary);
eicpy_ext(eistr_ascii, ascii, Qbinary);
- stderr_out ("%s %s", eidata(eistr_ascii), eidata(eistr_hex));
+ stderr_out ("%s %s", (const CIbyte *)(eidata(eistr_ascii)),
+ (const CIbyte *)eidata(eistr_hex));
}
#endif /* DEBUG_XEMACS */
--
Aidan Kehoe,
http://www.parhasard.net/