+/* Basic data type for use of intervals. */
+
+struct interval
+{
+ /* The first group of entries deal with the tree structure. */
+
+ unsigned EMACS_INT total_length; /* Length of myself and both children. */
+ unsigned EMACS_INT position; /* Cache of interval's character position. */
+ /* This field is usually updated
+ simultaneously with an interval
+ traversal, there is no guarantee
+ that it is valid for a random
+ interval. */
+ struct interval *left; /* Intervals which precede me. */
+ struct interval *right; /* Intervals which succeed me. */
+
+ /* Parent in the tree, or the Lisp_Object containing this interval tree. */
+ union
+ {
+ struct interval *interval;
+ Lisp_Object obj;
+ } up;
+ unsigned int up_obj : 1;
+
+ unsigned gcmarkbit : 1;
+
+ /* The remaining components are `properties' of the interval.
+ The first four are duplicates for things which can be on the list,
+ for purposes of speed. */
+
+ unsigned int write_protect : 1; /* Non-zero means can't modify. */
+ unsigned int visible : 1; /* Zero means don't display. */
+ unsigned int front_sticky : 1; /* Non-zero means text inserted just
+ before this interval goes into it. */
+ unsigned int rear_sticky : 1; /* Likewise for just after it. */
+
+ /* Properties of this interval.
+ The mark bit on this field says whether this particular interval
+ tree node has been visited. Since intervals should never be
+ shared, GC aborts if it seems to have visited an interval twice. */
+ Lisp_Object plist;
+};
+