comparison src/search.c @ 2268:61855263cb07

[xemacs-hg @ 2004-09-14 14:32:29 by james] Identify functions that don't return, including some DEFUNs.
author james
date Tue, 14 Sep 2004 14:33:07 +0000
parents 4af49f9a7a5c
children 04bc9d2f42c7
comparison
equal deleted inserted replaced
2267:5753220a0f80 2268:61855263cb07
135 static Charbpos search_buffer (struct buffer *buf, Lisp_Object str, 135 static Charbpos search_buffer (struct buffer *buf, Lisp_Object str,
136 Charbpos charbpos, Charbpos buflim, EMACS_INT n, 136 Charbpos charbpos, Charbpos buflim, EMACS_INT n,
137 int RE, Lisp_Object trt, 137 int RE, Lisp_Object trt,
138 Lisp_Object inverse_trt, int posix); 138 Lisp_Object inverse_trt, int posix);
139 139
140 static void 140 static DECLARE_DOESNT_RETURN (matcher_overflow (void));
141 matcher_overflow (void) 141
142 static DOESNT_RETURN
143 matcher_overflow ()
142 { 144 {
143 stack_overflow ("Stack overflow in regexp matcher", Qunbound); 145 stack_overflow ("Stack overflow in regexp matcher", Qunbound);
144 } 146 }
145 147
146 /* Compile a regexp and signal a Lisp error if anything goes wrong. 148 /* Compile a regexp and signal a Lisp error if anything goes wrong.
241 } 243 }
242 244
243 /* Error condition used for failing searches */ 245 /* Error condition used for failing searches */
244 Lisp_Object Qsearch_failed; 246 Lisp_Object Qsearch_failed;
245 247
246 static Lisp_Object 248 static DECLARE_DOESNT_RETURN (signal_failure (Lisp_Object));
249
250 static DOESNT_RETURN
247 signal_failure (Lisp_Object arg) 251 signal_failure (Lisp_Object arg)
248 { 252 {
249 for (;;) 253 for (;;)
250 Fsignal (Qsearch_failed, list1 (arg)); 254 Fsignal (Qsearch_failed, list1 (arg));
251 return Qnil; /* Not reached. */
252 } 255 }
253 256
254 /* Convert the search registers from Bytebpos's to Charbpos's. Needs to be 257 /* Convert the search registers from Bytebpos's to Charbpos's. Needs to be
255 done after each regexp match that uses the search regs. 258 done after each regexp match that uses the search regs.
256 259
1157 : Qnil), posix); 1160 : Qnil), posix);
1158 1161
1159 if (np <= 0) 1162 if (np <= 0)
1160 { 1163 {
1161 if (NILP (noerror)) 1164 if (NILP (noerror))
1162 return signal_failure (string); 1165 {
1166 signal_failure (string);
1167 RETURN_NOT_REACHED (Qnil);
1168 }
1163 if (!EQ (noerror, Qt)) 1169 if (!EQ (noerror, Qt))
1164 { 1170 {
1165 if (lim < BUF_BEGV (buf) || lim > BUF_ZV (buf)) 1171 if (lim < BUF_BEGV (buf) || lim > BUF_ZV (buf))
1166 abort (); 1172 abort ();
1167 BUF_SET_PT (buf, lim); 1173 BUF_SET_PT (buf, lim);