fixed a bug of not handling console output properly in

qse_awk_rtx_opensimple()
This commit is contained in:
2009-02-18 04:37:34 +00:00
parent d7d223cd7e
commit d3e69f1d23
6 changed files with 130 additions and 71 deletions

View File

@ -41,6 +41,7 @@ int main ()
qse_awk_t* awk = QSE_NULL;
qse_awk_rtx_t* rtx = QSE_NULL;
int ret;
const qse_char_t* co[] = { QSE_T(""), QSE_NULL };
awk = qse_awk_opensimple ();
if (awk == QSE_NULL)
@ -51,7 +52,7 @@ int main ()
ret = qse_awk_parsesimple (
awk,
QSE_AWK_PARSE_STRING, src, /* parse AWK source in a string */
QSE_AWK_SOURCE_STRING, src, /* parse AWK source in a string */
QSE_NULL /* no parse output */
);
if (ret == -1)
@ -63,7 +64,8 @@ int main ()
rtx = qse_awk_rtx_opensimple (
awk,
QSE_NULL /* no console files */
QSE_NULL, /* no console input */
QSE_AWK_CONSOLE_STDIO /* use standard out for console output */
);
if (rtx == QSE_NULL)
{

View File

@ -61,9 +61,11 @@ int main ()
qse_awk_setoption (awk, qse_awk_getoption(awk) & ~QSE_AWK_PABLOCK);
ret = qse_awk_parsesimple (
awk,
QSE_AWK_PARSE_STRING, src, /* parse AWK source in a string */
QSE_NULL /* no parse output */
awk,
/* parse AWK source in a string */
QSE_AWK_SOURCE_STRING, src,
/* no parse output */
QSE_NULL
);
if (ret == -1)
{
@ -75,7 +77,8 @@ int main ()
/* create a runtime context */
rtx = qse_awk_rtx_opensimple (
awk,
QSE_NULL /* no console files */
QSE_NULL, /* no console input */
QSE_AWK_CONSOLE_STDIO /* console output */
);
if (rtx == QSE_NULL)
{