* posix/regex_internal.c (re_string_context_at): Guard wide char
code with #ifdef RE_ENABLE_I18N.
return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF
: CONTEXT_NEWLINE | CONTEXT_ENDBUF);
}
- if (MB_CUR_MAX == 1)
- {
- c = re_string_byte_at (input, idx);
- if (IS_WORD_CHAR (c))
- return CONTEXT_WORD;
- return (newline_anchor && IS_NEWLINE (c)) ? CONTEXT_NEWLINE : 0;
- }
- else
+#ifdef RE_ENABLE_I18N
+ if (MB_CUR_MAX > 1)
{
wint_t wc;
int wc_idx = idx;
return CONTEXT_WORD;
return (newline_anchor && IS_WIDE_NEWLINE (wc)) ? CONTEXT_NEWLINE : 0;
}
+ else
+#endif
+ {
+ c = re_string_byte_at (input, idx);
+ if (IS_WORD_CHAR (c))
+ return CONTEXT_WORD;
+ return (newline_anchor && IS_NEWLINE (c)) ? CONTEXT_NEWLINE : 0;
+ }
}
\f
/* Functions for set operation. */