comparison src/search.c @ 203:850242ba4a81 r20-3b28

Import from CVS: tag r20-3b28
author cvs
date Mon, 13 Aug 2007 10:02:21 +0200
parents b405438285a2
children 0e522484dd2a
comparison
equal deleted inserted replaced
202:61eefc8fc970 203:850242ba4a81
274 { 274 {
275 /* This function has been Mule-ized, except for the trt table handling. */ 275 /* This function has been Mule-ized, except for the trt table handling. */
276 Lisp_Object val; 276 Lisp_Object val;
277 Bytind p1, p2; 277 Bytind p1, p2;
278 Bytecount s1, s2; 278 Bytecount s1, s2;
279 register int i; 279 REGISTER int i;
280 struct re_pattern_buffer *bufp; 280 struct re_pattern_buffer *bufp;
281 281
282 if (running_asynch_code) 282 if (running_asynch_code)
283 save_search_regs (); 283 save_search_regs ();
284 284
714 static Lisp_Object 714 static Lisp_Object
715 skip_chars (struct buffer *buf, int forwardp, int syntaxp, 715 skip_chars (struct buffer *buf, int forwardp, int syntaxp,
716 Lisp_Object string, Lisp_Object lim) 716 Lisp_Object string, Lisp_Object lim)
717 { 717 {
718 /* This function has been Mule-ized. */ 718 /* This function has been Mule-ized. */
719 register Bufbyte *p, *pend; 719 REGISTER Bufbyte *p, *pend;
720 register Emchar c; 720 REGISTER Emchar c;
721 /* We store the first 256 chars in an array here and the rest in 721 /* We store the first 256 chars in an array here and the rest in
722 a range table. */ 722 a range table. */
723 unsigned char fastmap[0400]; 723 unsigned char fastmap[0400];
724 int negate = 0; 724 int negate = 0;
725 register int i; 725 REGISTER int i;
726 struct Lisp_Char_Table *syntax_table = 726 struct Lisp_Char_Table *syntax_table =
727 XCHAR_TABLE (buf->mirror_syntax_table); 727 XCHAR_TABLE (buf->mirror_syntax_table);
728 728
729 CHECK_STRING (string); 729 CHECK_STRING (string);
730 730
943 search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object no_error, 943 search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object no_error,
944 Lisp_Object count, Lisp_Object buffer, int direction, 944 Lisp_Object count, Lisp_Object buffer, int direction,
945 int RE, int posix) 945 int RE, int posix)
946 { 946 {
947 /* This function has been Mule-ized, except for the trt table handling. */ 947 /* This function has been Mule-ized, except for the trt table handling. */
948 register Bufpos np; 948 REGISTER Bufpos np;
949 Bufpos lim; 949 Bufpos lim;
950 EMACS_INT n = direction; 950 EMACS_INT n = direction;
951 struct buffer *buf; 951 struct buffer *buf;
952 952
953 if (!NILP (count)) 953 if (!NILP (count))
1063 unsigned char *inverse_trt, int posix) 1063 unsigned char *inverse_trt, int posix)
1064 { 1064 {
1065 /* This function has been Mule-ized, except for the trt table handling. */ 1065 /* This function has been Mule-ized, except for the trt table handling. */
1066 Bytecount len = XSTRING_LENGTH (string); 1066 Bytecount len = XSTRING_LENGTH (string);
1067 Bufbyte *base_pat = XSTRING_DATA (string); 1067 Bufbyte *base_pat = XSTRING_DATA (string);
1068 register EMACS_INT *BM_tab; 1068 REGISTER EMACS_INT *BM_tab;
1069 EMACS_INT *BM_tab_base; 1069 EMACS_INT *BM_tab_base;
1070 register int direction = ((n > 0) ? 1 : -1); 1070 REGISTER int direction = ((n > 0) ? 1 : -1);
1071 register Bytecount dirlen; 1071 REGISTER Bytecount dirlen;
1072 EMACS_INT infinity; 1072 EMACS_INT infinity;
1073 Bytind limit; 1073 Bytind limit;
1074 EMACS_INT k; 1074 EMACS_INT k;
1075 Bytecount stride_for_teases = 0; 1075 Bytecount stride_for_teases = 0;
1076 register Bufbyte *pat = 0; 1076 REGISTER Bufbyte *pat = 0;
1077 register Bufbyte *cursor, *p_limit, *ptr2; 1077 REGISTER Bufbyte *cursor, *p_limit, *ptr2;
1078 register EMACS_INT i, j; 1078 REGISTER EMACS_INT i, j;
1079 Bytind p1, p2; 1079 Bytind p1, p2;
1080 Bytecount s1, s2; 1080 Bytecount s1, s2;
1081 Bytind pos, lim; 1081 Bytind pos, lim;
1082 1082
1083 if (running_asynch_code) 1083 if (running_asynch_code)
2302 LIST should have been created by calling `match-data' previously. 2302 LIST should have been created by calling `match-data' previously.
2303 */ 2303 */
2304 (list)) 2304 (list))
2305 { 2305 {
2306 /* This function has been Mule-ized. */ 2306 /* This function has been Mule-ized. */
2307 register int i; 2307 REGISTER int i;
2308 register Lisp_Object marker; 2308 REGISTER Lisp_Object marker;
2309 2309
2310 if (running_asynch_code) 2310 if (running_asynch_code)
2311 save_search_regs (); 2311 save_search_regs ();
2312 2312
2313 if (!CONSP (list) && !NILP (list)) 2313 if (!CONSP (list) && !NILP (list))
2421 Return a regexp string which matches exactly STRING and nothing else. 2421 Return a regexp string which matches exactly STRING and nothing else.
2422 */ 2422 */
2423 (str)) 2423 (str))
2424 { 2424 {
2425 /* This function has been Mule-ized. */ 2425 /* This function has been Mule-ized. */
2426 register Bufbyte *in, *out, *end; 2426 REGISTER Bufbyte *in, *out, *end;
2427 register Bufbyte *temp; 2427 REGISTER Bufbyte *temp;
2428 2428
2429 CHECK_STRING (str); 2429 CHECK_STRING (str);
2430 2430
2431 temp = (Bufbyte *) alloca (XSTRING_LENGTH (str) * 2); 2431 temp = (Bufbyte *) alloca (XSTRING_LENGTH (str) * 2);
2432 2432
2497 } 2497 }
2498 2498
2499 void 2499 void
2500 vars_of_search (void) 2500 vars_of_search (void)
2501 { 2501 {
2502 register int i; 2502 REGISTER int i;
2503 2503
2504 for (i = 0; i < REGEXP_CACHE_SIZE; ++i) 2504 for (i = 0; i < REGEXP_CACHE_SIZE; ++i)
2505 { 2505 {
2506 searchbufs[i].buf.allocated = 100; 2506 searchbufs[i].buf.allocated = 100;
2507 searchbufs[i].buf.buffer = (unsigned char *) xmalloc (100); 2507 searchbufs[i].buf.buffer = (unsigned char *) xmalloc (100);