aboutsummaryrefslogtreecommitdiffstats
path: root/src/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/search.c b/src/search.c
index c25d2441018..d4508004bf6 100644
--- a/src/search.c
+++ b/src/search.c
@@ -209,7 +209,8 @@ clear_regexp_cache (void)
209 for this pattern. 0 means backtrack only enough to get a valid match. */ 209 for this pattern. 0 means backtrack only enough to get a valid match. */
210 210
211struct re_pattern_buffer * 211struct re_pattern_buffer *
212compile_pattern (Lisp_Object pattern, struct re_registers *regp, Lisp_Object translate, int posix, int multibyte) 212compile_pattern (Lisp_Object pattern, struct re_registers *regp,
213 Lisp_Object translate, int posix, bool multibyte)
213{ 214{
214 struct regexp_cache *cp, **cpp; 215 struct regexp_cache *cp, **cpp;
215 216
@@ -534,9 +535,10 @@ fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string)
534 data. */ 535 data. */
535 536
536ptrdiff_t 537ptrdiff_t
537fast_looking_at (Lisp_Object regexp, ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t limit, ptrdiff_t limit_byte, Lisp_Object string) 538fast_looking_at (Lisp_Object regexp, ptrdiff_t pos, ptrdiff_t pos_byte,
539 ptrdiff_t limit, ptrdiff_t limit_byte, Lisp_Object string)
538{ 540{
539 int multibyte; 541 bool multibyte;
540 struct re_pattern_buffer *buf; 542 struct re_pattern_buffer *buf;
541 unsigned char *p1, *p2; 543 unsigned char *p1, *p2;
542 ptrdiff_t s1, s2; 544 ptrdiff_t s1, s2;
@@ -1248,7 +1250,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
1248 ptrdiff_t raw_pattern_size; 1250 ptrdiff_t raw_pattern_size;
1249 ptrdiff_t raw_pattern_size_byte; 1251 ptrdiff_t raw_pattern_size_byte;
1250 unsigned char *patbuf; 1252 unsigned char *patbuf;
1251 int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); 1253 bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
1252 unsigned char *base_pat; 1254 unsigned char *base_pat;
1253 /* Set to positive if we find a non-ASCII char that need 1255 /* Set to positive if we find a non-ASCII char that need
1254 translation. Otherwise set to zero later. */ 1256 translation. Otherwise set to zero later. */
@@ -1461,8 +1463,8 @@ simple_search (EMACS_INT n, unsigned char *pat,
1461 ptrdiff_t pos, ptrdiff_t pos_byte, 1463 ptrdiff_t pos, ptrdiff_t pos_byte,
1462 ptrdiff_t lim, ptrdiff_t lim_byte) 1464 ptrdiff_t lim, ptrdiff_t lim_byte)
1463{ 1465{
1464 int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); 1466 bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
1465 int forward = n > 0; 1467 bool forward = n > 0;
1466 /* Number of buffer bytes matched. Note that this may be different 1468 /* Number of buffer bytes matched. Note that this may be different
1467 from len_byte in a multibyte buffer. */ 1469 from len_byte in a multibyte buffer. */
1468 ptrdiff_t match_byte = PTRDIFF_MIN; 1470 ptrdiff_t match_byte = PTRDIFF_MIN;
@@ -1681,7 +1683,7 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat,
1681 register ptrdiff_t i; 1683 register ptrdiff_t i;
1682 register int j; 1684 register int j;
1683 unsigned char *pat, *pat_end; 1685 unsigned char *pat, *pat_end;
1684 int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); 1686 bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
1685 1687
1686 unsigned char simple_translate[0400]; 1688 unsigned char simple_translate[0400];
1687 /* These are set to the preceding bytes of a byte to be translated 1689 /* These are set to the preceding bytes of a byte to be translated
@@ -2507,8 +2509,8 @@ since only regular expressions have distinguished subexpressions. */)
2507 ptrdiff_t length = SBYTES (newtext); 2509 ptrdiff_t length = SBYTES (newtext);
2508 unsigned char *substed; 2510 unsigned char *substed;
2509 ptrdiff_t substed_alloc_size, substed_len; 2511 ptrdiff_t substed_alloc_size, substed_len;
2510 int buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); 2512 bool buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
2511 int str_multibyte = STRING_MULTIBYTE (newtext); 2513 bool str_multibyte = STRING_MULTIBYTE (newtext);
2512 int really_changed = 0; 2514 int really_changed = 0;
2513 2515
2514 substed_alloc_size = ((STRING_BYTES_BOUND - 100) / 2 < length 2516 substed_alloc_size = ((STRING_BYTES_BOUND - 100) / 2 < length