added some code to support module calls using module-name::function-name syntax to awk.

reorganized a few awk error code
This commit is contained in:
2012-10-20 15:58:20 +00:00
parent 3cec861547
commit 11b9829c9b
29 changed files with 670 additions and 440 deletions

View File

@ -1965,7 +1965,7 @@ static int get_command (qse_sed_t* sed, qse_sed_cmd_t* cmd)
return 0;
}
int qse_sed_comp (qse_sed_t* sed, qse_sed_io_fun_t inf)
int qse_sed_comp (qse_sed_t* sed, qse_sed_io_impl_t inf)
{
qse_cint_t c;
qse_sed_cmd_t* cmd = QSE_NULL;
@ -3902,8 +3902,7 @@ static int emit_output (qse_sed_t* sed, int skipline)
return 0;
}
int qse_sed_exec (qse_sed_t* sed, qse_sed_io_fun_t inf, qse_sed_io_fun_t outf)
int qse_sed_exec (qse_sed_t* sed, qse_sed_io_impl_t inf, qse_sed_io_impl_t outf)
{
qse_ssize_t n;
int ret = 0;

View File

@ -104,7 +104,7 @@ struct qse_sed_t
/** source text pointers */
struct
{
qse_sed_io_fun_t fun; /**< input stream handler */
qse_sed_io_impl_t fun; /**< input stream handler */
qse_sed_io_arg_t arg;
qse_char_t buf[1024];
int eof;
@ -156,7 +156,7 @@ struct qse_sed_t
/** data needed for output streams and files */
struct
{
qse_sed_io_fun_t fun; /**< an output handler */
qse_sed_io_impl_t fun; /**< an output handler */
qse_sed_io_arg_t arg; /**< output handling data */
qse_char_t buf[2048];
@ -174,7 +174,7 @@ struct qse_sed_t
/** data needed for input streams */
struct
{
qse_sed_io_fun_t fun; /**< an input handler */
qse_sed_io_impl_t fun; /**< an input handler */
qse_sed_io_arg_t arg; /**< input handling data */
qse_char_t xbuf[1]; /**< a read-ahead buffer */

View File

@ -101,18 +101,7 @@ qse_sed_t* qse_sed_openstd (qse_size_t xtnsize)
qse_sed_t* qse_sed_openstdwithmmgr (qse_mmgr_t* mmgr, qse_size_t xtnsize)
{
qse_sed_t* sed;
xtn_t* xtn;
/* create an object */
sed = qse_sed_open (mmgr, QSE_SIZEOF(xtn_t) + xtnsize);
if (sed == QSE_NULL) return QSE_NULL;
/* initialize extension */
xtn = (xtn_t*) QSE_XTN (sed);
QSE_MEMSET (xtn, 0, QSE_SIZEOF(xtn_t));
return sed;
return qse_sed_open (mmgr, QSE_SIZEOF(xtn_t) + xtnsize);
}
void* qse_sed_getxtnstd (qse_sed_t* sed)