Mercurial > emacs
comparison src/regex.c @ 27359:3fcd19033f0c
(re_compile_fastmap): While checking a range table for
`charset', skip flag bits for a character class correctly.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 18 Jan 2000 20:11:41 +0000 |
parents | 7498ac232d1c |
children | 26edef632c89 |
comparison
equal
deleted
inserted
replaced
27358:0bb119a7ff93 | 27359:3fcd19033f0c |
---|---|
1 /* Extended regular expression matching and search library, version | 1 /* Extended regular expression matching and search library, version |
2 0.12. (Implements POSIX draft P10003.2/D11.2, except for | 2 0.12. (Implements POSIX draft P10003.2/D11.2, except for |
3 internationalization features.) | 3 internationalization features.) |
4 | 4 |
5 Copyright (C) 1993, 1994-1998, 1999 Free Software Foundation, Inc. | 5 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 2, or (at your option) | 9 the Free Software Foundation; either version 2, or (at your option) |
10 any later version. | 10 any later version. |
3532 { | 3532 { |
3533 /* Set fastmap[I] 1 where I is a base leading code of each | 3533 /* Set fastmap[I] 1 where I is a base leading code of each |
3534 multibyte character in the range table. */ | 3534 multibyte character in the range table. */ |
3535 int c, count; | 3535 int c, count; |
3536 | 3536 |
3537 /* Make P points the range table. */ | 3537 /* Make P points the range table. `+ 2' is to skip flag |
3538 p += CHARSET_BITMAP_SIZE (&p[-2]); | 3538 bits for a character class. */ |
3539 p += CHARSET_BITMAP_SIZE (&p[-2]) + 2; | |
3539 | 3540 |
3540 /* Extract the number of ranges in range table into COUNT. */ | 3541 /* Extract the number of ranges in range table into COUNT. */ |
3541 EXTRACT_NUMBER_AND_INCR (count, p); | 3542 EXTRACT_NUMBER_AND_INCR (count, p); |
3542 for (; count > 0; count--, p += 2 * 3) /* XXX */ | 3543 for (; count > 0; count--, p += 2 * 3) /* XXX */ |
3543 { | 3544 { |