reverted lib/sed/std.c
This commit is contained in:
parent
ef6d295cac
commit
67bac76b65
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user