adding qse_sed_execute()

This commit is contained in:
hyung-hwan 2009-04-02 19:15:45 +00:00
parent 787ba46604
commit 6b52dfe97e
3 changed files with 21 additions and 3 deletions

View File

@ -185,6 +185,10 @@ int qse_sed_compile (
qse_size_t slen qse_size_t slen
); );
int qse_sed_execute (
qse_sed_t* sed
);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -1196,3 +1196,16 @@ int qse_sed_compile (qse_sed_t* sed, const qse_char_t* sptr, qse_size_t slen)
{ {
return compile_source (sed, sptr, slen); return compile_source (sed, sptr, slen);
} }
int qse_sed_execute (qse_sed_t* sed)
{
qse_sed_cmd_t* c = sed->cmd.buf;
while (c < sed->cmd.cur)
{
qse_printf (QSE_T(">>> %c\n"), c->type);
c++;
}
return 0;
}

View File

@ -54,9 +54,10 @@ int sed_main (int argc, qse_char_t* argv[])
goto oops; goto oops;
} }
//if (qse_sed_execute (sed, io) == -1) if (qse_sed_execute (sed/*, io*/) == -1)
//{ {
//} }
ret = 0; ret = 0;
oops: oops: