aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Schwab1998-04-14 12:25:56 +0000
committerAndreas Schwab1998-04-14 12:25:56 +0000
commitdfcf069d565c347abf3cb7cec80e6ed8432037ba (patch)
treecd9620f10084ffa69d7d6ae26284ffd69d4c07a5 /src
parent0f94f94657ad7a6a68e64c612285a5e06152def2 (diff)
downloademacs-dfcf069d565c347abf3cb7cec80e6ed8432037ba.tar.gz
emacs-dfcf069d565c347abf3cb7cec80e6ed8432037ba.zip
Fix -Wimplicit warnings.
Diffstat (limited to 'src')
-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).")
517 return Qnil; 517 return Qnil;
518} 518}
519 519
520void
520syms_of_abbrev () 521syms_of_abbrev ()
521{ 522{
522 DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list, 523 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 ()
593} 593}
594 594
595/* Explicitly free a float cell. */ 595/* Explicitly free a float cell. */
596void
596free_float (ptr) 597free_float (ptr)
597 struct Lisp_Float *ptr; 598 struct Lisp_Float *ptr;
598{ 599{
@@ -2947,6 +2948,7 @@ Frames, windows, buffers, and subprocesses count as vectors\n\
2947 2948
2948/* Initialization */ 2949/* Initialization */
2949 2950
2951void
2950init_alloc_once () 2952init_alloc_once ()
2951{ 2953{
2952 /* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */ 2954 /* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */
@@ -2989,6 +2991,7 @@ init_alloc_once ()
2989#endif /* VIRT_ADDR_VARIES */ 2991#endif /* VIRT_ADDR_VARIES */
2990} 2992}
2991 2993
2994void
2992init_alloc () 2995init_alloc ()
2993{ 2996{
2994 gcprolist = 0; 2997 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;
33#endif /* not MAXPATHLEN */ 33#endif /* not MAXPATHLEN */
34 34
35#include <config.h> 35#include <config.h>
36#ifdef STDC_HEADERS
37#include <stdlib.h>
38#endif
39#ifdef HAVE_UNISTD_H
40#include <unistd.h>
41#endif
36#include "lisp.h" 42#include "lisp.h"
37#include "intervals.h" 43#include "intervals.h"
38#include "window.h" 44#include "window.h"
@@ -2230,9 +2236,11 @@ struct sortvec
2230}; 2236};
2231 2237
2232static int 2238static int
2233compare_overlays (s1, s2) 2239compare_overlays (v1, v2)
2234 struct sortvec *s1, *s2; 2240 const void *v1, *v2;
2235{ 2241{
2242 const struct sortvec *s1 = (const struct sortvec *) v1;
2243 const struct sortvec *s2 = (const struct sortvec *) v2;
2236 if (s1->priority != s2->priority) 2244 if (s1->priority != s2->priority)
2237 return s1->priority - s2->priority; 2245 return s1->priority - s2->priority;
2238 if (s1->beg != s2->beg) 2246 if (s1->beg != s2->beg)
@@ -3773,6 +3781,7 @@ buffer_slot_type_mismatch (offset)
3773 type_name, XSYMBOL (sym)->name->data); 3781 type_name, XSYMBOL (sym)->name->data);
3774} 3782}
3775 3783
3784void
3776init_buffer_once () 3785init_buffer_once ()
3777{ 3786{
3778 register Lisp_Object tem; 3787 register Lisp_Object tem;
@@ -3914,6 +3923,7 @@ init_buffer_once ()
3914 Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); 3923 Fset_buffer (Fget_buffer_create (build_string ("*scratch*")));
3915} 3924}
3916 3925
3926void
3917init_buffer () 3927init_buffer ()
3918{ 3928{
3919 char buf[MAXPATHLEN+1]; 3929 char buf[MAXPATHLEN+1];
@@ -3973,6 +3983,7 @@ init_buffer ()
3973} 3983}
3974 3984
3975/* initialize the buffer routines */ 3985/* initialize the buffer routines */
3986void
3976syms_of_buffer () 3987syms_of_buffer ()
3977{ 3988{
3978 extern Lisp_Object Qdisabled; 3989 extern Lisp_Object Qdisabled;
@@ -4553,6 +4564,7 @@ is a member of the list.");
4553 defsubr (&Soverlay_put); 4564 defsubr (&Soverlay_put);
4554} 4565}
4555 4566
4567void
4556keys_of_buffer () 4568keys_of_buffer ()
4557{ 4569{
4558 initial_define_key (control_x_map, 'b', "switch-to-buffer"); 4570 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.")
1159 return v1; 1159 return v1;
1160} 1160}
1161 1161
1162void
1162syms_of_bytecode () 1163syms_of_bytecode ()
1163{ 1164{
1164 Qbytecode = intern ("byte-code"); 1165 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\")'.")
772 return val; 772 return val;
773} 773}
774 774
775void
775syms_of_callint () 776syms_of_callint ()
776{ 777{
777 point_marker = Fmake_marker (); 778 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.")
914 914
915#ifndef VMS /* VMS version is in vmsproc.c. */ 915#ifndef VMS /* VMS version is in vmsproc.c. */
916 916
917static int relocate_fd ();
918
917/* This is the last thing run in a newly forked inferior 919/* This is the last thing run in a newly forked inferior
918 either synchronous or asynchronous. 920 either synchronous or asynchronous.
919 Copy descriptors IN, OUT and ERR as descriptors 0, 1 and 2. 921 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.")
934 a decent error from within the child, this should be verified as an 936 a decent error from within the child, this should be verified as an
935 executable directory by the parent. */ 937 executable directory by the parent. */
936 938
939int
937child_setup (in, out, err, new_argv, set_pgrp, current_dir) 940child_setup (in, out, err, new_argv, set_pgrp, current_dir)
938 int in, out, err; 941 int in, out, err;
939 register char **new_argv; 942 register char **new_argv;
@@ -1130,7 +1133,7 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir)
1130 1133
1131/* Move the file descriptor FD so that its number is not less than MINFD. 1134/* Move the file descriptor FD so that its number is not less than MINFD.
1132 If the file descriptor is moved at all, the original is freed. */ 1135 If the file descriptor is moved at all, the original is freed. */
1133int 1136static int
1134relocate_fd (fd, minfd) 1137relocate_fd (fd, minfd)
1135 int fd, minfd; 1138 int fd, minfd;
1136{ 1139{
@@ -1228,6 +1231,7 @@ egetenv (var)
1228 1231
1229/* This is run before init_cmdargs. */ 1232/* This is run before init_cmdargs. */
1230 1233
1234void
1231init_callproc_1 () 1235init_callproc_1 ()
1232{ 1236{
1233 char *data_dir = egetenv ("EMACSDATA"); 1237 char *data_dir = egetenv ("EMACSDATA");
@@ -1249,6 +1253,7 @@ init_callproc_1 ()
1249 1253
1250/* This is run after init_cmdargs, when Vinstallation_directory is valid. */ 1254/* This is run after init_cmdargs, when Vinstallation_directory is valid. */
1251 1255
1256void
1252init_callproc () 1257init_callproc ()
1253{ 1258{
1254 char *data_dir = egetenv ("EMACSDATA"); 1259 char *data_dir = egetenv ("EMACSDATA");
@@ -1341,6 +1346,7 @@ init_callproc ()
1341#endif 1346#endif
1342} 1347}
1343 1348
1349void
1344set_process_environment () 1350set_process_environment ()
1345{ 1351{
1346 register char **envp; 1352 register char **envp;
@@ -1354,6 +1360,7 @@ set_process_environment ()
1354 Vprocess_environment); 1360 Vprocess_environment);
1355} 1361}
1356 1362
1363void
1357syms_of_callproc () 1364syms_of_callproc ()
1358{ 1365{
1359#ifdef DOS_NT 1366#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.")
182/* flag is CASE_UP, CASE_DOWN or CASE_CAPITALIZE or CASE_CAPITALIZE_UP. 182/* flag is CASE_UP, CASE_DOWN or CASE_CAPITALIZE or CASE_CAPITALIZE_UP.
183 b and e specify range of buffer to operate on. */ 183 b and e specify range of buffer to operate on. */
184 184
185void
185casify_region (flag, b, e) 186casify_region (flag, b, e)
186 enum case_action flag; 187 enum case_action flag;
187 Lisp_Object b, e; 188 Lisp_Object b, e;
@@ -404,6 +405,7 @@ With negative argument, capitalize previous words but do not move.")
404 return Qnil; 405 return Qnil;
405} 406}
406 407
408void
407syms_of_casefiddle () 409syms_of_casefiddle ()
408{ 410{
409 Qidentity = intern ("identity"); 411 Qidentity = intern ("identity");
@@ -421,6 +423,7 @@ syms_of_casefiddle ()
421 defsubr (&Scapitalize_word); 423 defsubr (&Scapitalize_word);
422} 424}
423 425
426void
424keys_of_casefiddle () 427keys_of_casefiddle ()
425{ 428{
426 initial_define_key (control_x_map, Ctl('U'), "upcase-region"); 429 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)
216 } 216 }
217} 217}
218 218
219void
219init_casetab_once () 220init_casetab_once ()
220{ 221{
221 register int i; 222 register int i;
@@ -256,6 +257,7 @@ init_casetab_once ()
256 XCHAR_TABLE (down)->extras[2] = Fcopy_sequence (up); 257 XCHAR_TABLE (down)->extras[2] = Fcopy_sequence (up);
257} 258}
258 259
260void
259syms_of_casetab () 261syms_of_casetab ()
260{ 262{
261 Qcase_table_p = intern ("case-table-p"); 263 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)
601} 601}
602 602
603 603
604void
604init_category_once () 605init_category_once ()
605{ 606{
606 /* This has to be done here, before we call Fmake_char_table. */ 607 /* This has to be done here, before we call Fmake_char_table. */
@@ -623,6 +624,7 @@ init_category_once ()
623 Fmake_vector (make_number (95), Qnil)); 624 Fmake_vector (make_number (95), Qnil));
624} 625}
625 626
627void
626syms_of_category () 628syms_of_category ()
627{ 629{
628 Qcategoryp = intern ("categoryp"); 630 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. */
24#ifdef emacs 24#ifdef emacs
25 25
26#include <config.h> 26#include <config.h>
27
28#ifdef STDC_HEADERS
29#include <stdlib.h>
30#endif
31
27#include "lisp.h" 32#include "lisp.h"
28#include "charset.h" 33#include "charset.h"
29#include "ccl.h" 34#include "ccl.h"
@@ -659,6 +664,7 @@ struct ccl_prog_stack
659 int ic; /* Instruction Counter. */ 664 int ic; /* Instruction Counter. */
660 }; 665 };
661 666
667int
662ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) 668ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
663 struct ccl_program *ccl; 669 struct ccl_program *ccl;
664 unsigned char *source, *destination; 670 unsigned char *source, *destination;
@@ -1699,6 +1705,7 @@ Return index number of the registered translation table.")
1699} 1705}
1700 1706
1701 1707
1708void
1702syms_of_ccl () 1709syms_of_ccl ()
1703{ 1710{
1704 staticpro (&Vccl_program_table); 1711 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)
173 Use macro `STRING_CHAR (STR, LEN)' instead of calling this function 173 Use macro `STRING_CHAR (STR, LEN)' instead of calling this function
174 directly if STR can hold an ASCII character. */ 174 directly if STR can hold an ASCII character. */
175 175
176int
176string_to_non_ascii_char (str, len, actual_len) 177string_to_non_ascii_char (str, len, actual_len)
177 const unsigned char *str; 178 const unsigned char *str;
178 int len, *actual_len; 179 int len, *actual_len;
@@ -237,6 +238,7 @@ multibyte_form_length (str, len)
237 return -1. This should be used only in the macro SPLIT_STRING 238 return -1. This should be used only in the macro SPLIT_STRING
238 which checks range of STR in advance. */ 239 which checks range of STR in advance. */
239 240
241int
240split_non_ascii_string (str, len, charset, c1, c2) 242split_non_ascii_string (str, len, charset, c1, c2)
241 register const unsigned char *str; 243 register const unsigned char *str;
242 register unsigned char *c1, *c2; 244 register unsigned char *c1, *c2;
@@ -274,6 +276,7 @@ split_non_ascii_string (str, len, charset, c1, c2)
274/* Return a character unified with C (or a character made of CHARSET, 276/* Return a character unified with C (or a character made of CHARSET,
275 C1, and C2) in unification table TABLE. If no unification is found 277 C1, and C2) in unification table TABLE. If no unification is found
276 in TABLE, return C. */ 278 in TABLE, return C. */
279int
277unify_char (table, c, charset, c1, c2) 280unify_char (table, c, charset, c1, c2)
278 Lisp_Object table; 281 Lisp_Object table;
279 int c, charset, c1, c2; 282 int c, charset, c1, c2;
@@ -308,6 +311,7 @@ unify_char (table, c, charset, c1, c2)
308 convert C to a valid multibyte character, convert it based on 311 convert C to a valid multibyte character, convert it based on
309 DEFAULT_NONASCII_INSERT_OFFSET which makes C a Latin-1 character. */ 312 DEFAULT_NONASCII_INSERT_OFFSET which makes C a Latin-1 character. */
310 313
314int
311unibyte_char_to_multibyte (c) 315unibyte_char_to_multibyte (c)
312 int c; 316 int c;
313{ 317{
@@ -1610,6 +1614,7 @@ DEFUN ("compose-string", Fcompose_string, Scompose_string,
1610} 1614}
1611 1615
1612 1616
1617int
1613charset_id_internal (charset_name) 1618charset_id_internal (charset_name)
1614 char *charset_name; 1619 char *charset_name;
1615{ 1620{
@@ -1635,6 +1640,7 @@ DEFUN ("setup-special-charsets", Fsetup_special_charsets,
1635 return Qnil; 1640 return Qnil;
1636} 1641}
1637 1642
1643void
1638init_charset_once () 1644init_charset_once ()
1639{ 1645{
1640 int i, j, k; 1646 int i, j, k;
@@ -1689,6 +1695,7 @@ init_charset_once ()
1689 1695
1690#ifdef emacs 1696#ifdef emacs
1691 1697
1698void
1692syms_of_charset () 1699syms_of_charset ()
1693{ 1700{
1694 Qascii = intern ("ascii"); 1701 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;
35int cost; /* sums up costs */ 35int cost; /* sums up costs */
36 36
37/* ARGSUSED */ 37/* ARGSUSED */
38int
38evalcost (c) 39evalcost (c)
39 char c; 40 char c;
40{ 41{
@@ -42,6 +43,7 @@ evalcost (c)
42 return c; 43 return c;
43} 44}
44 45
46int
45cmputc (c) 47cmputc (c)
46 char c; 48 char c;
47{ 49{
@@ -135,6 +137,7 @@ cmcheckmagic ()
135 * out of <sgtty.h>.) 137 * out of <sgtty.h>.)
136 */ 138 */
137 139
140void
138cmcostinit () 141cmcostinit ()
139{ 142{
140 char *p; 143 char *p;
@@ -174,7 +177,7 @@ cmcostinit ()
174 * actually perform the motion. 177 * actually perform the motion.
175 */ 178 */
176 179
177static 180static int
178calccost (srcy, srcx, dsty, dstx, doit) 181calccost (srcy, srcx, dsty, dstx, doit)
179{ 182{
180 register int deltay, 183 register int deltay,
@@ -309,6 +312,7 @@ losecursor ()
309#define USELL 2 312#define USELL 2
310#define USECR 3 313#define USECR 3
311 314
315void
312cmgoto (row, col) 316cmgoto (row, col)
313{ 317{
314 int homecost, 318 int homecost,
@@ -411,6 +415,7 @@ cmgoto (row, col)
411 Used before copying into it the info on the actual terminal. 415 Used before copying into it the info on the actual terminal.
412 */ 416 */
413 417
418void
414Wcm_clear () 419Wcm_clear ()
415{ 420{
416 bzero (&Wcm, sizeof Wcm); 421 bzero (&Wcm, sizeof Wcm);
@@ -425,6 +430,7 @@ Wcm_clear ()
425 * Return -2 if size not specified. 430 * Return -2 if size not specified.
426 */ 431 */
427 432
433int
428Wcm_init () 434Wcm_init ()
429{ 435{
430#if 0 436#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. */
27#include "syntax.h" 27#include "syntax.h"
28#include "window.h" 28#include "window.h"
29#include "keyboard.h" 29#include "keyboard.h"
30#include "dispextern.h"
30 31
31Lisp_Object Qkill_forward_chars, Qkill_backward_chars, Vblink_paren_function; 32Lisp_Object Qkill_forward_chars, Qkill_backward_chars, Vblink_paren_function;
32 33
@@ -326,6 +327,7 @@ Whichever character you type to run this command is inserted.")
326 return 0. A value of 1 indicates this *might* not have been simple. 327 return 0. A value of 1 indicates this *might* not have been simple.
327 A value of 2 means this did things that call for an undo boundary. */ 328 A value of 2 means this did things that call for an undo boundary. */
328 329
330int
329internal_self_insert (c, noautofill) 331internal_self_insert (c, noautofill)
330 int c; 332 int c;
331 int noautofill; 333 int noautofill;
@@ -503,6 +505,7 @@ internal_self_insert (c, noautofill)
503 505
504/* module initialization */ 506/* module initialization */
505 507
508void
506syms_of_cmds () 509syms_of_cmds ()
507{ 510{
508 Qkill_backward_chars = intern ("kill-backward-chars"); 511 Qkill_backward_chars = intern ("kill-backward-chars");
@@ -542,6 +545,7 @@ More precisely, a char with closeparen syntax is self-inserted.");
542 defsubr (&Sself_insert_command); 545 defsubr (&Sself_insert_command);
543} 546}
544 547
548void
545keys_of_cmds () 549keys_of_cmds ()
546{ 550{
547 int n; 551 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)
1681 If the current block ends before any end-of-line, we may fail to 1681 If the current block ends before any end-of-line, we may fail to
1682 find all the necessary designations. */ 1682 find all the necessary designations. */
1683 1683
1684void
1684encode_designation_at_bol (coding, table, src, src_end, dstp) 1685encode_designation_at_bol (coding, table, src, src_end, dstp)
1685 struct coding_system *coding; 1686 struct coding_system *coding;
1686 Lisp_Object table; 1687 Lisp_Object table;
@@ -2465,6 +2466,7 @@ encode_coding_sjis_big5 (coding, source, destination,
2465 This function is called only when `coding->eol_type' is 2466 This function is called only when `coding->eol_type' is
2466 CODING_EOL_CRLF or CODING_EOL_CR. */ 2467 CODING_EOL_CRLF or CODING_EOL_CR. */
2467 2468
2469int
2468decode_eol (coding, source, destination, src_bytes, dst_bytes) 2470decode_eol (coding, source, destination, src_bytes, dst_bytes)
2469 struct coding_system *coding; 2471 struct coding_system *coding;
2470 unsigned char *source, *destination; 2472 unsigned char *source, *destination;
@@ -2595,6 +2597,7 @@ decode_eol (coding, source, destination, src_bytes, dst_bytes)
2595 `coding->mode & CODING_MODE_SELECTIVE_DISPLAY' is nonzero, code 2597 `coding->mode & CODING_MODE_SELECTIVE_DISPLAY' is nonzero, code
2596 '\r' in source text also means end-of-line. */ 2598 '\r' in source text also means end-of-line. */
2597 2599
2600int
2598encode_eol (coding, source, destination, src_bytes, dst_bytes) 2601encode_eol (coding, source, destination, src_bytes, dst_bytes)
2599 struct coding_system *coding; 2602 struct coding_system *coding;
2600 unsigned char *source, *destination; 2603 unsigned char *source, *destination;
@@ -4941,6 +4944,7 @@ call this function:\n\
4941 4944
4942/*** 8. Post-amble ***/ 4945/*** 8. Post-amble ***/
4943 4946
4947void
4944init_coding_once () 4948init_coding_once ()
4945{ 4949{
4946 int i; 4950 int i;
@@ -4999,6 +5003,7 @@ init_coding_once ()
4999 5003
5000#ifdef emacs 5004#ifdef emacs
5001 5005
5006void
5002syms_of_coding () 5007syms_of_coding ()
5003{ 5008{
5004 Qtarget_idx = intern ("target-idx"); 5009 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)
136 return value; 136 return value;
137} 137}
138 138
139void
139pure_write_error () 140pure_write_error ()
140{ 141{
141 error ("Attempt to modify read-only object"); 142 error ("Attempt to modify read-only object");
@@ -2957,6 +2958,7 @@ arith_error (signo)
2957 Fsignal (Qarith_error, Qnil); 2958 Fsignal (Qarith_error, Qnil);
2958} 2959}
2959 2960
2961void
2960init_data () 2962init_data ()
2961{ 2963{
2962 /* Don't do this if just dumping out. 2964 /* 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. */
31#include <rmsdef.h> 31#include <rmsdef.h>
32#endif 32#endif
33 33
34#ifdef HAVE_UNISTD_H
35#include <unistd.h>
36#endif
37
34/* The d_nameln member of a struct dirent includes the '\0' character 38/* The d_nameln member of a struct dirent includes the '\0' character
35 on some systems, but not on others. What's worse, you can't tell 39 on some systems, but not on others. What's worse, you can't tell
36 at compile-time which one it will be, since it really depends on 40 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.")
295 return file_name_completion (file, directory, 1, 0); 299 return file_name_completion (file, directory, 1, 0);
296} 300}
297 301
302static int file_name_completion_stat ();
303
298Lisp_Object 304Lisp_Object
299file_name_completion (file, dirname, all_flag, ver_flag) 305file_name_completion (file, dirname, all_flag, ver_flag)
300 Lisp_Object file, dirname; 306 Lisp_Object file, dirname;
@@ -547,6 +553,7 @@ file_name_completion (file, dirname, all_flag, ver_flag)
547 return Fsignal (Qquit, Qnil); 553 return Fsignal (Qquit, Qnil);
548} 554}
549 555
556static int
550file_name_completion_stat (dirname, dp, st_addr) 557file_name_completion_stat (dirname, dp, st_addr)
551 Lisp_Object dirname; 558 Lisp_Object dirname;
552 DIRENTRY *dp; 559 DIRENTRY *dp;
@@ -742,6 +749,7 @@ If file does not exist, returns nil.")
742 return Flist (sizeof(values) / sizeof(values[0]), values); 749 return Flist (sizeof(values) / sizeof(values[0]), values);
743} 750}
744 751
752void
745syms_of_dired () 753syms_of_dired ()
746{ 754{
747 Qdirectory_files = intern ("directory-files"); 755 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. */
27#include <stdio.h> 27#include <stdio.h>
28#include <ctype.h> 28#include <ctype.h>
29 29
30#ifdef HAVE_UNISTD_H
31#include <unistd.h>
32#endif
33
30#include "lisp.h" 34#include "lisp.h"
31#include "termchar.h" 35#include "termchar.h"
32#include "termopts.h" 36#include "termopts.h"
@@ -43,6 +47,8 @@ Boston, MA 02111-1307, USA. */
43#include "indent.h" 47#include "indent.h"
44#include "intervals.h" 48#include "intervals.h"
45#include "blockinput.h" 49#include "blockinput.h"
50#include "process.h"
51#include "keyboard.h"
46 52
47/* I don't know why DEC Alpha OSF1 fail to compile this file if we 53/* I don't know why DEC Alpha OSF1 fail to compile this file if we
48 include the following file. */ 54 include the following file. */
@@ -187,6 +193,7 @@ DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0,
187 return Qnil; 193 return Qnil;
188} 194}
189 195
196void
190redraw_frame (f) 197redraw_frame (f)
191 FRAME_PTR f; 198 FRAME_PTR f;
192{ 199{
@@ -229,8 +236,8 @@ make_frame_glyphs (frame, empty)
229 int empty; 236 int empty;
230{ 237{
231 register int i; 238 register int i;
232 register width = FRAME_WINDOW_WIDTH (frame); 239 register int width = FRAME_WINDOW_WIDTH (frame);
233 register height = FRAME_HEIGHT (frame); 240 register int height = FRAME_HEIGHT (frame);
234 register struct frame_glyphs *new 241 register struct frame_glyphs *new
235 = (struct frame_glyphs *) xmalloc (sizeof (struct frame_glyphs)); 242 = (struct frame_glyphs *) xmalloc (sizeof (struct frame_glyphs));
236 243
@@ -468,6 +475,7 @@ line_draw_cost (m, vpos)
468 475
469/* cancel_line eliminates any request to display a line at position `vpos' */ 476/* cancel_line eliminates any request to display a line at position `vpos' */
470 477
478void
471cancel_line (vpos, frame) 479cancel_line (vpos, frame)
472 int vpos; 480 int vpos;
473 register FRAME_PTR frame; 481 register FRAME_PTR frame;
@@ -475,6 +483,7 @@ cancel_line (vpos, frame)
475 FRAME_DESIRED_GLYPHS (frame)->enable[vpos] = 0; 483 FRAME_DESIRED_GLYPHS (frame)->enable[vpos] = 0;
476} 484}
477 485
486void
478clear_frame_records (frame) 487clear_frame_records (frame)
479 register FRAME_PTR frame; 488 register FRAME_PTR frame;
480{ 489{
@@ -823,6 +832,7 @@ scroll_frame_lines (frame, from, end, amount, newpos)
823 into the FRAME_DESIRED_GLYPHS (frame) from the FRAME_PHYS_GLYPHS (frame) 832 into the FRAME_DESIRED_GLYPHS (frame) from the FRAME_PHYS_GLYPHS (frame)
824 so that update_frame will not change those columns. */ 833 so that update_frame will not change those columns. */
825 834
835void
826preserve_other_columns (w) 836preserve_other_columns (w)
827 struct window *w; 837 struct window *w;
828{ 838{
@@ -947,6 +957,7 @@ adjust_window_charstarts (w, vpos, adjust)
947 for internal consistency. We cannot check that they are "right"; 957 for internal consistency. We cannot check that they are "right";
948 we can only look for something nonsensical. */ 958 we can only look for something nonsensical. */
949 959
960void
950verify_charstarts (w) 961verify_charstarts (w)
951 struct window *w; 962 struct window *w;
952{ 963{
@@ -1003,6 +1014,7 @@ verify_charstarts (w)
1003 cancel the columns of that window, so that when the window is 1014 cancel the columns of that window, so that when the window is
1004 displayed over again get_display_line will not complain. */ 1015 displayed over again get_display_line will not complain. */
1005 1016
1017void
1006cancel_my_columns (w) 1018cancel_my_columns (w)
1007 struct window *w; 1019 struct window *w;
1008{ 1020{
@@ -1198,7 +1210,7 @@ update_frame (f, force, inhibit_hairy_id)
1198 register int i; 1210 register int i;
1199 int pause; 1211 int pause;
1200 int preempt_count = baud_rate / 2400 + 1; 1212 int preempt_count = baud_rate / 2400 + 1;
1201 extern input_pending; 1213 extern int input_pending;
1202#ifdef HAVE_WINDOW_SYSTEM 1214#ifdef HAVE_WINDOW_SYSTEM
1203 register int downto, leftmost; 1215 register int downto, leftmost;
1204#endif 1216#endif
@@ -1398,6 +1410,7 @@ quit_error_check ()
1398 1410
1399extern void scrolling_1 (); 1411extern void scrolling_1 ();
1400 1412
1413int
1401scrolling (frame) 1414scrolling (frame)
1402 FRAME_PTR frame; 1415 FRAME_PTR frame;
1403{ 1416{
@@ -1831,7 +1844,7 @@ update_line (frame, vpos)
1831 olen = nlen - (nsp - osp); 1844 olen = nlen - (nsp - osp);
1832 } 1845 }
1833 cursor_to (vpos, osp); 1846 cursor_to (vpos, osp);
1834 insert_glyphs ((char *)0, nsp - osp); 1847 insert_glyphs ((GLYPH *) 0, nsp - osp);
1835 } 1848 }
1836 olen += nsp - osp; 1849 olen += nsp - osp;
1837 1850
@@ -2070,6 +2083,7 @@ window_change_signal (signalnum) /* If we don't have an argument, */
2070 2083
2071/* Do any change in frame size that was requested by a signal. */ 2084/* Do any change in frame size that was requested by a signal. */
2072 2085
2086void
2073do_pending_window_change () 2087do_pending_window_change ()
2074{ 2088{
2075 /* If window_change_signal should have run before, run it now. */ 2089 /* If window_change_signal should have run before, run it now. */
@@ -2101,9 +2115,10 @@ do_pending_window_change ()
2101 redisplay. Since this tries to resize windows, we can't call it 2115 redisplay. Since this tries to resize windows, we can't call it
2102 from a signal handler. */ 2116 from a signal handler. */
2103 2117
2118void
2104change_frame_size (f, newheight, newwidth, pretend, delay) 2119change_frame_size (f, newheight, newwidth, pretend, delay)
2105 register FRAME_PTR f; 2120 register FRAME_PTR f;
2106 int newheight, newwidth, pretend; 2121 int newheight, newwidth, pretend, delay;
2107{ 2122{
2108 Lisp_Object tail, frame; 2123 Lisp_Object tail, frame;
2109 2124
@@ -2284,6 +2299,7 @@ terminate any keyboard macro currently executing.")
2284 return Qnil; 2299 return Qnil;
2285} 2300}
2286 2301
2302void
2287bitch_at_user () 2303bitch_at_user ()
2288{ 2304{
2289 if (noninteractive) 2305 if (noninteractive)
@@ -2469,6 +2485,7 @@ char *terminal_type;
2469/* Then invoke its decoding routine to set up variables 2485/* Then invoke its decoding routine to set up variables
2470 in the terminal package */ 2486 in the terminal package */
2471 2487
2488void
2472init_display () 2489init_display ()
2473{ 2490{
2474#ifdef HAVE_X_WINDOWS 2491#ifdef HAVE_X_WINDOWS
@@ -2604,6 +2621,7 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
2604#endif /* SIGWINCH */ 2621#endif /* SIGWINCH */
2605} 2622}
2606 2623
2624void
2607syms_of_display () 2625syms_of_display ()
2608{ 2626{
2609 defsubr (&Sredraw_frame); 2627 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
737 RETURN_UNGCPRO (tem); 737 RETURN_UNGCPRO (tem);
738} 738}
739 739
740void
740syms_of_doc () 741syms_of_doc ()
741{ 742{
742 DEFVAR_LISP ("internal-doc-file-name", &Vdoc_file_name, 743 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 ();
54 String arguments are passed as C strings. 54 String arguments are passed as C strings.
55 Integers are passed as C integers. */ 55 Integers are passed as C integers. */
56 56
57int
57doprnt (buffer, bufsize, format, format_end, nargs, args) 58doprnt (buffer, bufsize, format, format_end, nargs, args)
58 char *buffer; 59 char *buffer;
59 register int bufsize; 60 register int bufsize;
@@ -68,6 +69,7 @@ doprnt (buffer, bufsize, format, format_end, nargs, args)
68/* Like doprnt except that strings in ARGS are passed 69/* Like doprnt except that strings in ARGS are passed
69 as Lisp_Object. */ 70 as Lisp_Object. */
70 71
72int
71doprnt_lisp (buffer, bufsize, format, format_end, nargs, args) 73doprnt_lisp (buffer, bufsize, format, format_end, nargs, args)
72 char *buffer; 74 char *buffer;
73 register int bufsize; 75 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. */
29#include <pwd.h> 29#include <pwd.h>
30#endif 30#endif
31 31
32#ifdef STDC_HEADERS
33#include <stdlib.h>
34#endif
35
36#ifdef HAVE_UNISTD_H
37#include <unistd.h>
38#endif
39
32#include "lisp.h" 40#include "lisp.h"
33#include "intervals.h" 41#include "intervals.h"
34#include "buffer.h" 42#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. */
44#include "blockinput.h" 44#include "blockinput.h"
45#include "syssignal.h" 45#include "syssignal.h"
46#include "process.h" 46#include "process.h"
47#include "keyboard.h"
47 48
48#ifdef HAVE_SETRLIMIT 49#ifdef HAVE_SETRLIMIT
49#include <sys/time.h> 50#include <sys/time.h>
@@ -166,6 +167,7 @@ char **initial_argv;
166int initial_argc; 167int initial_argc;
167 168
168static void sort_args (); 169static void sort_args ();
170void syms_of_emacs ();
169 171
170/* Signal code for the fatal signal that was received */ 172/* Signal code for the fatal signal that was received */
171int fatal_error_code; 173int fatal_error_code;
@@ -272,7 +274,7 @@ abort ()
272 274
273/* Code for dealing with Lisp access to the Unix command line */ 275/* Code for dealing with Lisp access to the Unix command line */
274 276
275static 277static void
276init_cmdargs (argc, argv, skip_args) 278init_cmdargs (argc, argv, skip_args)
277 int argc; 279 int argc;
278 char **argv; 280 char **argv;
@@ -449,11 +451,11 @@ static char dump_tz[] = "UtC0";
449 (We don't have any real constructors or destructors.) */ 451 (We don't have any real constructors or destructors.) */
450#ifdef __GNUC__ 452#ifdef __GNUC__
451#ifndef GCC_CTORS_IN_LIBC 453#ifndef GCC_CTORS_IN_LIBC
452__do_global_ctors () 454void __do_global_ctors ()
453{} 455{}
454__do_global_ctors_aux () 456void __do_global_ctors_aux ()
455{} 457{}
456__do_global_dtors () 458void __do_global_dtors ()
457{} 459{}
458/* Linux has a bug in its library; avoid an error. */ 460/* Linux has a bug in its library; avoid an error. */
459#ifndef LINUX 461#ifndef LINUX
@@ -461,7 +463,7 @@ char * __CTOR_LIST__[2] = { (char *) (-1), 0 };
461#endif 463#endif
462char * __DTOR_LIST__[2] = { (char *) (-1), 0 }; 464char * __DTOR_LIST__[2] = { (char *) (-1), 0 };
463#endif /* GCC_CTORS_IN_LIBC */ 465#endif /* GCC_CTORS_IN_LIBC */
464__main () 466void __main ()
465{} 467{}
466#endif /* __GNUC__ */ 468#endif /* __GNUC__ */
467#endif /* ORDINARY_LINK */ 469#endif /* ORDINARY_LINK */
@@ -536,6 +538,7 @@ argmatch (argv, argc, sstr, lstr, minlen, valptr, skipptr)
536} 538}
537 539
538/* ARGSUSED */ 540/* ARGSUSED */
541int
539main (argc, argv, envp) 542main (argc, argv, envp)
540 int argc; 543 int argc;
541 char **argv; 544 char **argv;
@@ -544,7 +547,7 @@ main (argc, argv, envp)
544 char stack_bottom_variable; 547 char stack_bottom_variable;
545 int skip_args = 0; 548 int skip_args = 0;
546 extern int errno; 549 extern int errno;
547 extern sys_nerr; 550 extern int sys_nerr;
548#ifdef HAVE_SETRLIMIT 551#ifdef HAVE_SETRLIMIT
549 struct rlimit rlim; 552 struct rlimit rlim;
550#endif 553#endif
@@ -556,6 +559,7 @@ main (argc, argv, envp)
556#ifdef DOUG_LEA_MALLOC 559#ifdef DOUG_LEA_MALLOC
557 if (initialized) 560 if (initialized)
558 { 561 {
562 extern void r_alloc_reinit ();
559 malloc_set_state (malloc_state_ptr); 563 malloc_set_state (malloc_state_ptr);
560 free (malloc_state_ptr); 564 free (malloc_state_ptr);
561 r_alloc_reinit (); 565 r_alloc_reinit ();
@@ -1739,6 +1743,7 @@ decode_env_path (evarname, defalt)
1739 return Fnreverse (lpath); 1743 return Fnreverse (lpath);
1740} 1744}
1741 1745
1746void
1742syms_of_emacs () 1747syms_of_emacs ()
1743{ 1748{
1744 Qfile_name_handler_alist = intern ("file-name-handler-alist"); 1749 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. */
20 20
21 21
22#include <config.h> 22#include <config.h>
23
24#ifdef STDC_HEADERS
25#include <stdlib.h>
26#endif
27
23#include "lisp.h" 28#include "lisp.h"
24#include "blockinput.h" 29#include "blockinput.h"
25 30
@@ -162,6 +167,7 @@ Lisp_Object run_hook_with_args ();
162Lisp_Object funcall_lambda (); 167Lisp_Object funcall_lambda ();
163extern Lisp_Object ml_apply (); /* Apply a mocklisp function to unevaluated argument list */ 168extern Lisp_Object ml_apply (); /* Apply a mocklisp function to unevaluated argument list */
164 169
170void
165init_eval_once () 171init_eval_once ()
166{ 172{
167 specpdl_size = 50; 173 specpdl_size = 50;
@@ -173,6 +179,7 @@ init_eval_once ()
173 Vrun_hooks = Qnil; 179 Vrun_hooks = Qnil;
174} 180}
175 181
182void
176init_eval () 183init_eval ()
177{ 184{
178 specpdl_ptr = specpdl; 185 specpdl_ptr = specpdl;
@@ -199,6 +206,7 @@ call_debugger (arg)
199 return apply1 (Vdebugger, arg); 206 return apply1 (Vdebugger, arg);
200} 207}
201 208
209void
202do_debug_on_call (code) 210do_debug_on_call (code)
203 Lisp_Object code; 211 Lisp_Object code;
204{ 212{
@@ -2893,6 +2901,7 @@ If NFRAMES is more than the number of frames, the value is nil.")
2893 } 2901 }
2894} 2902}
2895 2903
2904void
2896syms_of_eval () 2905syms_of_eval ()
2897{ 2906{
2898 DEFVAR_INT ("max-specpdl-size", &max_specpdl_size, 2907 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.")
599 * Value is nonzero if the string output is different from the input. 599 * Value is nonzero if the string output is different from the input.
600 */ 600 */
601 601
602int
602directory_file_name (src, dst) 603directory_file_name (src, dst)
603 char *src, *dst; 604 char *src, *dst;
604{ 605{
@@ -4522,6 +4523,7 @@ a_write (desc, addr, nbytes, bytepos, annot, coding)
4522 } 4523 }
4523 *annot = Fcdr (*annot); 4524 *annot = Fcdr (*annot);
4524 } 4525 }
4526 return 0;
4525} 4527}
4526 4528
4527#ifndef WRITE_BUF_SIZE 4529#ifndef WRITE_BUF_SIZE
@@ -5172,6 +5174,7 @@ DIR defaults to current buffer's directory default.")
5172 return val; 5174 return val;
5173} 5175}
5174 5176
5177void
5175syms_of_fileio () 5178syms_of_fileio ()
5176{ 5179{
5177 Qexpand_file_name = intern ("expand-file-name"); 5180 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. */
20 20
21#include <sys/types.h> 21#include <sys/types.h>
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <signal.h>
23#include <config.h> 24#include <config.h>
24 25
25#ifdef VMS 26#ifdef VMS
@@ -34,6 +35,10 @@ Boston, MA 02111-1307, USA. */
34#include <string.h> 35#include <string.h>
35#endif /* USG */ 36#endif /* USG */
36 37
38#ifdef HAVE_UNISTD_H
39#include <unistd.h>
40#endif
41
37#include "lisp.h" 42#include "lisp.h"
38#include "buffer.h" 43#include "buffer.h"
39 44
@@ -515,6 +520,7 @@ t if it is locked by you, else a string of the name of the locker.")
515 520
516/* Initialization functions. */ 521/* Initialization functions. */
517 522
523void
518syms_of_filelock () 524syms_of_filelock ()
519{ 525{
520 defsubr (&Sunlock_buffer); 526 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)
1010} 1010}
1011#endif /* HAVE_MATHERR */ 1011#endif /* HAVE_MATHERR */
1012 1012
1013void
1013init_floatfns () 1014init_floatfns ()
1014{ 1015{
1015#ifdef FLOAT_CATCH_SIGILL 1016#ifdef FLOAT_CATCH_SIGILL
@@ -1025,6 +1026,7 @@ init_floatfns ()
1025 1026
1026#endif /* not LISP_FLOAT_TYPE */ 1027#endif /* not LISP_FLOAT_TYPE */
1027 1028
1029void
1028syms_of_floatfns () 1030syms_of_floatfns ()
1029{ 1031{
1030#ifdef LISP_FLOAT_TYPE 1032#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. */
21 21
22#include <config.h> 22#include <config.h>
23 23
24#ifdef HAVE_UNISTD_H
25#include <unistd.h>
26#endif
27
24/* Note on some machines this defines `vector' as a typedef, 28/* Note on some machines this defines `vector' as a typedef,
25 so make sure we don't use that name in this file. */ 29 so make sure we don't use that name in this file. */
26#undef vector 30#undef vector
@@ -35,6 +39,9 @@ Boston, MA 02111-1307, USA. */
35#include "intervals.h" 39#include "intervals.h"
36#include "frame.h" 40#include "frame.h"
37#include "window.h" 41#include "window.h"
42#ifdef HAVE_MENUS
43#include "xterm.h"
44#endif
38 45
39#ifndef NULL 46#ifndef NULL
40#define NULL (void *)0 47#define NULL (void *)0
@@ -44,8 +51,6 @@ Boston, MA 02111-1307, USA. */
44 asked by mouse commands. */ 51 asked by mouse commands. */
45int use_dialog_box; 52int use_dialog_box;
46 53
47extern Lisp_Object Flookup_key ();
48
49extern int minibuffer_auto_raise; 54extern int minibuffer_auto_raise;
50extern Lisp_Object minibuf_window; 55extern Lisp_Object minibuf_window;
51 56
@@ -2545,6 +2550,7 @@ ARGS are passed as extra arguments to the function.")
2545 return result; 2550 return result;
2546} 2551}
2547 2552
2553void
2548syms_of_fns () 2554syms_of_fns ()
2549{ 2555{
2550 Qstring_lessp = intern ("string-lessp"); 2556 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.")
492 return Qnil; 492 return Qnil;
493} 493}
494 494
495Lisp_Object Fframe_char_width ();
496
497/* Return a list of names of available fontsets matching PATTERN on 495/* Return a list of names of available fontsets matching PATTERN on
498 frame F. If SIZE is not 0, it is the size (maximum bound width) of 496 frame F. If SIZE is not 0, it is the size (maximum bound width) of
499 fontsets to be listed. */ 497 fontsets to be listed. */
@@ -600,7 +598,6 @@ FONTLIST is an alist of charsets vs corresponding font names.")
600 return Qnil; 598 return Qnil;
601} 599}
602 600
603extern Lisp_Object Fframe_parameters ();
604extern Lisp_Object Qfont; 601extern Lisp_Object Qfont;
605Lisp_Object Qfontset; 602Lisp_Object Qfontset;
606 603
@@ -802,6 +799,7 @@ loading failed.")
802 return info; 799 return info;
803} 800}
804 801
802void
805syms_of_fontset () 803syms_of_fontset ()
806{ 804{
807 int i; 805 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. */
28#include "charset.h" 28#include "charset.h"
29#ifdef HAVE_WINDOW_SYSTEM 29#ifdef HAVE_WINDOW_SYSTEM
30#include "fontset.h" 30#include "fontset.h"
31#include "xterm.h"
31#endif 32#endif
32#include "frame.h" 33#include "frame.h"
33#include "termhooks.h" 34#include "termhooks.h"
35#include "dispextern.h"
34#include "window.h" 36#include "window.h"
35#ifdef MSDOS 37#ifdef MSDOS
36#include "msdos.h" 38#include "msdos.h"
@@ -2224,6 +2226,7 @@ the rightmost or bottommost possible position (that stays within the screen).")
2224} 2226}
2225 2227
2226 2228
2229void
2227syms_of_frame () 2230syms_of_frame ()
2228{ 2231{
2229 syms_of_frame_1 (); 2232 syms_of_frame_1 ();
@@ -2296,6 +2299,7 @@ displayed.");
2296 defsubr (&Sset_frame_position); 2299 defsubr (&Sset_frame_position);
2297} 2300}
2298 2301
2302void
2299keys_of_frame () 2303keys_of_frame ()
2300{ 2304{
2301 initial_define_lispy_key (global_map, "switch-frame", "handle-switch-frame"); 2305 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.")
679} 679}
680 680
681 681
682static int position_indentation P_ ((int));
683
682DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation, 684DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation,
683 0, 0, 0, 685 0, 0, 0,
684 "Return the indentation of the current line.\n\ 686 "Return the indentation of the current line.\n\
@@ -1789,6 +1791,7 @@ whether or not it is currently displayed in some window.")
1789 1791
1790/* file's initialization. */ 1792/* file's initialization. */
1791 1793
1794void
1792syms_of_indent () 1795syms_of_indent ()
1793{ 1796{
1794 DEFVAR_BOOL ("indent-tabs-mode", &indent_tabs_mode, 1797 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. */
26#include "charset.h" 26#include "charset.h"
27#include "window.h" 27#include "window.h"
28#include "blockinput.h" 28#include "blockinput.h"
29#include "region-cache.h"
29 30
30#ifndef NULL 31#ifndef NULL
31#define NULL 0 32#define NULL 0
@@ -777,7 +778,7 @@ count_size_as_multibyte (ptr, nbytes)
777void 778void
778insert (string, nbytes) 779insert (string, nbytes)
779 register unsigned char *string; 780 register unsigned char *string;
780 register nbytes; 781 register int nbytes;
781{ 782{
782 if (nbytes > 0) 783 if (nbytes > 0)
783 { 784 {
@@ -792,7 +793,7 @@ insert (string, nbytes)
792void 793void
793insert_and_inherit (string, nbytes) 794insert_and_inherit (string, nbytes)
794 register unsigned char *string; 795 register unsigned char *string;
795 register nbytes; 796 register int nbytes;
796{ 797{
797 if (nbytes > 0) 798 if (nbytes > 0)
798 { 799 {
@@ -2441,6 +2442,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute,
2441 return unbind_to (count, val); 2442 return unbind_to (count, val);
2442} 2443}
2443 2444
2445void
2444syms_of_insdel () 2446syms_of_insdel ()
2445{ 2447{
2446 staticpro (&combine_after_change_list); 2448 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)
145 INTERVAL i0, i1; 145 INTERVAL i0, i1;
146{ 146{
147 register Lisp_Object i0_cdr, i0_sym, i1_val; 147 register Lisp_Object i0_cdr, i0_sym, i1_val;
148 register i1_len; 148 register int i1_len;
149 149
150 if (DEFAULT_INTERVAL_P (i0) && DEFAULT_INTERVAL_P (i1)) 150 if (DEFAULT_INTERVAL_P (i0) && DEFAULT_INTERVAL_P (i1))
151 return 1; 151 return 1;
@@ -640,7 +640,7 @@ previous_interval (interval)
640 register INTERVAL interval; 640 register INTERVAL interval;
641{ 641{
642 register INTERVAL i; 642 register INTERVAL i;
643 register position_of_previous; 643 register int position_of_previous;
644 644
645 if (NULL_INTERVAL_P (interval)) 645 if (NULL_INTERVAL_P (interval))
646 return NULL_INTERVAL; 646 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 ();
492 492
493static void record_menu_key (); 493static void record_menu_key ();
494 494
495void swallow_events ();
496
497Lisp_Object Qpolling_period; 495Lisp_Object Qpolling_period;
498 496
499/* List of absolute timers. Appears in order of next scheduled event. */ 497/* List of absolute timers. Appears in order of next scheduled event. */
@@ -557,6 +555,8 @@ static Lisp_Object make_lispy_movement ();
557static Lisp_Object modify_event_symbol (); 555static Lisp_Object modify_event_symbol ();
558static Lisp_Object make_lispy_switch_frame (); 556static Lisp_Object make_lispy_switch_frame ();
559static int parse_solitary_modifier (); 557static int parse_solitary_modifier ();
558static void save_getcjmp ();
559static void restore_getcjmp ();
560 560
561/* > 0 if we are to echo keystrokes. */ 561/* > 0 if we are to echo keystrokes. */
562static int echo_keystrokes; 562static int echo_keystrokes;
@@ -572,6 +572,7 @@ static int cannot_suspend;
572 so that it serves as a prompt for the next character. 572 so that it serves as a prompt for the next character.
573 Also start echoing. */ 573 Also start echoing. */
574 574
575void
575echo_prompt (str) 576echo_prompt (str)
576 char *str; 577 char *str;
577{ 578{
@@ -592,6 +593,7 @@ echo_prompt (str)
592 C can be a character, which is printed prettily ("M-C-x" and all that 593 C can be a character, which is printed prettily ("M-C-x" and all that
593 jazz), or a symbol, whose name is printed. */ 594 jazz), or a symbol, whose name is printed. */
594 595
596void
595echo_char (c) 597echo_char (c)
596 Lisp_Object c; 598 Lisp_Object c;
597{ 599{
@@ -641,6 +643,7 @@ echo_char (c)
641/* Temporarily add a dash to the end of the echo string if it's not 643/* Temporarily add a dash to the end of the echo string if it's not
642 empty, so that it serves as a mini-prompt for the very next character. */ 644 empty, so that it serves as a mini-prompt for the very next character. */
643 645
646void
644echo_dash () 647echo_dash ()
645{ 648{
646 if (!current_kboard->immediate_echo 649 if (!current_kboard->immediate_echo
@@ -696,6 +699,7 @@ echo_now ()
696 699
697/* Turn off echoing, for the start of a new command. */ 700/* Turn off echoing, for the start of a new command. */
698 701
702void
699cancel_echoing () 703cancel_echoing ()
700{ 704{
701 current_kboard->immediate_echo = 0; 705 current_kboard->immediate_echo = 0;
@@ -792,6 +796,7 @@ record_auto_save ()
792 796
793/* Make an auto save happen as soon as possible at command level. */ 797/* Make an auto save happen as soon as possible at command level. */
794 798
799void
795force_auto_save_soon () 800force_auto_save_soon ()
796{ 801{
797 last_auto_save = - auto_save_interval - 1; 802 last_auto_save = - auto_save_interval - 1;
@@ -2409,12 +2414,14 @@ print_help (object)
2409 in case get_char is called recursively. 2414 in case get_char is called recursively.
2410 See read_process_output. */ 2415 See read_process_output. */
2411 2416
2417static void
2412save_getcjmp (temp) 2418save_getcjmp (temp)
2413 jmp_buf temp; 2419 jmp_buf temp;
2414{ 2420{
2415 bcopy (getcjmp, temp, sizeof getcjmp); 2421 bcopy (getcjmp, temp, sizeof getcjmp);
2416} 2422}
2417 2423
2424static void
2418restore_getcjmp (temp) 2425restore_getcjmp (temp)
2419 jmp_buf temp; 2426 jmp_buf temp;
2420{ 2427{
@@ -7670,6 +7677,7 @@ current_active_maps (maps_p)
7670 7677
7671/* Return nonzero if input events are pending. */ 7678/* Return nonzero if input events are pending. */
7672 7679
7680int
7673detect_input_pending () 7681detect_input_pending ()
7674{ 7682{
7675 if (!input_pending) 7683 if (!input_pending)
@@ -7680,6 +7688,7 @@ detect_input_pending ()
7680 7688
7681/* Return nonzero if input events are pending, and run any pending timers. */ 7689/* Return nonzero if input events are pending, and run any pending timers. */
7682 7690
7691int
7683detect_input_pending_run_timers (do_display) 7692detect_input_pending_run_timers (do_display)
7684 int do_display; 7693 int do_display;
7685{ 7694{
@@ -7710,6 +7719,7 @@ clear_input_pending ()
7710 The problem is, kbd_buffer_get_event needs to be fixed to know what 7719 The problem is, kbd_buffer_get_event needs to be fixed to know what
7711 to do in that case. It isn't trivial. */ 7720 to do in that case. It isn't trivial. */
7712 7721
7722int
7713requeued_events_pending_p () 7723requeued_events_pending_p ()
7714{ 7724{
7715 return (!NILP (Vunread_command_events) || unread_command_char != -1); 7725 return (!NILP (Vunread_command_events) || unread_command_char != -1);
@@ -7953,6 +7963,7 @@ stuff_buffered_input (stuffstring)
7953#endif /* BSD_SYSTEM and not BSD4_1 */ 7963#endif /* BSD_SYSTEM and not BSD4_1 */
7954} 7964}
7955 7965
7966void
7956set_waiting_for_input (time_to_clear) 7967set_waiting_for_input (time_to_clear)
7957 EMACS_TIME *time_to_clear; 7968 EMACS_TIME *time_to_clear;
7958{ 7969{
@@ -8311,6 +8322,7 @@ delete_kboard (kb)
8311} 8322}
8312#endif 8323#endif
8313 8324
8325void
8314init_keyboard () 8326init_keyboard ()
8315{ 8327{
8316 /* This is correct before outermost invocation of the editor loop */ 8328 /* This is correct before outermost invocation of the editor loop */
@@ -8405,6 +8417,7 @@ struct event_head head_table[] = {
8405 &Qmake_frame_visible, "make-frame-visible", &Qmake_frame_visible, 8417 &Qmake_frame_visible, "make-frame-visible", &Qmake_frame_visible,
8406}; 8418};
8407 8419
8420void
8408syms_of_keyboard () 8421syms_of_keyboard ()
8409{ 8422{
8410 staticpro (&item_properties); 8423 staticpro (&item_properties);
@@ -8878,6 +8891,7 @@ If the value is non-nil and not a number, we wait 2 seconds.");
8878 Vtimer_idle_list = Qnil; 8891 Vtimer_idle_list = Qnil;
8879} 8892}
8880 8893
8894void
8881keys_of_keyboard () 8895keys_of_keyboard ()
8882{ 8896{
8883 initial_define_key (global_map, Ctl ('Z'), "suspend-emacs"); 8897 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. */
21 21
22#include <config.h> 22#include <config.h>
23#include <stdio.h> 23#include <stdio.h>
24#ifdef STDC_HEADERS
25#include <stdlib.h>
26#endif
24#undef NULL 27#undef NULL
25#include "lisp.h" 28#include "lisp.h"
26#include "commands.h" 29#include "commands.h"
@@ -102,7 +105,6 @@ static Lisp_Object define_as_prefix ();
102static Lisp_Object describe_buffer_bindings (); 105static Lisp_Object describe_buffer_bindings ();
103static void describe_command (), describe_translation (); 106static void describe_command (), describe_translation ();
104static void describe_map (); 107static void describe_map ();
105Lisp_Object Fcopy_keymap ();
106 108
107/* Keymap object support - constructors and predicates. */ 109/* Keymap object support - constructors and predicates. */
108 110
@@ -3168,6 +3170,7 @@ Return list of symbols found.")
3168 return apropos_accumulate; 3170 return apropos_accumulate;
3169} 3171}
3170 3172
3173void
3171syms_of_keymap () 3174syms_of_keymap ()
3172{ 3175{
3173 Lisp_Object tem; 3176 Lisp_Object tem;
@@ -3305,6 +3308,7 @@ and applies even for keys that have ordinary bindings.");
3305 defsubr (&Sapropos_internal); 3308 defsubr (&Sapropos_internal);
3306} 3309}
3307 3310
3311void
3308keys_of_keymap () 3312keys_of_keymap ()
3309{ 3313{
3310 Lisp_Object tem; 3314 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;
36 36
37static int byte_debug_flag; 37static int byte_debug_flag;
38 38
39void
39clear_charpos_cache (b) 40clear_charpos_cache (b)
40 struct buffer *b; 41 struct buffer *b;
41{ 42{
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.")
227} 227}
228 228
229 229
230void
230syms_of_mocklisp () 231syms_of_mocklisp ()
231{ 232{
232 Qmocklisp = intern ("mocklisp"); 233 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 @@
26 26
27#include <stdio.h> 27#include <stdio.h>
28 28
29int
29main (argc, argv) 30main (argc, argv)
30 int argc; 31 int argc;
31 char **argv; 32 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)
683Lisp_Object 683Lisp_Object
684internal_with_output_to_temp_buffer (bufname, function, args) 684internal_with_output_to_temp_buffer (bufname, function, args)
685 char *bufname; 685 char *bufname;
686 Lisp_Object (*function) (); 686 Lisp_Object (*function) P_ ((Lisp_Object));
687 Lisp_Object args; 687 Lisp_Object args;
688{ 688{
689 int count = specpdl_ptr - specpdl; 689 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. */
106#include "commands.h" 106#include "commands.h"
107#include "frame.h" 107#include "frame.h"
108#include "blockinput.h" 108#include "blockinput.h"
109#include "keyboard.h"
110#include "dispextern.h"
109 111
110#define max(a, b) ((a) > (b) ? (a) : (b)) 112#define max(a, b) ((a) > (b) ? (a) : (b))
111 113
@@ -279,6 +281,7 @@ static char pty_name[24];
279 281
280Lisp_Object status_convert (); 282Lisp_Object status_convert ();
281 283
284void
282update_status (p) 285update_status (p)
283 struct Lisp_Process *p; 286 struct Lisp_Process *p;
284{ 287{
@@ -391,7 +394,7 @@ int
391allocate_pty () 394allocate_pty ()
392{ 395{
393 struct stat stb; 396 struct stat stb;
394 register c, i; 397 register int c, i;
395 int fd; 398 int fd;
396 399
397 /* Some systems name their pseudoterminals so that there are gaps in 400 /* Some systems name their pseudoterminals so that there are gaps in
@@ -512,6 +515,7 @@ make_process (name)
512 return val; 515 return val;
513} 516}
514 517
518void
515remove_process (proc) 519remove_process (proc)
516 register Lisp_Object proc; 520 register Lisp_Object proc;
517{ 521{
@@ -2173,7 +2177,7 @@ Return non-nil iff we received any output before the timeout expired.")
2173static int waiting_for_user_input_p; 2177static int waiting_for_user_input_p;
2174 2178
2175/* This is here so breakpoints can be put on it. */ 2179/* This is here so breakpoints can be put on it. */
2176static 2180static void
2177wait_reading_process_input_1 () 2181wait_reading_process_input_1 ()
2178{ 2182{
2179} 2183}
@@ -2210,6 +2214,7 @@ wait_reading_process_input_1 ()
2210 before the timeout elapsed. 2214 before the timeout elapsed.
2211 Otherwise, return true iff we received input from any process. */ 2215 Otherwise, return true iff we received input from any process. */
2212 2216
2217int
2213wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) 2218wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
2214 int time_limit, microsecs; 2219 int time_limit, microsecs;
2215 Lisp_Object read_kbd; 2220 Lisp_Object read_kbd;
@@ -2708,6 +2713,7 @@ read_process_output_error_handler (error)
2708 The characters read are decoded according to PROC's coding-system 2713 The characters read are decoded according to PROC's coding-system
2709 for decoding. */ 2714 for decoding. */
2710 2715
2716int
2711read_process_output (proc, channel) 2717read_process_output (proc, channel)
2712 Lisp_Object proc; 2718 Lisp_Object proc;
2713 register int channel; 2719 register int channel;
@@ -3062,6 +3068,7 @@ send_process_trap ()
3062 being encoded. Should we store them in a buffer to prepend them to 3068 being encoded. Should we store them in a buffer to prepend them to
3063 the data send later? */ 3069 the data send later? */
3064 3070
3071void
3065send_process (proc, buf, len, object) 3072send_process (proc, buf, len, object)
3066 volatile Lisp_Object proc; 3073 volatile Lisp_Object proc;
3067 unsigned char *buf; 3074 unsigned char *buf;
@@ -4289,6 +4296,7 @@ keyboard_bit_set (mask)
4289 return 0; 4296 return 0;
4290} 4297}
4291 4298
4299void
4292init_process () 4300init_process ()
4293{ 4301{
4294 register int i; 4302 register int i;
@@ -4317,6 +4325,7 @@ init_process ()
4317 bzero (proc_encode_coding_system, sizeof proc_encode_coding_system); 4325 bzero (proc_encode_coding_system, sizeof proc_encode_coding_system);
4318} 4326}
4319 4327
4328void
4320syms_of_process () 4329syms_of_process ()
4321{ 4330{
4322 Qprocessp = intern ("processp"); 4331 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)
264 bcopy (current_frame->glyphs, temp_frame->glyphs, 264 bcopy (current_frame->glyphs, temp_frame->glyphs,
265 current_frame->height * sizeof (GLYPH *)); 265 current_frame->height * sizeof (GLYPH *));
266 bcopy (current_frame->charstarts, temp_frame->charstarts, 266 bcopy (current_frame->charstarts, temp_frame->charstarts,
267 current_frame->height * sizeof (GLYPH *)); 267 current_frame->height * sizeof (int *));
268 bcopy (current_frame->used, temp_frame->used, 268 bcopy (current_frame->used, temp_frame->used,
269 current_frame->height * sizeof (int)); 269 current_frame->height * sizeof (int));
270 bcopy (current_frame->highlight, temp_frame->highlight, 270 bcopy (current_frame->highlight, temp_frame->highlight,
@@ -889,6 +889,7 @@ scrolling_max_lines_saved (start, end, oldhash, newhash, cost)
889 These are the same arguments that might be given to 889 These are the same arguments that might be given to
890 scroll_frame_lines to perform this scrolling. */ 890 scroll_frame_lines to perform this scrolling. */
891 891
892int
892scroll_cost (frame, from, to, amount) 893scroll_cost (frame, from, to, amount)
893 FRAME_PTR frame; 894 FRAME_PTR frame;
894 int from, to, amount; 895 int from, to, amount;
@@ -1008,6 +1009,7 @@ ins_del_costs (frame,
1008 Deletion is essentially the same as insertion. 1009 Deletion is essentially the same as insertion.
1009 */ 1010 */
1010 1011
1012void
1011do_line_insertion_deletion_costs (frame, 1013do_line_insertion_deletion_costs (frame,
1012 ins_line_string, multi_ins_string, 1014 ins_line_string, multi_ins_string,
1013 del_line_string, multi_del_string, 1015 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. */
20 20
21 21
22#include <config.h> 22#include <config.h>
23#ifdef STDC_HEADERS
24#include <stdlib.h>
25#endif
23#include "lisp.h" 26#include "lisp.h"
24#include "syntax.h" 27#include "syntax.h"
25#include "category.h" 28#include "category.h"
@@ -515,6 +518,7 @@ newline_cache_on_off (buf)
515 If ALLOW_QUIT is non-zero, set immediate_quit. That's good to do 518 If ALLOW_QUIT is non-zero, set immediate_quit. That's good to do
516 except when inside redisplay. */ 519 except when inside redisplay. */
517 520
521int
518scan_buffer (target, start, end, count, shortage, allow_quit) 522scan_buffer (target, start, end, count, shortage, allow_quit)
519 register int target; 523 register int target;
520 int start, end; 524 int start, end;
@@ -2715,6 +2719,7 @@ DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0,
2715 STRING_MULTIBYTE (string)); 2719 STRING_MULTIBYTE (string));
2716} 2720}
2717 2721
2722void
2718syms_of_search () 2723syms_of_search ()
2719{ 2724{
2720 register int i; 2725 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;
1065 If that many words cannot be found before the end of the buffer, return 0. 1065 If that many words cannot be found before the end of the buffer, return 0.
1066 COUNT negative means scan backward and stop at word beginning. */ 1066 COUNT negative means scan backward and stop at word beginning. */
1067 1067
1068int
1068scan_words (from, count) 1069scan_words (from, count)
1069 register int from, count; 1070 register int from, count;
1070{ 1071{
@@ -2605,6 +2606,7 @@ DEFUN ("parse-partial-sexp", Fparse_partial_sexp, Sparse_partial_sexp, 2, 6, 0,
2605 Qnil))))))))); 2606 Qnil)))))))));
2606} 2607}
2607 2608
2609void
2608init_syntax_once () 2610init_syntax_once ()
2609{ 2611{
2610 register int i, c; 2612 register int i, c;
@@ -2676,6 +2678,7 @@ init_syntax_once ()
2676 } 2678 }
2677} 2679}
2678 2680
2681void
2679syms_of_syntax () 2682syms_of_syntax ()
2680{ 2683{
2681 Qsyntax_table_p = intern ("syntax-table-p"); 2684 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 ()
298/* Arrange for character C to be read as the next input from 298/* Arrange for character C to be read as the next input from
299 the terminal. */ 299 the terminal. */
300 300
301void
301stuff_char (c) 302stuff_char (c)
302 char c; 303 char c;
303{ 304{
@@ -377,6 +378,7 @@ init_baud_rate ()
377} 378}
378 379
379/*ARGSUSED*/ 380/*ARGSUSED*/
381void
380set_exclusive_use (fd) 382set_exclusive_use (fd)
381 int fd; 383 int fd;
382{ 384{
@@ -1028,6 +1030,7 @@ int inherited_pgroup;
1028 When we are in the foreground, but not started in our own process 1030 When we are in the foreground, but not started in our own process
1029 group, redirect the TTY to point to our own process group. We need 1031 group, redirect the TTY to point to our own process group. We need
1030 to be in our own process group to receive SIGIO properly. */ 1032 to be in our own process group to receive SIGIO properly. */
1033void
1031narrow_foreground_group () 1034narrow_foreground_group ()
1032{ 1035{
1033 int me = getpid (); 1036 int me = getpid ();
@@ -1039,6 +1042,7 @@ narrow_foreground_group ()
1039} 1042}
1040 1043
1041/* Set the tty to our original foreground group. */ 1044/* Set the tty to our original foreground group. */
1045void
1042widen_foreground_group () 1046widen_foreground_group ()
1043{ 1047{
1044 if (inherited_pgroup != getpid ()) 1048 if (inherited_pgroup != getpid ())
@@ -1595,6 +1599,7 @@ init_sys_modes ()
1595/* Return nonzero if safe to use tabs in output. 1599/* Return nonzero if safe to use tabs in output.
1596 At the time this is called, init_sys_modes has not been done yet. */ 1600 At the time this is called, init_sys_modes has not been done yet. */
1597 1601
1602int
1598tabs_safe_p () 1603tabs_safe_p ()
1599{ 1604{
1600 struct emacs_tty tty; 1605 struct emacs_tty tty;
@@ -1848,6 +1853,7 @@ setup_pty (fd)
1848 This is called each time Emacs is resumed, also, but does nothing 1853 This is called each time Emacs is resumed, also, but does nothing
1849 because input_chain is no longer zero. */ 1854 because input_chain is no longer zero. */
1850 1855
1856void
1851init_vms_input () 1857init_vms_input ()
1852{ 1858{
1853 int status; 1859 int status;
@@ -1862,6 +1868,7 @@ init_vms_input ()
1862 1868
1863/* Deassigning the input channel is done before exiting. */ 1869/* Deassigning the input channel is done before exiting. */
1864 1870
1871void
1865stop_vms_input () 1872stop_vms_input ()
1866{ 1873{
1867 return SYS$DASSGN (input_fd); 1874 return SYS$DASSGN (input_fd);
@@ -1872,6 +1879,7 @@ short input_buffer;
1872/* Request reading one character into the keyboard buffer. 1879/* Request reading one character into the keyboard buffer.
1873 This is done as soon as the buffer becomes empty. */ 1880 This is done as soon as the buffer becomes empty. */
1874 1881
1882void
1875queue_kbd_input () 1883queue_kbd_input ()
1876{ 1884{
1877 int status; 1885 int status;
@@ -1889,6 +1897,7 @@ int input_count;
1889/* Ast routine that is called when keyboard input comes in 1897/* Ast routine that is called when keyboard input comes in
1890 in accord with the SYS$QIO above. */ 1898 in accord with the SYS$QIO above. */
1891 1899
1900void
1892kbd_input_ast () 1901kbd_input_ast ()
1893{ 1902{
1894 register int c = -1; 1903 register int c = -1;
@@ -1936,6 +1945,7 @@ kbd_input_ast ()
1936 1945
1937/* Wait until there is something in kbd_buffer. */ 1946/* Wait until there is something in kbd_buffer. */
1938 1947
1948void
1939wait_for_kbd_input () 1949wait_for_kbd_input ()
1940{ 1950{
1941 extern int have_process_input, process_exited; 1951 extern int have_process_input, process_exited;
@@ -1982,6 +1992,7 @@ wait_for_kbd_input ()
1982 and therefore there is no I/O request queued when we return. 1992 and therefore there is no I/O request queued when we return.
1983 SYS$SETAST is used to avoid a timing error. */ 1993 SYS$SETAST is used to avoid a timing error. */
1984 1994
1995void
1985end_kbd_input () 1996end_kbd_input ()
1986{ 1997{
1987#ifdef ASTDEBUG 1998#ifdef ASTDEBUG
@@ -2008,6 +2019,7 @@ end_kbd_input ()
2008 2019
2009/* Wait for either input available or time interval expiry. */ 2020/* Wait for either input available or time interval expiry. */
2010 2021
2022void
2011input_wait_timeout (timeval) 2023input_wait_timeout (timeval)
2012 int timeval; /* Time to wait, in seconds */ 2024 int timeval; /* Time to wait, in seconds */
2013{ 2025{
@@ -2564,6 +2576,7 @@ sys_select (nfds, rfds, wfds, efds, timeout)
2564#define BUFFER_SIZE_FACTOR 1 2576#define BUFFER_SIZE_FACTOR 1
2565#endif 2577#endif
2566 2578
2579void
2567read_input_waiting () 2580read_input_waiting ()
2568{ 2581{
2569 struct input_event e; 2582 struct input_event e;
@@ -2657,6 +2670,7 @@ init_sigio (fd)
2657 ioctl (fd, TIOCLSET, &lmode); 2670 ioctl (fd, TIOCLSET, &lmode);
2658} 2671}
2659 2672
2673void
2660reset_sigio () 2674reset_sigio ()
2661{ 2675{
2662 if (noninteractive) 2676 if (noninteractive)
@@ -2686,6 +2700,7 @@ unrequest_sigio ()
2686 2700
2687int sigheld; /* Mask of held signals */ 2701int sigheld; /* Mask of held signals */
2688 2702
2703void
2689sigholdx (signum) 2704sigholdx (signum)
2690 int signum; 2705 int signum;
2691{ 2706{
@@ -2693,12 +2708,14 @@ sigholdx (signum)
2693 sighold (signum); 2708 sighold (signum);
2694} 2709}
2695 2710
2711void
2696sigisheld (signum) 2712sigisheld (signum)
2697 int signum; 2713 int signum;
2698{ 2714{
2699 sigheld |= sigbit (signum); 2715 sigheld |= sigbit (signum);
2700} 2716}
2701 2717
2718void
2702sigunhold (signum) 2719sigunhold (signum)
2703 int signum; 2720 int signum;
2704{ 2721{
@@ -2706,6 +2723,7 @@ sigunhold (signum)
2706 sigrelse (signum); 2723 sigrelse (signum);
2707} 2724}
2708 2725
2726void
2709sigfree () /* Free all held signals */ 2727sigfree () /* Free all held signals */
2710{ 2728{
2711 int i; 2729 int i;
@@ -2715,6 +2733,7 @@ sigfree () /* Free all held signals */
2715 sigheld = 0; 2733 sigheld = 0;
2716} 2734}
2717 2735
2736int
2718sigbit (i) 2737sigbit (i)
2719{ 2738{
2720 return 1 << (i - 1); 2739 return 1 << (i - 1);
@@ -2729,6 +2748,7 @@ sigbit (i)
2729 2748
2730sigset_t empty_mask, full_mask; 2749sigset_t empty_mask, full_mask;
2731 2750
2751void
2732init_signals () 2752init_signals ()
2733{ 2753{
2734 sigemptyset (&empty_mask); 2754 sigemptyset (&empty_mask);
@@ -3023,6 +3043,7 @@ sys_open (path, oflag, mode)
3023 3043
3024#ifdef INTERRUPTIBLE_CLOSE 3044#ifdef INTERRUPTIBLE_CLOSE
3025 3045
3046int
3026sys_close (fd) 3047sys_close (fd)
3027 int fd; 3048 int fd;
3028{ 3049{
@@ -3326,6 +3347,7 @@ dup2 (oldd, newd)
3326#ifdef HAVE_TIMEVAL 3347#ifdef HAVE_TIMEVAL
3327 3348
3328/* ARGSUSED */ 3349/* ARGSUSED */
3350int
3329gettimeofday (tp, tzp) 3351gettimeofday (tp, tzp)
3330 struct timeval *tp; 3352 struct timeval *tp;
3331 struct timezone *tzp; 3353 struct timezone *tzp;
@@ -3336,6 +3358,7 @@ gettimeofday (tp, tzp)
3336 tp->tv_usec = 0; 3358 tp->tv_usec = 0;
3337 if (tzp != 0) 3359 if (tzp != 0)
3338 tzp->tz_minuteswest = -1; 3360 tzp->tz_minuteswest = -1;
3361 return 0;
3339} 3362}
3340 3363
3341#endif 3364#endif
@@ -3347,6 +3370,7 @@ gettimeofday (tp, tzp)
3347 * This function will go away as soon as all the stubs fixed. (fnf) 3370 * This function will go away as soon as all the stubs fixed. (fnf)
3348 */ 3371 */
3349 3372
3373void
3350croak (badfunc) 3374croak (badfunc)
3351 char *badfunc; 3375 char *badfunc;
3352{ 3376{
@@ -3871,6 +3895,7 @@ static unsigned int uic;
3871 3895
3872/* Called from init_sys_modes, so it happens not very often 3896/* Called from init_sys_modes, so it happens not very often
3873 but at least each time Emacs is loaded. */ 3897 but at least each time Emacs is loaded. */
3898void
3874sys_access_reinit () 3899sys_access_reinit ()
3875{ 3900{
3876 uic = 0; 3901 uic = 0;
@@ -4123,6 +4148,7 @@ getwd (pathname)
4123 return pathname; 4148 return pathname;
4124} 4149}
4125 4150
4151int
4126getppid () 4152getppid ()
4127{ 4153{
4128 long item_code = JPI$_OWNER; 4154 long item_code = JPI$_OWNER;
@@ -4318,6 +4344,7 @@ creat_copy_attrs (old, new)
4318#endif 4344#endif
4319#endif 4345#endif
4320 4346
4347int
4321sys_creat (va_alist) 4348sys_creat (va_alist)
4322 va_dcl 4349 va_dcl
4323{ 4350{
@@ -4434,6 +4461,7 @@ sys_creat (va_alist)
4434#endif /* creat */ 4461#endif /* creat */
4435 4462
4436/* fwrite to stdout is S L O W. Speed it up by using fputc...*/ 4463/* fwrite to stdout is S L O W. Speed it up by using fputc...*/
4464int
4437sys_fwrite (ptr, size, num, fp) 4465sys_fwrite (ptr, size, num, fp)
4438 register char * ptr; 4466 register char * ptr;
4439 FILE * fp; 4467 FILE * fp;
@@ -4442,6 +4470,7 @@ sys_fwrite (ptr, size, num, fp)
4442 4470
4443 while (tot--) 4471 while (tot--)
4444 fputc (*ptr++, fp); 4472 fputc (*ptr++, fp);
4473 return num;
4445} 4474}
4446 4475
4447/* 4476/*
@@ -4729,6 +4758,7 @@ getpwuid (uid)
4729/* return total address space available to the current process. This is 4758/* return total address space available to the current process. This is
4730 the sum of the current p0 size, p1 size and free page table entries 4759 the sum of the current p0 size, p1 size and free page table entries
4731 available. */ 4760 available. */
4761int
4732vlimit () 4762vlimit ()
4733{ 4763{
4734 int item_code; 4764 int item_code;
@@ -4764,6 +4794,7 @@ vlimit ()
4764 return free_pages + frep0va + (0x7fffffff - frep1va); 4794 return free_pages + frep0va + (0x7fffffff - frep1va);
4765} 4795}
4766 4796
4797int
4767define_logical_name (varname, string) 4798define_logical_name (varname, string)
4768 char *varname; 4799 char *varname;
4769 char *string; 4800 char *string;
@@ -4778,6 +4809,7 @@ define_logical_name (varname, string)
4778 return LIB$SET_LOGICAL (&envdsc, &strdsc, &lnmdsc, 0, 0); 4809 return LIB$SET_LOGICAL (&envdsc, &strdsc, &lnmdsc, 0, 0);
4779} 4810}
4780 4811
4812int
4781delete_logical_name (varname) 4813delete_logical_name (varname)
4782 char *varname; 4814 char *varname;
4783{ 4815{
@@ -4789,15 +4821,23 @@ delete_logical_name (varname)
4789 return LIB$DELETE_LOGICAL (&envdsc, &lnmdsc); 4821 return LIB$DELETE_LOGICAL (&envdsc, &lnmdsc);
4790} 4822}
4791 4823
4824int
4792ulimit () 4825ulimit ()
4793{} 4826{
4827 return 0;
4828}
4794 4829
4830int
4795setpgrp () 4831setpgrp ()
4796{} 4832{
4833 return 0;
4834}
4797 4835
4836int
4798execvp () 4837execvp ()
4799{ 4838{
4800 error ("execvp system call not implemented"); 4839 error ("execvp system call not implemented");
4840 return -1;
4801} 4841}
4802 4842
4803int 4843int
@@ -4920,6 +4960,7 @@ rename_sans_version (from,to)
4920 return 0; 4960 return 0;
4921} 4961}
4922 4962
4963int
4923link (file, new) 4964link (file, new)
4924 char * file, * new; 4965 char * file, * new;
4925{ 4966{
@@ -4987,6 +5028,7 @@ link (file, new)
4987 return 0; 5028 return 0;
4988} 5029}
4989 5030
5031void
4990croak (badfunc) 5032croak (badfunc)
4991 char *badfunc; 5033 char *badfunc;
4992{ 5034{
@@ -5002,6 +5044,7 @@ random ()
5002 return rand () - (1 << 30); 5044 return rand () - (1 << 30);
5003} 5045}
5004 5046
5047void
5005srandom (seed) 5048srandom (seed)
5006{ 5049{
5007 srand (seed); 5050 srand (seed);
@@ -5011,6 +5054,7 @@ srandom (seed)
5011#ifdef AIXHFT 5054#ifdef AIXHFT
5012 5055
5013/* Called from init_sys_modes. */ 5056/* Called from init_sys_modes. */
5057void
5014hft_init () 5058hft_init ()
5015{ 5059{
5016 int junk; 5060 int junk;
@@ -5064,6 +5108,7 @@ hft_init ()
5064 5108
5065/* Reset the rubout key to backspace. */ 5109/* Reset the rubout key to backspace. */
5066 5110
5111void
5067hft_reset () 5112hft_reset ()
5068{ 5113{
5069 struct hfbuf buf; 5114 struct hfbuf buf;
@@ -5183,7 +5228,7 @@ bcopy (b1, b2, length)
5183 *b2++ = *b1++; 5228 *b2++ = *b1++;
5184#endif /* not VMS */ 5229#endif /* not VMS */
5185} 5230}
5186#endif /* (defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY) */ 5231#endif /* (!defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY) */
5187 5232
5188#ifndef BSTRING 5233#ifndef BSTRING
5189#ifndef bcmp 5234#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. */
33#include "disptab.h" 33#include "disptab.h"
34#include "termhooks.h" 34#include "termhooks.h"
35#include "keyboard.h" 35#include "keyboard.h"
36 36#include "dispextern.h"
37extern Lisp_Object Fmake_sparse_keymap (); 37#ifdef HAVE_X_WINDOWS
38#include "xterm.h"
39#endif
38 40
39#define max(a, b) ((a) > (b) ? (a) : (b)) 41#define max(a, b) ((a) > (b) ? (a) : (b))
40#define min(a, b) ((a) < (b) ? (a) : (b)) 42#define min(a, b) ((a) < (b) ? (a) : (b))
@@ -74,33 +76,33 @@ int no_redraw_on_reenter;
74/* Hook functions that you can set to snap out the functions in this file. 76/* Hook functions that you can set to snap out the functions in this file.
75 These are all extern'd in termhooks.h */ 77 These are all extern'd in termhooks.h */
76 78
77int (*cursor_to_hook) (); 79void (*cursor_to_hook) P_ ((int, int));
78int (*raw_cursor_to_hook) (); 80void (*raw_cursor_to_hook) P_ ((int, int));
79 81
80int (*clear_to_end_hook) (); 82void (*clear_to_end_hook) P_ ((void));
81int (*clear_frame_hook) (); 83void (*clear_frame_hook) P_ ((void));
82int (*clear_end_of_line_hook) (); 84void (*clear_end_of_line_hook) P_ ((int));
83 85
84int (*ins_del_lines_hook) (); 86void (*ins_del_lines_hook) P_ ((int, int));
85 87
86int (*change_line_highlight_hook) (); 88void (*change_line_highlight_hook) P_ ((int, int, int));
87int (*reassert_line_highlight_hook) (); 89void (*reassert_line_highlight_hook) P_ ((int, int));
88 90
89int (*insert_glyphs_hook) (); 91void (*insert_glyphs_hook) P_ ((GLYPH *, int));
90int (*write_glyphs_hook) (); 92void (*write_glyphs_hook) P_ ((GLYPH *, int));
91int (*delete_glyphs_hook) (); 93void (*delete_glyphs_hook) P_ ((int));
92 94
93int (*ring_bell_hook) (); 95void (*ring_bell_hook) P_ ((void));
94 96
95int (*reset_terminal_modes_hook) (); 97void (*reset_terminal_modes_hook) P_ ((void));
96int (*set_terminal_modes_hook) (); 98void (*set_terminal_modes_hook) P_ ((void));
97int (*update_begin_hook) (); 99void (*update_begin_hook) P_ ((struct frame *));
98int (*update_end_hook) (); 100void (*update_end_hook) P_ ((struct frame *));
99int (*set_terminal_window_hook) (); 101void (*set_terminal_window_hook) P_ ((int));
100 102
101int (*read_socket_hook) (); 103int (*read_socket_hook) P_ ((int, struct input_event *, int, int));
102 104
103int (*frame_up_to_date_hook) (); 105void (*frame_up_to_date_hook) P_ ((struct frame *));
104 106
105/* Return the current position of the mouse. 107/* Return the current position of the mouse.
106 108
@@ -120,19 +122,19 @@ int (*frame_up_to_date_hook) ();
120 122
121 This should clear mouse_moved until the next motion 123 This should clear mouse_moved until the next motion
122 event arrives. */ 124 event arrives. */
123void (*mouse_position_hook) ( /* FRAME_PTR *f, int insist, 125void (*mouse_position_hook) P_ ((FRAME_PTR *f, int insist,
124 Lisp_Object *bar_window, 126 Lisp_Object *bar_window,
125 enum scroll_bar_part *part, 127 enum scroll_bar_part *part,
126 Lisp_Object *x, 128 Lisp_Object *x,
127 Lisp_Object *y, 129 Lisp_Object *y,
128 unsigned long *time */ ); 130 unsigned long *time));
129 131
130/* When reading from a minibuffer in a different frame, Emacs wants 132/* When reading from a minibuffer in a different frame, Emacs wants
131 to shift the highlight from the selected frame to the minibuffer's 133 to shift the highlight from the selected frame to the minibuffer's
132 frame; under X, this means it lies about where the focus is. 134 frame; under X, this means it lies about where the focus is.
133 This hook tells the window system code to re-decide where to put 135 This hook tells the window system code to re-decide where to put
134 the highlight. */ 136 the highlight. */
135void (*frame_rehighlight_hook) ( /* FRAME_PTR f */ ); 137void (*frame_rehighlight_hook) P_ ((FRAME_PTR f));
136 138
137/* If we're displaying frames using a window system that can stack 139/* If we're displaying frames using a window system that can stack
138 frames on top of each other, this hook allows you to bring a frame 140 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 */ );
144 If RAISE is non-zero, F is brought to the front, before all other 146 If RAISE is non-zero, F is brought to the front, before all other
145 windows. If RAISE is zero, F is sent to the back, behind all other 147 windows. If RAISE is zero, F is sent to the back, behind all other
146 windows. */ 148 windows. */
147void (*frame_raise_lower_hook) ( /* FRAME_PTR f, int raise */ ); 149void (*frame_raise_lower_hook) P_ ((FRAME_PTR f, int raise));
148 150
149/* Set the vertical scroll bar for WINDOW to have its upper left corner 151/* Set the vertical scroll bar for WINDOW to have its upper left corner
150 at (TOP, LEFT), and be LENGTH rows high. Set its handle to 152 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 */ );
152 of WHOLE characters, starting at POSITION. If WINDOW doesn't yet 154 of WHOLE characters, starting at POSITION. If WINDOW doesn't yet
153 have a scroll bar, create one for it. */ 155 have a scroll bar, create one for it. */
154void (*set_vertical_scroll_bar_hook) 156void (*set_vertical_scroll_bar_hook)
155 ( /* struct window *window, 157 P_ ((struct window *window,
156 int portion, int whole, int position */ ); 158 int portion, int whole, int position));
157 159
158 160
159/* The following three hooks are used when we're doing a thorough 161/* The following three hooks are used when we're doing a thorough
@@ -176,11 +178,11 @@ void (*set_vertical_scroll_bar_hook)
176 If non-zero, this hook should be safe to apply to any frame, 178 If non-zero, this hook should be safe to apply to any frame,
177 whether or not it can support scroll bars, and whether or not it is 179 whether or not it can support scroll bars, and whether or not it is
178 currently displaying them. */ 180 currently displaying them. */
179void (*condemn_scroll_bars_hook)( /* FRAME_PTR *frame */ ); 181void (*condemn_scroll_bars_hook) P_ ((FRAME_PTR frame));
180 182
181/* Unmark WINDOW's scroll bar for deletion in this judgement cycle. 183/* Unmark WINDOW's scroll bar for deletion in this judgement cycle.
182 Note that it's okay to redeem a scroll bar that is not condemned. */ 184 Note that it's okay to redeem a scroll bar that is not condemned. */
183void (*redeem_scroll_bar_hook)( /* struct window *window */ ); 185void (*redeem_scroll_bar_hook) P_ ((struct window *window));
184 186
185/* Remove all scroll bars on FRAME that haven't been saved since the 187/* Remove all scroll bars on FRAME that haven't been saved since the
186 last call to `*condemn_scroll_bars_hook'. 188 last call to `*condemn_scroll_bars_hook'.
@@ -193,7 +195,7 @@ void (*redeem_scroll_bar_hook)( /* struct window *window */ );
193 If non-zero, this hook should be safe to apply to any frame, 195 If non-zero, this hook should be safe to apply to any frame,
194 whether or not it can support scroll bars, and whether or not it is 196 whether or not it can support scroll bars, and whether or not it is
195 currently displaying them. */ 197 currently displaying them. */
196void (*judge_scroll_bars_hook)( /* FRAME_PTR *FRAME */ ); 198void (*judge_scroll_bars_hook) P_ ((FRAME_PTR FRAME));
197 199
198 200
199/* Strings, numbers and flags taken from the termcap entry. */ 201/* Strings, numbers and flags taken from the termcap entry. */
@@ -319,6 +321,7 @@ extern char *tgetstr ();
319#define FRAME_TERMCAP_P(_f_) 0 321#define FRAME_TERMCAP_P(_f_) 0
320#endif /* WINDOWSNT */ 322#endif /* WINDOWSNT */
321 323
324void
322ring_bell () 325ring_bell ()
323{ 326{
324 if (! NILP (Vring_bell_function)) 327 if (! NILP (Vring_bell_function))
@@ -349,6 +352,7 @@ ring_bell ()
349 OUTPUT (TS_visible_bell && visible_bell ? TS_visible_bell : TS_bell); 352 OUTPUT (TS_visible_bell && visible_bell ? TS_visible_bell : TS_bell);
350} 353}
351 354
355void
352set_terminal_modes () 356set_terminal_modes ()
353{ 357{
354 if (! FRAME_TERMCAP_P (selected_frame)) 358 if (! FRAME_TERMCAP_P (selected_frame))
@@ -362,6 +366,7 @@ set_terminal_modes ()
362 losecursor (); 366 losecursor ();
363} 367}
364 368
369void
365reset_terminal_modes () 370reset_terminal_modes ()
366{ 371{
367 if (! FRAME_TERMCAP_P (selected_frame)) 372 if (! FRAME_TERMCAP_P (selected_frame))
@@ -383,6 +388,7 @@ reset_terminal_modes ()
383 cmputc ('\r'); 388 cmputc ('\r');
384} 389}
385 390
391void
386update_begin (f) 392update_begin (f)
387 FRAME_PTR f; 393 FRAME_PTR f;
388{ 394{
@@ -391,6 +397,7 @@ update_begin (f)
391 (*update_begin_hook) (f); 397 (*update_begin_hook) (f);
392} 398}
393 399
400void
394update_end (f) 401update_end (f)
395 FRAME_PTR f; 402 FRAME_PTR f;
396{ 403{
@@ -406,6 +413,7 @@ update_end (f)
406 updating_frame = 0; 413 updating_frame = 0;
407} 414}
408 415
416void
409set_terminal_window (size) 417set_terminal_window (size)
410 int size; 418 int size;
411{ 419{
@@ -420,6 +428,7 @@ set_terminal_window (size)
420 set_scroll_region (0, specified_window); 428 set_scroll_region (0, specified_window);
421} 429}
422 430
431void
423set_scroll_region (start, stop) 432set_scroll_region (start, stop)
424 int start, stop; 433 int start, stop;
425{ 434{
@@ -444,6 +453,7 @@ set_scroll_region (start, stop)
444 losecursor (); 453 losecursor ();
445} 454}
446 455
456void
447turn_on_insert () 457turn_on_insert ()
448{ 458{
449 if (!insert_mode) 459 if (!insert_mode)
@@ -451,6 +461,7 @@ turn_on_insert ()
451 insert_mode = 1; 461 insert_mode = 1;
452} 462}
453 463
464void
454turn_off_insert () 465turn_off_insert ()
455{ 466{
456 if (insert_mode) 467 if (insert_mode)
@@ -465,6 +476,7 @@ turn_off_insert ()
465 These functions are called on all terminals, but do nothing 476 These functions are called on all terminals, but do nothing
466 on terminals whose standout mode does not work that way. */ 477 on terminals whose standout mode does not work that way. */
467 478
479void
468turn_off_highlight () 480turn_off_highlight ()
469{ 481{
470 if (TN_standout_width < 0) 482 if (TN_standout_width < 0)
@@ -475,6 +487,7 @@ turn_off_highlight ()
475 } 487 }
476} 488}
477 489
490void
478turn_on_highlight () 491turn_on_highlight ()
479{ 492{
480 if (TN_standout_width < 0) 493 if (TN_standout_width < 0)
@@ -489,6 +502,7 @@ turn_on_highlight ()
489 empty space inside windows. What this is, 502 empty space inside windows. What this is,
490 depends on the user option inverse-video. */ 503 depends on the user option inverse-video. */
491 504
505void
492background_highlight () 506background_highlight ()
493{ 507{
494 if (TN_standout_width >= 0) 508 if (TN_standout_width >= 0)
@@ -501,7 +515,7 @@ background_highlight ()
501 515
502/* Set standout mode to the mode specified for the text to be output. */ 516/* Set standout mode to the mode specified for the text to be output. */
503 517
504static 518static void
505highlight_if_desired () 519highlight_if_desired ()
506{ 520{
507 if (TN_standout_width >= 0) 521 if (TN_standout_width >= 0)
@@ -523,6 +537,7 @@ highlight_if_desired ()
523/* Write a standout marker or end-standout marker at the front of the line 537/* Write a standout marker or end-standout marker at the front of the line
524 at vertical position vpos. */ 538 at vertical position vpos. */
525 539
540void
526write_standout_marker (flag, vpos) 541write_standout_marker (flag, vpos)
527 int flag, vpos; 542 int flag, vpos;
528{ 543{
@@ -540,6 +555,7 @@ write_standout_marker (flag, vpos)
540 Call this when about to modify line at position VPOS 555 Call this when about to modify line at position VPOS
541 and not change whether it is highlighted. */ 556 and not change whether it is highlighted. */
542 557
558void
543reassert_line_highlight (highlight, vpos) 559reassert_line_highlight (highlight, vpos)
544 int highlight; 560 int highlight;
545 int vpos; 561 int vpos;
@@ -561,6 +577,7 @@ reassert_line_highlight (highlight, vpos)
561/* Call this when about to modify line at position VPOS 577/* Call this when about to modify line at position VPOS
562 and change whether it is highlighted. */ 578 and change whether it is highlighted. */
563 579
580void
564change_line_highlight (new_highlight, vpos, first_unused_hpos) 581change_line_highlight (new_highlight, vpos, first_unused_hpos)
565 int new_highlight, vpos, first_unused_hpos; 582 int new_highlight, vpos, first_unused_hpos;
566{ 583{
@@ -597,6 +614,7 @@ change_line_highlight (new_highlight, vpos, first_unused_hpos)
597 614
598/* Move to absolute position, specified origin 0 */ 615/* Move to absolute position, specified origin 0 */
599 616
617void
600cursor_to (row, col) 618cursor_to (row, col)
601 int row, col; 619 int row, col;
602{ 620{
@@ -626,6 +644,7 @@ cursor_to (row, col)
626 644
627/* Similar but don't take any account of the wasted characters. */ 645/* Similar but don't take any account of the wasted characters. */
628 646
647void
629raw_cursor_to (row, col) 648raw_cursor_to (row, col)
630 int row, col; 649 int row, col;
631{ 650{
@@ -646,6 +665,7 @@ raw_cursor_to (row, col)
646/* Erase operations */ 665/* Erase operations */
647 666
648/* clear from cursor to end of frame */ 667/* clear from cursor to end of frame */
668void
649clear_to_end () 669clear_to_end ()
650{ 670{
651 register int i; 671 register int i;
@@ -673,6 +693,7 @@ clear_to_end ()
673 693
674/* Clear entire frame */ 694/* Clear entire frame */
675 695
696void
676clear_frame () 697clear_frame ()
677{ 698{
678 if (clear_frame_hook 699 if (clear_frame_hook
@@ -702,6 +723,7 @@ clear_frame ()
702 723
703 Note that the cursor may be moved. */ 724 Note that the cursor may be moved. */
704 725
726void
705clear_end_of_line (first_unused_hpos) 727clear_end_of_line (first_unused_hpos)
706 int first_unused_hpos; 728 int first_unused_hpos;
707{ 729{
@@ -719,6 +741,7 @@ clear_end_of_line (first_unused_hpos)
719 741
720 Note that the cursor may be moved, on terminals lacking a `ce' string. */ 742 Note that the cursor may be moved, on terminals lacking a `ce' string. */
721 743
744void
722clear_end_of_line_raw (first_unused_hpos) 745clear_end_of_line_raw (first_unused_hpos)
723 int first_unused_hpos; 746 int first_unused_hpos;
724{ 747{
@@ -849,6 +872,7 @@ encode_terminal_code (src, dst, src_len, dst_len, consumed)
849} 872}
850 873
851 874
875void
852write_glyphs (string, len) 876write_glyphs (string, len)
853 register GLYPH *string; 877 register GLYPH *string;
854 register int len; 878 register int len;
@@ -922,6 +946,7 @@ write_glyphs (string, len)
922 946
923/* If start is zero, insert blanks instead of a string at start */ 947/* If start is zero, insert blanks instead of a string at start */
924 948
949void
925insert_glyphs (start, len) 950insert_glyphs (start, len)
926 register GLYPH *start; 951 register GLYPH *start;
927 register int len; 952 register int len;
@@ -996,6 +1021,7 @@ insert_glyphs (start, len)
996 cmcheckmagic (); 1021 cmcheckmagic ();
997} 1022}
998 1023
1024void
999delete_glyphs (n) 1025delete_glyphs (n)
1000 register int n; 1026 register int n;
1001{ 1027{
@@ -1033,6 +1059,7 @@ delete_glyphs (n)
1033 1059
1034/* Insert N lines at vpos VPOS. If N is negative, delete -N lines. */ 1060/* Insert N lines at vpos VPOS. If N is negative, delete -N lines. */
1035 1061
1062void
1036ins_del_lines (vpos, n) 1063ins_del_lines (vpos, n)
1037 int vpos, n; 1064 int vpos, n;
1038{ 1065{
@@ -1093,7 +1120,7 @@ ins_del_lines (vpos, n)
1093 1120
1094 if (TN_standout_width >= 0) 1121 if (TN_standout_width >= 0)
1095 { 1122 {
1096 register lower_limit 1123 register int lower_limit
1097 = (scroll_region_ok 1124 = (scroll_region_ok
1098 ? specified_window 1125 ? specified_window
1099 : FRAME_HEIGHT (selected_frame)); 1126 : FRAME_HEIGHT (selected_frame));
@@ -1233,8 +1260,7 @@ calculate_ins_del_char_costs (frame)
1233 *p++ = (ins_startup_cost += ins_cost_per_char); 1260 *p++ = (ins_startup_cost += ins_cost_per_char);
1234} 1261}
1235 1262
1236extern do_line_insertion_deletion_costs (); 1263void
1237
1238calculate_costs (frame) 1264calculate_costs (frame)
1239 FRAME_PTR frame; 1265 FRAME_PTR frame;
1240{ 1266{
@@ -1534,6 +1560,7 @@ term_get_fkeys_1 ()
1534} 1560}
1535 1561
1536 1562
1563void
1537term_init (terminal_type) 1564term_init (terminal_type)
1538 char *terminal_type; 1565 char *terminal_type;
1539{ 1566{
@@ -1904,6 +1931,7 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
1904} 1931}
1905 1932
1906/* VARARGS 1 */ 1933/* VARARGS 1 */
1934void
1907fatal (str, arg1, arg2) 1935fatal (str, arg1, arg2)
1908 char *str, *arg1, *arg2; 1936 char *str, *arg1, *arg2;
1909{ 1937{
@@ -1914,6 +1942,7 @@ fatal (str, arg1, arg2)
1914 exit (1); 1942 exit (1);
1915} 1943}
1916 1944
1945void
1917syms_of_term () 1946syms_of_term ()
1918{ 1947{
1919 DEFVAR_BOOL ("system-uses-terminfo", &system_uses_terminfo, 1948 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;
39#endif 39#endif
40#endif 40#endif
41 41
42static buffer[512];
43
44/* Interface to curses/terminfo library. 42/* Interface to curses/terminfo library.
45 Turns out that all of the terminfo-level routines look 43 Turns out that all of the terminfo-level routines look
46 like their termcap counterparts except for tparm, which replaces 44 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.")
524 return unbind_to (count, list); 524 return unbind_to (count, list);
525} 525}
526 526
527void
527syms_of_undo () 528syms_of_undo ()
528{ 529{
529 Qinhibit_read_only = intern ("inhibit-read-only"); 530 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. */
36#include "xterm.h" 36#include "xterm.h"
37 37
38#include "frame.h" 38#include "frame.h"
39#include "window.h"
39 40
40#include "dispextern.h" 41#include "dispextern.h"
41#include "blockinput.h" 42#include "blockinput.h"
@@ -967,6 +968,7 @@ EmacsFrameSetCharSize (widget, columns, rows)
967 SET_FRAME_GARBAGED (f); 968 SET_FRAME_GARBAGED (f);
968} 969}
969 970
971void
970widget_store_internal_border (widget) 972widget_store_internal_border (widget)
971 Widget widget; 973 Widget widget;
972{ 974{
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. */
30#include "disptab.h" 30#include "disptab.h"
31#include "keyboard.h" 31#include "keyboard.h"
32#include "blockinput.h" 32#include "blockinput.h"
33#include "dispextern.h"
34#ifdef HAVE_WINDOW_SYSTEM
35#include "xterm.h"
36#endif
33 37
34Lisp_Object Qwindowp, Qwindow_live_p; 38Lisp_Object Qwindowp, Qwindow_live_p;
35 39
@@ -723,7 +727,7 @@ DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_displa
723 727
724/* Record info on buffer window w is displaying 728/* Record info on buffer window w is displaying
725 when it is about to cease to display that buffer. */ 729 when it is about to cease to display that buffer. */
726static 730static void
727unshow_buffer (w) 731unshow_buffer (w)
728 register struct window *w; 732 register struct window *w;
729{ 733{
@@ -767,7 +771,7 @@ unshow_buffer (w)
767} 771}
768 772
769/* Put replacement into the window structure in place of old. */ 773/* Put replacement into the window structure in place of old. */
770static 774static void
771replace_window (old, replacement) 775replace_window (old, replacement)
772 Lisp_Object old, replacement; 776 Lisp_Object old, replacement;
773{ 777{
@@ -2365,7 +2369,7 @@ temp_output_buffer_show (buf)
2365 } 2369 }
2366} 2370}
2367 2371
2368static 2372static void
2369make_dummy_parent (window) 2373make_dummy_parent (window)
2370 Lisp_Object window; 2374 Lisp_Object window;
2371{ 2375{
@@ -3799,6 +3803,7 @@ and scrolling positions.")
3799 return Qnil; 3803 return Qnil;
3800} 3804}
3801 3805
3806void
3802init_window_once () 3807init_window_once ()
3803{ 3808{
3804 selected_frame = make_terminal_frame (); 3809 selected_frame = make_terminal_frame ();
@@ -3810,6 +3815,7 @@ init_window_once ()
3810 window_initialized = 1; 3815 window_initialized = 1;
3811} 3816}
3812 3817
3818void
3813syms_of_window () 3819syms_of_window ()
3814{ 3820{
3815 staticpro (&Qwindow_configuration_change_hook); 3821 staticpro (&Qwindow_configuration_change_hook);
@@ -4029,6 +4035,7 @@ The selected frame is the one whose configuration has changed.");
4029 defsubr (&Scompare_window_configurations); 4035 defsubr (&Scompare_window_configurations);
4030} 4036}
4031 4037
4038void
4032keys_of_window () 4039keys_of_window ()
4033{ 4040{
4034 initial_define_key (control_x_map, '1', "delete-other-windows"); 4041 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. */
40#include "keyboard.h" 40#include "keyboard.h"
41#include "coding.h" 41#include "coding.h"
42#include "process.h" 42#include "process.h"
43#include "region-cache.h"
44
45#ifdef HAVE_WINDOW_SYSTEM
46#include "xterm.h"
47#endif
43 48
44#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) 49#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)
45extern void set_frame_menubar (); 50extern void set_frame_menubar ();
@@ -5468,6 +5473,7 @@ This commonly affects the minibuffer window, hence the name of the variable.");
5468} 5473}
5469 5474
5470/* initialize the window system */ 5475/* initialize the window system */
5476void
5471init_xdisp () 5477init_xdisp ()
5472{ 5478{
5473 Lisp_Object root_window; 5479 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.")
686 /* Use the mouse's current position. */ 686 /* Use the mouse's current position. */
687 FRAME_PTR new_f = selected_frame; 687 FRAME_PTR new_f = selected_frame;
688 Lisp_Object bar_window; 688 Lisp_Object bar_window;
689 int part; 689 enum scroll_bar_part part;
690 unsigned long time; 690 unsigned long time;
691 691
692 if (mouse_position_hook) 692 if (mouse_position_hook)
@@ -1095,6 +1095,7 @@ popup_get_selection (initial_event, dpyinfo, id)
1095 passing it to the toolkit right away, is that we can safely 1095 passing it to the toolkit right away, is that we can safely
1096 execute Lisp code. */ 1096 execute Lisp code. */
1097 1097
1098void
1098x_activate_menubar (f) 1099x_activate_menubar (f)
1099 FRAME_PTR f; 1100 FRAME_PTR f;
1100{ 1101{
@@ -2606,6 +2607,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
2606 2607
2607#endif /* HAVE_MENUS */ 2608#endif /* HAVE_MENUS */
2608 2609
2610void
2609syms_of_xmenu () 2611syms_of_xmenu ()
2610{ 2612{
2611 staticpro (&menu_items); 2613 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. */
24#include <config.h> 24#include <config.h>
25#endif 25#endif
26 26
27#ifdef HAVE_UNISTD_H
28#include <unistd.h>
29#endif
30
27#include <paths.h> 31#include <paths.h>
28 32
29#include <stdio.h> 33#include <stdio.h>
@@ -84,6 +88,7 @@ extern char *get_system_name ();
84#define malloc xmalloc 88#define malloc xmalloc
85#define realloc xrealloc 89#define realloc xrealloc
86#define free xfree 90#define free xfree
91extern long *xmalloc (), *xrealloc ();
87#endif 92#endif
88 93
89char *x_get_string_resource (); 94char *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. */
30#include "buffer.h" 30#include "buffer.h"
31#include "charset.h" 31#include "charset.h"
32#include "coding.h" 32#include "coding.h"
33#include "process.h"
33 34
34#define CUT_BUFFER_SUPPORT 35#define CUT_BUFFER_SUPPORT
35 36
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. */
86#include "window.h" 86#include "window.h"
87#include "keyboard.h" 87#include "keyboard.h"
88#include "intervals.h" 88#include "intervals.h"
89#include "process.h"
89 90
90#ifdef USE_X_TOOLKIT 91#ifdef USE_X_TOOLKIT
91#include <X11/Shell.h> 92#include <X11/Shell.h>
@@ -147,7 +148,7 @@ Lisp_Object x_display_name_list;
147 is the frame to apply to. */ 148 is the frame to apply to. */
148extern struct frame *updating_frame; 149extern struct frame *updating_frame;
149 150
150extern waiting_for_input; 151extern int waiting_for_input;
151 152
152/* This is a frame waiting to be autoraised, within XTread_socket. */ 153/* This is a frame waiting to be autoraised, within XTread_socket. */
153struct frame *pending_autoraise_frame; 154struct frame *pending_autoraise_frame;
@@ -265,8 +266,8 @@ static void clear_mouse_face ();
265static void show_mouse_face (); 266static void show_mouse_face ();
266static void do_line_dance (); 267static void do_line_dance ();
267 268
268static int XTcursor_to (); 269static void XTcursor_to ();
269static int XTclear_end_of_line (); 270static void XTclear_end_of_line ();
270static int x_io_error_quitter (); 271static int x_io_error_quitter ();
271int x_catch_errors (); 272int x_catch_errors ();
272void x_uncatch_errors (); 273void x_uncatch_errors ();
@@ -323,7 +324,7 @@ x_display_info_for_display (dpy)
323 should never be called except during an update, the only exceptions 324 should never be called except during an update, the only exceptions
324 being XTcursor_to, XTwrite_glyphs and XTreassert_line_highlight. */ 325 being XTcursor_to, XTwrite_glyphs and XTreassert_line_highlight. */
325 326
326static 327static void
327XTupdate_begin (f) 328XTupdate_begin (f)
328 struct frame *f; 329 struct frame *f;
329{ 330{
@@ -383,7 +384,7 @@ XTupdate_begin (f)
383 UNBLOCK_INPUT; 384 UNBLOCK_INPUT;
384} 385}
385 386
386static 387static void
387XTupdate_end (f) 388XTupdate_end (f)
388 struct frame *f; 389 struct frame *f;
389{ 390{
@@ -413,7 +414,7 @@ XTupdate_end (f)
413 414
414/* This is called after a redisplay on frame F. */ 415/* This is called after a redisplay on frame F. */
415 416
416static 417static void
417XTframe_up_to_date (f) 418XTframe_up_to_date (f)
418 FRAME_PTR f; 419 FRAME_PTR f;
419{ 420{
@@ -434,6 +435,7 @@ XTframe_up_to_date (f)
434 Call this when about to modify line at position VPOS 435 Call this when about to modify line at position VPOS
435 and not change whether it is highlighted. */ 436 and not change whether it is highlighted. */
436 437
438void
437XTreassert_line_highlight (new, vpos) 439XTreassert_line_highlight (new, vpos)
438 int new, vpos; 440 int new, vpos;
439{ 441{
@@ -443,7 +445,7 @@ XTreassert_line_highlight (new, vpos)
443/* Call this when about to modify line at position VPOS 445/* Call this when about to modify line at position VPOS
444 and change whether it is highlighted. */ 446 and change whether it is highlighted. */
445 447
446static 448static void
447XTchange_line_highlight (new_highlight, vpos, first_unused_hpos) 449XTchange_line_highlight (new_highlight, vpos, first_unused_hpos)
448 int new_highlight, vpos, first_unused_hpos; 450 int new_highlight, vpos, first_unused_hpos;
449{ 451{
@@ -456,7 +458,7 @@ XTchange_line_highlight (new_highlight, vpos, first_unused_hpos)
456 When starting Emacs, no X window is mapped. And nothing must be done 458 When starting Emacs, no X window is mapped. And nothing must be done
457 to Emacs's own window if it is suspended (though that rarely happens). */ 459 to Emacs's own window if it is suspended (though that rarely happens). */
458 460
459static 461static void
460XTset_terminal_modes () 462XTset_terminal_modes ()
461{ 463{
462} 464}
@@ -465,7 +467,7 @@ XTset_terminal_modes ()
465 Exiting will make the X-windows go away, and suspending 467 Exiting will make the X-windows go away, and suspending
466 requires no action. */ 468 requires no action. */
467 469
468static 470static void
469XTreset_terminal_modes () 471XTreset_terminal_modes ()
470{ 472{
471/* XTclear_frame (); */ 473/* XTclear_frame (); */
@@ -475,7 +477,7 @@ XTreset_terminal_modes ()
475 This is where display update commands will take effect. 477 This is where display update commands will take effect.
476 This does not affect the place where the cursor-box is displayed. */ 478 This does not affect the place where the cursor-box is displayed. */
477 479
478static int 480static void
479XTcursor_to (row, col) 481XTcursor_to (row, col)
480 register int row, col; 482 register int row, col;
481{ 483{
@@ -1184,7 +1186,7 @@ dumpglyphs (f, left, top, gp, n, hl, font)
1184 `highlight', set up by XTreassert_line_highlight or XTchange_line_highlight, 1186 `highlight', set up by XTreassert_line_highlight or XTchange_line_highlight,
1185 controls the pixel values used for foreground and background. */ 1187 controls the pixel values used for foreground and background. */
1186 1188
1187static 1189static void
1188XTwrite_glyphs (start, len) 1190XTwrite_glyphs (start, len)
1189 register GLYPH *start; 1191 register GLYPH *start;
1190 int len; 1192 int len;
@@ -1230,7 +1232,7 @@ XTwrite_glyphs (start, len)
1230 to column FIRST_UNUSED (exclusive). The idea is that everything 1232 to column FIRST_UNUSED (exclusive). The idea is that everything
1231 from FIRST_UNUSED onward is already erased. */ 1233 from FIRST_UNUSED onward is already erased. */
1232 1234
1233static 1235static void
1234XTclear_end_of_line (first_unused) 1236XTclear_end_of_line (first_unused)
1235 register int first_unused; 1237 register int first_unused;
1236{ 1238{
@@ -1272,7 +1274,7 @@ XTclear_end_of_line (first_unused)
1272 UNBLOCK_INPUT; 1274 UNBLOCK_INPUT;
1273} 1275}
1274 1276
1275static 1277static void
1276XTclear_frame () 1278XTclear_frame ()
1277{ 1279{
1278 int mask; 1280 int mask;
@@ -1508,6 +1510,7 @@ timeval_subtract (result, x, y)
1508 return x.tv_sec < y.tv_sec; 1510 return x.tv_sec < y.tv_sec;
1509} 1511}
1510 1512
1513void
1511XTflash (f) 1514XTflash (f)
1512 struct frame *f; 1515 struct frame *f;
1513{ 1516{
@@ -1635,6 +1638,7 @@ XTflash (f)
1635 1638
1636#define XRINGBELL XBell (FRAME_X_DISPLAY (selected_frame), 0) 1639#define XRINGBELL XBell (FRAME_X_DISPLAY (selected_frame), 0)
1637 1640
1641void
1638XTring_bell () 1642XTring_bell ()
1639{ 1643{
1640 if (FRAME_X_DISPLAY (selected_frame) == 0) 1644 if (FRAME_X_DISPLAY (selected_frame) == 0)
@@ -1657,7 +1661,7 @@ XTring_bell ()
1657 These are not supposed to be used because we are supposed to turn 1661 These are not supposed to be used because we are supposed to turn
1658 off the feature of using them. */ 1662 off the feature of using them. */
1659 1663
1660static 1664static void
1661XTinsert_glyphs (start, len) 1665XTinsert_glyphs (start, len)
1662 register char *start; 1666 register char *start;
1663 register int len; 1667 register int len;
@@ -1665,7 +1669,7 @@ XTinsert_glyphs (start, len)
1665 abort (); 1669 abort ();
1666} 1670}
1667 1671
1668static 1672static void
1669XTdelete_glyphs (n) 1673XTdelete_glyphs (n)
1670 register int n; 1674 register int n;
1671{ 1675{
@@ -1677,7 +1681,7 @@ XTdelete_glyphs (n)
1677 This, and those operations, are used only within an update 1681 This, and those operations, are used only within an update
1678 that is bounded by calls to XTupdate_begin and XTupdate_end. */ 1682 that is bounded by calls to XTupdate_begin and XTupdate_end. */
1679 1683
1680static 1684static void
1681XTset_terminal_window (n) 1685XTset_terminal_window (n)
1682 register int n; 1686 register int n;
1683{ 1687{
@@ -1708,6 +1712,7 @@ static int line_dance_in_progress;
1708 1712
1709/* Perform an insert-lines or delete-lines operation, 1713/* Perform an insert-lines or delete-lines operation,
1710 inserting N lines or deleting -N lines at vertical position VPOS. */ 1714 inserting N lines or deleting -N lines at vertical position VPOS. */
1715void
1711XTins_del_lines (vpos, n) 1716XTins_del_lines (vpos, n)
1712 int vpos, n; 1717 int vpos, n;
1713{ 1718{
@@ -2693,6 +2698,7 @@ clear_mouse_face (dpyinfo)
2693/* Just discard the mouse face information for frame F, if any. 2698/* Just discard the mouse face information for frame F, if any.
2694 This is used when the size of F is changed. */ 2699 This is used when the size of F is changed. */
2695 2700
2701void
2696cancel_mouse_face (f) 2702cancel_mouse_face (f)
2697 FRAME_PTR f; 2703 FRAME_PTR f;
2698{ 2704{
@@ -3560,6 +3566,7 @@ x_scroll_bar_report_motion (fp, bar_window, part, x, y, time)
3560 Clear out the scroll bars, and ask for expose events, so we can 3566 Clear out the scroll bars, and ask for expose events, so we can
3561 redraw them. */ 3567 redraw them. */
3562 3568
3569void
3563x_scroll_bar_clear (f) 3570x_scroll_bar_clear (f)
3564 FRAME_PTR f; 3571 FRAME_PTR f;
3565{ 3572{
@@ -3959,7 +3966,7 @@ XTread_socket (sd, bufp, numchars, expected)
3959 if (! x_window_to_frame (dpyinfo, event.xselection.requestor)) 3966 if (! x_window_to_frame (dpyinfo, event.xselection.requestor))
3960 goto OTHER; 3967 goto OTHER;
3961#endif /* not USE_X_TOOLKIT */ 3968#endif /* not USE_X_TOOLKIT */
3962 x_handle_selection_notify (&event); 3969 x_handle_selection_notify (&event.xselection);
3963 break; 3970 break;
3964 3971
3965 case SelectionClear: /* Someone has grabbed ownership. */ 3972 case SelectionClear: /* Someone has grabbed ownership. */
@@ -4020,7 +4027,7 @@ XTread_socket (sd, bufp, numchars, expected)
4020 if (!x_any_window_to_frame (dpyinfo, event.xproperty.window)) 4027 if (!x_any_window_to_frame (dpyinfo, event.xproperty.window))
4021 goto OTHER; 4028 goto OTHER;
4022#endif /* not USE_X_TOOLKIT */ 4029#endif /* not USE_X_TOOLKIT */
4023 x_handle_property_notify (&event); 4030 x_handle_property_notify (&event.xproperty);
4024 break; 4031 break;
4025 4032
4026 case ReparentNotify: 4033 case ReparentNotify:
@@ -4896,6 +4903,7 @@ x_display_box_cursor (f, on, x, y)
4896/* Display the cursor on frame F, or clear it, according to ON. 4903/* Display the cursor on frame F, or clear it, according to ON.
4897 Also set the frame's cursor position to X and Y. */ 4904 Also set the frame's cursor position to X and Y. */
4898 4905
4906void
4899x_display_cursor (f, on, x, y) 4907x_display_cursor (f, on, x, y)
4900 struct frame *f; 4908 struct frame *f;
4901 int on; 4909 int on;
@@ -4921,6 +4929,7 @@ x_display_cursor (f, on, x, y)
4921/* Display the cursor on frame F, or clear it, according to ON. 4929/* Display the cursor on frame F, or clear it, according to ON.
4922 Don't change the cursor's position. */ 4930 Don't change the cursor's position. */
4923 4931
4932void
4924x_update_cursor (f, on) 4933x_update_cursor (f, on)
4925 struct frame *f; 4934 struct frame *f;
4926 int on; 4935 int on;
@@ -4943,6 +4952,7 @@ x_update_cursor (f, on)
4943/* Refresh bitmap kitchen sink icon for frame F 4952/* Refresh bitmap kitchen sink icon for frame F
4944 when we get an expose event for it. */ 4953 when we get an expose event for it. */
4945 4954
4955void
4946refreshicon (f) 4956refreshicon (f)
4947 struct frame *f; 4957 struct frame *f;
4948{ 4958{
@@ -5390,6 +5400,7 @@ x_new_fontset (f, fontsetname)
5390/* Calculate the absolute position in frame F 5400/* Calculate the absolute position in frame F
5391 from its current recorded position values and gravity. */ 5401 from its current recorded position values and gravity. */
5392 5402
5403void
5393x_calc_absolute_position (f) 5404x_calc_absolute_position (f)
5394 struct frame *f; 5405 struct frame *f;
5395{ 5406{
@@ -5482,6 +5493,7 @@ x_calc_absolute_position (f)
5482 position values). It is -1 when calling from x_set_frame_parameters, 5493 position values). It is -1 when calling from x_set_frame_parameters,
5483 which means, do adjust for borders but don't change the gravity. */ 5494 which means, do adjust for borders but don't change the gravity. */
5484 5495
5496void
5485x_set_offset (f, xoff, yoff, change_gravity) 5497x_set_offset (f, xoff, yoff, change_gravity)
5486 struct frame *f; 5498 struct frame *f;
5487 register int xoff, yoff; 5499 register int xoff, yoff;
@@ -5533,6 +5545,7 @@ x_set_offset (f, xoff, yoff, change_gravity)
5533 for this size change and subsequent size changes. 5545 for this size change and subsequent size changes.
5534 Otherwise we leave the window gravity unchanged. */ 5546 Otherwise we leave the window gravity unchanged. */
5535 5547
5548void
5536x_set_window_size (f, change_gravity, cols, rows) 5549x_set_window_size (f, change_gravity, cols, rows)
5537 struct frame *f; 5550 struct frame *f;
5538 int change_gravity; 5551 int change_gravity;
@@ -5659,6 +5672,7 @@ x_set_mouse_pixel_position (f, pix_x, pix_y)
5659 5672
5660/* focus shifting, raising and lowering. */ 5673/* focus shifting, raising and lowering. */
5661 5674
5675void
5662x_focus_on_frame (f) 5676x_focus_on_frame (f)
5663 struct frame *f; 5677 struct frame *f;
5664{ 5678{
@@ -5674,6 +5688,7 @@ x_focus_on_frame (f)
5674#endif /* ! 0 */ 5688#endif /* ! 0 */
5675} 5689}
5676 5690
5691void
5677x_unfocus_frame (f) 5692x_unfocus_frame (f)
5678 struct frame *f; 5693 struct frame *f;
5679{ 5694{
@@ -5687,6 +5702,7 @@ x_unfocus_frame (f)
5687 5702
5688/* Raise frame F. */ 5703/* Raise frame F. */
5689 5704
5705void
5690x_raise_frame (f) 5706x_raise_frame (f)
5691 struct frame *f; 5707 struct frame *f;
5692{ 5708{
@@ -5705,6 +5721,7 @@ x_raise_frame (f)
5705 5721
5706/* Lower frame F. */ 5722/* Lower frame F. */
5707 5723
5724void
5708x_lower_frame (f) 5725x_lower_frame (f)
5709 struct frame *f; 5726 struct frame *f;
5710{ 5727{
@@ -5741,6 +5758,7 @@ XTframe_raise_lower (f, raise_flag)
5741 but it will become visible later when the window manager 5758 but it will become visible later when the window manager
5742 finishes with it. */ 5759 finishes with it. */
5743 5760
5761void
5744x_make_frame_visible (f) 5762x_make_frame_visible (f)
5745 struct frame *f; 5763 struct frame *f;
5746{ 5764{
@@ -5869,6 +5887,7 @@ x_make_frame_visible (f)
5869 5887
5870/* Make the frame visible (mapped and not iconified). */ 5888/* Make the frame visible (mapped and not iconified). */
5871 5889
5890void
5872x_make_frame_invisible (f) 5891x_make_frame_invisible (f)
5873 struct frame *f; 5892 struct frame *f;
5874{ 5893{
@@ -5951,6 +5970,7 @@ x_make_frame_invisible (f)
5951 5970
5952/* Change window state from mapped to iconified. */ 5971/* Change window state from mapped to iconified. */
5953 5972
5973void
5954x_iconify_frame (f) 5974x_iconify_frame (f)
5955 struct frame *f; 5975 struct frame *f;
5956{ 5976{
@@ -6059,6 +6079,7 @@ x_iconify_frame (f)
6059 6079
6060/* Destroy the X window of frame F. */ 6080/* Destroy the X window of frame F. */
6061 6081
6082void
6062x_destroy_window (f) 6083x_destroy_window (f)
6063 struct frame *f; 6084 struct frame *f;
6064{ 6085{
@@ -6130,6 +6151,7 @@ x_destroy_window (f)
6130 If USER_POSITION is nonzero, we set the USPosition 6151 If USER_POSITION is nonzero, we set the USPosition
6131 flag (this is useful when FLAGS is 0). */ 6152 flag (this is useful when FLAGS is 0). */
6132 6153
6154void
6133x_wm_set_size_hint (f, flags, user_position) 6155x_wm_set_size_hint (f, flags, user_position)
6134 struct frame *f; 6156 struct frame *f;
6135 long flags; 6157 long flags;
@@ -6273,6 +6295,7 @@ x_wm_set_size_hint (f, flags, user_position)
6273} 6295}
6274 6296
6275/* Used for IconicState or NormalState */ 6297/* Used for IconicState or NormalState */
6298void
6276x_wm_set_window_state (f, state) 6299x_wm_set_window_state (f, state)
6277 struct frame *f; 6300 struct frame *f;
6278 int state; 6301 int state;
@@ -6292,6 +6315,7 @@ x_wm_set_window_state (f, state)
6292#endif /* not USE_X_TOOLKIT */ 6315#endif /* not USE_X_TOOLKIT */
6293} 6316}
6294 6317
6318void
6295x_wm_set_icon_pixmap (f, pixmap_id) 6319x_wm_set_icon_pixmap (f, pixmap_id)
6296 struct frame *f; 6320 struct frame *f;
6297 int pixmap_id; 6321 int pixmap_id;
@@ -6341,6 +6365,7 @@ x_wm_set_icon_pixmap (f, pixmap_id)
6341#endif /* not USE_X_TOOLKIT */ 6365#endif /* not USE_X_TOOLKIT */
6342} 6366}
6343 6367
6368void
6344x_wm_set_icon_position (f, icon_x, icon_y) 6369x_wm_set_icon_position (f, icon_x, icon_y)
6345 struct frame *f; 6370 struct frame *f;
6346 int icon_x, icon_y; 6371 int icon_x, icon_y;
@@ -7161,6 +7186,7 @@ x_delete_display (dpyinfo)
7161 7186
7162/* Set up use of X before we make the first connection. */ 7187/* Set up use of X before we make the first connection. */
7163 7188
7189void
7164x_initialize () 7190x_initialize ()
7165{ 7191{
7166 clear_frame_hook = XTclear_frame; 7192 clear_frame_hook = XTclear_frame;