Commit a9041e6c authored by Paul Eggert's avatar Paul Eggert
Browse files

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.
parent 9e9de014
2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
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.
2011-06-21 Leo Liu <sdl.web@gmail.com> 2011-06-21 Leo Liu <sdl.web@gmail.com>
* deps.mk (fns.o): * deps.mk (fns.o):
......
...@@ -1676,7 +1676,6 @@ find_automatic_composition (EMACS_INT pos, EMACS_INT limit, ...@@ -1676,7 +1676,6 @@ find_automatic_composition (EMACS_INT pos, EMACS_INT limit,
} }
BACKWARD_CHAR (cur, stop); BACKWARD_CHAR (cur, stop);
} }
return 0;
} }
/* Return the adjusted point provided that point is moved from LAST_PT /* Return the adjusted point provided that point is moved from LAST_PT
......
...@@ -4802,7 +4802,7 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_ ...@@ -4802,7 +4802,7 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_
return digest; return digest;
} }
else else
return make_unibyte_string (SDATA (digest), digest_size); return make_unibyte_string (SSDATA (digest), digest_size);
} }
DEFUN ("md5", Fmd5, Smd5, 1, 5, 0, DEFUN ("md5", Fmd5, Smd5, 1, 5, 0,
......
...@@ -1425,10 +1425,15 @@ adjust_intervals_for_deletion (struct buffer *buffer, ...@@ -1425,10 +1425,15 @@ adjust_intervals_for_deletion (struct buffer *buffer,
/* Make the adjustments necessary to the interval tree of BUFFER to /* Make the adjustments necessary to the interval tree of BUFFER to
represent an addition or deletion of LENGTH characters starting represent an addition or deletion of LENGTH characters starting
at position START. Addition or deletion is indicated by the sign at position START. Addition or deletion is indicated by the sign
of LENGTH. */ of LENGTH.
inline void The two inline functions (one static) pacify Sun C 5.8, a pre-C99
offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) 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) if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0)
return; return;
...@@ -1441,6 +1446,12 @@ offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) ...@@ -1441,6 +1446,12 @@ offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length)
adjust_intervals_for_deletion (buffer, start, -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 /* Merge interval I with its lexicographic successor. The resulting
interval is returned, and has the properties of the original interval is returned, and has the properties of the original
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment