Mercurial > hg > octave-nkf > gnulib-hg
changeset 961:6959c7741ed2
(re_search_2): Cast result of POS_ADDR_VSTRING.
author | Richard Stallman <rms@gnu.org> |
---|---|
date | Wed, 02 Jul 1997 06:25:00 +0000 |
parents | 6f2958d80ce3 |
children | 1bd42c6bc7a3 |
files | regex.c |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/regex.c +++ b/regex.c @@ -3856,8 +3856,10 @@ /* Update STARTPOS to the next character boundary. */ if (multibyte) { - const unsigned char *p = POS_ADDR_VSTRING (startpos); - const unsigned char *pend = STOP_ADDR_VSTRING (startpos); + const unsigned char *p + = (const unsigned char *) POS_ADDR_VSTRING (startpos); + const unsigned char *pend + = (const unsigned char *) STOP_ADDR_VSTRING (startpos); int len = MULTIBYTE_FORM_LENGTH (p, pend - p); range -= len; @@ -3867,9 +3869,9 @@ } else { - range--; - startpos++; - } + range--; + startpos++; + } } else { @@ -3879,7 +3881,8 @@ /* Update STARTPOS to the previous character boundary. */ if (multibyte) { - const unsigned char *p = POS_ADDR_VSTRING (startpos); + const unsigned char *p + = (const unsigned char *) POS_ADDR_VSTRING (startpos); int len = 0; /* Find the head of multibyte form. */