1 --- engine.c.orig 2004-11-25 11:38:32.000000000 -0800
2 +++ engine.c 2005-02-24 14:25:22.000000000 -0800
5 assert(m->coldp < m->endp);
6 m->coldp += XMBRTOWC(NULL, m->coldp,
7 - m->endp - m->coldp, &m->mbs, 0);
8 + m->endp - m->coldp, &m->mbs, 0, g->loc);
10 if (nmatch == 1 && !g->backrefs)
11 break; /* no further info needed */
14 /* recycle starting later */
15 start = m->coldp + XMBRTOWC(NULL, m->coldp,
16 - m->endp - m->coldp, &m->mbs, 0);
17 + m->endp - m->coldp, &m->mbs, 0, g->loc);
18 assert(start <= stop);
25 - sp += XMBRTOWC(NULL, sp, stop - start, &m->mbs, 0);
26 + sp += XMBRTOWC(NULL, sp, stop - start, &m->mbs, 0, m->g->loc);
34 - sp += XMBRTOWC(NULL, sp, stop - start, &m->mbs, 0);
35 + sp += XMBRTOWC(NULL, sp, stop - start, &m->mbs, 0, m->g->loc);
43 - sp += XMBRTOWC(&wc, sp, stop - sp, &m->mbs, BADCHAR);
44 + sp += XMBRTOWC(&wc, sp, stop - sp, &m->mbs, BADCHAR, m->g->loc);
51 - sp += XMBRTOWC(&wc, sp, stop - sp, &m->mbs, BADCHAR);
52 + sp += XMBRTOWC(&wc, sp, stop - sp, &m->mbs, BADCHAR, m->g->loc);
59 cs = &m->g->sets[OPND(s)];
60 - sp += XMBRTOWC(&wc, sp, stop - sp, &m->mbs, BADCHAR);
61 - if (wc == BADCHAR || !CHIN(cs, wc))
62 + sp += XMBRTOWC(&wc, sp, stop - sp, &m->mbs, BADCHAR, m->g->loc);
63 + if (wc == BADCHAR || !CHIN(cs, wc, m->g->loc))
68 (sp < m->endp && *(sp-1) == '\n' &&
69 (m->g->cflags®_NEWLINE)) ||
71 - !ISWORD(*(sp-1))) ) &&
72 - (sp < m->endp && ISWORD(*sp)) )
73 + !ISWORD(*(sp-1), m->g->loc)) ) &&
74 + (sp < m->endp && ISWORD(*sp, m->g->loc)) )
79 if (( (sp == m->endp && !(m->eflags®_NOTEOL)) ||
80 (sp < m->endp && *sp == '\n' &&
81 (m->g->cflags®_NEWLINE)) ||
82 - (sp < m->endp && !ISWORD(*sp)) ) &&
83 - (sp > m->beginp && ISWORD(*(sp-1))) )
84 + (sp < m->endp && !ISWORD(*sp, m->g->loc)) ) &&
85 + (sp > m->beginp && ISWORD(*(sp-1), m->g->loc)) )
93 - clen = XMBRTOWC(&c, p, m->endp - p, &m->mbs, BADCHAR);
94 + clen = XMBRTOWC(&c, p, m->endp - p, &m->mbs, BADCHAR, m->g->loc);
101 /* how about a word boundary? */
102 - if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
103 - (c != OUT && ISWORD(c)) ) {
104 + if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc, m->g->loc))) &&
105 + (c != OUT && ISWORD(c, m->g->loc)) ) {
108 - if ( (lastc != OUT && ISWORD(lastc)) &&
109 - (flagch == EOL || (c != OUT && !ISWORD(c))) ) {
110 + if ( (lastc != OUT && ISWORD(lastc, m->g->loc)) &&
111 + (flagch == EOL || (c != OUT && !ISWORD(c, m->g->loc))) ) {
114 if (flagch == BOW || flagch == EOW) {
116 assert(coldp != NULL);
118 if (ISSET(st, stopst))
119 - return(p+XMBRTOWC(NULL, p, m->endp - p, &m->mbs, 0));
120 + return(p+XMBRTOWC(NULL, p, m->endp - p, &m->mbs, 0, m->g->loc));
128 - clen = XMBRTOWC(&c, p, m->endp - p, &m->mbs, BADCHAR);
129 + clen = XMBRTOWC(&c, p, m->endp - p, &m->mbs, BADCHAR, m->g->loc);
131 /* is there an EOL and/or BOL between lastc and c? */
133 @@ -935,12 +935,12 @@
136 /* how about a word boundary? */
137 - if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
138 - (c != OUT && ISWORD(c)) ) {
139 + if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc, m->g->loc))) &&
140 + (c != OUT && ISWORD(c, m->g->loc)) ) {
143 - if ( (lastc != OUT && ISWORD(lastc)) &&
144 - (flagch == EOL || (c != OUT && !ISWORD(c))) ) {
145 + if ( (lastc != OUT && ISWORD(lastc, m->g->loc)) &&
146 + (flagch == EOL || (c != OUT && !ISWORD(c, m->g->loc))) ) {
149 if (flagch == BOW || flagch == EOW) {
150 @@ -1031,7 +1031,7 @@
153 cs = &g->sets[OPND(s)];
154 - if (!NONCHAR(ch) && CHIN(cs, ch))
155 + if (!NONCHAR(ch) && CHIN(cs, ch, g->loc))
158 case OBACK_: /* ignored here */