Mercurial > hg > xemacs-beta
comparison src/marker.c @ 840:1e4e42de23d5
[xemacs-hg @ 2002-05-14 13:03:54 by ben]
To: xemacs-patches@xemacs.org
callproc.c: Use Fget_buffer_create() with a string buffer, as documented.
extents.c: indentation.
lstream.c: fix a bug in selective-display
handling; not the crash we're seeing.
marker.c: delete superfluous error-checking -- it's already there in
bytebpos_to_membpos() and vice-versa.
author | ben |
---|---|
date | Tue, 14 May 2002 13:04:00 +0000 |
parents | 6728e641994e |
children | c925bacdda60 |
comparison
equal
deleted
inserted
replaced
839:182d9d1c71a5 | 840:1e4e42de23d5 |
---|---|
334 shit, I don't think this can happen. In any case, the following | 334 shit, I don't think this can happen. In any case, the following |
335 macro has an assert() in it that will catch these denormalized | 335 macro has an assert() in it that will catch these denormalized |
336 positions. */ | 336 positions. */ |
337 pos = membpos_to_bytebpos (buf, m->membpos); | 337 pos = membpos_to_bytebpos (buf, m->membpos); |
338 | 338 |
339 #ifdef ERROR_CHECK_TEXT | |
340 if (pos < BYTE_BUF_BEG (buf) || pos > BYTE_BUF_Z (buf)) | |
341 abort (); | |
342 #endif | |
343 | |
344 return pos; | 339 return pos; |
345 } | 340 } |
346 | 341 |
347 Charbpos | 342 Charbpos |
348 marker_position (Lisp_Object marker) | 343 marker_position (Lisp_Object marker) |
361 Lisp_Marker *m = XMARKER (marker); | 356 Lisp_Marker *m = XMARKER (marker); |
362 struct buffer *buf = m->buffer; | 357 struct buffer *buf = m->buffer; |
363 | 358 |
364 if (!buf) | 359 if (!buf) |
365 invalid_argument ("Marker does not point anywhere", Qunbound); | 360 invalid_argument ("Marker does not point anywhere", Qunbound); |
366 | |
367 #ifdef ERROR_CHECK_TEXT | |
368 if (pos < BYTE_BUF_BEG (buf) || pos > BYTE_BUF_Z (buf)) | |
369 abort (); | |
370 #endif | |
371 | 361 |
372 m->membpos = bytebpos_to_membpos (buf, pos); | 362 m->membpos = bytebpos_to_membpos (buf, pos); |
373 } | 363 } |
374 | 364 |
375 void | 365 void |