static void re_string_construct_common (const char *str, int len,
re_string_t *pstr,
- RE_TRANSLATE_TYPE trans, int icase,
+ REG_TRANSLATE_TYPE trans, int icase,
const re_dfa_t *dfa) internal_function;
-#ifdef RE_ENABLE_I18N
-static int re_string_skip_chars (re_string_t *pstr, int new_raw_idx,
- wint_t *last_wc) internal_function;
-#endif /* RE_ENABLE_I18N */
-static reg_errcode_t register_state (re_dfa_t *dfa, re_dfastate_t *newstate,
- unsigned int hash) internal_function;
static re_dfastate_t *create_ci_newstate (re_dfa_t *dfa,
const re_node_set *nodes,
unsigned int hash) internal_function;
const re_node_set *nodes,
unsigned int context,
unsigned int hash) internal_function;
-static inline unsigned int calc_state_hash (const re_node_set *nodes,
- unsigned int context) internal_function;
\f
/* Functions for string operation. */
static reg_errcode_t
internal_function
re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len,
- RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
+ REG_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
{
reg_errcode_t ret;
int init_buf_len;
static reg_errcode_t
internal_function
re_string_construct (re_string_t *pstr, const char *str, int len,
- RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
+ REG_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
{
reg_errcode_t ret;
memset (pstr, '\0', sizeof (re_string_t));
static void
internal_function
re_string_construct_common (const char *str, int len, re_string_t *pstr,
- RE_TRANSLATE_TYPE trans, int icase,
+ REG_TRANSLATE_TYPE trans, int icase,
const re_dfa_t *dfa)
{
pstr->raw_mbs = (const unsigned char *) str;
pstr->len = len;
pstr->raw_len = len;
- pstr->trans = (unsigned RE_TRANSLATE_TYPE) trans;
+ pstr->trans = (unsigned REG_TRANSLATE_TYPE) trans;
pstr->icase = icase ? 1 : 0;
pstr->mbs_allocated = (trans != NULL || icase);
pstr->mb_cur_max = dfa->mb_cur_max;
/* Build wide character buffer PSTR->WCS like build_wcs_buffer,
but for REG_ICASE. */
-static int
+static reg_errcode_t
internal_function
build_wcs_upper_buffer (re_string_t *pstr)
{
{
if (pstr->icase)
{
- int ret = build_wcs_upper_buffer (pstr);
+ reg_errcode_t ret = build_wcs_upper_buffer (pstr);
if (BE (ret != REG_NOERROR, 0))
return ret;
}
reg_errcode_t err;
re_dfastate_t *newstate;
- newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
+ newstate = re_calloc (re_dfastate_t, 1);
if (BE (newstate == NULL, 0))
return NULL;
err = re_node_set_init_copy (&newstate->nodes, nodes);
reg_errcode_t err;
re_dfastate_t *newstate;
- newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
+ newstate = re_calloc (re_dfastate_t, 1);
if (BE (newstate == NULL, 0))
return NULL;
err = re_node_set_init_copy (&newstate->nodes, nodes);