Mercurial > hg > xemacs-beta
comparison src/line-number.c @ 286:57709be46d1b r21-0b41
Import from CVS: tag r21-0b41
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:35:03 +0200 |
parents | 558f606b08ae |
children | 70ad99077275 |
comparison
equal
deleted
inserted
replaced
285:9a3756523c1b | 286:57709be46d1b |
---|---|
187 | 187 |
188 if ((to - from) > LINE_NUMBER_LARGE_STRING) | 188 if ((to - from) > LINE_NUMBER_LARGE_STRING) |
189 invalidate_line_number_cache (b, from); | 189 invalidate_line_number_cache (b, from); |
190 else | 190 else |
191 { | 191 { |
192 int shortage; | 192 EMACS_INT shortage; |
193 scan_buffer (b, '\n', from, to, 1, &shortage, 0); | 193 scan_buffer (b, '\n', from, to, 1, &shortage, 0); |
194 if (!shortage) | 194 if (!shortage) |
195 invalidate_line_number_cache (b, from); | 195 invalidate_line_number_cache (b, from); |
196 } | 196 } |
197 } | 197 } |
296 } | 296 } |
297 | 297 |
298 /* An EMACS_MAXINT would be cool to have. */ | 298 /* An EMACS_MAXINT would be cool to have. */ |
299 #define LOTS 999999999 | 299 #define LOTS 999999999 |
300 | 300 |
301 scan_buffer (b, '\n', beg, pos, pos > beg ? LOTS : -LOTS, | 301 scan_buffer (b, '\n', beg, pos, pos > beg ? LOTS : -LOTS, &shortage, 0); |
302 (int *)&shortage, 0); | |
303 | 302 |
304 line = LOTS - shortage; | 303 line = LOTS - shortage; |
305 if (beg > pos) | 304 if (beg > pos) |
306 line = -line; | 305 line = -line; |
307 line += cached_lines; | 306 line += cached_lines; |