added 'abort' & QSE_AWK_ABORT to awk.

added a new sed command 'C' that resembles the cut utility
dropped the cut utility.
added qse_str_nrcat()/qse_mbs_nrcat()/qse_wcs_nrcat()
This commit is contained in:
2012-08-19 14:20:19 +00:00
parent 006dd8975f
commit 6421da99f4
31 changed files with 159 additions and 2822 deletions

View File

@ -420,8 +420,9 @@ struct opttab_t
{ QSE_T("rexbound"), QSE_AWK_REXBOUND, QSE_T("enable {n,m} in a regular expression") },
{ QSE_T("ncmponstr"), QSE_AWK_NCMPONSTR, QSE_T("perform numeric comparsion on numeric strings") },
{ QSE_T("strictnaming"), QSE_AWK_STRICTNAMING, QSE_T("enable the strict naming rule") },
{ QSE_T("include"), QSE_AWK_INCLUDE, QSE_T("enable 'include'") },
{ QSE_T("include"), QSE_AWK_INCLUDE, QSE_T("enable '@include'") },
{ QSE_T("tolerant"), QSE_AWK_TOLERANT, QSE_T("make more I/O fault-tolerant") },
{ QSE_T("abort"), QSE_AWK_ABORT, QSE_T("enable 'abort'") },
{ QSE_NULL, 0, QSE_NULL }
};
@ -481,6 +482,7 @@ static int comparg (int argc, qse_char_t* argv[], struct arg_t* arg)
{ QSE_T(":strictnaming"), QSE_T('\0') },
{ QSE_T(":include"), QSE_T('\0') },
{ QSE_T(":tolerant"), QSE_T('\0') },
{ QSE_T(":abort"), QSE_T('\0') },
{ QSE_T(":call"), QSE_T('c') },
{ QSE_T(":file"), QSE_T('f') },
@ -1031,12 +1033,15 @@ static int awk_main (int argc, qse_char_t* argv[])
retv = (arg.call == QSE_NULL)?
qse_awk_rtx_loop (rtx):
qse_awk_rtx_call (rtx, arg.call, QSE_NULL, 0);
if (retv != QSE_NULL)
if (retv)
{
qse_awk_rtx_refdownval (rtx, retv);
ret = 0;
qse_long_t tmp;
dprint_return (rtx, retv);
qse_awk_rtx_refdownval (rtx, retv);
if (app_debug) dprint_return (rtx, retv);
ret = 0;
if (qse_awk_rtx_valtolong (rtx, retv, &tmp) >= 0) ret = tmp;
}
unset_intr_run ();