aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-02 06:25:00 +0000
committerRichard M. Stallman1997-07-02 06:25:00 +0000
commitb560c39793615ec7357ed31c3119c0f4a8b69113 (patch)
tree0ab5dfcf0f2e8fbb2d18616ad8e70e5237b5b6d2 /src
parentbdd8d692f3b31e5c53397d4484e71bb70462c500 (diff)
downloademacs-b560c39793615ec7357ed31c3119c0f4a8b69113.tar.gz
emacs-b560c39793615ec7357ed31c3119c0f4a8b69113.zip
(re_search_2): Cast result of POS_ADDR_VSTRING.
Diffstat (limited to 'src')
-rw-r--r--src/regex.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/regex.c b/src/regex.c
index d30a922abdf..6a45db69b8f 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -3856,8 +3856,10 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
3856 /* Update STARTPOS to the next character boundary. */ 3856 /* Update STARTPOS to the next character boundary. */
3857 if (multibyte) 3857 if (multibyte)
3858 { 3858 {
3859 const unsigned char *p = POS_ADDR_VSTRING (startpos); 3859 const unsigned char *p
3860 const unsigned char *pend = STOP_ADDR_VSTRING (startpos); 3860 = (const unsigned char *) POS_ADDR_VSTRING (startpos);
3861 const unsigned char *pend
3862 = (const unsigned char *) STOP_ADDR_VSTRING (startpos);
3861 int len = MULTIBYTE_FORM_LENGTH (p, pend - p); 3863 int len = MULTIBYTE_FORM_LENGTH (p, pend - p);
3862 3864
3863 range -= len; 3865 range -= len;
@@ -3867,9 +3869,9 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
3867 } 3869 }
3868 else 3870 else
3869 { 3871 {
3870 range--; 3872 range--;
3871 startpos++; 3873 startpos++;
3872 } 3874 }
3873 } 3875 }
3874 else 3876 else
3875 { 3877 {
@@ -3879,7 +3881,8 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
3879 /* Update STARTPOS to the previous character boundary. */ 3881 /* Update STARTPOS to the previous character boundary. */
3880 if (multibyte) 3882 if (multibyte)
3881 { 3883 {
3882 const unsigned char *p = POS_ADDR_VSTRING (startpos); 3884 const unsigned char *p
3885 = (const unsigned char *) POS_ADDR_VSTRING (startpos);
3883 int len = 0; 3886 int len = 0;
3884 3887
3885 /* Find the head of multibyte form. */ 3888 /* Find the head of multibyte form. */