diff options
| author | Joakim Verona | 2011-06-23 01:28:30 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-06-23 01:28:30 +0200 |
| commit | c5082a753011dacef505e91f1fc30a84fa75a2eb (patch) | |
| tree | 2c995eff276b6e9e68f54b4ebe76bf012231c86d /src/intervals.c | |
| parent | 787c27e81f046cfa1c457ed405551f8ca0ddb0e8 (diff) | |
| parent | 297dde5a97c0c5c8020db72213c7f84067f1ee21 (diff) | |
| download | emacs-c5082a753011dacef505e91f1fc30a84fa75a2eb.tar.gz emacs-c5082a753011dacef505e91f1fc30a84fa75a2eb.zip | |
merge upstream
Diffstat (limited to 'src/intervals.c')
| -rw-r--r-- | src/intervals.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/intervals.c b/src/intervals.c index f9e9c864e13..4de001f2ffc 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -1425,10 +1425,15 @@ adjust_intervals_for_deletion (struct buffer *buffer, | |||
| 1425 | /* Make the adjustments necessary to the interval tree of BUFFER to | 1425 | /* Make the adjustments necessary to the interval tree of BUFFER to |
| 1426 | represent an addition or deletion of LENGTH characters starting | 1426 | represent an addition or deletion of LENGTH characters starting |
| 1427 | at position START. Addition or deletion is indicated by the sign | 1427 | at position START. Addition or deletion is indicated by the sign |
| 1428 | of LENGTH. */ | 1428 | of LENGTH. |
| 1429 | 1429 | ||
| 1430 | inline void | 1430 | The two inline functions (one static) pacify Sun C 5.8, a pre-C99 |
| 1431 | offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) | 1431 | compiler that does not allow calling a static function (here, |
| 1432 | adjust_intervals_for_deletion) from a non-static inline function. */ | ||
| 1433 | |||
| 1434 | static inline void | ||
| 1435 | static_offset_intervals (struct buffer *buffer, EMACS_INT start, | ||
| 1436 | EMACS_INT length) | ||
| 1432 | { | 1437 | { |
| 1433 | if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) | 1438 | if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) |
| 1434 | return; | 1439 | return; |
| @@ -1441,6 +1446,12 @@ offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) | |||
| 1441 | adjust_intervals_for_deletion (buffer, start, -length); | 1446 | adjust_intervals_for_deletion (buffer, start, -length); |
| 1442 | } | 1447 | } |
| 1443 | } | 1448 | } |
| 1449 | |||
| 1450 | inline void | ||
| 1451 | offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) | ||
| 1452 | { | ||
| 1453 | static_offset_intervals (buffer, start, length); | ||
| 1454 | } | ||
| 1444 | 1455 | ||
| 1445 | /* Merge interval I with its lexicographic successor. The resulting | 1456 | /* Merge interval I with its lexicographic successor. The resulting |
| 1446 | interval is returned, and has the properties of the original | 1457 | interval is returned, and has the properties of the original |