Commit 49151c07 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wince: try to save up a bit on memory usage.

parent 75d3f2b6
......@@ -74,6 +74,10 @@ DllMain( HANDLE hModule, DWORD fdwReason, LPVOID lpReserved )
}
#endif
/* Global variables used by _TOMB() / _FROMB() */
wchar_t pwsz_mbtow_wince[2048];
char psz_wtomb_wince[2048];
/*****************************************************************************
* Open: initialize interface
*****************************************************************************/
......
......@@ -503,19 +503,19 @@ protected:
* A small helper function for utf8 <-> unicode conversions
*****************************************************************************/
#ifdef UNICODE
static wchar_t pwsz_mbtow[2048];
static char psz_wtomb[2048];
extern wchar_t pwsz_mbtow_wince[2048];
extern char psz_wtomb_wince[2048];
static inline wchar_t *_FROMMB( const char *psz_in )
{
mbstowcs( pwsz_mbtow, psz_in, 2048 );
pwsz_mbtow[2048-1] = 0;
return pwsz_mbtow;
mbstowcs( pwsz_mbtow_wince, psz_in, 2048 );
pwsz_mbtow_wince[2048-1] = 0;
return pwsz_mbtow_wince;
}
static inline char *_TOMB( const wchar_t *pwsz_in )
{
wcstombs( psz_wtomb, pwsz_in, 2048 );
psz_wtomb[2048-1] = 0;
return psz_wtomb;
wcstombs( psz_wtomb_wince, pwsz_in, 2048 );
psz_wtomb_wince[2048-1] = 0;
return psz_wtomb_wince;
}
#else
# define _FROMMB(a) a
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment