re_charset_t *mbcset,
int *equiv_class_alloc,
const unsigned char *name);
-static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
+static reg_errcode_t build_charclass (__RE_TRANSLATE_TYPE trans,
bitset_t sbcset,
re_charset_t *mbcset,
int *char_class_alloc,
#else /* not RE_ENABLE_I18N */
static reg_errcode_t build_equiv_class (bitset_t sbcset,
const unsigned char *name);
-static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
+static reg_errcode_t build_charclass (__RE_TRANSLATE_TYPE trans,
bitset_t sbcset,
const unsigned char *class_name,
reg_syntax_t syntax);
#endif /* not RE_ENABLE_I18N */
static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
- RE_TRANSLATE_TYPE trans,
+ __RE_TRANSLATE_TYPE trans,
const unsigned char *class_name,
const unsigned char *extra,
int non_match, reg_errcode_t *err);
static reg_errcode_t
#ifdef RE_ENABLE_I18N
-build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
+build_charclass (__RE_TRANSLATE_TYPE trans, bitset_t sbcset,
re_charset_t *mbcset, int *char_class_alloc,
const unsigned char *class_name, reg_syntax_t syntax)
#else
-build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
+build_charclass (__RE_TRANSLATE_TYPE trans, bitset_t sbcset,
const unsigned char *class_name, reg_syntax_t syntax)
#endif
{
}
static bin_tree_t *
-build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
+build_charclass_op (re_dfa_t *dfa, __RE_TRANSLATE_TYPE trans,
const unsigned char *class_name,
const unsigned char *extra, int non_match,
reg_errcode_t *err)
# include <stdlib.h>
# ifdef __UCLIBC_HAS_WCHAR__
# define RE_ENABLE_I18N
+# define HAVE_WCHAR_H 1
+# define HAVE_WCRTOMB 1
+# define HAVE_MBRTOWC 1
+# define HAVE_WCSCOLL 1
# include <wchar.h>
+# define HAVE_WCTYPE_H 1
# include <wctype.h>
# define __iswctype iswctype
# define __wcrtomb wcrtomb
# define __wctype wctype
# endif
# include <ctype.h>
+# ifdef __UCLIBC_HAS_LOCALE__
+# define HAVE_LOCALE_H 1
+# endif
#endif
/* Make sure noone compiles this code with a C++ compiler. */
static void re_string_construct_common (const char *str, int len,
re_string_t *pstr,
- RE_TRANSLATE_TYPE trans, int icase,
+ __RE_TRANSLATE_TYPE trans, int icase,
const re_dfa_t *dfa) internal_function;
static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
const re_node_set *nodes,
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)
+ __RE_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)
+ __RE_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,
+ __RE_TRANSLATE_TYPE trans, int icase,
const re_dfa_t *dfa)
{
pstr->raw_mbs = (const unsigned char *) str;
#include <assert.h>
#include <ctype.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
the beginning of the input string. */
unsigned int tip_context;
/* The translation passed as a part of an argument of re_compile_pattern. */
- RE_TRANSLATE_TYPE trans;
+ __RE_TRANSLATE_TYPE trans;
/* Copy of re_dfa_t's word_char. */
re_const_bitset_ptr_t word_char;
/* 1 if REG_ICASE. */
re_match_context_t mctx;
char *fastmap = (preg->fastmap != NULL && preg->fastmap_accurate
&& range && !preg->can_be_null) ? preg->fastmap : NULL;
- RE_TRANSLATE_TYPE t = preg->translate;
+ __RE_TRANSLATE_TYPE t = preg->translate;
memset (&mctx, '\0', sizeof (re_match_context_t));
mctx.dfa = dfa;