Mercurial > emacs
comparison src/intervals.c @ 91053:a0e466c4d599
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 887-889)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 116-121)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-268
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 15 Oct 2007 05:03:21 +0000 |
parents | 424b655804ca 09574ceaf070 |
children | 606f2d163a64 |
comparison
equal
deleted
inserted
replaced
91052:72adb6e72b67 | 91053:a0e466c4d599 |
---|---|
425 if (old_diff > 0) | 425 if (old_diff > 0) |
426 { | 426 { |
427 /* Since the left child is longer, there must be one. */ | 427 /* Since the left child is longer, there must be one. */ |
428 new_diff = i->total_length - i->left->total_length | 428 new_diff = i->total_length - i->left->total_length |
429 + RIGHT_TOTAL_LENGTH (i->left) - LEFT_TOTAL_LENGTH (i->left); | 429 + RIGHT_TOTAL_LENGTH (i->left) - LEFT_TOTAL_LENGTH (i->left); |
430 if (abs (new_diff) >= old_diff) | 430 if (eabs (new_diff) >= old_diff) |
431 break; | 431 break; |
432 i = rotate_right (i); | 432 i = rotate_right (i); |
433 balance_an_interval (i->right); | 433 balance_an_interval (i->right); |
434 } | 434 } |
435 else if (old_diff < 0) | 435 else if (old_diff < 0) |
436 { | 436 { |
437 /* Since the right child is longer, there must be one. */ | 437 /* Since the right child is longer, there must be one. */ |
438 new_diff = i->total_length - i->right->total_length | 438 new_diff = i->total_length - i->right->total_length |
439 + LEFT_TOTAL_LENGTH (i->right) - RIGHT_TOTAL_LENGTH (i->right); | 439 + LEFT_TOTAL_LENGTH (i->right) - RIGHT_TOTAL_LENGTH (i->right); |
440 if (abs (new_diff) >= -old_diff) | 440 if (eabs (new_diff) >= -old_diff) |
441 break; | 441 break; |
442 i = rotate_left (i); | 442 i = rotate_left (i); |
443 balance_an_interval (i->left); | 443 balance_an_interval (i->left); |
444 } | 444 } |
445 else | 445 else |