* added QSE_SIO_NOCLOSE.

* enhanced qse_sed_comp() to accept an array of qse_sed_iostd_t
This commit is contained in:
2011-10-03 01:25:23 +00:00
parent 8f3563b73e
commit 7505e0723f
28 changed files with 1065 additions and 285 deletions

View File

@ -231,7 +231,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = cmn awk cut sed net
SUBDIRS = cmn awk cut sed
all: all-recursive
.SUFFIXES:

View File

@ -45,7 +45,9 @@ int sed_main (int argc, qse_char_t* argv[])
return -1;
}
if (sed.compile (argv[1]) == -1)
QSE::StdSed::StringStream sstream (argv[1]);
if (sed.compile (sstream) == -1)
{
xcout << QSE_T("ERR: cannot compile - ") << sed.getErrorMessage() << std::endl;
sed.close ();
@ -54,9 +56,9 @@ int sed_main (int argc, qse_char_t* argv[])
qse_char_t* infile = (argc >= 3)? argv[2]: QSE_NULL;
qse_char_t* outfile = (argc >= 4)? argv[3]: QSE_NULL;
QSE::StdSed::FileStream stream (infile, outfile);
QSE::StdSed::FileStream fstream (infile, outfile);
if (sed.execute (stream) == -1)
if (sed.execute (fstream) == -1)
{
xcout << QSE_T("ERR: cannot execute - ") << sed.getErrorMessage() << std::endl;
sed.close ();

View File

@ -49,7 +49,8 @@ public:
void compile (const char_t* sptr)
{
if (QSE::StdSed::compile (sptr) <= -1)
QSE::StdSed::StringStream stream(sptr);
if (QSE::StdSed::compile (stream) <= -1)
throw Error (getErrorMessage());
}