Remove extern declarations from .c files, and them to .h files.
[bpt/emacs.git] / src / dispnew.c
index 7c0009e..52d5018 100644 (file)
@@ -66,12 +66,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "systime.h"
 #include <errno.h>
 
-/* To get the prototype for `sleep'.  */
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 /* Get number of chars of output now in the buffer of a stdio stream.
    This ought to be built in in stdio, but it isn't.  Some s- files
    override this because their stdio internals differ.  */
@@ -413,7 +407,7 @@ add_frame_display_history (f, paused_p)
 DEFUN ("dump-redisplay-history", Fdump_redisplay_history,
        Sdump_redisplay_history, 0, 0, "",
        doc: /* Dump redisplay history to stderr.  */)
-     ()
+  (void)
 {
   int i;
 
@@ -436,7 +430,7 @@ DEFUN ("dump-redisplay-history", Fdump_redisplay_history,
 #endif /* GLYPH_DEBUG == 0 */
 
 
-#ifdef PROFILING
+#if defined PROFILING && !HAVE___EXECUTABLE_START
 /* FIXME: only used to find text start for profiling.  */
 
 void
@@ -1776,12 +1770,8 @@ check_matrix_invariants (w)
 #define CHANGED_LEAF_MATRIX    (1 << 1)
 
 static struct dim
-allocate_matrices_for_frame_redisplay (window, x, y, dim_only_p,
-                                      window_change_flags)
-     Lisp_Object window;
-     int x, y;
-     int dim_only_p;
-     int *window_change_flags;
+allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y,
+                                      int dim_only_p, int *window_change_flags)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
   int x0 = x, y0 = y;
@@ -2915,12 +2905,8 @@ mirror_make_current (struct window *w, int frame_row)
    This function is called from do_scrolling and do_direct_scrolling.  */
 
 void
-mirrored_line_dance (matrix, unchanged_at_top, nlines, copy_from,
-                    retained_p)
-     struct glyph_matrix *matrix;
-     int unchanged_at_top, nlines;
-     int *copy_from;
-     char *retained_p;
+mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlines,
+                    int *copy_from, char *retained_p)
 {
   /* A copy of original rows.  */
   struct glyph_row *old_rows;
@@ -3244,8 +3230,7 @@ window_to_frame_hpos (w, hpos)
 
 DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0,
        doc: /* Clear frame FRAME and output again what is supposed to appear on it.  */)
-     (frame)
-     Lisp_Object frame;
+  (Lisp_Object frame)
 {
   struct frame *f;
 
@@ -3292,7 +3277,7 @@ redraw_frame (struct frame *f)
 
 DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "",
        doc: /* Clear and redisplay all visible frames.  */)
-     ()
+  (void)
 {
   Lisp_Object tail, frame;
 
@@ -3673,8 +3658,6 @@ update_window (struct window *w, int force_p)
 #if !PERIODIC_PREEMPTION_CHECKING
   int preempt_count = baud_rate / 2400 + 1;
 #endif
-  extern int input_pending;
-  extern Lisp_Object do_mouse_tracking;
   struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w)));
 #if GLYPH_DEBUG
   /* Check that W's frame doesn't have glyph matrices.  */
@@ -4719,7 +4702,6 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
   int i;
   int pause;
   int preempt_count = baud_rate / 2400 + 1;
-  extern int input_pending;
 
   xassert (current_matrix && desired_matrix);
 
@@ -5048,7 +5030,6 @@ count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct
 
 /* Char insertion/deletion cost vector, from term.c */
 
-extern int *char_ins_del_vector;
 #define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_TOTAL_COLS((f))])
 
 
@@ -5855,8 +5836,7 @@ DEFUN ("open-termscript", Fopen_termscript, Sopen_termscript,
        1, 1, "FOpen termscript file: ",
        doc: /* Start writing all terminal output to FILE as well as the terminal.
 FILE = nil means just close any termscript file currently open.  */)
-     (file)
-     Lisp_Object file;
+  (Lisp_Object file)
 {
   struct tty_display_info *tty;
 
@@ -5894,9 +5874,7 @@ Optional parameter TERMINAL specifies the tty terminal device to use.
 It may be a terminal object, a frame, or nil for the terminal used by
 the currently selected frame.  In batch mode, STRING is sent to stdout
 when TERMINAL is nil.  */)
-  (string, terminal)
-     Lisp_Object string;
-     Lisp_Object terminal;
+  (Lisp_Object string, Lisp_Object terminal)
 {
   struct terminal *t = get_terminal (terminal, 1);
   FILE *out;
@@ -5937,8 +5915,7 @@ DEFUN ("ding", Fding, Sding, 0, 1, 0,
        doc: /* Beep, or flash the screen.
 Also, unless an argument is given,
 terminate any keyboard macro currently executing.  */)
-     (arg)
-  Lisp_Object arg;
+  (Lisp_Object arg)
 {
   if (!NILP (arg))
     {
@@ -5977,8 +5954,7 @@ fraction of a second.  Optional second arg MILLISECONDS specifies an
 additional wait period, in milliseconds; this may be useful if your
 Emacs was built without floating point support.
 \(Not all operating systems support waiting for a fraction of a second.)  */)
-     (seconds, milliseconds)
-     Lisp_Object seconds, milliseconds;
+  (Lisp_Object seconds, Lisp_Object milliseconds)
 {
   int sec, usec;
 
@@ -6082,8 +6058,7 @@ DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0,
 If optional arg FORCE is non-nil or `redisplay-dont-pause' is non-nil,
 perform a full redisplay even if input is available.
 Return t if redisplay was performed, nil otherwise.  */)
-     (force)
-  Lisp_Object force;
+  (Lisp_Object force)
 {
   int count;
 
@@ -6127,8 +6102,7 @@ the current state.
 
 If VARIABLE is nil, an internal variable is used.  Users should not
 pass nil for VARIABLE.  */)
-     (variable)
-     Lisp_Object variable;
+  (Lisp_Object variable)
 {
   Lisp_Object state, tail, frame, buf;
   Lisp_Object *vecp, *end;
@@ -6251,10 +6225,6 @@ init_display (void)
 {
   char *terminal_type;
 
-#ifdef HAVE_X_WINDOWS
-  extern int display_arg;
-#endif
-
   /* Construct the space glyph.  */
   space_glyph.type = CHAR_GLYPH;
   SET_CHAR_GLYPH (space_glyph, ' ', DEFAULT_FACE_ID, 0);
@@ -6454,8 +6424,7 @@ DEFUN ("internal-show-cursor", Finternal_show_cursor,
 WINDOW nil means use the selected window.  SHOW non-nil means
 show a cursor in WINDOW in the next redisplay.  SHOW nil means
 don't show a cursor.  */)
-     (window, show)
-     Lisp_Object window, show;
+  (Lisp_Object window, Lisp_Object show)
 {
   /* Don't change cursor state while redisplaying.  This could confuse
      output routines.  */
@@ -6477,8 +6446,7 @@ DEFUN ("internal-show-cursor-p", Finternal_show_cursor_p,
        Sinternal_show_cursor_p, 0, 1, 0,
        doc: /* Value is non-nil if next redisplay will display a cursor in WINDOW.
 WINDOW nil or omitted means report on the selected window.  */)
-     (window)
-     Lisp_Object window;
+  (Lisp_Object window)
 {
   struct window *w;
 
@@ -6494,7 +6462,7 @@ WINDOW nil or omitted means report on the selected window.  */)
 DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame,
        Slast_nonminibuf_frame, 0, 0, 0,
        doc: /* Value is last nonminibuffer frame. */)
-     ()
+  (void)
 {
   Lisp_Object frame = Qnil;