changed qse_setdflcmgrbyid() and qse_setdflcmgr() to return the cmgr object set.

changed the default cmgr to either SLMB or UTF8 depending on the availability of underlying library functions
This commit is contained in:
hyung-hwan 2015-04-27 08:37:57 +00:00
parent 0a8e84add2
commit c6644d5b52
45 changed files with 107 additions and 94 deletions

View File

@ -1265,7 +1265,6 @@ int qse_main (int argc, qse_achar_t* argv[])
/* nothing special */
#endif
#if defined(_WIN32)
codepage = GetConsoleOutputCP();
if (codepage == CP_UTF8)
@ -1279,12 +1278,12 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/* qse_setdflcmgrbyid (QSE_CMGR_SLMB); */
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/* qse_setdflcmgrbyid (QSE_CMGR_SLMB); */
#endif
qse_openstdsios ();

View File

@ -2821,12 +2821,12 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -1014,7 +1014,7 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
if (WSAStartup (MAKEWORD(2,0), &wsadata) != 0)
@ -1025,7 +1025,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -1065,11 +1065,11 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -640,11 +640,11 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -103,15 +103,15 @@ QSE_EXPORT qse_cmgr_t* qse_getdflcmgr (
void
);
QSE_EXPORT void qse_setdflcmgr (
QSE_EXPORT qse_cmgr_t* qse_setdflcmgr (
qse_cmgr_t* cmgr
);
/**
* The qse_setdflcmgrbyid() function finds a built-in
* cmgr for the \a id and sets it as a default cmgr.
* The qse_setdflcmgrbyid() function finds a built-in cmgr for the \a id and
* sets it as a default cmgr. It returns the pointer to the cmgr object set.
*/
QSE_EXPORT void qse_setdflcmgrbyid (
QSE_EXPORT qse_cmgr_t* qse_setdflcmgrbyid (
qse_cmgr_id_t id
);

View File

@ -50,7 +50,15 @@ static qse_cmgr_t builtin_cmgr[] =
#endif
};
static qse_cmgr_t* dfl_cmgr = &builtin_cmgr[QSE_CMGR_SLMB];
#if defined(_WIN32) && defined(HAVE_WCRTOMB)
/* read the comment at the bottom of qse_slwcrtoslmb() in slmb.c
* for the condition above. */
# define DEFAULT_CMGR QSE_CMGR_SLMB
#else
# define DEFAULT_CMGR QSE_CMGR_UTF8
#endif
static qse_cmgr_t* dfl_cmgr = &builtin_cmgr[DEFAULT_CMGR];
static qse_cmgr_finder_t cmgr_finder = QSE_NULL;
qse_cmgr_t* qse_getdflcmgr (void)
@ -58,15 +66,17 @@ qse_cmgr_t* qse_getdflcmgr (void)
return dfl_cmgr;
}
void qse_setdflcmgr (qse_cmgr_t* cmgr)
qse_cmgr_t* qse_setdflcmgr (qse_cmgr_t* cmgr)
{
dfl_cmgr = (cmgr? cmgr: &builtin_cmgr[QSE_CMGR_SLMB]);
dfl_cmgr = (cmgr? cmgr: &builtin_cmgr[DEFAULT_CMGR]);
return dfl_cmgr;
}
void qse_setdflcmgrbyid (qse_cmgr_id_t id)
qse_cmgr_t* qse_setdflcmgrbyid (qse_cmgr_id_t id)
{
qse_cmgr_t* cmgr = qse_findcmgrbyid (id);
dfl_cmgr = (cmgr? cmgr: &builtin_cmgr[QSE_CMGR_SLMB]);
dfl_cmgr = (cmgr? cmgr: &builtin_cmgr[DEFAULT_CMGR]);
return dfl_cmgr;
}
qse_cmgr_t* qse_findcmgrbyid (qse_cmgr_id_t id)

View File

@ -815,6 +815,7 @@ static qse_ssize_t file_output (
static qse_sio_t* sio_stdout = QSE_NULL;
static qse_sio_t* sio_stderr = QSE_NULL;
/* TODO: add sio_stdin, qse_getmbs, etc */
int qse_openstdsios (void)
{

View File

@ -104,6 +104,9 @@ qse_size_t qse_slwcrtoslmb (
#else
/* not supported */
/* make sure to update the precessor condition to set DEFAULT_CMGR
* in mbwc.c when you have different implementation here */
return 0;
#endif
}

View File

@ -24,10 +24,10 @@ void init_awk_sample_locale (void)
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
}

View File

@ -174,11 +174,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
}

View File

@ -471,7 +471,7 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
if (WSAStartup (MAKEWORD(2,0), &wsadata) != 0)
@ -482,7 +482,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
}

View File

@ -104,11 +104,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
}

View File

@ -132,11 +132,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
}

View File

@ -239,11 +239,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
}

View File

@ -40,11 +40,11 @@ int main ()
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif

View File

@ -113,11 +113,11 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -70,11 +70,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
x = qse_runmain (argc, argv, test_main);

View File

@ -90,11 +90,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
x = qse_runmain (argc, argv, test_main);

View File

@ -89,11 +89,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -118,11 +118,11 @@ int main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -116,11 +116,11 @@ int main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -54,11 +54,11 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -201,11 +201,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
x = qse_runmain (argc, argv, test_main);

View File

@ -36,11 +36,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -41,11 +41,11 @@ int qse_main (int argc, qse_achar_t* argv[], qse_achar_t* envp[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -224,11 +224,11 @@ int main ()
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -304,11 +304,11 @@ int main ()
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -167,11 +167,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
x = qse_runmain (argc, argv, test_main);

View File

@ -82,11 +82,11 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
ret = qse_runmain (argc, argv, test_main);

View File

@ -94,11 +94,11 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
ret = qse_runmain (argc, argv, test_main);

View File

@ -79,11 +79,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -83,11 +83,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
x = qse_runmain (argc, argv, rex_main);

View File

@ -106,11 +106,11 @@ int main ()
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
g_out = qse_sio_openstd (QSE_MMGR_GETDFL(), 0, QSE_SIO_STDOUT, QSE_SIO_WRITE | QSE_SIO_IGNOREMBWCERR);

View File

@ -156,11 +156,11 @@ int main ()
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
setlocale (LC_ALL, "");

View File

@ -179,11 +179,11 @@ int main ()
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
g_out = qse_sio_openstd (QSE_MMGR_GETDFL(), 0, QSE_SIO_STDOUT, QSE_SIO_WRITE | QSE_SIO_IGNOREMBWCERR);

View File

@ -208,7 +208,7 @@ int main ()
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#if 0
@ -221,7 +221,7 @@ int main ()
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -95,11 +95,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();

View File

@ -90,11 +90,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
x = qse_runmain (argc, argv, test_main);

View File

@ -129,11 +129,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
x = qse_runmain (argc, argv, test_main);

View File

@ -122,7 +122,7 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
if (WSAStartup (MAKEWORD(2,0), &wsadata) != 0)
@ -133,7 +133,7 @@ int qse_main (int argc, qse_achar_t* argv[])
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
#if defined(HAVE_SSL)

View File

@ -257,7 +257,7 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
@ -269,7 +269,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
#if defined(HAVE_SSL)

View File

@ -885,11 +885,11 @@ int qse_main (int argc, qse_achar_t* argv[])
{
sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
return qse_runmain (argc, argv, upxd_main);

View File

@ -24,10 +24,10 @@ void init_sed_sample_locale (void)
qse_fmtuintmaxtombs (locale, QSE_COUNTOF(locale),
codepage, 10, -1, QSE_MT('\0'), QSE_MT("."));
setlocale (LC_ALL, locale);
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
}
#else
setlocale (LC_ALL, "");
qse_setdflcmgrbyid (QSE_CMGR_SLMB);
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
}