diff options
| author | Manolo Gouy <Manolo> | 2016-03-29 09:29:51 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-29 09:29:51 +0000 |
| commit | 4fcefc68f8cf9c2648c7140a08fa492c29896c3f (patch) | |
| tree | 0b21a8db3670e0a410fabb83e0cda5d5fe769b61 /src/Fl_win32.cxx | |
| parent | 21655099a71718f7671e634a9b4c4079d135cfaf (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_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index d9edce48f..6df0fb769 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1269,7 +1269,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar static char buffer[1024]; if (uMsg == WM_CHAR || uMsg == WM_SYSCHAR) { - xchar u = (xchar) wParam; + wchar_t u = (wchar_t) wParam; // Fl::e_length = fl_unicode2utf(&u, 1, buffer); Fl::e_length = fl_utf8fromwc(buffer, 1024, &u, 1); buffer[Fl::e_length] = 0; @@ -1327,7 +1327,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar } else if ((lParam & (1<<31))==0) { #ifdef FLTK_PREVIEW_DEAD_KEYS if ((lParam & (1<<24))==0) { // clear if dead key (always?) - xchar u = (xchar) wParam; + wchar_t u = (wchar_t) wParam; Fl::e_length = fl_utf8fromwc(buffer, 1024, &u, 1); buffer[Fl::e_length] = 0; } else { // set if "extended key" (never printable?) @@ -1831,7 +1831,7 @@ Fl_X* Fl_X::make(Fl_Window* w) { if (w->label()) { size_t l = strlen(w->label()); // lab = (WCHAR*) malloc((l + 1) * sizeof(short)); -// l = fl_utf2unicode((unsigned char*)w->label(), l, (xchar*)lab); +// l = fl_utf2unicode((unsigned char*)w->label(), l, (wchar_t*)lab); // lab[l] = 0; unsigned wlen = fl_utf8toUtf16(w->label(), (unsigned) l, NULL, 0); // Pass NULL to query length wlen++; |
