summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>1998-04-14 12:25:56 +0000
committerAndreas Schwab <schwab@suse.de>1998-04-14 12:25:56 +0000
commit127fe5cf2e589b6e57928836773d096e7d822295 (patch)
tree3709c1849a5915a4b7b4ee9733244ce554441055
parentd9569e3eccc33dfcec541ded7871629b454fd936 (diff)
downloademacs-127fe5cf2e589b6e57928836773d096e7d822295.tar.gz
Fix -Wimplicit warnings.
-rw-r--r--src/abbrev.c1
-rw-r--r--src/alloc.c3
-rw-r--r--src/buffer.c16
-rw-r--r--src/bytecode.c1
-rw-r--r--src/callint.c1
-rw-r--r--src/callproc.c9
-rw-r--r--src/casefiddle.c3
-rw-r--r--src/casetab.c2
-rw-r--r--src/category.c2
-rw-r--r--src/ccl.c7
-rw-r--r--src/charset.c7
-rw-r--r--src/cm.c8
-rw-r--r--src/cmds.c4
-rw-r--r--src/coding.c5
-rw-r--r--src/data.c2
-rw-r--r--src/dired.c8
-rw-r--r--src/dispnew.c28
-rw-r--r--src/doc.c1
-rw-r--r--src/doprnt.c2
-rw-r--r--src/editfns.c8
-rw-r--r--src/emacs.c17
-rw-r--r--src/eval.c9
-rw-r--r--src/fileio.c3
-rw-r--r--src/filelock.c6
-rw-r--r--src/floatfns.c2
-rw-r--r--src/fns.c10
-rw-r--r--src/fontset.c4
-rw-r--r--src/frame.c4
-rw-r--r--src/indent.c3
-rw-r--r--src/insdel.c6
-rw-r--r--src/intervals.c4
-rw-r--r--src/keyboard.c18
-rw-r--r--src/keymap.c6
-rw-r--r--src/marker.c1
-rw-r--r--src/mocklisp.c1
-rw-r--r--src/prefix-args.c1
-rw-r--r--src/print.c2
-rw-r--r--src/process.c13
-rw-r--r--src/scroll.c4
-rw-r--r--src/search.c5
-rw-r--r--src/syntax.c3
-rw-r--r--src/sysdep.c51
-rw-r--r--src/term.c97
-rw-r--r--src/terminfo.c2
-rw-r--r--src/undo.c1
-rw-r--r--src/widget.c2
-rw-r--r--src/window.c13
-rw-r--r--src/xdisp.c6
-rw-r--r--src/xmenu.c4
-rw-r--r--src/xrdb.c5
-rw-r--r--src/xselect.c1
-rw-r--r--src/xterm.c62
52 files changed, 392 insertions, 92 deletions
diff --git a/src/abbrev.c b/src/abbrev.c
index f681ed947c6..1992b6ca222 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -517,6 +517,7 @@ of the form (ABBREVNAME EXPANSION HOOK USECOUNT).")
return Qnil;
}
+void
syms_of_abbrev ()
{
DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list,
diff --git a/src/alloc.c b/src/alloc.c
index be221b85c30..6948ff1a3d8 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -593,6 +593,7 @@ init_float ()
}
/* Explicitly free a float cell. */
+void
free_float (ptr)
struct Lisp_Float *ptr;
{
@@ -2947,6 +2948,7 @@ Frames, windows, buffers, and subprocesses count as vectors\n\
/* Initialization */
+void
init_alloc_once ()
{
/* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */
@@ -2989,6 +2991,7 @@ init_alloc_once ()
#endif /* VIRT_ADDR_VARIES */
}
+void
init_alloc ()
{
gcprolist = 0;
diff --git a/src/buffer.c b/src/buffer.c
index 1733fd5e882..5d805590294 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -33,6 +33,12 @@ extern int errno;
#endif /* not MAXPATHLEN */
#include <config.h>
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include "lisp.h"
#include "intervals.h"
#include "window.h"
@@ -2230,9 +2236,11 @@ struct sortvec
};
static int
-compare_overlays (s1, s2)
- struct sortvec *s1, *s2;
+compare_overlays (v1, v2)
+ const void *v1, *v2;
{
+ const struct sortvec *s1 = (const struct sortvec *) v1;
+ const struct sortvec *s2 = (const struct sortvec *) v2;
if (s1->priority != s2->priority)
return s1->priority - s2->priority;
if (s1->beg != s2->beg)
@@ -3773,6 +3781,7 @@ buffer_slot_type_mismatch (offset)
type_name, XSYMBOL (sym)->name->data);
}
+void
init_buffer_once ()
{
register Lisp_Object tem;
@@ -3914,6 +3923,7 @@ init_buffer_once ()
Fset_buffer (Fget_buffer_create (build_string ("*scratch*")));
}
+void
init_buffer ()
{
char buf[MAXPATHLEN+1];
@@ -3973,6 +3983,7 @@ init_buffer ()
}
/* initialize the buffer routines */
+void
syms_of_buffer ()
{
extern Lisp_Object Qdisabled;
@@ -4553,6 +4564,7 @@ is a member of the list.");
defsubr (&Soverlay_put);
}
+void
keys_of_buffer ()
{
initial_define_key (control_x_map, 'b', "switch-to-buffer");
diff --git a/src/bytecode.c b/src/bytecode.c
index 60e34a486fe..84d9ec618e6 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1159,6 +1159,7 @@ If the third argument is incorrect, Emacs may crash.")
return v1;
}
+void
syms_of_bytecode ()
{
Qbytecode = intern ("byte-code");
diff --git a/src/callint.c b/src/callint.c
index fd4ea1aab44..cc522c3f76c 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -772,6 +772,7 @@ Its numeric meaning is what you would get from `(interactive \"p\")'.")
return val;
}
+void
syms_of_callint ()
{
point_marker = Fmake_marker ();
diff --git a/src/callproc.c b/src/callproc.c
index bc02c633fec..393247dcacb 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -914,6 +914,8 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
#ifndef VMS /* VMS version is in vmsproc.c. */
+static int relocate_fd ();
+
/* This is the last thing run in a newly forked inferior
either synchronous or asynchronous.
Copy descriptors IN, OUT and ERR as descriptors 0, 1 and 2.
@@ -934,6 +936,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
a decent error from within the child, this should be verified as an
executable directory by the parent. */
+int
child_setup (in, out, err, new_argv, set_pgrp, current_dir)
int in, out, err;
register char **new_argv;
@@ -1130,7 +1133,7 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir)
/* Move the file descriptor FD so that its number is not less than MINFD.
If the file descriptor is moved at all, the original is freed. */
-int
+static int
relocate_fd (fd, minfd)
int fd, minfd;
{
@@ -1228,6 +1231,7 @@ egetenv (var)
/* This is run before init_cmdargs. */
+void
init_callproc_1 ()
{
char *data_dir = egetenv ("EMACSDATA");
@@ -1249,6 +1253,7 @@ init_callproc_1 ()
/* This is run after init_cmdargs, when Vinstallation_directory is valid. */
+void
init_callproc ()
{
char *data_dir = egetenv ("EMACSDATA");
@@ -1341,6 +1346,7 @@ init_callproc ()
#endif
}
+void
set_process_environment ()
{
register char **envp;
@@ -1354,6 +1360,7 @@ set_process_environment ()
Vprocess_environment);
}
+void
syms_of_callproc ()
{
#ifdef DOS_NT
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 4f1f72f6e9e..b6d8b21f606 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -182,6 +182,7 @@ The argument object is not altered--the value is a copy.")
/* flag is CASE_UP, CASE_DOWN or CASE_CAPITALIZE or CASE_CAPITALIZE_UP.
b and e specify range of buffer to operate on. */
+void
casify_region (flag, b, e)
enum case_action flag;
Lisp_Object b, e;
@@ -404,6 +405,7 @@ With negative argument, capitalize previous words but do not move.")
return Qnil;
}
+void
syms_of_casefiddle ()
{
Qidentity = intern ("identity");
@@ -421,6 +423,7 @@ syms_of_casefiddle ()
defsubr (&Scapitalize_word);
}
+void
keys_of_casefiddle ()
{
initial_define_key (control_x_map, Ctl('U'), "upcase-region");
diff --git a/src/casetab.c b/src/casetab.c
index a933be69c7d..aa87f5ad8fb 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -216,6 +216,7 @@ shuffle (table, c, elt)
}
}
+void
init_casetab_once ()
{
register int i;
@@ -256,6 +257,7 @@ init_casetab_once ()
XCHAR_TABLE (down)->extras[2] = Fcopy_sequence (up);
}
+void
syms_of_casetab ()
{
Qcase_table_p = intern ("case-table-p");
diff --git a/src/category.c b/src/category.c
index d1d2f572afa..182cfd2901f 100644
--- a/src/category.c
+++ b/src/category.c
@@ -601,6 +601,7 @@ word_boundary_p (c1, c2)
}
+void
init_category_once ()
{
/* This has to be done here, before we call Fmake_char_table. */
@@ -623,6 +624,7 @@ init_category_once ()
Fmake_vector (make_number (95), Qnil));
}
+void
syms_of_category ()
{
Qcategoryp = intern ("categoryp");
diff --git a/src/ccl.c b/src/ccl.c
index 8e8575a8f11..d68367f5f90 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -24,6 +24,11 @@ Boston, MA 02111-1307, USA. */
#ifdef emacs
#include <config.h>
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
#include "lisp.h"
#include "charset.h"
#include "ccl.h"
@@ -659,6 +664,7 @@ struct ccl_prog_stack
int ic; /* Instruction Counter. */
};
+int
ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
struct ccl_program *ccl;
unsigned char *source, *destination;
@@ -1699,6 +1705,7 @@ Return index number of the registered translation table.")
}
+void
syms_of_ccl ()
{
staticpro (&Vccl_program_table);
diff --git a/src/charset.c b/src/charset.c
index 0b4b9256b6e..4f132e974e2 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -173,6 +173,7 @@ non_ascii_char_to_string (c, workbuf, str)
Use macro `STRING_CHAR (STR, LEN)' instead of calling this function
directly if STR can hold an ASCII character. */
+int
string_to_non_ascii_char (str, len, actual_len)
const unsigned char *str;
int len, *actual_len;
@@ -237,6 +238,7 @@ multibyte_form_length (str, len)
return -1. This should be used only in the macro SPLIT_STRING
which checks range of STR in advance. */
+int
split_non_ascii_string (str, len, charset, c1, c2)
register const unsigned char *str;
register unsigned char *c1, *c2;
@@ -274,6 +276,7 @@ split_non_ascii_string (str, len, charset, c1, c2)
/* Return a character unified with C (or a character made of CHARSET,
C1, and C2) in unification table TABLE. If no unification is found
in TABLE, return C. */
+int
unify_char (table, c, charset, c1, c2)
Lisp_Object table;
int c, charset, c1, c2;
@@ -308,6 +311,7 @@ unify_char (table, c, charset, c1, c2)
convert C to a valid multibyte character, convert it based on
DEFAULT_NONASCII_INSERT_OFFSET which makes C a Latin-1 character. */
+int
unibyte_char_to_multibyte (c)
int c;
{
@@ -1610,6 +1614,7 @@ DEFUN ("compose-string", Fcompose_string, Scompose_string,
}
+int
charset_id_internal (charset_name)
char *charset_name;
{
@@ -1635,6 +1640,7 @@ DEFUN ("setup-special-charsets", Fsetup_special_charsets,
return Qnil;
}
+void
init_charset_once ()
{
int i, j, k;
@@ -1689,6 +1695,7 @@ init_charset_once ()
#ifdef emacs
+void
syms_of_charset ()
{
Qascii = intern ("ascii");
diff --git a/src/cm.c b/src/cm.c
index 7362822c95d..ef4dccd23de 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -35,6 +35,7 @@ extern char *BC, *UP;
int cost; /* sums up costs */
/* ARGSUSED */
+int
evalcost (c)
char c;
{
@@ -42,6 +43,7 @@ evalcost (c)
return c;
}
+int
cmputc (c)
char c;
{
@@ -135,6 +137,7 @@ cmcheckmagic ()
* out of <sgtty.h>.)
*/
+void
cmcostinit ()
{
char *p;
@@ -174,7 +177,7 @@ cmcostinit ()
* actually perform the motion.
*/
-static
+static int
calccost (srcy, srcx, dsty, dstx, doit)
{
register int deltay,
@@ -309,6 +312,7 @@ losecursor ()
#define USELL 2
#define USECR 3
+void
cmgoto (row, col)
{
int homecost,
@@ -411,6 +415,7 @@ cmgoto (row, col)
Used before copying into it the info on the actual terminal.
*/
+void
Wcm_clear ()
{
bzero (&Wcm, sizeof Wcm);
@@ -425,6 +430,7 @@ Wcm_clear ()
* Return -2 if size not specified.
*/
+int
Wcm_init ()
{
#if 0
diff --git a/src/cmds.c b/src/cmds.c
index 917c3d2c8f7..f91f91b0bc1 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA. */
#include "syntax.h"
#include "window.h"
#include "keyboard.h"
+#include "dispextern.h"
Lisp_Object Qkill_forward_chars, Qkill_backward_chars, Vblink_paren_function;
@@ -326,6 +327,7 @@ Whichever character you type to run this command is inserted.")
return 0. A value of 1 indicates this *might* not have been simple.
A value of 2 means this did things that call for an undo boundary. */
+int
internal_self_insert (c, noautofill)
int c;
int noautofill;
@@ -503,6 +505,7 @@ internal_self_insert (c, noautofill)
/* module initialization */
+void
syms_of_cmds ()
{
Qkill_backward_chars = intern ("kill-backward-chars");
@@ -542,6 +545,7 @@ More precisely, a char with closeparen syntax is self-inserted.");
defsubr (&Sself_insert_command);
}
+void
keys_of_cmds ()
{
int n;
diff --git a/src/coding.c b/src/coding.c
index 602737ad6bf..a98ca65eb9d 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1681,6 +1681,7 @@ encode_invocation_designation (charset, coding, dst)
If the current block ends before any end-of-line, we may fail to
find all the necessary designations. */
+void
encode_designation_at_bol (coding, table, src, src_end, dstp)
struct coding_system *coding;
Lisp_Object table;
@@ -2465,6 +2466,7 @@ encode_coding_sjis_big5 (coding, source, destination,
This function is called only when `coding->eol_type' is
CODING_EOL_CRLF or CODING_EOL_CR. */
+int
decode_eol (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
unsigned char *source, *destination;
@@ -2595,6 +2597,7 @@ decode_eol (coding, source, destination, src_bytes, dst_bytes)
`coding->mode & CODING_MODE_SELECTIVE_DISPLAY' is nonzero, code
'\r' in source text also means end-of-line. */
+int
encode_eol (coding, source, destination, src_bytes, dst_bytes)
struct coding_system *coding;
unsigned char *source, *destination;
@@ -4941,6 +4944,7 @@ call this function:\n\
/*** 8. Post-amble ***/
+void
init_coding_once ()
{
int i;
@@ -4999,6 +5003,7 @@ init_coding_once ()
#ifdef emacs
+void
syms_of_coding ()
{
Qtarget_idx = intern ("target-idx");
diff --git a/src/data.c b/src/data.c
index 7daf6716986..c9493c05711 100644
--- a/src/data.c
+++ b/src/data.c
@@ -136,6 +136,7 @@ wrong_type_argument (predicate, value)
return value;
}
+void
pure_write_error ()
{
error ("Attempt to modify read-only object");
@@ -2957,6 +2958,7 @@ arith_error (signo)
Fsignal (Qarith_error, Qnil);
}
+void
init_data ()
{
/* Don't do this if just dumping out.
diff --git a/src/dired.c b/src/dired.c
index 4c1f62e27fd..2e72c4706de 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -31,6 +31,10 @@ Boston, MA 02111-1307, USA. */
#include <rmsdef.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
/* The d_nameln member of a struct dirent includes the '\0' character
on some systems, but not on others. What's worse, you can't tell
at compile-time which one it will be, since it really depends on
@@ -295,6 +299,8 @@ These are all file names in directory DIRECTORY which begin with FILE.")
return file_name_completion (file, directory, 1, 0);
}
+static int file_name_completion_stat ();
+
Lisp_Object
file_name_completion (file, dirname, all_flag, ver_flag)
Lisp_Object file, dirname;
@@ -547,6 +553,7 @@ file_name_completion (file, dirname, all_flag, ver_flag)
return Fsignal (Qquit, Qnil);
}
+static int
file_name_completion_stat (dirname, dp, st_addr)
Lisp_Object dirname;
DIRENTRY *dp;
@@ -742,6 +749,7 @@ If file does not exist, returns nil.")
return Flist (sizeof(values) / sizeof(values[0]), values);
}
+void
syms_of_dired ()
{
Qdirectory_files = intern ("directory-files");
diff --git a/src/dispnew.c b/src/dispnew.c
index 8eb3d95dd9b..986a1983478 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <ctype.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "lisp.h"
#include "termchar.h"
#include "termopts.h"
@@ -43,6 +47,8 @@ Boston, MA 02111-1307, USA. */
#include "indent.h"
#include "intervals.h"
#include "blockinput.h"
+#include "process.h"
+#include "keyboard.h"
/* I don't know why DEC Alpha OSF1 fail to compile this file if we
include the following file. */
@@ -187,6 +193,7 @@ DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0,
return Qnil;
}
+void
redraw_frame (f)
FRAME_PTR f;
{
@@ -229,8 +236,8 @@ make_frame_glyphs (frame, empty)
int empty;
{
register int i;
- register width = FRAME_WINDOW_WIDTH (frame);
- register height = FRAME_HEIGHT (frame);
+ register int width = FRAME_WINDOW_WIDTH (frame);
+ register int height = FRAME_HEIGHT (frame);
register struct frame_glyphs *new
= (struct frame_glyphs *) xmalloc (sizeof (struct frame_glyphs));
@@ -468,6 +475,7 @@ line_draw_cost (m, vpos)
/* cancel_line eliminates any request to display a line at position `vpos' */
+void
cancel_line (vpos, frame)
int vpos;
register FRAME_PTR frame;
@@ -475,6 +483,7 @@ cancel_line (vpos, frame)
FRAME_DESIRED_GLYPHS (frame)->enable[vpos] = 0;
}
+void
clear_frame_records (frame)
register FRAME_PTR frame;
{
@@ -823,6 +832,7 @@ scroll_frame_lines (frame, from, end, amount, newpos)
into the FRAME_DESIRED_GLYPHS (frame) from the FRAME_PHYS_GLYPHS (frame)
so that update_frame will not change those columns. */
+void
preserve_other_columns (w)
struct window *w;
{
@@ -947,6 +957,7 @@ adjust_window_charstarts (w, vpos, adjust)
for internal consistency. We cannot check that they are "right";
we can only look for something nonsensical. */
+void
verify_charstarts (w)
struct window *w;
{
@@ -1003,6 +1014,7 @@ verify_charstarts (w)
cancel the columns of that window, so that when the window is
displayed over again get_display_line will not complain. */
+void
cancel_my_columns (w)
struct window *w;
{
@@ -1198,7 +1210,7 @@ update_frame (f, force, inhibit_hairy_id)
register int i;
int pause;
int preempt_count = baud_rate / 2400 + 1;
- extern input_pending;
+ extern int input_pending;
#ifdef HAVE_WINDOW_SYSTEM
register int downto, leftmost;
#endif
@@ -1398,6 +1410,7 @@ quit_error_check ()
extern void scrolling_1 ();
+int
scrolling (frame)
FRAME_PTR frame;
{
@@ -1831,7 +1844,7 @@ update_line (frame, vpos)
olen = nlen - (nsp - osp);
}
cursor_to (vpos, osp);
- insert_glyphs ((char *)0, nsp - osp);
+ insert_glyphs ((GLYPH *) 0, nsp - osp);
}
olen += nsp - osp;
@@ -2070,6 +2083,7 @@ window_change_signal (signalnum) /* If we don't have an argument, */
/* Do any change in frame size that was requested by a signal. */
+void
do_pending_window_change ()
{
/* If window_change_signal should have run before, run it now. */
@@ -2101,9 +2115,10 @@ do_pending_window_change ()
redisplay. Since this tries to resize windows, we can't call it
from a signal handler. */
+void
change_frame_size (f, newheight, newwidth, pretend, delay)
register FRAME_PTR f;
- int newheight, newwidth, pretend;
+ int newheight, newwidth, pretend, delay;
{
Lisp_Object tail, frame;
@@ -2284,6 +2299,7 @@ terminate any keyboard macro currently executing.")
return Qnil;
}
+void
bitch_at_user ()
{
if (noninteractive)
@@ -2469,6 +2485,7 @@ char *terminal_type;
/* Then invoke its decoding routine to set up variables
in the terminal package */
+void
init_display ()
{
#ifdef HAVE_X_WINDOWS
@@ -2604,6 +2621,7 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
#endif /* SIGWINCH */
}
+void
syms_of_display ()
{
defsubr (&Sredraw_frame);
diff --git a/src/doc.c b/src/doc.c
index e2b98a1dc19..12ae52c12d8 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -737,6 +737,7 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
RETURN_UNGCPRO (tem);
}
+void
syms_of_doc ()
{
DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name,
diff --git a/src/doprnt.c b/src/doprnt.c
index 7734f9bfec4..7eaa2717056 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -54,6 +54,7 @@ static int doprnt1 ();
String arguments are passed as C strings.
Integers are passed as C integers. */
+int
doprnt (buffer, bufsize, format, format_end, nargs, args)
char *buffer;
register int bufsize;
@@ -68,6 +69,7 @@ doprnt (buffer, bufsize, format, format_end, nargs, args)
/* Like doprnt except that strings in ARGS are passed
as Lisp_Object. */
+int
doprnt_lisp (buffer, bufsize, format, format_end, nargs, args)
char *buffer;
register int bufsize;
diff --git a/src/editfns.c b/src/editfns.c
index fe419944553..7699da52d9e 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -29,6 +29,14 @@ Boston, MA 02111-1307, USA. */
#include <pwd.h>
#endif
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "lisp.h"
#include "intervals.h"
#include "buffer.h"
diff --git a/src/emacs.c b/src/emacs.c
index 282528381f4..5f57f10c393 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -44,6 +44,7 @@ Boston, MA 02111-1307, USA. */
#include "blockinput.h"
#include "syssignal.h"
#include "process.h"
+#include "keyboard.h"
#ifdef HAVE_SETRLIMIT
#include <sys/time.h>
@@ -166,6 +167,7 @@ char **initial_argv;
int initial_argc;
static void sort_args ();
+void syms_of_emacs ();
/* Signal code for the fatal signal that was received */
int fatal_error_code;
@@ -272,7 +274,7 @@ abort ()
/* Code for dealing with Lisp access to the Unix command line */
-static
+static void
init_cmdargs (argc, argv, skip_args)
int argc;
char **argv;
@@ -449,11 +451,11 @@ static char dump_tz[] = "UtC0";
(We don't have any real constructors or destructors.) */
#ifdef __GNUC__
#ifndef GCC_CTORS_IN_LIBC
-__do_global_ctors ()
+void __do_global_ctors ()
{}
-__do_global_ctors_aux ()
+void __do_global_ctors_aux ()
{}
-__do_global_dtors ()
+void __do_global_dtors ()
{}
/* Linux has a bug in its library; avoid an error. */
#ifndef LINUX
@@ -461,7 +463,7 @@ char * __CTOR_LIST__[2] = { (char *) (-1), 0 };
#endif
char * __DTOR_LIST__[2] = { (char *) (-1), 0 };
#endif /* GCC_CTORS_IN_LIBC */
-__main ()
+void __main ()
{}
#endif /* __GNUC__ */
#endif /* ORDINARY_LINK */
@@ -536,6 +538,7 @@ argmatch (argv, argc, sstr, lstr, minlen, valptr, skipptr)
}
/* ARGSUSED */
+int
main (argc, argv, envp)
int argc;
char **argv;
@@ -544,7 +547,7 @@ main (argc, argv, envp)
char stack_bottom_variable;
int skip_args = 0;
extern int errno;
- extern sys_nerr;
+ extern int sys_nerr;
#ifdef HAVE_SETRLIMIT
struct rlimit rlim;
#endif
@@ -556,6 +559,7 @@ main (argc, argv, envp)
#ifdef DOUG_LEA_MALLOC
if (initialized)
{
+ extern void r_alloc_reinit ();
malloc_set_state (malloc_state_ptr);
free (malloc_state_ptr);
r_alloc_reinit ();
@@ -1739,6 +1743,7 @@ decode_env_path (evarname, defalt)
return Fnreverse (lpath);
}
+void
syms_of_emacs ()
{
Qfile_name_handler_alist = intern ("file-name-handler-alist");
diff --git a/src/eval.c b/src/eval.c
index f7fad365036..1f4f852bdcd 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -20,6 +20,11 @@ Boston, MA 02111-1307, USA. */
#include <config.h>
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
#include "lisp.h"
#include "blockinput.h"
@@ -162,6 +167,7 @@ Lisp_Object run_hook_with_args ();
Lisp_Object funcall_lambda ();
extern Lisp_Object ml_apply (); /* Apply a mocklisp function to unevaluated argument list */
+void
init_eval_once ()
{
specpdl_size = 50;
@@ -173,6 +179,7 @@ init_eval_once ()
Vrun_hooks = Qnil;
}
+void
init_eval ()
{
specpdl_ptr = specpdl;
@@ -199,6 +206,7 @@ call_debugger (arg)
return apply1 (Vdebugger, arg);
}
+void
do_debug_on_call (code)
Lisp_Object code;
{
@@ -2893,6 +2901,7 @@ If NFRAMES is more than the number of frames, the value is nil.")
}
}
+void
syms_of_eval ()
{
DEFVAR_INT ("max-specpdl-size", &max_specpdl_size,
diff --git a/src/fileio.c b/src/fileio.c
index 07bc4334ebd..7a8ddff0f37 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -599,6 +599,7 @@ On VMS, converts \"[X]FOO.DIR\" to \"[X.FOO]\", etc.")
* Value is nonzero if the string output is different from the input.
*/
+int
directory_file_name (src, dst)
char *src, *dst;
{
@@ -4522,6 +4523,7 @@ a_write (desc, addr, nbytes, bytepos, annot, coding)
}
*annot = Fcdr (*annot);
}
+ return 0;
}
#ifndef WRITE_BUF_SIZE
@@ -5172,6 +5174,7 @@ DIR defaults to current buffer's directory default.")
return val;
}
+void
syms_of_fileio ()
{
Qexpand_file_name = intern ("expand-file-name");
diff --git a/src/filelock.c b/src/filelock.c
index 134b3808acd..50e86536268 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA. */
#include <sys/types.h>
#include <sys/stat.h>
+#include <signal.h>
#include <config.h>
#ifdef VMS
@@ -34,6 +35,10 @@ Boston, MA 02111-1307, USA. */
#include <string.h>
#endif /* USG */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "lisp.h"
#include "buffer.h"
@@ -515,6 +520,7 @@ t if it is locked by you, else a string of the name of the locker.")
/* Initialization functions. */
+void
syms_of_filelock ()
{
defsubr (&Sunlock_buffer);
diff --git a/src/floatfns.c b/src/floatfns.c
index 562ec045c19..cd1c0c4441e 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -1010,6 +1010,7 @@ matherr (x)
}
#endif /* HAVE_MATHERR */
+void
init_floatfns ()
{
#ifdef FLOAT_CATCH_SIGILL
@@ -1025,6 +1026,7 @@ init_floatfns ()
#endif /* not LISP_FLOAT_TYPE */
+void
syms_of_floatfns ()
{
#ifdef LISP_FLOAT_TYPE
diff --git a/src/fns.c b/src/fns.c
index 26a1e3ea48d..e9dce29de21 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -21,6 +21,10 @@ Boston, MA 02111-1307, USA. */
#include <config.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
/* Note on some machines this defines `vector' as a typedef,
so make sure we don't use that name in this file. */
#undef vector
@@ -35,6 +39,9 @@ Boston, MA 02111-1307, USA. */
#include "intervals.h"
#include "frame.h"
#include "window.h"
+#ifdef HAVE_MENUS
+#include "xterm.h"
+#endif
#ifndef NULL
#define NULL (void *)0
@@ -44,8 +51,6 @@ Boston, MA 02111-1307, USA. */
asked by mouse commands. */
int use_dialog_box;
-extern Lisp_Object Flookup_key ();
-
extern int minibuffer_auto_raise;
extern Lisp_Object minibuf_window;
@@ -2545,6 +2550,7 @@ ARGS are passed as extra arguments to the function.")
return result;
}
+void
syms_of_fns ()
{
Qstring_lessp = intern ("string-lessp");
diff --git a/src/fontset.c b/src/fontset.c
index fe3526852c0..53cb240469a 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -492,8 +492,6 @@ just like X's font name matching algorithm allows.")
return Qnil;
}
-Lisp_Object Fframe_char_width ();
-
/* Return a list of names of available fontsets matching PATTERN on
frame F. If SIZE is not 0, it is the size (maximum bound width) of
fontsets to be listed. */
@@ -600,7 +598,6 @@ FONTLIST is an alist of charsets vs corresponding font names.")
return Qnil;
}
-extern Lisp_Object Fframe_parameters ();
extern Lisp_Object Qfont;
Lisp_Object Qfontset;
@@ -802,6 +799,7 @@ loading failed.")
return info;
}
+void
syms_of_fontset ()
{
int i;
diff --git a/src/frame.c b/src/frame.c
index 8a3c50866b2..8ede3ac97ea 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -28,9 +28,11 @@ Boston, MA 02111-1307, USA. */
#include "charset.h"
#ifdef HAVE_WINDOW_SYSTEM
#include "fontset.h"
+#include "xterm.h"
#endif
#include "frame.h"
#include "termhooks.h"
+#include "dispextern.h"
#include "window.h"
#ifdef MSDOS
#include "msdos.h"
@@ -2224,6 +2226,7 @@ the rightmost or bottommost possible position (that stays within the screen).")
}
+void
syms_of_frame ()
{
syms_of_frame_1 ();
@@ -2296,6 +2299,7 @@ displayed.");
defsubr (&Sset_frame_position);
}
+void
keys_of_frame ()
{
initial_define_lispy_key (global_map, "switch-frame", "handle-switch-frame");
diff --git a/src/indent.c b/src/indent.c
index 897aa8d1072..33313a41c78 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -679,6 +679,8 @@ even if that goes past COLUMN; by default, MININUM is zero.")
}
+static int position_indentation P_ ((int));
+
DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation,
0, 0, 0,
"Return the indentation of the current line.\n\
@@ -1789,6 +1791,7 @@ whether or not it is currently displayed in some window.")
/* file's initialization. */
+void
syms_of_indent ()
{
DEFVAR_BOOL ("indent-tabs-mode", &indent_tabs_mode,
diff --git a/src/insdel.c b/src/insdel.c
index 61b934e6ab5..3b54364efbf 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -26,6 +26,7 @@ Boston, MA 02111-1307, USA. */
#include "charset.h"
#include "window.h"
#include "blockinput.h"
+#include "region-cache.h"
#ifndef NULL
#define NULL 0
@@ -777,7 +778,7 @@ count_size_as_multibyte (ptr, nbytes)
void
insert (string, nbytes)
register unsigned char *string;
- register nbytes;
+ register int nbytes;
{
if (nbytes > 0)
{
@@ -792,7 +793,7 @@ insert (string, nbytes)
void
insert_and_inherit (string, nbytes)
register unsigned char *string;
- register nbytes;
+ register int nbytes;
{
if (nbytes > 0)
{
@@ -2441,6 +2442,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute,
return unbind_to (count, val);
}
+void
syms_of_insdel ()
{
staticpro (&combine_after_change_list);
diff --git a/src/intervals.c b/src/intervals.c
index 370bca4a247..b6a6caaa738 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -145,7 +145,7 @@ intervals_equal (i0, i1)
INTERVAL i0, i1;
{
register Lisp_Object i0_cdr, i0_sym, i1_val;
- register i1_len;
+ register int i1_len;
if (DEFAULT_INTERVAL_P (i0) && DEFAULT_INTERVAL_P (i1))
return 1;
@@ -640,7 +640,7 @@ previous_interval (interval)
register INTERVAL interval;
{
register INTERVAL i;
- register position_of_previous;
+ register int position_of_previous;
if (NULL_INTERVAL_P (interval))
return NULL_INTERVAL;
diff --git a/src/keyboard.c b/src/keyboard.c
index fb3d8bae1ed..b6b00127630 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -492,8 +492,6 @@ extern char *x_get_keysym_name ();
static void record_menu_key ();
-void swallow_events ();
-
Lisp_Object Qpolling_period;
/* List of absolute timers. Appears in order of next scheduled event. */
@@ -557,6 +555,8 @@ static Lisp_Object make_lispy_movement ();
static Lisp_Object modify_event_symbol ();
static Lisp_Object make_lispy_switch_frame ();
static int parse_solitary_modifier ();
+static void save_getcjmp ();
+static void restore_getcjmp ();
/* > 0 if we are to echo keystrokes. */
static int echo_keystrokes;
@@ -572,6 +572,7 @@ static int cannot_suspend;
so that it serves as a prompt for the next character.
Also start echoing. */
+void
echo_prompt (str)
char *str;
{
@@ -592,6 +593,7 @@ echo_prompt (str)
C can be a character, which is printed prettily ("M-C-x" and all that
jazz), or a symbol, whose name is printed. */
+void
echo_char (c)
Lisp_Object c;
{
@@ -641,6 +643,7 @@ echo_char (c)
/* Temporarily add a dash to the end of the echo string if it's not
empty, so that it serves as a mini-prompt for the very next character. */
+void
echo_dash ()
{
if (!current_kboard->immediate_echo
@@ -696,6 +699,7 @@ echo_now ()
/* Turn off echoing, for the start of a new command. */
+void
cancel_echoing ()
{
current_kboard->immediate_echo = 0;
@@ -792,6 +796,7 @@ record_auto_save ()
/* Make an auto save happen as soon as possible at command level. */
+void
force_auto_save_soon ()
{
last_auto_save = - auto_save_interval - 1;
@@ -2409,12 +2414,14 @@ print_help (object)
in case get_char is called recursively.
See read_process_output. */
+static void
save_getcjmp (temp)
jmp_buf temp;
{
bcopy (getcjmp, temp, sizeof getcjmp);
}
+static void
restore_getcjmp (temp)
jmp_buf temp;
{
@@ -7670,6 +7677,7 @@ current_active_maps (maps_p)
/* Return nonzero if input events are pending. */
+int
detect_input_pending ()
{
if (!input_pending)
@@ -7680,6 +7688,7 @@ detect_input_pending ()
/* Return nonzero if input events are pending, and run any pending timers. */
+int
detect_input_pending_run_timers (do_display)
int do_display;
{
@@ -7710,6 +7719,7 @@ clear_input_pending ()
The problem is, kbd_buffer_get_event needs to be fixed to know what
to do in that case. It isn't trivial. */
+int
requeued_events_pending_p ()
{
return (!NILP (Vunread_command_events) || unread_command_char != -1);
@@ -7953,6 +7963,7 @@ stuff_buffered_input (stuffstring)
#endif /* BSD_SYSTEM and not BSD4_1 */
}
+void
set_waiting_for_input (time_to_clear)
EMACS_TIME *time_to_clear;
{
@@ -8311,6 +8322,7 @@ delete_kboard (kb)
}
#endif
+void
init_keyboard ()
{
/* This is correct before outermost invocation of the editor loop */
@@ -8405,6 +8417,7 @@ struct event_head head_table[] = {
&Qmake_frame_visible, "make-frame-visible", &Qmake_frame_visible,
};
+void
syms_of_keyboard ()
{
staticpro (&item_properties);
@@ -8878,6 +8891,7 @@ If the value is non-nil and not a number, we wait 2 seconds.");
Vtimer_idle_list = Qnil;
}
+void
keys_of_keyboard ()
{
initial_define_key (global_map, Ctl ('Z'), "suspend-emacs");
diff --git a/src/keymap.c b/src/keymap.c
index c0a0f21a126..8739326a733 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -21,6 +21,9 @@ Boston, MA 02111-1307, USA. */
#include <config.h>
#include <stdio.h>
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
#undef NULL
#include "lisp.h"
#include "commands.h"
@@ -102,7 +105,6 @@ static Lisp_Object define_as_prefix ();
static Lisp_Object describe_buffer_bindings ();
static void describe_command (), describe_translation ();
static void describe_map ();
-Lisp_Object Fcopy_keymap ();
/* Keymap object support - constructors and predicates. */
@@ -3168,6 +3170,7 @@ Return list of symbols found.")
return apropos_accumulate;
}
+void
syms_of_keymap ()
{
Lisp_Object tem;
@@ -3305,6 +3308,7 @@ and applies even for keys that have ordinary bindings.");
defsubr (&Sapropos_internal);
}
+void
keys_of_keymap ()
{
Lisp_Object tem;
diff --git a/src/marker.c b/src/marker.c
index e79e800b9b3..9806c30b5c1 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -36,6 +36,7 @@ static int cached_modiff;
static int byte_debug_flag;
+void
clear_charpos_cache (b)
struct buffer *b;
{
diff --git a/src/mocklisp.c b/src/mocklisp.c
index 97b19dc5805..dfcee79bd22 100644
--- a/src/mocklisp.c
+++ b/src/mocklisp.c
@@ -227,6 +227,7 @@ is converted into a string by expressing it in decimal.")
}
+void
syms_of_mocklisp ()
{
Qmocklisp = intern ("mocklisp");
diff --git a/src/prefix-args.c b/src/prefix-args.c
index 8be1558f08a..d48696ab06b 100644
--- a/src/prefix-args.c
+++ b/src/prefix-args.c
@@ -26,6 +26,7 @@
#include <stdio.h>
+int
main (argc, argv)
int argc;
char **argv;
diff --git a/src/print.c b/src/print.c
index 8bfefe0508c..49a0610860e 100644
--- a/src/print.c
+++ b/src/print.c
@@ -683,7 +683,7 @@ temp_output_buffer_setup (bufname)
Lisp_Object
internal_with_output_to_temp_buffer (bufname, function, args)
char *bufname;
- Lisp_Object (*function) ();
+ Lisp_Object (*function) P_ ((Lisp_Object));
Lisp_Object args;
{
int count = specpdl_ptr - specpdl;
diff --git a/src/process.c b/src/process.c
index d8108517f70..daa4e391744 100644
--- a/src/process.c
+++ b/src/process.c
@@ -106,6 +106,8 @@ Boston, MA 02111-1307, USA. */
#include "commands.h"
#include "frame.h"
#include "blockinput.h"
+#include "keyboard.h"
+#include "dispextern.h"
#define max(a, b) ((a) > (b) ? (a) : (b))
@@ -279,6 +281,7 @@ static char pty_name[24];
Lisp_Object status_convert ();
+void
update_status (p)
struct Lisp_Process *p;
{
@@ -391,7 +394,7 @@ int
allocate_pty ()
{
struct stat stb;
- register c, i;
+ register int c, i;
int fd;
/* Some systems name their pseudoterminals so that there are gaps in
@@ -512,6 +515,7 @@ make_process (name)
return val;
}
+void
remove_process (proc)
register Lisp_Object proc;
{
@@ -2173,7 +2177,7 @@ Return non-nil iff we received any output before the timeout expired.")
static int waiting_for_user_input_p;
/* This is here so breakpoints can be put on it. */
-static
+static void
wait_reading_process_input_1 ()
{
}
@@ -2210,6 +2214,7 @@ wait_reading_process_input_1 ()
before the timeout elapsed.
Otherwise, return true iff we received input from any process. */
+int
wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
int time_limit, microsecs;
Lisp_Object read_kbd;
@@ -2708,6 +2713,7 @@ read_process_output_error_handler (error)
The characters read are decoded according to PROC's coding-system
for decoding. */
+int
read_process_output (proc, channel)
Lisp_Object proc;
register int channel;
@@ -3062,6 +3068,7 @@ send_process_trap ()
being encoded. Should we store them in a buffer to prepend them to
the data send later? */
+void
send_process (proc, buf, len, object)
volatile Lisp_Object proc;
unsigned char *buf;
@@ -4289,6 +4296,7 @@ keyboard_bit_set (mask)
return 0;
}
+void
init_process ()
{
register int i;
@@ -4317,6 +4325,7 @@ init_process ()
bzero (proc_encode_coding_system, sizeof proc_encode_coding_system);
}
+void
syms_of_process ()
{
Qprocessp = intern ("processp");
diff --git a/src/scroll.c b/src/scroll.c
index cbab971fd35..12c3828b33c 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -264,7 +264,7 @@ do_scrolling (frame, matrix, window_size, unchanged_at_top)
bcopy (current_frame->glyphs, temp_frame->glyphs,
current_frame->height * sizeof (GLYPH *));
bcopy (current_frame->charstarts, temp_frame->charstarts,
- current_frame->height * sizeof (GLYPH *));
+ current_frame->height * sizeof (int *));
bcopy (current_frame->used, temp_frame->used,
current_frame->height * sizeof (int));
bcopy (current_frame->highlight, temp_frame->highlight,
@@ -889,6 +889,7 @@ scrolling_max_lines_saved (start, end, oldhash, newhash, cost)
These are the same arguments that might be given to
scroll_frame_lines to perform this scrolling. */
+int
scroll_cost (frame, from, to, amount)
FRAME_PTR frame;
int from, to, amount;
@@ -1008,6 +1009,7 @@ ins_del_costs (frame,
Deletion is essentially the same as insertion.
*/
+void
do_line_insertion_deletion_costs (frame,
ins_line_string, multi_ins_string,
del_line_string, multi_del_string,
diff --git a/src/search.c b/src/search.c
index ed93d5087d3..61d960ee867 100644
--- a/src/search.c
+++ b/src/search.c
@@ -20,6 +20,9 @@ Boston, MA 02111-1307, USA. */
#include <config.h>
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
#include "lisp.h"
#include "syntax.h"
#include "category.h"
@@ -515,6 +518,7 @@ newline_cache_on_off (buf)
If ALLOW_QUIT is non-zero, set immediate_quit. That's good to do
except when inside redisplay. */
+int
scan_buffer (target, start, end, count, shortage, allow_quit)
register int target;
int start, end;
@@ -2715,6 +2719,7 @@ DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0,
STRING_MULTIBYTE (string));
}
+void
syms_of_search ()
{
register int i;
diff --git a/src/syntax.c b/src/syntax.c
index 02357671608..c39e2c2ab66 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1065,6 +1065,7 @@ int parse_sexp_ignore_comments;
If that many words cannot be found before the end of the buffer, return 0.
COUNT negative means scan backward and stop at word beginning. */
+int
scan_words (from, count)
register int from, count;
{
@@ -2605,6 +2606,7 @@ DEFUN ("parse-partial-sexp", Fparse_partial_sexp, Sparse_partial_sexp, 2, 6, 0,
Qnil)))))))));
}
+void
init_syntax_once ()
{
register int i, c;
@@ -2676,6 +2678,7 @@ init_syntax_once ()
}
}
+void
syms_of_syntax ()
{
Qsyntax_table_p = intern ("syntax-table-p");
diff --git a/src/sysdep.c b/src/sysdep.c
index 6c1c0885e85..209b2715f3e 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -298,6 +298,7 @@ discard_tty_input ()
/* Arrange for character C to be read as the next input from
the terminal. */
+void
stuff_char (c)
char c;
{
@@ -377,6 +378,7 @@ init_baud_rate ()
}
/*ARGSUSED*/
+void
set_exclusive_use (fd)
int fd;
{
@@ -1028,6 +1030,7 @@ int inherited_pgroup;
When we are in the foreground, but not started in our own process
group, redirect the TTY to point to our own process group. We need
to be in our own process group to receive SIGIO properly. */
+void
narrow_foreground_group ()
{
int me = getpid ();
@@ -1039,6 +1042,7 @@ narrow_foreground_group ()
}
/* Set the tty to our original foreground group. */
+void
widen_foreground_group ()
{
if (inherited_pgroup != getpid ())
@@ -1595,6 +1599,7 @@ init_sys_modes ()
/* Return nonzero if safe to use tabs in output.
At the time this is called, init_sys_modes has not been done yet. */
+int
tabs_safe_p ()
{
struct emacs_tty tty;
@@ -1848,6 +1853,7 @@ setup_pty (fd)
This is called each time Emacs is resumed, also, but does nothing
because input_chain is no longer zero. */
+void
init_vms_input ()
{
int status;
@@ -1862,6 +1868,7 @@ init_vms_input ()
/* Deassigning the input channel is done before exiting. */
+void
stop_vms_input ()
{
return SYS$DASSGN (input_fd);
@@ -1872,6 +1879,7 @@ short input_buffer;
/* Request reading one character into the keyboard buffer.
This is done as soon as the buffer becomes empty. */
+void
queue_kbd_input ()
{
int status;
@@ -1889,6 +1897,7 @@ int input_count;
/* Ast routine that is called when keyboard input comes in
in accord with the SYS$QIO above. */
+void
kbd_input_ast ()
{
register int c = -1;
@@ -1936,6 +1945,7 @@ kbd_input_ast ()
/* Wait until there is something in kbd_buffer. */
+void
wait_for_kbd_input ()
{
extern int have_process_input, process_exited;
@@ -1982,6 +1992,7 @@ wait_for_kbd_input ()
and therefore there is no I/O request queued when we return.
SYS$SETAST is used to avoid a timing error. */
+void
end_kbd_input ()
{
#ifdef ASTDEBUG
@@ -2008,6 +2019,7 @@ end_kbd_input ()
/* Wait for either input available or time interval expiry. */
+void
input_wait_timeout (timeval)
int timeval; /* Time to wait, in seconds */
{
@@ -2564,6 +2576,7 @@ sys_select (nfds, rfds, wfds, efds, timeout)
#define BUFFER_SIZE_FACTOR 1
#endif
+void
read_input_waiting ()
{
struct input_event e;
@@ -2657,6 +2670,7 @@ init_sigio (fd)
ioctl (fd, TIOCLSET, &lmode);
}
+void
reset_sigio ()
{
if (noninteractive)
@@ -2686,6 +2700,7 @@ unrequest_sigio ()
int sigheld; /* Mask of held signals */
+void
sigholdx (signum)
int signum;
{
@@ -2693,12 +2708,14 @@ sigholdx (signum)
sighold (signum);
}
+void
sigisheld (signum)
int signum;
{
sigheld |= sigbit (signum);
}
+void
sigunhold (signum)
int signum;
{
@@ -2706,6 +2723,7 @@ sigunhold (signum)
sigrelse (signum);
}
+void
sigfree () /* Free all held signals */
{
int i;
@@ -2715,6 +2733,7 @@ sigfree () /* Free all held signals */
sigheld = 0;
}
+int
sigbit (i)
{
return 1 << (i - 1);
@@ -2729,6 +2748,7 @@ sigbit (i)
sigset_t empty_mask, full_mask;
+void
init_signals ()
{
sigemptyset (&empty_mask);
@@ -3023,6 +3043,7 @@ sys_open (path, oflag, mode)
#ifdef INTERRUPTIBLE_CLOSE
+int
sys_close (fd)
int fd;
{
@@ -3326,6 +3347,7 @@ dup2 (oldd, newd)
#ifdef HAVE_TIMEVAL
/* ARGSUSED */
+int
gettimeofday (tp, tzp)
struct timeval *tp;
struct timezone *tzp;
@@ -3336,6 +3358,7 @@ gettimeofday (tp, tzp)
tp->tv_usec = 0;
if (tzp != 0)
tzp->tz_minuteswest = -1;
+ return 0;
}
#endif
@@ -3347,6 +3370,7 @@ gettimeofday (tp, tzp)
* This function will go away as soon as all the stubs fixed. (fnf)
*/
+void
croak (badfunc)
char *badfunc;
{
@@ -3871,6 +3895,7 @@ static unsigned int uic;
/* Called from init_sys_modes, so it happens not very often
but at least each time Emacs is loaded. */
+void
sys_access_reinit ()
{
uic = 0;
@@ -4123,6 +4148,7 @@ getwd (pathname)
return pathname;
}
+int
getppid ()
{
long item_code = JPI$_OWNER;
@@ -4318,6 +4344,7 @@ creat_copy_attrs (old, new)
#endif
#endif
+int
sys_creat (va_alist)
va_dcl
{
@@ -4434,6 +4461,7 @@ sys_creat (va_alist)
#endif /* creat */
/* fwrite to stdout is S L O W. Speed it up by using fputc...*/
+int
sys_fwrite (ptr, size, num, fp)
register char * ptr;
FILE * fp;
@@ -4442,6 +4470,7 @@ sys_fwrite (ptr, size, num, fp)
while (tot--)
fputc (*ptr++, fp);
+ return num;
}
/*
@@ -4729,6 +4758,7 @@ getpwuid (uid)
/* return total address space available to the current process. This is
the sum of the current p0 size, p1 size and free page table entries
available. */
+int
vlimit ()
{
int item_code;
@@ -4764,6 +4794,7 @@ vlimit ()
return free_pages + frep0va + (0x7fffffff - frep1va);
}
+int
define_logical_name (varname, string)
char *varname;
char *string;
@@ -4778,6 +4809,7 @@ define_logical_name (varname, string)
return LIB$SET_LOGICAL (&envdsc, &strdsc, &lnmdsc, 0, 0);
}
+int
delete_logical_name (varname)
char *varname;
{
@@ -4789,15 +4821,23 @@ delete_logical_name (varname)
return LIB$DELETE_LOGICAL (&envdsc, &lnmdsc);
}
+int
ulimit ()
-{}
+{
+ return 0;
+}
+int
setpgrp ()
-{}
+{
+ return 0;
+}
+int
execvp ()
{
error ("execvp system call not implemented");
+ return -1;
}
int
@@ -4920,6 +4960,7 @@ rename_sans_version (from,to)
return 0;
}
+int
link (file, new)
char * file, * new;
{
@@ -4987,6 +5028,7 @@ link (file, new)
return 0;
}
+void
croak (badfunc)
char *badfunc;
{
@@ -5002,6 +5044,7 @@ random ()
return rand () - (1 << 30);
}
+void
srandom (seed)
{
srand (seed);
@@ -5011,6 +5054,7 @@ srandom (seed)
#ifdef AIXHFT
/* Called from init_sys_modes. */
+void
hft_init ()
{
int junk;
@@ -5064,6 +5108,7 @@ hft_init ()
/* Reset the rubout key to backspace. */
+void
hft_reset ()
{
struct hfbuf buf;
@@ -5183,7 +5228,7 @@ bcopy (b1, b2, length)
*b2++ = *b1++;
#endif /* not VMS */
}
-#endif /* (defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY) */
+#endif /* (!defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY) */
#ifndef BSTRING
#ifndef bcmp
diff --git a/src/term.c b/src/term.c
index 64f78cc7b02..39aba03da9f 100644
--- a/src/term.c
+++ b/src/term.c
@@ -33,8 +33,10 @@ Boston, MA 02111-1307, USA. */
#include "disptab.h"
#include "termhooks.h"
#include "keyboard.h"
-
-extern Lisp_Object Fmake_sparse_keymap ();
+#include "dispextern.h"
+#ifdef HAVE_X_WINDOWS
+#include "xterm.h"
+#endif
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
@@ -74,33 +76,33 @@ int no_redraw_on_reenter;
/* Hook functions that you can set to snap out the functions in this file.
These are all extern'd in termhooks.h */
-int (*cursor_to_hook) ();
-int (*raw_cursor_to_hook) ();
+void (*cursor_to_hook) P_ ((int, int));
+void (*raw_cursor_to_hook) P_ ((int, int));
-int (*clear_to_end_hook) ();
-int (*clear_frame_hook) ();
-int (*clear_end_of_line_hook) ();
+void (*clear_to_end_hook) P_ ((void));
+void (*clear_frame_hook) P_ ((void));
+void (*clear_end_of_line_hook) P_ ((int));
-int (*ins_del_lines_hook) ();
+void (*ins_del_lines_hook) P_ ((int, int));
-int (*change_line_highlight_hook) ();
-int (*reassert_line_highlight_hook) ();
+void (*change_line_highlight_hook) P_ ((int, int, int));
+void (*reassert_line_highlight_hook) P_ ((int, int));
-int (*insert_glyphs_hook) ();
-int (*write_glyphs_hook) ();
-int (*delete_glyphs_hook) ();
+void (*insert_glyphs_hook) P_ ((GLYPH *, int));
+void (*write_glyphs_hook) P_ ((GLYPH *, int));
+void (*delete_glyphs_hook) P_ ((int));
-int (*ring_bell_hook) ();
+void (*ring_bell_hook) P_ ((void));
-int (*reset_terminal_modes_hook) ();
-int (*set_terminal_modes_hook) ();
-int (*update_begin_hook) ();
-int (*update_end_hook) ();
-int (*set_terminal_window_hook) ();
+void (*reset_terminal_modes_hook) P_ ((void));
+void (*set_terminal_modes_hook) P_ ((void));
+void (*update_begin_hook) P_ ((struct frame *));
+void (*update_end_hook) P_ ((struct frame *));
+void (*set_terminal_window_hook) P_ ((int));
-int (*read_socket_hook) ();
+int (*read_socket_hook) P_ ((int, struct input_event *, int, int));
-int (*frame_up_to_date_hook) ();
+void (*frame_up_to_date_hook) P_ ((struct frame *));
/* Return the current position of the mouse.
@@ -120,19 +122,19 @@ int (*frame_up_to_date_hook) ();
This should clear mouse_moved until the next motion
event arrives. */
-void (*mouse_position_hook) ( /* FRAME_PTR *f, int insist,
+void (*mouse_position_hook) P_ ((FRAME_PTR *f, int insist,
Lisp_Object *bar_window,
enum scroll_bar_part *part,
Lisp_Object *x,
Lisp_Object *y,
- unsigned long *time */ );
+ unsigned long *time));
/* When reading from a minibuffer in a different frame, Emacs wants
to shift the highlight from the selected frame to the minibuffer's
frame; under X, this means it lies about where the focus is.
This hook tells the window system code to re-decide where to put
the highlight. */
-void (*frame_rehighlight_hook) ( /* FRAME_PTR f */ );
+void (*frame_rehighlight_hook) P_ ((FRAME_PTR f));
/* If we're displaying frames using a window system that can stack
frames on top of each other, this hook allows you to bring a frame
@@ -144,7 +146,7 @@ void (*frame_rehighlight_hook) ( /* FRAME_PTR f */ );
If RAISE is non-zero, F is brought to the front, before all other
windows. If RAISE is zero, F is sent to the back, behind all other
windows. */
-void (*frame_raise_lower_hook) ( /* FRAME_PTR f, int raise */ );
+void (*frame_raise_lower_hook) P_ ((FRAME_PTR f, int raise));
/* Set the vertical scroll bar for WINDOW to have its upper left corner
at (TOP, LEFT), and be LENGTH rows high. Set its handle to
@@ -152,8 +154,8 @@ void (*frame_raise_lower_hook) ( /* FRAME_PTR f, int raise */ );
of WHOLE characters, starting at POSITION. If WINDOW doesn't yet
have a scroll bar, create one for it. */
void (*set_vertical_scroll_bar_hook)
- ( /* struct window *window,
- int portion, int whole, int position */ );
+ P_ ((struct window *window,
+ int portion, int whole, int position));
/* The following three hooks are used when we're doing a thorough
@@ -176,11 +178,11 @@ void (*set_vertical_scroll_bar_hook)
If non-zero, this hook should be safe to apply to any frame,
whether or not it can support scroll bars, and whether or not it is
currently displaying them. */
-void (*condemn_scroll_bars_hook)( /* FRAME_PTR *frame */ );
+void (*condemn_scroll_bars_hook) P_ ((FRAME_PTR frame));
/* Unmark WINDOW's scroll bar for deletion in this judgement cycle.
Note that it's okay to redeem a scroll bar that is not condemned. */
-void (*redeem_scroll_bar_hook)( /* struct window *window */ );
+void (*redeem_scroll_bar_hook) P_ ((struct window *window));
/* Remove all scroll bars on FRAME that haven't been saved since the
last call to `*condemn_scroll_bars_hook'.
@@ -193,7 +195,7 @@ void (*redeem_scroll_bar_hook)( /* struct window *window */ );
If non-zero, this hook should be safe to apply to any frame,
whether or not it can support scroll bars, and whether or not it is
currently displaying them. */
-void (*judge_scroll_bars_hook)( /* FRAME_PTR *FRAME */ );
+void (*judge_scroll_bars_hook) P_ ((FRAME_PTR FRAME));
/* Strings, numbers and flags taken from the termcap entry. */
@@ -319,6 +321,7 @@ extern char *tgetstr ();
#define FRAME_TERMCAP_P(_f_) 0
#endif /* WINDOWSNT */
+void
ring_bell ()
{
if (! NILP (Vring_bell_function))
@@ -349,6 +352,7 @@ ring_bell ()
OUTPUT (TS_visible_bell && visible_bell ? TS_visible_bell : TS_bell);
}
+void
set_terminal_modes ()
{
if (! FRAME_TERMCAP_P (selected_frame))
@@ -362,6 +366,7 @@ set_terminal_modes ()
losecursor ();
}
+void
reset_terminal_modes ()
{
if (! FRAME_TERMCAP_P (selected_frame))
@@ -383,6 +388,7 @@ reset_terminal_modes ()
cmputc ('\r');
}
+void
update_begin (f)
FRAME_PTR f;
{
@@ -391,6 +397,7 @@ update_begin (f)
(*update_begin_hook) (f);
}
+void
update_end (f)
FRAME_PTR f;
{
@@ -406,6 +413,7 @@ update_end (f)
updating_frame = 0;
}
+void
set_terminal_window (size)
int size;
{
@@ -420,6 +428,7 @@ set_terminal_window (size)
set_scroll_region (0, specified_window);
}
+void
set_scroll_region (start, stop)
int start, stop;
{
@@ -444,6 +453,7 @@ set_scroll_region (start, stop)
losecursor ();
}
+void
turn_on_insert ()
{
if (!insert_mode)
@@ -451,6 +461,7 @@ turn_on_insert ()
insert_mode = 1;
}
+void
turn_off_insert ()
{
if (insert_mode)
@@ -465,6 +476,7 @@ turn_off_insert ()
These functions are called on all terminals, but do nothing
on terminals whose standout mode does not work that way. */
+void
turn_off_highlight ()
{
if (TN_standout_width < 0)
@@ -475,6 +487,7 @@ turn_off_highlight ()
}
}
+void
turn_on_highlight ()
{
if (TN_standout_width < 0)
@@ -489,6 +502,7 @@ turn_on_highlight ()
empty space inside windows. What this is,
depends on the user option inverse-video. */
+void
background_highlight ()
{
if (TN_standout_width >= 0)
@@ -501,7 +515,7 @@ background_highlight ()
/* Set standout mode to the mode specified for the text to be output. */
-static
+static void
highlight_if_desired ()
{
if (TN_standout_width >= 0)
@@ -523,6 +537,7 @@ highlight_if_desired ()
/* Write a standout marker or end-standout marker at the front of the line
at vertical position vpos. */
+void
write_standout_marker (flag, vpos)
int flag, vpos;
{
@@ -540,6 +555,7 @@ write_standout_marker (flag, vpos)
Call this when about to modify line at position VPOS
and not change whether it is highlighted. */
+void
reassert_line_highlight (highlight, vpos)
int highlight;
int vpos;
@@ -561,6 +577,7 @@ reassert_line_highlight (highlight, vpos)
/* Call this when about to modify line at position VPOS
and change whether it is highlighted. */
+void
change_line_highlight (new_highlight, vpos, first_unused_hpos)
int new_highlight, vpos, first_unused_hpos;
{
@@ -597,6 +614,7 @@ change_line_highlight (new_highlight, vpos, first_unused_hpos)
/* Move to absolute position, specified origin 0 */
+void
cursor_to (row, col)
int row, col;
{
@@ -626,6 +644,7 @@ cursor_to (row, col)
/* Similar but don't take any account of the wasted characters. */
+void
raw_cursor_to (row, col)
int row, col;
{
@@ -646,6 +665,7 @@ raw_cursor_to (row, col)
/* Erase operations */
/* clear from cursor to end of frame */
+void
clear_to_end ()
{
register int i;
@@ -673,6 +693,7 @@ clear_to_end ()
/* Clear entire frame */
+void
clear_frame ()
{
if (clear_frame_hook
@@ -702,6 +723,7 @@ clear_frame ()
Note that the cursor may be moved. */
+void
clear_end_of_line (first_unused_hpos)
int first_unused_hpos;
{
@@ -719,6 +741,7 @@ clear_end_of_line (first_unused_hpos)
Note that the cursor may be moved, on terminals lacking a `ce' string. */
+void
clear_end_of_line_raw (first_unused_hpos)
int first_unused_hpos;
{
@@ -849,6 +872,7 @@ encode_terminal_code (src, dst, src_len, dst_len, consumed)
}
+void
write_glyphs (string, len)
register GLYPH *string;
register int len;
@@ -922,6 +946,7 @@ write_glyphs (string, len)
/* If start is zero, insert blanks instead of a string at start */
+void
insert_glyphs (start, len)
register GLYPH *start;
register int len;
@@ -996,6 +1021,7 @@ insert_glyphs (start, len)
cmcheckmagic ();
}
+void
delete_glyphs (n)
register int n;
{
@@ -1033,6 +1059,7 @@ delete_glyphs (n)
/* Insert N lines at vpos VPOS. If N is negative, delete -N lines. */
+void
ins_del_lines (vpos, n)
int vpos, n;
{
@@ -1093,7 +1120,7 @@ ins_del_lines (vpos, n)
if (TN_standout_width >= 0)
{
- register lower_limit
+ register int lower_limit
= (scroll_region_ok
? specified_window
: FRAME_HEIGHT (selected_frame));
@@ -1233,8 +1260,7 @@ calculate_ins_del_char_costs (frame)
*p++ = (ins_startup_cost += ins_cost_per_char);
}
-extern do_line_insertion_deletion_costs ();
-
+void
calculate_costs (frame)
FRAME_PTR frame;
{
@@ -1534,6 +1560,7 @@ term_get_fkeys_1 ()
}
+void
term_init (terminal_type)
char *terminal_type;
{
@@ -1904,6 +1931,7 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
}
/* VARARGS 1 */
+void
fatal (str, arg1, arg2)
char *str, *arg1, *arg2;
{
@@ -1914,6 +1942,7 @@ fatal (str, arg1, arg2)
exit (1);
}
+void
syms_of_term ()
{
DEFVAR_BOOL ("system-uses-terminfo", &system_uses_terminfo,
diff --git a/src/terminfo.c b/src/terminfo.c
index 4bb47997507..9267a55614a 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -39,8 +39,6 @@ short ospeed;
#endif
#endif
-static buffer[512];
-
/* Interface to curses/terminfo library.
Turns out that all of the terminfo-level routines look
like their termcap counterparts except for tparm, which replaces
diff --git a/src/undo.c b/src/undo.c
index ceaf3b421d2..86bcdc9977d 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -524,6 +524,7 @@ Return what remains of the list.")
return unbind_to (count, list);
}
+void
syms_of_undo ()
{
Qinhibit_read_only = intern ("inhibit-read-only");
diff --git a/src/widget.c b/src/widget.c
index 31edf1ed7e6..b7d17547c41 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -36,6 +36,7 @@ Boston, MA 02111-1307, USA. */
#include "xterm.h"
#include "frame.h"
+#include "window.h"
#include "dispextern.h"
#include "blockinput.h"
@@ -967,6 +968,7 @@ EmacsFrameSetCharSize (widget, columns, rows)
SET_FRAME_GARBAGED (f);
}
+void
widget_store_internal_border (widget)
Widget widget;
{
diff --git a/src/window.c b/src/window.c
index 1f4db424b2b..221eac63ec0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -30,6 +30,10 @@ Boston, MA 02111-1307, USA. */
#include "disptab.h"
#include "keyboard.h"
#include "blockinput.h"
+#include "dispextern.h"
+#ifdef HAVE_WINDOW_SYSTEM
+#include "xterm.h"
+#endif
Lisp_Object Qwindowp, Qwindow_live_p;
@@ -723,7 +727,7 @@ DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_displa
/* Record info on buffer window w is displaying
when it is about to cease to display that buffer. */
-static
+static void
unshow_buffer (w)
register struct window *w;
{
@@ -767,7 +771,7 @@ unshow_buffer (w)
}
/* Put replacement into the window structure in place of old. */
-static
+static void
replace_window (old, replacement)
Lisp_Object old, replacement;
{
@@ -2365,7 +2369,7 @@ temp_output_buffer_show (buf)
}
}
-static
+static void
make_dummy_parent (window)
Lisp_Object window;
{
@@ -3799,6 +3803,7 @@ and scrolling positions.")
return Qnil;
}
+void
init_window_once ()
{
selected_frame = make_terminal_frame ();
@@ -3810,6 +3815,7 @@ init_window_once ()
window_initialized = 1;
}
+void
syms_of_window ()
{
staticpro (&Qwindow_configuration_change_hook);
@@ -4029,6 +4035,7 @@ The selected frame is the one whose configuration has changed.");
defsubr (&Scompare_window_configurations);
}
+void
keys_of_window ()
{
initial_define_key (control_x_map, '1', "delete-other-windows");
diff --git a/src/xdisp.c b/src/xdisp.c
index 069a73863fe..a6712aaf932 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -40,6 +40,11 @@ Boston, MA 02111-1307, USA. */
#include "keyboard.h"
#include "coding.h"
#include "process.h"
+#include "region-cache.h"
+
+#ifdef HAVE_WINDOW_SYSTEM
+#include "xterm.h"
+#endif
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)
extern void set_frame_menubar ();
@@ -5468,6 +5473,7 @@ This commonly affects the minibuffer window, hence the name of the variable.");
}
/* initialize the window system */
+void
init_xdisp ()
{
Lisp_Object root_window;
diff --git a/src/xmenu.c b/src/xmenu.c
index 09cc1af864c..5e7c0c966ec 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -686,7 +686,7 @@ cached information about equivalent key sequences.")
/* Use the mouse's current position. */
FRAME_PTR new_f = selected_frame;
Lisp_Object bar_window;
- int part;
+ enum scroll_bar_part part;
unsigned long time;
if (mouse_position_hook)
@@ -1095,6 +1095,7 @@ popup_get_selection (initial_event, dpyinfo, id)
passing it to the toolkit right away, is that we can safely
execute Lisp code. */
+void
x_activate_menubar (f)
FRAME_PTR f;
{
@@ -2606,6 +2607,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
#endif /* HAVE_MENUS */
+void
syms_of_xmenu ()
{
staticpro (&menu_items);
diff --git a/src/xrdb.c b/src/xrdb.c
index 72067ed84aa..0ab7992e5c2 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -24,6 +24,10 @@ Boston, MA 02111-1307, USA. */
#include <config.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <paths.h>
#include <stdio.h>
@@ -84,6 +88,7 @@ extern char *get_system_name ();
#define malloc xmalloc
#define realloc xrealloc
#define free xfree
+extern long *xmalloc (), *xrealloc ();
#endif
char *x_get_string_resource ();
diff --git a/src/xselect.c b/src/xselect.c
index 0a6978ec5c2..bf4fcb6d992 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA. */
#include "buffer.h"
#include "charset.h"
#include "coding.h"
+#include "process.h"
#define CUT_BUFFER_SUPPORT
diff --git a/src/xterm.c b/src/xterm.c
index 52cb889d4c7..4afe386d39a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -86,6 +86,7 @@ Boston, MA 02111-1307, USA. */
#include "window.h"
#include "keyboard.h"
#include "intervals.h"
+#include "process.h"
#ifdef USE_X_TOOLKIT
#include <X11/Shell.h>
@@ -147,7 +148,7 @@ Lisp_Object x_display_name_list;
is the frame to apply to. */
extern struct frame *updating_frame;
-extern waiting_for_input;
+extern int waiting_for_input;
/* This is a frame waiting to be autoraised, within XTread_socket. */
struct frame *pending_autoraise_frame;
@@ -265,8 +266,8 @@ static void clear_mouse_face ();
static void show_mouse_face ();
static void do_line_dance ();
-static int XTcursor_to ();
-static int XTclear_end_of_line ();
+static void XTcursor_to ();
+static void XTclear_end_of_line ();
static int x_io_error_quitter ();
int x_catch_errors ();
void x_uncatch_errors ();
@@ -323,7 +324,7 @@ x_display_info_for_display (dpy)
should never be called except during an update, the only exceptions
being XTcursor_to, XTwrite_glyphs and XTreassert_line_highlight. */
-static
+static void
XTupdate_begin (f)
struct frame *f;
{
@@ -383,7 +384,7 @@ XTupdate_begin (f)
UNBLOCK_INPUT;
}
-static
+static void
XTupdate_end (f)
struct frame *f;
{
@@ -413,7 +414,7 @@ XTupdate_end (f)
/* This is called after a redisplay on frame F. */
-static
+static void
XTframe_up_to_date (f)
FRAME_PTR f;
{
@@ -434,6 +435,7 @@ XTframe_up_to_date (f)
Call this when about to modify line at position VPOS
and not change whether it is highlighted. */
+void
XTreassert_line_highlight (new, vpos)
int new, vpos;
{
@@ -443,7 +445,7 @@ XTreassert_line_highlight (new, vpos)
/* Call this when about to modify line at position VPOS
and change whether it is highlighted. */
-static
+static void
XTchange_line_highlight (new_highlight, vpos, first_unused_hpos)
int new_highlight, vpos, first_unused_hpos;
{
@@ -456,7 +458,7 @@ XTchange_line_highlight (new_highlight, vpos, first_unused_hpos)
When starting Emacs, no X window is mapped. And nothing must be done
to Emacs's own window if it is suspended (though that rarely happens). */
-static
+static void
XTset_terminal_modes ()
{
}
@@ -465,7 +467,7 @@ XTset_terminal_modes ()
Exiting will make the X-windows go away, and suspending
requires no action. */
-static
+static void
XTreset_terminal_modes ()
{
/* XTclear_frame (); */
@@ -475,7 +477,7 @@ XTreset_terminal_modes ()
This is where display update commands will take effect.
This does not affect the place where the cursor-box is displayed. */
-static int
+static void
XTcursor_to (row, col)
register int row, col;
{
@@ -1184,7 +1186,7 @@ dumpglyphs (f, left, top, gp, n, hl, font)
`highlight', set up by XTreassert_line_highlight or XTchange_line_highlight,
controls the pixel values used for foreground and background. */
-static
+static void
XTwrite_glyphs (start, len)
register GLYPH *start;
int len;
@@ -1230,7 +1232,7 @@ XTwrite_glyphs (start, len)
to column FIRST_UNUSED (exclusive). The idea is that everything
from FIRST_UNUSED onward is already erased. */
-static
+static void
XTclear_end_of_line (first_unused)
register int first_unused;
{
@@ -1272,7 +1274,7 @@ XTclear_end_of_line (first_unused)
UNBLOCK_INPUT;
}
-static
+static void
XTclear_frame ()
{
int mask;
@@ -1508,6 +1510,7 @@ timeval_subtract (result, x, y)
return x.tv_sec < y.tv_sec;
}
+void
XTflash (f)
struct frame *f;
{
@@ -1635,6 +1638,7 @@ XTflash (f)
#define XRINGBELL XBell (FRAME_X_DISPLAY (selected_frame), 0)
+void
XTring_bell ()
{
if (FRAME_X_DISPLAY (selected_frame) == 0)
@@ -1657,7 +1661,7 @@ XTring_bell ()
These are not supposed to be used because we are supposed to turn
off the feature of using them. */
-static
+static void
XTinsert_glyphs (start, len)
register char *start;
register int len;
@@ -1665,7 +1669,7 @@ XTinsert_glyphs (start, len)
abort ();
}
-static
+static void
XTdelete_glyphs (n)
register int n;
{
@@ -1677,7 +1681,7 @@ XTdelete_glyphs (n)
This, and those operations, are used only within an update
that is bounded by calls to XTupdate_begin and XTupdate_end. */
-static
+static void
XTset_terminal_window (n)
register int n;
{
@@ -1708,6 +1712,7 @@ static int line_dance_in_progress;
/* Perform an insert-lines or delete-lines operation,
inserting N lines or deleting -N lines at vertical position VPOS. */
+void
XTins_del_lines (vpos, n)
int vpos, n;
{
@@ -2693,6 +2698,7 @@ clear_mouse_face (dpyinfo)
/* Just discard the mouse face information for frame F, if any.
This is used when the size of F is changed. */
+void
cancel_mouse_face (f)
FRAME_PTR f;
{
@@ -3560,6 +3566,7 @@ x_scroll_bar_report_motion (fp, bar_window, part, x, y, time)
Clear out the scroll bars, and ask for expose events, so we can
redraw them. */
+void
x_scroll_bar_clear (f)
FRAME_PTR f;
{
@@ -3959,7 +3966,7 @@ XTread_socket (sd, bufp, numchars, expected)
if (! x_window_to_frame (dpyinfo, event.xselection.requestor))
goto OTHER;
#endif /* not USE_X_TOOLKIT */
- x_handle_selection_notify (&event);
+ x_handle_selection_notify (&event.xselection);
break;
case SelectionClear: /* Someone has grabbed ownership. */
@@ -4020,7 +4027,7 @@ XTread_socket (sd, bufp, numchars, expected)
if (!x_any_window_to_frame (dpyinfo, event.xproperty.window))
goto OTHER;
#endif /* not USE_X_TOOLKIT */
- x_handle_property_notify (&event);
+ x_handle_property_notify (&event.xproperty);
break;
case ReparentNotify:
@@ -4896,6 +4903,7 @@ x_display_box_cursor (f, on, x, y)
/* Display the cursor on frame F, or clear it, according to ON.
Also set the frame's cursor position to X and Y. */
+void
x_display_cursor (f, on, x, y)
struct frame *f;
int on;
@@ -4921,6 +4929,7 @@ x_display_cursor (f, on, x, y)
/* Display the cursor on frame F, or clear it, according to ON.
Don't change the cursor's position. */
+void
x_update_cursor (f, on)
struct frame *f;
int on;
@@ -4943,6 +4952,7 @@ x_update_cursor (f, on)
/* Refresh bitmap kitchen sink icon for frame F
when we get an expose event for it. */
+void
refreshicon (f)
struct frame *f;
{
@@ -5390,6 +5400,7 @@ x_new_fontset (f, fontsetname)
/* Calculate the absolute position in frame F
from its current recorded position values and gravity. */
+void
x_calc_absolute_position (f)
struct frame *f;
{
@@ -5482,6 +5493,7 @@ x_calc_absolute_position (f)
position values). It is -1 when calling from x_set_frame_parameters,
which means, do adjust for borders but don't change the gravity. */
+void
x_set_offset (f, xoff, yoff, change_gravity)
struct frame *f;
register int xoff, yoff;
@@ -5533,6 +5545,7 @@ x_set_offset (f, xoff, yoff, change_gravity)
for this size change and subsequent size changes.
Otherwise we leave the window gravity unchanged. */
+void
x_set_window_size (f, change_gravity, cols, rows)
struct frame *f;
int change_gravity;
@@ -5659,6 +5672,7 @@ x_set_mouse_pixel_position (f, pix_x, pix_y)
/* focus shifting, raising and lowering. */
+void
x_focus_on_frame (f)
struct frame *f;
{
@@ -5674,6 +5688,7 @@ x_focus_on_frame (f)
#endif /* ! 0 */
}
+void
x_unfocus_frame (f)
struct frame *f;
{
@@ -5687,6 +5702,7 @@ x_unfocus_frame (f)
/* Raise frame F. */
+void
x_raise_frame (f)
struct frame *f;
{
@@ -5705,6 +5721,7 @@ x_raise_frame (f)
/* Lower frame F. */
+void
x_lower_frame (f)
struct frame *f;
{
@@ -5741,6 +5758,7 @@ XTframe_raise_lower (f, raise_flag)
but it will become visible later when the window manager
finishes with it. */
+void
x_make_frame_visible (f)
struct frame *f;
{
@@ -5869,6 +5887,7 @@ x_make_frame_visible (f)
/* Make the frame visible (mapped and not iconified). */
+void
x_make_frame_invisible (f)
struct frame *f;
{
@@ -5951,6 +5970,7 @@ x_make_frame_invisible (f)
/* Change window state from mapped to iconified. */
+void
x_iconify_frame (f)
struct frame *f;
{
@@ -6059,6 +6079,7 @@ x_iconify_frame (f)
/* Destroy the X window of frame F. */
+void
x_destroy_window (f)
struct frame *f;
{
@@ -6130,6 +6151,7 @@ x_destroy_window (f)
If USER_POSITION is nonzero, we set the USPosition
flag (this is useful when FLAGS is 0). */
+void
x_wm_set_size_hint (f, flags, user_position)
struct frame *f;
long flags;
@@ -6273,6 +6295,7 @@ x_wm_set_size_hint (f, flags, user_position)
}
/* Used for IconicState or NormalState */
+void
x_wm_set_window_state (f, state)
struct frame *f;
int state;
@@ -6292,6 +6315,7 @@ x_wm_set_window_state (f, state)
#endif /* not USE_X_TOOLKIT */
}
+void
x_wm_set_icon_pixmap (f, pixmap_id)
struct frame *f;
int pixmap_id;
@@ -6341,6 +6365,7 @@ x_wm_set_icon_pixmap (f, pixmap_id)
#endif /* not USE_X_TOOLKIT */
}
+void
x_wm_set_icon_position (f, icon_x, icon_y)
struct frame *f;
int icon_x, icon_y;
@@ -7161,6 +7186,7 @@ x_delete_display (dpyinfo)
/* Set up use of X before we make the first connection. */
+void
x_initialize ()
{
clear_frame_hook = XTclear_frame;