changeset 23846:e2e16f655cff

(re_compile_fastmap): For anychar, set all fastmap elements for all possible unibyte chars (except newline).
author Karl Heuer <kwzh@gnu.org>
date Thu, 10 Dec 1998 03:09:12 +0000
parents b3d94db9bc57
children 8d6ae4ca21a7
files src/regex.c
diffstat 1 files changed, 6 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/regex.c	Thu Dec 10 03:07:35 1998 +0000
+++ b/src/regex.c	Thu Dec 10 03:09:12 1998 +0000
@@ -3381,21 +3381,13 @@
 	  {
 	    int fastmap_newline = fastmap['\n'];
 
-	    /* `.' matches anything (but if bufp->multibyte is
-	       nonzero, matches `\000' .. `\127' and possible multibyte
-	       character) ...  */
+	    /* `.' matches anything, except perhaps newline.
+	       Even in a multibyte buffer, it should match any
+	       conceivable byte value for the fastmap.  */
 	    if (bufp->multibyte)
-	      {
-		simple_char_max = 0x80;
-
-		for (j = 0x80; j < 0xA0; j++)
-		  if (BASE_LEADING_CODE_P (j))
-		    fastmap[j] = 1;
-		match_any_multibyte_characters = true;
-	      }
-	    else
-	      simple_char_max = (1 << BYTEWIDTH);
-
+	      match_any_multibyte_characters = true;
+
+	    simple_char_max = (1 << BYTEWIDTH);
 	    for (j = 0; j < simple_char_max; j++)
 	      fastmap[j] = 1;