* fixed an issue in parsing an expression like "a++ ++b" or "1 ++b"
* added _WIN32 code handling QSE_PIO_MBSCMD * fixed various _WIN32 issues in qse_env_t * added untested OS2 code handling QSE_PIO_MBSCMD
This commit is contained in:
@ -101,15 +101,15 @@ static int test2 (void)
|
||||
|
||||
static int test3 (void)
|
||||
{
|
||||
|
||||
qse_env_t* env;
|
||||
|
||||
env = qse_env_open (QSE_NULL, 0, 0);
|
||||
|
||||
qse_printf (QSE_T("%d\n"), qse_env_insertsys (env, QSE_T("PATH")));
|
||||
qse_printf (QSE_T("%d\n"), qse_env_insertsysm (env, QSE_MT("HOME")));
|
||||
qse_printf (QSE_T("%d\n"), qse_env_insertsysw (env, QSE_WT("USER")));
|
||||
qse_printf (QSE_T("%d\n"), qse_env_insertsys (env, QSE_T("WHAT")));
|
||||
qse_printf (QSE_T("inserting PATH => %d\n"), qse_env_insertsys (env, QSE_T("PATH")));
|
||||
qse_printf (QSE_T("inserting HOME => %d\n"), qse_env_insertsysm (env, QSE_MT("HOME")));
|
||||
qse_printf (QSE_T("inserting USER => %d\n"), qse_env_insertsysw (env, QSE_WT("USER")));
|
||||
qse_printf (QSE_T("inserting WHAT => %d\n"), qse_env_insertsys (env, QSE_T("WHAT")));
|
||||
qse_printf (QSE_T("inserting an empty string => %d\n"), qse_env_insertsys (env, QSE_T("")));
|
||||
|
||||
dump (env);
|
||||
|
||||
|
@ -400,7 +400,7 @@ static int test5 ()
|
||||
|
||||
for (i = 0; i < 25; i++)
|
||||
{
|
||||
j = random () % 100;
|
||||
j = rand () % 100;
|
||||
qse_lda_pushheap (s1, &j, 1);
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ static int test5 ()
|
||||
|
||||
for (i = 0; i < 25; i++)
|
||||
{
|
||||
j = random () % 100;
|
||||
j = rand () % 100;
|
||||
qse_lda_pushheap (s1, &j, 1);
|
||||
}
|
||||
|
||||
@ -431,7 +431,7 @@ static int test5 ()
|
||||
qse_lda_setcomper (s1, default_comparator);
|
||||
for (i = 0; i < 25; i++)
|
||||
{
|
||||
j = random () % 100;
|
||||
j = rand () % 100;
|
||||
qse_lda_pushheap (s1, &j, 1);
|
||||
}
|
||||
|
||||
|
@ -244,6 +244,32 @@ static int test8 (void)
|
||||
}
|
||||
|
||||
static int test9 (void)
|
||||
{
|
||||
return pio1 (
|
||||
#ifdef _WIN32
|
||||
(const qse_char_t*)".\\sll.exe",
|
||||
#else
|
||||
(const qse_char_t*)"/bin/ls -laF",
|
||||
#endif
|
||||
QSE_PIO_MBSCMD|QSE_PIO_READOUT|QSE_PIO_WRITEIN,
|
||||
QSE_PIO_OUT
|
||||
);
|
||||
}
|
||||
|
||||
static int test10 (void)
|
||||
{
|
||||
return pio1 (
|
||||
#ifdef _WIN32
|
||||
(const qse_char_t*)"dir /a",
|
||||
#else
|
||||
(const qse_char_t*)"/bin/ls -laF",
|
||||
#endif
|
||||
QSE_PIO_MBSCMD|QSE_PIO_READOUT|QSE_PIO_WRITEIN|QSE_PIO_SHELL,
|
||||
QSE_PIO_OUT
|
||||
);
|
||||
}
|
||||
|
||||
static int test11 (void)
|
||||
{
|
||||
qse_pio_t* pio;
|
||||
int x;
|
||||
@ -272,7 +298,7 @@ static int test9 (void)
|
||||
qse_printf (QSE_T("sleeping for %d seconds\n"), n);
|
||||
Sleep (n * 1000);
|
||||
qse_printf (QSE_T("WaitForSingleObject....%d\n"),
|
||||
WaitForSingleObject (pio->child, 0));
|
||||
(int)WaitForSingleObject (pio->child, 0));
|
||||
}
|
||||
#elif defined(__OS2__)
|
||||
{
|
||||
@ -282,7 +308,7 @@ static int test9 (void)
|
||||
qse_printf (QSE_T("sleeping for %d seconds\n"), n);
|
||||
DosSleep (n * 1000);
|
||||
qse_printf (QSE_T("WaitForSingleObject....%d\n"),
|
||||
WaitForSingleObject (pio->child, 0));
|
||||
(int)WaitForSingleObject (pio->child, 0));
|
||||
DosWaitChild (DCWA_PROCESS, DCWW_WAIT,..);
|
||||
}
|
||||
#else
|
||||
@ -324,6 +350,8 @@ int main ()
|
||||
R (test7);
|
||||
R (test8);
|
||||
R (test9);
|
||||
R (test10);
|
||||
R (test11);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user