]> code.delx.au - gnu-emacs/blobdiff - src/intervals.h
test/automated: Use relative filename for emacs executable
[gnu-emacs] / src / intervals.h
index b50016eeb59a2835160fd19ad8c4f2eef88498f7..51dfa09c5c4af3a53098d0ab663f12306d890452 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions and global variables for intervals.
-   Copyright (C) 1993-1994, 2000-201 Free Software Foundation, Inc.
+   Copyright (C) 1993-1994, 2000-2013 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -133,48 +133,17 @@ struct interval
 /* Use these functions to set Lisp_Object
    or pointer slots of struct interval.  */
 
-LISP_INLINE void
-interval_set_parent (INTERVAL i, INTERVAL parent)
+INLINE void
+set_interval_parent (INTERVAL i, INTERVAL parent)
 {
   i->up_obj = 0;
   i->up.interval = parent;
 }
 
-LISP_INLINE void
-interval_set_object (INTERVAL i, Lisp_Object obj)
-{
-  eassert (BUFFERP (obj) || STRINGP (obj));
-  i->up_obj = 1;
-  i->up.obj = obj;
-}
-
-LISP_INLINE void
-interval_set_left (INTERVAL i, INTERVAL left)
-{
-  i->left = left;
-}
-
-LISP_INLINE void
-interval_set_right (INTERVAL i, INTERVAL right)
-{
-  i->right = right;
-}
-
-LISP_INLINE Lisp_Object
-interval_set_plist (INTERVAL i, Lisp_Object plist)
+INLINE void
+set_interval_plist (INTERVAL i, Lisp_Object plist)
 {
   i->plist = plist;
-  return plist;
-}
-
-/* Make the parent of D be whatever the parent of S is, regardless
-   of the type.  This is used when balancing an interval tree.  */
-
-LISP_INLINE void
-interval_copy_parent (INTERVAL d, INTERVAL s)
-{
-  d->up = s->up;
-  d->up_obj = s->up_obj;
 }
 
 /* Get the parent interval, if any, otherwise a null pointer.  Useful
@@ -188,11 +157,11 @@ interval_copy_parent (INTERVAL d, INTERVAL s)
 {                                            \
   (i)->total_length = (i)->position = 0;      \
   (i)->left = (i)->right = NULL;             \
-  interval_set_parent (i, NULL);             \
+  set_interval_parent (i, NULL);             \
   (i)->write_protect = 0;                    \
   (i)->visible = 0;                          \
   (i)->front_sticky = (i)->rear_sticky = 0;   \
-  interval_set_plist (i, Qnil);                      \
+  set_interval_plist (i, Qnil);                      \
 }
 
 /* Copy the cached property values of interval FROM to interval TO.  */
@@ -213,15 +182,6 @@ interval_copy_parent (INTERVAL d, INTERVAL s)
   if ((from)->rear_sticky) (to)->rear_sticky = 1;     \
 }
 
-/* Macro determining whether the properties of an interval being
-   inserted should be merged with the properties of the text where
-   they are being inserted.  */
-#define MERGE_INSERTIONS(i) 1
-
-/* Macro determining if an invisible interval should be displayed
-   as a special glyph, or not at all.  */
-#define DISPLAY_INVISIBLE_GLYPH(i) 0
-
 /* Is this interval visible?  Replace later with cache access.  */
 #define INTERVAL_VISIBLE_P(i) \
   (i && NILP (textget ((i)->plist, Qinvisible)))
@@ -264,7 +224,7 @@ extern INTERVAL make_interval (void);
 
 extern INTERVAL create_root_interval (Lisp_Object);
 extern void copy_properties (INTERVAL, INTERVAL);
-extern int intervals_equal (INTERVAL, INTERVAL);
+extern bool intervals_equal (INTERVAL, INTERVAL);
 extern void traverse_intervals (INTERVAL, ptrdiff_t,
                                 void (*) (INTERVAL, Lisp_Object),
                                 Lisp_Object);
@@ -279,24 +239,24 @@ extern INTERVAL previous_interval (INTERVAL);
 extern INTERVAL merge_interval_left (INTERVAL);
 extern void offset_intervals (struct buffer *, ptrdiff_t, ptrdiff_t);
 extern void graft_intervals_into_buffer (INTERVAL, ptrdiff_t, ptrdiff_t,
-                                         struct buffer *, int);
+                                         struct buffer *, bool);
 extern void verify_interval_modification (struct buffer *,
                                          ptrdiff_t, ptrdiff_t);
 extern INTERVAL balance_intervals (INTERVAL);
 extern void copy_intervals_to_string (Lisp_Object, struct buffer *,
                                              ptrdiff_t, ptrdiff_t);
 extern INTERVAL copy_intervals (INTERVAL, ptrdiff_t, ptrdiff_t);
-extern int compare_string_intervals (Lisp_Object, Lisp_Object);
+extern bool compare_string_intervals (Lisp_Object, Lisp_Object);
 extern Lisp_Object textget (Lisp_Object, Lisp_Object);
-extern Lisp_Object lookup_char_property (Lisp_Object, Lisp_Object, int);
+extern Lisp_Object lookup_char_property (Lisp_Object, Lisp_Object, bool);
 extern void move_if_not_intangible (ptrdiff_t);
-extern int get_property_and_range (ptrdiff_t, Lisp_Object, Lisp_Object *,
-                                   ptrdiff_t *, ptrdiff_t *, Lisp_Object);
+extern bool get_property_and_range (ptrdiff_t, Lisp_Object, Lisp_Object *,
+                                   ptrdiff_t *, ptrdiff_t *, Lisp_Object);
 extern Lisp_Object get_local_map (ptrdiff_t, struct buffer *, Lisp_Object);
 extern INTERVAL update_interval (INTERVAL, ptrdiff_t);
-extern void set_intervals_multibyte (int);
+extern void set_intervals_multibyte (bool);
 extern INTERVAL validate_interval_range (Lisp_Object, Lisp_Object *,
-                                         Lisp_Object *, int);
+                                         Lisp_Object *, bool);
 extern INTERVAL interval_of (ptrdiff_t, Lisp_Object);
 
 /* Defined in xdisp.c.  */
@@ -330,7 +290,7 @@ extern void set_text_properties_1 (Lisp_Object, Lisp_Object,
 
 Lisp_Object text_property_list (Lisp_Object, Lisp_Object, Lisp_Object,
                                 Lisp_Object);
-int add_text_properties_from_list (Lisp_Object, Lisp_Object, Lisp_Object);
+void add_text_properties_from_list (Lisp_Object, Lisp_Object, Lisp_Object);
 Lisp_Object extend_property_ranges (Lisp_Object, Lisp_Object);
 Lisp_Object get_char_property_and_overlay (Lisp_Object, Lisp_Object,
                                            Lisp_Object, Lisp_Object*);