emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/regex.c,v


From: Andreas Schwab
Subject: [Emacs-diffs] Changes to emacs/src/regex.c,v
Date: Sun, 16 Mar 2008 10:45:55 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Andreas Schwab <schwab> 08/03/16 10:45:55

Index: regex.c
===================================================================
RCS file: /sources/emacs/emacs/src/regex.c,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -b -r1.230 -r1.231
--- regex.c     15 Mar 2008 14:21:07 -0000      1.230
+++ regex.c     16 Mar 2008 10:45:52 -0000      1.231
@@ -5648,6 +5648,9 @@
               in the initial byte-length of the command.  */
            int count = 0;
 
+           /* Whether matching against a unibyte character.  */
+           boolean unibyte_char = false;
+
            DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : "");
 
            range_table_exists = CHARSET_RANGE_TABLE_EXISTS_P (&p[-1]);
@@ -5667,8 +5670,11 @@
                c = TRANSLATE (c);
                c1 = RE_CHAR_TO_UNIBYTE (c);
                if (c1 >= 0)
+                 {
+                   unibyte_char = true;
                  c = c1;
              }
+             }
            else
              {
                int c1 = RE_CHAR_TO_MULTIBYTE (c);
@@ -5678,11 +5684,14 @@
                    c1 = TRANSLATE (c1);
                    c1 = RE_CHAR_TO_UNIBYTE (c1);
                    if (c1 >= 0)
+                     {
+                       unibyte_char = true;
                      c = c1;
                  }
              }
+             }
 
-           if (c < (1 << BYTEWIDTH))
+           if (unibyte_char && c < (1 << BYTEWIDTH))
              {                 /* Lookup bitmap.  */
                /* Cast to `unsigned' instead of `unsigned char' in
                   case the bit list is a full 32 bytes long.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]