Mercurial > hg > xemacs-beta
comparison src/search.c @ 388:aabb7f5b1c81 r21-2-9
Import from CVS: tag r21-2-9
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:09:42 +0200 |
parents | 8626e4521993 |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
387:f892a9d0bb8d | 388:aabb7f5b1c81 |
---|---|
1961 text from SUBSTART to SUBEND in the original string. */ | 1961 text from SUBSTART to SUBEND in the original string. */ |
1962 Charcount substart = -1; | 1962 Charcount substart = -1; |
1963 Charcount subend = -1; | 1963 Charcount subend = -1; |
1964 | 1964 |
1965 c = string_char (XSTRING (newtext), strpos); | 1965 c = string_char (XSTRING (newtext), strpos); |
1966 if (c == '\\') | 1966 if (c == '\\' && strpos < stlen - 1) |
1967 { | 1967 { |
1968 c = string_char (XSTRING (newtext), ++strpos); | 1968 c = string_char (XSTRING (newtext), ++strpos); |
1969 if (c == '&') | 1969 if (c == '&') |
1970 { | 1970 { |
1971 literal_end = strpos - 1; | 1971 literal_end = strpos - 1; |
2107 for (strpos = 0; strpos < stlen; strpos++) | 2107 for (strpos = 0; strpos < stlen; strpos++) |
2108 { | 2108 { |
2109 Charcount offset = BUF_PT (buf) - search_regs.start[0]; | 2109 Charcount offset = BUF_PT (buf) - search_regs.start[0]; |
2110 | 2110 |
2111 c = string_char (XSTRING (newtext), strpos); | 2111 c = string_char (XSTRING (newtext), strpos); |
2112 if (c == '\\') | 2112 if (c == '\\' && strpos < stlen - 1) |
2113 { | 2113 { |
2114 c = string_char (XSTRING (newtext), ++strpos); | 2114 c = string_char (XSTRING (newtext), ++strpos); |
2115 if (c == '&') | 2115 if (c == '&') |
2116 Finsert_buffer_substring | 2116 Finsert_buffer_substring |
2117 (buffer, | 2117 (buffer, |