summaryrefslogtreecommitdiff
path: root/src/intervals.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-20 01:04:17 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-20 01:04:17 -0700
commitc20db43fef1bceb545b05bec2dbf18b1fbb2b533 (patch)
tree7d2186191340a2d33fdf47b68c626e51f9608d39 /src/intervals.c
parent2538aa2f5f92dd8878652d299e7d6ebabc352075 (diff)
downloademacs-c20db43fef1bceb545b05bec2dbf18b1fbb2b533.tar.gz
* intervals.h (struct interval): Use EMACS_INT for members
where EMACS_UINT might cause problems. See <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>. (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed. * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT. All uses changed.
Diffstat (limited to 'src/intervals.c')
-rw-r--r--src/intervals.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/intervals.c b/src/intervals.c
index 3e73110845d..8f3840976d0 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1313,7 +1313,7 @@ delete_interval (register INTERVAL i)
Do this by recursing down TREE to the interval in question, and
deleting the appropriate amount of text. */
-static EMACS_UINT
+static EMACS_INT
interval_deletion_adjustment (register INTERVAL tree, register EMACS_INT from,
register EMACS_INT amount)
{
@@ -1325,9 +1325,9 @@ interval_deletion_adjustment (register INTERVAL tree, register EMACS_INT from,
/* Left branch */
if (relative_position < LEFT_TOTAL_LENGTH (tree))
{
- EMACS_UINT subtract = interval_deletion_adjustment (tree->left,
- relative_position,
- amount);
+ EMACS_INT subtract = interval_deletion_adjustment (tree->left,
+ relative_position,
+ amount);
tree->total_length -= subtract;
CHECK_TOTAL_LENGTH (tree);
return subtract;
@@ -1336,7 +1336,7 @@ interval_deletion_adjustment (register INTERVAL tree, register EMACS_INT from,
else if (relative_position >= (TOTAL_LENGTH (tree)
- RIGHT_TOTAL_LENGTH (tree)))
{
- EMACS_UINT subtract;
+ EMACS_INT subtract;
relative_position -= (tree->total_length
- RIGHT_TOTAL_LENGTH (tree));
@@ -1378,7 +1378,7 @@ static void
adjust_intervals_for_deletion (struct buffer *buffer,
EMACS_INT start, EMACS_INT length)
{
- register EMACS_UINT left_to_delete = length;
+ register EMACS_INT left_to_delete = length;
register INTERVAL tree = BUF_INTERVALS (buffer);
Lisp_Object parent;
EMACS_INT offset;