From 4fcefc68f8cf9c2648c7140a08fa492c29896c3f Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 29 Mar 2016 09:29:51 +0000 Subject: Remove the platform-dependent type xchar File fl_utf8.h defines the xchar type with a platform-dependent value (wchar_t or unsigned short). But it is used exclusively by WIN32 code (0 use in cross-platform code, 0 use in APPLE or in USE_X11 code). Thus, we can just get rid of this type and replace it by wchar_t where it is used. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11459 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_call_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fl_call_main.c') diff --git a/src/fl_call_main.c b/src/fl_call_main.c index 8c21c9307..2f8e6b0d5 100644 --- a/src/fl_call_main.c +++ b/src/fl_call_main.c @@ -60,11 +60,11 @@ extern int main(int, char *[]); /* static int mbcs2utf(const char *s, int l, char *dst, unsigned dstlen) */ static int mbcs2utf(const char *s, int l, char *dst) { - static xchar *mbwbuf; + static wchar_t *mbwbuf; unsigned dstlen = 0; if (!s) return 0; dstlen = (l * 6) + 6; - mbwbuf = (xchar*)malloc(dstlen * sizeof(xchar)); + mbwbuf = (wchar_t*)malloc(dstlen * sizeof(wchar_t)); l = (int) mbstowcs(mbwbuf, s, l); /* l = fl_unicode2utf(mbwbuf, l, dst); */ l = fl_utf8fromwc(dst, dstlen, mbwbuf, l); -- cgit v1.2.3