renamed some sio functions

This commit is contained in:
hyung-hwan 2017-09-16 08:54:25 +00:00
parent 3ac8bc1f49
commit 2cc8894570
79 changed files with 181 additions and 166 deletions

View File

@ -1217,7 +1217,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/* qse_setdflcmgrbyid (QSE_CMGR_SLMB); */
#endif
qse_openstdsios ();
qse_open_stdsios ();
#if defined(_WIN32)
if (WSAStartup (MAKEWORD(2,0), &wsadata) != 0)
@ -1247,7 +1247,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
oops:
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -2866,7 +2866,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
#if defined(__DOS__)
old_keyboard_handler = _dos_getvect (0x09);
@ -2925,6 +2925,6 @@ oops:
if (old_keyboard_handler)
_dos_setvect (0x09, old_keyboard_handler);
#endif
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -1035,9 +1035,9 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
ret = qse_runmain (argc, argv, httpd_main);
qse_closestdsios ();
qse_close_stdsios ();
#if defined(_WIN32)

View File

@ -1007,9 +1007,9 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
ret = qse_runmain (argc, argv, sed_main);
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -595,9 +595,9 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, xli_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -54,7 +54,7 @@
* qse_htb_t* s1;
* int i;
*
* qse_openstdsios ();
* qse_open_stdsios ();
* s1 = qse_htb_open (QSE_MMGR_GETDFL(), 0, 30, 75, 1, 1); // error handling skipped
* qse_htb_setstyle (s1, qse_gethtbstyle(QSE_HTB_STYLE_INLINE_COPIERS));
*
@ -67,7 +67,7 @@
* qse_htb_walk (s1, walk, QSE_NULL);
*
* qse_htb_close (s1);
* qse_closestdsios ();
* qse_close_stdsios ();
* return 0;
* }
* @endcode
@ -544,7 +544,7 @@ QSE_EXPORT qse_htb_pair_t* qse_htb_update (
* qse_char_t* keys[] = { QSE_T("one"), QSE_T("two"), QSE_T("three") };
* qse_char_t* vals[] = { QSE_T("1"), QSE_T("2"), QSE_T("3"), QSE_T("4"), QSE_T("5") };
*
* qse_openstdsios ();
* qse_open_stdsios ();
* s1 = qse_htb_open (
* QSE_MMGR_GETDFL(), 0, 10, 70,
* QSE_SIZEOF(qse_char_t), QSE_SIZEOF(qse_char_t)
@ -563,7 +563,7 @@ QSE_EXPORT qse_htb_pair_t* qse_htb_update (
* qse_htb_walk (s1, print_map_pair, QSE_NULL);
*
* qse_htb_close (s1);
* qse_closestdsios ();
* qse_close_stdsios ();
* return 0;
* }
* @endcode

View File

@ -315,7 +315,7 @@ QSE_EXPORT int qse_fio_unlock (
int flags
);
QSE_EXPORT int qse_getstdfiohandle (
QSE_EXPORT int qse_get_stdfiohandle (
qse_fio_std_t std,
qse_fio_hnd_t* hnd
);

View File

@ -35,8 +35,6 @@
#include <stdarg.h>
/* TODO: improve this and complete win32 portion */
#define QSE_LOG_MSG_MAX 10204
#define QSE_LOG_IDENT_MAX 32
#define QSE_LOG_MASK_PRIORITY 0x00000FFFUL

View File

@ -390,10 +390,26 @@ QSE_EXPORT int qse_sio_seek (
qse_sio_ori_t origin
);
QSE_EXPORT int qse_openstdsios (void);
QSE_EXPORT void qse_closestdsios (void);
QSE_EXPORT qse_sio_t* qse_getstdout (void);
QSE_EXPORT qse_sio_t* qse_getstderr (void);
QSE_EXPORT int qse_open_stdsios (
void
);
QSE_EXPORT void qse_close_stdsios (
void
);
QSE_EXPORT qse_sio_t* qse_get_stdout (
void
);
QSE_EXPORT qse_sio_t* qse_get_stderr (
void
);
QSE_EXPORT qse_ssize_t qse_putmbsf (
const qse_mchar_t* fmt,
@ -447,9 +463,10 @@ QSE_EXPORT qse_ssize_t qse_errputwcsvf (
# define qse_errputstrvf(fmt,ap) qse_errputwcsvf(fmt,ap)
#endif
/* Some convenience macros */
#define QSE_STDOUT (qse_getstdout())
#define QSE_STDERR (qse_getstderr())
#define QSE_STDOUT (qse_get_stdout())
#define QSE_STDERR (qse_get_stderr())
#define qse_printf qse_putstrf
#define qse_vprintf qse_putstrvf
#define qse_fprintf qse_sio_putstrf

View File

@ -1623,7 +1623,7 @@ int qse_fio_unlock (qse_fio_t* fio, qse_fio_lck_t* lck, int flags)
return -1;
}
int qse_getstdfiohandle (qse_fio_std_t std, qse_fio_hnd_t* hnd)
int qse_get_stdfiohandle (qse_fio_std_t std, qse_fio_hnd_t* hnd)
{
#if defined(_WIN32)
static DWORD tab[] =

View File

@ -113,7 +113,7 @@ static int __syslog_priority[] =
struct syslog_fac_info_t
{
const qse_char_t* name;
qse_log_facility_t code;
qse_log_facility_t code;
};
static struct syslog_fac_info_t __syslog_fac_info[] =

View File

@ -135,7 +135,7 @@ qse_sio_t* qse_sio_openstd (
}
*/
if (qse_getstdfiohandle (std, &hnd) <= -1) return QSE_NULL;
if (qse_get_stdfiohandle (std, &hnd) <= -1) return QSE_NULL;
sio = qse_sio_open (mmgr, xtnsize,
(const qse_char_t*)&hnd, flags | QSE_SIO_HANDLE | QSE_SIO_NOCLOSE);
@ -236,7 +236,7 @@ int qse_sio_initstd (
int n;
qse_fio_hnd_t hnd;
if (qse_getstdfiohandle (std, &hnd) <= -1) return -1;
if (qse_get_stdfiohandle (std, &hnd) <= -1) return -1;
n = qse_sio_init (sio, mmgr,
(const qse_char_t*)&hnd, flags | QSE_SIO_HANDLE | QSE_SIO_NOCLOSE);
@ -817,7 +817,7 @@ 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)
int qse_open_stdsios (void)
{
if (sio_stdout == QSE_NULL)
{
@ -830,14 +830,14 @@ int qse_openstdsios (void)
if (sio_stdout == QSE_NULL || sio_stderr == QSE_NULL)
{
qse_closestdsios ();
qse_close_stdsios ();
return -1;
}
return 0;
}
void qse_closestdsios (void)
void qse_close_stdsios (void)
{
if (sio_stderr)
{
@ -851,12 +851,12 @@ void qse_closestdsios (void)
}
}
qse_sio_t* qse_getstdout (void)
qse_sio_t* qse_get_stdout (void)
{
return sio_stdout;
}
qse_sio_t* qse_getstderr (void)
qse_sio_t* qse_get_stderr (void)
{
return sio_stderr;
}

View File

@ -11,7 +11,7 @@ int main ()
qse_awk_parsestd_t psin[2];
int ret = -1;
qse_openstdsios ();
qse_open_stdsios ();
/* create an awk object */
awk = qse_awk_openstd (0, QSE_NULL);
@ -71,6 +71,6 @@ oops:
/* destroy the awk object */
if (awk) qse_awk_close (awk);
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -156,9 +156,9 @@ int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -171,9 +171,9 @@ oops:
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -121,8 +121,8 @@ int qse_main (int argc, qse_achar_t* argv[])
{
int x;
init_awk_sample_locale ();
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -125,10 +125,10 @@ oops:
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -134,10 +134,10 @@ oops:
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -159,10 +159,10 @@ oops:
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -127,10 +127,10 @@ oops:
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -134,10 +134,10 @@ oops:
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -147,9 +147,9 @@ oops:
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -78,7 +78,7 @@ int main ()
qse_awk_parsestd_t psin[2];
int ret = -1;
qse_openstdsios ();
qse_open_stdsios ();
awk = qse_awk_openstd (0, QSE_NULL);
if (awk == QSE_NULL)
@ -131,7 +131,7 @@ oops:
if (rtx != QSE_NULL) qse_awk_rtx_close (rtx);
if (awk != QSE_NULL) qse_awk_close (awk);
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -36,7 +36,7 @@ int main ()
QSE_NULL
};
qse_openstdsios ();
qse_open_stdsios ();
awk = qse_awk_openstd (0, QSE_NULL);
if (awk == QSE_NULL)
@ -91,7 +91,7 @@ oops:
if (rtx != QSE_NULL) qse_awk_rtx_close (rtx);
if (awk != QSE_NULL) qse_awk_close (awk);
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -51,7 +51,7 @@ int main ()
int ret;
qse_openstdsios ();
qse_open_stdsios ();
awk = qse_awk_openstd (0, QSE_NULL);
if (awk == QSE_NULL)
@ -113,7 +113,7 @@ oops:
if (rtx != QSE_NULL) qse_awk_rtx_close (rtx);
if (awk != QSE_NULL) qse_awk_close (awk);
qse_closestdsios ();
qse_close_stdsios ();
return -1;
}

View File

@ -117,7 +117,7 @@ int main (int argc, char* argv[])
{
MyAwk awk;
qse_openstdsios ();
qse_open_stdsios ();
int ret = awk.open ();
if (ret >= 0) ret = run_awk (awk);
@ -128,7 +128,7 @@ int main (int argc, char* argv[])
}
awk.close ();
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -170,7 +170,7 @@ int main (int argc, char* argv[])
{
MyAwk awk;
qse_openstdsios ();
qse_open_stdsios ();
int ret = awk.open ();
if (ret >= 0) ret = run_awk (awk);
@ -181,7 +181,7 @@ int main (int argc, char* argv[])
}
awk.close ();
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -159,7 +159,7 @@ int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
{
#if defined(_WIN32)
@ -183,6 +183,6 @@ int qse_main (int argc, qse_achar_t* argv[])
}
x = qse_runmain (argc,argv,awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -453,7 +453,7 @@ int qse_main (int argc, qse_achar_t* argv[])
{
int ret;
qse_openstdsios ();
qse_open_stdsios ();
{
#if defined(_WIN32)
@ -492,6 +492,6 @@ int qse_main (int argc, qse_achar_t* argv[])
WSACleanup ();
#endif
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -90,7 +90,7 @@ int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
{
#if defined(_WIN32)
char locale[100];
@ -113,6 +113,6 @@ int qse_main (int argc, qse_achar_t* argv[])
}
x = qse_runmain (argc,argv,awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -117,7 +117,7 @@ int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
{
#if defined(_WIN32)
@ -141,6 +141,6 @@ int qse_main (int argc, qse_achar_t* argv[])
}
x = qse_runmain (argc,argv,awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -224,7 +224,7 @@ static int awk_main (int argc, qse_char_t* argv[])
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
{
#if defined(_WIN32)
@ -248,6 +248,6 @@ int qse_main (int argc, qse_achar_t* argv[])
}
x = qse_runmain (argc,argv,awk_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -585,13 +585,13 @@ static int test6 ()
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
R (test2);
R (test3);
R (test4);
R (test5);
R (test6);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -48,11 +48,11 @@ int main ()
#endif
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -108,11 +108,11 @@ static int test2 ()
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
R (test2);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -124,12 +124,12 @@ static int test3 (void)
}
int main ()
{
qse_openstdsios();
qse_open_stdsios();
R (test1);
R (test2);
R (test3);
qse_closestdsios();
qse_close_stdsios();
return 0;
}

View File

@ -186,9 +186,9 @@ static int test2 ()
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
R (test2);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -76,9 +76,9 @@ int qse_main (int argc, qse_achar_t* argv[])
setlocale (LC_ALL, "");
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -96,9 +96,9 @@ int qse_main (int argc, qse_achar_t* argv[])
setlocale (LC_ALL, "");
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -46,7 +46,7 @@ typedef QSE::HashList<int,IntHasher> IntList;
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
T* x;
//QSE::StdMmgr* mmgr = QSE::StdMmgr::getDFL();
@ -142,7 +142,7 @@ catch (QSE::Exception& e)
}
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -415,7 +415,7 @@ static int test5 ()
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
R (test2);
#if 0
@ -423,6 +423,6 @@ int main ()
R (test4);
#endif
R (test5);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -69,7 +69,7 @@ struct cstr_is_equal
int main ()
{
// qse_openstdsios ();
// qse_open_stdsios ();
QSE::HeapMmgr heap_mmgr (QSE::Mmgr::getDFL(), 3000000);
//QSE::HashTable<int,int,IntHasher> int_table (&heap_mmgr, 1000);
@ -215,7 +215,7 @@ printf ("----------\n");
}
// qse_closestdsios ();
// qse_close_stdsios ();
return 0;
}

View File

@ -207,9 +207,9 @@ int qse_main (int argc, qse_achar_t* argv[])
setlocale (LC_ALL, "");
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -43,9 +43,9 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -48,9 +48,9 @@ int qse_main (int argc, qse_achar_t* argv[], qse_achar_t* envp[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmainwithenv (argc, argv, envp, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -231,7 +231,7 @@ int main ()
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
qse_printf (QSE_T("Set the environment LANG to a Unicode locale such as UTF-8 if you see the illegal XXXXX errors. If you see such errors in Unicode locales, this program might be buggy. It is normal to see such messages in non-Unicode locales as it uses Unicode data\n"));
@ -242,6 +242,6 @@ int main ()
R (test3);
R (test4);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -311,7 +311,7 @@ int main ()
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
qse_printf (QSE_T("Set the environment LANG to a Unicode locale such as UTF-8 if you see the illegal XXXXX errors. If you see such errors in Unicode locales, this program might be buggy. It is normal to see such messages in non-Unicode locales as it uses Unicode data\n"));
qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
@ -321,6 +321,6 @@ int main ()
R (test3);
R (test4);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -123,9 +123,9 @@ static int test2 ()
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
R (test2);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -86,9 +86,9 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, path_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -88,9 +88,9 @@ static int test2 ()
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
R (test2);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -223,10 +223,10 @@ static int test5 ()
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
R (test2);
R (test5);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -37,7 +37,7 @@ struct cstr_comparator
int main ()
{
// qse_openstdsios ();
// qse_open_stdsios ();
QSE::HeapMmgr heap_mmgr (QSE::Mmgr::getDFL(), 3000000);
//QSE::RedBlackTable<int,int,IntHasher> int_table (&heap_mmgr, 1000);
@ -185,7 +185,7 @@ printf ("----------\n");
#endif
// qse_closestdsios ();
// qse_close_stdsios ();
return 0;
}

View File

@ -89,9 +89,9 @@ int qse_main (int argc, qse_achar_t* argv[])
setlocale (LC_ALL, "");
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, rex_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -60,8 +60,8 @@ static int test1 ()
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -224,11 +224,11 @@ int main ()
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
R (test2);
R (test3);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -383,7 +383,7 @@ int main ()
setlocale (LC_ALL, "");
#endif
qse_openstdsios ();
qse_open_stdsios ();
qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
qse_printf (QSE_T("Set the environment LANG to a Unicode locale such as UTF-8 if you see the illegal XXXXX errors. If you see such errors in Unicode locales, this program might be buggy. It is normal to see such messages in non-Unicode locales as it uses Unicode data\n"));
qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
@ -401,7 +401,7 @@ int main ()
R (test16);
R (test17);
qse_closestdsios ();
qse_close_stdsios ();
#if defined(_WIN32)
SetConsoleOutputCP (old_cp);

View File

@ -127,13 +127,13 @@ void t2()
int main ()
{
setlocale (LC_ALL, "");
qse_openstdsios ();
qse_open_stdsios ();
t1 ();
qse_printf (QSE_T("=================\n"));
t2 ();
qse_printf (QSE_T("=================\n"));
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -175,13 +175,13 @@ int main ()
{
setlocale (LC_ALL, "");
qse_openstdsios ();
qse_open_stdsios ();
qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
qse_printf (QSE_T("Set the environment LANG to a Unicode locale such as UTF-8 if you see the illegal XXXXX errors. If you see such errors in Unicode locales, this program might be buggy. It is normal to see such messages in non-Unicode locales as it uses Unicode data\n"));
qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
R (test1);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -96,9 +96,9 @@ int qse_main (int argc, qse_achar_t* argv[])
setlocale (LC_ALL, "");
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -135,9 +135,9 @@ int qse_main (int argc, qse_achar_t* argv[])
setlocale (LC_ALL, "");
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -218,12 +218,12 @@ static int test5 ()
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
R (test2);
R (test3);
R (test4);
R (test5);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -103,9 +103,9 @@ static int test2 ()
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
R (test1);
R (test2);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -107,7 +107,7 @@ int qse_main (int argc, qse_achar_t* argv[])
{
int ret;
qse_openstdsios ();
qse_open_stdsios ();
#if defined(_WIN32)
{
@ -158,7 +158,7 @@ int qse_main (int argc, qse_achar_t* argv[])
WSACleanup ();
#endif
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -50,9 +50,9 @@ oops:
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_sed_sample_locale ();
x = qse_runmain (argc, argv, sed_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -63,9 +63,9 @@ oops:
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_sed_sample_locale ();
x = qse_runmain (argc, argv, sed_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -72,9 +72,9 @@ oops:
int qse_main (int argc, qse_achar_t* argv[])
{
int x;
qse_openstdsios ();
qse_open_stdsios ();
init_sed_sample_locale ();
x = qse_runmain (argc, argv, sed_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -120,11 +120,11 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, dir_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -300,7 +300,7 @@ static int test3 (void)
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
setlocale (LC_ALL, "");
qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
@ -315,6 +315,6 @@ int main ()
qse_printf (QSE_T("Run \"rm -f fio01-?.txt\" to delete garbages\n"));
qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -79,8 +79,8 @@ static int test1 (void)
int main ()
{
qse_openstdsios();
qse_open_stdsios();
R (test1);
qse_closestdsios();
qse_close_stdsios();
return 0;
}

View File

@ -97,11 +97,11 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, fs_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -152,11 +152,11 @@ int main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, fs_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -160,11 +160,11 @@ int main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, fs_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -61,11 +61,11 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, glob_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -173,9 +173,9 @@ int qse_main (int argc, qse_achar_t* argv[])
setlocale (LC_ALL, "");
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}

View File

@ -88,9 +88,9 @@ int qse_main (int argc, qse_achar_t* argv[])
setlocale (LC_ALL, "");
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
ret = qse_runmain (argc, argv, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -100,9 +100,9 @@ int qse_main (int argc, qse_achar_t* argv[])
setlocale (LC_ALL, "");
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
ret = qse_runmain (argc, argv, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return ret;
}

View File

@ -395,7 +395,7 @@ static int test13 (void)
int main ()
{
qse_openstdsios ();
qse_open_stdsios ();
setlocale (LC_ALL, "");
qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
@ -415,6 +415,6 @@ int main ()
R (test11);
R (test12);
R (test13);
qse_closestdsios ();
qse_close_stdsios ();
return 0;
}

View File

@ -123,13 +123,13 @@ int main ()
setlocale (LC_ALL, "");
#endif
qse_openstdsios ();
qse_open_stdsios ();
qse_setintrhandler (stop_run, QSE_NULL);
test_001 ();
qse_clearintrhandler ();
qse_closestdsios ();
qse_close_stdsios ();
#if defined(_WIN32)
SetConsoleOutputCP (old_cp);

View File

@ -102,9 +102,9 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_openstdsios ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
qse_closestdsios ();
qse_close_stdsios ();
return x;
}