From 67bac76b6508128057c8beb87855438a8d5ecaa9 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 12 Jan 2013 16:51:49 +0000 Subject: [PATCH] reverted lib/sed/std.c --- qse/lib/sed/std.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/qse/lib/sed/std.c b/qse/lib/sed/std.c index 0ad4326c..0d8eae5e 100644 --- a/qse/lib/sed/std.c +++ b/qse/lib/sed/std.c @@ -124,7 +124,8 @@ static int verify_iostd_in (qse_sed_t* sed, qse_sed_iostd_t in[]) for (i = 0; in[i].type != QSE_SED_IOSTD_NULL; i++) { if (in[i].type != QSE_SED_IOSTD_FILE && - in[i].type != QSE_SED_IOSTD_STR) + in[i].type != QSE_SED_IOSTD_STR && + in[i].type != QSE_SED_IOSTD_SIO) { qse_sed_seterrnum (sed, QSE_SED_EINVAL, QSE_NULL); return -1; @@ -193,6 +194,10 @@ static void close_main_stream ( */ break; + case QSE_SED_IOSTD_SIO: + /* nothing to do */ + break; + default: /* do nothing */ break; @@ -225,6 +230,10 @@ static int open_input_stream ( base->mempos = 0; break; + case QSE_SED_IOSTD_SIO: + arg->handle = io->u.sio; + break; + default: QSE_ASSERTX ( !"should never happen", @@ -311,6 +320,10 @@ static int open_output_stream (qse_sed_t* sed, qse_sed_io_arg_t* arg, qse_sed_io } break; + case QSE_SED_IOSTD_SIO: + arg->handle = io->u.sio; + break; + default: QSE_ASSERTX ( !"should never happen", @@ -761,7 +774,8 @@ int qse_sed_execstd ( if (out) { if (out->type != QSE_SED_IOSTD_FILE && - out->type != QSE_SED_IOSTD_STR) + out->type != QSE_SED_IOSTD_STR && + out->type != QSE_SED_IOSTD_SIO) { qse_sed_seterrnum (sed, QSE_SED_EINVAL, QSE_NULL); return -1;