changeset 26372:f35140f031b4

Remove conditional compilation on USE_TEXT_PROPERTIES.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 07 Nov 1999 15:52:40 +0000
parents 9e9129128bef
children e05151bc6531
files src/alloc.c src/buffer.c src/editfns.c
diffstat 3 files changed, 0 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c	Sun Nov 07 13:07:56 1999 +0000
+++ b/src/alloc.c	Sun Nov 07 15:52:40 1999 +0000
@@ -483,7 +483,6 @@
 
 /* Interval allocation.  */
 
-#ifdef USE_TEXT_PROPERTIES
 #define INTERVAL_BLOCK_SIZE \
   ((1020 - sizeof (struct interval_block *)) / sizeof (struct interval))
 
@@ -596,14 +595,6 @@
      } 								\
 }
 
-#else  /* no interval use */
-
-#define INIT_INTERVALS
-
-#define UNMARK_BALANCE_INTERVALS(i)
-#define MARK_INTERVAL_TREE(i)
-
-#endif /* no interval use */
 
 /* Floating point allocation.  */
 
@@ -1554,9 +1545,7 @@
 
   /* We must give strings in pure storage some kind of interval.  So we
      give them a null one.  */
-#if defined (USE_TEXT_PROPERTIES)
   XSTRING (new)->intervals = NULL_INTERVAL;
-#endif
   pureptr += size;
   return new;
 }
@@ -1972,12 +1961,8 @@
 		(make_number (0), make_number (0)),
 #endif /* not LISP_FLOAT_TYPE */
 		Fcons (Fcons
-#ifdef USE_TEXT_PROPERTIES
 		       (make_number (total_intervals),
 			make_number (total_free_intervals)),
-#else /* not USE_TEXT_PROPERTIES */
-		       (make_number (0), make_number (0)),
-#endif /* not USE_TEXT_PROPERTIES */
 		       Qnil)))))));
 }
 
@@ -2787,7 +2772,6 @@
   }
 #endif /* LISP_FLOAT_TYPE */
 
-#ifdef USE_TEXT_PROPERTIES
   /* Put all unmarked intervals on free list */
   {
     register struct interval_block *iblk;
@@ -2837,7 +2821,6 @@
     total_intervals = num_used;
     total_free_intervals = num_free;
   }
-#endif /* USE_TEXT_PROPERTIES */
 
   /* Put all unmarked symbols on free list */
   {
@@ -3176,7 +3159,6 @@
 	      /* Store the actual size in the size field.  */
 	      newaddr->size = size;
 
-#ifdef USE_TEXT_PROPERTIES
 	      /* Now that the string has been relocated, rebalance its
                  interval tree, and update the tree's parent pointer. */
 	      if (! NULL_INTERVAL_P (newaddr->intervals))
@@ -3185,7 +3167,6 @@
 		  XSETSTRING (* (Lisp_Object *) &newaddr->intervals->parent,
 			      newaddr);
 		}
-#endif /* USE_TEXT_PROPERTIES */
 	    }
 	  else if (size_byte < 0)
 	    size_byte = size;
--- a/src/buffer.c	Sun Nov 07 13:07:56 1999 +0000
+++ b/src/buffer.c	Sun Nov 07 15:52:40 1999 +0000
@@ -1185,10 +1185,7 @@
 	  m->chain = Qnil;
 	}
       BUF_MARKERS (b) = Qnil;
-
-#ifdef USE_TEXT_PROPERTIES
       BUF_INTERVALS (b) = NULL_INTERVAL;
-#endif
 
       /* Perhaps we should explicitly free the interval tree here... */
     }
@@ -3826,10 +3823,8 @@
   /* Prevent GC from getting confused.  */
   buffer_defaults.text = &buffer_defaults.own_text;
   buffer_local_symbols.text = &buffer_local_symbols.own_text;
-#ifdef USE_TEXT_PROPERTIES
   BUF_INTERVALS (&buffer_defaults) = 0;
   BUF_INTERVALS (&buffer_local_symbols) = 0;
-#endif
   XSETBUFFER (Vbuffer_defaults, &buffer_defaults);
   XSETBUFFER (Vbuffer_local_symbols, &buffer_local_symbols);
 
--- a/src/editfns.c	Sun Nov 07 13:07:56 1999 +0000
+++ b/src/editfns.c	Sun Nov 07 15:52:40 1999 +0000
@@ -1939,7 +1939,6 @@
 	 end_byte - start_byte);
 
   /* If desired, update and copy the text properties.  */
-#ifdef USE_TEXT_PROPERTIES
   if (props)
     {
       update_buffer_properties (start, end);
@@ -1951,7 +1950,6 @@
 	copy_intervals_to_string (result, current_buffer, start,
 				  end - start);
     }
-#endif
 
   return result;
 }
@@ -1963,7 +1961,6 @@
 update_buffer_properties (start, end)
      int start, end;
 {
-#ifdef USE_TEXT_PROPERTIES
   /* If this buffer has some access functions,
      call them, specifying the range of the buffer being accessed.  */
   if (!NILP (Vbuffer_access_fontify_functions))
@@ -1988,7 +1985,6 @@
       else
 	Frun_hook_with_args (3, args);
     }
-#endif
 }
 
 DEFUN ("buffer-substring", Fbuffer_substring, Sbuffer_substring, 2, 2, 0,
@@ -3341,10 +3337,8 @@
   int combined_before_bytes_2, combined_after_bytes_2;
   struct gcpro gcpro1, gcpro2;
 
-#ifdef USE_TEXT_PROPERTIES
   INTERVAL cur_intv, tmp_interval1, tmp_interval_mid, tmp_interval2;
   cur_intv = BUF_INTERVALS (current_buffer);
-#endif /* USE_TEXT_PROPERTIES */
 
   validate_region (&startr1, &endr1);
   validate_region (&startr2, &endr2);
@@ -3478,12 +3472,10 @@
       modify_region (current_buffer, start1, end2);
       record_change (start1, len1 + len2);
 
-#ifdef USE_TEXT_PROPERTIES
       tmp_interval1 = copy_intervals (cur_intv, start1, len1);
       tmp_interval2 = copy_intervals (cur_intv, start2, len2);
       Fset_text_properties (make_number (start1), make_number (end2),
 			    Qnil, Qnil);
-#endif /* USE_TEXT_PROPERTIES */
 
       /* First region smaller than second.  */
       if (len1_byte < len2_byte)
@@ -3522,12 +3514,10 @@
 	  if (len1_byte > 20000)
 	    free (temp);
         }
-#ifdef USE_TEXT_PROPERTIES
       graft_intervals_into_buffer (tmp_interval1, start1 + len2,
                                    len1, current_buffer, 0);
       graft_intervals_into_buffer (tmp_interval2, start1,
                                    len2, current_buffer, 0);
-#endif /* USE_TEXT_PROPERTIES */
     }
   /* Non-adjacent regions, because end1 != start2, bleagh...  */
   else
@@ -3541,14 +3531,12 @@
           modify_region (current_buffer, start2, end2);
           record_change (start1, len1);
           record_change (start2, len2);
-#ifdef USE_TEXT_PROPERTIES
           tmp_interval1 = copy_intervals (cur_intv, start1, len1);
           tmp_interval2 = copy_intervals (cur_intv, start2, len2);
           Fset_text_properties (make_number (start1), make_number (end1),
 				Qnil, Qnil);
           Fset_text_properties (make_number (start2), make_number (end2),
 				Qnil, Qnil);
-#endif /* USE_TEXT_PROPERTIES */
 
 	  if (len1_byte > 20000)
 	    temp = (unsigned char *) xmalloc (len1_byte);
@@ -3561,12 +3549,10 @@
           bcopy (temp, start2_addr, len1_byte);
 	  if (len1_byte > 20000)
 	    free (temp);
-#ifdef USE_TEXT_PROPERTIES
           graft_intervals_into_buffer (tmp_interval1, start2,
                                        len1, current_buffer, 0);
           graft_intervals_into_buffer (tmp_interval2, start1,
                                        len2, current_buffer, 0);
-#endif /* USE_TEXT_PROPERTIES */
         }
 
       else if (len1_byte < len2_byte)	/* Second region larger than first */
@@ -3574,13 +3560,11 @@
         {
           modify_region (current_buffer, start1, end2);
           record_change (start1, (end2 - start1));
-#ifdef USE_TEXT_PROPERTIES
           tmp_interval1 = copy_intervals (cur_intv, start1, len1);
           tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid);
           tmp_interval2 = copy_intervals (cur_intv, start2, len2);
           Fset_text_properties (make_number (start1), make_number (end2),
 				Qnil, Qnil);
-#endif /* USE_TEXT_PROPERTIES */
 
 	  /* holds region 2 */
 	  if (len2_byte > 20000)
@@ -3595,14 +3579,12 @@
           bcopy (temp, start1_addr, len2_byte);
 	  if (len2_byte > 20000)
 	    free (temp);
-#ifdef USE_TEXT_PROPERTIES
           graft_intervals_into_buffer (tmp_interval1, end2 - len1,
                                        len1, current_buffer, 0);
           graft_intervals_into_buffer (tmp_interval_mid, start1 + len2,
                                        len_mid, current_buffer, 0);
           graft_intervals_into_buffer (tmp_interval2, start1,
                                        len2, current_buffer, 0);
-#endif /* USE_TEXT_PROPERTIES */
         }
       else
 	/* Second region smaller than first.  */
@@ -3610,13 +3592,11 @@
           record_change (start1, (end2 - start1));
           modify_region (current_buffer, start1, end2);
 
-#ifdef USE_TEXT_PROPERTIES
           tmp_interval1 = copy_intervals (cur_intv, start1, len1);
           tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid);
           tmp_interval2 = copy_intervals (cur_intv, start2, len2);
           Fset_text_properties (make_number (start1), make_number (end2),
 				Qnil, Qnil);
-#endif /* USE_TEXT_PROPERTIES */
 
 	  /* holds region 1 */
 	  if (len1_byte > 20000)
@@ -3631,14 +3611,12 @@
           bcopy (temp, start1_addr + len2_byte + len_mid, len1_byte);
 	  if (len1_byte > 20000)
 	    free (temp);
-#ifdef USE_TEXT_PROPERTIES
           graft_intervals_into_buffer (tmp_interval1, end2 - len1,
                                        len1, current_buffer, 0);
           graft_intervals_into_buffer (tmp_interval_mid, start1 + len2,
                                        len_mid, current_buffer, 0);
           graft_intervals_into_buffer (tmp_interval2, start1,
                                        len2, current_buffer, 0);
-#endif /* USE_TEXT_PROPERTIES */
         }
     }