Fix typo: __LIBC -> _LIBC.
[gnulib.git] / lib / regex_internal.c
index 385de6f..7eed8c5 100644 (file)
@@ -19,7 +19,7 @@
 
 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;
 static re_dfastate_t *create_ci_newstate (re_dfa_t *dfa,
                                          const re_node_set *nodes,
@@ -37,7 +37,7 @@ static re_dfastate_t *create_cd_newstate (re_dfa_t *dfa,
 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;
@@ -65,7 +65,7 @@ re_string_allocate (re_string_t *pstr, const char *str, int len, int init_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));
@@ -161,13 +161,13 @@ re_string_realloc_buffers (re_string_t *pstr, int new_buf_len)
 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;
@@ -258,7 +258,7 @@ build_wcs_buffer (re_string_t *pstr)
 /* 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)
 {
@@ -707,7 +707,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
     {
       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;
        }
@@ -1504,7 +1504,7 @@ create_ci_newstate (re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash)
   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);
@@ -1554,7 +1554,7 @@ create_cd_newstate (re_dfa_t *dfa, const re_node_set *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);