added qse_cmgr_id_t, qse_setdflcmgrbyid(), qse_findcmgrbyid()

deleted qse_slmbcmgr, qse_utf8cmgr, qse_cp949cmgr, qse_cp950cmgr
added --enabled-more-cmgrs to configure
This commit is contained in:
hyung-hwan 2012-09-05 22:37:55 +00:00
parent 464f763307
commit 69b118fcbf
37 changed files with 205 additions and 107 deletions

View File

@ -753,6 +753,7 @@ static int comparg (int argc, qse_char_t* argv[], struct arg_t* arg)
if (arg->script_cmgr == QSE_NULL) if (arg->script_cmgr == QSE_NULL)
{ {
print_error (QSE_T("unknown script encoding - %s\n"), opt.arg); print_error (QSE_T("unknown script encoding - %s\n"), opt.arg);
oops_ret = 3;
goto oops; goto oops;
} }
} }
@ -762,6 +763,7 @@ static int comparg (int argc, qse_char_t* argv[], struct arg_t* arg)
if (arg->console_cmgr == QSE_NULL) if (arg->console_cmgr == QSE_NULL)
{ {
print_error (QSE_T("unknown console encoding - %s\n"), opt.arg); print_error (QSE_T("unknown console encoding - %s\n"), opt.arg);
oops_ret = 3;
goto oops; goto oops;
} }
} }
@ -776,7 +778,8 @@ static int comparg (int argc, qse_char_t* argv[], struct arg_t* arg)
arg->opton |= opttab[i].opt; arg->opton |= opttab[i].opt;
else else
{ {
print_error (QSE_T("invalid value for '%s' - '%s'\n"), opt.lngopt, opt.arg); print_error (QSE_T("invalid value '%s' for '%s' - use 'on' or 'off'\n"), opt.arg, opt.lngopt);
oops_ret = 3;
goto oops; goto oops;
} }
break; break;
@ -994,6 +997,7 @@ static int awk_main (int argc, qse_char_t* argv[])
return i; return i;
} }
if (i == 2) return 0; if (i == 2) return 0;
if (i == 3) return -1;
psin.type = arg.ist; psin.type = arg.ist;
if (arg.ist == QSE_AWK_PARSESTD_STR) if (arg.ist == QSE_AWK_PARSESTD_STR)
@ -1169,7 +1173,7 @@ int qse_main (int argc, qse_achar_t* argv[])
{ {
sprintf (locale, ".%u", (unsigned int)codepage); sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale); setlocale (LC_ALL, locale);
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
} }
if (WSAStartup (MAKEWORD(2,0), &wsadata) != 0) if (WSAStartup (MAKEWORD(2,0), &wsadata) != 0)
@ -1180,7 +1184,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#else #else
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
#endif #endif
#if defined(ENABLE_MPI) #if defined(ENABLE_MPI)

View File

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

48
qse/configure vendored
View File

@ -785,6 +785,7 @@ with_gnu_ld
with_sysroot with_sysroot
enable_libtool_lock enable_libtool_lock
enable_wchar enable_wchar
enable_more_cmgrs
enable_syscall enable_syscall
enable_debug enable_debug
enable_cxx enable_cxx
@ -1433,6 +1434,8 @@ Optional Features:
--disable-libtool-lock avoid locking (might break parallel builds) --disable-libtool-lock avoid locking (might break parallel builds)
--enable-wchar use wchar_t a default charater type when enabled --enable-wchar use wchar_t a default charater type when enabled
(default. yes) (default. yes)
--enable-more-cmgrs include more built-in cmgrs like cp949 and cp950
when enabled (default. yes)
--enable-syscall use the syscall() function to call system calls --enable-syscall use the syscall() function to call system calls
(default. no) (default. no)
--enable-debug build the library in the debug mode (default. no) --enable-debug build the library in the debug mode (default. no)
@ -16689,15 +16692,19 @@ _ACEOF
fi fi
done done
if test "$ac_cv_func_SSL_library_init" = "no" if test "$ac_cv_func_SSL_library_init" = "yes"
then then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
$as_echo_n "checking for sendfile in -lsendfile... " >&6; } $as_echo "#define HAVE_SSL 1" >>confdefs.h
if ${ac_cv_lib_sendfile_sendfile+:} false; then :
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
ac_check_lib_save_LIBS=$LIBS ac_check_lib_save_LIBS=$LIBS
LIBS="-lsendfile $LIBS" LIBS="-lssl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
@ -16707,33 +16714,36 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
#endif #endif
char sendfile (); char SSL_library_init ();
int int
main () main ()
{ {
return sendfile (); return SSL_library_init ();
; ;
return 0; return 0;
} }
_ACEOF _ACEOF
if ac_fn_c_try_link "$LINENO"; then : if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_sendfile_sendfile=yes ac_cv_lib_ssl_SSL_library_init=yes
else else
ac_cv_lib_sendfile_sendfile=no ac_cv_lib_ssl_SSL_library_init=no
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS LIBS=$ac_check_lib_save_LIBS
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; } $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then : if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
SSL_LIBS="-lssl" SSL_LIBS="-lssl"
$as_echo "#define HAVE_SSL 1" >>confdefs.h $as_echo "#define HAVE_SSL 1" >>confdefs.h
$as_echo "#define HAVE_SSL_LIBRARY_INIT 1" >>confdefs.h
fi fi
fi fi
@ -18527,6 +18537,20 @@ else
fi fi
# Check whether --enable-more-cmgrs was given.
if test "${enable_more_cmgrs+set}" = set; then :
enableval=$enable_more_cmgrs; enable_more_cmgrs_is=$enableval
else
enable_more_cmgrs_is=yes
fi
if test "${enable_more_cmgrs_is}" = "yes"
then
$as_echo "#define QSE_INCLUDE_MORE_CMGRS /**/" >>confdefs.h
fi
# Check whether --enable-syscall was given. # Check whether --enable-syscall was given.
if test "${enable_syscall+set}" = set; then : if test "${enable_syscall+set}" = set; then :
enableval=$enable_syscall; enable_syscall_is=$enableval enableval=$enable_syscall; enable_syscall_is=$enableval

View File

@ -152,6 +152,7 @@ if test "$ac_cv_func_sendfile" = "no"
then then
AC_CHECK_LIB([sendfile], [sendfile], [ AC_CHECK_LIB([sendfile], [sendfile], [
SENDFILE_LIBS="-lsendfile" SENDFILE_LIBS="-lsendfile"
dnl only for consistency with AC_CHECK_FUNCS
AC_DEFINE(HAVE_SENDFILE, 1) AC_DEFINE(HAVE_SENDFILE, 1)
]) ])
fi fi
@ -159,6 +160,7 @@ if test "$ac_cv_func_sendfile64" = "no"
then then
AC_CHECK_LIB([sendfile], [sendfile64], [ AC_CHECK_LIB([sendfile], [sendfile64], [
SENDFILE_LIBS="-lsendfile" SENDFILE_LIBS="-lsendfile"
dnl only for consistency with AC_CHECK_FUNCS
AC_DEFINE(HAVE_SENDFILE64, 1) AC_DEFINE(HAVE_SENDFILE64, 1)
]) ])
fi fi
@ -166,6 +168,7 @@ if test "$ac_cv_func_sendfilev" = "no"
then then
AC_CHECK_LIB([sendfile], [sendfilev], [ AC_CHECK_LIB([sendfile], [sendfilev], [
SENDFILE_LIBS="-lsendfile" SENDFILE_LIBS="-lsendfile"
dnl only for consistency with AC_CHECK_FUNCS
AC_DEFINE(HAVE_SENDFILEV, 1) AC_DEFINE(HAVE_SENDFILEV, 1)
]) ])
fi fi
@ -173,6 +176,7 @@ if test "$ac_cv_func_sendfilev64" = "no"
then then
AC_CHECK_LIB([sendfile], [sendfilev64], [ AC_CHECK_LIB([sendfile], [sendfilev64], [
SENDFILE_LIBS="-lsendfile" SENDFILE_LIBS="-lsendfile"
dnl only for consistency with AC_CHECK_FUNCS
AC_DEFINE(HAVE_SENDFILEV64, 1) AC_DEFINE(HAVE_SENDFILEV64, 1)
]) ])
fi fi
@ -193,11 +197,16 @@ AC_SUBST(UNICOWS_LIBS)
dnl check for an SSL library dnl check for an SSL library
AC_CHECK_FUNCS([SSL_library_init]) AC_CHECK_FUNCS([SSL_library_init])
if test "$ac_cv_func_SSL_library_init" = "no" if test "$ac_cv_func_SSL_library_init" = "yes"
then then
AC_CHECK_LIB([sendfile], [sendfile], [ AC_DEFINE(HAVE_SSL, 1, [ssl support])
else
AC_CHECK_LIB([ssl], [SSL_library_init], [
SSL_LIBS="-lssl" SSL_LIBS="-lssl"
AC_DEFINE(HAVE_SSL, 1, [ssl support]) AC_DEFINE(HAVE_SSL, 1, [ssl support])
dnl only for consistency with AC_CHECK_FUNCS
AC_DEFINE(HAVE_SSL_LIBRARY_INIT, 1)
]) ])
fi fi
AC_SUBST(SSL_LIBS) AC_SUBST(SSL_LIBS)
@ -304,6 +313,13 @@ else
fi fi
AM_CONDITIONAL(WCHAR, test "${enable_wchar_is}" = "yes" ) AM_CONDITIONAL(WCHAR, test "${enable_wchar_is}" = "yes" )
AC_ARG_ENABLE([more-cmgrs], [AS_HELP_STRING([--enable-more-cmgrs],[include more built-in cmgrs like cp949 and cp950 when enabled (default. yes)])],
enable_more_cmgrs_is=$enableval,enable_more_cmgrs_is=yes)
if test "${enable_more_cmgrs_is}" = "yes"
then
AC_DEFINE([QSE_INCLUDE_MORE_CMGRS],[],[include more built-in cmgrs like cp949 and cp950])
fi
AC_ARG_ENABLE([syscall], [AS_HELP_STRING([--enable-syscall],[use the syscall() function to call system calls (default. no)])], AC_ARG_ENABLE([syscall], [AS_HELP_STRING([--enable-syscall],[use the syscall() function to call system calls (default. no)])],
enable_syscall_is=$enableval,enable_syscall_is=no) enable_syscall_is=$enableval,enable_syscall_is=no)
if test "${enable_syscall_is}" = "yes" if test "${enable_syscall_is}" = "yes"

View File

@ -30,20 +30,33 @@
typedef qse_cmgr_t* (*qse_cmgr_finder_t) (const qse_char_t* name); typedef qse_cmgr_t* (*qse_cmgr_finder_t) (const qse_char_t* name);
/**
* The qse_cmgr_id_t type defines the builtin-in cmgr IDs.
*/
enum qse_cmgr_id_t
{
QSE_CMGR_SLMB,
#if defined(QSE_INCLUDE_MORE_CMGRS)
QSE_CMGR_CP949,
QSE_CMGR_CP950,
#endif
QSE_CMGR_UTF8
};
typedef enum qse_cmgr_id_t qse_cmgr_id_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* --------------------------------------------------- */ /**
/* BUILTIN CMGR */ * The qse_findcmgrbyid() function returns a built-in cmgr for a given @a id.
/* --------------------------------------------------- */ */
extern qse_cmgr_t* qse_slmbcmgr; qse_cmgr_t* qse_findcmgrbyid (
extern qse_cmgr_t* qse_utf8cmgr; qse_cmgr_id_t id
extern qse_cmgr_t* qse_cp949cmgr; );
extern qse_cmgr_t* qse_cp950cmgr;
/** /**
* The qse_getfindcmgr() function find a builtin cmgr matching a given * The qse_getfindcmgr() function find a built-in cmgr matching a given
* @a name and returns it. It returns #QSE_NULL if no match is found. * @a name and returns it. It returns #QSE_NULL if no match is found.
* The @a name can be one of "utf8", "slmb", "cp949", "cp950", and an * The @a name can be one of "utf8", "slmb", "cp949", "cp950", and an
* empty string. Calling this function with an empty string is the same * empty string. Calling this function with an empty string is the same
@ -72,6 +85,14 @@ void qse_setdflcmgr (
qse_cmgr_t* cmgr qse_cmgr_t* cmgr
); );
/**
* The qse_setdflcmgrbyid() function finds a built-in
* cmgr for the @a id and sets it as a default cmgr.
*/
void qse_setdflcmgrbyid (
qse_cmgr_id_t id
);
/* --------------------------------------------------- */ /* --------------------------------------------------- */
/* STRING CONVERSION USING CMGR */ /* STRING CONVERSION USING CMGR */
/* --------------------------------------------------- */ /* --------------------------------------------------- */

View File

@ -434,6 +434,9 @@
/* Unknown Endian */ /* Unknown Endian */
#undef QSE_ENDIAN_UNKNOWN #undef QSE_ENDIAN_UNKNOWN
/* include more built-in cmgrs like cp949 and cp950 */
#undef QSE_INCLUDE_MORE_CMGRS
/* MB_LEN_MAX */ /* MB_LEN_MAX */
#undef QSE_MBLEN_MAX #undef QSE_MBLEN_MAX

View File

@ -39,11 +39,7 @@ static qse_cmgr_t builtin_cmgr[] =
qse_slwctoslmb qse_slwctoslmb
}, },
{ #if defined(QSE_INCLUDE_MORE_CMGRS)
qse_utf8touc,
qse_uctoutf8
},
{ {
qse_cp949touc, qse_cp949touc,
qse_uctocp949 qse_uctocp949
@ -52,15 +48,16 @@ static qse_cmgr_t builtin_cmgr[] =
{ {
qse_cp950touc, qse_cp950touc,
qse_uctocp950 qse_uctocp950
},
#endif
{
qse_utf8touc,
qse_uctoutf8
} }
}; };
qse_cmgr_t* qse_slmbcmgr = &builtin_cmgr[0]; static qse_cmgr_t* dfl_cmgr = &builtin_cmgr[QSE_CMGR_SLMB];
qse_cmgr_t* qse_utf8cmgr = &builtin_cmgr[1];
qse_cmgr_t* qse_cp949cmgr = &builtin_cmgr[2];
qse_cmgr_t* qse_cp950cmgr = &builtin_cmgr[3];
static qse_cmgr_t* dfl_cmgr = &builtin_cmgr[0];
static qse_cmgr_finder_t cmgr_finder = QSE_NULL; static qse_cmgr_finder_t cmgr_finder = QSE_NULL;
qse_cmgr_t* qse_getdflcmgr (void) qse_cmgr_t* qse_getdflcmgr (void)
@ -70,13 +67,41 @@ qse_cmgr_t* qse_getdflcmgr (void)
void qse_setdflcmgr (qse_cmgr_t* cmgr) void qse_setdflcmgr (qse_cmgr_t* cmgr)
{ {
dfl_cmgr = (cmgr? cmgr: &builtin_cmgr[0]); dfl_cmgr = (cmgr? cmgr: &builtin_cmgr[QSE_CMGR_SLMB]);
}
void qse_setdflcmgrbyid (qse_cmgr_id_t id)
{
qse_cmgr_t* cmgr = qse_findcmgrbyid (id);
dfl_cmgr = (cmgr? cmgr: &builtin_cmgr[QSE_CMGR_SLMB]);
}
qse_cmgr_t* qse_findcmgrbyid (qse_cmgr_id_t id)
{
if (id < 0 || id >= QSE_COUNTOF(builtin_cmgr)) return QSE_NULL;
return &builtin_cmgr[id];
} }
qse_cmgr_t* qse_findcmgr (const qse_char_t* name) qse_cmgr_t* qse_findcmgr (const qse_char_t* name)
{ {
static struct
{
const qse_char_t* name;
qse_cmgr_id_t id;
} tab[] =
{
{ QSE_T("utf8"), QSE_CMGR_UTF8 },
#if defined(QSE_INCLUDE_MORE_CMGRS)
{ QSE_T("cp949"), QSE_CMGR_CP949 },
{ QSE_T("cp950"), QSE_CMGR_CP950 },
#endif
{ QSE_T("slmb"), QSE_CMGR_UTF8 }
};
if (name) if (name)
{ {
qse_size_t i;
if (cmgr_finder) if (cmgr_finder)
{ {
qse_cmgr_t* cmgr; qse_cmgr_t* cmgr;
@ -85,11 +110,16 @@ qse_cmgr_t* qse_findcmgr (const qse_char_t* name)
} }
if (qse_strcasecmp(name, QSE_T("")) == 0) return dfl_cmgr; if (qse_strcasecmp(name, QSE_T("")) == 0) return dfl_cmgr;
if (qse_strcasecmp(name, QSE_T("utf8")) == 0) return qse_utf8cmgr;
if (qse_strcasecmp(name, QSE_T("cp949")) == 0) return qse_cp949cmgr; for (i = 0; i < QSE_COUNTOF(tab); i++)
if (qse_strcasecmp(name, QSE_T("cp950")) == 0) return qse_cp950cmgr; {
if (qse_strcasecmp(name, QSE_T("slmb")) == 0) return qse_slmbcmgr; if (qse_strcasecmp(name, tab[i].name) == 0)
{
return &builtin_cmgr[tab[i].id];
} }
}
}
return QSE_NULL; return QSE_NULL;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -68,11 +68,11 @@ int qse_main (int argc, qse_achar_t* argv[], qse_achar_t* envp[])
{ {
sprintf (locale, ".%u", (unsigned int)codepage); sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale); setlocale (LC_ALL, locale);
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
} }
#else #else
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
#endif #endif
return qse_runmainwithenv (argc, argv, envp, test_main); return qse_runmainwithenv (argc, argv, envp, test_main);
} }

View File

@ -88,11 +88,11 @@ int qse_main (int argc, qse_achar_t* argv[], qse_achar_t* envp[])
{ {
sprintf (locale, ".%u", (unsigned int)codepage); sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale); setlocale (LC_ALL, locale);
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
} }
#else #else
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
#endif #endif
return qse_runmainwithenv (argc, argv, envp, test_main); return qse_runmainwithenv (argc, argv, envp, test_main);
} }

View File

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

View File

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

View File

@ -200,11 +200,11 @@ int qse_main (int argc, qse_achar_t* argv[], qse_achar_t* envp[])
{ {
sprintf (locale, ".%u", (unsigned int)codepage); sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale); setlocale (LC_ALL, locale);
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
} }
#else #else
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
#endif #endif
return qse_runmainwithenv (argc, argv, envp, test_main); return qse_runmainwithenv (argc, argv, envp, test_main);
} }

View File

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

View File

@ -39,11 +39,11 @@ int qse_main (int argc, qse_achar_t* argv[], qse_achar_t* envp[])
{ {
sprintf (locale, ".%u", (unsigned int)codepage); sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale); setlocale (LC_ALL, locale);
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
} }
#else #else
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
#endif #endif
return qse_runmainwithenv (argc, argv, envp, test_main); return qse_runmainwithenv (argc, argv, envp, test_main);

View File

@ -225,11 +225,11 @@ int main ()
{ {
sprintf (locale, ".%u", (unsigned int)codepage); sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale); setlocale (LC_ALL, locale);
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
} }
#else #else
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
#endif #endif
qse_printf (QSE_T("--------------------------------------------------------------------------------\n")); qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));

View File

@ -305,11 +305,11 @@ int main ()
{ {
sprintf (locale, ".%u", (unsigned int)codepage); sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale); setlocale (LC_ALL, locale);
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
} }
#else #else
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
#endif #endif
qse_printf (QSE_T("--------------------------------------------------------------------------------\n")); qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));

View File

@ -165,11 +165,11 @@ int qse_main (int argc, qse_achar_t* argv[], qse_achar_t* envp[])
{ {
sprintf (locale, ".%u", (unsigned int)codepage); sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale); setlocale (LC_ALL, locale);
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
} }
#else #else
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
#endif #endif
return qse_runmainwithenv (argc, argv, envp, test_main); return qse_runmainwithenv (argc, argv, envp, test_main);
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -145,11 +145,11 @@ int main ()
{ {
sprintf (locale, ".%u", (unsigned int)codepage); sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale); setlocale (LC_ALL, locale);
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
} }
#else #else
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
#endif #endif
qse_printf (QSE_T("--------------------------------------------------------------------------------\n")); qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));

View File

@ -206,7 +206,7 @@ int main ()
{ {
sprintf (locale, ".%u", (unsigned int)codepage); sprintf (locale, ".%u", (unsigned int)codepage);
setlocale (LC_ALL, locale); setlocale (LC_ALL, locale);
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
} }
#if 0 #if 0
@ -219,7 +219,7 @@ int main ()
#else #else
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_setdflcmgr (qse_slmbcmgr); qse_setdflcmgrbyid (QSE_CMGR_SLMB);
#endif #endif
R (test1); R (test1);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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