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

View File

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

View File

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

View File

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

View File

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

View File

@ -54,7 +54,7 @@
* qse_htb_t* s1; * qse_htb_t* s1;
* int i; * int i;
* *
* qse_openstdsios (); * qse_open_stdsios ();
* s1 = qse_htb_open (QSE_MMGR_GETDFL(), 0, 30, 75, 1, 1); // error handling skipped * 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)); * qse_htb_setstyle (s1, qse_gethtbstyle(QSE_HTB_STYLE_INLINE_COPIERS));
* *
@ -67,7 +67,7 @@
* qse_htb_walk (s1, walk, QSE_NULL); * qse_htb_walk (s1, walk, QSE_NULL);
* *
* qse_htb_close (s1); * qse_htb_close (s1);
* qse_closestdsios (); * qse_close_stdsios ();
* return 0; * return 0;
* } * }
* @endcode * @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* 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_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 ( * s1 = qse_htb_open (
* QSE_MMGR_GETDFL(), 0, 10, 70, * QSE_MMGR_GETDFL(), 0, 10, 70,
* QSE_SIZEOF(qse_char_t), QSE_SIZEOF(qse_char_t) * 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_walk (s1, print_map_pair, QSE_NULL);
* *
* qse_htb_close (s1); * qse_htb_close (s1);
* qse_closestdsios (); * qse_close_stdsios ();
* return 0; * return 0;
* } * }
* @endcode * @endcode

View File

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

View File

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

View File

@ -390,10 +390,26 @@ QSE_EXPORT int qse_sio_seek (
qse_sio_ori_t origin 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 ( QSE_EXPORT qse_ssize_t qse_putmbsf (
const qse_mchar_t* fmt, 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) # define qse_errputstrvf(fmt,ap) qse_errputwcsvf(fmt,ap)
#endif #endif
/* Some convenience macros */ /* Some convenience macros */
#define QSE_STDOUT (qse_getstdout()) #define QSE_STDOUT (qse_get_stdout())
#define QSE_STDERR (qse_getstderr()) #define QSE_STDERR (qse_get_stderr())
#define qse_printf qse_putstrf #define qse_printf qse_putstrf
#define qse_vprintf qse_putstrvf #define qse_vprintf qse_putstrvf
#define qse_fprintf qse_sio_putstrf #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; 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) #if defined(_WIN32)
static DWORD tab[] = static DWORD tab[] =

View File

@ -113,7 +113,7 @@ static int __syslog_priority[] =
struct syslog_fac_info_t struct syslog_fac_info_t
{ {
const qse_char_t* name; const qse_char_t* name;
qse_log_facility_t code; qse_log_facility_t code;
}; };
static struct syslog_fac_info_t __syslog_fac_info[] = 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, sio = qse_sio_open (mmgr, xtnsize,
(const qse_char_t*)&hnd, flags | QSE_SIO_HANDLE | QSE_SIO_NOCLOSE); (const qse_char_t*)&hnd, flags | QSE_SIO_HANDLE | QSE_SIO_NOCLOSE);
@ -236,7 +236,7 @@ int qse_sio_initstd (
int n; int n;
qse_fio_hnd_t hnd; 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, n = qse_sio_init (sio, mmgr,
(const qse_char_t*)&hnd, flags | QSE_SIO_HANDLE | QSE_SIO_NOCLOSE); (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; static qse_sio_t* sio_stderr = QSE_NULL;
/* TODO: add sio_stdin, qse_getmbs, etc */ /* TODO: add sio_stdin, qse_getmbs, etc */
int qse_openstdsios (void) int qse_open_stdsios (void)
{ {
if (sio_stdout == QSE_NULL) if (sio_stdout == QSE_NULL)
{ {
@ -830,14 +830,14 @@ int qse_openstdsios (void)
if (sio_stdout == QSE_NULL || sio_stderr == QSE_NULL) if (sio_stdout == QSE_NULL || sio_stderr == QSE_NULL)
{ {
qse_closestdsios (); qse_close_stdsios ();
return -1; return -1;
} }
return 0; return 0;
} }
void qse_closestdsios (void) void qse_close_stdsios (void)
{ {
if (sio_stderr) 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; return sio_stdout;
} }
qse_sio_t* qse_getstderr (void) qse_sio_t* qse_get_stderr (void)
{ {
return sio_stderr; return sio_stderr;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -43,9 +43,9 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/ /*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif #endif
qse_openstdsios (); qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main); x = qse_runmain (argc, argv, test_main);
qse_closestdsios (); qse_close_stdsios ();
return x; 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);*/ /*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif #endif
qse_openstdsios (); qse_open_stdsios ();
x = qse_runmainwithenv (argc, argv, envp, test_main); x = qse_runmainwithenv (argc, argv, envp, test_main);
qse_closestdsios (); qse_close_stdsios ();
return x; return x;
} }

View File

@ -231,7 +231,7 @@ int main ()
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/ /*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif #endif
qse_openstdsios (); qse_open_stdsios ();
qse_printf (QSE_T("--------------------------------------------------------------------------------\n")); 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("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 (test3);
R (test4); R (test4);
qse_closestdsios (); qse_close_stdsios ();
return 0; return 0;
} }

View File

@ -311,7 +311,7 @@ int main ()
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/ /*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif #endif
qse_openstdsios (); qse_open_stdsios ();
qse_printf (QSE_T("--------------------------------------------------------------------------------\n")); 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("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")); qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
@ -321,6 +321,6 @@ int main ()
R (test3); R (test3);
R (test4); R (test4);
qse_closestdsios (); qse_close_stdsios ();
return 0; return 0;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -383,7 +383,7 @@ int main ()
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
#endif #endif
qse_openstdsios (); qse_open_stdsios ();
qse_printf (QSE_T("--------------------------------------------------------------------------------\n")); 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("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")); qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
@ -401,7 +401,7 @@ int main ()
R (test16); R (test16);
R (test17); R (test17);
qse_closestdsios (); qse_close_stdsios ();
#if defined(_WIN32) #if defined(_WIN32)
SetConsoleOutputCP (old_cp); SetConsoleOutputCP (old_cp);

View File

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

View File

@ -175,13 +175,13 @@ int main ()
{ {
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
qse_openstdsios (); qse_open_stdsios ();
qse_printf (QSE_T("--------------------------------------------------------------------------------\n")); 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("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")); qse_printf (QSE_T("--------------------------------------------------------------------------------\n"));
R (test1); R (test1);
qse_closestdsios (); qse_close_stdsios ();
return 0; return 0;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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