Mercurial > hg > xemacs-beta
comparison src/extents.c @ 400:a86b2b5e0111 r21-2-30
Import from CVS: tag r21-2-30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:14:34 +0200 |
parents | 74fd4e045ea6 |
children | 2f8bb876ab1d |
comparison
equal
deleted
inserted
replaced
399:376370fb5946 | 400:a86b2b5e0111 |
---|---|
1535 extent_endpoint_bytind (EXTENT extent, int endp) | 1535 extent_endpoint_bytind (EXTENT extent, int endp) |
1536 { | 1536 { |
1537 assert (EXTENT_LIVE_P (extent)); | 1537 assert (EXTENT_LIVE_P (extent)); |
1538 assert (!extent_detached_p (extent)); | 1538 assert (!extent_detached_p (extent)); |
1539 { | 1539 { |
1540 Memind i = (endp) ? (extent_end (extent)) : | 1540 Memind i = endp ? extent_end (extent) : extent_start (extent); |
1541 (extent_start (extent)); | |
1542 Lisp_Object obj = extent_object (extent); | 1541 Lisp_Object obj = extent_object (extent); |
1543 return buffer_or_string_memind_to_bytind (obj, i); | 1542 return buffer_or_string_memind_to_bytind (obj, i); |
1544 } | 1543 } |
1545 } | 1544 } |
1546 | 1545 |
1548 extent_endpoint_bufpos (EXTENT extent, int endp) | 1547 extent_endpoint_bufpos (EXTENT extent, int endp) |
1549 { | 1548 { |
1550 assert (EXTENT_LIVE_P (extent)); | 1549 assert (EXTENT_LIVE_P (extent)); |
1551 assert (!extent_detached_p (extent)); | 1550 assert (!extent_detached_p (extent)); |
1552 { | 1551 { |
1553 Memind i = (endp) ? (extent_end (extent)) : | 1552 Memind i = endp ? extent_end (extent) : extent_start (extent); |
1554 (extent_start (extent)); | |
1555 Lisp_Object obj = extent_object (extent); | 1553 Lisp_Object obj = extent_object (extent); |
1556 return buffer_or_string_memind_to_bufpos (obj, i); | 1554 return buffer_or_string_memind_to_bufpos (obj, i); |
1557 } | 1555 } |
1558 } | 1556 } |
1559 | 1557 |
6659 /************************************************************************/ | 6657 /************************************************************************/ |
6660 | 6658 |
6661 void | 6659 void |
6662 syms_of_extents (void) | 6660 syms_of_extents (void) |
6663 { | 6661 { |
6662 INIT_LRECORD_IMPLEMENTATION (extent); | |
6663 INIT_LRECORD_IMPLEMENTATION (extent_info); | |
6664 INIT_LRECORD_IMPLEMENTATION (extent_auxiliary); | |
6665 | |
6664 defsymbol (&Qextentp, "extentp"); | 6666 defsymbol (&Qextentp, "extentp"); |
6665 defsymbol (&Qextent_live_p, "extent-live-p"); | 6667 defsymbol (&Qextent_live_p, "extent-live-p"); |
6666 | 6668 |
6667 defsymbol (&Qall_extents_closed, "all-extents-closed"); | 6669 defsymbol (&Qall_extents_closed, "all-extents-closed"); |
6668 defsymbol (&Qall_extents_open, "all-extents-open"); | 6670 defsymbol (&Qall_extents_open, "all-extents-open"); |