# HG changeset patch # User Richard M. Stallman # Date 884973400 0 # Node ID 427fa7757472d5c47981d0db2cc8642c6cb0133c # Parent 388cedeebb88ca5f0092417c81b2dcb36fd0ca82 (re_match_2_internal): Use SYNTAX_TABLE_BYTE_TO_CHAR. (re_match_2_internal) : Call UPDATE_SYNTAX_TABLE properly with a charpos. diff -r 388cedeebb88 -r 427fa7757472 src/regex.c --- a/src/regex.c Fri Jan 16 17:52:16 1998 +0000 +++ b/src/regex.c Fri Jan 16 17:56:40 1998 +0000 @@ -5324,7 +5324,7 @@ GET_CHAR_BEFORE_2 (c1, d, string1, end1, string2, end2); GET_CHAR_AFTER_2 (c2, d, string1, end1, string2, end2); #ifdef emacs - charpos = BYTE_TO_CHAR (pos1 ? pos1 : 1); + charpos = SYNTAX_TABLE_BYTE_TO_CHAR (pos1 ? pos1 : 1); UPDATE_SYNTAX_TABLE (charpos); #endif s1 = SYNTAX (c1); @@ -5361,7 +5361,7 @@ GET_CHAR_BEFORE_2 (c1, d, string1, end1, string2, end2); GET_CHAR_AFTER_2 (c2, d, string1, end1, string2, end2); #ifdef emacs - charpos = BYTE_TO_CHAR (pos1); + charpos = SYNTAX_TABLE_BYTE_TO_CHAR (pos1); UPDATE_SYNTAX_TABLE (charpos); #endif s1 = SYNTAX (c1); @@ -5397,8 +5397,8 @@ GET_CHAR_AFTER_2 (c2, d, string1, end1, string2, end2); #ifdef emacs - charpos = BYTE_TO_CHAR (pos1); - UPDATE_SYNTAX_TABLE (pos1); + charpos = SYNTAX_TABLE_BYTE_TO_CHAR (pos1); + UPDATE_SYNTAX_TABLE (charpos); #endif s2 = SYNTAX (c2); @@ -5441,8 +5441,8 @@ GET_CHAR_BEFORE_2 (c1, d, string1, end1, string2, end2); #ifdef emacs - charpos = BYTE_TO_CHAR (pos1 - 1); - UPDATE_SYNTAX_TABLE (pos1); + charpos = SYNTAX_TABLE_BYTE_TO_CHAR (pos1 - 1); + UPDATE_SYNTAX_TABLE (charpos); #endif s1 = SYNTAX (c1); @@ -5498,7 +5498,7 @@ PREFETCH (); #ifdef emacs { - int pos1 = BYTE_TO_CHAR (PTR_TO_OFFSET (d)); + int pos1 = SYNTAX_TABLE_BYTE_TO_CHAR (PTR_TO_OFFSET (d)); UPDATE_SYNTAX_TABLE (pos1); } #endif @@ -5532,7 +5532,7 @@ PREFETCH (); #ifdef emacs { - int pos1 = BYTE_TO_CHAR (PTR_TO_OFFSET (d)); + int pos1 = SYNTAX_TABLE_BYTE_TO_CHAR (PTR_TO_OFFSET (d)); UPDATE_SYNTAX_TABLE (pos1); } #endif