Mercurial > hg > xemacs-beta
comparison src/extents.h @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | 0d2f883870bc |
children | 489f57a838ef |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
88 } flags; | 88 } flags; |
89 /* The plist may have an auxiliary structure as its first element */ | 89 /* The plist may have an auxiliary structure as its first element */ |
90 Lisp_Object plist; | 90 Lisp_Object plist; |
91 }; | 91 }; |
92 | 92 |
93 typedef struct extent *EXTENT; | |
94 | |
95 /* Basic properties of an extent (not affected by the extent's parent) */ | 93 /* Basic properties of an extent (not affected by the extent's parent) */ |
96 #define extent_object(e) ((e)->object) | 94 #define extent_object(e) ((e)->object) |
97 #define extent_start(e) ((e)->start + 0) | 95 #define extent_start(e) ((e)->start + 0) |
98 #define extent_end(e) ((e)->end + 0) | 96 #define extent_end(e) ((e)->end + 0) |
99 #define set_extent_start(e, val) ((e)->start = (val)) | 97 #define set_extent_start(e, val) ((e)->start = (val)) |
112 /* Additional information that may be present in an extent. The idea is | 110 /* Additional information that may be present in an extent. The idea is |
113 that fast access is provided to this information, but since (hopefully) | 111 that fast access is provided to this information, but since (hopefully) |
114 most extents won't have this set on them, we usually don't need to | 112 most extents won't have this set on them, we usually don't need to |
115 have this structure around and thus the size of an extent is smaller. */ | 113 have this structure around and thus the size of an extent is smaller. */ |
116 | 114 |
115 typedef struct extent_auxiliary extent_auxiliary; | |
117 struct extent_auxiliary | 116 struct extent_auxiliary |
118 { | 117 { |
119 struct lcrecord_header header; | 118 struct lcrecord_header header; |
120 | 119 |
121 Lisp_Object begin_glyph; | 120 Lisp_Object begin_glyph; |
219 #define ensure_extent_has_auxiliary(e) \ | 218 #define ensure_extent_has_auxiliary(e) \ |
220 MAC_BEGIN \ | 219 MAC_BEGIN \ |
221 MAC_DECLARE (EXTENT, MTensure_extent, e) \ | 220 MAC_DECLARE (EXTENT, MTensure_extent, e) \ |
222 (MTensure_extent->flags.has_aux ? (void) 0 : \ | 221 (MTensure_extent->flags.has_aux ? (void) 0 : \ |
223 allocate_extent_auxiliary (MTensure_extent)) \ | 222 allocate_extent_auxiliary (MTensure_extent)) \ |
224 MAC_END | 223 MAC_END |
225 | 224 |
226 #define set_extent_no_chase_aux_field(e, field, value) \ | 225 #define set_extent_no_chase_aux_field(e, field, value) \ |
227 MAC_BEGIN \ | 226 MAC_BEGIN \ |
228 MAC_DECLARE (EXTENT, MTset_extent, e) \ | 227 MAC_DECLARE (EXTENT, MTset_extent, e) \ |
229 ensure_extent_has_auxiliary (MTset_extent) \ | 228 ensure_extent_has_auxiliary (MTset_extent) \ |
291 MAC_BEGIN \ | 290 MAC_BEGIN \ |
292 MAC_DECLARE (EXTENT, MTplist_extent, e) \ | 291 MAC_DECLARE (EXTENT, MTplist_extent, e) \ |
293 (MTplist_extent->flags.has_aux ? \ | 292 (MTplist_extent->flags.has_aux ? \ |
294 &XCONS (MTplist_extent->plist)->cdr : \ | 293 &XCONS (MTplist_extent->plist)->cdr : \ |
295 &MTplist_extent->plist) \ | 294 &MTplist_extent->plist) \ |
296 MAC_END | 295 MAC_END |
297 #define extent_no_chase_plist(e) (*extent_no_chase_plist_addr (e)) | 296 #define extent_no_chase_plist(e) (*extent_no_chase_plist_addr (e)) |
298 | 297 |
299 #define extent_plist_addr(e) extent_no_chase_plist_addr (extent_ancestor (e)) | 298 #define extent_plist_addr(e) extent_no_chase_plist_addr (extent_ancestor (e)) |
300 #define extent_plist_slot(e) extent_no_chase_plist (extent_ancestor (e)) | 299 #define extent_plist_slot(e) extent_no_chase_plist (extent_ancestor (e)) |
301 | 300 |