summaryrefslogtreecommitdiff
path: root/src/intervals.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-06-21 09:47:56 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-06-21 09:47:56 -0700
commita9041e6caf73abe867602bc60f2f3d48601a908d (patch)
treeaa1e90adff88d8ee969184219019d49f2e716ac6 /src/intervals.c
parent9e9de01439b2c57e79505ba0668894c9addc3bf1 (diff)
downloademacs-a9041e6caf73abe867602bc60f2f3d48601a908d.tar.gz
Port to Sun C.
* composite.c (find_automatic_composition): Omit needless 'return 0;' that Sun C diagnosed. * fns.c (secure_hash): Fix pointer signedness issue. * intervals.c (static_offset_intervals): New function. (offset_intervals): Use it.
Diffstat (limited to 'src/intervals.c')
-rw-r--r--src/intervals.c17
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,
/* Make the adjustments necessary to the interval tree of BUFFER to
represent an addition or deletion of LENGTH characters starting
at position START. Addition or deletion is indicated by the sign
- of LENGTH. */
+ of LENGTH.
-inline void
-offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length)
+ The two inline functions (one static) pacify Sun C 5.8, a pre-C99
+ compiler that does not allow calling a static function (here,
+ adjust_intervals_for_deletion) from a non-static inline function. */
+
+static inline void
+static_offset_intervals (struct buffer *buffer, EMACS_INT start,
+ EMACS_INT length)
{
if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0)
return;
@@ -1441,6 +1446,12 @@ offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length)
adjust_intervals_for_deletion (buffer, start, -length);
}
}
+
+inline void
+offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length)
+{
+ static_offset_intervals (buffer, start, length);
+}
/* Merge interval I with its lexicographic successor. The resulting
interval is returned, and has the properties of the original