fixed of not setting cmgr properly in awk/std.c

added encoding options to the awk command.
added directory functions to httpd
This commit is contained in:
2012-01-25 15:39:02 +00:00
parent b903f8ebb5
commit 246dc4f5b7
17 changed files with 481 additions and 274 deletions

View File

@ -1089,7 +1089,7 @@ int qse_awk_matchrex (
x = qse_matchrex (
awk->mmgr, awk->rex.depth.max.match,
code, option, str, substr, match, &err);
if (x < 0) *errnum = QSE_AWK_REXERRTOERR(err);
if (x <= -1) *errnum = QSE_AWK_REXERRTOERR(err);
return x;
}

View File

@ -997,6 +997,7 @@ static int open_rio_console (qse_awk_rtx_t* rtx, qse_awk_rio_arg_t* riod)
if (sio == QSE_NULL) return -1;
if (rxtn->c.cmgr) qse_sio_setcmgr (sio, rxtn->c.cmgr);
riod->handle = sio;
rxtn->c.in.count++;
return 1;
@ -1114,6 +1115,8 @@ static int open_rio_console (qse_awk_rtx_t* rtx, qse_awk_rio_arg_t* riod)
return -1;
}
if (rxtn->c.cmgr) qse_sio_setcmgr (sio, rxtn->c.cmgr);
if (qse_awk_rtx_setfilename (
rtx, file, qse_strlen(file)) <= -1)
{
@ -1146,6 +1149,8 @@ static int open_rio_console (qse_awk_rtx_t* rtx, qse_awk_rio_arg_t* riod)
);
if (sio == QSE_NULL) return -1;
if (rxtn->c.cmgr) qse_sio_setcmgr (sio, rxtn->c.cmgr);
riod->handle = sio;
rxtn->c.out.count++;
return 1;
@ -1177,6 +1182,8 @@ static int open_rio_console (qse_awk_rtx_t* rtx, qse_awk_rio_arg_t* riod)
QSE_SIO_WRITE | QSE_SIO_CREATE |
QSE_SIO_TRUNCATE | QSE_SIO_IGNOREMBWCERR);
if (sio == QSE_NULL) return -1;
if (rxtn->c.cmgr) qse_sio_setcmgr (sio, rxtn->c.cmgr);
if (qse_awk_rtx_setofilename (
rtx, file, qse_strlen(file)) <= -1)