summaryrefslogtreecommitdiff
path: root/src/Fl_Preferences.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-03-29 09:29:51 +0000
committerManolo Gouy <Manolo>2016-03-29 09:29:51 +0000
commit4fcefc68f8cf9c2648c7140a08fa492c29896c3f (patch)
tree0b21a8db3670e0a410fabb83e0cda5d5fe769b61 /src/Fl_Preferences.cxx
parent21655099a71718f7671e634a9b4c4079d135cfaf (diff)
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
Diffstat (limited to 'src/Fl_Preferences.cxx')
-rw-r--r--src/Fl_Preferences.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
index 382186949..2b9473f76 100644
--- a/src/Fl_Preferences.cxx
+++ b/src/Fl_Preferences.cxx
@@ -1010,15 +1010,15 @@ Fl_Preferences::RootNode::RootNode( Fl_Preferences *prefs, Root root, const char
strcpy(filename, "C:\\FLTK");
} else {
#if 0
- xchar *b = (xchar*)_wcsdup((xchar *)filename);
+ wchar_t *b = (wchar_t*)_wcsdup((wchar_t *)filename);
#else
// cygwin does not come with _wcsdup. Use malloc + wcscpy.
// For implementation of wcsdup functionality See
// - http://linenum.info/p/glibc/2.7/wcsmbs/wcsdup.c
- xchar *b = (xchar*) malloc((wcslen((xchar *) filename) + 1) * sizeof(xchar));
- wcscpy(b, (xchar *) filename);
+ wchar_t *b = (wchar_t*) malloc((wcslen((wchar_t *) filename) + 1) * sizeof(wchar_t));
+ wcscpy(b, (wchar_t *) filename);
#endif
- // filename[fl_unicode2utf(b, wcslen((xchar*)b), filename)] = 0;
+ // filename[fl_unicode2utf(b, wcslen((wchar_t*)b), filename)] = 0;
unsigned len = fl_utf8fromwc(filename, (FL_PATH_MAX-1), b, (unsigned) wcslen(b));
filename[len] = 0;
free(b);