This fixes the dfa generation when creating copies of MBCSET tokens, where
addtok assumes the corresponding multibyte cset is the last one added.
This is wrong when duplicating a group consisting of multiple MBCSETs.
Andreas.
2006-02-08 Andreas Schwab <[EMAIL PROTECTED]>
* src/dfa.c (copytoks): Adjust index into multibyte csets when
copying a MBCSET token.
--- src/dfa.c.~1.36.~ 2005-09-08 15:09:22.000000000 +0200
+++ src/dfa.c 2006-02-08 12:12:25.000000000 +0100
@@ -1338,7 +1338,14 @@ copytoks (int tindex, int ntokens)
int i;
for (i = 0; i < ntokens; ++i)
- addtok(dfa->tokens[tindex + i]);
+ {
+ addtok(dfa->tokens[tindex + i]);
+#ifdef MBS_SUPPORT
+ /* Update index into multibyte csets. */
+ if (MB_CUR_MAX > 1 && dfa->tokens[tindex + i] == MBCSET)
+ dfa->multibyte_prop[dfa->tindex - 1] = dfa->multibyte_prop[tindex + i];
+#endif
+ }
}
static void
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."