[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/intervals.c
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/src/intervals.c |
Date: |
Fri, 18 Oct 2002 06:03:35 -0400 |
Index: emacs/src/intervals.c
diff -c emacs/src/intervals.c:1.117 emacs/src/intervals.c:1.118
*** emacs/src/intervals.c:1.117 Mon Jul 15 02:56:10 2002
--- emacs/src/intervals.c Fri Oct 18 06:03:10 2002
***************
*** 347,356 ****
/* Assuming that a right child exists, perform the following operation:
! A B
! / \ / \
B => A
! / \ / \
c c
*/
--- 347,356 ----
/* Assuming that a right child exists, perform the following operation:
! A B
! / \ / \
B => A
! / \ / \
c c
*/
***************
*** 524,530 ****
new->total_length = new_length + new->right->total_length;
balance_an_interval (new);
}
!
balance_possible_root_interval (interval);
return new;
--- 524,530 ----
new->total_length = new_length + new->right->total_length;
balance_an_interval (new);
}
!
balance_possible_root_interval (interval);
return new;
***************
*** 569,575 ****
new->total_length = new_length + new->left->total_length;
balance_an_interval (new);
}
!
balance_possible_root_interval (interval);
return new;
--- 569,575 ----
new->total_length = new_length + new->left->total_length;
balance_an_interval (new);
}
!
balance_possible_root_interval (interval);
return new;
***************
*** 754,792 ****
if (NULL_INTERVAL_P (i))
return NULL_INTERVAL;
! while (1)
{
! if (pos < i->position)
{
/* Move left. */
! if (pos >= i->position - TOTAL_LENGTH (i->left))
{
i->left->position = i->position - TOTAL_LENGTH (i->left)
+ LEFT_TOTAL_LENGTH (i->left);
i = i->left; /* Move to the left child */
}
! else if (NULL_PARENT (i))
error ("Point before start of properties");
! else
i = INTERVAL_PARENT (i);
continue;
}
else if (pos >= INTERVAL_LAST_POS (i))
{
/* Move right. */
! if (pos < INTERVAL_LAST_POS (i) + TOTAL_LENGTH (i->right))
{
i->right->position = INTERVAL_LAST_POS (i) +
LEFT_TOTAL_LENGTH (i->right);
i = i->right; /* Move to the right child */
}
! else if (NULL_PARENT (i))
error ("Point after end of properties");
! else
i = INTERVAL_PARENT (i);
continue;
}
! else
return i;
}
}
--- 754,792 ----
if (NULL_INTERVAL_P (i))
return NULL_INTERVAL;
! while (1)
{
! if (pos < i->position)
{
/* Move left. */
! if (pos >= i->position - TOTAL_LENGTH (i->left))
{
i->left->position = i->position - TOTAL_LENGTH (i->left)
+ LEFT_TOTAL_LENGTH (i->left);
i = i->left; /* Move to the left child */
}
! else if (NULL_PARENT (i))
error ("Point before start of properties");
! else
i = INTERVAL_PARENT (i);
continue;
}
else if (pos >= INTERVAL_LAST_POS (i))
{
/* Move right. */
! if (pos < INTERVAL_LAST_POS (i) + TOTAL_LENGTH (i->right))
{
i->right->position = INTERVAL_LAST_POS (i) +
LEFT_TOTAL_LENGTH (i->right);
i = i->right; /* Move to the right child */
}
! else if (NULL_PARENT (i))
error ("Point after end of properties");
! else
i = INTERVAL_PARENT (i);
continue;
}
! else
return i;
}
}
***************
*** 874,880 ****
int eobp = 0;
Lisp_Object parent;
int offset;
!
if (TOTAL_LENGTH (tree) == 0) /* Paranoia */
abort ();
--- 874,880 ----
int eobp = 0;
Lisp_Object parent;
int offset;
!
if (TOTAL_LENGTH (tree) == 0) /* Paranoia */
abort ();
***************
*** 989,995 ****
temp->total_length += length;
temp = balance_possible_root_interval (temp);
}
!
/* If at least one interval has sticky properties,
we check the stickiness property by property.
--- 989,995 ----
temp->total_length += length;
temp = balance_possible_root_interval (temp);
}
!
/* If at least one interval has sticky properties,
we check the stickiness property by property.
***************
*** 1046,1052 ****
temp = balance_possible_root_interval (temp);
}
}
!
return tree;
}
--- 1046,1052 ----
temp = balance_possible_root_interval (temp);
}
}
!
return tree;
}
***************
*** 1212,1218 ****
cat = textget (props, Qcategory);
if (! NILP (front)
! &&
/* If we have inherited a front-stick category property that is t,
we don't need to set up a detailed one. */
! (! NILP (cat) && SYMBOLP (cat)
--- 1212,1218 ----
cat = textget (props, Qcategory);
if (! NILP (front)
! &&
/* If we have inherited a front-stick category property that is t,
we don't need to set up a detailed one. */
! (! NILP (cat) && SYMBOLP (cat)
***************
*** 1222,1228 ****
}
! /* Delete an node I from its interval tree by merging its subtrees
into one subtree which is then returned. Caller is responsible for
storing the resulting subtree into its parent. */
--- 1222,1228 ----
}
! /* Delete a node I from its interval tree by merging its subtrees
into one subtree which is then returned. Caller is responsible for
storing the resulting subtree into its parent. */
***************
*** 1351,1357 ****
else
{
/* How much can we delete from this interval? */
! int my_amount = ((tree->total_length
- RIGHT_TOTAL_LENGTH (tree))
- relative_position);
--- 1351,1357 ----
else
{
/* How much can we delete from this interval? */
! int my_amount = ((tree->total_length
- RIGHT_TOTAL_LENGTH (tree))
- relative_position);
***************
*** 1361,1367 ****
tree->total_length -= amount;
if (LENGTH (tree) == 0)
delete_interval (tree);
!
return amount;
}
--- 1361,1367 ----
tree->total_length -= amount;
if (LENGTH (tree) == 0)
delete_interval (tree);
!
return amount;
}
***************
*** 1780,1786 ****
The properties of under are the result of
adjust_intervals_for_insertion, so stickiness has
already been taken care of. */
!
while (! NULL_INTERVAL_P (over))
{
if (LENGTH (over) < LENGTH (under))
--- 1780,1786 ----
The properties of under are the result of
adjust_intervals_for_insertion, so stickiness has
already been taken care of. */
!
while (! NULL_INTERVAL_P (over))
{
if (LENGTH (over) < LENGTH (under))
***************
*** 1805,1811 ****
/* Get the value of property PROP from PLIST,
which is the plist of an interval.
! We check for direct properties, for categories with property PROP,
and for PROP appearing on the default-text-properties list. */
Lisp_Object
--- 1805,1811 ----
/* Get the value of property PROP from PLIST,
which is the plist of an interval.
! We check for direct properties, for categories with property PROP,
and for PROP appearing on the default-text-properties list. */
Lisp_Object
***************
*** 1887,1893 ****
BUF_PT (buffer) = charpos;
}
! /* Set point in BUFFER to CHARPOS. If the target position is
before an intangible character, move to an ok place. */
void
--- 1887,1893 ----
BUF_PT (buffer) = charpos;
}
! /* Set point in BUFFER to CHARPOS. If the target position is
before an intangible character, move to an ok place. */
void
***************
*** 1907,1913 ****
TEST_OFFS should be either 0 or -1, and ADJ should be either 1 or -1.
Note that `stickiness' is determined by overlay marker insertion types,
! if the invisible property comes from an overlay. */
static int
adjust_for_invis_intang (pos, test_offs, adj, test_intang)
--- 1907,1913 ----
TEST_OFFS should be either 0 or -1, and ADJ should be either 1 or -1.
Note that `stickiness' is determined by overlay marker insertion types,
! if the invisible property comes from an overlay. */
static int
adjust_for_invis_intang (pos, test_offs, adj, test_intang)
***************
*** 1945,1951 ****
}
/* Set point in BUFFER to CHARPOS, which corresponds to byte
! position BYTEPOS. If the target position is
before an intangible character, move to an ok place. */
void
--- 1945,1951 ----
}
/* Set point in BUFFER to CHARPOS, which corresponds to byte
! position BYTEPOS. If the target position is
before an intangible character, move to an ok place. */
void
***************
*** 2218,2224 ****
}
! /* If the whole stretch between PT and POSITION isn't intangible,
try moving to POSITION (which means we actually move farther
if POSITION is inside of intangible text). */
--- 2218,2224 ----
}
! /* If the whole stretch between PT and POSITION isn't intangible,
try moving to POSITION (which means we actually move farther
if POSITION is inside of intangible text). */
***************
*** 2265,2271 ****
*start = i->position;
next = next_interval (i);
! while (! NULL_INTERVAL_P (next)
&& EQ (*val, textget (next->plist, prop)))
i = next, next = next_interval (next);
*end = i->position + LENGTH (i);
--- 2265,2271 ----
*start = i->position;
next = next_interval (i);
! while (! NULL_INTERVAL_P (next)
&& EQ (*val, textget (next->plist, prop)))
i = next, next = next_interval (next);
*end = i->position + LENGTH (i);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/intervals.c,
Juanma Barranquero <=