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

@ -58,6 +58,11 @@ void qse_setdflcmgr (qse_cmgr_t* cmgr)
dfl_cmgr = (cmgr? cmgr: &builtin_cmgr[0]);
}
/* TODO:
qse_addcmgr (const qse_char_t* name, qse_cmgr_t* cmgr);
qse_delcmgr (const qse_char_t* name);
*/
qse_cmgr_t* qse_getcmgrbyname (const qse_char_t* name)
{
if (name)
@ -66,7 +71,7 @@ qse_cmgr_t* qse_getcmgrbyname (const qse_char_t* name)
if (qse_strcmp(name, QSE_T("")) == 0) return dfl_cmgr;
if (qse_strcmp(name, QSE_T("utf8")) == 0) return qse_utf8cmgr;
if (qse_strcmp(name, QSE_T("slmb")) == 0) return qse_slmbcmgr;
/* TODO: add more */
/* TODO: add more - handle those added with qse_addcmgr() */
}
return QSE_NULL;
}

View File

@ -132,28 +132,22 @@ typedef struct tre_backtrack_struct
s = tre_bt_mem_alloc(mem, sizeof(*s)); \
if (!s) \
{ \
tre_bt_mem_destroy(mem); \
if (tags) \
xfree(_mmgr,tags); \
if (pmatch) \
xfree(_mmgr,pmatch); \
if (states_seen) \
xfree(_mmgr,states_seen); \
tre_bt_mem_destroy(mem); \
if (tags) xfree(_mmgr,tags); \
if (pmatch) xfree(_mmgr,pmatch); \
if (states_seen) xfree(_mmgr,states_seen); \
return REG_ESPACE; \
} \
s->prev = stack; \
s->next = NULL; \
s->item.tags = tre_bt_mem_alloc(mem, \
sizeof(*tags) * tnfa->num_tags); \
if (!s->item.tags) \
{ \
tre_bt_mem_destroy(mem); \
if (tags) \
xfree(_mmgr,tags); \
if (pmatch) \
xfree(_mmgr,pmatch); \
if (states_seen) \
xfree(_mmgr,states_seen); \
s->item.tags = tre_bt_mem_alloc(mem, \
sizeof(*tags) * tnfa->num_tags); \
if (!s->item.tags) \
{ \
tre_bt_mem_destroy(mem); \
if (tags) xfree(_mmgr,tags); \
if (pmatch) xfree(_mmgr,pmatch); \
if (states_seen) xfree(_mmgr,states_seen); \
return REG_ESPACE; \
} \
stack->next = s; \
@ -539,8 +533,8 @@ retry:
trans_i->code_min, trans_i->code_max,
trans_i->code_min, trans_i->code_max,
trans_i->assertions, trans_i->state_id));
if (trans_i->code_min <= (tre_cint_t)prev_c
&& trans_i->code_max >= (tre_cint_t)prev_c)
if (trans_i->code_min <= (tre_cint_t)prev_c &&
trans_i->code_max >= (tre_cint_t)prev_c)
{
if (trans_i->assertions
&& (CHECK_ASSERTIONS(trans_i->assertions)

View File

@ -409,7 +409,7 @@ tre_tnfa_run_parallel(qse_mmgr_t* mmgr, const tre_tnfa_t *tnfa, const void *stri
{
/* Does this transition match the input symbol? */
if (trans_i->code_min <= (tre_cint_t)prev_c &&
trans_i->code_max >= (tre_cint_t)prev_c)
trans_i->code_max >= (tre_cint_t)prev_c)
{
if (trans_i->assertions
&& (CHECK_ASSERTIONS(trans_i->assertions)