1 --- regexec.c.orig 2004-11-25 11:38:33.000000000 -0800
2 +++ regexec.c 2005-02-24 14:20:50.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/regex/regexec.c,v 1.6 2004/07/12 07:35:59 tjr Exp $");
7 +#include "xlocale_private.h"
10 * the outer shell of regexec()
13 static int nope __unused = 0; /* for use in asserts; shuts lint up */
15 static __inline size_t
16 -xmbrtowc(wi, s, n, mbs, dummy)
17 +xmbrtowc(wi, s, n, mbs, dummy, loc)
28 - nr = mbrtowc(&wc, s, n, mbs);
29 + nr = mbrtowc_l(&wc, s, n, mbs, loc);
36 static __inline size_t
37 -xmbrtowc_dummy(wi, s, n, mbs, dummy)
38 +xmbrtowc_dummy(wi, s, n, mbs, dummy, loc)
42 mbstate_t *mbs __unused;
43 wint_t dummy __unused;
50 #define LNAMES /* flag */
56 /* multibyte character & large states version */
59 eflags = GOODFLAGS(eflags);
62 + g->loc = __current_locale();
63 + if (MB_CUR_MAX_L(g->loc) > 1)
64 return(mmatcher(g, (char *)string, nmatch, pmatch, eflags));
65 else if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags®_LARGE))
66 return(smatcher(g, (char *)string, nmatch, pmatch, eflags));