changeset 109350:c11d07f3d731

merge trunk
author Kenichi Handa <handa@etlken>
date Thu, 08 Jul 2010 17:09:35 +0900
parents c82f3023b7f2 (current diff) 834e32d50d35 (diff)
children c8a969d13eda
files src/font.c src/font.h src/prefix-args.c
diffstat 260 files changed, 10042 insertions(+), 14690 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,27 @@
+2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* configure.in (PRE_EDIT_LDFLAGS, POST_EDIT_LDFLAGS): Remove.
+
+	* configure.in (UNEXEC_OBJ): Add comment about values for MSDOS
+	and MSWindows.
+
+2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* configure.in: Don't check for bcopy, bcmp, bzero.  Don't include
+	<strings.h> and don't define bcopy, bzero, BCMP in config.h.
+
+2010-07-07  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* configure.in (getenv): Remove K&R declaration.
+
+2010-07-02  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* configure.in: Remove define __P.
+
+2010-07-02  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* configure.in (--enable-use-lisp-union-type): New flag.
+
 2010-06-30  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	Fix CFLAGS for non-GCC compilers.
--- a/admin/CPP-DEFINES	Thu Jul 08 16:56:21 2010 +0900
+++ b/admin/CPP-DEFINES	Thu Jul 08 17:09:35 2010 +0900
@@ -79,8 +79,6 @@
 
 AIX
 AMPERSAND_FULL_NAME
-BCOPY_DOWNWARD_SAFE
-BCOPY_UPWARD_SAFE
 BITS_PER_EMACS_INT
 BITS_PER_LONG
 BITS_PER_CHAR
@@ -118,7 +116,6 @@
 FILE_SYSTEM_CASE
 FLOAT_CHECK_DOMAIN
 FSCALE
-GAP_USE_BCOPY
 GC_LISP_OBJECT_ALIGNMENT
 GC_MARK_SECONDARY_STACK
 GC_MARK_STACK
@@ -128,8 +125,6 @@
 GNU_LINUX
 GNU_MALLOC
 HAVE_AIX_SMT_EXP
-HAVE_BCMP
-HAVE_BCOPY
 HAVE_CBRT
 HAVE_CLOSEDIR
 HAVE_DUP2
@@ -191,7 +186,6 @@
 HAVE_SYS_TIME_H
 HAVE_TCATTR
 HAVE_TERMIOS_H
-HAVE_TEXT_START
 HAVE_TIMEVAL
 HAVE_TM_ZONE
 HAVE_TZSET
@@ -267,7 +261,6 @@
 TAB3
 TABDLY
 TERM
-TEXT_START
 THIS_IS_CONFIGURE
 TIME_WITH_SYS_TIME
 TIOCSIGSEND
@@ -319,10 +312,7 @@
 abort
 access
 alloca
-bcmp
-bcopy
 brk
-bzero
 calloc
 chdir
 chmod
--- a/admin/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/admin/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,9 @@
+2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
+	(GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
+	Remove.
+
 2010-06-12  Eli Zaretskii  <eliz@gnu.org>
 
 	* unidata/bidimirror.awk: New file.
--- a/configure	Thu Jul 08 16:56:21 2010 +0900
+++ b/configure	Thu Jul 08 17:09:35 2010 +0900
@@ -600,8 +600,6 @@
 MOUSE_SUPPORT
 LIB_GCC
 LINKER
-POST_EDIT_LDFLAGS
-PRE_EDIT_LDFLAGS
 LD_SWITCH_SYSTEM_TEMACS
 POST_ALLOC_OBJ
 PRE_ALLOC_OBJ
@@ -825,6 +823,7 @@
 enable_maintainer_mode
 enable_locallisppath
 enable_checking
+enable_use_lisp_union_type
 enable_profiling
 enable_autodepend
 enable_largefile
@@ -1477,6 +1476,10 @@
                           only specific categories of checks. Categories are:
                           all,yes,no. Flags are: stringbytes, stringoverrun,
                           stringfreelist, xmallocoverrun, conslist
+  --enable-use-lisp-union-type
+                          use a union for the Lisp_Object data type. This is
+                          only useful for development for catching certain
+                          types of bugs.
   --enable-profiling      build emacs with profiling support. This might not
                           work on all platforms
   --enable-autodepend     automatically generate dependencies to .h-files.
@@ -2978,6 +2981,17 @@
 
 fi
 
+# Check whether --enable-use-lisp-union-type was given.
+if test "${enable_use_lisp_union_type+set}" = set; then :
+  enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then
+
+$as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h
+
+fi
+fi
+
+
+
 # Check whether --enable-profiling was given.
 if test "${enable_profiling+set}" = set; then :
   enableval=$enable_profiling; ac_enable_profiling="${enableval}"
@@ -4290,7 +4304,7 @@
   C_OPTIMIZE_SWITCH=-O2
   test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
 else
-    C_OPTIMIZE_SWITCH=-O
+  C_OPTIMIZE_SWITCH=-O
   test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
 fi
 
@@ -5468,6 +5482,8 @@
 
 UNEXEC_OBJ=unexelf.o
 case "$opsys" in
+  # MSDOS uses unexec.o
+  # MSWindows uses unexw32.o
   aix4-2)
    UNEXEC_OBJ=unexaix.o
    ;;
@@ -11152,12 +11168,12 @@
 
 for ac_func in gethostname getdomainname dup2 \
 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
-random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
+random lrand48 logb frexp fmod rint cbrt ftime setsid \
 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
 utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
 sendto recvfrom getsockopt setsockopt getsockname getpeername \
-gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
+gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
 cfmakeraw cfsetspeed isnan copysign
 do :
@@ -14145,8 +14161,6 @@
 esac
 
 
-PRE_EDIT_LDFLAGS=
-POST_EDIT_LDFLAGS=
 if test "x$ORDINARY_LINK" = "xyes"; then
 
   LINKER="\$(CC)"
@@ -14167,17 +14181,7 @@
   ## searching for libraries in its internal directories, so we have to
   ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
   LINKER="\$(CC) -nostdlib"
-  ## GCC passes any argument prefixed with -Xlinker directly to the linker.
-  ## See prefix-args.c for an explanation of why we do not do this with the
-  ## shell''s ``for'' construct.  Note that sane people do not have '.' in
-  ## their paths, so we must use ./prefix-args.
-  ## TODO either make prefix-args check ORDINARY_LINK internally,
-  ## or remove it altogether (bug#6184), removing the need for this hack.
-  PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker'
-  POST_EDIT_LDFLAGS='`'
-fi
-
-
+fi
 
 test "x$LINKER" = "x" && LINKER=ld
 ## FIXME? What setting of EDIT_LDFLAGS should this have?
--- a/configure.in	Thu Jul 08 16:56:21 2010 +0900
+++ b/configure.in	Thu Jul 08 17:09:35 2010 +0900
@@ -305,6 +305,16 @@
 [Define this to check for errors in cons list.])
 fi
 
+AC_ARG_ENABLE(use-lisp-union-type,
+[AS_HELP_STRING([--enable-use-lisp-union-type],
+                [use a union for the Lisp_Object data type.
+		This is only useful for development for catching certain types of bugs.])],
+if test "${enableval}" != "no"; then
+   AC_DEFINE(USE_LISP_UNION_TYPE, 1,
+   [Define this to use a lisp union for the Lisp_Object data type.])
+fi)
+
+
 AC_ARG_ENABLE(profiling,
 [AS_HELP_STRING([--enable-profiling],
 		[build emacs with profiling support.
@@ -880,6 +890,8 @@
 
 UNEXEC_OBJ=unexelf.o
 case "$opsys" in
+  # MSDOS uses unexec.o
+  # MSWindows uses unexw32.o
   aix4-2)
    UNEXEC_OBJ=unexaix.o
    ;;
@@ -2605,12 +2617,12 @@
 
 AC_CHECK_FUNCS(gethostname getdomainname dup2 \
 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
-random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
+random lrand48 logb frexp fmod rint cbrt ftime setsid \
 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
 utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
 sendto recvfrom getsockopt setsockopt getsockname getpeername \
-gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
+gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
 cfmakeraw cfsetspeed isnan copysign)
 
@@ -3348,8 +3360,6 @@
 esac
 
 
-PRE_EDIT_LDFLAGS=
-POST_EDIT_LDFLAGS=
 if test "x$ORDINARY_LINK" = "xyes"; then
 
   LINKER="\$(CC)"
@@ -3368,17 +3378,7 @@
   ## searching for libraries in its internal directories, so we have to
   ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
   LINKER="\$(CC) -nostdlib"
-  ## GCC passes any argument prefixed with -Xlinker directly to the linker.
-  ## See prefix-args.c for an explanation of why we do not do this with the
-  ## shell''s ``for'' construct.  Note that sane people do not have '.' in
-  ## their paths, so we must use ./prefix-args.
-  ## TODO either make prefix-args check ORDINARY_LINK internally,
-  ## or remove it altogether (bug#6184), removing the need for this hack.
-  PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker'
-  POST_EDIT_LDFLAGS='`'
 fi
-AC_SUBST(PRE_EDIT_LDFLAGS)
-AC_SUBST(POST_EDIT_LDFLAGS)
 
 test "x$LINKER" = "x" && LINKER=ld
 ## FIXME? What setting of EDIT_LDFLAGS should this have?
@@ -3530,11 +3530,6 @@
 
 #define my_strftime nstrftime	/* for strftime.c */
 
-/* Some of the files of Emacs which are intended for use with other
-   programs assume that if you have a config.h file, you must declare
-   the type of getenv.  */
-extern char *getenv ();
-
 /* These default definitions are good for almost all machines.
    The exceptions override them in m/MACHINE.h.  */
 
@@ -3564,23 +3559,11 @@
 /* Define if the compiler supports function prototypes.  It may do so but
    not define __STDC__ (e.g. DEC C by default) or may define it as zero.  */
 #undef PROTOTYPES
-/* For mktime.c:  */
-#ifndef __P
-# if defined PROTOTYPES
-#  define __P(args) args
-# else
-#  define __P(args) ()
-# endif  /* GCC.  */
-#endif /* __P */
 
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
 
-#ifdef HAVE_STRINGS_H
-#include <strings.h>  /* May be needed for bcopy & al.  */
-#endif
-
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
@@ -3622,16 +3605,6 @@
 #  endif
 #endif
 
-#ifndef HAVE_BCOPY
-#define bcopy(a,b,s) memcpy (b,a,s)
-#endif
-#ifndef HAVE_BZERO
-#define bzero(a,s) memset (a,0,s)
-#endif
-#ifndef HAVE_BCMP
-#define BCMP memcmp
-#endif
-
 #endif /* EMACS_CONFIG_H */
 
 /*
--- a/doc/misc/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/doc/misc/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,8 @@
+2010-07-04  Michael Albinus  <michael.albinus@gmx.de>
+
+	* dbus.texi (Receiving Method Calls): Add optional argument
+	EMITS-SIGNAL to `dbus-register-property'.
+
 2010-06-10  Glenn Morris  <rgm@gnu.org>
 
 	* idlwave.texi (Load-Path Shadows):
--- a/doc/misc/dbus.texi	Thu Jul 08 16:56:21 2010 +0900
+++ b/doc/misc/dbus.texi	Thu Jul 08 17:09:35 2010 +0900
@@ -1359,7 +1359,7 @@
 @end example
 @end defun
 
-@defun dbus-register-property bus service path interface property access value
+@defun dbus-register-property bus service path interface property access value &optional emits-signal
 With this function, an application declares a @var{property} on the D-Bus
 @var{bus}.
 
@@ -1387,7 +1387,11 @@
 
 The interface @samp{org.freedesktop.DBus.Properties} is added to
 @var{path}, including a default handler for the @samp{Get},
-@samp{GetAll} and @samp{Set} methods of this interface.  Example:
+@samp{GetAll} and @samp{Set} methods of this interface.  When
+@var{emits-signal} is non-nil, the signal @samp{PropertiesChanged} is
+sent when the property is changed by @code{dbus-set-property}.
+
+@noindent Example:
 
 @lisp
 (dbus-register-property
@@ -1399,7 +1403,7 @@
 
 (dbus-register-property
   :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"
-  "org.freedesktop.TextEditor" "version" :readwrite emacs-version)
+  "org.freedesktop.TextEditor" "version" :readwrite emacs-version t)
 
 @result{} ((:session "org.freedesktop.TextEditor" "version")
     ("org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"))
--- a/etc/NEWS	Thu Jul 08 16:56:21 2010 +0900
+++ b/etc/NEWS	Thu Jul 08 17:09:35 2010 +0900
@@ -47,6 +47,10 @@
 also depend on Gtk+.  You can disable them with --without-rsvg and
 --without-gconf.
 
+** There is a new configure option --enable-use-lisp-union-type.
+This is only useful for Emacs developers to debug certain types of bugs.
+These is not a new feature; only the configure flag is new.
+
 
 * Startup Changes in Emacs 24.1
 
@@ -309,6 +313,11 @@
 If the alist entries are added, they override the value of
 `menu-bar-mode'/`tool-bar-mode'.
 
+** Regions created by mouse dragging are now normal active regions,
+similar to the ones created by shift-selection.  In previous Emacs
+versions, these regions were delineated by `mouse-drag-overlay', which
+has now been removed.
+
 
 * Lisp changes in Emacs 24.1
 
--- a/lib-src/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,90 @@
+2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* update-game-score.c (P_): Remove macro.
+	* ebrowse.c: Remove include guards.
+	(P_): Remove macro.
+
+2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
+	memcpy, memmove, memset.
+	* pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
+
+2010-07-06  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* movemail.c: Add MAIL_USE_POP around prototypes.
+	Include <string.h> if HAVE_STRING_H.
+	(strerror): Only declare if !HAVE_STRERROR.
+	(fatal): Make static.
+	(error): Likewise.
+	(pfatal_with_name): Likewise.
+	(pfatal_and_delete). Likewise.
+	(concat): Likewise.
+	(xmalloc): Likewise.
+	(popmail): Likewise.
+	(pop_retr): Likewise.
+	(mbx_write): Likewise.
+	(mbx_delimit_begin): Likewise.
+	(mbx_delimit_end): Likewise.
+
+2010-07-04  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* fakemail.c (action): Convert function definitions to standard C.
+	(add_a_stream):
+	* test-distrib.c (cool_read):
+	(main): Likewise.
+
+2010-07-03  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sorted-doc.c (cmpdoc): Fix signature.
+	(qsort_compare): Delete.
+	(main): Remove cast.
+
+2010-07-03  Juanma Barranquero  <lekktu@gmail.com>
+
+	* ebrowse.c (match_qualified_namespace_alias): Check for null pointer.
+
+2010-07-03  Juanma Barranquero  <lekktu@gmail.com>
+
+	Fix prototype warnings.
+
+	* ebrowse.c (match_qualified_namespace_alias):
+	Pass sym* to find_namespace, not link*.
+
+	* emacsclient.c (send_to_emacs, quote_argument): Arg s is HSOCKET.
+
+	* sorted-doc.c (qsort_compare): New typedef.
+	(main): Use it to cast cmpdoc.
+
+2010-07-03  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* update-game-score.c: Convert function definitions to standard C.
+	* sorted-doc.c:
+	* profile.c:
+	* pop.c:
+	* movemail.c:
+	* make-docfile.c:
+	* hexl.c:
+	* fakemail.c:
+	* etags.c:
+	* ebrowse.c:
+	* digest-doc.c:
+	* b2m.c: Likewise.
+
+2010-07-02  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* make-docfile.c (xmalloc, xrealloc, concat, readline, fatal):
+	* b2m.c (scan_file, scan_lisp_file, scan_c_file): Convert to
+	standard C prototypes.
+
+2010-07-02  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* ebrowse.c: Remove P_ and __P.
+	* etags.c:
+	* movemail.c:
+	* pop.c:
+	* update-game-score.c: Likewise.
+
 2010-06-24  Juanma Barranquero  <lekktu@gmail.com>
 
 	* movemail.c (error): Avoid warning when there are no args.
--- a/lib-src/b2m.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/b2m.c	Thu Jul 08 17:09:35 2010 +0900
@@ -64,12 +64,13 @@
   char *buffer;
 };
 
-extern char *strtok();
+extern char *strtok(char *, const char *);
 
-long *xmalloc (), *xrealloc ();
-char *concat ();
-long readline ();
-void fatal ();
+long *xmalloc (unsigned int size);
+long *xrealloc (char *ptr, unsigned int size);
+char *concat (char *s1, char *s2, char *s3);
+long readline (struct linebuffer *linebuffer, register FILE *stream);
+void fatal (char *message);
 
 /*
  * xnew -- allocate storage.  SYNOPSIS: Type *xnew (int n, Type);
@@ -90,9 +91,7 @@
 extern int optind;
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   logical labels_saved, printing, header, first, last_was_blank_line;
   time_t ltoday;
@@ -219,8 +218,7 @@
  * concatenate those of s1, s2, s3.
  */
 char *
-concat (s1, s2, s3)
-     char *s1, *s2, *s3;
+concat (char *s1, char *s2, char *s3)
 {
   int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
   char *result = xnew (len1 + len2 + len3 + 1, char);
@@ -239,9 +237,7 @@
  * which is the length of the line including the newline, if any.
  */
 long
-readline (linebuffer, stream)
-     struct linebuffer *linebuffer;
-     register FILE *stream;
+readline (struct linebuffer *linebuffer, register FILE *stream)
 {
   char *buffer = linebuffer->buffer;
   register char *p = linebuffer->buffer;
@@ -291,8 +287,7 @@
  * Like malloc but get fatal error if memory is exhausted.
  */
 long *
-xmalloc (size)
-     unsigned int size;
+xmalloc (unsigned int size)
 {
   long *result = (long *) malloc (size);
   if (result == NULL)
@@ -301,9 +296,7 @@
 }
 
 long *
-xrealloc (ptr, size)
-     char *ptr;
-     unsigned int size;
+xrealloc (char *ptr, unsigned int size)
 {
   long *result = (long *) realloc (ptr, size);
   if (result == NULL)
@@ -312,8 +305,7 @@
 }
 
 void
-fatal (message)
-     char *message;
+fatal (char *message)
 {
   fprintf (stderr, "%s: %s\n", progname, message);
   exit (EXIT_FAILURE);
--- a/lib-src/digest-doc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/digest-doc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -31,7 +31,7 @@
 #endif
 
 int
-main ()
+main (void)
 {
   register int ch;
   register int notfirst = 0;
--- a/lib-src/ebrowse.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/ebrowse.c	Thu Jul 08 17:09:35 2010 +0900
@@ -20,20 +20,14 @@
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
 #include <stdio.h>
 
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
-
 #include <ctype.h>
 #include <assert.h>
 #include "getopt.h"
@@ -45,12 +39,6 @@
 
 /* Conditionalize function prototypes.  */
 
-#ifdef PROTOTYPES		/* From config.h.  */
-#define P_(x) x
-#else
-#define P_(x) ()
-#endif
-
 /* Value is non-zero if strings X and Y compare equal.  */
 
 #define streq(X, Y) (*(X) == *(Y) && strcmp ((X) + 1, (Y) + 1) == 0)
@@ -479,62 +467,62 @@
 
 /* Function prototypes.  */
 
-int yylex P_ ((void));
-void yyparse P_ ((void));
-void re_init_parser P_ ((void));
-char *token_string P_ ((int));
-char *matching_regexp P_ ((void));
-void init_sym P_ ((void));
-struct sym *add_sym P_ ((char *, struct sym *));
-void add_link P_ ((struct sym *, struct sym *));
-void add_member_defn P_ ((struct sym *, char *, char *,
-			  int, unsigned, int, int, int));
-void add_member_decl P_ ((struct sym *, char *, char *, int,
-			  unsigned, int, int, int, int));
-void dump_roots P_ ((FILE *));
-void *xmalloc P_ ((int));
-void xfree P_ ((void *));
-void add_global_defn P_ ((char *, char *, int, unsigned, int, int, int));
-void add_global_decl P_ ((char *, char *, int, unsigned, int, int, int));
-void add_define P_ ((char *, char *, int));
-void mark_inherited_virtual P_ ((void));
-void leave_namespace P_ ((void));
-void enter_namespace P_ ((char *));
-void register_namespace_alias P_ ((char *, struct link *));
-void insert_keyword P_ ((char *, int));
-void re_init_scanner P_ ((void));
-void init_scanner P_ ((void));
-void usage P_ ((int));
-void version P_ ((void));
-void process_file P_ ((char *));
-void add_search_path P_ ((char *));
-FILE *open_file P_ ((char *));
-int process_pp_line P_ ((void));
-int dump_members P_ ((FILE *, struct member *));
-void dump_sym P_ ((FILE *, struct sym *));
-int dump_tree P_ ((FILE *, struct sym *));
-struct member *find_member P_ ((struct sym *, char *, int, int, unsigned));
-struct member *add_member P_ ((struct sym *, char *, int, int, unsigned));
-void mark_virtual P_ ((struct sym *));
-void mark_virtual P_ ((struct sym *));
-struct sym *make_namespace P_ ((char *, struct sym *));
-char *sym_scope P_ ((struct sym *));
-char *sym_scope_1 P_ ((struct sym *));
-int skip_to P_ ((int));
-void skip_matching P_ ((void));
-void member P_ ((struct sym *, int));
-void class_body P_ ((struct sym *, int));
-void class_definition P_ ((struct sym *, int, int, int));
-void declaration P_ ((int));
-unsigned parm_list P_ ((int *));
-char *operator_name P_ ((int *));
-struct sym *parse_classname P_ ((void));
-struct sym *parse_qualified_ident_or_type P_ ((char **));
-void parse_qualified_param_ident_or_type P_ ((char **));
-int globals P_ ((int));
-void yyerror P_ ((char *, char *));
-void usage P_ ((int)) NO_RETURN;
-void version P_ (()) NO_RETURN;
+int yylex (void);
+void yyparse (void);
+void re_init_parser (void);
+char *token_string (int);
+char *matching_regexp (void);
+void init_sym (void);
+struct sym *add_sym (char *, struct sym *);
+void add_link (struct sym *, struct sym *);
+void add_member_defn (struct sym *, char *, char *,
+                      int, unsigned, int, int, int);
+void add_member_decl (struct sym *, char *, char *, int,
+                      unsigned, int, int, int, int);
+void dump_roots (FILE *);
+void *xmalloc (int);
+void xfree (void *);
+void add_global_defn (char *, char *, int, unsigned, int, int, int);
+void add_global_decl (char *, char *, int, unsigned, int, int, int);
+void add_define (char *, char *, int);
+void mark_inherited_virtual (void);
+void leave_namespace (void);
+void enter_namespace (char *);
+void register_namespace_alias (char *, struct link *);
+void insert_keyword (char *, int);
+void re_init_scanner (void);
+void init_scanner (void);
+void usage (int);
+void version (void);
+void process_file (char *);
+void add_search_path (char *);
+FILE *open_file (char *);
+int process_pp_line (void);
+int dump_members (FILE *, struct member *);
+void dump_sym (FILE *, struct sym *);
+int dump_tree (FILE *, struct sym *);
+struct member *find_member (struct sym *, char *, int, int, unsigned);
+struct member *add_member (struct sym *, char *, int, int, unsigned);
+void mark_virtual (struct sym *);
+void mark_virtual (struct sym *);
+struct sym *make_namespace (char *, struct sym *);
+char *sym_scope (struct sym *);
+char *sym_scope_1 (struct sym *);
+int skip_to (int);
+void skip_matching (void);
+void member (struct sym *, int);
+void class_body (struct sym *, int);
+void class_definition (struct sym *, int, int, int);
+void declaration (int);
+unsigned parm_list (int *);
+char *operator_name (int *);
+struct sym *parse_classname (void);
+struct sym *parse_qualified_ident_or_type (char **);
+void parse_qualified_param_ident_or_type (char **);
+int globals (int);
+void yyerror (char *, char *);
+void usage (int) NO_RETURN;
+void version (void) NO_RETURN;
 
 
 
@@ -546,8 +534,7 @@
    name and line number.  */
 
 void
-yyerror (format, s)
-     char *format, *s;
+yyerror (char *format, char *s)
 {
   fprintf (stderr, "%s:%d: ", filename, yyline);
   fprintf (stderr, format, s);
@@ -559,8 +546,7 @@
    available.  */
 
 void *
-xmalloc (nbytes)
-     int nbytes;
+xmalloc (int nbytes)
 {
   void *p = malloc (nbytes);
   if (p == NULL)
@@ -575,9 +561,7 @@
 /* Like realloc but print an error and exit if out of memory.  */
 
 void *
-xrealloc (p, sz)
-     void *p;
-     int sz;
+xrealloc (void *p, int sz)
 {
   p = realloc (p, sz);
   if (p == NULL)
@@ -593,8 +577,7 @@
    available..  If S is null, return null.  */
 
 char *
-xstrdup (s)
-     char *s;
+xstrdup (char *s)
 {
   if (s)
     s = strcpy (xmalloc (strlen (s) + 1), s);
@@ -611,7 +594,7 @@
    special symbol for globals (`*Globals*').  */
 
 void
-init_sym ()
+init_sym (void)
 {
   global_symbols = add_sym (GLOBALS_NAME, NULL);
 }
@@ -625,9 +608,7 @@
    create a new symbol and set it to default values.  */
 
 struct sym *
-add_sym (name, nested_in_class)
-     char *name;
-     struct sym *nested_in_class;
+add_sym (char *name, struct sym *nested_in_class)
 {
   struct sym *sym;
   unsigned h;
@@ -654,7 +635,7 @@
 	}
 
       sym = (struct sym *) xmalloc (sizeof *sym + strlen (name));
-      bzero (sym, sizeof *sym);
+      memset (sym, 0, sizeof *sym);
       strcpy (sym->name, name);
       sym->namesp = scope;
       sym->next = class_table[h];
@@ -668,8 +649,7 @@
 /* Add links between superclass SUPER and subclass SUB.  */
 
 void
-add_link (super, sub)
-     struct sym *super, *sub;
+add_link (struct sym *super, struct sym *sub)
 {
   struct link *lnk, *lnk2, *p, *prev;
 
@@ -709,11 +689,7 @@
    found or null if not found.  */
 
 struct member *
-find_member (cls, name, var, sc, hash)
-     struct sym *cls;
-     char *name;
-     int var, sc;
-     unsigned hash;
+find_member (struct sym *cls, char *name, int var, int sc, unsigned int hash)
 {
   struct member **list;
   struct member *p;
@@ -763,16 +739,7 @@
    F_* defines).  */
 
 void
-add_member_decl (cls, name, regexp, pos, hash, var, sc, vis, flags)
-     struct sym *cls;
-     char *name;
-     char *regexp;
-     int pos;
-     unsigned hash;
-     int var;
-     int sc;
-     int vis;
-     int flags;
+add_member_decl (struct sym *cls, char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int vis, int flags)
 {
   struct member *m;
 
@@ -820,15 +787,7 @@
    F_* defines).  */
 
 void
-add_member_defn (cls, name, regexp, pos, hash, var, sc, flags)
-     struct sym *cls;
-     char *name;
-     char *regexp;
-     int pos;
-     unsigned hash;
-     int var;
-     int sc;
-     int flags;
+add_member_defn (struct sym *cls, char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
 {
   struct member *m;
 
@@ -870,9 +829,7 @@
    if it is non-null.  POS is the position in the file.  */
 
 void
-add_define (name, regexp, pos)
-     char *name, *regexp;
-     int pos;
+add_define (char *name, char *regexp, int pos)
 {
   add_global_defn (name, regexp, pos, 0, 1, SC_FRIEND, F_DEFINE);
   add_global_decl (name, regexp, pos, 0, 1, SC_FRIEND, F_DEFINE);
@@ -890,13 +847,7 @@
    F_* defines).  */
 
 void
-add_global_defn (name, regexp, pos, hash, var, sc, flags)
-     char *name, *regexp;
-     int pos;
-     unsigned hash;
-     int var;
-     int sc;
-     int flags;
+add_global_defn (char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
 {
   int i;
   struct sym *sym;
@@ -927,13 +878,7 @@
    F_* defines).  */
 
 void
-add_global_decl (name, regexp, pos, hash, var, sc, flags)
-     char *name, *regexp;
-     int pos;
-     unsigned hash;
-     int var;
-     int sc;
-     int flags;
+add_global_decl (char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
 {
   /* Add declaration only if not already declared.  Header files must
      be processed before source files for this to have the right effect.
@@ -972,12 +917,7 @@
    Value is a pointer to the member's structure.  */
 
 struct member *
-add_member (cls, name, var, sc, hash)
-     struct sym *cls;
-     char *name;
-     int var;
-     int sc;
-     unsigned hash;
+add_member (struct sym *cls, char *name, int var, int sc, unsigned int hash)
 {
   struct member *m = (struct member *) xmalloc (sizeof *m + strlen (name));
   struct member **list;
@@ -1048,8 +988,7 @@
    in base classes.  */
 
 void
-mark_virtual (r)
-     struct sym *r;
+mark_virtual (struct sym *r)
 {
   struct link *p;
   struct member *m, *m2;
@@ -1073,7 +1012,7 @@
    are virtual because of a virtual declaration in a base class.  */
 
 void
-mark_inherited_virtual ()
+mark_inherited_virtual (void)
 {
   struct sym *r;
   int i;
@@ -1088,12 +1027,10 @@
 /* Create and return a symbol for a namespace with name NAME.  */
 
 struct sym *
-make_namespace (name, context)
-     char *name;
-     struct sym *context;
+make_namespace (char *name, struct sym *context)
 {
   struct sym *s = (struct sym *) xmalloc (sizeof *s + strlen (name));
-  bzero (s, sizeof *s);
+  memset (s, 0, sizeof *s);
   strcpy (s->name, name);
   s->next = all_namespaces;
   s->namesp = context;
@@ -1105,9 +1042,7 @@
 /* Find the symbol for namespace NAME.  If not found, retrun NULL */
 
 struct sym *
-check_namespace (name, context)
-     char *name;
-     struct sym *context;
+check_namespace (char *name, struct sym *context)
 {
   struct sym *p = NULL;
 
@@ -1115,18 +1050,16 @@
     {
       if (streq (p->name, name) && (p->namesp == context))
 	    break;
-	}
+    }
 
   return p;
-    }
+}
 
 /* Find the symbol for namespace NAME.  If not found, add a new symbol
    for NAME to all_namespaces.  */
 
 struct sym *
-find_namespace (name, context)
-     char *name;
-     struct sym *context;
+find_namespace (char *name, struct sym *context)
 {
   struct sym *p = check_namespace (name, context);
 
@@ -1140,8 +1073,7 @@
 /* Find namespace alias with name NAME. If not found return NULL. */
 
 struct link *
-check_namespace_alias (name)
-    char *name;
+check_namespace_alias (char *name)
 {
   struct link *p = NULL;
   struct alias *al;
@@ -1165,9 +1097,7 @@
 /* Register the name NEW_NAME as an alias for namespace list OLD_NAME.  */
 
 void
-register_namespace_alias (new_name, old_name)
-     char *new_name;
-     struct link *old_name;
+register_namespace_alias (char *new_name, struct link *old_name)
 {
   unsigned h;
   char *s;
@@ -1195,8 +1125,7 @@
 /* Enter namespace with name NAME.  */
 
 void
-enter_namespace (name)
-     char *name;
+enter_namespace (char *name)
 {
   struct sym *p = find_namespace (name, current_namespace);
 
@@ -1217,7 +1146,7 @@
 /* Leave the current namespace.  */
 
 void
-leave_namespace ()
+leave_namespace (void)
 {
   assert (namespace_sp > 0);
   current_namespace = namespace_stack[--namespace_sp];
@@ -1259,8 +1188,7 @@
 /* Make sure scope_buffer has enough room to add LEN chars to it.  */
 
 void
-ensure_scope_buffer_room (len)
-     int len;
+ensure_scope_buffer_room (int len)
 {
   if (scope_buffer_len + len >= scope_buffer_size)
     {
@@ -1276,8 +1204,7 @@
    scope name constructed.  */
 
 char *
-sym_scope_1 (p)
-     struct sym *p;
+sym_scope_1 (struct sym *p)
 {
   int len;
 
@@ -1311,8 +1238,7 @@
    as it would appear in a C*+ source file.  */
 
 char *
-sym_scope (p)
-     struct sym *p;
+sym_scope (struct sym *p)
 {
   if (!scope_buffer)
     {
@@ -1334,9 +1260,7 @@
    list.  */
 
 int
-dump_members (fp, m)
-     FILE *fp;
-     struct member *m;
+dump_members (FILE *fp, struct member *m)
 {
   int n;
 
@@ -1369,9 +1293,7 @@
 /* Dump class ROOT to stream FP.  */
 
 void
-dump_sym (fp, root)
-     FILE *fp;
-     struct sym *root;
+dump_sym (FILE *fp, struct sym *root)
 {
   fputs (CLASS_STRUCT, fp);
   PUTSTR (root->name, fp);
@@ -1397,9 +1319,7 @@
    number of classes written.  */
 
 int
-dump_tree (fp, root)
-     FILE *fp;
-     struct sym *root;
+dump_tree (FILE *fp, struct sym *root)
 {
   struct link *lk;
   unsigned n = 0;
@@ -1446,8 +1366,7 @@
 /* Dump the entire class tree to file FP.  */
 
 void
-dump_roots (fp)
-     FILE *fp;
+dump_roots (FILE *fp)
 {
   int i, n = 0;
   struct sym *r;
@@ -1521,7 +1440,7 @@
    input buffer not consumed.  */
 
 int
-process_pp_line ()
+process_pp_line (void)
 {
   int in_comment = 0, in_string = 0;
   int c;
@@ -1592,7 +1511,7 @@
 /* Value is the next token from the input buffer.  */
 
 int
-yylex ()
+yylex (void)
 {
   int c;
   char end_char;
@@ -2009,7 +1928,7 @@
    shorter than min_regexp.  */
 
 char *
-matching_regexp ()
+matching_regexp (void)
 {
   char *p;
   char *s;
@@ -2060,8 +1979,7 @@
 /* Return a printable representation of token T.  */
 
 char *
-token_string (t)
-     int t;
+token_string (int t)
 {
   static char b[3];
 
@@ -2178,7 +2096,7 @@
 /* Reinitialize the scanner for a new input file.  */
 
 void
-re_init_scanner ()
+re_init_scanner (void)
 {
   in = inbuffer;
   yyline = 1;
@@ -2196,9 +2114,7 @@
    table.  */
 
 void
-insert_keyword (name, tk)
-     char *name;
-     int tk;
+insert_keyword (char *name, int tk)
 {
   char *s;
   unsigned h = 0;
@@ -2219,7 +2135,7 @@
    character class vectors and fills the keyword hash table.  */
 
 void
-init_scanner ()
+init_scanner (void)
 {
   int i;
 
@@ -2363,8 +2279,7 @@
    the current lookahead token after skipping.  */
 
 int
-skip_to (token)
-     int token;
+skip_to (int token)
 {
   while (!LOOKING_AT2 (YYEOF, token))
     MATCH ();
@@ -2375,7 +2290,7 @@
    angle brackets, curly brackets) matching the current lookahead.  */
 
 void
-skip_matching ()
+skip_matching (void)
 {
   int open, close, n;
 
@@ -2418,7 +2333,7 @@
 }
 
 void
-skip_initializer ()
+skip_initializer (void)
 {
   for (;;)
     {
@@ -2445,7 +2360,7 @@
 /* Build qualified namespace alias (A::B::c) and return it. */
 
 struct link *
-match_qualified_namespace_alias ()
+match_qualified_namespace_alias (void)
 {
   struct link *head = NULL;
   struct link *cur = NULL;
@@ -2458,7 +2373,7 @@
         {
         case IDENT:
           tmp = (struct link *) xmalloc (sizeof *cur);
-          tmp->sym = find_namespace (yytext, cur);
+          tmp->sym = find_namespace (yytext, cur ? cur->sym : NULL);
           tmp->next = NULL;
           if (head)
             {
@@ -2482,7 +2397,7 @@
 /* Re-initialize the parser by resetting the lookahead token.  */
 
 void
-re_init_parser ()
+re_init_parser (void)
 {
   tk = -1;
 }
@@ -2495,8 +2410,7 @@
    distinguish between overloaded functions.  */
 
 unsigned
-parm_list (flags)
-     int *flags;
+parm_list (int *flags)
 {
   unsigned hash = 0;
   int type_seen = 0;
@@ -2609,7 +2523,7 @@
 /* Print position info to stdout.  */
 
 void
-print_info ()
+print_info (void)
 {
   if (info_position >= 0 && BUFFER_POS () <= info_position)
     if (info_cls)
@@ -2624,9 +2538,7 @@
    public).  */
 
 void
-member (cls, vis)
-     struct sym *cls;
-     int vis;
+member (struct sym *cls, int vis)
 {
   char *id = NULL;
   int sc = SC_MEMBER;
@@ -2835,9 +2747,7 @@
    union, class).  */
 
 void
-class_body (cls, tag)
-     struct sym *cls;
-     int tag;
+class_body (struct sym *cls, int tag)
 {
   int vis = tag == CLASS ? PRIVATE : PUBLIC;
   int temp;
@@ -2898,7 +2808,7 @@
    symbol for that class.  */
 
 struct sym *
-parse_classname ()
+parse_classname (void)
 {
   struct sym *last_class = NULL;
 
@@ -2928,8 +2838,7 @@
    a static buffer holding the constructed operator name string.  */
 
 char *
-operator_name (sc)
-     int *sc;
+operator_name (int *sc)
 {
   static int id_size = 0;
   static char *id = NULL;
@@ -3019,8 +2928,7 @@
    symbol structure for the ident.  */
 
 struct sym *
-parse_qualified_ident_or_type (last_id)
-     char **last_id;
+parse_qualified_ident_or_type (char **last_id)
 {
   struct sym *cls = NULL;
   char *id = NULL;
@@ -3085,8 +2993,7 @@
    symbol structure for the ident.  */
 
 void
-parse_qualified_param_ident_or_type (last_id)
-     char **last_id;
+parse_qualified_param_ident_or_type (char **last_id)
 {
   struct sym *cls = NULL;
   static char *id = NULL;
@@ -3128,11 +3035,7 @@
    Current lookahead is the class name.  */
 
 void
-class_definition (containing, tag, flags, nested)
-     struct sym *containing;
-     int tag;
-     int flags;
-     int nested;
+class_definition (struct sym *containing, int tag, int flags, int nested)
 {
   struct sym *current;
   struct sym *base_class;
@@ -3229,10 +3132,7 @@
    information about the member (see the F_* defines).  */
 
 void
-add_declarator (cls, id, flags, sc)
-     struct sym **cls;
-     char **id;
-     int flags, sc;
+add_declarator (struct sym **cls, char **id, int flags, int sc)
 {
   if (LOOKING_AT2 (';', ','))
     {
@@ -3275,8 +3175,7 @@
 /* Parse a declaration.  */
 
 void
-declaration (flags)
-     int flags;
+declaration (int flags)
 {
   char *id = NULL;
   struct sym *cls = NULL;
@@ -3430,8 +3329,7 @@
    otherwise.  */
 
 int
-globals (start_flags)
-     int start_flags;
+globals (int start_flags)
 {
   int anonymous;
   int class_tk;
@@ -3549,7 +3447,7 @@
 /* Parse the current input file.  */
 
 void
-yyparse ()
+yyparse (void)
 {
   while (globals (0) == 0)
     MATCH_IF ('}');
@@ -3565,8 +3463,7 @@
    input files.  */
 
 void
-add_search_path (path_list)
-     char *path_list;
+add_search_path (char *path_list)
 {
   while (*path_list)
     {
@@ -3601,8 +3498,7 @@
    unchanged file name.  */
 
 FILE *
-open_file (file)
-     char *file;
+open_file (char *file)
 {
   FILE *fp = NULL;
   static char *buffer;
@@ -3661,8 +3557,7 @@
 "
 
 void
-usage (error)
-     int error;
+usage (int error)
 {
   puts (USAGE);
   exit (error ? EXIT_FAILURE : EXIT_SUCCESS);
@@ -3677,7 +3572,7 @@
 #endif
 
 void
-version ()
+version (void)
 {
   /* Makes it easier to update automatically. */
   char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc.";
@@ -3693,8 +3588,7 @@
    table.  */
 
 void
-process_file (file)
-     char *file;
+process_file (char *file)
 {
   FILE *fp;
 
@@ -3749,8 +3643,7 @@
    is null when EOF is reached.  */
 
 char *
-read_line (fp)
-     FILE *fp;
+read_line (FILE *fp)
 {
   static char *buffer;
   static int buffer_size;
@@ -3786,9 +3679,7 @@
 /* Main entry point.  */
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int i;
   int any_inputfiles = 0;
--- a/lib-src/emacsclient.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/emacsclient.c	Thu Jul 08 17:09:35 2010 +0900
@@ -81,7 +81,7 @@
 #include <errno.h>
 
 
-char *getenv (), *getwd ();
+char *getenv (const char *), *getwd (char *);
 char *(getcwd) ();
 
 #ifdef WINDOWSNT
@@ -157,7 +157,7 @@
 /* PID of the Emacs server process.  */
 int emacs_pid = 0;
 
-void print_help_and_exit () NO_RETURN;
+void print_help_and_exit (void) NO_RETURN;
 
 struct option longopts[] =
 {
@@ -184,8 +184,7 @@
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 long *
-xmalloc (size)
-     unsigned int size;
+xmalloc (unsigned int size)
 {
   long *result = (long *) malloc (size);
   if (result == NULL)
@@ -517,9 +516,7 @@
    The global variable `optind' will say how many arguments we used up.  */
 
 void
-decode_options (argc, argv)
-     int argc;
-     char **argv;
+decode_options (int argc, char **argv)
 {
   alternate_editor = egetenv ("ALTERNATE_EDITOR");
 
@@ -645,7 +642,7 @@
 
 
 void
-print_help_and_exit ()
+print_help_and_exit (void)
 {
   /* Spaces and tabs are significant in this message; they're chosen so the
      message aligns properly both in a tty and in a Windows message box.
@@ -732,7 +729,7 @@
 #define AUTH_KEY_LENGTH      64
 #define SEND_BUFFER_SIZE   4096
 
-extern char *strerror ();
+extern char *strerror (int);
 
 /* Buffer to accumulate data to send in TCP connections.  */
 char send_buffer[SEND_BUFFER_SIZE + 1];
@@ -743,8 +740,7 @@
 /* On Windows, the socket library was historically separate from the standard
    C library, so errors are handled differently.  */
 void
-sock_err_message (function_name)
-     char *function_name;
+sock_err_message (char *function_name)
 {
 #ifdef WINDOWSNT
   char* msg = NULL;
@@ -768,9 +764,7 @@
    - the buffer is full (but this shouldn't happen)
    Otherwise, we just accumulate it.  */
 void
-send_to_emacs (s, data)
-     HSOCKET s;
-     char *data;
+send_to_emacs (HSOCKET s, char *data)
 {
   while (data)
     {
@@ -807,11 +801,9 @@
    any initial -.  Change spaces to underscores, too, so that the
    return value never contains a space.
 
-   Does not change the string.  Outputs the result to STREAM.  */
+   Does not change the string.  Outputs the result to S.  */
 void
-quote_argument (s, str)
-     HSOCKET s;
-     char *str;
+quote_argument (HSOCKET s, char *str)
 {
   char *copy = (char *) xmalloc (strlen (str) * 2 + 1);
   char *p, *q;
@@ -851,8 +843,7 @@
    modifying the string in place.   Returns STR. */
 
 char *
-unquote_argument (str)
-     char *str;
+unquote_argument (char *str)
 {
   char *p, *q;
 
@@ -883,8 +874,7 @@
 
 
 int
-file_name_absolute_p (filename)
-     const unsigned char *filename;
+file_name_absolute_p (const unsigned char *filename)
 {
   /* Sanity check, it shouldn't happen.  */
   if (! filename) return FALSE;
@@ -938,9 +928,7 @@
  * the Emacs server: host, port, pid and authentication string.
  */
 int
-get_server_config (server, authentication)
-     struct sockaddr_in *server;
-     char *authentication;
+get_server_config (struct sockaddr_in *server, char *authentication)
 {
   char dotted[32];
   char *port;
@@ -1005,7 +993,7 @@
 }
 
 HSOCKET
-set_tcp_socket ()
+set_tcp_socket (void)
 {
   HSOCKET s;
   struct sockaddr_in server;
@@ -1119,8 +1107,7 @@
    0 - success: none of the above */
 
 static int
-socket_status (socket_name)
-     char *socket_name;
+socket_status (char *socket_name)
 {
   struct stat statbfr;
 
@@ -1223,7 +1210,7 @@
 
 
 HSOCKET
-set_local_socket ()
+set_local_socket (void)
 {
   HSOCKET s;
   struct sockaddr_un server;
@@ -1526,9 +1513,7 @@
 }
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int i, rl, needlf = 0;
   char *cwd, *str;
--- a/lib-src/etags.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/etags.c	Thu Jul 08 17:09:35 2010 +0900
@@ -100,15 +100,10 @@
 # ifndef PTR			/* for XEmacs */
 #   define PTR void *
 # endif
-# ifndef __P			/* for XEmacs */
-#   define __P(args) args
-# endif
 #else  /* no config.h */
 # if defined(__STDC__) && (__STDC__ || defined(__SUNPRO_C))
-#   define __P(args) args	/* use prototypes */
 #   define PTR void *		/* for generic pointers */
 # else /* not standard C */
-#   define __P(args) ()		/* no prototypes */
 #   define const		/* remove const for old compilers' sake */
 #   define PTR long *		/* don't use void* */
 # endif
@@ -158,20 +153,20 @@
 #  include <stdlib.h>
 #  include <string.h>
 # else /* no standard C headers */
-   extern char *getenv __P((const char *));
-   extern char *strcpy __P((char *, const char *));
-   extern char *strncpy __P((char *, const char *, unsigned long));
-   extern char *strcat __P((char *, const char *));
-   extern char *strncat __P((char *, const char *, unsigned long));
-   extern int strcmp __P((const char *, const char *));
-   extern int strncmp __P((const char *, const char *, unsigned long));
-   extern int system __P((const char *));
-   extern unsigned long strlen __P((const char *));
-   extern void *malloc __P((unsigned long));
-   extern void *realloc __P((void *, unsigned long));
-   extern void exit __P((int));
-   extern void free __P((void *));
-   extern void *memmove __P((void *, const void *, unsigned long));
+   extern char *getenv (const char *);
+   extern char *strcpy (char *, const char *);
+   extern char *strncpy (char *, const char *, unsigned long);
+   extern char *strcat (char *, const char *);
+   extern char *strncat (char *, const char *, unsigned long);
+   extern int strcmp (const char *, const char *);
+   extern int strncmp (const char *, const char *, unsigned long);
+   extern int system (const char *);
+   extern unsigned long strlen (const char *);
+   extern void *malloc (unsigned long);
+   extern void *realloc (void *, unsigned long);
+   extern void exit (int);
+   extern void free (void *);
+   extern void *memmove (void *, const void *, unsigned long);
 #  define EXIT_SUCCESS	0
 #  define EXIT_FAILURE	1
 # endif
@@ -273,7 +268,7 @@
 
 #define bool int
 
-typedef void Lang_function __P((FILE *));
+typedef void Lang_function (FILE *);
 
 typedef struct
 {
@@ -365,87 +360,87 @@
 /* Many compilers barf on this:
 	Lang_function Ada_funcs;
    so let's write it this way */
-static void Ada_funcs __P((FILE *));
-static void Asm_labels __P((FILE *));
-static void C_entries __P((int c_ext, FILE *));
-static void default_C_entries __P((FILE *));
-static void plain_C_entries __P((FILE *));
-static void Cjava_entries __P((FILE *));
-static void Cobol_paragraphs __P((FILE *));
-static void Cplusplus_entries __P((FILE *));
-static void Cstar_entries __P((FILE *));
-static void Erlang_functions __P((FILE *));
-static void Forth_words __P((FILE *));
-static void Fortran_functions __P((FILE *));
-static void HTML_labels __P((FILE *));
-static void Lisp_functions __P((FILE *));
-static void Lua_functions __P((FILE *));
-static void Makefile_targets __P((FILE *));
-static void Pascal_functions __P((FILE *));
-static void Perl_functions __P((FILE *));
-static void PHP_functions __P((FILE *));
-static void PS_functions __P((FILE *));
-static void Prolog_functions __P((FILE *));
-static void Python_functions __P((FILE *));
-static void Scheme_functions __P((FILE *));
-static void TeX_commands __P((FILE *));
-static void Texinfo_nodes __P((FILE *));
-static void Yacc_entries __P((FILE *));
-static void just_read_file __P((FILE *));
-
-static void print_language_names __P((void));
-static void print_version __P((void));
-static void print_help __P((argument *));
-int main __P((int, char **));
-
-static compressor *get_compressor_from_suffix __P((char *, char **));
-static language *get_language_from_langname __P((const char *));
-static language *get_language_from_interpreter __P((char *));
-static language *get_language_from_filename __P((char *, bool));
-static void readline __P((linebuffer *, FILE *));
-static long readline_internal __P((linebuffer *, FILE *));
-static bool nocase_tail __P((char *));
-static void get_tag __P((char *, char **));
-
-static void analyse_regex __P((char *));
-static void free_regexps __P((void));
-static void regex_tag_multiline __P((void));
-static void error __P((const char *, const char *));
-static void suggest_asking_for_help __P((void));
-void fatal __P((char *, char *));
-static void pfatal __P((char *));
-static void add_node __P((node *, node **));
-
-static void init __P((void));
-static void process_file_name __P((char *, language *));
-static void process_file __P((FILE *, char *, language *));
-static void find_entries __P((FILE *));
-static void free_tree __P((node *));
-static void free_fdesc __P((fdesc *));
-static void pfnote __P((char *, bool, char *, int, int, long));
-static void make_tag __P((char *, int, bool, char *, int, int, long));
-static void invalidate_nodes __P((fdesc *, node **));
-static void put_entries __P((node *));
-
-static char *concat __P((char *, char *, char *));
-static char *skip_spaces __P((char *));
-static char *skip_non_spaces __P((char *));
-static char *savenstr __P((char *, int));
-static char *savestr __P((char *));
-static char *etags_strchr __P((const char *, int));
-static char *etags_strrchr __P((const char *, int));
-static int etags_strcasecmp __P((const char *, const char *));
-static int etags_strncasecmp __P((const char *, const char *, int));
-static char *etags_getcwd __P((void));
-static char *relative_filename __P((char *, char *));
-static char *absolute_filename __P((char *, char *));
-static char *absolute_dirname __P((char *, char *));
-static bool filename_is_absolute __P((char *f));
-static void canonicalize_filename __P((char *));
-static void linebuffer_init __P((linebuffer *));
-static void linebuffer_setlen __P((linebuffer *, int));
-static PTR xmalloc __P((unsigned int));
-static PTR xrealloc __P((char *, unsigned int));
+static void Ada_funcs (FILE *);
+static void Asm_labels (FILE *);
+static void C_entries (int c_ext, FILE *);
+static void default_C_entries (FILE *);
+static void plain_C_entries (FILE *);
+static void Cjava_entries (FILE *);
+static void Cobol_paragraphs (FILE *);
+static void Cplusplus_entries (FILE *);
+static void Cstar_entries (FILE *);
+static void Erlang_functions (FILE *);
+static void Forth_words (FILE *);
+static void Fortran_functions (FILE *);
+static void HTML_labels (FILE *);
+static void Lisp_functions (FILE *);
+static void Lua_functions (FILE *);
+static void Makefile_targets (FILE *);
+static void Pascal_functions (FILE *);
+static void Perl_functions (FILE *);
+static void PHP_functions (FILE *);
+static void PS_functions (FILE *);
+static void Prolog_functions (FILE *);
+static void Python_functions (FILE *);
+static void Scheme_functions (FILE *);
+static void TeX_commands (FILE *);
+static void Texinfo_nodes (FILE *);
+static void Yacc_entries (FILE *);
+static void just_read_file (FILE *);
+
+static void print_language_names (void);
+static void print_version (void);
+static void print_help (argument *);
+int main (int, char **);
+
+static compressor *get_compressor_from_suffix (char *, char **);
+static language *get_language_from_langname (const char *);
+static language *get_language_from_interpreter (char *);
+static language *get_language_from_filename (char *, bool);
+static void readline (linebuffer *, FILE *);
+static long readline_internal (linebuffer *, FILE *);
+static bool nocase_tail (char *);
+static void get_tag (char *, char **);
+
+static void analyse_regex (char *);
+static void free_regexps (void);
+static void regex_tag_multiline (void);
+static void error (const char *, const char *);
+static void suggest_asking_for_help (void);
+void fatal (char *, char *);
+static void pfatal (char *);
+static void add_node (node *, node **);
+
+static void init (void);
+static void process_file_name (char *, language *);
+static void process_file (FILE *, char *, language *);
+static void find_entries (FILE *);
+static void free_tree (node *);
+static void free_fdesc (fdesc *);
+static void pfnote (char *, bool, char *, int, int, long);
+static void make_tag (char *, int, bool, char *, int, int, long);
+static void invalidate_nodes (fdesc *, node **);
+static void put_entries (node *);
+
+static char *concat (char *, char *, char *);
+static char *skip_spaces (char *);
+static char *skip_non_spaces (char *);
+static char *savenstr (char *, int);
+static char *savestr (char *);
+static char *etags_strchr (const char *, int);
+static char *etags_strrchr (const char *, int);
+static int etags_strcasecmp (const char *, const char *);
+static int etags_strncasecmp (const char *, const char *, int);
+static char *etags_getcwd (void);
+static char *relative_filename (char *, char *);
+static char *absolute_filename (char *, char *);
+static char *absolute_dirname (char *, char *);
+static bool filename_is_absolute (char *f);
+static void canonicalize_filename (char *);
+static void linebuffer_init (linebuffer *);
+static void linebuffer_setlen (linebuffer *, int);
+static PTR xmalloc (unsigned int);
+static PTR xrealloc (char *, unsigned int);
 
 
 static char searchar = '/';	/* use /.../ searches */
@@ -853,7 +848,7 @@
 
 
 static void
-print_language_names ()
+print_language_names (void)
 {
   language *lang;
   char **name, **ext;
@@ -892,7 +887,7 @@
 # define VERSION "17.38.1.4"
 #endif
 static void
-print_version ()
+print_version (void)
 {
   /* Makes it easier to update automatically. */
   char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc.";
@@ -909,8 +904,7 @@
 #endif
 
 static void
-print_help (argbuffer)
-     argument *argbuffer;
+print_help (argument *argbuffer)
 {
   bool help_for_lang = FALSE;
 
@@ -1087,9 +1081,7 @@
 
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char **argv)
 {
   int i;
   unsigned int nincluded_files;
@@ -1414,9 +1406,7 @@
  * Idea by Vladimir Alexiev <vladimir@cs.ualberta.ca> (1998)
  */
 static compressor *
-get_compressor_from_suffix (file, extptr)
-     char *file;
-     char **extptr;
+get_compressor_from_suffix (char *file, char **extptr)
 {
   compressor *compr;
   char *slash, *suffix;
@@ -1452,8 +1442,7 @@
  * Return a language given the name.
  */
 static language *
-get_language_from_langname (name)
-     const char *name;
+get_language_from_langname (const char *name)
 {
   language *lang;
 
@@ -1475,8 +1464,7 @@
  * Return a language given the interpreter name.
  */
 static language *
-get_language_from_interpreter (interpreter)
-     char *interpreter;
+get_language_from_interpreter (char *interpreter)
 {
   language *lang;
   char **iname;
@@ -1498,9 +1486,7 @@
  * Return a language given the file name.
  */
 static language *
-get_language_from_filename (file, case_sensitive)
-     char *file;
-     bool case_sensitive;
+get_language_from_filename (char *file, int case_sensitive)
 {
   language *lang;
   char **name, **ext, *suffix;
@@ -1534,9 +1520,7 @@
  * This routine is called on each file argument.
  */
 static void
-process_file_name (file, lang)
-     char *file;
-     language *lang;
+process_file_name (char *file, language *lang)
 {
   struct stat stat_buf;
   FILE *inf;
@@ -1658,10 +1642,7 @@
 }
 
 static void
-process_file (fh, fn, lang)
-     FILE *fh;
-     char *fn;
-     language *lang;
+process_file (FILE *fh, char *fn, language *lang)
 {
   static const fdesc emptyfdesc;
   fdesc *fdp;
@@ -1738,7 +1719,7 @@
  * of a char is TRUE if it is the string "white", else FALSE.
  */
 static void
-init ()
+init (void)
 {
   register char *sp;
   register int i;
@@ -1761,8 +1742,7 @@
  * which finds the function and type definitions.
  */
 static void
-find_entries (inf)
-     FILE *inf;
+find_entries (FILE *inf)
 {
   char *cp;
   language *lang = curfdp->lang;
@@ -1920,14 +1900,14 @@
  * etags.el needs to use the same characters that are in NONAM.
  */
 static void
-make_tag (name, namelen, is_func, linestart, linelen, lno, cno)
-     char *name;		/* tag name, or NULL if unnamed */
-     int namelen;		/* tag length */
-     bool is_func;		/* tag is a function */
-     char *linestart;		/* start of the line where tag is */
-     int linelen;		/* length of the line where tag is */
-     int lno;			/* line number */
-     long cno;			/* character number */
+make_tag (char *name, int namelen, int is_func, char *linestart, int linelen, int lno, long int cno)
+                		/* tag name, or NULL if unnamed */
+                 		/* tag length */
+                  		/* tag is a function */
+                     		/* start of the line where tag is */
+                 		/* length of the line where tag is */
+             			/* line number */
+              			/* character number */
 {
   bool named = (name != NULL && namelen > 0);
 
@@ -1963,13 +1943,13 @@
 
 /* Record a tag. */
 static void
-pfnote (name, is_func, linestart, linelen, lno, cno)
-     char *name;		/* tag name, or NULL if unnamed */
-     bool is_func;		/* tag is a function */
-     char *linestart;		/* start of the line where tag is */
-     int linelen;		/* length of the line where tag is */
-     int lno;			/* line number */
-     long cno;			/* character number */
+pfnote (char *name, int is_func, char *linestart, int linelen, int lno, long int cno)
+                		/* tag name, or NULL if unnamed */
+                  		/* tag is a function */
+                     		/* start of the line where tag is */
+                 		/* length of the line where tag is */
+             			/* line number */
+              			/* character number */
 {
   register node *np;
 
@@ -2023,8 +2003,7 @@
  *	recurse on left children, iterate on right children.
  */
 static void
-free_tree (np)
-     register node *np;
+free_tree (register node *np)
 {
   while (np)
     {
@@ -2042,8 +2021,7 @@
  *	delete a file description
  */
 static void
-free_fdesc (fdp)
-     register fdesc *fdp;
+free_fdesc (register fdesc *fdp)
 {
   free (fdp->infname);
   free (fdp->infabsname);
@@ -2063,8 +2041,7 @@
  *	maintain state.
  */
 static void
-add_node (np, cur_node_p)
-     node *np, **cur_node_p;
+add_node (node *np, node **cur_node_p)
 {
   register int dif;
   register node *cur_node = *cur_node_p;
@@ -2144,9 +2121,7 @@
  *	given file description (CTAGS case) or free them (ETAGS case).
  */
 static void
-invalidate_nodes (badfdp, npp)
-     fdesc *badfdp;
-     node **npp;
+invalidate_nodes (fdesc *badfdp, node **npp)
 {
   node *np = *npp;
 
@@ -2178,13 +2153,12 @@
 }
 
 
-static int total_size_of_entries __P((node *));
-static int number_len __P((long));
+static int total_size_of_entries (node *);
+static int number_len (long);
 
 /* Length of a non-negative number's decimal representation. */
 static int
-number_len (num)
-     long num;
+number_len (long int num)
 {
   int len = 1;
   while ((num /= 10) > 0)
@@ -2199,8 +2173,7 @@
  * but is still supplied for backward compatibility.
  */
 static int
-total_size_of_entries (np)
-     register node *np;
+total_size_of_entries (register node *np)
 {
   register int total = 0;
 
@@ -2220,8 +2193,7 @@
 }
 
 static void
-put_entries (np)
-     register node *np;
+put_entries (register node *np)
 {
   register char *sp;
   static fdesc *fdp = NULL;
@@ -2330,9 +2302,9 @@
   st_C_struct, st_C_extern, st_C_enum, st_C_define, st_C_typedef
 };
 
-static unsigned int hash __P((const char *, unsigned int));
-static struct C_stab_entry * in_word_set __P((const char *, unsigned int));
-static enum sym_type C_symtype __P((char *, int, int));
+static unsigned int hash (const char *, unsigned int);
+static struct C_stab_entry * in_word_set (const char *, unsigned int);
+static enum sym_type C_symtype (char *, int, int);
 
 /* Feed stuff between (but not including) %[ and %] lines to:
      gperf -m 5
@@ -2400,9 +2372,7 @@
 #endif
 #endif
 static unsigned int
-hash (str, len)
-     register const char *str;
-     register unsigned int len;
+hash (register const char *str, register unsigned int len)
 {
   static unsigned char asso_values[] =
     {
@@ -2448,9 +2418,7 @@
 }
 
 static struct C_stab_entry *
-in_word_set (str, len)
-     register const char *str;
-     register unsigned int len;
+in_word_set (register const char *str, register unsigned int len)
 {
   enum
     {
@@ -2516,10 +2484,7 @@
 /*%>*/
 
 static enum sym_type
-C_symtype (str, len, c_ext)
-     char *str;
-     int len;
-     int c_ext;
+C_symtype (char *str, int len, int c_ext)
 {
   register struct C_stab_entry *se = in_word_set (str, len);
 
@@ -2646,9 +2611,9 @@
  * Variables and functions for dealing with nested structures.
  * Idea by Mykola Dzyuba <mdzyuba@yahoo.com> (2001)
  */
-static void pushclass_above __P((int, char *, int));
-static void popclass_above __P((int));
-static void write_classname __P((linebuffer *, char *qualifier));
+static void pushclass_above (int, char *, int);
+static void popclass_above (int);
+static void write_classname (linebuffer *, char *qualifier);
 
 static struct {
   char **cname;			/* nested class names */
@@ -2663,10 +2628,7 @@
 			 && bracelev == cstack.bracelev[nestlev-1] + 1)
 
 static void
-pushclass_above (bracelev, str, len)
-     int bracelev;
-     char *str;
-     int len;
+pushclass_above (int bracelev, char *str, int len)
 {
   int nl;
 
@@ -2685,8 +2647,7 @@
 }
 
 static void
-popclass_above (bracelev)
-     int bracelev;
+popclass_above (int bracelev)
 {
   int nl;
 
@@ -2700,9 +2661,7 @@
 }
 
 static void
-write_classname (cn, qualifier)
-     linebuffer *cn;
-     char *qualifier;
+write_classname (linebuffer *cn, char *qualifier)
 {
   int i, len;
   int qlen = strlen (qualifier);
@@ -2736,8 +2695,8 @@
 }
 
 
-static bool consider_token __P((char *, int, int, int *, int, int, bool *));
-static void make_C_tag __P((bool));
+static bool consider_token (char *, int, int, int *, int, int, bool *);
+static void make_C_tag (bool);
 
 /*
  * consider_token ()
@@ -2757,14 +2716,14 @@
  */
 
 static bool
-consider_token (str, len, c, c_extp, bracelev, parlev, is_func_or_var)
-     register char *str;	/* IN: token pointer */
-     register int len;		/* IN: token length */
-     register int c;		/* IN: first char after the token */
-     int *c_extp;		/* IN, OUT: C extensions mask */
-     int bracelev;		/* IN: brace level */
-     int parlev;		/* IN: parenthesis level */
-     bool *is_func_or_var;	/* OUT: function or variable found */
+consider_token (register char *str, register int len, register int c, int *c_extp, int bracelev, int parlev, int *is_func_or_var)
+                        	/* IN: token pointer */
+                      		/* IN: token length */
+                    		/* IN: first char after the token */
+                 		/* IN, OUT: C extensions mask */
+                  		/* IN: brace level */
+                		/* IN: parenthesis level */
+                          	/* OUT: function or variable found */
 {
   /* When structdef is stagseen, scolonseen, or snone with bracelev > 0,
      structtype is the type of the preceding struct-like keyword, and
@@ -3098,8 +3057,7 @@
 
 
 static void
-make_C_tag (isfun)
-     bool isfun;
+make_C_tag (int isfun)
 {
   /* This function is never called when token.valid is FALSE, but
      we must protect against invalid input or internal errors. */
@@ -3125,9 +3083,9 @@
  * 	C syntax and adds them to the list.
  */
 static void
-C_entries (c_ext, inf)
-     int c_ext;			/* extension of C */
-     FILE *inf;			/* input file */
+C_entries (int c_ext, FILE *inf)
+               			/* extension of C */
+               			/* input file */
 {
   register char c;		/* latest char read; '\0' for end of line */
   register char *lp;		/* pointer one beyond the character `c' */
@@ -3957,48 +3915,42 @@
  * of a global flag.
  */
 static void
-default_C_entries (inf)
-     FILE *inf;
+default_C_entries (FILE *inf)
 {
   C_entries (cplusplus ? C_PLPL : C_AUTO, inf);
 }
 
 /* Always do plain C. */
 static void
-plain_C_entries (inf)
-     FILE *inf;
+plain_C_entries (FILE *inf)
 {
   C_entries (0, inf);
 }
 
 /* Always do C++. */
 static void
-Cplusplus_entries (inf)
-     FILE *inf;
+Cplusplus_entries (FILE *inf)
 {
   C_entries (C_PLPL, inf);
 }
 
 /* Always do Java. */
 static void
-Cjava_entries (inf)
-     FILE *inf;
+Cjava_entries (FILE *inf)
 {
   C_entries (C_JAVA, inf);
 }
 
 /* Always do C*. */
 static void
-Cstar_entries (inf)
-     FILE *inf;
+Cstar_entries (FILE *inf)
 {
   C_entries (C_STAR, inf);
 }
 
 /* Always do Yacc. */
 static void
-Yacc_entries (inf)
-     FILE *inf;
+Yacc_entries (FILE *inf)
 {
   C_entries (YACC, inf);
 }
@@ -4031,8 +3983,7 @@
  * matching on files that have no language defined.
  */
 static void
-just_read_file (inf)
-     FILE *inf;
+just_read_file (FILE *inf)
 {
   register char *dummy;
 
@@ -4043,11 +3994,11 @@
 
 /* Fortran parsing */
 
-static void F_takeprec __P((void));
-static void F_getit __P((FILE *));
+static void F_takeprec (void);
+static void F_getit (FILE *);
 
 static void
-F_takeprec ()
+F_takeprec (void)
 {
   dbp = skip_spaces (dbp);
   if (*dbp != '*')
@@ -4070,8 +4021,7 @@
 }
 
 static void
-F_getit (inf)
-     FILE *inf;
+F_getit (FILE *inf)
 {
   register char *cp;
 
@@ -4095,8 +4045,7 @@
 
 
 static void
-Fortran_functions (inf)
-     FILE *inf;
+Fortran_functions (FILE *inf)
 {
   LOOP_ON_INPUT_LINES (inf, lb, dbp)
     {
@@ -4178,14 +4127,12 @@
  * Philippe Waroquiers (1998)
  */
 
-static void Ada_getit __P((FILE *, char *));
+static void Ada_getit (FILE *, char *);
 
 /* Once we are positioned after an "interesting" keyword, let's get
    the real tag value necessary. */
 static void
-Ada_getit (inf, name_qualifier)
-     FILE *inf;
-     char *name_qualifier;
+Ada_getit (FILE *inf, char *name_qualifier)
 {
   register char *cp;
   char *name;
@@ -4248,8 +4195,7 @@
 }
 
 static void
-Ada_funcs (inf)
-     FILE *inf;
+Ada_funcs (FILE *inf)
 {
   bool inquote = FALSE;
   bool skip_till_semicolumn = FALSE;
@@ -4362,8 +4308,7 @@
  * Idea by Bob Weiner, Motorola Inc. (1994)
  */
 static void
-Asm_labels (inf)
-     FILE *inf;
+Asm_labels (FILE *inf)
 {
   register char *cp;
 
@@ -4395,8 +4340,7 @@
  * Ideas by Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> (2001)
  */
 static void
-Perl_functions (inf)
-     FILE *inf;
+Perl_functions (FILE *inf)
 {
   char *package = savestr ("main"); /* current package name */
   register char *cp;
@@ -4478,8 +4422,7 @@
  * More ideas by seb bacon <seb@jamkit.com> (2002)
  */
 static void
-Python_functions (inf)
-     FILE *inf;
+Python_functions (FILE *inf)
 {
   register char *cp;
 
@@ -4509,8 +4452,7 @@
  * Idea by Diez B. Roggisch (2001)
  */
 static void
-PHP_functions (inf)
-     FILE *inf;
+PHP_functions (FILE *inf)
 {
   register char *cp, *name;
   bool search_identifier = FALSE;
@@ -4589,8 +4531,7 @@
  * Idea by Corny de Souza (1993)
  */
 static void
-Cobol_paragraphs (inf)
-     FILE *inf;
+Cobol_paragraphs (FILE *inf)
 {
   register char *bp, *ep;
 
@@ -4618,8 +4559,7 @@
  * Ideas by Assar Westerlund <assar@sics.se> (2001)
  */
 static void
-Makefile_targets (inf)
-     FILE *inf;
+Makefile_targets (FILE *inf)
 {
   register char *bp;
 
@@ -4654,8 +4594,7 @@
  *  the tag is skipped.
  */
 static void
-Pascal_functions (inf)
-     FILE *inf;
+Pascal_functions (FILE *inf)
 {
   linebuffer tline;		/* mostly copied from C_entries */
   long save_lcno;
@@ -4832,10 +4771,10 @@
  *  look for (def or (DEF, quote or QUOTE
  */
 
-static void L_getit __P((void));
+static void L_getit (void);
 
 static void
-L_getit ()
+L_getit (void)
 {
   if (*dbp == '\'')		/* Skip prefix quote */
     dbp++;
@@ -4851,8 +4790,7 @@
 }
 
 static void
-Lisp_functions (inf)
-     FILE *inf;
+Lisp_functions (FILE *inf)
 {
   LOOP_ON_INPUT_LINES (inf, lb, dbp)
     {
@@ -4896,8 +4834,7 @@
  *  "function" and "local function" are tags if they start at column 1.
  */
 static void
-Lua_functions (inf)
-     FILE *inf;
+Lua_functions (FILE *inf)
 {
   register char *bp;
 
@@ -4923,8 +4860,7 @@
  *   Masatake Yamato <masata-y@is.aist-nara.ac.jp> (1999)
  */
 static void
-PS_functions (inf)
-     FILE *inf;
+PS_functions (FILE *inf)
 {
   register char *bp, *ep;
 
@@ -4954,8 +4890,7 @@
  * Ideas by Eduardo Horvath <eeh@netbsd.org> (2004)
  */
 static void
-Forth_words (inf)
-     FILE *inf;
+Forth_words (FILE *inf)
 {
   register char *bp;
 
@@ -4991,8 +4926,7 @@
  * Original code by Ken Haase (1985?)
  */
 static void
-Scheme_functions (inf)
-     FILE *inf;
+Scheme_functions (FILE *inf)
 {
   register char *bp;
 
@@ -5032,8 +4966,8 @@
 :part:appendix:entry:index:def\
 :newcommand:renewcommand:newenvironment:renewenvironment";
 
-static void TEX_mode __P((FILE *));
-static void TEX_decode_env __P((char *, char *));
+static void TEX_mode (FILE *);
+static void TEX_decode_env (char *, char *);
 
 static char TEX_esc = '\\';
 static char TEX_opgrp = '{';
@@ -5043,8 +4977,7 @@
  * TeX/LaTeX scanning loop.
  */
 static void
-TeX_commands (inf)
-     FILE *inf;
+TeX_commands (FILE *inf)
 {
   char *cp;
   linebuffer *key;
@@ -5108,8 +5041,7 @@
 /* Figure out whether TeX's escapechar is '\\' or '!' and set grouping
    chars accordingly. */
 static void
-TEX_mode (inf)
-     FILE *inf;
+TEX_mode (FILE *inf)
 {
   int c;
 
@@ -5143,9 +5075,7 @@
 /* Read environment and prepend it to the default string.
    Build token table. */
 static void
-TEX_decode_env (evarname, defenv)
-     char *evarname;
-     char *defenv;
+TEX_decode_env (char *evarname, char *defenv)
 {
   register char *env, *p;
   int i, len;
@@ -5193,8 +5123,7 @@
 
 /* Texinfo support.  Dave Love, Mar. 2000.  */
 static void
-Texinfo_nodes (inf)
-     FILE * inf;
+Texinfo_nodes (FILE *inf)
 {
   char *cp, *start;
   LOOP_ON_INPUT_LINES (inf, lb, cp)
@@ -5217,8 +5146,7 @@
  * Francesco Potortì, 2002.
  */
 static void
-HTML_labels (inf)
-     FILE * inf;
+HTML_labels (FILE *inf)
 {
   bool getnext = FALSE;		/* next text outside of HTML tags is a tag */
   bool skiptag = FALSE;		/* skip to the end of the current HTML tag */
@@ -5338,13 +5266,12 @@
  * Original code by Sunichirou Sugou (1989)
  * Rewritten by Anders Lindgren (1996)
  */
-static int prolog_pr __P((char *, char *));
-static void prolog_skip_comment __P((linebuffer *, FILE *));
-static int prolog_atom __P((char *, int));
+static int prolog_pr (char *, char *);
+static void prolog_skip_comment (linebuffer *, FILE *);
+static int prolog_atom (char *, int);
 
 static void
-Prolog_functions (inf)
-     FILE *inf;
+Prolog_functions (FILE *inf)
 {
   char *cp, *last;
   int len;
@@ -5380,9 +5307,7 @@
 
 
 static void
-prolog_skip_comment (plb, inf)
-     linebuffer *plb;
-     FILE *inf;
+prolog_skip_comment (linebuffer *plb, FILE *inf)
 {
   char *cp;
 
@@ -5408,9 +5333,9 @@
  * header was found.
  */
 static int
-prolog_pr (s, last)
-     char *s;
-     char *last;		/* Name of last clause. */
+prolog_pr (char *s, char *last)
+             
+                		/* Name of last clause. */
 {
   int pos;
   int len;
@@ -5446,9 +5371,7 @@
  *   Backslash quotes everything.
  */
 static int
-prolog_atom (s, pos)
-     char *s;
-     int pos;
+prolog_atom (char *s, int pos)
 {
   int origpos;
 
@@ -5503,13 +5426,12 @@
  * Assumes that Erlang functions start at column 0.
  * Original code by Anders Lindgren (1996)
  */
-static int erlang_func __P((char *, char *));
-static void erlang_attribute __P((char *));
-static int erlang_atom __P((char *));
+static int erlang_func (char *, char *);
+static void erlang_attribute (char *);
+static int erlang_atom (char *);
 
 static void
-Erlang_functions (inf)
-     FILE *inf;
+Erlang_functions (FILE *inf)
 {
   char *cp, *last;
   int len;
@@ -5568,9 +5490,9 @@
  * was found.
  */
 static int
-erlang_func (s, last)
-     char *s;
-     char *last;		/* Name of last clause. */
+erlang_func (char *s, char *last)
+             
+                		/* Name of last clause. */
 {
   int pos;
   int len;
@@ -5606,8 +5528,7 @@
  * -record(graph, {vtab = notable, cyclic = true}).
  */
 static void
-erlang_attribute (s)
-     char *s;
+erlang_attribute (char *s)
 {
   char *cp = s;
 
@@ -5627,8 +5548,7 @@
  * Return the number of bytes consumed, or -1 if there was an error.
  */
 static int
-erlang_atom (s)
-     char *s;
+erlang_atom (char *s)
 {
   int pos = 0;
 
@@ -5652,9 +5572,9 @@
 }
 
 
-static char *scan_separators __P((char *));
-static void add_regex __P((char *, language *));
-static char *substitute __P((char *, char *, struct re_registers *));
+static char *scan_separators (char *);
+static void add_regex (char *, language *);
+static char *substitute (char *, char *, struct re_registers *);
 
 /*
  * Take a string like "/blah/" and turn it into "blah", verifying
@@ -5666,8 +5586,7 @@
  * unterminated regexps.
  */
 static char *
-scan_separators (name)
-     char *name;
+scan_separators (char *name)
 {
   char sep = name[0];
   char *copyto = name;
@@ -5719,8 +5638,7 @@
 /* Look at the argument of --regex or --no-regex and do the right
    thing.  Same for each line of a regexp file. */
 static void
-analyse_regex (regex_arg)
-     char *regex_arg;
+analyse_regex (char *regex_arg)
 {
   if (regex_arg == NULL)
     {
@@ -5791,9 +5709,7 @@
 /* Separate the regexp pattern, compile it,
    and care for optional name and modifiers. */
 static void
-add_regex (regexp_pattern, lang)
-     char *regexp_pattern;
-     language *lang;
+add_regex (char *regexp_pattern, language *lang)
 {
   static struct re_pattern_buffer zeropattern;
   char sep, *pat, *name, *modifiers;
@@ -5910,9 +5826,7 @@
  * arguments.
  */
 static char *
-substitute (in, out, regs)
-     char *in, *out;
-     struct re_registers *regs;
+substitute (char *in, char *out, struct re_registers *regs)
 {
   char *result, *t;
   int size, dig, diglen;
@@ -5959,7 +5873,7 @@
 
 /* Deallocate all regexps. */
 static void
-free_regexps ()
+free_regexps (void)
 {
   regexp *rp;
   while (p_head != NULL)
@@ -5981,7 +5895,7 @@
  * Idea by Ben Wing <ben@666.com> (2002).
  */
 static void
-regex_tag_multiline ()
+regex_tag_multiline (void)
 {
   char *buffer = filebuf.buffer;
   regexp *rp;
@@ -6058,8 +5972,7 @@
 
 
 static bool
-nocase_tail (cp)
-     char *cp;
+nocase_tail (char *cp)
 {
   register int len = 0;
 
@@ -6074,9 +5987,7 @@
 }
 
 static void
-get_tag (bp, namepp)
-     register char *bp;
-     char **namepp;
+get_tag (register char *bp, char **namepp)
 {
   register char *cp = bp;
 
@@ -6107,9 +6018,7 @@
  * appended to `filebuf'.
  */
 static long
-readline_internal (lbp, stream)
-     linebuffer *lbp;
-     register FILE *stream;
+readline_internal (linebuffer *lbp, register FILE *stream)
 {
   char *buffer = lbp->buffer;
   register char *p = lbp->buffer;
@@ -6187,9 +6096,7 @@
  * directives.
  */
 static void
-readline (lbp, stream)
-     linebuffer *lbp;
-     FILE *stream;
+readline (linebuffer *lbp, FILE *stream)
 {
   long result;
 
@@ -6382,8 +6289,7 @@
  * with xnew where the string CP has been copied.
  */
 static char *
-savestr (cp)
-     char *cp;
+savestr (char *cp)
 {
   return savenstr (cp, strlen (cp));
 }
@@ -6393,9 +6299,7 @@
  * the string CP has been copied for at most the first LEN characters.
  */
 static char *
-savenstr (cp, len)
-     char *cp;
-     int len;
+savenstr (char *cp, int len)
 {
   register char *dp;
 
@@ -6412,9 +6316,7 @@
  * Identical to POSIX strrchr, included for portability.
  */
 static char *
-etags_strrchr (sp, c)
-     register const char *sp;
-     register int c;
+etags_strrchr (register const char *sp, register int c)
 {
   register const char *r;
 
@@ -6434,9 +6336,7 @@
  * Identical to POSIX strchr, included for portability.
  */
 static char *
-etags_strchr (sp, c)
-     register const char *sp;
-     register int c;
+etags_strchr (register const char *sp, register int c)
 {
   do
     {
@@ -6452,9 +6352,7 @@
  * Same as BSD's strcasecmp, included for portability.
  */
 static int
-etags_strcasecmp (s1, s2)
-     register const char *s1;
-     register const char *s2;
+etags_strcasecmp (register const char *s1, register const char *s2)
 {
   while (*s1 != '\0'
 	 && (ISALPHA (*s1) && ISALPHA (*s2)
@@ -6474,10 +6372,7 @@
  * Same as BSD's strncasecmp, included for portability.
  */
 static int
-etags_strncasecmp (s1, s2, n)
-     register const char *s1;
-     register const char *s2;
-     register int n;
+etags_strncasecmp (register const char *s1, register const char *s2, register int n)
 {
   while (*s1 != '\0' && n-- > 0
 	 && (ISALPHA (*s1) && ISALPHA (*s2)
@@ -6495,8 +6390,7 @@
 
 /* Skip spaces (end of string is not space), return new pointer. */
 static char *
-skip_spaces (cp)
-     char *cp;
+skip_spaces (char *cp)
 {
   while (iswhite (*cp))
     cp++;
@@ -6505,8 +6399,7 @@
 
 /* Skip non spaces, except end of string, return new pointer. */
 static char *
-skip_non_spaces (cp)
-     char *cp;
+skip_non_spaces (char *cp)
 {
   while (*cp != '\0' && !iswhite (*cp))
     cp++;
@@ -6515,23 +6408,21 @@
 
 /* Print error message and exit.  */
 void
-fatal (s1, s2)
-     char *s1, *s2;
+fatal (char *s1, char *s2)
 {
   error (s1, s2);
   exit (EXIT_FAILURE);
 }
 
 static void
-pfatal (s1)
-     char *s1;
+pfatal (char *s1)
 {
   perror (s1);
   exit (EXIT_FAILURE);
 }
 
 static void
-suggest_asking_for_help ()
+suggest_asking_for_help (void)
 {
   fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",
 	   progname, NO_LONG_OPTIONS ? "-h" : "--help");
@@ -6540,8 +6431,7 @@
 
 /* Print error message.  `s1' is printf control string, `s2' is arg for it. */
 static void
-error (s1, s2)
-     const char *s1, *s2;
+error (const char *s1, const char *s2)
 {
   fprintf (stderr, "%s: ", progname);
   fprintf (stderr, s1, s2);
@@ -6551,8 +6441,7 @@
 /* Return a newly-allocated string whose contents
    concatenate those of s1, s2, s3.  */
 static char *
-concat (s1, s2, s3)
-     char *s1, *s2, *s3;
+concat (char *s1, char *s2, char *s3)
 {
   int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
   char *result = xnew (len1 + len2 + len3 + 1, char);
@@ -6569,7 +6458,7 @@
 /* Does the same work as the system V getcwd, but does not need to
    guess the buffer size in advance. */
 static char *
-etags_getcwd ()
+etags_getcwd (void)
 {
 #ifdef HAVE_GETCWD
   int bufsize = 200;
@@ -6619,8 +6508,7 @@
 /* Return a newly allocated string containing the file name of FILE
    relative to the absolute directory DIR (which should end with a slash). */
 static char *
-relative_filename (file, dir)
-     char *file, *dir;
+relative_filename (char *file, char *dir)
 {
   char *fp, *dp, *afn, *res;
   int i;
@@ -6659,8 +6547,7 @@
 /* Return a newly allocated string containing the absolute file name
    of FILE given DIR (which should end with a slash). */
 static char *
-absolute_filename (file, dir)
-     char *file, *dir;
+absolute_filename (char *file, char *dir)
 {
   char *slashp, *cp, *res;
 
@@ -6733,8 +6620,7 @@
    file name of dir where FILE resides given DIR (which should
    end with a slash). */
 static char *
-absolute_dirname (file, dir)
-     char *file, *dir;
+absolute_dirname (char *file, char *dir)
 {
   char *slashp, *res;
   char save;
@@ -6753,8 +6639,7 @@
 /* Whether the argument string is an absolute file name.  The argument
    string must have been canonicalized with canonicalize_filename. */
 static bool
-filename_is_absolute (fn)
-     char *fn;
+filename_is_absolute (char *fn)
 {
   return (fn[0] == '/'
 #ifdef DOS_NT
@@ -6766,8 +6651,7 @@
 /* Upcase DOS drive letter and collapse separators into single slashes.
    Works in place. */
 static void
-canonicalize_filename (fn)
-     register char *fn;
+canonicalize_filename (register char *fn)
 {
   register char* cp;
   char sep = '/';
@@ -6796,8 +6680,7 @@
 
 /* Initialize a linebuffer for use. */
 static void
-linebuffer_init (lbp)
-     linebuffer *lbp;
+linebuffer_init (linebuffer *lbp)
 {
   lbp->size = (DEBUG) ? 3 : 200;
   lbp->buffer = xnew (lbp->size, char);
@@ -6807,9 +6690,7 @@
 
 /* Set the minimum size of a string contained in a linebuffer. */
 static void
-linebuffer_setlen (lbp, toksize)
-     linebuffer *lbp;
-     int toksize;
+linebuffer_setlen (linebuffer *lbp, int toksize)
 {
   while (lbp->size <= toksize)
     {
@@ -6821,8 +6702,7 @@
 
 /* Like malloc but get fatal error if memory is exhausted. */
 static PTR
-xmalloc (size)
-     unsigned int size;
+xmalloc (unsigned int size)
 {
   PTR result = (PTR) malloc (size);
   if (result == NULL)
@@ -6831,9 +6711,7 @@
 }
 
 static PTR
-xrealloc (ptr, size)
-     char *ptr;
-     unsigned int size;
+xrealloc (char *ptr, unsigned int size)
 {
   PTR result = (PTR) realloc (ptr, size);
   if (result == NULL)
--- a/lib-src/fakemail.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/fakemail.c	Thu Jul 08 17:09:35 2010 +0900
@@ -100,7 +100,7 @@
 struct stream_record
 {
   FILE *handle;
-  int (*action)();
+  int (*action)(FILE *);
   struct stream_record *rest_streams;
 };
 typedef struct stream_record *stream_list;
@@ -147,8 +147,8 @@
 static stream_list the_streams;
 static boolean no_problems = true;
 
-extern FILE *popen ();
-extern int fclose (), pclose ();
+extern FILE *popen (const char *, const char *);
+extern int fclose (FILE *), pclose (FILE *);
 
 #ifdef CURRENT_USER
 extern struct passwd *getpwuid ();
@@ -164,8 +164,7 @@
 /* Print error message.  `s1' is printf control string, `s2' is arg for it. */
 
 static void
-error (s1, s2)
-     char *s1, *s2;
+error (char *s1, char *s2)
 {
   printf ("%s: ", my_name);
   printf (s1, s2);
@@ -176,8 +175,7 @@
 /* Print error message and exit.  */
 
 static void
-fatal (s1)
-     char *s1;
+fatal (char *s1)
 {
   error ("%s", s1);
   exit (EXIT_FAILURE);
@@ -186,8 +184,7 @@
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 static long *
-xmalloc (size)
-     int size;
+xmalloc (int size)
 {
   long *result = (long *) malloc (((unsigned) size));
   if (result == ((long *) NULL))
@@ -196,9 +193,7 @@
 }
 
 static long *
-xrealloc (ptr, size)
-     long *ptr;
-     int size;
+xrealloc (long int *ptr, int size)
 {
   long *result = (long *) realloc (ptr, ((unsigned) size));
   if (result == ((long *) NULL))
@@ -209,8 +204,7 @@
 /* Initialize a linebuffer for use */
 
 void
-init_linebuffer (linebuffer)
-     struct linebuffer *linebuffer;
+init_linebuffer (struct linebuffer *linebuffer)
 {
   linebuffer->size = INITIAL_LINE_SIZE;
   linebuffer->buffer = ((char *) xmalloc (INITIAL_LINE_SIZE));
@@ -220,9 +214,7 @@
    Return the length of the line.  */
 
 long
-readline (linebuffer, stream)
-     struct linebuffer *linebuffer;
-     FILE *stream;
+readline (struct linebuffer *linebuffer, FILE *stream)
 {
   char *buffer = linebuffer->buffer;
   char *p = linebuffer->buffer;
@@ -257,9 +249,7 @@
    If there is no keyword, return NULL and don't alter *REST.  */
 
 char *
-get_keyword (field, rest)
-     register char *field;
-     char **rest;
+get_keyword (register char *field, char **rest)
 {
   static char keyword[KEYWORD_SIZE];
   register char *ptr;
@@ -284,8 +274,7 @@
 /* Nonzero if the string FIELD starts with a colon-terminated keyword.  */
 
 boolean
-has_keyword (field)
-     char *field;
+has_keyword (char *field)
 {
   char *ignored;
   return (get_keyword (field, &ignored) != ((char *) NULL));
@@ -302,9 +291,7 @@
    the caller has to make it big enough.  */
 
 char *
-add_field (the_list, field, where)
-     line_list the_list;
-     register char *field, *where;
+add_field (line_list the_list, register char *field, register char *where)
 {
   register char c;
   while (true)
@@ -360,7 +347,7 @@
 }
 
 line_list
-make_file_preface ()
+make_file_preface (void)
 {
   char *the_string, *temp;
   long idiotic_interface;
@@ -404,9 +391,7 @@
 }
 
 void
-write_line_list (the_list, the_stream)
-     register line_list the_list;
-     FILE *the_stream;
+write_line_list (register line_list the_list, FILE *the_stream)
 {
   for ( ;
       the_list != ((line_list) NULL) ;
@@ -419,7 +404,7 @@
 }
 
 int
-close_the_streams ()
+close_the_streams (void)
 {
   register stream_list rem;
   for (rem = the_streams;
@@ -432,9 +417,7 @@
 }
 
 void
-add_a_stream (the_stream, closing_action)
-     FILE *the_stream;
-     int (*closing_action)();
+add_a_stream (FILE *the_stream, int (*closing_action) (FILE *))
 {
   stream_list old = the_streams;
   the_streams = new_stream ();
@@ -445,8 +428,7 @@
 }
 
 int
-my_fclose (the_file)
-     FILE *the_file;
+my_fclose (FILE *the_file)
 {
   putc ('\n', the_file);
   fflush (the_file);
@@ -454,8 +436,7 @@
 }
 
 boolean
-open_a_file (name)
-     char *name;
+open_a_file (char *name)
 {
   FILE *the_stream = fopen (name, "a");
   if (the_stream != ((FILE *) NULL))
@@ -470,8 +451,7 @@
 }
 
 void
-put_string (s)
-     char *s;
+put_string (char *s)
 {
   register stream_list rem;
   for (rem = the_streams;
@@ -482,8 +462,7 @@
 }
 
 void
-put_line (string)
-     char *string;
+put_line (char *string)
 {
   register stream_list rem;
   for (rem = the_streams;
@@ -543,9 +522,7 @@
    Call open_a_file for each file.  */
 
 void
-setup_files (the_list, field)
-     register line_list the_list;
-     register char *field;
+setup_files (register line_list the_list, register char *field)
 {
   register char *start;
   register char c;
@@ -581,8 +558,7 @@
    The result says how big to make the buffer to pass to parse_header.  */
 
 int
-args_size (the_header)
-     header the_header;
+args_size (header the_header)
 {
   register header old = the_header;
   register line_list rem;
@@ -613,9 +589,7 @@
    Also, if the header has any FCC fields, call setup_files for each one.  */
 
 void
-parse_header (the_header, where)
-     header the_header;
-     register char *where;
+parse_header (header the_header, register char *where)
 {
   register header old = the_header;
   do
@@ -647,7 +621,7 @@
    Continuation lines are grouped in the headers they continue.  */
 
 header
-read_header ()
+read_header (void)
 {
   register header the_header = ((header) NULL);
   register line_list *next_line = ((line_list *) NULL);
@@ -701,8 +675,7 @@
 }
 
 void
-write_header (the_header)
-     header the_header;
+write_header (header the_header)
 {
   register header old = the_header;
   do
@@ -719,9 +692,7 @@
 }
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   char *command_line;
   header the_header;
@@ -731,7 +702,7 @@
   register int size;
   FILE *the_pipe;
 
-  extern char *getenv ();
+  extern char *getenv (const char *);
 
   mail_program_name = getenv ("FAKEMAILER");
   if (!(mail_program_name && *mail_program_name))
--- a/lib-src/hexl.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/hexl.c	Thu Jul 08 17:09:35 2010 +0900
@@ -49,12 +49,10 @@
 int group_by = DEFAULT_GROUPING;
 char *progname;
 
-void usage();
+void usage(void);
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char **argv)
 {
   register long address;
   char string[18];
@@ -278,7 +276,7 @@
 }
 
 void
-usage ()
+usage (void)
 {
   fprintf (stderr, "usage: %s [-de] [-iso]\n", progname);
   exit (EXIT_FAILURE);
--- a/lib-src/make-docfile.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/make-docfile.c	Thu Jul 08 17:09:35 2010 +0900
@@ -67,9 +67,9 @@
 #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)
 #endif
 
-int scan_file ();
-int scan_lisp_file ();
-int scan_c_file ();
+int scan_file (char *filename);
+int scan_lisp_file (char *filename, char *mode);
+int scan_c_file (char *filename, char *mode);
 
 #ifdef MSDOS
 /* s/msdos.h defines this as sys_chdir, but we're not linking with the
@@ -91,8 +91,7 @@
 
 /* VARARGS1 */
 void
-error (s1, s2)
-     char *s1, *s2;
+error (char *s1, char *s2)
 {
   fprintf (stderr, "%s: ", progname);
   fprintf (stderr, s1, s2);
@@ -103,8 +102,7 @@
 
 /* VARARGS1 */
 void
-fatal (s1, s2)
-     char *s1, *s2;
+fatal (char *s1, char *s2)
 {
   error (s1, s2);
   exit (EXIT_FAILURE);
@@ -113,8 +111,7 @@
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 void *
-xmalloc (size)
-     unsigned int size;
+xmalloc (unsigned int size)
 {
   void *result = (void *) malloc (size);
   if (result == NULL)
@@ -123,9 +120,7 @@
 }
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int i;
   int err_count = 0;
@@ -187,8 +182,7 @@
 
 /* Add a source file name boundary marker in the output file.  */
 void
-put_filename (filename)
-     char *filename;
+put_filename (char *filename)
 {
   char *tmp;
 
@@ -207,8 +201,7 @@
 /* Return 1 if file is not found, 0 if it is found.  */
 
 int
-scan_file (filename)
-     char *filename;
+scan_file (char *filename)
 {
   int len = strlen (filename);
 
@@ -251,9 +244,7 @@
    spaces are output first.  */
 
 static INLINE void
-put_char (ch, state)
-     int ch;
-     struct rcsoc_state *state;
+put_char (int ch, struct rcsoc_state *state)
 {
   int out_ch;
   do
@@ -286,9 +277,7 @@
    keyword, but were in fact not.  */
 
 static void
-scan_keyword_or_put_char (ch, state)
-     int ch;
-     struct rcsoc_state *state;
+scan_keyword_or_put_char (int ch, struct rcsoc_state *state)
 {
   if (state->keyword
       && *state->cur_keyword_ptr == ch
@@ -359,11 +348,7 @@
    true if any were encountered.  */
 
 int
-read_c_string_or_comment (infile, printflag, comment, saw_usage)
-     FILE *infile;
-     int printflag;
-     int *saw_usage;
-     int comment;
+read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usage)
 {
   register int c;
   struct rcsoc_state state;
@@ -451,10 +436,7 @@
    MINARGS and MAXARGS are the minimum and maximum number of arguments.  */
 
 void
-write_c_args (out, func, buf, minargs, maxargs)
-     FILE *out;
-     char *func, *buf;
-     int minargs, maxargs;
+write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
 {
   register char *p;
   int in_ident = 0;
@@ -538,8 +520,7 @@
    Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED.  */
 
 int
-scan_c_file (filename, mode)
-     char *filename, *mode;
+scan_c_file (char *filename, char *mode)
 {
   FILE *infile;
   register int c;
@@ -815,8 +796,7 @@
  */
 
 void
-skip_white (infile)
-     FILE *infile;
+skip_white (FILE *infile)
 {
   char c = ' ';
   while (c == ' ' || c == '\t' || c == '\n' || c == '\r')
@@ -825,9 +805,7 @@
 }
 
 void
-read_lisp_symbol (infile, buffer)
-     FILE *infile;
-     char *buffer;
+read_lisp_symbol (FILE *infile, char *buffer)
 {
   char c;
   char *fillp = buffer;
@@ -855,8 +833,7 @@
 }
 
 int
-scan_lisp_file (filename, mode)
-     char *filename, *mode;
+scan_lisp_file (char *filename, char *mode)
 {
   FILE *infile;
   register int c;
--- a/lib-src/movemail.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/movemail.c	Thu Jul 08 17:09:35 2010 +0900
@@ -69,6 +69,9 @@
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
 #include "syswait.h"
 #ifdef MAIL_USE_POP
 #include "pop.h"
@@ -140,33 +143,35 @@
 #endif
 #endif
 
-char *strerror ();
+#ifndef HAVE_STRERROR
+char *strerror (int);
+#endif
 #ifdef HAVE_INDEX
-extern char *index __P ((const char *, int));
+extern char *index (const char *, int);
 #endif
 #ifdef HAVE_RINDEX
-extern char *rindex __P((const char *, int));
+extern char *rindex (const char *, int);
 #endif
 
-void fatal ();
-void error ();
-void pfatal_with_name ();
-void pfatal_and_delete ();
-char *concat ();
-long *xmalloc ();
-int popmail ();
-int pop_retr ();
-int mbx_write ();
-int mbx_delimit_begin ();
-int mbx_delimit_end ();
+static void fatal (char *s1, char *s2, char *s3);
+static void error (char *s1, char *s2, char *s3);
+static void pfatal_with_name (char *name);
+static void pfatal_and_delete (char *name);
+static char *concat (char *s1, char *s2, char *s3);
+static long *xmalloc (unsigned int size);
+#ifdef MAIL_USE_POP
+static int popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse_order);
+static int pop_retr (popserver server, int msgno, FILE *arg);
+static int mbx_write (char *line, int len, FILE *mbf);
+static int mbx_delimit_begin (FILE *mbf);
+static int mbx_delimit_end (FILE *mbf);
+#endif
 
 /* Nonzero means this is name of a lock file to delete on fatal error.  */
 char *delete_lockname;
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   char *inname, *outname;
   int indesc, outdesc;
@@ -589,9 +594,8 @@
 
 /* Print error message and exit.  */
 
-void
-fatal (s1, s2, s3)
-     char *s1, *s2, *s3;
+static void
+fatal (char *s1, char *s2, char *s3)
 {
   if (delete_lockname)
     unlink (delete_lockname);
@@ -602,9 +606,8 @@
 /* Print error message.  `s1' is printf control string, `s2' and `s3'
    are args for it or null. */
 
-void
-error (s1, s2, s3)
-     char *s1, *s2, *s3;
+static void
+error (char *s1, char *s2, char *s3)
 {
   fprintf (stderr, "movemail: ");
   if (s3)
@@ -616,16 +619,14 @@
   fprintf (stderr, "\n");
 }
 
-void
-pfatal_with_name (name)
-     char *name;
+static void
+pfatal_with_name (char *name)
 {
   fatal ("%s for %s", strerror (errno), name);
 }
 
-void
-pfatal_and_delete (name)
-     char *name;
+static void
+pfatal_and_delete (char *name)
 {
   char *s = strerror (errno);
   unlink (name);
@@ -634,9 +635,8 @@
 
 /* Return a newly-allocated string whose contents concatenate those of s1, s2, s3.  */
 
-char *
-concat (s1, s2, s3)
-     char *s1, *s2, *s3;
+static char *
+concat (char *s1, char *s2, char *s3)
 {
   int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
   char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
@@ -651,9 +651,8 @@
 
 /* Like malloc but get fatal error if memory is exhausted.  */
 
-long *
-xmalloc (size)
-     unsigned size;
+static long *
+xmalloc (unsigned int size)
 {
   long *result = (long *) malloc (size);
   if (!result)
@@ -702,19 +701,14 @@
  * Return a value suitable for passing to `exit'.
  */
 
-int
-popmail (mailbox, outfile, preserve, password, reverse_order)
-     char *mailbox;
-     char *outfile;
-     int preserve;
-     char *password;
-     int reverse_order;
+static int
+popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse_order)
 {
   int nmsgs, nbytes;
   register int i;
   int mbfi;
   FILE *mbf;
-  char *getenv ();
+  char *getenv (const char *);
   popserver server;
   int start, end, increment;
   char *user, *hostname;
@@ -833,13 +827,9 @@
   return EXIT_SUCCESS;
 }
 
-int
-pop_retr (server, msgno, arg)
-     popserver server;
-     int msgno;
-     FILE *arg;
+static int
+pop_retr (popserver server, int msgno, FILE *arg)
 {
-  extern char *strerror ();
   char *line;
   int ret;
 
@@ -884,11 +874,8 @@
 			 && (a[3] == 'm') \
 			 && (a[4] == ' '))
 
-int
-mbx_write (line, len, mbf)
-     char *line;
-     int len;
-     FILE *mbf;
+static int
+mbx_write (char *line, int len, FILE *mbf)
 {
 #ifdef MOVEMAIL_QUOTE_POP_FROM_LINES
   if (IS_FROM_LINE (line))
@@ -911,9 +898,8 @@
   return (OK);
 }
 
-int
-mbx_delimit_begin (mbf)
-     FILE *mbf;
+static int
+mbx_delimit_begin (FILE *mbf)
 {
   time_t now;
   struct tm *ltime;
@@ -929,9 +915,8 @@
   return (OK);
 }
 
-int
-mbx_delimit_end (mbf)
-     FILE *mbf;
+static int
+mbx_delimit_end (FILE *mbf)
 {
   if (putc ('\n', mbf) == EOF)
     return (NOTOK);
--- a/lib-src/pop.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/pop.c	Thu Jul 08 17:09:35 2010 +0900
@@ -108,24 +108,16 @@
 #endif
 #endif
 
-#ifndef __P
-# ifdef __STDC__
-#  define __P(a) a
-# else
-#  define __P(a) ()
-# endif /* __STDC__ */
-#endif /* ! __P */
-
-static int socket_connection __P((char *, int));
-static int pop_getline __P((popserver, char **));
-static int sendline __P((popserver, char *));
-static int fullwrite __P((int, char *, int));
-static int getok __P((popserver));
+static int socket_connection (char *, int);
+static int pop_getline (popserver, char **);
+static int sendline (popserver, char *);
+static int fullwrite (int, char *, int);
+static int getok (popserver);
 #if 0
-static int gettermination __P((popserver));
+static int gettermination (popserver);
 #endif
-static void pop_trash __P((popserver));
-static char *find_crlf __P((char *, int));
+static void pop_trash (popserver);
+static char *find_crlf (char *, int);
 
 #define ERROR_MAX 160		/* a pretty arbitrary size, but needs
 				   to be bigger than the original
@@ -174,11 +166,7 @@
  * 	explanation of the error.
  */
 popserver
-pop_open (host, username, password, flags)
-     char *host;
-     char *username;
-     char *password;
-     int flags;
+pop_open (char *host, char *username, char *password, int flags)
 {
   int sock;
   popserver server;
@@ -345,10 +333,7 @@
  * 	connection impossible.
  */
 int
-pop_stat (server, count, size)
-     popserver server;
-     int *count;
-     int *size;
+pop_stat (popserver server, int *count, int *size)
 {
   char *fromserver;
   char *end_ptr;
@@ -421,11 +406,7 @@
  * 	connection impossible.
  */
 int
-pop_list (server, message, IDs, sizes)
-     popserver server;
-     int message;
-     int **IDs;
-     int **sizes;
+pop_list (popserver server, int message, int **IDs, int **sizes)
 {
   int how_many, i;
   char *fromserver;
@@ -567,11 +548,7 @@
  * Side effects: May kill connection on error.
  */
 int
-pop_retrieve (server, message, markfrom, msg_buf)
-     popserver server;
-     int message;
-     int markfrom;
-     char **msg_buf;
+pop_retrieve (popserver server, int message, int markfrom, char **msg_buf)
 {
   int *IDs, *sizes, bufsize, fromcount = 0, cp = 0;
   char *ptr, *fromserver;
@@ -635,7 +612,7 @@
 	    }
 	  ptr[cp++] = '>';
 	}
-      bcopy (fromserver, &ptr[cp], ret);
+      memcpy (&ptr[cp], fromserver, ret);
       cp += ret;
       ptr[cp++] = '\n';
     }
@@ -645,10 +622,7 @@
 }
 
 int
-pop_retrieve_first (server, message, response)
-     popserver server;
-     int message;
-     char **response;
+pop_retrieve_first (popserver server, int message, char **response)
 {
   sprintf (pop_error, "RETR %d", message);
   return (pop_multi_first (server, pop_error, response));
@@ -663,25 +637,19 @@
   */
 
 int
-pop_retrieve_next (server, line)
-     popserver server;
-     char **line;
+pop_retrieve_next (popserver server, char **line)
 {
   return (pop_multi_next (server, line));
 }
 
 int
-pop_retrieve_flush (server)
-     popserver server;
+pop_retrieve_flush (popserver server)
 {
   return (pop_multi_flush (server));
 }
 
 int
-pop_top_first (server, message, lines, response)
-     popserver server;
-     int message, lines;
-     char **response;
+pop_top_first (popserver server, int message, int lines, char **response)
 {
   sprintf (pop_error, "TOP %d %d", message, lines);
   return (pop_multi_first (server, pop_error, response));
@@ -696,25 +664,19 @@
   */
 
 int
-pop_top_next (server, line)
-     popserver server;
-     char **line;
+pop_top_next (popserver server, char **line)
 {
   return (pop_multi_next (server, line));
 }
 
 int
-pop_top_flush (server)
-     popserver server;
+pop_top_flush (popserver server)
 {
   return (pop_multi_flush (server));
 }
 
 int
-pop_multi_first (server, command, response)
-     popserver server;
-     char *command;
-     char **response;
+pop_multi_first (popserver server, char *command, char **response)
 {
   if (server->in_multi)
     {
@@ -757,9 +719,7 @@
   0, LINE is set to null. */
 
 int
-pop_multi_next (server, line)
-     popserver server;
-     char **line;
+pop_multi_next (popserver server, char **line)
 {
   char *fromserver;
   int ret;
@@ -797,8 +757,7 @@
 }
 
 int
-pop_multi_flush (server)
-     popserver server;
+pop_multi_flush (popserver server)
 {
   char *line;
   int ret;
@@ -829,9 +788,7 @@
  * 	otherwise.
  */
 int
-pop_delete (server, message)
-     popserver server;
-     int message;
+pop_delete (popserver server, int message)
 {
   if (server->in_multi)
     {
@@ -861,8 +818,7 @@
  * Side effects: Closes connection on error.
  */
 int
-pop_noop (server)
-     popserver server;
+pop_noop (popserver server)
 {
   if (server->in_multi)
     {
@@ -891,8 +847,7 @@
  * Side effects: Closes the connection on error.
  */
 int
-pop_last (server)
-     popserver server;
+pop_last (popserver server)
 {
   char *fromserver;
 
@@ -949,8 +904,7 @@
  * Side effects: Closes the connection on error.
  */
 int
-pop_reset (server)
-     popserver server;
+pop_reset (popserver server)
 {
   if (pop_retrieve_flush (server))
     {
@@ -978,8 +932,7 @@
  * 	function is called, even if an error occurs.
  */
 int
-pop_quit (server)
-     popserver server;
+pop_quit (popserver server)
 {
   int ret = 0;
 
@@ -1023,9 +976,7 @@
  * 	into pop_error.
  */
 static int
-socket_connection (host, flags)
-     char *host;
-     int flags;
+socket_connection (char *host, int flags)
 {
 #ifdef HAVE_GETADDRINFO
   struct addrinfo *res, *it;
@@ -1069,7 +1020,7 @@
   }
 #endif
 
-  bzero ((char *) &addr, sizeof (addr));
+  memset (&addr, 0, sizeof (addr));
   addr.sin_family = AF_INET;
 
   /** "kpop" service is  never used: look for 20060515 to see why **/
@@ -1145,8 +1096,7 @@
           if (it->ai_addrlen == sizeof (addr))
             {
               struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr;
-              bcopy (&in_a->sin_addr, (char *) &addr.sin_addr,
-                     sizeof (addr.sin_addr));
+              memcpy (&addr.sin_addr, &in_a->sin_addr, sizeof (addr.sin_addr));
               if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr)))
                 break;
             }
@@ -1174,8 +1124,7 @@
 
   while (*hostent->h_addr_list)
     {
-      bcopy (*hostent->h_addr_list, (char *) &addr.sin_addr,
-	     hostent->h_length);
+      memcpy (&addr.sin_addr, *hostent->h_addr_list, hostent->h_length);
       if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr)))
 	break;
       hostent->h_addr_list++;
@@ -1335,9 +1284,7 @@
  * THE RETURNED LINE MAY CONTAIN EMBEDDED NULLS!
  */
 static int
-pop_getline (server, line)
-     popserver server;
-     char **line;
+pop_getline (popserver server, char **line)
 {
 #define GETLINE_ERROR "Error reading from server: "
 
@@ -1369,8 +1316,8 @@
 	}
       else
 	{
-	  bcopy (server->buffer + server->buffer_index,
-		 server->buffer, server->data);
+	  memmove (server->buffer, server->buffer + server->buffer_index,
+		   server->data);
 	  /* Record the fact that we've searched the data already in
              the buffer for a CRLF, so that when we search below, we
              don't have to search the same data twice.  There's a "-
@@ -1467,9 +1414,7 @@
  * Side effects: Closes the connection on error.
  */
 static int
-sendline (server, line)
-     popserver server;
-     char *line;
+sendline (popserver server, char *line)
 {
 #define SENDLINE_ERROR "Error writing to POP server: "
   int ret;
@@ -1516,10 +1461,7 @@
  * Return value: Same as write.  Pop_error is not set.
  */
 static int
-fullwrite (fd, buf, nbytes)
-     int fd;
-     char *buf;
-     int nbytes;
+fullwrite (int fd, char *buf, int nbytes)
 {
   char *cp;
   int ret = 0;
@@ -1549,8 +1491,7 @@
  * Side effects: On failure, may make the connection unusable.
  */
 static int
-getok (server)
-     popserver server;
+getok (popserver server)
 {
   char *fromline;
 
@@ -1621,8 +1562,7 @@
  * 	since the last pop_reset) may be lost.
  */
 void
-pop_close (server)
-     popserver server;
+pop_close (popserver server)
 {
   pop_trash (server);
   free ((char *) server);
@@ -1638,8 +1578,7 @@
  * 	pop_close or pop_quit after this function has been called.
  */
 static void
-pop_trash (server)
-     popserver server;
+pop_trash (popserver server)
 {
   if (server->file >= 0)
     {
@@ -1671,9 +1610,7 @@
    null, or 0 if it does not contain one.  */
 
 static char *
-find_crlf (in_string, len)
-     char *in_string;
-     int len;
+find_crlf (char *in_string, int len)
 {
   while (len--)
     {
--- a/lib-src/profile.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/profile.c	Thu Jul 08 17:09:35 2010 +0900
@@ -40,7 +40,7 @@
 /* Reset the stopwatch to zero.  */
 
 void
-reset_watch ()
+reset_watch (void)
 {
   EMACS_GET_TIME (TV1);
   watch_not_started = 0;
@@ -51,7 +51,7 @@
    If reset_watch was not called yet, exit.  */
 
 char *
-get_time ()
+get_time (void)
 {
   if (watch_not_started)
     exit (EXIT_FAILURE);  /* call reset_watch first ! */
@@ -79,7 +79,7 @@
 #endif
 
 int
-main ()
+main (void)
 {
   int c;
   while ((c = getchar ()) != EOF)
--- a/lib-src/sorted-doc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/sorted-doc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -65,8 +65,7 @@
 /* Print error message.  `s1' is printf control string, `s2' is arg for it. */
 
 void
-error (s1, s2)
-     char *s1, *s2;
+error (char *s1, char *s2)
 {
   fprintf (stderr, "sorted-doc: ");
   fprintf (stderr, s1, s2);
@@ -76,8 +75,7 @@
 /* Print error message and exit.  */
 
 void
-fatal (s1, s2)
-     char *s1, *s2;
+fatal (char *s1, char *s2)
 {
   error (s1, s2);
   exit (EXIT_FAILURE);
@@ -86,8 +84,7 @@
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 char *
-xmalloc (size)
-     int size;
+xmalloc (int size)
 {
   char *result = malloc ((unsigned)size);
   if (result == NULL)
@@ -96,8 +93,7 @@
 }
 
 char *
-xstrdup (str)
-     char * str;
+xstrdup (char *str)
 {
   char *buf = xmalloc (strlen (str) + 1);
   (void) strcpy (buf, str);
@@ -107,16 +103,15 @@
 /* Comparison function for qsort to call.  */
 
 int
-cmpdoc (a, b)
-     DOCSTR **a;
-     DOCSTR **b;
+cmpdoc (const void *va, const void *vb)
 {
+  DOCSTR *const *a = va;
+  DOCSTR *const *b = vb;
   register int val = strcmp ((*a)->name, (*b)->name);
   if (val) return val;
   return (*a)->type - (*b)->type;
 }
 
-
 enum state
 {
   WAITING, BEG_NAME, NAME_GET, BEG_DESC, DESC_GET
@@ -128,7 +123,7 @@
 };
 
 int
-main ()
+main (void)
 {
   register DOCSTR *dp = NULL;	/* allocated DOCSTR */
   register LINE *lp = NULL;	/* allocated line */
--- a/lib-src/test-distrib.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/test-distrib.c	Thu Jul 08 17:09:35 2010 +0900
@@ -52,10 +52,7 @@
 
 /* Like `read' but keeps trying until it gets SIZE bytes or reaches eof.  */
 int
-cool_read (fd, buf, size)
-     int fd;
-     char *buf;
-     int size;
+cool_read (int fd, char *buf, int size)
 {
   int num, sofar = 0;
 
@@ -70,9 +67,7 @@
 }
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int fd;
 
--- a/lib-src/update-game-score.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lib-src/update-game-score.c	Thu Jul 08 17:09:35 2010 +0900
@@ -64,21 +64,13 @@
 #define MAX_SCORES 200
 #define MAX_DATA_LEN 1024
 
-/* Declare the prototype for a general external function.  */
-#if defined (PROTOTYPES) || defined (WINDOWSNT)
-#define P_(proto) proto
-#else
-#define P_(proto) ()
-#endif
-
 #ifndef HAVE_DIFFTIME
 /* OK on POSIX (time_t is arithmetic type) modulo overflow in subtraction.  */
 #define difftime(t1, t0) (double)((t1) - (t0))
 #endif
 
 int
-usage (err)
-     int err;
+usage (int err)
 {
   fprintf (stdout, "Usage: update-game-score [-m MAX ] [ -r ] game/scorefile SCORE DATA\n");
   fprintf (stdout, "       update-game-score -h\n");
@@ -89,8 +81,8 @@
   exit (err);
 }
 
-int lock_file P_ ((const char *filename, void **state));
-int unlock_file P_ ((const char *filename, void *state));
+int lock_file (const char *filename, void **state);
+int unlock_file (const char *filename, void *state);
 
 struct score_entry
 {
@@ -99,25 +91,24 @@
   char *data;
 };
 
-int read_scores P_ ((const char *filename, struct score_entry **scores,
-		     int *count));
-int push_score P_ ((struct score_entry **scores, int *count,
-		    int newscore, char *username, char *newdata));
-void sort_scores P_ ((struct score_entry *scores, int count, int reverse));
-int write_scores P_ ((const char *filename, const struct score_entry *scores,
-		      int count));
+int read_scores (const char *filename, struct score_entry **scores,
+                 int *count);
+int push_score (struct score_entry **scores, int *count,
+                int newscore, char *username, char *newdata);
+void sort_scores (struct score_entry *scores, int count, int reverse);
+int write_scores (const char *filename, const struct score_entry *scores,
+                  int count);
 
-void lose P_ ((const char *msg)) NO_RETURN;
+void lose (const char *msg) NO_RETURN;
 
 void
-lose (msg)
-     const char *msg;
+lose (const char *msg)
 {
   fprintf (stderr, "%s\n", msg);
   exit (EXIT_FAILURE);
 }
 
-void lose_syserr P_ ((const char *msg)) NO_RETURN;
+void lose_syserr (const char *msg) NO_RETURN;
 
 /* Taken from sysdep.c.  */
 #ifndef HAVE_STRERROR
@@ -137,15 +128,14 @@
 #endif /* ! HAVE_STRERROR */
 
 void
-lose_syserr (msg)
-     const char *msg;
+lose_syserr (const char *msg)
 {
   fprintf (stderr, "%s: %s\n", msg, strerror (errno));
   exit (EXIT_FAILURE);
 }
 
 char *
-get_user_id P_ ((void))
+get_user_id (void)
 {
   char *name;
   struct passwd *buf = getpwuid (getuid ());
@@ -166,9 +156,7 @@
 }
 
 char *
-get_prefix (running_suid, user_prefix)
-     int running_suid;
-     char *user_prefix;
+get_prefix (int running_suid, char *user_prefix)
 {
   if (!running_suid && user_prefix == NULL)
     lose ("Not using a shared game directory, and no prefix given.");
@@ -184,9 +172,7 @@
 }
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int c, running_suid;
   void *lockstate;
@@ -273,9 +259,7 @@
 }
 
 int
-read_score (f, score)
-     FILE *f;
-     struct score_entry *score;
+read_score (FILE *f, struct score_entry *score)
 {
   int c;
   if (feof (f))
@@ -359,10 +343,7 @@
 }
 
 int
-read_scores (filename, scores, count)
-     const char *filename;
-     struct score_entry **scores;
-     int *count;
+read_scores (const char *filename, struct score_entry **scores, int *count)
 {
   int readval, scorecount, cursize;
   struct score_entry *ret;
@@ -395,9 +376,7 @@
 }
 
 int
-score_compare (a, b)
-     const void *a;
-     const void *b;
+score_compare (const void *a, const void *b)
 {
   const struct score_entry *sa = (const struct score_entry *) a;
   const struct score_entry *sb = (const struct score_entry *) b;
@@ -405,9 +384,7 @@
 }
 
 int
-score_compare_reverse (a, b)
-     const void *a;
-     const void *b;
+score_compare_reverse (const void *a, const void *b)
 {
   const struct score_entry *sa = (const struct score_entry *) a;
   const struct score_entry *sb = (const struct score_entry *) b;
@@ -415,11 +392,7 @@
 }
 
 int
-push_score (scores, count, newscore, username, newdata)
-     struct score_entry **scores;
-     int *count; int newscore;
-     char *username;
-     char *newdata;
+push_score (struct score_entry **scores, int *count, int newscore, char *username, char *newdata)
 {
  struct score_entry *newscores
    = (struct score_entry *) realloc (*scores,
@@ -435,20 +408,14 @@
 }
 
 void
-sort_scores (scores, count, reverse)
-     struct score_entry *scores;
-     int count;
-     int reverse;
+sort_scores (struct score_entry *scores, int count, int reverse)
 {
   qsort (scores, count, sizeof (struct score_entry),
 	reverse ? score_compare_reverse : score_compare);
 }
 
 int
-write_scores (filename, scores, count)
-     const char *filename;
-     const struct score_entry * scores;
-     int count;
+write_scores (const char *filename, const struct score_entry *scores, int count)
 {
   FILE *f;
   int i;
@@ -477,9 +444,7 @@
 }
 
 int
-lock_file (filename, state)
-  const char *filename;
-  void **state;
+lock_file (const char *filename, void **state)
 {
   int fd;
   struct stat buf;
@@ -520,9 +485,7 @@
 }
 
 int
-unlock_file (filename, state)
-  const char *filename;
- void *state;
+unlock_file (const char *filename, void *state)
 {
   char *lockpath = (char *) state;
   int ret = unlink (lockpath);
--- a/lisp/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,90 @@
+2010-07-08  Daiki Ueno  <ueno@unixuser.org>
+
+	* epa-file.el (epa-file-error, epa-file--find-file-not-found-function)
+	(epa-file-insert-file-contents): Hack to prevent
+	find-file from opening empty buffer when decryptin failed
+	(bug#6568).
+
+2010-07-07  Agustín Martín  <agustin.martin@hispalinux.es>
+
+	* ispell.el (ispell-alternate-dictionary): Use file-readable-p.
+	Return nil if no word-list is found at default locations.
+	(ispell-complete-word-dict): Default to nil.
+	(ispell-command-loop): Use 'word-list' when using lookup-words.
+	(lookup-words): Use ispell-complete-word-dict or
+	ispell-alternate-dictionary.  Check for word-list availability
+	and handle errors if needed with better messages (Bug#6539).
+	(ispell-complete-word): Use ispell-complete-word-dict or
+	ispell-alternate-dictionary.
+
+2010-07-07  Glenn Morris  <rgm@gnu.org>
+
+	* play/zone.el (top-level): Do not require timer, tabify, or cl.
+	(zone-shift-left): Ignore intangibility, and any errors from
+	forward-char.
+	(zone-shift-right): Remove no-op end-of-line.  Ignore intangibility.
+	(zone-pgm-putz-with-case): Use upcase-region rather than inserting,
+	deleting, and copying text properties.
+	(zone-line-specs, zone-pgm-stress): Check forward-line exit status.
+	(zone-pgm-rotate): Handle odd buffers like that of gomoku, where getting
+	to point-max is hard.
+	(zone-fret, zone-fill-out-screen): Replace cl's do with dotimes.
+	(zone-fill-out-screen): Ignore intangibility.
+
+2010-07-05  Chong Yidong  <cyd@stupidchicken.com>
+
+	* menu-bar.el (menu-bar-mode):
+	* tool-bar.el (tool-bar-mode): Replace default-frame-alist element
+	if it has been set.
+
+	* mouse.el (mouse-drag-track): Call mouse-start-end to handle
+	word/line selection (Bug#6565).
+
+2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
+
+	* net/dbus.el (dbus-send-signal): Declare function.
+
+2010-07-04  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/dbus.el: Implement signal "PropertiesChanged" (from D-Bus 1.3.1).
+	(dbus-register-property): New optional argument EMITS-SIGNAL.
+	(dbus-property-handler): Send signal "PropertiesChanged" if requested.
+
+2010-07-03  Chong Yidong  <cyd@stupidchicken.com>
+
+	* mouse.el (mouse-drag-overlay): Variable deleted.
+	(mouse-move-drag-overlay, mouse-show-mark): Functions deleted.
+	(mouse--remap-link-click-p): New function.
+	(mouse-drag-track): Handle dragging by using temporary Transient
+	Mark mode, instead of a special overlay.
+	(mouse-kill-ring-save, mouse-save-then-kill): Don't call
+	mouse-show-mark.
+
+	* mouse-sel.el (mouse-sel-selection-alist): mouse-drag-overlay
+	deleted.
+
+2010-07-02  Juri Linkov  <juri@jurta.org>
+
+	* autoinsert.el (auto-insert-alist): Fix readability
+	by using dotted pair notation for lambda.
+
+2010-07-02  Juri Linkov  <juri@jurta.org>
+
+	* faces.el (read-face-name): Rename arg `string-describing-default'
+	to `default'.  Doc fix.  Display the default value in quotes
+	in the prompt.  With empty input, return the `default' arg,
+	unless the default value is a string (in which case return nil).
+	(describe-face): Replace the string `default' arg of `read-face-name'
+	with the symbol `default'.
+
+2010-07-02  Chong Yidong  <cyd@stupidchicken.com>
+
+	* emulation/viper-cmd.el (viper-delete-backward-char)
+	(viper-del-backward-char-in-insert)
+	(viper-del-backward-char-in-replace, viper-change)
+	(viper-backward-indent): Replace delete-backward-char with
+	delete-char (Bug#6552).
+
 2010-07-01  Chong Yidong  <cyd@stupidchicken.com>
 
 	* ruler-mode.el (ruler--save-header-line-format): Fix typos.
--- a/lisp/autoinsert.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/autoinsert.el	Thu Jul 08 17:09:35 2010 +0900
@@ -126,10 +126,10 @@
      _ "\n\\begin{document}\n" _
      "\n\\end{document}")
 
-    (("/bin/.*[^/]\\'" . "Shell-Script mode magic number")
-     lambda ()
+    (("/bin/.*[^/]\\'" . "Shell-Script mode magic number") .
+     (lambda ()
        (if (eq major-mode (default-value 'major-mode))
-	 (sh-mode)))
+	   (sh-mode))))
 
     (ada-mode . ada-header)
 
--- a/lisp/bookmark.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/bookmark.el	Thu Jul 08 17:09:35 2010 +0900
@@ -1860,8 +1860,7 @@
         (pop-up-windows t))
     (delete-other-windows)
     (switch-to-buffer (other-buffer))
-    (let ((bookmark-automatically-show-annotations nil)) ;FIXME: needed?
-      (bookmark--jump-via bmrk 'pop-to-buffer))
+    (bookmark--jump-via bmrk 'pop-to-buffer)
     (bury-buffer menu)))
 
 
@@ -1875,8 +1874,7 @@
   "Select this line's bookmark in other window, leaving bookmark menu visible."
   (interactive)
   (let ((bookmark (bookmark-bmenu-bookmark)))
-    (let ((bookmark-automatically-show-annotations t)) ;FIXME: needed?
-      (bookmark--jump-via bookmark 'switch-to-buffer-other-window))))
+    (bookmark--jump-via bookmark 'switch-to-buffer-other-window)))
 
 
 (defun bookmark-bmenu-switch-other-window ()
@@ -1887,8 +1885,7 @@
         (pop-up-windows t)
         same-window-buffer-names
         same-window-regexps)
-    (let ((bookmark-automatically-show-annotations t)) ;FIXME: needed?
-      (bookmark--jump-via bookmark 'display-buffer))))
+    (bookmark--jump-via bookmark 'display-buffer)))
 
 (defun bookmark-bmenu-other-window-with-mouse (event)
   "Select bookmark at the mouse pointer in other window, leaving bookmark menu visible."
--- a/lisp/emulation/viper-cmd.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/emulation/viper-cmd.el	Thu Jul 08 17:09:35 2010 +0900
@@ -4247,7 +4247,7 @@
 	  (setq viper-use-register nil)))
     (if (and (bolp) viper-ex-style-editing)
 	(ding))
-    (delete-backward-char val t)))
+    (delete-char (- val) t)))
 
 
 (defun viper-del-backward-char-in-insert ()
@@ -4256,7 +4256,7 @@
   (if (and viper-ex-style-editing (bolp))
       (beep 1)
     ;; don't put on kill ring
-    (delete-backward-char 1 nil)))
+    (delete-char -1 nil)))
 
 
 (defun viper-del-backward-char-in-replace ()
@@ -4269,14 +4269,14 @@
   (cond (viper-delete-backwards-in-replace
 	 (cond ((not (bolp))
 		;; don't put on kill ring
-		(delete-backward-char 1 nil))
+		(delete-char -1 nil))
 	       (viper-ex-style-editing
 		(beep 1))
 	       ((bobp)
 		(beep 1))
 	       (t
 		;; don't put on kill ring
-		(delete-backward-char 1 nil))))
+		(delete-char -1 nil))))
 	(viper-ex-style-editing
 	 (if (bolp)
 	     (beep 1)
@@ -4344,7 +4344,7 @@
 	    (insert-before-markers "@") ; put placeholder after the TAB
 	    (untabify (viper-replace-start) (point))
 	    ;; del @, don't put on kill ring
-	    (delete-backward-char 1)
+	    (delete-char -1)
 
 	    (viper-set-replace-overlay-glyphs
 	     viper-replace-region-start-delimiter
@@ -4622,7 +4622,7 @@
 	    (progn
 	      (if (eq ?^ (preceding-char))
 		  (setq viper-preserve-indent t))
-	      (delete-backward-char 1)
+	      (delete-char -1)
 	      (setq p (point))
 	      (setq indent nil)))
 	(save-excursion
--- a/lisp/epa-file.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/epa-file.el	Thu Jul 08 17:09:35 2010 +0900
@@ -101,6 +101,14 @@
     (insert (epa-file--decode-coding-string string (or coding-system-for-read
 						       'undecided)))))
 
+(defvar epa-file-error nil)
+(defun epa-file--find-file-not-found-function ()
+  (let ((error epa-file-error))
+    (save-window-excursion
+      (kill-buffer))
+    (signal 'file-error
+	    (cons "Opening input file" (cdr error)))))
+
 (defvar last-coding-system-used)
 (defun epa-file-insert-file-contents (file &optional visit beg end replace)
   (barf-if-buffer-read-only)
@@ -131,6 +139,15 @@
 	    (error
 	     (if (setq entry (assoc file epa-file-passphrase-alist))
 		 (setcdr entry nil))
+	     ;; Hack to prevent find-file from opening empty buffer
+	     ;; when decryption failed (bug#6568).  See the place
+	     ;; where `find-file-not-found-functions' are called in
+	     ;; `find-file-noselect-1'.
+	     (make-local-variable 'epa-file-error)
+	     (setq epa-file-error error)
+	     (add-hook 'find-file-not-found-functions
+		       'epa-file--find-file-not-found-function
+		       nil t)
 	     (signal 'file-error
 		     (cons "Opening input file" (cdr error)))))
 	  (make-local-variable 'epa-file-encrypt-to)
--- a/lisp/faces.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/faces.el	Thu Jul 08 17:09:35 2010 +0900
@@ -915,13 +915,14 @@
 ;;; Interactively modifying faces.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defun read-face-name (prompt &optional string-describing-default multiple)
+(defun read-face-name (prompt &optional default multiple)
   "Read a face, defaulting to the face or faces on the char after point.
 If it has the property `read-face-name', that overrides the `face' property.
 PROMPT should be a string that describes what the caller will do with the face;
 it should not end in a space.
-STRING-DESCRIBING-DEFAULT should describe what default the caller will use if
-the user just types RET; you can omit it.
+The optional argument DEFAULT provides the value to display in the
+minibuffer prompt that is returned if the user just types RET
+unless DEFAULT is a string (in which case nil is returned).
 If MULTIPLE is non-nil, return a list of faces (possibly only one).
 Otherwise, return a single face."
   (let ((faceprop (or (get-char-property (point) 'read-face-name)
@@ -960,10 +961,10 @@
     (let* ((input
 	    ;; Read the input.
 	    (completing-read-multiple
-	     (if (or faces string-describing-default)
-		 (format "%s (default %s): " prompt
+	     (if (or faces default)
+		 (format "%s (default `%s'): " prompt
 			 (if faces (mapconcat 'symbol-name faces ",")
-			   string-describing-default))
+			   default))
 	       (format "%s: " prompt))
 	     (completion-table-in-turn nonaliasfaces aliasfaces)
 	     nil t nil 'face-name-history
@@ -971,7 +972,7 @@
 	   ;; Canonicalize the output.
 	   (output
 	    (cond ((or (equal input "") (equal input '("")))
-		   faces)
+		   (or faces (unless (stringp default) default)))
 		  ((stringp input)
 		   (mapcar 'intern (split-string input ", *" t)))
 		  ((listp input)
@@ -1334,7 +1335,7 @@
 If the optional argument FRAME is given, report on face FACE in that frame.
 If FRAME is t, report on the defaults for face FACE (for new frames).
 If FRAME is omitted or nil, use the selected frame."
-  (interactive (list (read-face-name "Describe face" "= `default' face" t)))
+  (interactive (list (read-face-name "Describe face" 'default t)))
   (let* ((attrs '((:family . "Family")
 		  (:foundry . "Foundry")
 		  (:width . "Width")
--- a/lisp/menu-bar.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/menu-bar.el	Thu Jul 08 17:09:35 2010 +0900
@@ -1937,15 +1937,20 @@
   ;; Turn the menu-bars on all frames on or off.
   (let ((val (if menu-bar-mode 1 0)))
     (dolist (frame (frame-list))
-      (set-frame-parameter frame 'menu-bar-lines val)))
-
+      (set-frame-parameter frame 'menu-bar-lines val))
+    ;; If the user has given `default-frame-alist' a `menu-bar-lines'
+    ;; parameter, replace it.
+    (if (assq 'menu-bar-lines default-frame-alist)
+	(setq default-frame-alist
+	      (cons (cons 'menu-bar-lines val)
+		    (assq-delete-all 'menu-bar-lines
+				     default-frame-alist)))))
   ;; Make the message appear when Emacs is idle.  We can not call message
   ;; directly.  The minor-mode message "Menu-bar mode disabled" comes
   ;; after this function returns, overwriting any message we do here.
   (when (and (called-interactively-p 'interactive) (not menu-bar-mode))
     (run-with-idle-timer 0 nil 'message
-			 "Menu-bar mode disabled.  Use M-x menu-bar-mode to make the menu bar appear."))
-  menu-bar-mode)
+			 "Menu-bar mode disabled.  Use M-x menu-bar-mode to make the menu bar appear.")))
 
 (defun toggle-menu-bar-mode-from-frame (&optional arg)
   "Toggle menu bar on or off, based on the status of the current frame.
--- a/lisp/mouse-sel.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/mouse-sel.el	Thu Jul 08 17:09:35 2010 +0900
@@ -129,11 +129,6 @@
 ;;   that the X primary selection is used.  Under other windowing systems,
 ;;   alternate functions are used, which simply store the selection value
 ;;   in a variable.
-;;
-;; * You can change the selection highlight face by altering the properties
-;;   of mouse-drag-overlay, eg.
-;;
-;;     (overlay-put mouse-drag-overlay 'face 'bold)
 
 ;;; Code:
 
@@ -293,8 +288,7 @@
   (overlay-put mouse-secondary-overlay 'face 'secondary-selection))
 
 (defconst mouse-sel-selection-alist
-  '((PRIMARY mouse-drag-overlay mouse-sel-primary-thing)
-    (SECONDARY mouse-secondary-overlay mouse-sel-secondary-thing))
+  '((SECONDARY mouse-secondary-overlay mouse-sel-secondary-thing))
   "Alist associating selections with variables.
 Each element is of the form:
 
--- a/lisp/mouse.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/mouse.el	Thu Jul 08 17:09:35 2010 +0900
@@ -772,13 +772,6 @@
     (or (eq window (selected-window))
 	(goto-char opoint))))
 
-;; Create an overlay and immediately delete it, to get "overlay in no buffer".
-(defconst mouse-drag-overlay
-  (let ((ol (make-overlay (point-min) (point-min))))
-    (delete-overlay ol)
-    (overlay-put ol 'face 'region)
-    ol))
-
 (defvar mouse-selection-click-count 0)
 
 (defvar mouse-selection-click-count-buffer nil)
@@ -905,27 +898,12 @@
 		    "mouse-1" (substring msg 7)))))))
   msg)
 
-(defun mouse-move-drag-overlay (ol start end mode)
-  (unless (= start end)
-    ;; Go to START first, so that when we move to END, if it's in the middle
-    ;; of intangible text, point jumps in the direction away from START.
-    ;; Don't do it if START=END otherwise a single click risks selecting
-    ;; a region if it's on intangible text.  This exception was originally
-    ;; only applied on entry to mouse-drag-region, which had the problem
-    ;; that a tiny move during a single-click would cause the intangible
-    ;; text to be selected.
-    (goto-char start)
-    (goto-char end)
-    (setq end (point)))
-  (let ((range (mouse-start-end start end mode)))
-    (move-overlay ol (car range) (nth 1 range))))
-
 (defun mouse-drag-track (start-event  &optional
 				      do-mouse-drag-region-post-process)
     "Track mouse drags by highlighting area between point and cursor.
-The region will be defined with mark and point, and the overlay
-will be deleted after return.  DO-MOUSE-DRAG-REGION-POST-PROCESS
-should only be used by mouse-drag-region."
+The region will be defined with mark and point.
+DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
+`mouse-drag-region'."
   (mouse-minibuffer-check start-event)
   (setq mouse-selection-click-count-buffer (current-buffer))
   ;; We must call deactivate-mark before repositioning point.
@@ -959,171 +937,138 @@
                        ;; intangible text.
                        (mouse-on-link-p start-posn)))
 	 (click-count (1- (event-click-count start-event)))
-	 (remap-double-click (and on-link
-				  (eq mouse-1-click-follows-link 'double)
-				  (= click-count 1)))
 	 ;; Suppress automatic hscrolling, because that is a nuisance
 	 ;; when setting point near the right fringe (but see below).
 	 (automatic-hscrolling-saved automatic-hscrolling)
-	 (automatic-hscrolling nil))
+	 (automatic-hscrolling nil)
+	 event end end-point)
+
     (setq mouse-selection-click-count click-count)
     ;; In case the down click is in the middle of some intangible text,
     ;; use the end of that text, and put it in START-POINT.
     (if (< (point) start-point)
 	(goto-char start-point))
     (setq start-point (point))
-    (if remap-double-click ;; Don't expand mouse overlay in links
-	(setq click-count 0))
-    (mouse-move-drag-overlay mouse-drag-overlay start-point start-point
-                             click-count)
-    (overlay-put mouse-drag-overlay 'window start-window)
-    (let (event end end-point last-end-point)
-      (track-mouse
-	(while (progn
-		 (setq event (read-event))
-                 (or (mouse-movement-p event)
-                     (memq (car-safe event) '(switch-frame select-window))))
-          (if (memq (car-safe event) '(switch-frame select-window))
-	      nil
-	    ;; Automatic hscrolling did not occur during the call to
-	    ;; `read-event'; but if the user subsequently drags the
-	    ;; mouse, go ahead and hscroll.
-	    (let ((automatic-hscrolling automatic-hscrolling-saved))
-	      (redisplay))
-	    (setq end (event-end event)
-		  end-point (posn-point end))
-	    (if (numberp end-point)
-		(setq last-end-point end-point))
+
+    ;; Activate the region, using `mouse-start-end' to determine where
+    ;; to put point and mark (e.g., double-click will select a word).
+    (setq transient-mark-mode
+	  (if (eq transient-mark-mode 'lambda)
+	      '(only)
+	    (cons 'only transient-mark-mode)))
+    (let ((range (mouse-start-end start-point start-point click-count)))
+      (goto-char (nth 0 range))
+      (push-mark nil nil t)
+      (goto-char (nth 1 range)))
 
-	    (cond
-	     ;; Are we moving within the original window?
-	     ((and (eq (posn-window end) start-window)
+    ;; Track the mouse until we get a non-movement event.
+    (track-mouse
+      (while (progn
+	       (setq event (read-event))
+	       (or (mouse-movement-p event)
+		   (memq (car-safe event) '(switch-frame select-window))))
+	(unless (memq (car-safe event) '(switch-frame select-window))
+	  ;; Automatic hscrolling did not occur during the call to
+	  ;; `read-event'; but if the user subsequently drags the
+	  ;; mouse, go ahead and hscroll.
+	  (let ((automatic-hscrolling automatic-hscrolling-saved))
+	    (redisplay))
+	  (setq end (event-end event)
+		end-point (posn-point end))
+	  (if (and (eq (posn-window end) start-window)
 		   (integer-or-marker-p end-point))
-              (mouse-move-drag-overlay mouse-drag-overlay start-point end-point click-count))
-
-	     (t
-	      (let ((mouse-row (cdr (cdr (mouse-position)))))
-                (cond
-                 ((null mouse-row))
-                 ((< mouse-row top)
-                  (mouse-scroll-subr start-window (- mouse-row top)
-                                     mouse-drag-overlay start-point))
-                 ((>= mouse-row bottom)
-                  (mouse-scroll-subr start-window (1+ (- mouse-row bottom))
-                                     mouse-drag-overlay start-point)))))))))
-
-      ;; In case we did not get a mouse-motion event
-      ;; for the final move of the mouse before a drag event
-      ;; pretend that we did get one.
-      (when (and (memq 'drag (event-modifiers (car-safe event)))
-                 (setq end (event-end event)
-		       end-point (posn-point end))
-		 (eq (posn-window end) start-window)
-		 (integer-or-marker-p end-point))
-        (mouse-move-drag-overlay mouse-drag-overlay start-point end-point click-count))
+	      ;; If moving in the original window, move point by going
+	      ;; to start first, so that if end is in intangible text,
+	      ;; point jumps away from start.  Don't do it if
+	      ;; start=end, or a single click would select a region if
+	      ;; it's on intangible text.
+	      (unless (= start-point end-point)
+		(goto-char start-point)
+		(goto-char end-point))
+	    (let ((mouse-row (cdr (cdr (mouse-position)))))
+	      (cond
+	       ((null mouse-row))
+	       ((< mouse-row top)
+		(mouse-scroll-subr start-window (- mouse-row top)
+				   nil start-point))
+	       ((>= mouse-row bottom)
+		(mouse-scroll-subr start-window (1+ (- mouse-row bottom))
+				   nil start-point))))))))
 
-      ;; Handle the terminating event
-      (if (consp event)
-	  (let* ((fun (key-binding (vector (car event))))
-		 (do-multi-click   (and (> (event-click-count event) 0)
-					(functionp fun)
-					(not (memq fun
-						   '(mouse-set-point
-						     mouse-set-region))))))
-	    ;; Run the binding of the terminating up-event, if possible.
-	    (if (and (not (= (overlay-start mouse-drag-overlay)
-			     (overlay-end mouse-drag-overlay)))
-		     (not do-multi-click))
-		(let* ((stop-point
-			(if (numberp (posn-point (event-end event)))
-			    (posn-point (event-end event))
-			  last-end-point))
-		       ;; The end that comes from where we ended the drag.
-		       ;; Point goes here.
-		       (region-termination
-			(if (and stop-point (< stop-point start-point))
-			    (overlay-start mouse-drag-overlay)
-			  (overlay-end mouse-drag-overlay)))
-		       ;; The end that comes from where we started the drag.
-		       ;; Mark goes there.
-		       (region-commencement
-			(- (+ (overlay-end mouse-drag-overlay)
-			      (overlay-start mouse-drag-overlay))
-			   region-termination))
-		       last-command this-command)
-		  ;; We copy the region before setting the mark so
-		  ;; that `select-active-regions' can override
-		  ;; `copy-region-as-kill'.
-		  (and mouse-drag-copy-region
-		       do-mouse-drag-region-post-process
-		       (let (deactivate-mark)
-			 (copy-region-as-kill region-commencement
-					      region-termination)))
-		  (push-mark region-commencement t t)
-		  (goto-char region-termination)
-		  (if (not do-mouse-drag-region-post-process)
-		      ;; Skip all post-event handling, return immediately.
-		      (delete-overlay mouse-drag-overlay)
-		    (let ((buffer (current-buffer)))
-		      (mouse-show-mark)
-		      ;; mouse-show-mark can call read-event,
-		      ;; and that means the Emacs server could switch buffers
-		      ;; under us.  If that happened,
-		      ;; avoid trying to use the region.
-		      (and (mark t) mark-active
-			   (eq buffer (current-buffer))
-			   (mouse-set-region-1)))))
-              ;; Run the binding of the terminating up-event.
-	      ;; If a multiple click is not bound to mouse-set-point,
-	      ;; cancel the effects of mouse-move-drag-overlay to
-	      ;; avoid producing wrong results.
-	      (if do-multi-click (goto-char start-point))
-              (delete-overlay mouse-drag-overlay)
-              (when (and (functionp fun)
-			 (= start-hscroll (window-hscroll start-window))
-			 ;; Don't run the up-event handler if the
-			 ;; window start changed in a redisplay after
-			 ;; the mouse-set-point for the down-mouse
-			 ;; event at the beginning of this function.
-			 ;; When the window start has changed, the
-			 ;; up-mouse event will contain a different
-			 ;; position due to the new window contents,
-			 ;; and point is set again.
-			 (or end-point
-			     (= (window-start start-window)
-				start-window-start)))
-		(when (and on-link
-			   (or (not end-point) (= end-point start-point))
-			   (consp event)
-			   (or remap-double-click
-			       (and
-				(not (eq mouse-1-click-follows-link 'double))
-				(= click-count 0)
-				(= (event-click-count event) 1)
-				(or (not (integerp mouse-1-click-follows-link))
-				    (let ((t0 (posn-timestamp (event-start start-event)))
-					  (t1 (posn-timestamp (event-end event))))
-				      (and (integerp t0) (integerp t1)
-					   (if (> mouse-1-click-follows-link 0)
-					       (<= (- t1 t0) mouse-1-click-follows-link)
-					     (< (- t0 t1) mouse-1-click-follows-link))))))))
-		  ;; If we rebind to mouse-2, reselect previous selected window,
-		  ;; so that the mouse-2 event runs in the same
-		  ;; situation as if user had clicked it directly.
-		  ;; Fixes the bug reported by juri@jurta.org on 2005-12-27.
-		  (if (or (vectorp on-link) (stringp on-link))
-		      (setq event (aref on-link 0))
-		    (select-window original-window)
-		    (setcar event 'mouse-2)
-		    ;; If this mouse click has never been done by
-		    ;; the user, it doesn't have the necessary
-		    ;; property to be interpreted correctly.
-		    (put 'mouse-2 'event-kind 'mouse-click)))
-		(push event unread-command-events))))
+    ;; Handle the terminating event if possible.
+    (when (consp event)
+      ;; Ensure that point is on the end of the last event.
+      (when (and (setq end-point (posn-point (event-end event)))
+		 (eq (posn-window end) start-window)
+		 (integer-or-marker-p end-point)
+		 (/= start-point end-point))
+	(goto-char start-point)
+	(goto-char end-point))
+      ;; Find its binding.
+      (let* ((fun (key-binding (vector (car event))))
+	     (do-multi-click (and (> (event-click-count event) 0)
+				  (functionp fun)
+				  (not (memq fun '(mouse-set-point
+						   mouse-set-region))))))
+	(if (and (/= (mark) (point))
+		 (not do-multi-click))
+	    ;; If point has moved, finish the drag.
+	    (let* (last-command this-command)
+	      ;; Copy the region so that `select-active-regions' can
+	      ;; override `copy-region-as-kill'.
+	      (and mouse-drag-copy-region
+		   do-mouse-drag-region-post-process
+		   (let (deactivate-mark)
+		     (copy-region-as-kill (mark) (point)))))
+	  ;; If point hasn't moved, run the binding of the
+	  ;; terminating up-event.
+	  (if do-multi-click
+	      (goto-char start-point)
+	    (deactivate-mark))
+	  (when (and (functionp fun)
+		     (= start-hscroll (window-hscroll start-window))
+		     ;; Don't run the up-event handler if the window
+		     ;; start changed in a redisplay after the
+		     ;; mouse-set-point for the down-mouse event at
+		     ;; the beginning of this function.  When the
+		     ;; window start has changed, the up-mouse event
+		     ;; contains a different position due to the new
+		     ;; window contents, and point is set again.
+		     (or end-point
+			 (= (window-start start-window)
+			    start-window-start)))
+	    (when (and on-link
+		       (= start-point (point))
+		       (mouse--remap-link-click-p start-event event))
+	      ;; If we rebind to mouse-2, reselect previous selected
+	      ;; window, so that the mouse-2 event runs in the same
+	      ;; situation as if user had clicked it directly.  Fixes
+	      ;; the bug reported by juri@jurta.org on 2005-12-27.
+	      (if (or (vectorp on-link) (stringp on-link))
+		  (setq event (aref on-link 0))
+		(select-window original-window)
+		(setcar event 'mouse-2)
+		;; If this mouse click has never been done by the
+		;; user, it doesn't have the necessary property to be
+		;; interpreted correctly.
+		(put 'mouse-2 'event-kind 'mouse-click)))
+	    (push event unread-command-events)))))))
 
-        ;; Case where the end-event is not a cons cell (it's just a boring
-        ;; char-key-press).
-	(delete-overlay mouse-drag-overlay)))))
+(defun mouse--remap-link-click-p (start-event end-event)
+  (or (and (eq mouse-1-click-follows-link 'double)
+	   (= (event-click-count start-event) 2))
+      (and
+       (not (eq mouse-1-click-follows-link 'double))
+       (= (event-click-count start-event) 1)
+       (= (event-click-count end-event) 1)
+       (or (not (integerp mouse-1-click-follows-link))
+	   (let ((t0 (posn-timestamp (event-start start-event)))
+		 (t1 (posn-timestamp (event-end   end-event))))
+	     (and (integerp t0) (integerp t1)
+		  (if (> mouse-1-click-follows-link 0)
+		      (<= (- t1 t0) mouse-1-click-follows-link)
+		    (< (- t0 t1) mouse-1-click-follows-link))))))))
+
 
 ;; Commands to handle xterm-style multiple clicks.
 (defun mouse-skip-word (dir)
@@ -1263,55 +1208,6 @@
 
 ;; Momentarily show where the mark is, if highlighting doesn't show it.
 
-(defun mouse-show-mark ()
-  (let ((inhibit-quit t)
-	(echo-keystrokes 0)
-	event events key ignore
-	(x-lost-selection-functions
-	 (when (boundp 'x-lost-selection-functions)
-           (copy-sequence x-lost-selection-functions))))
-    (add-hook 'x-lost-selection-functions
-	      (lambda (seltype)
-		(when (eq seltype 'PRIMARY)
-                  (setq ignore t)
-                  (throw 'mouse-show-mark t))))
-    (if transient-mark-mode
-	(delete-overlay mouse-drag-overlay)
-      (move-overlay mouse-drag-overlay (point) (mark t)))
-    (catch 'mouse-show-mark
-      ;; In this loop, execute scroll bar and switch-frame events.
-      ;; Should we similarly handle `select-window' events?  --Stef
-      ;; Also ignore down-events that are undefined.
-      (while (progn (setq event (read-event))
-		    (setq events (append events (list event)))
-		    (setq key (apply 'vector events))
-		    (or (and (consp event)
-			     (eq (car event) 'switch-frame))
-			(and (consp event)
-			     (eq (posn-point (event-end event))
-				 'vertical-scroll-bar))
-			(and (memq 'down (event-modifiers event))
-			     (not (key-binding key))
-			     (not (mouse-undouble-last-event events)))))
-	(and (consp event)
-	     (or (eq (car event) 'switch-frame)
-		 (eq (posn-point (event-end event))
-		     'vertical-scroll-bar))
-	     (let ((keys (vector 'vertical-scroll-bar event)))
-	       (and (key-binding keys)
-		    (progn
-		      (call-interactively (key-binding keys)
-					  nil keys)
-		      (setq events nil)))))))
-    ;; If we lost the selection, just turn off the highlighting.
-    (unless ignore
-      ;; Unread the key so it gets executed normally.
-      (setq unread-command-events
-	    (nconc events unread-command-events)))
-    (setq quit-flag nil)
-    (unless transient-mark-mode
-      (delete-overlay mouse-drag-overlay))))
-
 (defun mouse-set-mark (click)
   "Set mark at the position clicked on with the mouse.
 Display cursor at that position for a second.
@@ -1385,8 +1281,7 @@
   (interactive "e")
   (mouse-set-mark-fast click)
   (let (this-command last-command)
-    (kill-ring-save (point) (mark t)))
-  (mouse-show-mark))
+    (kill-ring-save (point) (mark t))))
 
 ;; This function used to delete the text between point and the mouse
 ;; whenever it was equal to the front of the kill ring, but some
@@ -1476,8 +1371,7 @@
 		(mouse-set-region-1)
 		;; Arrange for a repeated mouse-3 to kill this region.
 		(setq mouse-save-then-kill-posn
-		      (list (car kill-ring) (point) click-posn))
-		(mouse-show-mark))
+		      (list (car kill-ring) (point) click-posn)))
 	    ;; If we click this button again without moving it,
 	    ;; that time kill.
 	    (mouse-save-then-kill-delete-region (mark) (point))
@@ -1521,7 +1415,6 @@
 		(goto-char before-scroll))
 	    (exchange-point-and-mark)   ;Why??? --Stef
 	    (kill-new (buffer-substring (point) (mark t))))
-          (mouse-show-mark)
 	  (mouse-set-region-1)
 	  (setq mouse-save-then-kill-posn
 		(list (car kill-ring) (point) click-posn)))))))
--- a/lisp/net/dbus.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/net/dbus.el	Thu Jul 08 17:09:35 2010 +0900
@@ -39,6 +39,7 @@
 (declare-function dbus-method-error-internal "dbusbind.c")
 (declare-function dbus-register-signal "dbusbind.c")
 (declare-function dbus-register-method "dbusbind.c")
+(declare-function dbus-send-signal "dbusbind.c")
 (defvar dbus-debug)
 (defvar dbus-registered-objects-table)
 
@@ -869,7 +870,7 @@
 	(add-to-list 'result (cons (car dict) (caadr dict)) 'append)))))
 
 (defun dbus-register-property
-  (bus service path interface property access value)
+  (bus service path interface property access value &optional emits-signal)
   "Register property PROPERTY on the D-Bus BUS.
 
 BUS is either the symbol `:system' or the symbol `:session'.
@@ -892,7 +893,9 @@
 
 The interface \"org.freedesktop.DBus.Properties\" is added to
 PATH, including a default handler for the \"Get\", \"GetAll\" and
-\"Set\" methods of this interface."
+\"Set\" methods of this interface.  When EMITS-SIGNAL is non-nil,
+the signal \"PropertiesChanged\" is sent when the property is
+changed by `dbus-set-property'."
   (unless (member access '(:read :readwrite))
     (signal 'dbus-error (list "Access type invalid" access)))
 
@@ -911,10 +914,23 @@
   (dbus-register-method
    bus service path dbus-interface-properties "Set" 'dbus-property-handler)
 
+  ;; Send the PropertiesChanged signal.
+  (when emits-signal
+    (dbus-send-signal
+     bus service path dbus-interface-properties "PropertiesChanged"
+     (list (list :dict-entry property (list :variant value)))
+     '(:array)))
+
   ;; Create a hash table entry.  We use nil for the unique name,
   ;; because the property might be accessed from anybody.
   (let ((key (list bus interface property))
-	(val (list (list nil service path (cons access value)))))
+	(val
+	 (list
+	  (list
+	   nil service path
+	   (cons
+	    (if emits-signal (list access :emits-signal) (list access))
+	    value)))))
     (puthash key val dbus-registered-objects-table)
 
     ;; Return the object.
@@ -924,6 +940,7 @@
   "Default handler for the \"org.freedesktop.DBus.Properties\" interface.
 It will be registered for all objects created by `dbus-register-object'."
   (let ((bus (dbus-event-bus-name last-input-event))
+	(service (dbus-event-service-name last-input-event))
 	(path (dbus-event-path-name last-input-event))
 	(method (dbus-event-member-name last-input-event))
 	(interface (car args))
@@ -931,25 +948,40 @@
     (cond
      ;; "Get" returns a variant.
      ((string-equal method "Get")
-      (let ((val (gethash (list bus interface property)
-			  dbus-registered-objects-table)))
-	(when (string-equal path (nth 2 (car val)))
-	  (list (list :variant (cdar (last (car val))))))))
+      (let ((entry (gethash (list bus interface property)
+			    dbus-registered-objects-table)))
+	(when (string-equal path (nth 2 (car entry)))
+	  (list (list :variant (cdar (last (car entry))))))))
 
      ;; "Set" expects a variant.
      ((string-equal method "Set")
-      (let ((val (gethash (list bus interface property)
-			  dbus-registered-objects-table)))
-	(unless (consp (car (last (car val))))
+      (let* ((value (caar (cddr args)))
+	     (entry (gethash (list bus interface property)
+			     dbus-registered-objects-table))
+	     ;; The value of the hash table is a list; in case of
+	     ;; properties it contains just one element (UNAME SERVICE
+	     ;; PATH OBJECT).  OBJECT is a cons cell of a list, which
+	     ;; contains a list of annotations (like :read,
+	     ;; :read-write, :emits-signal), and the value of the
+	     ;; property.
+	     (object (car (last (car entry)))))
+	(unless (consp object)
 	  (signal 'dbus-error
 		  (list "Property not registered at path" property path)))
-	(unless (equal (caar (last (car val))) :readwrite)
+	(unless (member :readwrite (car object))
 	  (signal 'dbus-error
 		  (list "Property not writable at path" property path)))
 	(puthash (list bus interface property)
-		 (list (append (butlast (car val))
-			       (list (cons :readwrite (caar (cddr args))))))
+		 (list (append (butlast (car entry))
+			       (list (cons (car object) value))))
 		 dbus-registered-objects-table)
+	;; Send the "PropertiesChanged" signal.
+	(when (member :emits-signal (car object))
+	  (dbus-send-signal
+	   bus service path dbus-interface-properties "PropertiesChanged"
+	   (list (list :dict-entry property (list :variant value)))
+	   '(:array)))
+	;; Return empty reply.
 	:ignore))
 
      ;; "GetAll" returns "a{sv}".
--- a/lisp/play/zone.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/play/zone.el	Thu Jul 08 17:09:35 2010 +0900
@@ -1,7 +1,7 @@
 ;;; zone.el --- idle display hacks
 
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;;   2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Victor Zandy <zandy@cs.wisc.edu>
 ;; Maintainer: Thien-Thi Nguyen <ttn@gnu.org>
@@ -40,10 +40,6 @@
 
 ;;; Code:
 
-(require 'timer)
-(require 'tabify)
-(eval-when-compile (require 'cl))
-
 (defvar zone-timer nil
   "The timer we use to decide when to zone out, or nil if none.")
 
@@ -210,19 +206,20 @@
     (insert s)))
 
 (defun zone-shift-left ()
-  (let (s)
+  (let ((inhibit-point-motion-hooks t)
+        s)
     (while (not (eobp))
       (unless (eolp)
         (setq s (buffer-substring (point) (1+ (point))))
         (delete-char 1)
         (end-of-line)
         (insert s))
-      (forward-char 1))))
+      (ignore-errors (forward-char 1)))))
 
 (defun zone-shift-right ()
   (goto-char (point-max))
-  (end-of-line)
-  (let (s)
+  (let ((inhibit-point-motion-hooks t)
+        s)
     (while (not (bobp))
       (unless (bolp)
         (setq s (buffer-substring (1- (point)) (point)))
@@ -348,15 +345,8 @@
     (let ((np (+ 2 (random 5)))
           (pm (point-max)))
       (while (< np pm)
-        (goto-char np)
-        (let ((prec (preceding-char))
-              (props (text-properties-at (1- (point)))))
-          (insert (if (zerop (random 2))
-                      (upcase prec)
-                    (downcase prec)))
-          (set-text-properties (1- (point)) (point) props))
-        (backward-char 2)
-        (delete-char 1)
+        (funcall (if (zerop (random 2)) 'upcase-region
+                   'downcase-region) (1- np) np)
         (setq np (+ np (1+ (random 5))))))
     (goto-char (point-min))
     (sit-for 0 2)))
@@ -365,13 +355,14 @@
 ;;;; rotating
 
 (defun zone-line-specs ()
-  (let (ret)
+  (let ((ok t)
+        ret)
     (save-excursion
       (goto-char (window-start))
-      (while (< (point) (window-end))
+      (while (and ok (< (point) (window-end)))
         (when (looking-at "[\t ]*\\([^\n]+\\)")
           (setq ret (cons (cons (match-beginning 1) (match-end 1)) ret)))
-        (forward-line 1)))
+        (setq ok (zerop (forward-line 1)))))
     ret))
 
 (defun zone-pgm-rotate (&optional random-style)
@@ -404,6 +395,7 @@
             (setq cut 1 paste 2)
           (setq cut 2 paste 1))
         (goto-char (aref ent cut))
+        (setq aamt (min aamt (- (point-max) (point))))
         (setq txt (buffer-substring (point) (+ (point) aamt)))
         (delete-char aamt)
         (goto-char (aref ent paste))
@@ -447,19 +439,19 @@
          (hmm (cond
                ((string-match "[a-z]" c-string) (upcase c-string))
                ((string-match "[A-Z]" c-string) (downcase c-string))
-               (t (propertize " " 'display `(space :width ,cw-ceil))))))
-    (do ((i 0 (1+ i))
-         (wait 0.5 (* wait 0.8)))
-        ((= i 20))
+               (t (propertize " " 'display `(space :width ,cw-ceil)))))
+         (wait 0.5))
+    (dotimes (i 20)
       (goto-char pos)
       (delete-char 1)
       (insert (if (= 0 (% i 2)) hmm c-string))
-      (zone-park/sit-for wbeg wait))
+      (zone-park/sit-for wbeg (setq wait (* wait 0.8))))
     (delete-char -1) (insert c-string)))
 
 (defun zone-fill-out-screen (width height)
   (let ((start (window-start))
-	(line (make-string width 32)))
+	(line (make-string width 32))
+	(inhibit-point-motion-hooks t))
     (goto-char start)
     ;; fill out rectangular ws block
     (while (progn (end-of-line)
@@ -473,8 +465,7 @@
     (let ((nl (- height (count-lines (point-min) (point)))))
       (when (> nl 0)
 	(setq line (concat line "\n"))
-	(do ((i 0 (1+ i)))
-	    ((= i nl))
+        (dotimes (i nl)
 	  (insert line))))
     (goto-char start)
     (recenter 0)
@@ -587,11 +578,12 @@
 
 (defun zone-pgm-stress ()
   (goto-char (point-min))
-  (let (lines)
-    (while (< (point) (point-max))
+  (let ((ok t)
+        lines)
+    (while (and ok (< (point) (point-max)))
       (let ((p (point)))
-        (forward-line 1)
-        (setq lines (cons (buffer-substring p (point)) lines))))
+        (setq ok (zerop (forward-line 1))
+              lines (cons (buffer-substring p (point)) lines))))
     (sit-for 5)
     (zone-hiding-modeline
      (let ((msg "Zoning... (zone-pgm-stress)"))
@@ -671,7 +663,8 @@
       (setq c (point))
       (move-to-column 9)
       (setq col (cons (buffer-substring (point) c) col))
-      (end-of-line 0)
+;      (let ((inhibit-point-motion-hooks t))
+        (end-of-line 0);)
       (forward-char -10))
     (let ((life-patterns (vector
                           (if (and col (search-forward "@" max t))
--- a/lisp/textmodes/ispell.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/textmodes/ispell.el	Thu Jul 08 17:09:35 2010 +0900
@@ -357,21 +357,21 @@
   :group 'ispell)
 
 (defcustom ispell-alternate-dictionary
-  (cond ((file-exists-p "/usr/dict/web2") "/usr/dict/web2")
-	((file-exists-p "/usr/share/dict/web2") "/usr/share/dict/web2")
-	((file-exists-p "/usr/dict/words") "/usr/dict/words")
-	((file-exists-p "/usr/lib/dict/words") "/usr/lib/dict/words")
-	((file-exists-p "/usr/share/dict/words") "/usr/share/dict/words")
-	((file-exists-p "/usr/share/lib/dict/words")
+  (cond ((file-readable-p "/usr/dict/web2") "/usr/dict/web2")
+	((file-readable-p "/usr/share/dict/web2") "/usr/share/dict/web2")
+	((file-readable-p "/usr/dict/words") "/usr/dict/words")
+	((file-readable-p "/usr/lib/dict/words") "/usr/lib/dict/words")
+	((file-readable-p "/usr/share/dict/words") "/usr/share/dict/words")
+	((file-readable-p "/usr/share/lib/dict/words")
 	 "/usr/share/lib/dict/words")
-	((file-exists-p "/sys/dict") "/sys/dict")
-	(t "/usr/dict/words"))
-  "*Alternate dictionary for spelling help."
+	((file-readable-p "/sys/dict") "/sys/dict"))
+  "*Alternate plain word-list dictionary for spelling help."
   :type '(choice file (const :tag "None" nil))
   :group 'ispell)
 
-(defcustom ispell-complete-word-dict ispell-alternate-dictionary
-  "*Dictionary used for word completion."
+(defcustom ispell-complete-word-dict nil
+  "*Plain word-list dictionary used for word completion if
+different from `ispell-alternate-dictionary'."
   :type '(choice file (const :tag "None" nil))
   :group 'ispell)
 
@@ -2049,10 +2049,11 @@
 			      (erase-buffer)
 			      (setq count ?0
 				    skipped 0
-				    mode-line-format
+				    mode-line-format ;; setup the *Choices* buffer with valid data.
 				    (concat "--  %b  --  word: " new-word
-					    "  --  dict: "
-					    ispell-alternate-dictionary)
+					    "  --  word-list: "
+					    (or ispell-complete-word-dict
+						ispell-alternate-dictionary))
 				    miss (lookup-words new-word)
 				    choices miss
 				    line ispell-choices-win-default-height)
@@ -2267,11 +2268,20 @@
 search for the words (usually egrep).
 
 Optional second argument contains the dictionary to use; the default is
-`ispell-alternate-dictionary'."
+`ispell-alternate-dictionary', overriden by `ispell-complete-word-dict'
+if defined."
   ;; We don't use the filter for this function, rather the result is written
   ;; into a buffer.  Hence there is no need to save the filter values.
   (if (null lookup-dict)
-      (setq lookup-dict ispell-alternate-dictionary))
+      (setq lookup-dict (or ispell-complete-word-dict
+			    ispell-alternate-dictionary)))
+
+  (if lookup-dict
+      (unless (file-readable-p lookup-dict)
+	(error "lookup-words error: Unreadable or missing plain word-list %s."
+	       lookup-dict))
+    (error (concat "lookup-words error: No plain word-list found at system default "
+		   "locations.  Customize `ispell-alternate-dictionary' to set yours.")))
 
   (let* ((process-connection-type ispell-use-ptys-p)
 	 (wild-p (string-match "\\*" word))
@@ -3342,7 +3352,8 @@
 	      (lookup-words (concat (and interior-frag "*") word
 				    (if (or interior-frag (null ispell-look-p))
 					"*"))
-			    ispell-complete-word-dict)))
+			    (or ispell-complete-word-dict
+				ispell-alternate-dictionary))))
     (cond ((eq possibilities t)
 	   (message "No word to complete"))
 	  ((null possibilities)
--- a/lisp/tool-bar.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/tool-bar.el	Thu Jul 08 17:09:35 2010 +0900
@@ -52,13 +52,19 @@
   :global t
   :group 'mouse
   :group 'frames
-  ;; Make tool-bar even if terminal is non-graphical (Bug#1754).
   (let ((val (if tool-bar-mode 1 0)))
     (dolist (frame (frame-list))
-      (set-frame-parameter frame 'tool-bar-lines val)))
-  (when tool-bar-mode
-    (if (= 1 (length (default-value 'tool-bar-map))) ; not yet setup
-	(tool-bar-setup))))
+      (set-frame-parameter frame 'tool-bar-lines val))
+    ;; If the user has given `default-frame-alist' a `tool-bar-lines'
+    ;; parameter, replace it.
+    (if (assq 'tool-bar-lines default-frame-alist)
+	(setq default-frame-alist
+	      (cons (cons 'tool-bar-lines val)
+		    (assq-delete-all 'tool-bar-lines
+				     default-frame-alist)))))
+  (and tool-bar-mode
+       (= 1 (length (default-value 'tool-bar-map))) ; not yet setup
+       (tool-bar-setup)))
 
 ;;;###autoload
 ;; Used in the Show/Hide menu, to have the toggle reflect the current frame.
--- a/lisp/url/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/url/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,9 @@
+2010-07-01  Mark A. Hershberger  <mah@everybody.org>
+
+	* url-http.el (url-http-create-request): Add a CRLF on the end so
+	that POSTs with content to https urls work. See
+	<https://bugs.launchpad.net/mediawiki-el/+bug/540759>
+
 2010-06-22  Mark A. Hershberger  <mah@everybody.org>
 
 	* url-parse.el (url-user-for-url, url-password-for-url):
--- a/lisp/url/url-http.el	Thu Jul 08 16:56:21 2010 +0900
+++ b/lisp/url/url-http.el	Thu Jul 08 17:09:35 2010 +0900
@@ -339,7 +339,7 @@
              ;; End request
              "\r\n"
              ;; Any data
-             url-http-data))
+             url-http-data "\r\n"))
            ""))
     (url-http-debug "Request is: \n%s" request)
     request))
--- a/lwlib/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,66 @@
+2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* lwlib.c (allocate_widget_instance, get_widget_info)
+	(get_widget_instance, find_instance, set_one_value)
+	(update_one_widget_instance, update_all_widget_values)
+	(lw_modify_all_widgets, lw_get_widget, lw_make_widget)
+	(lw_create_widget, lw_pop_all_widgets, lw_show_busy)
+	(lw_refigure_widget, lw_allow_resizing): Remove alternative K&R
+	declarations.
+	* lwlib-Xlw.c (xlw_update_one_widget):
+	(xlw_pop_instance): Likewise.
+	* lwlib-Xaw.c (xaw_update_one_widget, xaw_pop_instance):
+	Likewise.
+	* lwlib-Xm.c (P_): Remove.
+
+2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
+	(malloc_widget_value, free_widget_info, allocate_widget_instance)
+	(lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
+	memset, memcpy, memcmp.
+	* lwlib-utils.c (XtApplyToWidgets): Likewise.
+	* xlwmenu.c (XlwMenuInitialize): Likewise.
+	* lwlib.h (lwlib_bcopy): Remove declaration.
+
+2010-07-05  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* xlwmenu.c (XlwMenuSetValues, XlwMenuInitialize): Correct prototype.
+	(display_menu_item): Remove unused variable gi.
+	(make_windows_if_needed): Remove unused variable screen.
+	(XlwMenuRedisplay): Remove unused variable i.
+
+	* lwlib-Xaw.c: Include <ctype.h> for isdigit.
+	(fill_xft_data, set_text): Remove unused variable screen.
+	(draw_text): Cast bp to FcChar8*.
+	(find_xft_data): Return 0 if inst or xft_data is not set.
+	(wm_delete_window): Correct prototype.  Initialize widget to 0
+	and return if widget is still 0 after loop.
+
+2010-07-04  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* lwlib-Xaw.c: Convert function definitions to standard C.
+	* lwlib-Xlw.c:
+	* lwlib-utils.c:
+	* lwlib.c:
+	* lwlib.h:
+	* xlwmenu.c: Likewise.
+
+2010-07-02  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* lwlib-Xm.c: Remove __P and P_ from .c and .m files.
+	* lwlib-Xm.c:
+	* lwlib.c:
+	* xlwmenu.c: Likewise.
+
+	Remove P_ and __P macros.
+	* lwlib-Xaw.h: Remove P_ and __P macros.
+	* lwlib-Xlw.h:
+	* lwlib-Xm.h:
+	* lwlib-int.h:
+	* lwlib-utils.h:
+	* lwlib.h: Likewise.
+
 2010-05-15  Glenn Morris  <rgm@gnu.org>
 
 	* Makefile.in (mostlyclean): Remove references to non-existent files.
--- a/lwlib/lwlib-Xaw.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib-Xaw.c	Thu Jul 08 17:09:35 2010 +0900
@@ -26,6 +26,7 @@
 
 #include <stdio.h>
 #include <setjmp.h>
+#include <ctype.h>
 
 #include "../src/lisp.h"
 
@@ -70,12 +71,11 @@
 
 #endif
 
-static void xaw_generic_callback (/*Widget, XtPointer, XtPointer*/);
+static void xaw_generic_callback (Widget widget, XtPointer closure, XtPointer call_data);
 
 
 Boolean
-lw_xaw_widget_p (widget)
-     Widget widget;
+lw_xaw_widget_p (Widget widget)
 {
   return (XtIsSubclass (widget, scrollbarWidgetClass) ||
 	  XtIsSubclass (widget, dialogWidgetClass));
@@ -152,7 +152,6 @@
 {
   Pixel bg, fg;
   XColor colors[2];
-  int screen = XScreenNumberOfScreen (XtScreen (widget));
 
   data->widget = widget;
   data->xft_font = font;
@@ -253,7 +252,9 @@
       char *cp = strchr (bp, '\n');
       XftDrawStringUtf8 (data->xft_draw,
                          inverse ? &data->xft_bg : &data->xft_fg,
-                         data->xft_font, x, y, bp, cp ? cp - bp : strlen (bp));
+                         data->xft_font, x, y,
+                         (FcChar8 *) bp,
+                         cp ? cp - bp : strlen (bp));
       bp = cp ? cp + 1 : NULL;
       /* 1.2 gives reasonable line spacing.  */
       y += data->xft_font->height * 1.2;
@@ -265,7 +266,6 @@
 static void
 set_text (struct widget_xft_data *data, Widget toplevel, char *lbl, int margin)
 {
-  int screen = XScreenNumberOfScreen (XtScreen (data->widget));
   int width, height;
 
   width = get_text_width_and_height (data->widget, lbl, data->xft_font,
@@ -294,7 +294,7 @@
       inst = lw_get_widget_instance (parent);
       parent = XtParent (parent);
     }
-  if (!inst || !inst->xft_data || !inst->xft_data[0].xft_font) return;
+  if (!inst || !inst->xft_data || !inst->xft_data[0].xft_font) return 0;
 
   for (nr = 0; data == NULL && nr < inst->nr_xft_data; ++nr) 
     {
@@ -348,16 +348,8 @@
 #endif
 
 void
-#ifdef PROTOTYPES
 xaw_update_one_widget (widget_instance *instance, Widget widget,
 		       widget_value *val, Boolean deep_p)
-#else
-xaw_update_one_widget (instance, widget, val, deep_p)
-     widget_instance *instance;
-     Widget widget;
-     widget_value *val;
-     Boolean deep_p;
-#endif
 {
 #if 0
   if (XtIsSubclass (widget, scrollbarWidgetClass))
@@ -427,10 +419,7 @@
 }
 
 void
-xaw_update_one_value (instance, widget, val)
-     widget_instance *instance;
-     Widget widget;
-     widget_value *val;
+xaw_update_one_value (widget_instance *instance, Widget widget, widget_value *val)
 {
   /* This function is not used by the scrollbars and those are the only
      Athena widget implemented at the moment so do nothing. */
@@ -438,8 +427,7 @@
 }
 
 void
-xaw_destroy_instance (instance)
-     widget_instance *instance;
+xaw_destroy_instance (widget_instance *instance)
 {
 #ifdef HAVE_XFT
   if (instance->xft_data) 
@@ -471,22 +459,14 @@
 }
 
 void
-xaw_popup_menu (widget, event)
-     Widget widget;
-     XEvent *event;
+xaw_popup_menu (Widget widget, XEvent *event)
 {
   /* An Athena menubar has not been implemented. */
   return;
 }
 
 void
-#ifdef PROTOTYPES
 xaw_pop_instance (widget_instance *instance, Boolean up)
-#else
-xaw_pop_instance (instance, up)
-     widget_instance *instance;
-     Boolean up;
-#endif
 {
   Widget widget = instance->widget;
 
@@ -557,7 +537,10 @@
 /* Dialogs pop down on any key press */
 static char dialogOverride[] =
        "<KeyPress>Escape:	lwlib_delete_dialog()";
-static void wm_delete_window();
+static void wm_delete_window (Widget w,
+                              XEvent *event,
+                              String *params,
+                              Cardinal *num_params);
 static XtActionsRec xaw_actions [] = {
   {"lwlib_delete_dialog", wm_delete_window}
 };
@@ -748,8 +731,7 @@
 }
 
 Widget
-xaw_create_dialog (instance)
-     widget_instance* instance;
+xaw_create_dialog (widget_instance *instance)
 {
   char *name = instance->info->type;
   Widget parent = instance->parent;
@@ -813,10 +795,7 @@
 
 
 static void
-xaw_generic_callback (widget, closure, call_data)
-     Widget widget;
-     XtPointer closure;
-     XtPointer call_data;
+xaw_generic_callback (Widget widget, XtPointer closure, XtPointer call_data)
 {
   widget_instance *instance = (widget_instance *) closure;
   Widget instance_widget;
@@ -862,16 +841,16 @@
 }
 
 static void
-wm_delete_window (w, closure, call_data)
-     Widget w;
-     XtPointer closure;
-     XtPointer call_data;
+wm_delete_window (Widget w,
+                  XEvent *event,
+                  String *params,
+                  Cardinal *num_params)
 {
   LWLIB_ID id;
   Cardinal nkids;
   int i;
   Widget *kids = 0;
-  Widget widget, shell;
+  Widget widget = 0, shell;
 
   if (XtIsSubclass (w, dialogWidgetClass))
     shell = XtParent (w);
@@ -890,6 +869,8 @@
       if (XtIsSubclass (widget, dialogWidgetClass))
 	break;
     }
+  if (! widget) return;
+
   id = lw_get_widget_id (widget);
   if (! id) abort ();
 
@@ -966,8 +947,7 @@
 #endif
 
 static Widget
-xaw_create_scrollbar (instance)
-     widget_instance *instance;
+xaw_create_scrollbar (widget_instance *instance)
 {
 #if 0
   Arg av[20];
@@ -1007,8 +987,7 @@
 }
 
 static Widget
-xaw_create_main (instance)
-     widget_instance *instance;
+xaw_create_main (widget_instance *instance)
 {
   Arg al[1];
   int ac;
--- a/lwlib/lwlib-Xaw.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib-Xaw.h	Thu Jul 08 17:09:35 2010 +0900
@@ -6,25 +6,25 @@
 extern widget_creation_entry xaw_creation_table [];
 
 Widget
-xaw_create_dialog __P ((widget_instance*));
+xaw_create_dialog (widget_instance*);
 
 Boolean
-lw_xaw_widget_p __P ((Widget));
+lw_xaw_widget_p (Widget);
 
 void
-xaw_update_one_widget __P ((widget_instance *, Widget, widget_value *, Boolean));
+xaw_update_one_widget (widget_instance *, Widget, widget_value *, Boolean);
 
 void
-xaw_update_one_value __P ((widget_instance *, Widget, widget_value *));
+xaw_update_one_value (widget_instance *, Widget, widget_value *);
 
 void
-xaw_destroy_instance __P ((widget_instance *));
+xaw_destroy_instance (widget_instance *);
 
 void
-xaw_popup_menu __P ((Widget, XEvent *));
+xaw_popup_menu (Widget, XEvent *);
 
 void
-xaw_pop_instance __P ((widget_instance *, Boolean));
+xaw_pop_instance (widget_instance *, Boolean);
 
 #endif /* LWLIB_XAW_H */
 
--- a/lwlib/lwlib-Xlw.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib-Xlw.c	Thu Jul 08 17:09:35 2010 +0900
@@ -72,10 +72,7 @@
    if there isn't any highlighted menu item.  */
 
 static void
-highlight_hook (w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
+highlight_hook (Widget w, XtPointer client_data, XtPointer call_data)
 {
   widget_instance *instance = (widget_instance *) client_data;
 
@@ -85,29 +82,20 @@
 }
 
 static void
-enter_hook (w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
+enter_hook (Widget w, XtPointer client_data, XtPointer call_data)
 {
   highlight_hook (w, client_data, call_data);
 }
 
 static void
-leave_hook (w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
+leave_hook (Widget w, XtPointer client_data, XtPointer call_data)
 {
   highlight_hook (w, client_data, NULL);
 }
 
 
 static void
-pre_hook (w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
+pre_hook (Widget w, XtPointer client_data, XtPointer call_data)
 {
   widget_instance* instance = (widget_instance*)client_data;
   widget_value* val;
@@ -122,10 +110,7 @@
 }
 
 static void
-pick_hook (w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
+pick_hook (Widget w, XtPointer client_data, XtPointer call_data)
 {
   widget_instance* instance = (widget_instance*)client_data;
   widget_value* contents_val = (widget_value*)call_data;
@@ -150,8 +135,7 @@
 /* creation functions */
 
 static Widget
-xlw_create_menubar (instance)
-     widget_instance* instance;
+xlw_create_menubar (widget_instance *instance)
 {
   Widget widget;
   Arg al[5];
@@ -178,8 +162,7 @@
 }
 
 static Widget
-xlw_create_popup_menu (instance)
-     widget_instance* instance;
+xlw_create_popup_menu (widget_instance *instance)
 {
   Widget popup_shell
     = XtCreatePopupShell (instance->info->name, overrideShellWidgetClass,
@@ -214,8 +197,7 @@
 };
 
 Boolean
-lw_lucid_widget_p (widget)
-     Widget widget;
+lw_lucid_widget_p (Widget widget)
 {
   WidgetClass the_class = XtClass (widget);
 
@@ -228,16 +210,8 @@
 }
 
 void
-#ifdef PROTOTYPES
 xlw_update_one_widget (widget_instance* instance, Widget widget,
 		       widget_value* val, Boolean deep_p)
-#else
-xlw_update_one_widget (instance, widget, val, deep_p)
-     widget_instance* instance;
-     Widget widget;
-     widget_value* val;
-     Boolean deep_p;
-#endif
 {
   Arg al[1];
 
@@ -249,29 +223,18 @@
 }
 
 void
-xlw_update_one_value (instance, widget, val)
-     widget_instance* instance;
-     Widget widget;
-     widget_value* val;
+xlw_update_one_value (widget_instance *instance, Widget widget, widget_value *val)
 {
   return;
 }
 
 void
-#ifdef PROTOTYPES
 xlw_pop_instance (widget_instance* instance, Boolean up)
-#else
-xlw_pop_instance (instance, up)
-     widget_instance* instance;
-     Boolean up;
-#endif
 {
 }
 
 void
-xlw_popup_menu (widget, event)
-     Widget widget;
-     XEvent *event;
+xlw_popup_menu (Widget widget, XEvent *event)
 {
   XlwMenuWidget mw;
 
@@ -304,8 +267,7 @@
 
 /* Destruction of instances */
 void
-xlw_destroy_instance (instance)
-     widget_instance* instance;
+xlw_destroy_instance (widget_instance *instance)
 {
   if (instance->widget)
     XtDestroyWidget (instance->widget);
--- a/lwlib/lwlib-Xlw.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib-Xlw.h	Thu Jul 08 17:09:35 2010 +0900
@@ -7,24 +7,24 @@
 extern widget_creation_function xlw_create_dialog;
 
 Boolean
-lw_lucid_widget_p __P ((Widget widget));
+lw_lucid_widget_p (Widget widget);
 
 void
-xlw_update_one_widget __P ((widget_instance* instance, Widget widget,
-		       widget_value* val, Boolean deep_p));
+xlw_update_one_widget (widget_instance* instance, Widget widget,
+                       widget_value* val, Boolean deep_p);
 
 void
-xlw_update_one_value __P ((widget_instance* instance, Widget widget,
-		      widget_value* val));
+xlw_update_one_value (widget_instance* instance, Widget widget,
+                      widget_value* val);
 
 void
-xlw_destroy_instance __P ((widget_instance* instance));
+xlw_destroy_instance (widget_instance* instance);
 
 void
-xlw_pop_instance __P ((widget_instance* instance, Boolean up));
+xlw_pop_instance (widget_instance* instance, Boolean up);
 
 void
-xlw_popup_menu __P ((Widget widget, XEvent * event));
+xlw_popup_menu (Widget widget, XEvent * event);
 
 #endif /* LWLIB_XLW_H */
 
--- a/lwlib/lwlib-Xm.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib-Xm.c	Thu Jul 08 17:09:35 2010 +0900
@@ -65,13 +65,6 @@
 #include <Xm/DialogS.h>
 #include <Xm/Form.h>
 
-#undef P_
-#if defined __STDC__ || defined PROTOTYPES
-#define P_(X) X
-#else
-#define P_(X) ()
-#endif
-
 enum do_call_type { pre_activate, selection, no_selection, post_activate };
 
 
@@ -86,63 +79,63 @@
   struct _destroyed_instance*	next;
 } destroyed_instance;
 
-static destroyed_instance *make_destroyed_instance P_ ((char *, char *,
-							Widget, Widget,
-							Boolean));
-static void free_destroyed_instance P_ ((destroyed_instance*));
-Widget first_child P_ ((Widget));
-Boolean lw_motif_widget_p P_ ((Widget));
-static XmString resource_motif_string P_ ((Widget, char *));
-static void destroy_all_children P_ ((Widget, int));
-static void xm_update_label P_ ((widget_instance *, Widget, widget_value *));
-static void xm_update_list P_ ((widget_instance *, Widget, widget_value *));
-static void xm_update_pushbutton P_ ((widget_instance *, Widget,
-				      widget_value *));
-static void xm_update_cascadebutton P_ ((widget_instance *, Widget,
-					 widget_value *));
-static void xm_update_toggle P_ ((widget_instance *, Widget, widget_value *));
-static void xm_update_radiobox P_ ((widget_instance *, Widget, widget_value *));
-static void make_menu_in_widget P_ ((widget_instance *, Widget,
-				     widget_value *, int));
-static void update_one_menu_entry P_ ((widget_instance *, Widget,
-				       widget_value *, Boolean));
-static void xm_update_menu P_ ((widget_instance *, Widget, widget_value *,
-				Boolean));
-static void xm_update_text P_ ((widget_instance *, Widget, widget_value *));
-static void xm_update_text_field P_ ((widget_instance *, Widget,
-				      widget_value *));
-void xm_update_one_value P_ ((widget_instance *, Widget, widget_value *));
-static void activate_button P_ ((Widget, XtPointer, XtPointer));
-static Widget make_dialog P_ ((char *, Widget, Boolean, char *, char *,
-			       Boolean, Boolean, Boolean, int, int));
-static destroyed_instance* find_matching_instance P_ ((widget_instance*));
-static void mark_dead_instance_destroyed P_ ((Widget, XtPointer, XtPointer));
-static void recenter_widget P_ ((Widget));
-static Widget recycle_instance P_ ((destroyed_instance*));
-Widget xm_create_dialog P_ ((widget_instance*));
-static Widget make_menubar P_ ((widget_instance*));
-static void remove_grabs P_ ((Widget, XtPointer, XtPointer));
-static Widget make_popup_menu P_ ((widget_instance*));
-static Widget make_main P_ ((widget_instance*));
-void xm_destroy_instance P_ ((widget_instance*));
-void xm_popup_menu P_ ((Widget, XEvent *));
-static void set_min_dialog_size P_ ((Widget));
-static void do_call P_ ((Widget, XtPointer, enum do_call_type));
-static void xm_generic_callback P_ ((Widget, XtPointer, XtPointer));
-static void xm_nosel_callback P_ ((Widget, XtPointer, XtPointer));
-static void xm_pull_down_callback P_ ((Widget, XtPointer, XtPointer));
-static void xm_pop_down_callback P_ ((Widget, XtPointer, XtPointer));
-void xm_set_keyboard_focus P_ ((Widget, Widget));
-void xm_set_main_areas P_ ((Widget, Widget, Widget));
-static void xm_internal_update_other_instances P_ ((Widget, XtPointer,
-						    XtPointer));
-static void xm_arm_callback P_ ((Widget, XtPointer, XtPointer));
+static destroyed_instance *make_destroyed_instance (char *, char *,
+                                                    Widget, Widget,
+                                                    Boolean);
+static void free_destroyed_instance (destroyed_instance*);
+Widget first_child (Widget);
+Boolean lw_motif_widget_p (Widget);
+static XmString resource_motif_string (Widget, char *);
+static void destroy_all_children (Widget, int);
+static void xm_update_label (widget_instance *, Widget, widget_value *);
+static void xm_update_list (widget_instance *, Widget, widget_value *);
+static void xm_update_pushbutton (widget_instance *, Widget,
+                                  widget_value *);
+static void xm_update_cascadebutton (widget_instance *, Widget,
+                                     widget_value *);
+static void xm_update_toggle (widget_instance *, Widget, widget_value *);
+static void xm_update_radiobox (widget_instance *, Widget, widget_value *);
+static void make_menu_in_widget (widget_instance *, Widget,
+                                 widget_value *, int);
+static void update_one_menu_entry (widget_instance *, Widget,
+                                   widget_value *, Boolean);
+static void xm_update_menu (widget_instance *, Widget, widget_value *,
+                            Boolean);
+static void xm_update_text (widget_instance *, Widget, widget_value *);
+static void xm_update_text_field (widget_instance *, Widget,
+                                  widget_value *);
+void xm_update_one_value (widget_instance *, Widget, widget_value *);
+static void activate_button (Widget, XtPointer, XtPointer);
+static Widget make_dialog (char *, Widget, Boolean, char *, char *,
+                           Boolean, Boolean, Boolean, int, int);
+static destroyed_instance* find_matching_instance (widget_instance*);
+static void mark_dead_instance_destroyed (Widget, XtPointer, XtPointer);
+static void recenter_widget (Widget);
+static Widget recycle_instance (destroyed_instance*);
+Widget xm_create_dialog (widget_instance*);
+static Widget make_menubar (widget_instance*);
+static void remove_grabs (Widget, XtPointer, XtPointer);
+static Widget make_popup_menu (widget_instance*);
+static Widget make_main (widget_instance*);
+void xm_destroy_instance (widget_instance*);
+void xm_popup_menu (Widget, XEvent *);
+static void set_min_dialog_size (Widget);
+static void do_call (Widget, XtPointer, enum do_call_type);
+static void xm_generic_callback (Widget, XtPointer, XtPointer);
+static void xm_nosel_callback (Widget, XtPointer, XtPointer);
+static void xm_pull_down_callback (Widget, XtPointer, XtPointer);
+static void xm_pop_down_callback (Widget, XtPointer, XtPointer);
+void xm_set_keyboard_focus (Widget, Widget);
+void xm_set_main_areas (Widget, Widget, Widget);
+static void xm_internal_update_other_instances (Widget, XtPointer,
+                                                XtPointer);
+static void xm_arm_callback (Widget, XtPointer, XtPointer);
 
 #if 0
-void xm_update_one_widget P_ ((widget_instance *, Widget, widget_value *,
-			       Boolean));
-void xm_pop_instance P_ ((widget_instance*, Boolean));
-void xm_manage_resizing P_ ((Widget, Boolean));
+void xm_update_one_widget (widget_instance *, Widget, widget_value *,
+                           Boolean);
+void xm_pop_instance (widget_instance*, Boolean);
+void xm_manage_resizing (Widget, Boolean);
 #endif
 
 
--- a/lwlib/lwlib-Xm.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib-Xm.h	Thu Jul 08 17:09:35 2010 +0900
@@ -26,36 +26,36 @@
 extern widget_creation_entry xm_creation_table [];
 
 Widget
-xm_create_dialog __P ((widget_instance* instance));
+xm_create_dialog (widget_instance* instance);
 
 Boolean
-lw_motif_widget_p __P ((Widget widget));
+lw_motif_widget_p (Widget widget);
 
 void
-xm_update_one_widget __P ((widget_instance* instance, Widget widget,
-		      widget_value* val, Boolean deep_p));
+xm_update_one_widget (widget_instance* instance, Widget widget,
+                      widget_value* val, Boolean deep_p);
 
 void
-xm_update_one_value __P ((widget_instance* instance, Widget widget,
-		     widget_value* val));
+xm_update_one_value (widget_instance* instance, Widget widget,
+                     widget_value* val);
 
 void
-xm_destroy_instance __P ((widget_instance* instance));
+xm_destroy_instance (widget_instance* instance);
 
 void
-xm_set_keyboard_focus __P ((Widget parent, Widget w));
+xm_set_keyboard_focus (Widget parent, Widget w);
 
 void
-xm_popup_menu __P ((Widget widget, XEvent *event));
+xm_popup_menu (Widget widget, XEvent *event);
 
 void
-xm_pop_instance __P ((widget_instance* instance, Boolean up));
+xm_pop_instance (widget_instance* instance, Boolean up);
 
 void
-xm_set_main_areas __P ((Widget parent, Widget menubar, Widget work_area));
+xm_set_main_areas (Widget parent, Widget menubar, Widget work_area);
 
 void
-xm_manage_resizing __P ((Widget w, Boolean flag));
+xm_manage_resizing (Widget w, Boolean flag);
 
 #endif /* LWLIB_XM_H */
 
--- a/lwlib/lwlib-int.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib-int.h	Thu Jul 08 17:09:35 2010 +0900
@@ -26,7 +26,7 @@
 
 #include "lwlib.h"
 
-extern char *safe_strdup __P ((const char *));
+extern char *safe_strdup (const char *);
 
 struct widget_xft_data;
 
@@ -70,14 +70,14 @@
 /* update all other instances of a widget.  Can be used in a callback when
    a widget has been used by the user */
 void
-lw_internal_update_other_instances __P ((Widget, XtPointer, XtPointer));
+lw_internal_update_other_instances (Widget, XtPointer, XtPointer);
 
 /* get the widget_value for a widget in a given instance */
 widget_value*
-lw_get_widget_value_for_widget __P ((widget_instance *, Widget));
+lw_get_widget_value_for_widget (widget_instance *, Widget);
 
-widget_info *lw_get_widget_info __P ((LWLIB_ID));
-widget_instance * lw_get_widget_instance __P ((Widget));
+widget_info *lw_get_widget_info (LWLIB_ID);
+widget_instance * lw_get_widget_instance (Widget);
 
 #endif /* LWLIB_INTERNAL_H */
 
--- a/lwlib/lwlib-utils.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib-utils.c	Thu Jul 08 17:09:35 2010 +0900
@@ -42,8 +42,7 @@
 
 /* Redisplay the contents of the widget, without first clearing it. */
 void
-XtNoClearRefreshWidget (widget)
-     Widget widget;
+XtNoClearRefreshWidget (Widget widget)
 {
   XEvent event;
 
@@ -67,10 +66,7 @@
  * Apply a function to all the subwidgets of a given widget recursively.
 */
 void
-XtApplyToWidgets (w, proc, arg)
-     Widget w;
-     XtApplyToWidgetsProc proc;
-     XtPointer arg;
+XtApplyToWidgets (Widget w, XtApplyToWidgetsProc proc, XtPointer arg)
 {
   if (XtIsComposite (w))
     {
@@ -81,8 +77,8 @@
       int nkids = cw->composite.num_children;
       Widget *kids = (Widget *) malloc (sizeof (Widget) * nkids);
       int i;
-      lwlib_bcopy ((char *) cw->composite.children, (char *) kids,
-		   sizeof (Widget) * nkids);
+      memcpy ((char *) kids, (char *) cw->composite.children,
+	      sizeof (Widget) * nkids);
       for (i = 0; i < nkids; i++)
 /* This prevent us from using gadgets, why is it here? */
 /*	if (XtIsWidget (kids [i])) */
@@ -101,10 +97,7 @@
  * Stop as soon as the function returns non NULL and returns this as a value.
  */
 void *
-XtApplyUntilToWidgets (w, proc, arg)
-     Widget w;
-     XtApplyUntilToWidgetsProc proc;
-     XtPointer arg;
+XtApplyUntilToWidgets (Widget w, XtApplyUntilToWidgetsProc proc, XtPointer arg)
 {
   void* result;
   if (XtIsComposite (w))
@@ -130,9 +123,7 @@
  * Returns a copy of the list of all children of a composite widget
  */
 Widget *
-XtCompositeChildren (widget, number)
-     Widget widget;
-     unsigned int* number;
+XtCompositeChildren (Widget widget, unsigned int *number)
 {
   CompositeWidget cw = (CompositeWidget)widget;
   Widget* result;
@@ -153,15 +144,13 @@
 }
 
 Boolean
-XtWidgetBeingDestroyedP (widget)
-     Widget widget;
+XtWidgetBeingDestroyedP (Widget widget)
 {
   return widget->core.being_destroyed;
 }
 
 void
-XtSafelyDestroyWidget (widget)
-     Widget widget;
+XtSafelyDestroyWidget (Widget widget)
 {
 #if 0
 
--- a/lwlib/lwlib-utils.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib-utils.h	Thu Jul 08 17:09:35 2010 +0900
@@ -1,21 +1,21 @@
 #ifndef _LWLIB_UTILS_H_
 #define _LWLIB_UTILS_H_
 
-void XtNoClearRefreshWidget __P ((Widget));
+void XtNoClearRefreshWidget (Widget);
 
-typedef void (*XtApplyToWidgetsProc) __P ((Widget, XtPointer));
-typedef void* (*XtApplyUntilToWidgetsProc) __P ((Widget, XtPointer));
+typedef void (*XtApplyToWidgetsProc) (Widget, XtPointer);
+typedef void* (*XtApplyUntilToWidgetsProc) (Widget, XtPointer);
 
-void XtApplyToWidgets __P ((Widget, XtApplyToWidgetsProc, XtPointer));
-void *XtApplyUntilToWidgets __P ((Widget, XtApplyUntilToWidgetsProc, XtPointer));
+void XtApplyToWidgets (Widget, XtApplyToWidgetsProc, XtPointer);
+void *XtApplyUntilToWidgets (Widget, XtApplyUntilToWidgetsProc, XtPointer);
 
-Widget *XtCompositeChildren __P ((Widget, unsigned int *));
+Widget *XtCompositeChildren (Widget, unsigned int *);
 
 /* returns True is the widget is being destroyed, False otherwise */
 Boolean
-XtWidgetBeingDestroyedP __P ((Widget widget));
+XtWidgetBeingDestroyedP (Widget widget);
 
-void XtSafelyDestroyWidget __P ((Widget));
+void XtSafelyDestroyWidget (Widget);
 
 #endif /* _LWLIB_UTILS_H_ */
 
--- a/lwlib/lwlib.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib.c	Thu Jul 08 17:09:35 2010 +0900
@@ -71,67 +71,42 @@
 char *lwlib_toolkit_type = "lucid";
 #endif
 
-static widget_value *merge_widget_value P_ ((widget_value *,
-					     widget_value *,
-					     int, int *));
-static void instantiate_widget_instance P_ ((widget_instance *));
-static int my_strcasecmp P_ ((char *, char *));
-static void safe_free_str P_ ((char *));
-static void free_widget_value_tree P_ ((widget_value *));
-static widget_value *copy_widget_value_tree P_ ((widget_value *,
-						 change_type));
-static widget_info *allocate_widget_info P_ ((char *, char *, LWLIB_ID,
-					      widget_value *,
-					      lw_callback, lw_callback,
-					      lw_callback, lw_callback));
-static void free_widget_info P_ ((widget_info *));
-static void mark_widget_destroyed P_ ((Widget, XtPointer, XtPointer));
-static widget_instance *allocate_widget_instance P_ ((widget_info *,
-						      Widget, Boolean));
-static void free_widget_instance P_ ((widget_instance *));
-static widget_info *get_widget_info P_ ((LWLIB_ID, Boolean));
-static widget_instance *get_widget_instance P_ ((Widget, Boolean));
-static widget_instance *find_instance P_ ((LWLIB_ID, Widget, Boolean));
-static Boolean safe_strcmp P_ ((char *, char *));
-static Widget name_to_widget P_ ((widget_instance *, char *));
-static void set_one_value P_ ((widget_instance *, widget_value *, Boolean));
-static void update_one_widget_instance P_ ((widget_instance *, Boolean));
-static void update_all_widget_values P_ ((widget_info *, Boolean));
-static void initialize_widget_instance P_ ((widget_instance *));
-static widget_creation_function find_in_table P_ ((char *, widget_creation_entry *));
-static Boolean dialog_spec_p P_ ((char *));
-static void destroy_one_instance P_ ((widget_instance *));
-static void lw_pop_all_widgets P_ ((LWLIB_ID, Boolean));
-static Boolean get_one_value P_ ((widget_instance *, widget_value *));
-static void show_one_widget_busy P_ ((Widget, Boolean));
-
-void
-lwlib_memset (address, value, length)
-     char *address;
-     int value;
-     size_t length;
-{
-  int i;
-
-  for (i = 0; i < length; i++)
-    address[i] = value;
-}
-
-void
-lwlib_bcopy (from, to, length)
-     char *from;
-     char *to;
-     int length;
-{
-  int i;
-
-  for (i = 0; i < length; i++)
-    to[i] = from[i];
-}
+static widget_value *merge_widget_value (widget_value *,
+                                         widget_value *,
+                                         int, int *);
+static void instantiate_widget_instance (widget_instance *);
+static int my_strcasecmp (char *, char *);
+static void safe_free_str (char *);
+static void free_widget_value_tree (widget_value *);
+static widget_value *copy_widget_value_tree (widget_value *,
+                                             change_type);
+static widget_info *allocate_widget_info (char *, char *, LWLIB_ID,
+                                          widget_value *,
+                                          lw_callback, lw_callback,
+                                          lw_callback, lw_callback);
+static void free_widget_info (widget_info *);
+static void mark_widget_destroyed (Widget, XtPointer, XtPointer);
+static widget_instance *allocate_widget_instance (widget_info *,
+                                                  Widget, Boolean);
+static void free_widget_instance (widget_instance *);
+static widget_info *get_widget_info (LWLIB_ID, Boolean);
+static widget_instance *get_widget_instance (Widget, Boolean);
+static widget_instance *find_instance (LWLIB_ID, Widget, Boolean);
+static Boolean safe_strcmp (char *, char *);
+static Widget name_to_widget (widget_instance *, char *);
+static void set_one_value (widget_instance *, widget_value *, Boolean);
+static void update_one_widget_instance (widget_instance *, Boolean);
+static void update_all_widget_values (widget_info *, Boolean);
+static void initialize_widget_instance (widget_instance *);
+static widget_creation_function find_in_table (char *, widget_creation_entry *);
+static Boolean dialog_spec_p (char *);
+static void destroy_one_instance (widget_instance *);
+static void lw_pop_all_widgets (LWLIB_ID, Boolean);
+static Boolean get_one_value (widget_instance *, widget_value *);
+static void show_one_widget_busy (Widget, Boolean);
 /* utility functions for widget_instance and widget_info */
 char *
-safe_strdup (s)
-     const char *s;
+safe_strdup (const char *s)
 {
   char *result;
   if (! s) return 0;
@@ -145,8 +120,7 @@
 /* Like strcmp but ignore differences in case.  */
 
 static int
-my_strcasecmp (s1, s2)
-     char *s1, *s2;
+my_strcasecmp (char *s1, char *s2)
 {
   while (1)
     {
@@ -164,8 +138,7 @@
 }
 
 static void
-safe_free_str (s)
-     char *s;
+safe_free_str (char *s)
 {
   free (s);
 }
@@ -174,7 +147,7 @@
 static int malloc_cpt = 0;
 
 widget_value *
-malloc_widget_value ()
+malloc_widget_value (void)
 {
   widget_value *wv;
   if (widget_value_free_list)
@@ -188,7 +161,7 @@
       wv = (widget_value *) malloc (sizeof (widget_value));
       malloc_cpt++;
     }
-  lwlib_memset ((void*) wv, 0, sizeof (widget_value));
+  memset ((void*) wv, 0, sizeof (widget_value));
   return wv;
 }
 
@@ -196,8 +169,7 @@
    by malloc_widget_value(), and no substructures.
  */
 void
-free_widget_value (wv)
-     widget_value *wv;
+free_widget_value (widget_value *wv)
 {
   if (wv->free_list)
     abort ();
@@ -217,8 +189,7 @@
 }
 
 static void
-free_widget_value_tree (wv)
-     widget_value *wv;
+free_widget_value_tree (widget_value *wv)
 {
   if (!wv)
     return;
@@ -249,9 +220,7 @@
 }
 
 static widget_value *
-copy_widget_value_tree (val, change)
-     widget_value* val;
-     change_type change;
+copy_widget_value_tree (widget_value *val, change_type change)
 {
   widget_value* copy;
 
@@ -310,21 +279,17 @@
 }
 
 static void
-free_widget_info (info)
-     widget_info* info;
+free_widget_info (widget_info *info)
 {
   safe_free_str (info->type);
   safe_free_str (info->name);
   free_widget_value_tree (info->val);
-  lwlib_memset ((void*)info, 0xDEADBEEF, sizeof (widget_info));
+  memset ((void*)info, 0xDEADBEEF, sizeof (widget_info));
   free (info);
 }
 
 static void
-mark_widget_destroyed (widget, closure, call_data)
-     Widget widget;
-     XtPointer closure;
-     XtPointer call_data;
+mark_widget_destroyed (Widget widget, XtPointer closure, XtPointer call_data)
 {
   widget_instance* instance = (widget_instance*)closure;
 
@@ -333,22 +298,12 @@
     instance->widget = NULL;
 }
 
-/* The messy #ifdef PROTOTYPES here and elsewhere are prompted by a
-   flood of warnings about argument promotion from proprietary ISO C
-   compilers.  (etags still only makes one entry for each function.)  */
 static widget_instance *
-#ifdef PROTOTYPES
 allocate_widget_instance (widget_info* info, Widget parent, Boolean pop_up_p)
-#else
-allocate_widget_instance (info, parent, pop_up_p)
-     widget_info* info;
-     Widget parent;
-     Boolean pop_up_p;
-#endif
 {
   widget_instance* instance =
     (widget_instance*)malloc (sizeof (widget_instance));
-  bzero (instance, sizeof *instance);
+  memset (instance, 0, sizeof *instance);
   instance->parent = parent;
   instance->pop_up_p = pop_up_p;
   instance->info = info;
@@ -363,21 +318,14 @@
 }
 
 static void
-free_widget_instance (instance)
-     widget_instance* instance;
+free_widget_instance (widget_instance *instance)
 {
-  lwlib_memset ((void*)instance, 0xDEADBEEF, sizeof (widget_instance));
+  memset ((void*)instance, 0xDEADBEEF, sizeof (widget_instance));
   free (instance);
 }
 
 static widget_info *
-#ifdef PROTOTYPES
 get_widget_info (LWLIB_ID id, Boolean remove_p)
-#else
-get_widget_info (id, remove_p)
-     LWLIB_ID id;
-     Boolean remove_p;
-#endif
 {
   widget_info* info;
   widget_info* prev;
@@ -401,20 +349,13 @@
 /* Internal function used by the library dependent implementation to get the
    widget_value for a given widget in an instance */
 widget_info *
-lw_get_widget_info (id)
-     LWLIB_ID id;
+lw_get_widget_info (LWLIB_ID id)
 {
   return get_widget_info (id, 0);
 }
 
 static widget_instance *
-#ifdef PROTOTYPES
 get_widget_instance (Widget widget, Boolean remove_p)
-#else
-get_widget_instance (widget, remove_p)
-     Widget widget;
-     Boolean remove_p;
-#endif
 {
   widget_info* info;
   widget_instance* instance;
@@ -441,21 +382,13 @@
    WIDGET, or null if WIDGET is not a lwlib widget.  */
 
 widget_instance *
-lw_get_widget_instance (widget)
-     Widget widget;
+lw_get_widget_instance (Widget widget)
 {
   return get_widget_instance (widget, False);
 }
 
 static widget_instance*
-#ifdef PROTOTYPES
 find_instance (LWLIB_ID id, Widget parent, Boolean pop_up_p)
-#else
-find_instance (id, parent, pop_up_p)
-     LWLIB_ID id;
-     Widget parent;
-     Boolean pop_up_p;
-#endif
 {
   widget_info* info = get_widget_info (id, False);
   widget_instance* instance;
@@ -471,9 +404,7 @@
 
 /* utility function for widget_value */
 static Boolean
-safe_strcmp (s1, s2)
-     char* s1;
-     char* s2;
+safe_strcmp (char *s1, char *s2)
 {
   if (!!s1 ^ !!s2) return True;
   return (s1 && s2) ? strcmp (s1, s2) : s1 ? False : !!s2;
@@ -500,11 +431,7 @@
 
 
 static widget_value *
-merge_widget_value (val1, val2, level, change_p)
-     widget_value* val1;
-     widget_value* val2;
-     int level;
-     int *change_p;
+merge_widget_value (widget_value *val1, widget_value *val2, int level, int *change_p)
 {
   change_type change, this_one_change;
   widget_value* merged_next;
@@ -658,9 +585,7 @@
 
 /* modifying the widgets */
 static Widget
-name_to_widget (instance, name)
-     widget_instance* instance;
-     char* name;
+name_to_widget (widget_instance *instance, char *name)
 {
   Widget widget = NULL;
 
@@ -684,14 +609,7 @@
 }
 
 static void
-#ifdef PROTOTYPES
 set_one_value (widget_instance* instance, widget_value* val, Boolean deep_p)
-#else
-set_one_value (instance, val, deep_p)
-     widget_instance* instance;
-     widget_value* val;
-     Boolean deep_p;
-#endif
 {
   Widget widget = name_to_widget (instance, val->name);
 
@@ -713,13 +631,7 @@
 }
 
 static void
-#ifdef PROTOTYPES
 update_one_widget_instance (widget_instance* instance, Boolean deep_p)
-#else
-update_one_widget_instance (instance, deep_p)
-     widget_instance* instance;
-     Boolean deep_p;
-#endif
 {
   widget_value *val;
 
@@ -733,13 +645,7 @@
 }
 
 static void
-#ifdef PROTOTYPES
 update_all_widget_values (widget_info* info, Boolean deep_p)
-#else
-update_all_widget_values (info, deep_p)
-     widget_info* info;
-     Boolean deep_p;
-#endif
 {
   widget_instance* instance;
   widget_value* val;
@@ -752,14 +658,7 @@
 }
 
 int
-#ifdef PROTOTYPES
 lw_modify_all_widgets (LWLIB_ID id, widget_value* val, Boolean deep_p)
-#else
-lw_modify_all_widgets (id, val, deep_p)
-     LWLIB_ID id;
-     widget_value* val;
-     Boolean deep_p;
-#endif
 {
   widget_info* info = get_widget_info (id, False);
   widget_value* new_val;
@@ -814,8 +713,7 @@
 /* creating the widgets */
 
 static void
-initialize_widget_instance (instance)
-     widget_instance* instance;
+initialize_widget_instance (widget_instance *instance)
 {
   widget_value* val;
 
@@ -830,9 +728,7 @@
 
 
 static widget_creation_function
-find_in_table (type, table)
-     char* type;
-     widget_creation_entry* table;
+find_in_table (char *type, widget_creation_entry *table)
 {
   widget_creation_entry* cur;
   for (cur = table; cur->type; cur++)
@@ -842,8 +738,7 @@
 }
 
 static Boolean
-dialog_spec_p (name)
-     char* name;
+dialog_spec_p (char *name)
 {
   /* return True if name matches [EILPQeilpq][1-9][Bb] or
      [EILPQeilpq][1-9][Bb][Rr][1-9] */
@@ -876,8 +771,7 @@
 }
 
 static void
-instantiate_widget_instance (instance)
-     widget_instance* instance;
+instantiate_widget_instance (widget_instance *instance)
 {
   widget_creation_function function = NULL;
 
@@ -945,14 +839,7 @@
 }
 
 Widget
-#ifdef PROTOTYPES
 lw_get_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p)
-#else
-lw_get_widget (id, parent, pop_up_p)
-     LWLIB_ID id;
-     Widget parent;
-     Boolean pop_up_p;
-#endif
 {
   widget_instance* instance;
 
@@ -961,14 +848,7 @@
 }
 
 Widget
-#ifdef PROTOTYPES
 lw_make_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p)
-#else
-lw_make_widget (id, parent, pop_up_p)
-     LWLIB_ID id;
-     Widget parent;
-     Boolean pop_up_p;
-#endif
 {
   widget_instance* instance;
   widget_info* info;
@@ -988,25 +868,10 @@
 }
 
 Widget
-#ifdef PROTOTYPES
 lw_create_widget (char* type, char* name, LWLIB_ID id, widget_value* val,
 		  Widget parent, Boolean pop_up_p,
 		  lw_callback pre_activate_cb, lw_callback selection_cb,
 		  lw_callback post_activate_cb, lw_callback highlight_cb)
-#else
-lw_create_widget (type, name, id, val, parent, pop_up_p, pre_activate_cb,
-		  selection_cb, post_activate_cb, highlight_cb)
-     char* type;
-     char* name;
-     LWLIB_ID id;
-     widget_value* val;
-     Widget parent;
-     Boolean pop_up_p;
-     lw_callback pre_activate_cb;
-     lw_callback selection_cb;
-     lw_callback post_activate_cb;
-     lw_callback highlight_cb;
-#endif
 {
   lw_register_widget (type, name, id, val, pre_activate_cb, selection_cb,
 		      post_activate_cb, highlight_cb);
@@ -1016,8 +881,7 @@
 
 /* destroying the widgets */
 static void
-destroy_one_instance (instance)
-     widget_instance* instance;
+destroy_one_instance (widget_instance *instance)
 {
   /* Remove the destroy callback on the widget; that callback will try to
      dereference the instance object (to set its widget slot to 0, since the
@@ -1059,8 +923,7 @@
 }
 
 void
-lw_destroy_widget (w)
-     Widget w;
+lw_destroy_widget (Widget w)
 {
   widget_instance* instance = get_widget_instance (w, True);
 
@@ -1076,8 +939,7 @@
 }
 
 void
-lw_destroy_all_widgets (id)
-     LWLIB_ID id;
+lw_destroy_all_widgets (LWLIB_ID id)
 {
   widget_info* info = get_widget_info (id, True);
   widget_instance* instance;
@@ -1096,14 +958,14 @@
 }
 
 void
-lw_destroy_everything ()
+lw_destroy_everything (void)
 {
   while (all_widget_info)
     lw_destroy_all_widgets (all_widget_info->id);
 }
 
 void
-lw_destroy_all_pop_ups ()
+lw_destroy_all_pop_ups (void)
 {
   widget_info* info;
   widget_info* next;
@@ -1123,7 +985,7 @@
 #endif
 
 Widget
-lw_raise_all_pop_up_widgets ()
+lw_raise_all_pop_up_widgets (void)
 {
   widget_info* info;
   widget_instance* instance;
@@ -1156,13 +1018,7 @@
 }
 
 static void
-#ifdef PROTOTYPES
 lw_pop_all_widgets (LWLIB_ID id, Boolean up)
-#else
-lw_pop_all_widgets (id, up)
-     LWLIB_ID id;
-     Boolean up;
-#endif
 {
   widget_info* info = get_widget_info (id, False);
   widget_instance* instance;
@@ -1197,23 +1053,19 @@
 }
 
 void
-lw_pop_up_all_widgets (id)
-     LWLIB_ID id;
+lw_pop_up_all_widgets (LWLIB_ID id)
 {
   lw_pop_all_widgets (id, True);
 }
 
 void
-lw_pop_down_all_widgets (id)
-     LWLIB_ID id;
+lw_pop_down_all_widgets (LWLIB_ID id)
 {
   lw_pop_all_widgets (id, False);
 }
 
 void
-lw_popup_menu (widget, event)
-     Widget widget;
-     XEvent *event;
+lw_popup_menu (Widget widget, XEvent *event)
 {
 #if defined (USE_LUCID)
   if (lw_lucid_widget_p (widget))
@@ -1231,9 +1083,7 @@
 
 /* get the values back */
 static Boolean
-get_one_value (instance, val)
-     widget_instance* instance;
-     widget_value* val;
+get_one_value (widget_instance *instance, widget_value *val)
 {
   Widget widget = name_to_widget (instance, val->name);
 
@@ -1258,9 +1108,7 @@
 }
 
 Boolean
-lw_get_some_values (id, val_out)
-     LWLIB_ID id;
-     widget_value* val_out;
+lw_get_some_values (LWLIB_ID id, widget_value *val_out)
 {
   widget_info* info = get_widget_info (id, False);
   widget_instance* instance;
@@ -1282,8 +1130,7 @@
 }
 
 widget_value*
-lw_get_all_values (id)
-     LWLIB_ID id;
+lw_get_all_values (LWLIB_ID id)
 {
   widget_info* info = get_widget_info (id, False);
   widget_value* val = info->val;
@@ -1296,9 +1143,7 @@
 /* internal function used by the library dependent implementation to get the
    widget_value for a given widget in an instance */
 widget_value*
-lw_get_widget_value_for_widget (instance, w)
-     widget_instance* instance;
-     Widget w;
+lw_get_widget_value_for_widget (widget_instance *instance, Widget w)
 {
   char* name = XtName (w);
   widget_value* cur;
@@ -1317,10 +1162,7 @@
   modified to update other instances of the widgets.  Closure should be the
   widget_instance. */
 void
-lw_internal_update_other_instances (widget, closure, call_data)
-     Widget widget;
-     XtPointer closure;
-     XtPointer call_data;
+lw_internal_update_other_instances (Widget widget, XtPointer closure, XtPointer call_data)
 {
   widget_instance* instance = (widget_instance*)closure;
   char* name = XtName (widget);
@@ -1357,8 +1199,7 @@
 /* get the id */
 
 LWLIB_ID
-lw_get_widget_id (w)
-     Widget w;
+lw_get_widget_id (Widget w)
 {
   widget_instance* instance = get_widget_instance (w, False);
 
@@ -1367,9 +1208,7 @@
 
 /* set the keyboard focus */
 void
-lw_set_keyboard_focus (parent, w)
-     Widget parent;
-     Widget w;
+lw_set_keyboard_focus (Widget parent, Widget w)
 {
 #if defined (USE_MOTIF)
   xm_set_keyboard_focus (parent, w);
@@ -1380,13 +1219,7 @@
 
 /* Show busy */
 static void
-#ifdef PROTOTYPES
 show_one_widget_busy (Widget w, Boolean flag)
-#else
-show_one_widget_busy (w, flag)
-     Widget w;
-     Boolean flag;
-#endif
 {
   Pixel foreground = 0;
   Pixel background = 1;
@@ -1405,13 +1238,7 @@
 }
 
 void
-#ifdef PROTOTYPES
 lw_show_busy (Widget w, Boolean busy)
-#else
-lw_show_busy (w, busy)
-     Widget w;
-     Boolean busy;
-#endif
 {
   widget_instance* instance = get_widget_instance (w, False);
   widget_info* info;
@@ -1433,13 +1260,7 @@
 /* This hack exists because Lucid/Athena need to execute the strange
    function below to support geometry management. */
 void
-#ifdef PROTOTYPES
 lw_refigure_widget (Widget w, Boolean doit)
-#else
-lw_refigure_widget (w, doit)
-     Widget w;
-     Boolean doit;
-#endif
 {
 #if defined (USE_XAW)
   XawPanedSetRefigureMode (w, doit);
@@ -1455,9 +1276,7 @@
 /* Toolkit independent way of determining if an event window is in the
    menubar. */
 Boolean
-lw_window_is_in_menubar (win, menubar_widget)
-     Window win;
-     Widget menubar_widget;
+lw_window_is_in_menubar (Window win, Widget menubar_widget)
 {
   return menubar_widget
 #if defined (USE_LUCID)
@@ -1473,10 +1292,7 @@
 
 /* Motif hack to set the main window areas. */
 void
-lw_set_main_areas (parent, menubar, work_area)
-     Widget parent;
-     Widget menubar;
-     Widget work_area;
+lw_set_main_areas (Widget parent, Widget menubar, Widget work_area)
 {
 #if defined (USE_MOTIF)
   xm_set_main_areas (parent, menubar, work_area);
@@ -1486,13 +1302,7 @@
 /* Manage resizing for Motif.  This disables resizing when the menubar
    is about to be modified. */
 void
-#ifdef PROTOTYPES
 lw_allow_resizing (Widget w, Boolean flag)
-#else
-lw_allow_resizing (w, flag)
-     Widget w;
-     Boolean flag;
-#endif
 {
 #if defined (USE_MOTIF)
   xm_manage_resizing (w, flag);
@@ -1506,15 +1316,12 @@
    to similar ones that are supported.  */
 
 int
-lw_separator_p (label, type, motif_p)
-     char *label;
-     enum menu_separator *type;
-     int motif_p;
+lw_separator_p (char *label, enum menu_separator *type, int motif_p)
 {
   int separator_p = 0;
 
   if (strlen (label) >= 3
-      && bcmp (label, "--:", 3) == 0)
+      && memcmp (label, "--:", 3) == 0)
     {
       static struct separator_table
       {
@@ -1557,7 +1364,7 @@
 	  }
     }
   else if (strlen (label) > 3
-	   && bcmp (label, "--", 2) == 0
+	   && memcmp (label, "--", 2) == 0
 	   && label[2] != '-')
     {
       /* Alternative, more Emacs-style names.  */
--- a/lwlib/lwlib.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/lwlib.h	Thu Jul 08 17:09:35 2010 +0900
@@ -130,66 +130,64 @@
 } widget_value;
 
 
-typedef void (*lw_callback) __P ((Widget w, LWLIB_ID id, void* data));
+typedef void (*lw_callback) (Widget w, LWLIB_ID id, void* data);
 
-void  lw_register_widget __P ((char* type, char* name, LWLIB_ID id,
-			       widget_value* val, lw_callback pre_activate_cb,
-			       lw_callback selection_cb,
-			       lw_callback post_activate_cb,
-			       lw_callback highlight_cb));
-Widget lw_get_widget __P ((LWLIB_ID id, Widget parent, Boolean pop_up_p));
-Widget lw_make_widget __P ((LWLIB_ID id, Widget parent, Boolean pop_up_p));
-Widget lw_create_widget __P ((char* type, char* name, LWLIB_ID id,
-			      widget_value* val, Widget parent, Boolean pop_up_p,
-			      lw_callback pre_activate_cb,
-			      lw_callback selection_cb,
-			      lw_callback post_activate_cb,
-			      lw_callback highlight_cb));
-LWLIB_ID lw_get_widget_id __P ((Widget w));
-int lw_modify_all_widgets __P ((LWLIB_ID id, widget_value* val, Boolean deep_p));
-void lw_destroy_widget __P ((Widget w));
-void lw_destroy_all_widgets __P ((LWLIB_ID id));
-void lw_destroy_everything __P ((void));
-void lw_destroy_all_pop_ups __P ((void));
-Widget lw_raise_all_pop_up_widgets __P ((void));
-widget_value* lw_get_all_values __P ((LWLIB_ID id));
-Boolean lw_get_some_values __P ((LWLIB_ID id, widget_value* val));
-void lw_pop_up_all_widgets __P ((LWLIB_ID id));
-void lw_pop_down_all_widgets __P ((LWLIB_ID id));
-widget_value *malloc_widget_value ();
-void free_widget_value __P ((widget_value *));
-void lw_popup_menu __P ((Widget, XEvent *));
+void  lw_register_widget (char* type, char* name, LWLIB_ID id,
+                          widget_value* val, lw_callback pre_activate_cb,
+                          lw_callback selection_cb,
+                          lw_callback post_activate_cb,
+                          lw_callback highlight_cb);
+Widget lw_get_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p);
+Widget lw_make_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p);
+Widget lw_create_widget (char* type, char* name, LWLIB_ID id,
+                         widget_value* val, Widget parent, Boolean pop_up_p,
+                         lw_callback pre_activate_cb,
+                         lw_callback selection_cb,
+                         lw_callback post_activate_cb,
+                         lw_callback highlight_cb);
+LWLIB_ID lw_get_widget_id (Widget w);
+int lw_modify_all_widgets (LWLIB_ID id, widget_value* val, Boolean deep_p);
+void lw_destroy_widget (Widget w);
+void lw_destroy_all_widgets (LWLIB_ID id);
+void lw_destroy_everything (void);
+void lw_destroy_all_pop_ups (void);
+Widget lw_raise_all_pop_up_widgets (void);
+widget_value* lw_get_all_values (LWLIB_ID id);
+Boolean lw_get_some_values (LWLIB_ID id, widget_value* val);
+void lw_pop_up_all_widgets (LWLIB_ID id);
+void lw_pop_down_all_widgets (LWLIB_ID id);
+widget_value *malloc_widget_value (void);
+void free_widget_value (widget_value *);
+void lw_popup_menu (Widget, XEvent *);
 
 /* Toolkit independent way of focusing on a Widget at the Xt level. */
-void lw_set_keyboard_focus __P ((Widget parent, Widget w));
+void lw_set_keyboard_focus (Widget parent, Widget w);
 
 /* Silly Energize hack to invert the "sheet" button */
-void lw_show_busy __P ((Widget w, Boolean busy));
+void lw_show_busy (Widget w, Boolean busy);
 
 /* Silly hack to assist with Lucid/Athena geometry management. */
-void lw_refigure_widget __P ((Widget w, Boolean doit));
+void lw_refigure_widget (Widget w, Boolean doit);
 
 /* Toolkit independent way of determining if an event occurred on a
    menubar. */
-Boolean lw_window_is_in_menubar __P ((Window win, Widget menubar_widget));
+Boolean lw_window_is_in_menubar (Window win, Widget menubar_widget);
 
 /* Manage resizing: TRUE permits resizing widget w; FALSE disallows it. */
-void lw_allow_resizing __P ((Widget w, Boolean flag));
+void lw_allow_resizing (Widget w, Boolean flag);
 
 /* Set up the main window. */
-void lw_set_main_areas __P ((Widget parent,
-			   Widget menubar,
-			   Widget work_area));
+void lw_set_main_areas (Widget parent,
+                        Widget menubar,
+                        Widget work_area);
 
 /* Value is non-zero if LABEL is a menu separator.  If it is, *TYPE is
    set to an appropriate enumerator of type enum menu_separator.
    MOTIF_P non-zero means map separator types not supported by Motif
    to similar ones that are supported.  */
 
-int lw_separator_p __P ((char *label, enum menu_separator *type,
-		    int motif_p));
-
-void lwlib_bcopy __P ((char*, char*, int));
+int lw_separator_p (char *label, enum menu_separator *type,
+                    int motif_p);
 
 #endif /* LWLIB_H */
 
--- a/lwlib/xlwmenu.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/lwlib/xlwmenu.c	Thu Jul 08 17:09:35 2010 +0900
@@ -185,24 +185,25 @@
 };
 #undef offset
 
-static Boolean XlwMenuSetValues();
-static void XlwMenuRealize();
-static void XlwMenuResize();
-static void XlwMenuInitialize();
-static void XlwMenuRedisplay();
-static void XlwMenuDestroy();
-static void XlwMenuClassInitialize();
-static void Start();
-static void Drag();
-static void Down();
-static void Up();
-static void Left();
-static void Right();
-static void Select();
-static void Key();
-static void Nothing();
-static int separator_height __P ((enum menu_separator));
-static void pop_up_menu __P ((XlwMenuWidget, XButtonPressedEvent *));
+static Boolean XlwMenuSetValues(Widget current, Widget request, Widget new,
+                                ArgList args, Cardinal *num_args);
+static void XlwMenuRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes);
+static void XlwMenuResize(Widget w);
+static void XlwMenuInitialize(Widget request, Widget mw, ArgList args, Cardinal *num_args);
+static void XlwMenuRedisplay(Widget w, XEvent *ev, Region region);
+static void XlwMenuDestroy(Widget w);
+static void XlwMenuClassInitialize(void);
+static void Start(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Drag(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Down(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Up(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Left(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Right(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Select(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Key(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Nothing(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static int separator_height (enum menu_separator);
+static void pop_up_menu (XlwMenuWidget, XButtonPressedEvent *);
 
 
 static XtActionsRec
@@ -278,9 +279,7 @@
 
 /* Ungrab pointer and keyboard */
 static void
-ungrab_all (w, ungrabtime)
-     Widget w;
-     Time ungrabtime;
+ungrab_all (Widget w, Time ungrabtime)
 {
   XtUngrabPointer (w, ungrabtime);
   if (GRAB_KEYBOARD) XtUngrabKeyboard (w, ungrabtime);
@@ -289,8 +288,7 @@
 /* Like abort, but remove grabs from widget W before.  */
 
 static void
-abort_gracefully (w)
-     Widget w;
+abort_gracefully (Widget w)
 {
   if (XtIsShell (XtParent (w)))
     XtRemoveGrab (w);
@@ -299,9 +297,7 @@
 }
 
 static void
-push_new_stack (mw, val)
-     XlwMenuWidget mw;
-     widget_value* val;
+push_new_stack (XlwMenuWidget mw, widget_value *val)
 {
   if (!mw->menu.new_stack)
     {
@@ -321,8 +317,7 @@
 }
 
 static void
-pop_new_stack_if_no_contents (mw)
-     XlwMenuWidget mw;
+pop_new_stack_if_no_contents (XlwMenuWidget mw)
 {
   if (mw->menu.new_depth > 1)
     {
@@ -332,9 +327,7 @@
 }
 
 static void
-make_old_stack_space (mw, n)
-     XlwMenuWidget mw;
-     int n;
+make_old_stack_space (XlwMenuWidget mw, int n)
 {
   if (!mw->menu.old_stack)
     {
@@ -354,9 +347,7 @@
 
 /* Size code */
 static int
-string_width (mw, s)
-     XlwMenuWidget mw;
-     char *s;
+string_width (XlwMenuWidget mw, char *s)
 {
   XCharStruct xcs;
   int drop;
@@ -415,8 +406,7 @@
 #endif
 
 static int
-arrow_width (mw)
-     XlwMenuWidget mw;
+arrow_width (XlwMenuWidget mw)
 {
   return (MENU_FONT_ASCENT (mw) * 3/4) | 1;
 }
@@ -424,8 +414,7 @@
 /* Return the width of toggle buttons of widget MW.  */
 
 static int
-toggle_button_width (mw)
-     XlwMenuWidget mw;
+toggle_button_width (XlwMenuWidget mw)
 {
   return (MENU_FONT_HEIGHT (mw) * 2 / 3) | 1;
 }
@@ -434,8 +423,7 @@
 /* Return the width of radio buttons of widget MW.  */
 
 static int
-radio_button_width (mw)
-     XlwMenuWidget mw;
+radio_button_width (XlwMenuWidget mw)
 {
   return toggle_button_width (mw) * 1.41;
 }
@@ -449,9 +437,7 @@
 };
 
 static char*
-resource_widget_value (mw, val)
-     XlwMenuWidget mw;
-     widget_value *val;
+resource_widget_value (XlwMenuWidget mw, widget_value *val)
 {
   if (!val->toolkit_data)
     {
@@ -537,9 +523,7 @@
 }
 
 static void
-size_menu (mw, level)
-     XlwMenuWidget mw;
-     int level;
+size_menu (XlwMenuWidget mw, int level)
 {
   unsigned int  label_width = 0;
   int		rest_width = 0;
@@ -605,14 +589,7 @@
 /* Display code */
 
 static void
-draw_arrow (mw, window, gc, x, y, width, down_p)
-     XlwMenuWidget mw;
-     Window window;
-     GC gc;
-     int x;
-     int y;
-     int width;
-     int down_p;
+draw_arrow (XlwMenuWidget mw, Window window, GC gc, int x, int y, int width, int down_p)
 {
   Display *dpy = XtDisplay (mw);
   GC top_gc = mw->menu.shadow_top_gc;
@@ -669,15 +646,7 @@
 
 
 static void
-draw_shadow_rectangle (mw, window, x, y, width, height, erase_p, down_p)
-     XlwMenuWidget mw;
-     Window window;
-     int x;
-     int y;
-     int width;
-     int height;
-     int erase_p;
-     int down_p;
+draw_shadow_rectangle (XlwMenuWidget mw, Window window, int x, int y, int width, int height, int erase_p, int down_p)
 {
   Display *dpy = XtDisplay (mw);
   GC top_gc = !erase_p ? mw->menu.shadow_top_gc : mw->menu.background_gc;
@@ -733,15 +702,7 @@
 
 
 static void
-draw_shadow_rhombus (mw, window, x, y, width, height, erase_p, down_p)
-     XlwMenuWidget mw;
-     Window window;
-     int x;
-     int y;
-     int width;
-     int height;
-     int erase_p;
-     int down_p;
+draw_shadow_rhombus (XlwMenuWidget mw, Window window, int x, int y, int width, int height, int erase_p, int down_p)
 {
   Display *dpy = XtDisplay (mw);
   GC top_gc = !erase_p ? mw->menu.shadow_top_gc : mw->menu.background_gc;
@@ -801,10 +762,7 @@
    toggle button is selected.  */
 
 static void
-draw_toggle (mw, window, x, y, selected_p)
-     XlwMenuWidget mw;
-     Window window;
-     int x, y, selected_p;
+draw_toggle (XlwMenuWidget mw, Window window, int x, int y, int selected_p)
 {
   int width, height;
 
@@ -821,10 +779,7 @@
    toggle button is selected.  */
 
 static void
-draw_radio (mw, window, x, y, selected_p)
-     XlwMenuWidget mw;
-     Window window;
-     int x, y, selected_p;
+draw_radio (XlwMenuWidget mw, Window window, int x, int y, int selected_p)
 {
   int width, height;
 
@@ -841,11 +796,7 @@
    separator to draw.  TYPE is the separator type.  */
 
 static void
-draw_separator (mw, window, x, y, width, type)
-     XlwMenuWidget mw;
-     Window window;
-     int x, y, width;
-     enum menu_separator type;
+draw_separator (XlwMenuWidget mw, Window window, int x, int y, int width, enum menu_separator type)
 {
   Display *dpy = XtDisplay (mw);
   XGCValues xgcv;
@@ -958,8 +909,7 @@
 /* Return the pixel height of menu separator SEPARATOR.  */
 
 static int
-separator_height (separator)
-     enum menu_separator separator;
+separator_height (enum menu_separator separator)
 {
   switch (separator)
     {
@@ -1137,7 +1087,6 @@
 #ifdef HAVE_XFT
                   if (ws->xft_draw)
                     {
-                      XGlyphInfo gi;
                       int draw_x = ws->width - ws->max_rest_width
                         + mw->menu.arrow_spacing;
                       int draw_y = y + v_spacing + shadow + font_ascent;
@@ -1188,13 +1137,7 @@
 }
 
 static void
-display_menu (mw, level, just_compute_p, highlighted_pos, hit, hit_return)
-     XlwMenuWidget mw;
-     int level;
-     Boolean just_compute_p;
-     XPoint* highlighted_pos;
-     XPoint* hit;
-     widget_value** hit_return;
+display_menu (XlwMenuWidget mw, int level, Boolean just_compute_p, XPoint *highlighted_pos, XPoint *hit, widget_value **hit_return)
 {
   widget_value*	val;
   widget_value* following_item;
@@ -1285,10 +1228,7 @@
 
 /* Motion code */
 static void
-set_new_state (mw, val, level)
-     XlwMenuWidget mw;
-     widget_value* val;
-     int level;
+set_new_state (XlwMenuWidget mw, widget_value *val, int level)
 {
   int i;
 
@@ -1311,7 +1251,7 @@
   for (i = 0; i < mw->menu.windows_length; ++i)
     if (mw->menu.windows [i].w == widget) break;
   if (i < mw->menu.windows_length && i < mw->menu.old_depth)
-    display_menu (mw, i, False, NULL, NULL, NULL, NULL, NULL);
+    display_menu (mw, i, False, NULL, NULL, NULL);
 }
 
 static void
@@ -1332,16 +1272,11 @@
 
 
 static void
-make_windows_if_needed (mw, n)
-     XlwMenuWidget mw;
-     int n;
+make_windows_if_needed (XlwMenuWidget mw, int n)
 {
   int i;
   int start_at;
   window_state* windows;
-#ifdef HAVE_XFT
-  int screen = XScreenNumberOfScreen (mw->core.screen);
-#endif
 
   if (mw->menu.windows_length >= n)
     return;
@@ -1396,9 +1331,7 @@
 /* Value is non-zero if WINDOW is part of menu bar widget W.  */
 
 int
-xlwmenu_window_p (w, window)
-     Widget w;
-     Window window;
+xlwmenu_window_p (Widget w, Window window)
 {
   XlwMenuWidget mw = (XlwMenuWidget) w;
   int i;
@@ -1412,11 +1345,7 @@
 
 /* Make the window fit in the screen */
 static void
-fit_to_screen (mw, ws, previous_ws, horizontal_p)
-     XlwMenuWidget mw;
-     window_state* ws;
-     window_state* previous_ws;
-     Boolean horizontal_p;
+fit_to_screen (XlwMenuWidget mw, window_state *ws, window_state *previous_ws, Boolean horizontal_p)
 {
   unsigned int screen_width = WidthOfScreen (XtScreen (mw));
   unsigned int screen_height = HeightOfScreen (XtScreen (mw));
@@ -1497,8 +1426,7 @@
 
 /* Updates old_stack from new_stack and redisplays. */
 static void
-remap_menubar (mw)
-     XlwMenuWidget mw;
+remap_menubar (XlwMenuWidget mw)
 {
   int i;
   int last_same;
@@ -1591,11 +1519,7 @@
 }
 
 static Boolean
-motion_event_is_in_menu (mw, ev, level, relative_pos)
-     XlwMenuWidget mw;
-     XMotionEvent* ev;
-     int level;
-     XPoint* relative_pos;
+motion_event_is_in_menu (XlwMenuWidget mw, XMotionEvent *ev, int level, XPoint *relative_pos)
 {
   window_state* ws = &mw->menu.windows [level];
   int shadow = level == 0 ? 0 : mw->menu.shadow_thickness;
@@ -1608,11 +1532,7 @@
 }
 
 static Boolean
-map_event_to_widget_value (mw, ev, val, level)
-     XlwMenuWidget mw;
-     XMotionEvent* ev;
-     widget_value** val;
-     int* level;
+map_event_to_widget_value (XlwMenuWidget mw, XMotionEvent *ev, widget_value **val, int *level)
 {
   int 		i;
   XPoint	relative_pos;
@@ -1651,8 +1571,7 @@
 
 /* Procedures */
 static void
-make_drawing_gcs (mw)
-     XlwMenuWidget mw;
+make_drawing_gcs (XlwMenuWidget mw)
 {
   XGCValues xgcv;
   float scale;
@@ -1722,8 +1641,7 @@
 }
 
 static void
-release_drawing_gcs (mw)
-     XlwMenuWidget mw;
+release_drawing_gcs (XlwMenuWidget mw)
 {
   XtReleaseGC ((Widget) mw, mw->menu.foreground_gc);
   XtReleaseGC ((Widget) mw, mw->menu.button_gc);
@@ -1742,8 +1660,7 @@
 		   ? ((unsigned long) (x)) : ((unsigned long) (y)))
 
 static void
-make_shadow_gcs (mw)
-     XlwMenuWidget mw;
+make_shadow_gcs (XlwMenuWidget mw)
 {
   XGCValues xgcv;
   unsigned long pm = 0;
@@ -1875,8 +1792,7 @@
 
 
 static void
-release_shadow_gcs (mw)
-     XlwMenuWidget mw;
+release_shadow_gcs (XlwMenuWidget mw)
 {
   Display *dpy = XtDisplay ((Widget) mw);
   Screen *screen = XtScreen ((Widget) mw);
@@ -1897,8 +1813,7 @@
 
 #ifdef HAVE_XFT
 static int
-openXftFont (mw)
-     XlwMenuWidget mw;
+openXftFont (XlwMenuWidget mw)
 {
   char *fname = mw->menu.faceName;
 
@@ -1934,14 +1849,10 @@
 #endif
 
 static void
-XlwMenuInitialize (request, mw, args, num_args)
-     Widget request;
-     XlwMenuWidget mw;
-     ArgList args;
-     Cardinal *num_args;
+XlwMenuInitialize (Widget request, Widget w, ArgList args, Cardinal *num_args)
 {
   /* Get the GCs and the widget size */
-
+  XlwMenuWidget mw = (XlwMenuWidget) w;
   Window window = RootWindowOfScreen (DefaultScreenOfDisplay (XtDisplay (mw)));
   Display* display = XtDisplay (mw);
 
@@ -1950,7 +1861,7 @@
 
   /* _XtCreate is freeing the object that was passed to us,
      so make a copy that we will actually keep.  */
-  lwlib_bcopy (mw->menu.contents, tem, sizeof (widget_value));
+  memcpy (tem, mw->menu.contents, sizeof (widget_value));
   mw->menu.contents = tem;
 #endif
 
@@ -2018,16 +1929,13 @@
 }
 
 static void
-XlwMenuClassInitialize ()
+XlwMenuClassInitialize (void)
 {
   xlwmenu_default_font = 0;
 }
 
 static void
-XlwMenuRealize (w, valueMask, attributes)
-     Widget w;
-     Mask *valueMask;
-     XSetWindowAttributes *attributes;
+XlwMenuRealize (Widget w, Mask *valueMask, XSetWindowAttributes *attributes)
 {
   XlwMenuWidget mw = (XlwMenuWidget)w;
   XSetWindowAttributes xswa;
@@ -2089,13 +1997,9 @@
    receives expose events through Xt.  So we repaint all the other panes
    when receiving an Expose event. */
 static void
-XlwMenuRedisplay (w, ev, region)
-     Widget w;
-     XEvent* ev;
-     Region region;
+XlwMenuRedisplay (Widget w, XEvent *ev, Region region)
 {
   XlwMenuWidget mw = (XlwMenuWidget)w;
-  int i;
 
   /* If we have a depth beyond 1, it's because a submenu was displayed.
      If the submenu has been destroyed, set the depth back to 1.  */
@@ -2113,15 +2017,13 @@
    over a menu item is unmapped.  */
 
 void
-xlwmenu_redisplay (w)
-     Widget w;
+xlwmenu_redisplay (Widget w)
 {
   XlwMenuRedisplay (w, NULL, None);
 }
 
 static void
-XlwMenuDestroy (w)
-     Widget w;
+XlwMenuDestroy (Widget w)
 {
   int i;
   XlwMenuWidget mw = (XlwMenuWidget) w;
@@ -2200,10 +2102,8 @@
 #endif
 
 static Boolean
-XlwMenuSetValues (current, request, new)
-     Widget current;
-     Widget request;
-     Widget new;
+XlwMenuSetValues (Widget current, Widget request, Widget new,
+                  ArgList args, Cardinal *num_args)
 {
   XlwMenuWidget oldmw = (XlwMenuWidget)current;
   XlwMenuWidget newmw = (XlwMenuWidget)new;
@@ -2292,8 +2192,7 @@
 }
 
 static void
-XlwMenuResize (w)
-     Widget w;
+XlwMenuResize (Widget w)
 {
   XlwMenuWidget mw = (XlwMenuWidget)w;
 
@@ -2315,9 +2214,7 @@
 
 /* Action procedures */
 static void
-handle_single_motion_event (mw, ev)
-     XlwMenuWidget mw;
-     XMotionEvent* ev;
+handle_single_motion_event (XlwMenuWidget mw, XMotionEvent *ev)
 {
   widget_value*	val;
   int 		level;
@@ -2333,9 +2230,7 @@
 }
 
 static void
-handle_motion_event (mw, ev)
-     XlwMenuWidget mw;
-     XMotionEvent* ev;
+handle_motion_event (XlwMenuWidget mw, XMotionEvent *ev)
 {
   int x = ev->x_root;
   int y = ev->y_root;
@@ -2357,11 +2252,7 @@
 }
 
 static void
-Start (w, ev, params, num_params)
-     Widget w;
-     XEvent *ev;
-     String *params;
-     Cardinal *num_params;
+Start (Widget w, XEvent *ev, String *params, Cardinal *num_params)
 {
   XlwMenuWidget mw = (XlwMenuWidget)w;
 
@@ -2394,11 +2285,7 @@
 }
 
 static void
-Drag (w, ev, params, num_params)
-     Widget w;
-     XEvent *ev;
-     String *params;
-     Cardinal *num_params;
+Drag (Widget w, XEvent *ev, String *params, Cardinal *num_params)
 {
   XlwMenuWidget mw = (XlwMenuWidget)w;
   if (mw->menu.popped_up)
@@ -2408,19 +2295,12 @@
 /* Do nothing.
    This is how we handle presses and releases of modifier keys.  */
 static void
-Nothing (w, ev, params, num_params)
-     Widget w;
-     XEvent *ev;
-     String *params;
-     Cardinal *num_params;
+Nothing (Widget w, XEvent *ev, String *params, Cardinal *num_params)
 {
 }
 
 static widget_value *
-find_first_selectable (mw, item, skip_titles)
-     XlwMenuWidget mw;
-     widget_value *item;
-     int skip_titles;
+find_first_selectable (XlwMenuWidget mw, widget_value *item, int skip_titles)
 {
   widget_value *current = item;
   enum menu_separator separator;
@@ -2436,10 +2316,7 @@
 }
 
 static widget_value *
-find_next_selectable (mw, item, skip_titles)
-     XlwMenuWidget mw;
-     widget_value *item;
-     int skip_titles;
+find_next_selectable (XlwMenuWidget mw, widget_value *item, int skip_titles)
 {
   widget_value *current = item;
   enum menu_separator separator;
@@ -2473,10 +2350,7 @@
 }
 
 static widget_value *
-find_prev_selectable (mw, item, skip_titles)
-     XlwMenuWidget mw;
-     widget_value *item;
-     int skip_titles;
+find_prev_selectable (XlwMenuWidget mw, widget_value *item, int skip_titles)
 {
   widget_value *current = item;
   widget_value *prev = item;
@@ -2493,11 +2367,7 @@
 }
 
 static void
-Down (w, ev, params, num_params)
-     Widget w;
-     XEvent *ev;
-     String *params;
-     Cardinal *num_params;
+Down (Widget w, XEvent *ev, String *params, Cardinal *num_params)
 {
   XlwMenuWidget mw = (XlwMenuWidget) w;
   widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
@@ -2522,11 +2392,7 @@
 }
 
 static void
-Up (w, ev, params, num_params)
-     Widget w;
-     XEvent *ev;
-     String *params;
-     Cardinal *num_params;
+Up (Widget w, XEvent *ev, String *params, Cardinal *num_params)
 {
   XlwMenuWidget mw = (XlwMenuWidget) w;
   widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
@@ -2562,11 +2428,7 @@
 }
 
 void
-Left (w, ev, params, num_params)
-     Widget w;
-     XEvent *ev;
-     String *params;
-     Cardinal *num_params;
+Left (Widget w, XEvent *ev, String *params, Cardinal *num_params)
 {
   XlwMenuWidget mw = (XlwMenuWidget) w;
   widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
@@ -2602,11 +2464,7 @@
 }
 
 void
-Right (w, ev, params, num_params)
-     Widget w;
-     XEvent *ev;
-     String *params;
-     Cardinal *num_params;
+Right (Widget w, XEvent *ev, String *params, Cardinal *num_params)
 {
   XlwMenuWidget mw = (XlwMenuWidget) w;
   widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
@@ -2642,11 +2500,7 @@
 /* Handle key press and release events while menu is popped up.
    Our action is to get rid of the menu.  */
 static void
-Key (w, ev, params, num_params)
-     Widget w;
-     XEvent *ev;
-     String *params;
-     Cardinal *num_params;
+Key (Widget w, XEvent *ev, String *params, Cardinal *num_params)
 {
   XlwMenuWidget mw = (XlwMenuWidget)w;
 
@@ -2672,11 +2526,7 @@
 }
 
 static void
-Select (w, ev, params, num_params)
-     Widget w;
-     XEvent *ev;
-     String *params;
-     Cardinal *num_params;
+Select (Widget w, XEvent *ev, String *params, Cardinal *num_params)
 {
   XlwMenuWidget mw = (XlwMenuWidget)w;
   widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
@@ -2715,9 +2565,7 @@
 
 /* Special code to pop-up a menu */
 static void
-pop_up_menu (mw, event)
-     XlwMenuWidget mw;
-     XButtonPressedEvent* event;
+pop_up_menu (XlwMenuWidget mw, XButtonPressedEvent *event)
 {
   int		x = event->x_root;
   int		y = event->y_root;
--- a/msdos/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/msdos/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,17 @@
+2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* sed1v2.inp: Remove reference to prefix-args.
+
+2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
+	(HAVE_BZERO): Don't edit.
+
+2010-07-02  Eli Zaretskii  <eliz@gnu.org>
+
+	* sed1v2.inp (LIB_GCC): Edit to empty.
+	Return back to ../src after compiling each .el file.
+
 2010-06-30  Glenn Morris  <rgm@gnu.org>
 
 	* sed1v2.inp (CANNOT_DUMP): Update for configure name change.
--- a/msdos/sed1v2.inp	Thu Jul 08 16:56:21 2010 +0900
+++ b/msdos/sed1v2.inp	Thu Jul 08 17:09:35 2010 +0900
@@ -47,7 +47,7 @@
 /^LD_SWITCH_SYSTEM *=/s/@LD_SWITCH_SYSTEM@//
 /^TEMACS_LDFLAGS2 *=/s/@TEMACS_LDFLAGS2@/$(LDFLAGS)/
 /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@//
-/^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/
+/^LIB_GCC *=/s/@LIB_GCC@//
 /^LD *=/s/@LINKER@/$(CC)/
 /^LIB_STANDARD *=/s/@LIB_STANDARD@//
 /^LIB_MATH *=/s/@LIB_MATH@/-lm/
@@ -128,7 +128,6 @@
 /^[ 	]*$/d
 /^	if test -f/,/^	fi$/c\
 	command.com /c if exist .gdbinit rm -f _gdbinit
-/^temacs:/s/prefix-args//
 /^temacs:/s/stamp-oldxmenu//
 /^	if test "\${CANNOT_DUMP}" =/,/^	else /d
 /^	fi/d
@@ -169,6 +168,7 @@
 	djecho bootlisp > bootlisp
 /^	-\{0,1\}rm -f/s/\\#/#/
 /^	@\{0,1\}cd ..\/lisp;.*[^\]$/s|$|\; cd ../src|
+/^	 *THEFILE=/s|$|\; cd ../src|
 /^	echo.* buildobj.h/s|echo |djecho |
 
 # arch-tag: c7e3aacb-4162-460e-99f9-4252bca68d2c
--- a/msdos/sed2v2.inp	Thu Jul 08 16:56:21 2010 +0900
+++ b/msdos/sed2v2.inp	Thu Jul 08 17:09:35 2010 +0900
@@ -38,6 +38,8 @@
 /^#undef HAVE_CBRT *$/s/^.*$/#define HAVE_CBRT 1/
 /^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/
 /^#undef HAVE_FPATHCONF *$/s/^.*$/#define HAVE_FPATHCONF 1/
+/^#undef HAVE_MEMCPY *$/s/^.*$/#define HAVE_MEMCPY 1/
+/^#undef HAVE_MEMSET *$/s/^.*$/#define HAVE_MEMSET 1/
 /^#undef HAVE_MEMCMP *$/s/^.*$/#define HAVE_MEMCMP 1/
 /^#undef HAVE_MEMMOVE *$/s/^.*$/#define HAVE_MEMMOVE 1/
 /^#undef HAVE_SETRLIMIT *$/s/^.*$/#define HAVE_SETRLIMIT 1/
@@ -84,14 +86,6 @@
 #else\
 #undef HAVE_STDINT_H\
 #endif
-# GCC 3.x has a built-in bzero, which conflicts with the define at
-# the end of config.in
-/^#undef HAVE_BZERO/c\
-#if __GNUC__ >= 3\
-#define HAVE_BZERO 1\
-#else\
-#undef HAVE_BZERO\
-#endif
 
 # Comment out any remaining undef directives, because some of them
 # might be defined in sys/config.h we include at the top of config.h.
--- a/nt/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/nt/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,12 @@
+2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
+	(HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
+
+2010-07-02  Juanma Barranquero  <lekktu@gmail.com>
+
+	* config.nt (__P): Remove.
+
 2010-06-06  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* config.nt: Remove code depending on BSTRING.
--- a/nt/config.nt	Thu Jul 08 16:56:21 2010 +0900
+++ b/nt/config.nt	Thu Jul 08 17:09:35 2010 +0900
@@ -212,8 +212,10 @@
 #undef HAVE_SYSINFO
 #undef HAVE_RANDOM
 #undef HAVE_LRAND48
-#undef HAVE_BCOPY
-#undef HAVE_BCMP
+#undef HAVE_MEMCPY
+#undef HAVE_MEMMOVE
+#undef HAVE_MEMSET
+#undef HAVE_MEMCMP
 #undef HAVE_LOGB
 #undef HAVE_FREXP
 #undef HAVE_FMOD
@@ -393,14 +395,6 @@
 #define PROTOTYPES 1
 #endif
 
-#ifndef __P
-#if defined PROTOTYPES
-#define __P(args) args
-#else
-#define __P(args) ()
-#endif
-#endif
-
 #ifdef HAVE_STRING_H
 #include "string.h"
 #endif
--- a/oldXMenu/Activate.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/Activate.c	Thu Jul 08 17:09:35 2010 +0900
@@ -103,32 +103,27 @@
 /* For debug, set this to 0 to not grab the keyboard on menu popup */
 int x_menu_grab_keyboard = 1;
 
-typedef void (*Wait_func)();
-
 static Wait_func wait_func;
 static void* wait_data;
 
 void
-XMenuActivateSetWaitFunction (func, data)
-     Wait_func func;
-     void *data;
+XMenuActivateSetWaitFunction (Wait_func func, void *data)
 {
   wait_func = func;
   wait_data = data;
 }
 
 int
-XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data,
-	      help_callback)
-    register Display *display;		/* Display to put menu on. */
-    register XMenu *menu;		/* Menu to activate. */
-    int *p_num;				/* Pane number selected. */
-    int *s_num;				/* Selection number selected. */
-    int x_pos;				/* X coordinate of menu position. */
-    int y_pos;				/* Y coordinate of menu position. */
-    unsigned int event_mask;		/* Mouse button event mask. */
-    char **data;			/* Pointer to return data value. */
-    void (* help_callback) ();		/* Help callback.  */
+XMenuActivate(
+    register Display *display,		/* Display to put menu on. */
+    register XMenu *menu,		/* Menu to activate. */
+    int *p_num,				/* Pane number selected. */
+    int *s_num,				/* Selection number selected. */
+    int x_pos,				/* X coordinate of menu position. */
+    int y_pos,				/* Y coordinate of menu position. */
+    unsigned int event_mask,		/* Mouse button event mask. */
+    char **data,			/* Pointer to return data value. */
+    void (* help_callback) (char *, int, int)) /* Help callback.  */
 {
     int status;				/* X routine call status. */
     int orig_x;				/* Upper left menu origin X coord. */
--- a/oldXMenu/AddPane.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/AddPane.c	Thu Jul 08 17:09:35 2010 +0900
@@ -16,11 +16,11 @@
 #include "XMenuInt.h"
 
 int
-XMenuAddPane(display, menu, label, active)
-    Display *display;
-    register XMenu *menu;	/* Menu object to be modified. */
-    register char *label;	/* Selection label. */
-    int active;			/* Make selection active? */
+XMenuAddPane(Display *display, register XMenu *menu, register char *label, int active)
+                     
+                         	/* Menu object to be modified. */
+                         	/* Selection label. */
+               			/* Make selection active? */
 {
     register XMPane *pane;	/* Newly created pane. */
     register XMSelect *select;	/* Initial selection for the new pane. */
--- a/oldXMenu/AddSel.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/AddSel.c	Thu Jul 08 17:09:35 2010 +0900
@@ -17,14 +17,14 @@
 #include "XMenuInt.h"
 
 int
-XMenuAddSelection(display, menu, p_num, data, label, active, help)
-    Display *display;
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int p_num;		/* Pane number to be modified. */
-    char *data;			/* Data value. */
-    char *label;		/* Selection label. */
-    int active;			/* Make selection active? */
-    char *help;			/* Help string */
+XMenuAddSelection(Display *display, register XMenu *menu, register int p_num, char *data, char *label, int active, char *help)
+                     
+                         	/* Menu object to be modified. */
+                       		/* Pane number to be modified. */
+               			/* Data value. */
+                		/* Selection label. */
+               			/* Make selection active? */
+               			/* Help string */
 {
     register XMPane *pane;	/* Pane containing the new selection. */
     register XMSelect *select;	/* Newly created selection. */
--- a/oldXMenu/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,38 @@
+2010-07-04  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* Activate.c: Convert function definitions to standard C.
+	* AddPane.c:
+	* AddSel.c:
+	* ChgPane.c:
+	* ChgSel.c:
+	* Create.c:
+	* DelPane.c:
+	* DelSel.c:
+	* Destroy.c:
+	* Error.c:
+	* EvHand.c:
+	* FindPane.c:
+	* FindSel.c:
+	* InsPane.c:
+	* InsSel.c:
+	* Internal.c:
+	* Locate.c:
+	* Post.c:
+	* Recomp.c:
+	* SetAEQ.c:
+	* SetFrz.c:
+	* SetPane.c:
+	* SetSel.c:
+	* X10.h:
+	* XCrAssoc.c:
+	* XDelAssoc.c:
+	* XDestAssoc.c:
+	* XLookAssoc.c:
+	* XMakeAssoc.c:
+	* XMenu.h:
+	* XMenuInt.h:
+	* insque.c: Likewise.
+
 2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 
 	* Version 23.2 released.
--- a/oldXMenu/ChgPane.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/ChgPane.c	Thu Jul 08 17:09:35 2010 +0900
@@ -17,10 +17,10 @@
 #include "XMenuInt.h"
 
 int
-XMenuChangePane(menu, p_num, label)
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int p_num;		/* Pane number to be modified. */
-    char *label;		/* Selection label. */
+XMenuChangePane(register XMenu *menu, register int p_num, char *label)
+                         	/* Menu object to be modified. */
+                       		/* Pane number to be modified. */
+                		/* Selection label. */
 {
     register XMPane *p_ptr;	/* XMPane pointer. */
 
--- a/oldXMenu/ChgSel.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/ChgSel.c	Thu Jul 08 17:09:35 2010 +0900
@@ -17,15 +17,15 @@
 #include "XMenuInt.h"
 
 int
-XMenuChangeSelection(display, menu, p_num, s_num, data, data_sw, label, label_sw)
-    Display *display;		/* previously opened display. */
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int p_num;		/* Pane number to be modified. */
-    register int s_num;		/* Selection number to modified. */
-    char *data;			/* Data value. */
-    int data_sw;		/* Change to new data value? */
-    char *label;		/* Selection label. */
-    int label_sw;		/* Change to new label? */
+XMenuChangeSelection(Display *display, register XMenu *menu, register int p_num, register int s_num, char *data, int data_sw, char *label, int label_sw)
+                     		/* previously opened display. */
+                         	/* Menu object to be modified. */
+                       		/* Pane number to be modified. */
+                       		/* Selection number to modified. */
+               			/* Data value. */
+                		/* Change to new data value? */
+                		/* Selection label. */
+                 		/* Change to new label? */
 {
     register XMPane *p_ptr;	/* XMPane pointer. */
     register XMSelect *s_ptr;	/* XMSelect pointer. */
--- a/oldXMenu/Create.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/Create.c	Thu Jul 08 17:09:35 2010 +0900
@@ -91,19 +91,14 @@
 
 #define TILE_BUF_SIZE		5
 
-int atoi();
-double atof();
-char *x_get_resource_string ();
+int atoi(const char *);
+double atof(const char *);
+char *x_get_resource_string (char *attribute, char *class);
 
 
 
 static Status
-XAllocDisplayColor(display, map, colorName, color, junk)
-    Display *display;
-    Colormap map;
-    char *colorName;
-    XColor *color;
-    XColor *junk;
+XAllocDisplayColor(Display *display, Colormap map, char *colorName, XColor *color, XColor *junk)
 {
   return (colorName!=0 &&
 	  XParseColor(display, map, colorName, color) &&
@@ -112,10 +107,10 @@
 
 
 XMenu *
-XMenuCreate(display, parent, def_env)
-    Display *display;           /* ID of previously opened display */
-    Window parent;		/* Window ID of the menu's parent window. */
-    register char *def_env;	/* X Defaults program environment name. */
+XMenuCreate(Display *display, Window parent, register char *def_env)
+                                /* ID of previously opened display */
+                  		/* Window ID of the menu's parent window. */
+                           	/* X Defaults program environment name. */
 {
   register int i;		/* Loop counter. */
   register int j;		/* Loop counter. */
--- a/oldXMenu/DelPane.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/DelPane.c	Thu Jul 08 17:09:35 2010 +0900
@@ -16,10 +16,10 @@
 #include "XMenuInt.h"
 
 int
-XMenuDeletePane(display, menu, p_num)
-    register Display *display;	/* Previously opened display */
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int p_num;		/* Pane number to be deleted. */
+XMenuDeletePane(register Display *display, register XMenu *menu, register int p_num)
+                              	/* Previously opened display */
+                         	/* Menu object to be modified. */
+                       		/* Pane number to be deleted. */
 {
     register XMPane *p_ptr;	/* Pointer to pane being deleted. */
     register XMSelect *s_ptr;	/* Pointer to selections being deleted. */
--- a/oldXMenu/DelSel.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/DelSel.c	Thu Jul 08 17:09:35 2010 +0900
@@ -16,11 +16,11 @@
 #include "XMenuInt.h"
 
 int
-XMenuDeleteSelection(display, menu, p_num, s_num)
-    register Display *display;	/* Previously opened display. */
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int p_num;		/* Pane number to be deleted. */
-    register int s_num;		/* Selection number to be deleted. */
+XMenuDeleteSelection(register Display *display, register XMenu *menu, register int p_num, register int s_num)
+                              	/* Previously opened display. */
+                         	/* Menu object to be modified. */
+                       		/* Pane number to be deleted. */
+                       		/* Selection number to be deleted. */
 {
     register XMPane *p_ptr;	/* Pointer to pane being deleted. */
     register XMSelect *s_ptr;	/* Pointer to selections being deleted. */
--- a/oldXMenu/Destroy.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/Destroy.c	Thu Jul 08 17:09:35 2010 +0900
@@ -15,9 +15,9 @@
 
 #include "XMenuInt.h"
 
-XMenuDestroy(display, menu)
-    Display *display;
-    register XMenu *menu;	/* Menu object to destroy. */
+XMenuDestroy(Display *display, register XMenu *menu)
+                     
+                         	/* Menu object to destroy. */
 {
     register XMPane *p_ptr;	/* Pointer to the current pane. */
     register XMPane *p_next;	/* Pointer to the next pane. */
--- a/oldXMenu/Error.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/Error.c	Thu Jul 08 17:09:35 2010 +0900
@@ -17,7 +17,7 @@
 #include "XMenuInt.h"
 
 char *
-XMenuError()
+XMenuError(void)
 {
     static char message[128];		/* Error message buffer. */
 
--- a/oldXMenu/EvHand.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/EvHand.c	Thu Jul 08 17:09:35 2010 +0900
@@ -15,8 +15,7 @@
 
 #include "XMenuInt.h"
 
-XMenuEventHandler(handler)
-    int (*handler)();
+XMenuEventHandler(int (*handler) (XEvent*))
 {
     /*
      * Set the global event handler variable.
--- a/oldXMenu/FindPane.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/FindPane.c	Thu Jul 08 17:09:35 2010 +0900
@@ -17,9 +17,7 @@
 #include "XMenuInt.h"
 
 int
-XMenuFindPane(menu, label)
-    register XMenu *menu;
-    register char *label;
+XMenuFindPane(register XMenu *menu, register char *label)
 {
     register XMPane *p_ptr;
     register int i = 0;
--- a/oldXMenu/FindSel.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/FindSel.c	Thu Jul 08 17:09:35 2010 +0900
@@ -34,10 +34,7 @@
 #include "XMenuInt.h"
 
 int
-XMenuFindSelection(menu, p_num, label)
-    register XMenu *menu;
-    int p_num;
-    register char *label;
+XMenuFindSelection(register XMenu *menu, int p_num, register char *label)
 {
     register XMPane *p_ptr;
     register XMSelect *s_ptr;
--- a/oldXMenu/InsPane.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/InsPane.c	Thu Jul 08 17:09:35 2010 +0900
@@ -18,11 +18,11 @@
 #include "XMenuInt.h"
 
 int
-XMenuInsertPane(menu, p_num, label, active)
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int p_num;		/* Pane number of new pane. */
-    char *label;		/* Selection label. */
-    int active;			/* Make selection active? */
+XMenuInsertPane(register XMenu *menu, register int p_num, char *label, int active)
+                         	/* Menu object to be modified. */
+                       		/* Pane number of new pane. */
+                		/* Selection label. */
+               			/* Make selection active? */
 {
     register XMPane *p_ptr;	/* XMPane pointer. */
     register XMPane *pane;	/* Newly created pane. */
--- a/oldXMenu/InsSel.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/InsSel.c	Thu Jul 08 17:09:35 2010 +0900
@@ -17,13 +17,13 @@
 #include "XMenuInt.h"
 
 int
-XMenuInsertSelection(menu, p_num, s_num, data, label, active)
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int p_num;		/* Pane number to be modified. */
-    register int s_num;		/* Selection number of new selection. */
-    char *data;			/* Data value. */
-    char *label;		/* Selection label. */
-    int active;			/* Make selection active? */
+XMenuInsertSelection(register XMenu *menu, register int p_num, register int s_num, char *data, char *label, int active)
+                         	/* Menu object to be modified. */
+                       		/* Pane number to be modified. */
+                       		/* Selection number of new selection. */
+               			/* Data value. */
+                		/* Selection label. */
+               			/* Make selection active? */
 {
     register XMPane *p_ptr;	/* XMPane pointer. */
     register XMSelect *s_ptr;	/* XMSelect pointer. */
--- a/oldXMenu/Internal.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/Internal.c	Thu Jul 08 17:09:35 2010 +0900
@@ -96,7 +96,7 @@
 /*
  * _XMEventHandler - Internal event handler variable.
  */
-int (*_XMEventHandler)() = NULL;
+int (*_XMEventHandler)(XEvent*) = NULL;
 
 
 
@@ -104,7 +104,7 @@
  * _XMWinQueInit - Internal routine to initialize the window
  *		   queue.
  */
-_XMWinQueInit()
+_XMWinQueInit(void)
 {
     /*
      * If the queue is not initialized initialize it.
@@ -138,10 +138,10 @@
  *		      window queue.
  */
 int
-_XMWinQueAddPane(display, menu, p_ptr)
-    register Display *display;
-    register XMenu *menu;	/* Menu being manipulated. */
-    register XMPane *p_ptr;	/* XMPane being queued. */
+_XMWinQueAddPane(register Display *display, register XMenu *menu, register XMPane *p_ptr)
+                              
+                         	/* Menu being manipulated. */
+                           	/* XMPane being queued. */
 {
     /*
      * If the queue is currently full then flush it.
@@ -172,10 +172,10 @@
  *			   the selection window queue.
  */
 int
-_XMWinQueAddSelection(display, menu, s_ptr)
-    register Display *display;
-    register XMenu *menu;	/* Menu being manipulated. */
-    register XMSelect *s_ptr;	/* XMSelection being queued. */
+_XMWinQueAddSelection(register Display *display, register XMenu *menu, register XMSelect *s_ptr)
+                              
+                         	/* Menu being manipulated. */
+                             	/* XMSelection being queued. */
 {
     /*
      * If this entry will overflow the queue then flush it.
@@ -206,10 +206,10 @@
  *		    selection window queues.
  */
 int
-_XMWinQueFlush(display, menu, pane, select)
-    register Display *display;
-    register XMenu *menu;		/* Menu being manipulated. */
-    register XMPane *pane;		/* Current pane. */
+_XMWinQueFlush(register Display *display, register XMenu *menu, register XMPane *pane, XMSelect *select)
+                              
+                         		/* Menu being manipulated. */
+                          		/* Current pane. */
 {
     register int pq_index;		/* Pane queue index. */
     register int sq_index;		/* Selection queue index. */
@@ -346,9 +346,9 @@
  *			a pane pointer that points to the indexed pane.
  */
 XMPane *
-_XMGetPanePtr(menu, p_num)
-    register XMenu *menu;	/* Menu to find the pane in. */
-    register int p_num;		/* Index number of pane to find. */
+_XMGetPanePtr(register XMenu *menu, register int p_num)
+                         	/* Menu to find the pane in. */
+                       		/* Index number of pane to find. */
 {
     register XMPane *p_ptr;	/* Pane pointer to be returned. */
     register int i;		/* Loop counter. */
@@ -382,9 +382,9 @@
  *			indexed selection.
  */
 XMSelect *
-_XMGetSelectionPtr(p_ptr, s_num)
-    register XMPane *p_ptr;	/* Pane to find the selection in. */
-    register int s_num;		/* Index number of the selection to find. */
+_XMGetSelectionPtr(register XMPane *p_ptr, register int s_num)
+                           	/* Pane to find the selection in. */
+                       		/* Index number of the selection to find. */
 {
     register XMSelect *s_ptr;	/* Selection pointer to be returned. */
     register int i;		/* Loop counter. */
@@ -416,9 +416,9 @@
  * _XMRecomputeGlobals - Internal subroutine to recompute menu wide
  *			 global values.
  */
-_XMRecomputeGlobals(display, menu)
-    register Display *display; /*X11 display variable. */
-    register XMenu *menu;	/* Menu object to compute from. */
+_XMRecomputeGlobals(register Display *display, register XMenu *menu)
+                               /*X11 display variable. */
+                         	/* Menu object to compute from. */
 {
     register XMPane *p_ptr;	/* Pane pointer. */
     register XMSelect *s_ptr;	/* Selection pointer. */
@@ -531,11 +531,11 @@
  *		      window dependencies.
  */
 int
-_XMRecomputePane(display, menu, p_ptr, p_num)
-    register Display *display;	/* Standard X display variable. */
-    register XMenu *menu;	/* Menu object being recomputed. */
-    register XMPane *p_ptr;	/* Pane pointer. */
-    register int p_num;		/* Pane sequence number. */
+_XMRecomputePane(register Display *display, register XMenu *menu, register XMPane *p_ptr, register int p_num)
+                              	/* Standard X display variable. */
+                         	/* Menu object being recomputed. */
+                           	/* Pane pointer. */
+                       		/* Pane sequence number. */
 {
     register int window_x;	/* Recomputed window X coordinate. */
     register int window_y;	/* Recomputed window Y coordinate. */
@@ -681,11 +681,11 @@
  *			   selection window dependencies.
  */
 int
-_XMRecomputeSelection(display, menu, s_ptr, s_num)
-    register Display *display;
-    register XMenu *menu;	/* Menu object being recomputed. */
-    register XMSelect *s_ptr;	/* Selection pointer. */
-    register int s_num;		/* Selection sequence number. */
+_XMRecomputeSelection(register Display *display, register XMenu *menu, register XMSelect *s_ptr, register int s_num)
+                              
+                         	/* Menu object being recomputed. */
+                             	/* Selection pointer. */
+                       		/* Selection sequence number. */
 {
     register Bool config_s = False;	/* Reconfigure selection window? */
     XWindowChanges *changes;		/* Values to change in configure. */
@@ -811,15 +811,15 @@
  *			recomputed before calling this routine or
  *			unpredictable results will follow.
  */
-_XMTransToOrigin(display, menu, p_ptr, s_ptr, x_pos, y_pos, orig_x, orig_y)
-    Display *display;		/* Not used. Included for consistency. */
-    register XMenu *menu;	/* Menu being computed against. */
-    register XMPane *p_ptr;	/* Current pane pointer. */
-    register XMSelect *s_ptr;	/* Current selection pointer. */
-    int x_pos;			/* X coordinate of point to translate. */
-    int y_pos;			/* Y coordinate of point to translate. */
-    int *orig_x;		/* Return value X coord. of the menu origin. */
-    int *orig_y;		/* Return value Y coord. of the menu origin. */
+_XMTransToOrigin(Display *display, register XMenu *menu, register XMPane *p_ptr, register XMSelect *s_ptr, int x_pos, int y_pos, int *orig_x, int *orig_y)
+                     		/* Not used. Included for consistency. */
+                         	/* Menu being computed against. */
+                           	/* Current pane pointer. */
+                             	/* Current selection pointer. */
+              			/* X coordinate of point to translate. */
+              			/* Y coordinate of point to translate. */
+                		/* Return value X coord. of the menu origin. */
+                		/* Return value Y coord. of the menu origin. */
 {
     register int l_orig_x;	/* Local X coordinate of the menu origin. */
     register int l_orig_y;	/* Local Y coordinate of the menu origin. */
@@ -871,10 +871,7 @@
  * _XMRefreshPane - Internal subroutine to completely refresh
  *		    the contents of a pane.
  */
-_XMRefreshPane(display, menu, pane)
-    register Display *display;
-    register XMenu *menu;
-    register XMPane *pane;
+_XMRefreshPane(register Display *display, register XMenu *menu, register XMPane *pane)
 {
     register XMSelect *s_list = pane->s_list;
     register XMSelect *s_ptr;
@@ -941,10 +938,7 @@
  * _XMRefreshSelection - Internal subroutine that refreshes
  *			 a single selection window.
  */
-_XMRefreshSelection(display, menu, select)
-    register Display *display;
-    register XMenu *menu;
-    register XMSelect *select;
+_XMRefreshSelection(register Display *display, register XMenu *menu, register XMSelect *select)
 {
     register int width = select->window_w;
     register int height = select->window_h;
--- a/oldXMenu/Locate.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/Locate.c	Thu Jul 08 17:09:35 2010 +0900
@@ -17,17 +17,17 @@
 #include "XMenuInt.h"
 
 int
-XMenuLocate(display, menu, p_num, s_num, x_pos, y_pos, ul_x, ul_y, width, height)
-    register Display *display;	/* Previously opened display. */
-    register XMenu *menu;	/* Menu object being located. */
-    int p_num;			/* Active pane number. */
-    int s_num;			/* Active selection number. */
-    int x_pos;			/* X coordinate of mouse active position. */
-    int y_pos;			/* Y coordinate of mouse active position. */
-    int *ul_x;			/* Returned upper left menu X coordinate. */
-    int *ul_y;			/* Returned upper left menu Y coordinate. */
-    int *width;			/* Returned menu width. */
-    int *height;		/* Returned menu height. */
+XMenuLocate(register Display *display, register XMenu *menu, int p_num, int s_num, int x_pos, int y_pos, int *ul_x, int *ul_y, int *width, int *height)
+                              	/* Previously opened display. */
+                         	/* Menu object being located. */
+              			/* Active pane number. */
+              			/* Active selection number. */
+              			/* X coordinate of mouse active position. */
+              			/* Y coordinate of mouse active position. */
+              			/* Returned upper left menu X coordinate. */
+              			/* Returned upper left menu Y coordinate. */
+               			/* Returned menu width. */
+                		/* Returned menu height. */
 {
     register XMPane *p_ptr;	/* XMPane pointer. */
     register XMSelect *s_ptr;	/* XMSelect pointer. */
--- a/oldXMenu/Post.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/Post.c	Thu Jul 08 17:09:35 2010 +0900
@@ -39,14 +39,14 @@
 #include "XMenuInt.h"
 
 char *
-XMenuPost(display, menu, p_num, s_num, x_pos, y_pos, event_mask)
-    register Display *display;	/* Previously opened display. */
-    register XMenu *menu;	/* Menu to post. */
-    register int *p_num;	/* Pane number selected. */
-    register int *s_num;	/* Selection number selected. */
-    register int x_pos;		/* X coordinate of menu position. */
-    register int y_pos;		/* Y coordinate of menu position. */
-    int event_mask;		/* Mouse button event mask. */
+XMenuPost(register Display *display, register XMenu *menu, register int *p_num, register int *s_num, register int x_pos, register int y_pos, int event_mask)
+                              	/* Previously opened display. */
+                         	/* Menu to post. */
+                        	/* Pane number selected. */
+                        	/* Selection number selected. */
+                       		/* X coordinate of menu position. */
+                       		/* Y coordinate of menu position. */
+                   		/* Mouse button event mask. */
 {
     register int stat;		/* Routine call return status. */
     char *data;			/* Return data. */
--- a/oldXMenu/Recomp.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/Recomp.c	Thu Jul 08 17:09:35 2010 +0900
@@ -16,9 +16,9 @@
 #include "XMenuInt.h"
 
 int
-XMenuRecompute(display, menu)
-    Display *display;
-    register XMenu *menu;	/* Menu object to be recomputed. */
+XMenuRecompute(Display *display, register XMenu *menu)
+                     
+                         	/* Menu object to be recomputed. */
 {
     register XMPane *p_ptr;	/* Pane pointer. */
     register XMSelect *s_ptr;	/* Selection pointer. */
--- a/oldXMenu/SetAEQ.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/SetAEQ.c	Thu Jul 08 17:09:35 2010 +0900
@@ -18,9 +18,9 @@
 
 #include "XMenuInt.h"
 
-XMenuSetAEQ(menu, aeq)
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int aeq;		/* AEQ mode? */
+XMenuSetAEQ(register XMenu *menu, register int aeq)
+                         	/* Menu object to be modified. */
+                     		/* AEQ mode? */
 {
     /*
      * Set the AEQ mode switch.
--- a/oldXMenu/SetFrz.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/SetFrz.c	Thu Jul 08 17:09:35 2010 +0900
@@ -17,9 +17,9 @@
 
 #include "XMenuInt.h"
 
-XMenuSetFreeze(menu, freeze)
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int freeze;	/* Freeze mode? */
+XMenuSetFreeze(register XMenu *menu, register int freeze)
+                         	/* Menu object to be modified. */
+                        	/* Freeze mode? */
 {
     /*
      * Set the freeze mode switch.
--- a/oldXMenu/SetPane.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/SetPane.c	Thu Jul 08 17:09:35 2010 +0900
@@ -16,10 +16,10 @@
 #include "XMenuInt.h"
 
 int
-XMenuSetPane(menu, p_num, active)
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int p_num;		/* Pane number to be modified. */
-    register int active;	/* Make selection active? */
+XMenuSetPane(register XMenu *menu, register int p_num, register int active)
+                         	/* Menu object to be modified. */
+                       		/* Pane number to be modified. */
+                        	/* Make selection active? */
 {
     register XMPane *p_ptr;	/* XMPane pointer. */
 
--- a/oldXMenu/SetSel.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/SetSel.c	Thu Jul 08 17:09:35 2010 +0900
@@ -16,11 +16,11 @@
 #include "XMenuInt.h"
 
 int
-XMenuSetSelection(menu, p_num, s_num, active)
-    register XMenu *menu;	/* Menu object to be modified. */
-    register int p_num;		/* Pane number to be modified. */
-    register int s_num;		/* Selection number to modified. */
-    int active;			/* Make selection active? */
+XMenuSetSelection(register XMenu *menu, register int p_num, register int s_num, int active)
+                         	/* Menu object to be modified. */
+                       		/* Pane number to be modified. */
+                       		/* Selection number to modified. */
+               			/* Make selection active? */
 {
     register XMPane *p_ptr;	/* XMPane pointer. */
     register XMSelect *s_ptr;	/* XMSelect pointer. */
--- a/oldXMenu/X10.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/X10.h	Thu Jul 08 17:09:35 2010 +0900
@@ -71,8 +71,8 @@
     int size;			/* Table size (number of buckets). */
 } XAssocTable;
 
-XAssocTable *XCreateAssocTable();
-char *XLookUpAssoc();
+XAssocTable *XCreateAssocTable(int size);
+char *XLookUpAssoc(Display *dpy, XAssocTable *table, XID x_id);
 
 #endif /* _X10_H_ */
 
--- a/oldXMenu/XCrAssoc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/XCrAssoc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -11,8 +11,6 @@
 #define NULL 0
 #endif
 
-extern int errno;
-
 /*
  * XCreateAssocTable - Create an XAssocTable.  The size argument should be
  * a power of two for efficiency reasons.  Some size suggestions: use 32
@@ -20,8 +18,8 @@
  * buckets is 8.  If there is an error creating the XAssocTable, a NULL
  * pointer is returned.
  */
-XAssocTable *XCreateAssocTable(size)
-	register int size;		/* Desired size of the table. */
+XAssocTable *XCreateAssocTable(register int size)
+	                  		/* Desired size of the table. */
 {
 	register XAssocTable *table;	/* XAssocTable to be initialized. */
 	register XAssoc *buckets;	/* Pointer to the first bucket in */
--- a/oldXMenu/XDelAssoc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/XDelAssoc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -5,22 +5,19 @@
 
 #include <X11/Xlib.h>
 #include "X10.h"
-void emacs_remque();
 struct qelem {
 	struct    qelem *q_forw;
 	struct    qelem *q_back;
 	char q_data[1];
 };
+void emacs_remque(struct qelem*);
 
 /*
  * XDeleteAssoc - Delete an association in an XAssocTable keyed on
  * an XId.  An association may be removed only once.  Redundant
  * deletes are meaningless (but cause no problems).
  */
-XDeleteAssoc(dpy, table, x_id)
-        register Display *dpy;
-	register XAssocTable *table;
-	register XID x_id;
+XDeleteAssoc(register Display *dpy, register XAssocTable *table, register XID x_id)
 {
 	int hash;
 	register XAssoc *bucket;
--- a/oldXMenu/XDestAssoc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/XDestAssoc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -10,8 +10,7 @@
  * XDestroyAssocTable - Destroy (free the memory associated with)
  * an XAssocTable.
  */
-XDestroyAssocTable(table)
-	register XAssocTable *table;
+XDestroyAssocTable(register XAssocTable *table)
 {
 	register int i;
 	register XAssoc *bucket;
--- a/oldXMenu/XLookAssoc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/XLookAssoc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -18,10 +18,10 @@
  * in the table the routine will return a NULL pointer.  All XId's are relative
  * to the currently active Display.
  */
-caddr_t XLookUpAssoc(dpy, table, x_id)
-        register Display *dpy;
-	register XAssocTable *table;	/* XAssocTable to search in. */
-	register XID x_id;			/* XId to search for. */
+caddr_t XLookUpAssoc(register Display *dpy, register XAssocTable *table, register XID x_id)
+                              
+	                            	/* XAssocTable to search in. */
+	                  			/* XId to search for. */
 {
 	int hash;
 	register XAssoc *bucket;
--- a/oldXMenu/XMakeAssoc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/XMakeAssoc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -13,25 +13,20 @@
 #define NULL 0
 #endif
 
-extern int errno;
-
-void emacs_insque();
 struct qelem {
 	struct    qelem *q_forw;
 	struct    qelem *q_back;
 	char q_data[1];
 };
+void emacs_insque (struct qelem *elem, struct qelem *prev);
+
 /*
  * XMakeAssoc - Insert data into an XAssocTable keyed on an XId.
  * Data is inserted into the table only once.  Redundant inserts are
  * meaningless (but cause no problems).  The queue in each association
  * bucket is sorted (lowest XId to highest XId).
  */
-XMakeAssoc(dpy, table, x_id, data)
-	register Display *dpy;
-	register XAssocTable *table;
-	register XID x_id;
-	register caddr_t data;
+XMakeAssoc(register Display *dpy, register XAssocTable *table, register XID x_id, register caddr_t data)
 {
 	int hash;
 	register XAssoc *bucket;
--- a/oldXMenu/XMenu.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/XMenu.h	Thu Jul 08 17:09:35 2010 +0900
@@ -234,31 +234,33 @@
     Pixmap inact_pixmap;	/* Menu inactive pixmap. */
 } XMenu;
 
+typedef void (*Wait_func)(void*);
+
 /*
  * XMenu library routine declarations.
  */
-XMenu *XMenuCreate();
-int XMenuAddPane();
-int XMenuAddSelection();
-int XMenuInsertPane();
-int XMenuInsertSelection();
-int XMenuFindPane();
-int XMenuFindSelection();
-int XMenuChangePane();
-int XMenuChangeSelection();
-int XMenuSetPane();
-int XMenuSetSelection();
-int XMenuRecompute();
-int XMenuEventHandler();	/* No value actually returned. */
-int XMenuLocate();
-int XMenuSetFreeze();		/* No value actually returned. */
-void XMenuActivateSetWaitFunction();
-int XMenuActivate();
-char *XMenuPost();
-int XMenuDeletePane();
-int XMenuDeleteSelection();
-int XMenuDestroy();		/* No value actually returned. */
-char *XMenuError();
+XMenu *XMenuCreate(Display *display, Window parent, register char *def_env);
+int XMenuAddPane(Display *display, register XMenu *menu, register char *label, int active);
+int XMenuAddSelection(Display *display, register XMenu *menu, register int p_num, char *data, char *label, int active, char *help);
+int XMenuInsertPane(register XMenu *menu, register int p_num, char *label, int active);
+int XMenuInsertSelection(register XMenu *menu, register int p_num, register int s_num, char *data, char *label, int active);
+int XMenuFindPane(register XMenu *menu, register char *label);
+int XMenuFindSelection(register XMenu *menu, int p_num, register char *label);
+int XMenuChangePane(register XMenu *menu, register int p_num, char *label);
+int XMenuChangeSelection(Display *display, register XMenu *menu, register int p_num, register int s_num, char *data, int data_sw, char *label, int label_sw);
+int XMenuSetPane(register XMenu *menu, register int p_num, register int active);
+int XMenuSetSelection(register XMenu *menu, register int p_num, register int s_num, int active);
+int XMenuRecompute(Display *display, register XMenu *menu);
+int XMenuEventHandler(int (*handler) (XEvent *));	/* No value actually returned. */
+int XMenuLocate(register Display *display, register XMenu *menu, int p_num, int s_num, int x_pos, int y_pos, int *ul_x, int *ul_y, int *width, int *height);
+int XMenuSetFreeze(register XMenu *menu, register int freeze);		/* No value actually returned. */
+void XMenuActivateSetWaitFunction(Wait_func func, void *data);
+int XMenuActivate(Display *display, XMenu *menu, int *p_num, int *s_num, int x_pos, int y_pos, unsigned int event_mask, char **data, void (*help_callback) (char *, int, int));
+char *XMenuPost(register Display *display, register XMenu *menu, register int *p_num, register int *s_num, register int x_pos, register int y_pos, int event_mask);
+int XMenuDeletePane(register Display *display, register XMenu *menu, register int p_num);
+int XMenuDeleteSelection(register Display *display, register XMenu *menu, register int p_num, register int s_num);
+int XMenuDestroy(Display *display, register XMenu *menu);		/* No value actually returned. */
+char *XMenuError(void);
 
 #endif
 /* Don't add after this point. */
--- a/oldXMenu/XMenuInt.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/XMenuInt.h	Thu Jul 08 17:09:35 2010 +0900
@@ -37,7 +37,7 @@
 /*
  * XMenu internal event handler variable.
  */
-extern int (*_XMEventHandler)();
+extern int (*_XMEventHandler)(XEvent*);
 
 #ifndef Pixel
 #define Pixel unsigned long
@@ -46,19 +46,17 @@
 /*
  * Internal routine declarations.
  */
-int _XMWinQueInit();		/* No value actually returned. */
-int _XMWinQueAddPane();
-int _XMWinQueAddSelection();
-int _XMWinQueFlush();
-XMPane *_XMGetPanePtr();
-XMSelect *_XMGetSelectionPtr();
-int _XMRecomputeGlobals();	/* No value actually returned. */
-int _XMRecomputePane();
-int _XMRecomputeSelection();
-int _XMTransToOrigin();		/* No value actually returned. */
-int _XMRefreshPane();		/* No value actually returned. */
-int _XMRefreshSelections();	/* No value actually returned. */
-int _XMHighlightSelection();	/* No value actually returned. */
+int _XMWinQueInit(void);		/* No value actually returned. */
+int _XMWinQueAddPane(register Display *display, register XMenu *menu, register XMPane *p_ptr);
+int _XMWinQueAddSelection(register Display *display, register XMenu *menu, register XMSelect *s_ptr);
+int _XMWinQueFlush(register Display *display, register XMenu *menu, register XMPane *pane, XMSelect *select);
+XMPane *_XMGetPanePtr(register XMenu *menu, register int p_num);
+XMSelect *_XMGetSelectionPtr(register XMPane *p_ptr, register int s_num);
+int _XMRecomputeGlobals(register Display *display, register XMenu *menu);	/* No value actually returned. */
+int _XMRecomputePane(register Display *display, register XMenu *menu, register XMPane *p_ptr, register int p_num);
+int _XMRecomputeSelection(register Display *display, register XMenu *menu, register XMSelect *s_ptr, register int s_num);
+int _XMTransToOrigin(Display *display, register XMenu *menu, register XMPane *p_ptr, register XMSelect *s_ptr, int x_pos, int y_pos, int *orig_x, int *orig_y);		/* No value actually returned. */
+int _XMRefreshPane(register Display *display, register XMenu *menu, register XMPane *pane);		/* No value actually returned. */
 
 #endif
 /* Don't add stuff after this #endif */
--- a/oldXMenu/insque.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/oldXMenu/insque.c	Thu Jul 08 17:09:35 2010 +0900
@@ -30,8 +30,7 @@
 /* Insert ELEM into a doubly-linked list, after PREV.  */
 
 void
-emacs_insque (elem, prev)
-     struct qelem *elem, *prev;
+emacs_insque (struct qelem *elem, struct qelem *prev)
 {
   struct qelem *next = prev->q_forw;
   prev->q_forw = elem;
@@ -43,8 +42,7 @@
 
 /* Unlink ELEM from the doubly-linked list that it is in.  */
 
-emacs_remque (elem)
-     struct qelem *elem;
+emacs_remque (struct qelem *elem)
 {
   struct qelem *next = elem->q_forw;
   struct qelem *prev = elem->q_back;
--- a/src/ChangeLog	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/ChangeLog	Thu Jul 08 17:09:35 2010 +0900
@@ -1,3 +1,676 @@
+2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* xdisp.c (store_mode_line_noprop_char): Remove K&R alternative declaration.
+
+	Clean up include guards.
+	* tparam.c: Remove include guards for config.h, string.h and code
+	that assumes #ifndef emacs.
+	* termcap.c:
+	* unexalpha.c:
+	* sysdep.c:
+	* filemode.c:
+	* filelock.c:
+	* bidi.c: Likewise.
+
+	Remove prefix-args.c
+	* prefix-args.c: Remove file.
+	* autodeps.mk (ALLOBJS): Remove reference to prefix-args.
+	* Makefile.in (temacs${EXEEXT}): Remove references to
+	PRE_EDIT_LDFLAGS and POST_EDIT_LDFLAGS.
+	(mostlyclean): Remove reference to prefix-args.
+	(prefix-args): Remove.
+
+	Simplify cstart_of_data, start_of_code and related code.
+	* mem-limits.h: Remove !emacs and _LIBC conditional code.
+	(start_of_data): Merge into start_of_data function.
+	* sysdep.c (start_of_text): Remove.  Move simplified versions of
+	it in the only users: unexaix.c and unexec.c.
+	(read_input_waiting): Remove local declaration of quit_char.
+	(start, etext): Remove declarations.
+	(start_of_data): Merge with the version in mem-limits.h and move
+	to vm-limits.c.
+	* vm-limit.c (start_of_data): Merged and simplified version of the
+	code formerly in mem-limits.h and sysdep.c.
+	* unexec.c (start): New declaration, moved from sysdep.c.
+	(start_of_text): Simplified version of the code formerly in sysdep.c.
+	* unexaix.c (start_of_text): Simplified version of the code
+	formerly in sysdep.c.
+	* m/alpha.h (HAVE_TEXT_START): Remove.
+	(TEXT_START): Move ...
+	* unexalpha.c (TEXT_START): ... here.
+	* s/hpux10-20.h (TEXT_START): Remove.
+	* s/darwin.h (TEXT_START):
+	* m/mips.h (TEXT_START):
+	* m/macppc.h (HAVE_TEXT_START):
+	* m/m68k.h (TEXT_START):
+	* m/iris4d.h (TEXT_START):
+	* m/intel386.h (TEXT_START):
+	* m/ibmrs6000.h (TEXT_START):
+	* m/ia64.h (HAVE_TEXT_START):
+	* s/msdos.h (TEXT_START): Likewise.
+
+2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* alloc.c (overrun_check_malloc, overrun_check_realloc)
+	(overrun_check_free, xstrdup, allocate_string)
+	(allocate_string_data, compact_small_strings, Fmake_string)
+	(make_unibyte_string, make_multibyte_string)
+	(make_string_from_bytes, make_specified_string, make_float)
+	(Fcons, allocate_terminal, allocate_frame, make_pure_string)
+	(Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
+	memcpy, memmove, memset, memcmp.
+	* atimer.c (start_atimer, set_alarm): Likewise.
+	* buffer.c (clone_per_buffer_values, report_overlay_modification)
+	(mmap_realloc, init_buffer_once): Likewise.
+	* callint.c (Fcall_interactively): Likewise.
+	* callproc.c (Fcall_process, Fcall_process_region, child_setup)
+	(getenv_internal_1): Likewise.
+	* casefiddle.c (casify_object): Likewise.
+	* ccl.c (ccl_driver): Likewise.
+	* character.c (str_as_multibyte, str_to_multibyte): Likewise.
+	* charset.c (load_charset_map_from_file)
+	(load_charset_map_from_file, load_charset_map_from_vector)
+	(Fdefine_charset_internal): Likewise.
+	* cm.c (Wcm_clear): Likewise.
+	* coding.c (decode_eol, decode_coding_object)
+	(Fset_coding_system_priority, make_subsidiaries): Likewise.
+	* data.c (Faset): Likewise.
+	* dired.c (directory_files_internal, file_name_completion_stat):
+	Likewise.
+	* dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
+	(clear_glyph_row, copy_row_except_pointers)
+	(copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
+	(save_current_matrix, restore_current_matrix)
+	(build_frame_matrix_from_leaf_window, mirrored_line_dance)
+	(mirror_line_dance, scrolling_window): Likewise.
+	* doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
+	Likewise.
+	* doprnt.c (doprnt): Likewise.
+	* editfns.c (Fuser_full_name, make_buffer_string_both)
+	(Fmessage_box, Fformat, Ftranspose_regions): Likewise.
+	* emacs.c (sort_args): Likewise.
+	* eval.c (Fapply, Ffuncall): Likewise.
+	* fileio.c (Ffile_name_directory, make_temp_name)
+	(Fexpand_file_name, search_embedded_absfilename)
+	(Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
+	(auto_save_error): Likewise.
+	* fns.c (Fstring_equal, Fcopy_sequence, concat)
+	(string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
+	(internal_equal, Fclear_string, larger_vector, copy_hash_table)
+	(Fmake_hash_table): Likewise.
+	* fringe.c (Fdefine_fringe_bitmap): Likewise.
+	* ftfont.c (ftfont_text_extents): Likewise.
+	* getloadavg.c (getloadavg): Likewise.
+	* image.c (define_image_type, make_image, make_image_cache)
+	(x_create_x_image_and_pixmap, xbm_image_p)
+	(w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
+	(xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
+	(init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
+	(png_image_p, png_read_from_memory, png_load, jpeg_image_p)
+	(tiff_image_p, tiff_read_from_memory, gif_image_p)
+	(gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
+	Likewise.
+	* indent.c (scan_for_column, compute_motion): Likewise.
+	* insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
+	(insert_1_both, insert_from_gap, replace_range_2): Likewise.
+	* intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
+	* keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
+	(kbd_buffer_store_event_hold, apply_modifiers_uncached)
+	(store_user_signal_events, menu_bar_items, tool_bar_items)
+	(process_tool_bar_item, append_tool_bar_item)
+	(read_char_minibuf_menu_prompt, read_key_sequence)
+	(Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
+	Likewise.
+	* keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
+	Likewise.
+	* lisp.h (STRING_COPYIN): Likewise.
+	* lread.c (Fload, read1, oblookup): Likewise.
+	* msdos.c (Frecent_doskeys): Likewise.
+	* nsfns.m (Fx_create_frame): Likewise.
+	* nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
+	Likewise.
+	* nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
+	(EmacsImage-initForXPMWithDepth:width:height:flip:length:):
+	Likewise.
+	* nsmenu.m (ns_update_menubar): Likewise.
+	* nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
+	* print.c (print_unwind, printchar, strout, print_string)
+	(print_error_message): Likewise.
+	* process.c (conv_lisp_to_sockaddr, set_socket_option)
+	(Fmake_network_process, Fnetwork_interface_list)
+	(Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
+	(init_process): Likewise.
+	* ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
+	* regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
+	Likewise.
+	* scroll.c (do_scrolling, do_direct_scrolling)
+	(scrolling_max_lines_saved): Likewise.
+	* search.c (search_buffer, wordify, Freplace_match): Likewise.
+	* sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
+	* syntax.c (skip_chars, skip_syntaxes): Likewise.
+	* sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
+	(emacs_set_tty): Likewise.
+	* term.c (encode_terminal_code, calculate_costs)
+	(produce_special_glyphs, create_tty_output, init_tty, delete_tty):
+	Likewise.
+	* termcap.c (tgetst1, gobble_line): Likewise.
+	* termhooks.h (EVENT_INIT): Likewise.
+	* tparam.c (tparam1): Likewise.
+	* unexalpha.c (unexec): Likewise.
+	* unexec.c (write_segment): Likewise.
+	* unexmacosx.c (unexec_write_zero): Likewise.
+	* w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
+	(Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
+	* w32font.c (w32font_list_family, w32font_text_extents)
+	(w32font_list_internal, w32font_match_internal)
+	(w32font_open_internal, compute_metrics, Fx_select_font):
+	Likewise.
+	* w32menu.c (set_frame_menubar, add_menu_item)
+	(w32_menu_display_help, w32_free_submenu_strings): Likewise.
+	* w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
+	* w32uniscribe.c (uniscribe_list_family): Likewise.
+	* w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
+	* window.c (make_window, replace_window, set_window_buffer)
+	(Fsplit_window): Likewise.
+	* xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
+	(add_to_log, message3, x_consider_frame_title)
+	(append_space_for_newline, extend_face_to_end_of_line)
+	(decode_mode_spec_coding, init_glyph_string): Likewise.
+	* xfaces.c (x_create_gc, get_lface_attributes_no_remap)
+	(Finternal_copy_lisp_face, Finternal_merge_in_global_face)
+	(face_attr_equal_p, make_realized_face, make_face_cache)
+	(free_realized_faces, lookup_named_face, smaller_face)
+	(face_with_height, lookup_derived_face)
+	(x_supports_face_attributes_p, Finternal_set_font_selection_order)
+	(Finternal_set_font_selection_order, realize_default_face)
+	(compute_char_face, face_at_buffer_position)
+	(face_for_overlay_string, face_at_string_position, merge_faces):
+	Likewise.
+	* xfns.c (xic_create_fontsetname, Fx_create_frame)
+	(Fx_window_property, x_create_tip_frame)
+	(Fx_backspace_delete_keys_p): Likewise.
+	* xfont.c (xfont_list, xfont_match, xfont_list_family)
+	(xfont_text_extents): Likewise.
+	* xmenu.c (set_frame_menubar, xmenu_show): Likewise.
+	* xrdb.c (magic_file_p, x_get_resource): Likewise.
+	* xselect.c (x_queue_event, x_get_window_property)
+	(receive_incremental_selection): Likewise.
+	* xsmfns.c (x_session_check_input): Likewise.
+	* xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
+	(handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
+	Likewise.
+	* character.h (BCOPY_SHORT): Removed.
+	* config.in: Regenerate.
+	* dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
+	* emacs.c (main) [PROFILING]: Don't declare
+	dump_opcode_frequencies.
+	* lisp.h (safe_bcopy): Remove declaration.
+	(memset) [!HAVE_MEMSET]: Declare.
+	(memcpy) [!HAVE_MEMCPY]: Likewise.
+	(memmove) [!HAVE_MEMMOVE]: Likewise.
+	(memcmp) [!HAVE_MEMCMP]: Likewise.
+	* s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
+	(BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
+	Don't define.
+	(HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
+	* s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
+	(BCOPY_DOWNWARD_SAFE): Don't define.
+	* sysdep.c (memset) [!HAVE_MEMSET]: Define.
+	(memcpy) [!HAVE_MEMCPY]: Define.
+	(memmove) [!HAVE_MEMMOVE]: Define.
+	(memcmp) [!HAVE_MEMCMP]: Define.
+
+2010-07-07  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* process.c (kbd_is_on_hold): New variable.
+	(hold_keyboard_input, unhold_keyboard_input, kbd_on_hold_p): New
+	functions.
+	(wait_reading_process_output): If kbd_on_hold_p returns non-zero,
+	select on empty input mask.
+	(init_process): Initialize kbd_is_on_hold to 0.
+
+	* process.h (hold_keyboard_input, unhold_keyboard_input)
+	(kbd_on_hold_p): Declare.
+
+	* keyboard.c (input_available_signal): Declare.
+	(kbd_buffer_nr_stored): New function.
+	(kbd_buffer_store_event_hold): If kbd_buffer_nr_stored returns
+	more than KBD_BUFFER_SIZE/2, stop reding input (Bug#6571).
+	(kbd_buffer_get_event): If input is suspended and kbd_buffer_nr_stored
+	returns less than KBD_BUFFER_SIZE/4, resume reding input (Bug#6571).
+	(tty_read_avail_input): If input is on hold, return.
+	Don't read more that free slots in kbd_buffer (Bug#6571).
+
+2010-07-07  Eli Zaretskii  <eliz@gnu.org>
+
+	* msdos.h:
+	* msdos.c:
+	* dosfns.c:
+	* w16select.c: Convert function definitions to ANSI C.
+
+	* msdos.h (ctrl_break_func, install_ctrl_break_check): Remove
+	unused prototypes.
+
+2010-07-07  Juanma Barranquero  <lekktu@gmail.com>
+
+	* coding.c, sysdep.c: Convert some more functions to standard C.
+
+2010-07-07  Juanma Barranquero  <lekktu@gmail.com>
+
+	* coding.c (decode_coding_gap, encode_coding_gap, decode_coding_object)
+	(encode_coding_object): Use SPECPDL_INDEX.
+	(syms_of_coding): Use DOS_NT.
+
+2010-07-07  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* intervals.h (interval): Use EMACS_UINT instead of unsigned EMACS_INT.
+
+	Make the function member of Lisp_Subr use standard C prototypes.
+	* lisp.h (struct Lisp_Subr): Use a union for the function member.
+	(DECL_ALIGN): Add a cast for the function.
+	* eval.c (Feval, Ffuncall): Use the proper type for each type
+	function call.
+
+2010-07-06  Chong Yidong  <cyd@stupidchicken.com>
+
+	* fringe.c (draw_fringe_bitmap_1): Use lookup_named_face to get
+	fringe face id, so face-remapping-alist works (Bug#6091).
+
+2010-07-06  Juanma Barranquero  <lekktu@gmail.com>
+
+	* w32.c, w32console.c, w32fns.c, w32font.c, w32heap.c, w32inevt.c
+	* w32menu.c, w32proc.c, w32reg.c, w32select.c, w32term.c
+	* w32uniscribe.c, w32xfns.c: Convert function definitions to standard C.
+
+2010-07-06  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* xterm.c (x_get_keysym_name): Change type of parameter to int.
+	* lisp.h: Declare x_get_keysym_name.
+	* keyboard.c (modify_event_symbol): Don't declare
+	x_get_keysym_name here.
+
+2010-07-06  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* ecrt0.c: Revert conversion to standard C.
+
+2010-07-05  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* vm-limit.c (memory_warnings):
+	* keyboard.c (modify_event_symbol):
+	* floatfns.c (rounding_driver, ceiling2, floor2, truncate2)
+	(round2, emacs_rint):
+	* process.c (send_process, old_sigpipe): Convert function
+	definitions and declarations to standard C.
+
+2010-07-05  Juanma Barranquero  <lekktu@gmail.com>
+
+	* buffer.c, cm.c, eval.c, keyboard.c, process.c, term.c, vm-limit.c,
+	* xdisp.c: Convert function definitions to standard C.
+
+	* cm.c (cmputc): Arg C is now int, not char.
+	* process.c (Fmake_network_process): Cast sockaddr_in* to sockaddr*.
+
+2010-07-05  James Cloos  <cloos@jhcloos.com>
+
+	* xterm.h (Xatom_net_wm_name, Xatom_net_wm_icon_name): New.
+
+	* xterm.c (x_term_init): Intern the _NET_WM_NAME and
+	_NET_WM_ICON_NAME atoms.
+
+	* xfns.c (x_set_name_internal): Set the EWMH _NET_WM_NAME
+	and _NET_WM_ICON_NAME properties, too, matching what is
+	done in the Gtk+ case.
+
+2010-07-05  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* xterm.c (XTring_bell, XTset_terminal_window): Fix wrong prototype.
+
+	* xsmfns.c (SSDATA): New macro.
+	(smc_save_yourself_CB, x_session_initialize): Use SSDATA for strings
+	passed to strlen/strcpy/strcat.
+	(create_client_leader_window): Surround with #ifndef USE_GTK.  Cast
+	7:th arg to XChangeProperty to (unsigned char *)
+
+	* xsettings.c (something_changedCB, parse_settings)
+	(apply_xft_settings): Reformat prototype.
+	(something_changedCB, init_gconf): Remove unused variable i.
+	(read_settings): Remove unused variable long_len.
+
+	* gtkutil.c (xg_get_pixbuf_from_pix_and_mask)
+	(xg_get_image_for_pixmap, create_dialog)
+	(xg_get_file_with_selection, xg_get_file_name, update_cl_data)
+	(menuitem_highlight_callback, make_menu_item)
+	(xg_create_one_menuitem, create_menus, xg_update_menu_item)
+	(xg_create_scroll_bar, xg_update_scrollbar_pos)
+	(xg_set_toolkit_scroll_bar_thumb, xg_tool_bar_button_cb)
+	(xg_tool_bar_proxy_help_callback, xg_tool_bar_detach_callback)
+	(xg_tool_bar_attach_callback, xg_tool_bar_help_callback)
+	(xg_tool_bar_item_expose_callback): Reformat prototype.
+	(xg_update_menubar): GList *group => GSList *group.
+	(xg_modify_menubar_widgets): Initialize witem to 0, check witem != 0
+	before use.
+	(update_frame_tool_bar): 4:th param to xg_get_image_for_pixmap changed
+	to GTK_IMAGE (wimage).
+
+2010-07-05  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* atimer.c: Use "" instead of <> for local includes for
+	consistency with the rest of the code.
+
+	* xsmfns.c (smc_save_yourself_CB, smc_error_handler):
+	* xrdb.c (get_system_name):
+	* window.c (shrink_windows):
+	* syntax.c (forw_comment):
+	* scroll.c (calculate_scrolling, calculate_direct_scrolling)
+	(ins_del_costs):
+	* mem-limits.h (start_of_data):
+	* lread.c (readevalloop):
+	* gtkutil.c (xg_dialog_response_cb, xg_get_file_with_chooser)
+	(xg_get_file_with_selection, xg_update_menubar, xg_update_submenu):
+	* frame.c (x_get_focus_frame):
+	* floatfns.c (fmod_float):
+	* fileio.c (choose_write_coding_system):
+	* emacs.c (fatal_error_signal, init_cmdargs, argmatch)
+	(malloc_initialize_hook, sort_args, synchronize_locale):
+	* doprnt.c (doprnt):
+	* dired.c (compile_pattern):
+	* data.c (fmod_float):
+	* chartab.c (map_sub_char_table, map_sub_char_table_for_charset)
+	(map_char_table_for_charset):
+	* charset.c (define_charset_internal):
+	* alloc.c (Fgarbage_collect): Convert declarations or definitions
+	to standard C.
+
+2010-07-04  Tetsurou Okazaki  <okazaki@be.to>  (tiny change)
+            Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* lread.c (read1): Fix up last change to not mess up `c'.
+
+2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
+
+	* strftime.c: Revert conversion to standard C (revno:100708).
+
+2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
+
+	Fix prototypes.
+
+	* atimer.c (start_atimer): Use EMACS_TIME, not struct timeval.
+	* dired.c (file_name_completion_stat): Use DIRENTRY, not struct dirent.
+	* fileio.c (read_non_regular, read_non_regular_quit): Add Lisp_Object
+	arg, as required by internal_condition_case_1.
+	* print.c (strout): Use const char* for arg PTR.
+	* regex.c (bcmp_translate): Use RE_TRANSLATE_TYPE, not Lisp_Object.
+	(analyse_first): Fix "const const".
+	* sysdep.c (set_file_times): Use EMACS_TIME, not struct timeval.
+	* unexelf.c (round_up, find_section): Use ElfW macro for arguments.
+	* xgselect.c (xg_select): Use SELECT_TYPE, EMACS_TIME.
+
+2010-07-04  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* alloc.c: Convert function definitions to standard C.
+	* atimer.c:
+	* bidi.c:
+	* bytecode.c:
+	* callint.c:
+	* callproc.c:
+	* casefiddle.c:
+	* casetab.c:
+	* category.c:
+	* ccl.c:
+	* character.c:
+	* charset.c:
+	* chartab.c:
+	* cmds.c:
+	* coding.c:
+	* composite.c:
+	* data.c:
+	* dbusbind.c:
+	* dired.c:
+	* dispnew.c:
+	* doc.c:
+	* doprnt.c:
+	* ecrt0.c:
+	* editfns.c:
+	* fileio.c:
+	* filelock.c:
+	* filemode.c:
+	* fns.c:
+	* font.c:
+	* fontset.c:
+	* frame.c:
+	* fringe.c:
+	* ftfont.c:
+	* ftxfont.c:
+	* gtkutil.c:
+	* indent.c:
+	* insdel.c:
+	* intervals.c:
+	* keymap.c:
+	* lread.c:
+	* macros.c:
+	* marker.c:
+	* md5.c:
+	* menu.c:
+	* minibuf.c:
+	* prefix-args.c:
+	* print.c:
+	* ralloc.c:
+	* regex.c:
+	* region-cache.c:
+	* scroll.c:
+	* search.c:
+	* sound.c:
+	* strftime.c:
+	* syntax.c:
+	* sysdep.c:
+	* termcap.c:
+	* terminal.c:
+	* terminfo.c:
+	* textprop.c:
+	* tparam.c:
+	* undo.c:
+	* unexelf.c:
+	* window.c:
+	* xfaces.c:
+	* xfns.c:
+	* xfont.c:
+	* xftfont.c:
+	* xgselect.c:
+	* xmenu.c:
+	* xrdb.c:
+	* xselect.c:
+	* xsettings.c:
+	* xsmfns.c:
+	* xterm.c: Likewise.
+
+2010-07-03  Eli Zaretskii  <eliz@gnu.org>
+
+	* msdos.c (IT_set_frame_parameters): Fix setting of colors in
+	frames other than the initial one.  Fix reversal of colors when
+	`reverse' is specified in the frame parameters.  Call
+	update_face_from_frame_parameter instead of
+	internal-set-lisp-face-attribute.  Initialize screen colors from
+	initial_screen_colors[] when f->default_face_done_p is zero,
+	instead of depending on being called with default-frame-alist as
+	the alist argument.
+
+	* xfaces.c (update_face_from_frame_parameter): Move out of
+	HAVE_WINDOW_SYSTEM portion.  Condition window-system only parts
+	with HAVE_WINDOW_SYSTEM.
+
+	* msdos.c (IT_set_frame_parameters): Set menu-bar-lines according
+	to menu-bar-mode, if not set in the frame parameters or in
+	default-frame-alist.
+
+	* w32console.c (sys_tputs): Adjust argument list to prototype in
+	term.c.
+
+2010-07-03  Juanma Barranquero  <lekktu@gmail.com>
+
+	* lisp.h (memory_warnings): Fix prototype.
+
+	* cm.h (evalcost): Fix prototype.
+
+	* cm.c (evalcost): Fix arg type.
+
+2010-07-02  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* term.c (term_clear_mouse_face, Fidentity):
+	* syssignal.h (signal_handler_t):
+	* lisp.h (memory_warnings):
+	* coding.h (preferred_coding_system):
+	* cm.h (evalcost):
+	* blockinput.h (reinvoke_input_signal): Convert to standard C prototypes.
+
+2010-07-02  Eli Zaretskii  <eliz@gnu.org>
+
+	* dosfns.h (msdos_stdcolor_idx, msdos_stdcolor_name): Remove P_
+	from prototypes.
+
+	* msdos.h (load_pixmap): Don't define away.
+
+2010-07-02  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* lisp.h:
+	* atimer.h: Remove define for P_.
+
+	* alloc.c: Remove __P and P_ from .c and .m files.
+	* atimer.c:
+	* buffer.c:
+	* callint.c:
+	* category.c:
+	* charset.c:
+	* chartab.c:
+	* cm.c:
+	* coding.c:
+	* composite.c:
+	* data.c:
+	* dired.c:
+	* dispnew.c:
+	* doc.c:
+	* editfns.c:
+	* emacs.c:
+	* eval.c:
+	* fileio.c:
+	* filelock.c:
+	* fns.c:
+	* font.c:
+	* fontset.c:
+	* frame.c:
+	* ftfont.c:
+	* ftxfont.c:
+	* gmalloc.c:
+	* gtkutil.c:
+	* image.c:
+	* indent.c:
+	* intervals.c:
+	* keyboard.c:
+	* keymap.c:
+	* lread.c:
+	* marker.c:
+	* menu.c:
+	* minibuf.c:
+	* print.c:
+	* process.c:
+	* scroll.c:
+	* search.c:
+	* sound.c:
+	* strftime.c:
+	* syntax.c:
+	* sysdep.c:
+	* term.c:
+	* terminal.c:
+	* textprop.c:
+	* unexalpha.c:
+	* w32console.c:
+	* w32fns.c:
+	* w32font.c:
+	* w32menu.c:
+	* w32term.c:
+	* w32uniscribe.c:
+	* window.c:
+	* xdisp.c:
+	* xfaces.c:
+	* xfns.c:
+	* xfont.c:
+	* xftfont.c:
+	* xmenu.c:
+	* xselect.c:
+	* xterm.c: Likewise.
+
+	Remove P_ and __P macros.
+	* atimer.h: Remove P_ and __P macros.
+	* buffer.h:
+	* category.h:
+	* ccl.h:
+	* character.h:
+	* charset.h:
+	* cm.h:
+	* coding.h:
+	* composite.h:
+	* dispextern.h:
+	* disptab.h:
+	* dosfns.h:
+	* font.h:
+	* fontset.h:
+	* frame.h:
+	* gtkutil.h:
+	* indent.h:
+	* intervals.h:
+	* keyboard.h:
+	* keymap.h:
+	* lisp.h:
+	* macros.h:
+	* md5.h:
+	* menu.h:
+	* msdos.h:
+	* nsterm.h:
+	* puresize.h:
+	* region-cache.h:
+	* syntax.h:
+	* syssignal.h:
+	* systime.h:
+	* termhooks.h:
+	* w32font.h:
+	* w32term.h:
+	* widget.h:
+	* window.h:
+	* xgselect.h:
+	* xsettings.h:
+	* xterm.h: Likewise.
+
+2010-07-02  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* lisp.h: Document that USE_LISP_UNION_TYPE is now enabled using autoconf.
+
+	Cleanup old code.
+	* dired.c (BSD4_3): Remove all uses, redundant with BSD4_2.
+	* syssignal.h: Remove code for Lynx, not supported anymore.
+	* vm-limit.c: Remove unused code the depends on emacs not being
+	defined and NO_LIM_DATA being defined.
+	* mem-limits.h: Remove dead code.
+
+2010-07-01  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* window.c (Fwindow_absolute_pixel_edges): Doc fix.
+
+	* window.c (calc_absolute_offset, Fwindow_absolute_pixel_edges)
+	(Fwindow_inside_absolute_pixel_edges): New functions (bug#5721).
+
+	* nsfns.m (compute_tip_xy): Do not convert coordinates from frame
+	parameters, they are already absolute.
+
+	* nsterm.m (x_set_window_size, initFrameFromEmacs): Renamed
+	FRAME_NS_TOOLBAR_HEIGHT to FRAME_TOOLBAR_HEIGHT.
+
+	* nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGH
+
+	* nsmenu.m (update_frame_tool_bar, free_frame_tool_bar): Update
+	FRAME_TOOLBAR_HEIGHT.
+
+	* nsmenu.m (free_frame_tool_bar, update_frame_tool_bar): Add
+	BLOCK/UNBLOCK_INPUT so asserts don't trigger.
+
 2010-06-30  Chong Yidong  <cyd@stupidchicken.com>
 
 	* frame.c (get_future_frame_param, Fmake_terminal_frame): Don't
--- a/src/Makefile.in	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/Makefile.in	Thu Jul 08 17:09:35 2010 +0900
@@ -628,20 +628,10 @@
 	echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h
 
 
-## We cannot define variables for PRE_EDIT and POST_EDIT.
-## If !ORDINARY_LINK && !LINKER && GCC, they add a
-## `./prefix-args -Xlinker ... ` wrapper, otherwise they are empty.
-## One alternative to this approach would be to always call prefix-args, 
-## and have it DTRT in all cases, by testing the above defines.
-temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT}
-	$(LD) @PRE_EDIT_LDFLAGS@ ${TEMACS_LDFLAGS} @POST_EDIT_LDFLAGS@ \
-	  ${TEMACS_LDFLAGS2} \
+temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj}
+	$(LD) ${TEMACS_LDFLAGS} ${TEMACS_LDFLAGS2} \
 	  -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES}
 
-prefix-args${EXEEXT}: prefix-args.o $(config_h)
-	$(CC) $(LDFLAGS) prefix-args.o -o prefix-args
-
-
 ## The following oldxmenu-related rules are only (possibly) used if
 ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them
 ## (provided we take a little care that OLDXMENU is never empty).
@@ -688,7 +678,7 @@
 
 
 mostlyclean:
-	rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a
+	rm -f temacs${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a
 	rm -f ../etc/DOC
 	rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
 	rm -f buildobj.h
--- a/src/alloc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/alloc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -329,23 +329,23 @@
 Lisp_Object Vgc_elapsed;	/* accumulated elapsed time in GC  */
 EMACS_INT gcs_done;		/* accumulated GCs  */
 
-static void mark_buffer P_ ((Lisp_Object));
-static void mark_terminals P_ ((void));
-extern void mark_kboards P_ ((void));
-extern void mark_ttys P_ ((void));
-extern void mark_backtrace P_ ((void));
-static void gc_sweep P_ ((void));
-static void mark_glyph_matrix P_ ((struct glyph_matrix *));
-static void mark_face_cache P_ ((struct face_cache *));
+static void mark_buffer (Lisp_Object);
+static void mark_terminals (void);
+extern void mark_kboards (void);
+extern void mark_ttys (void);
+extern void mark_backtrace (void);
+static void gc_sweep (void);
+static void mark_glyph_matrix (struct glyph_matrix *);
+static void mark_face_cache (struct face_cache *);
 
 #ifdef HAVE_WINDOW_SYSTEM
-extern void mark_fringe_data P_ ((void));
+extern void mark_fringe_data (void);
 #endif /* HAVE_WINDOW_SYSTEM */
 
-static struct Lisp_String *allocate_string P_ ((void));
-static void compact_small_strings P_ ((void));
-static void free_large_strings P_ ((void));
-static void sweep_strings P_ ((void));
+static struct Lisp_String *allocate_string (void);
+static void compact_small_strings (void);
+static void free_large_strings (void);
+static void sweep_strings (void);
 
 extern int message_enable_multibyte;
 
@@ -369,9 +369,9 @@
   MEM_TYPE_VECTORLIKE
 };
 
-static POINTER_TYPE *lisp_align_malloc P_ ((size_t, enum mem_type));
-static POINTER_TYPE *lisp_malloc P_ ((size_t, enum mem_type));
-void refill_memory_reserve ();
+static POINTER_TYPE *lisp_align_malloc (size_t, enum mem_type);
+static POINTER_TYPE *lisp_malloc (size_t, enum mem_type);
+void refill_memory_reserve (void);
 
 
 #if GC_MARK_STACK || defined GC_MALLOC_CHECK
@@ -452,31 +452,31 @@
 static struct mem_node mem_z;
 #define MEM_NIL &mem_z
 
-static POINTER_TYPE *lisp_malloc P_ ((size_t, enum mem_type));
-static struct Lisp_Vector *allocate_vectorlike P_ ((EMACS_INT));
-static void lisp_free P_ ((POINTER_TYPE *));
-static void mark_stack P_ ((void));
-static int live_vector_p P_ ((struct mem_node *, void *));
-static int live_buffer_p P_ ((struct mem_node *, void *));
-static int live_string_p P_ ((struct mem_node *, void *));
-static int live_cons_p P_ ((struct mem_node *, void *));
-static int live_symbol_p P_ ((struct mem_node *, void *));
-static int live_float_p P_ ((struct mem_node *, void *));
-static int live_misc_p P_ ((struct mem_node *, void *));
-static void mark_maybe_object P_ ((Lisp_Object));
-static void mark_memory P_ ((void *, void *, int));
-static void mem_init P_ ((void));
-static struct mem_node *mem_insert P_ ((void *, void *, enum mem_type));
-static void mem_insert_fixup P_ ((struct mem_node *));
-static void mem_rotate_left P_ ((struct mem_node *));
-static void mem_rotate_right P_ ((struct mem_node *));
-static void mem_delete P_ ((struct mem_node *));
-static void mem_delete_fixup P_ ((struct mem_node *));
-static INLINE struct mem_node *mem_find P_ ((void *));
+static POINTER_TYPE *lisp_malloc (size_t, enum mem_type);
+static struct Lisp_Vector *allocate_vectorlike (EMACS_INT);
+static void lisp_free (POINTER_TYPE *);
+static void mark_stack (void);
+static int live_vector_p (struct mem_node *, void *);
+static int live_buffer_p (struct mem_node *, void *);
+static int live_string_p (struct mem_node *, void *);
+static int live_cons_p (struct mem_node *, void *);
+static int live_symbol_p (struct mem_node *, void *);
+static int live_float_p (struct mem_node *, void *);
+static int live_misc_p (struct mem_node *, void *);
+static void mark_maybe_object (Lisp_Object);
+static void mark_memory (void *, void *, int);
+static void mem_init (void);
+static struct mem_node *mem_insert (void *, void *, enum mem_type);
+static void mem_insert_fixup (struct mem_node *);
+static void mem_rotate_left (struct mem_node *);
+static void mem_rotate_right (struct mem_node *);
+static void mem_delete (struct mem_node *);
+static void mem_delete_fixup (struct mem_node *);
+static INLINE struct mem_node *mem_find (void *);
 
 
 #if GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS
-static void check_gcpros P_ ((void));
+static void check_gcpros (void);
 #endif
 
 #endif /* GC_MARK_STACK || GC_MALLOC_CHECK */
@@ -495,7 +495,7 @@
 
 static int staticidx = 0;
 
-static POINTER_TYPE *pure_alloc P_ ((size_t, int));
+static POINTER_TYPE *pure_alloc (size_t, int);
 
 
 /* Value is SZ rounded up to the next multiple of ALIGNMENT.
@@ -514,8 +514,7 @@
 /* Function malloc calls this if it finds we are near exhausting storage.  */
 
 void
-malloc_warning (str)
-     char *str;
+malloc_warning (char *str)
 {
   pending_malloc_warning = str;
 }
@@ -524,7 +523,7 @@
 /* Display an already-pending malloc warning.  */
 
 void
-display_malloc_warning ()
+display_malloc_warning (void)
 {
   call3 (intern ("display-warning"),
 	 intern ("alloc"),
@@ -543,7 +542,7 @@
 /* Called if we can't allocate relocatable space for a buffer.  */
 
 void
-buffer_memory_full ()
+buffer_memory_full (void)
 {
   /* If buffers use the relocating allocator, no need to free
      spare_memory, because we may have plenty of malloc space left
@@ -637,10 +636,12 @@
   val = (unsigned char *) malloc (size + overhead);
   if (val && check_depth == 1)
     {
-      bcopy (xmalloc_overrun_check_header, val, XMALLOC_OVERRUN_CHECK_SIZE - 4);
+      memcpy (val, xmalloc_overrun_check_header,
+	      XMALLOC_OVERRUN_CHECK_SIZE - 4);
       val += XMALLOC_OVERRUN_CHECK_SIZE;
       XMALLOC_PUT_SIZE(val, size);
-      bcopy (xmalloc_overrun_check_trailer, val + size, XMALLOC_OVERRUN_CHECK_SIZE);
+      memcpy (val + size, xmalloc_overrun_check_trailer,
+	      XMALLOC_OVERRUN_CHECK_SIZE);
     }
   --check_depth;
   return (POINTER_TYPE *)val;
@@ -660,28 +661,29 @@
 
   if (val
       && check_depth == 1
-      && bcmp (xmalloc_overrun_check_header,
-	       val - XMALLOC_OVERRUN_CHECK_SIZE,
-	       XMALLOC_OVERRUN_CHECK_SIZE - 4) == 0)
+      && memcmp (xmalloc_overrun_check_header,
+		 val - XMALLOC_OVERRUN_CHECK_SIZE,
+		 XMALLOC_OVERRUN_CHECK_SIZE - 4) == 0)
     {
       size_t osize = XMALLOC_GET_SIZE (val);
-      if (bcmp (xmalloc_overrun_check_trailer,
-		val + osize,
-		XMALLOC_OVERRUN_CHECK_SIZE))
+      if (memcmp (xmalloc_overrun_check_trailer, val + osize,
+		  XMALLOC_OVERRUN_CHECK_SIZE))
 	abort ();
-      bzero (val + osize, XMALLOC_OVERRUN_CHECK_SIZE);
+      memset (val + osize, 0, XMALLOC_OVERRUN_CHECK_SIZE);
       val -= XMALLOC_OVERRUN_CHECK_SIZE;
-      bzero (val, XMALLOC_OVERRUN_CHECK_SIZE);
+      memset (val, 0, XMALLOC_OVERRUN_CHECK_SIZE);
     }
 
   val = (unsigned char *) realloc ((POINTER_TYPE *)val, size + overhead);
 
   if (val && check_depth == 1)
     {
-      bcopy (xmalloc_overrun_check_header, val, XMALLOC_OVERRUN_CHECK_SIZE - 4);
+      memcpy (val, xmalloc_overrun_check_header,
+	      XMALLOC_OVERRUN_CHECK_SIZE - 4);
       val += XMALLOC_OVERRUN_CHECK_SIZE;
       XMALLOC_PUT_SIZE(val, size);
-      bcopy (xmalloc_overrun_check_trailer, val + size, XMALLOC_OVERRUN_CHECK_SIZE);
+      memcpy (val + size, xmalloc_overrun_check_trailer,
+	      XMALLOC_OVERRUN_CHECK_SIZE);
     }
   --check_depth;
   return (POINTER_TYPE *)val;
@@ -698,22 +700,21 @@
   ++check_depth;
   if (val
       && check_depth == 1
-      && bcmp (xmalloc_overrun_check_header,
-	       val - XMALLOC_OVERRUN_CHECK_SIZE,
-	       XMALLOC_OVERRUN_CHECK_SIZE - 4) == 0)
+      && memcmp (xmalloc_overrun_check_header,
+		 val - XMALLOC_OVERRUN_CHECK_SIZE,
+		 XMALLOC_OVERRUN_CHECK_SIZE - 4) == 0)
     {
       size_t osize = XMALLOC_GET_SIZE (val);
-      if (bcmp (xmalloc_overrun_check_trailer,
-		val + osize,
-		XMALLOC_OVERRUN_CHECK_SIZE))
+      if (memcmp (xmalloc_overrun_check_trailer, val + osize,
+		  XMALLOC_OVERRUN_CHECK_SIZE))
 	abort ();
 #ifdef XMALLOC_CLEAR_FREE_MEMORY
       val -= XMALLOC_OVERRUN_CHECK_SIZE;
       memset (val, 0xff, osize + XMALLOC_OVERRUN_CHECK_SIZE*2);
 #else
-      bzero (val + osize, XMALLOC_OVERRUN_CHECK_SIZE);
+      memset (val + osize, 0, XMALLOC_OVERRUN_CHECK_SIZE);
       val -= XMALLOC_OVERRUN_CHECK_SIZE;
-      bzero (val, XMALLOC_OVERRUN_CHECK_SIZE);
+      memset (val, 0, XMALLOC_OVERRUN_CHECK_SIZE);
 #endif
     }
 
@@ -742,8 +743,7 @@
 /* Like malloc but check for no memory and block interrupt input..  */
 
 POINTER_TYPE *
-xmalloc (size)
-     size_t size;
+xmalloc (size_t size)
 {
   register POINTER_TYPE *val;
 
@@ -760,9 +760,7 @@
 /* Like realloc but check for no memory and block interrupt input..  */
 
 POINTER_TYPE *
-xrealloc (block, size)
-     POINTER_TYPE *block;
-     size_t size;
+xrealloc (POINTER_TYPE *block, size_t size)
 {
   register POINTER_TYPE *val;
 
@@ -783,8 +781,7 @@
 /* Like free but block interrupt input.  */
 
 void
-xfree (block)
-     POINTER_TYPE *block;
+xfree (POINTER_TYPE *block)
 {
   if (!block)
     return;
@@ -800,12 +797,11 @@
 /* Like strdup, but uses xmalloc.  */
 
 char *
-xstrdup (s)
-     const char *s;
+xstrdup (const char *s)
 {
   size_t len = strlen (s) + 1;
   char *p = (char *) xmalloc (len);
-  bcopy (s, p, len);
+  memcpy (p, s, len);
   return p;
 }
 
@@ -813,8 +809,7 @@
 /* Unwind for SAFE_ALLOCA */
 
 Lisp_Object
-safe_alloca_unwind (arg)
-     Lisp_Object arg;
+safe_alloca_unwind (Lisp_Object arg)
 {
   register struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
 
@@ -835,9 +830,7 @@
 #endif
 
 static POINTER_TYPE *
-lisp_malloc (nbytes, type)
-     size_t nbytes;
-     enum mem_type type;
+lisp_malloc (size_t nbytes, enum mem_type type)
 {
   register void *val;
 
@@ -881,8 +874,7 @@
    call to lisp_malloc.  */
 
 static void
-lisp_free (block)
-     POINTER_TYPE *block;
+lisp_free (POINTER_TYPE *block)
 {
   MALLOC_BLOCK_INPUT;
   free (block);
@@ -981,9 +973,7 @@
    Alignment is on a multiple of BLOCK_ALIGN and `nbytes' has to be
    smaller or equal to BLOCK_BYTES.  */
 static POINTER_TYPE *
-lisp_align_malloc (nbytes, type)
-     size_t nbytes;
-     enum mem_type type;
+lisp_align_malloc (size_t nbytes, enum mem_type type)
 {
   void *base, *val;
   struct ablocks *abase;
@@ -1090,8 +1080,7 @@
 }
 
 static void
-lisp_align_free (block)
-     POINTER_TYPE *block;
+lisp_align_free (POINTER_TYPE *block)
 {
   struct ablock *ablock = block;
   struct ablocks *abase = ABLOCK_ABASE (ablock);
@@ -1136,7 +1125,7 @@
    a call to lisp_malloc.  */
 
 struct buffer *
-allocate_buffer ()
+allocate_buffer (void)
 {
   struct buffer *b
     = (struct buffer *) lisp_malloc (sizeof (struct buffer),
@@ -1164,14 +1153,14 @@
    there's no need to block input around malloc.  */
 
 #ifndef DOUG_LEA_MALLOC
-extern void * (*__malloc_hook) P_ ((size_t, const void *));
-extern void * (*__realloc_hook) P_ ((void *, size_t, const void *));
-extern void (*__free_hook) P_ ((void *, const void *));
+extern void * (*__malloc_hook) (size_t, const void *);
+extern void * (*__realloc_hook) (void *, size_t, const void *);
+extern void (*__free_hook) (void *, const void *);
 /* Else declared in malloc.h, perhaps with an extra arg.  */
 #endif /* DOUG_LEA_MALLOC */
-static void * (*old_malloc_hook) P_ ((size_t, const void *));
-static void * (*old_realloc_hook) P_ ((void *,  size_t, const void*));
-static void (*old_free_hook) P_ ((void*, const void*));
+static void * (*old_malloc_hook) (size_t, const void *);
+static void * (*old_realloc_hook) (void *,  size_t, const void*);
+static void (*old_free_hook) (void*, const void*);
 
 /* This function is used as the hook for free to call.  */
 
@@ -1434,7 +1423,7 @@
 /* Initialize interval allocation.  */
 
 static void
-init_intervals ()
+init_intervals (void)
 {
   interval_block = NULL;
   interval_block_index = INTERVAL_BLOCK_SIZE;
@@ -1446,7 +1435,7 @@
 /* Return a new interval.  */
 
 INTERVAL
-make_interval ()
+make_interval (void)
 {
   INTERVAL val;
 
@@ -1489,9 +1478,7 @@
 /* Mark Lisp objects in interval I. */
 
 static void
-mark_interval (i, dummy)
-     register INTERVAL i;
-     Lisp_Object dummy;
+mark_interval (register INTERVAL i, Lisp_Object dummy)
 {
   eassert (!i->gcmarkbit);		/* Intervals are never shared.  */
   i->gcmarkbit = 1;
@@ -1503,8 +1490,7 @@
    use the macro MARK_INTERVAL_TREE instead.  */
 
 static void
-mark_interval_tree (tree)
-     register INTERVAL tree;
+mark_interval_tree (register INTERVAL tree)
 {
   /* No need to test if this tree has been marked already; this
      function is always called through the MARK_INTERVAL_TREE macro,
@@ -1751,7 +1737,7 @@
 /* Initialize string allocation.  Called from init_alloc_once.  */
 
 static void
-init_strings ()
+init_strings (void)
 {
   total_strings = total_free_strings = total_string_size = 0;
   oldest_sblock = current_sblock = large_sblocks = NULL;
@@ -1767,8 +1753,8 @@
 
 static int check_string_bytes_count;
 
-static void check_string_bytes P_ ((int));
-static void check_sblock P_ ((struct sblock *));
+static void check_string_bytes (int);
+static void check_sblock (struct sblock *);
 
 #define CHECK_STRING_BYTES(S)	STRING_BYTES (S)
 
@@ -1873,7 +1859,7 @@
 /* Return a new Lisp_String.  */
 
 static struct Lisp_String *
-allocate_string ()
+allocate_string (void)
 {
   struct Lisp_String *s;
 
@@ -1889,7 +1875,7 @@
       int i;
 
       b = (struct string_block *) lisp_malloc (sizeof *b, MEM_TYPE_STRING);
-      bzero (b, sizeof *b);
+      memset (b, 0, sizeof *b);
       b->next = string_blocks;
       string_blocks = b;
       ++n_string_blocks;
@@ -1913,7 +1899,7 @@
   MALLOC_UNBLOCK_INPUT;
 
   /* Probably not strictly necessary, but play it safe.  */
-  bzero (s, sizeof *s);
+  memset (s, 0, sizeof *s);
 
   --total_free_strings;
   ++total_strings;
@@ -1944,9 +1930,7 @@
    S->data if it was initially non-null.  */
 
 void
-allocate_string_data (s, nchars, nbytes)
-     struct Lisp_String *s;
-     int nchars, nbytes;
+allocate_string_data (struct Lisp_String *s, int nchars, int nbytes)
 {
   struct sdata *data, *old_data;
   struct sblock *b;
@@ -2023,8 +2007,7 @@
   s->size_byte = nbytes;
   s->data[nbytes] = '\0';
 #ifdef GC_CHECK_STRING_OVERRUN
-  bcopy (string_overrun_cookie, (char *) data + needed,
-	 GC_STRING_OVERRUN_COOKIE_SIZE);
+  memcpy (data + needed, string_overrun_cookie, GC_STRING_OVERRUN_COOKIE_SIZE);
 #endif
 
   /* If S had already data assigned, mark that as free by setting its
@@ -2043,7 +2026,7 @@
 /* Sweep and compact strings.  */
 
 static void
-sweep_strings ()
+sweep_strings (void)
 {
   struct string_block *b, *next;
   struct string_block *live_blocks = NULL;
@@ -2143,7 +2126,7 @@
 /* Free dead large strings.  */
 
 static void
-free_large_strings ()
+free_large_strings (void)
 {
   struct sblock *b, *next;
   struct sblock *live_blocks = NULL;
@@ -2169,7 +2152,7 @@
    data of live strings after compaction.  */
 
 static void
-compact_small_strings ()
+compact_small_strings (void)
 {
   struct sblock *b, *tb, *next;
   struct sdata *from, *to, *end, *tb_end;
@@ -2215,9 +2198,9 @@
 	  from_end = (struct sdata *) ((char *) from + nbytes + GC_STRING_EXTRA);
 
 #ifdef GC_CHECK_STRING_OVERRUN
-	  if (bcmp (string_overrun_cookie,
-		    ((char *) from_end) - GC_STRING_OVERRUN_COOKIE_SIZE,
-		    GC_STRING_OVERRUN_COOKIE_SIZE))
+	  if (memcmp (string_overrun_cookie,
+		      (char *) from_end - GC_STRING_OVERRUN_COOKIE_SIZE,
+		      GC_STRING_OVERRUN_COOKIE_SIZE))
 	    abort ();
 #endif
 
@@ -2239,7 +2222,7 @@
 	      if (from != to)
 		{
 		  xassert (tb != b || to <= from);
-		  safe_bcopy ((char *) from, (char *) to, nbytes + GC_STRING_EXTRA);
+		  memmove (to, from, nbytes + GC_STRING_EXTRA);
 		  to->string->data = SDATA_DATA (to);
 		}
 
@@ -2298,7 +2281,7 @@
       end = p + nbytes;
       while (p != end)
 	{
-	  bcopy (str, p, len);
+	  memcpy (p, str, len);
 	  p += len;
 	}
     }
@@ -2357,9 +2340,7 @@
    multibyte, depending on the contents.  */
 
 Lisp_Object
-make_string (contents, nbytes)
-     const char *contents;
-     int nbytes;
+make_string (const char *contents, int nbytes)
 {
   register Lisp_Object val;
   int nchars, multibyte_nbytes;
@@ -2378,13 +2359,11 @@
 /* Make an unibyte string from LENGTH bytes at CONTENTS.  */
 
 Lisp_Object
-make_unibyte_string (contents, length)
-     const char *contents;
-     int length;
+make_unibyte_string (const char *contents, int length)
 {
   register Lisp_Object val;
   val = make_uninit_string (length);
-  bcopy (contents, SDATA (val), length);
+  memcpy (SDATA (val), contents, length);
   STRING_SET_UNIBYTE (val);
   return val;
 }
@@ -2394,13 +2373,11 @@
    bytes at CONTENTS.  */
 
 Lisp_Object
-make_multibyte_string (contents, nchars, nbytes)
-     const char *contents;
-     int nchars, nbytes;
+make_multibyte_string (const char *contents, int nchars, int nbytes)
 {
   register Lisp_Object val;
   val = make_uninit_multibyte_string (nchars, nbytes);
-  bcopy (contents, SDATA (val), nbytes);
+  memcpy (SDATA (val), contents, nbytes);
   return val;
 }
 
@@ -2409,13 +2386,11 @@
    CONTENTS.  It is a multibyte string if NBYTES != NCHARS.  */
 
 Lisp_Object
-make_string_from_bytes (contents, nchars, nbytes)
-     const char *contents;
-     int nchars, nbytes;
+make_string_from_bytes (const char *contents, int nchars, int nbytes)
 {
   register Lisp_Object val;
   val = make_uninit_multibyte_string (nchars, nbytes);
-  bcopy (contents, SDATA (val), nbytes);
+  memcpy (SDATA (val), contents, nbytes);
   if (SBYTES (val) == SCHARS (val))
     STRING_SET_UNIBYTE (val);
   return val;
@@ -2428,10 +2403,7 @@
    characters by itself.  */
 
 Lisp_Object
-make_specified_string (contents, nchars, nbytes, multibyte)
-     const char *contents;
-     int nchars, nbytes;
-     int multibyte;
+make_specified_string (const char *contents, int nchars, int nbytes, int multibyte)
 {
   register Lisp_Object val;
 
@@ -2443,7 +2415,7 @@
 	nchars = nbytes;
     }
   val = make_uninit_multibyte_string (nchars, nbytes);
-  bcopy (contents, SDATA (val), nbytes);
+  memcpy (SDATA (val), contents, nbytes);
   if (!multibyte)
     STRING_SET_UNIBYTE (val);
   return val;
@@ -2454,8 +2426,7 @@
    data warrants.  */
 
 Lisp_Object
-build_string (str)
-     const char *str;
+build_string (const char *str)
 {
   return make_string (str, strlen (str));
 }
@@ -2465,8 +2436,7 @@
    occupying LENGTH bytes.  */
 
 Lisp_Object
-make_uninit_string (length)
-     int length;
+make_uninit_string (int length)
 {
   Lisp_Object val;
 
@@ -2482,8 +2452,7 @@
    which occupy NBYTES bytes.  */
 
 Lisp_Object
-make_uninit_multibyte_string (nchars, nbytes)
-     int nchars, nbytes;
+make_uninit_multibyte_string (int nchars, int nbytes)
 {
   Lisp_Object string;
   struct Lisp_String *s;
@@ -2573,7 +2542,7 @@
 /* Initialize float allocation.  */
 
 static void
-init_float ()
+init_float (void)
 {
   float_block = NULL;
   float_block_index = FLOAT_BLOCK_SIZE; /* Force alloc of new float_block.   */
@@ -2585,8 +2554,7 @@
 /* Explicitly free a float cell by putting it on the free-list.  */
 
 static void
-free_float (ptr)
-     struct Lisp_Float *ptr;
+free_float (struct Lisp_Float *ptr)
 {
   ptr->u.chain = float_free_list;
   float_free_list = ptr;
@@ -2596,8 +2564,7 @@
 /* Return a new float object with value FLOAT_VALUE.  */
 
 Lisp_Object
-make_float (float_value)
-     double float_value;
+make_float (double float_value)
 {
   register Lisp_Object val;
 
@@ -2621,7 +2588,7 @@
 	  new = (struct float_block *) lisp_align_malloc (sizeof *new,
 							  MEM_TYPE_FLOAT);
 	  new->next = float_block;
-	  bzero ((char *) new->gcmarkbits, sizeof new->gcmarkbits);
+	  memset (new->gcmarkbits, 0, sizeof new->gcmarkbits);
 	  float_block = new;
 	  float_block_index = 0;
 	  n_float_blocks++;
@@ -2697,7 +2664,7 @@
 /* Initialize cons allocation.  */
 
 static void
-init_cons ()
+init_cons (void)
 {
   cons_block = NULL;
   cons_block_index = CONS_BLOCK_SIZE; /* Force alloc of new cons_block.  */
@@ -2709,8 +2676,7 @@
 /* Explicitly free a cons cell by putting it on the free-list.  */
 
 void
-free_cons (ptr)
-     struct Lisp_Cons *ptr;
+free_cons (struct Lisp_Cons *ptr)
 {
   ptr->u.chain = cons_free_list;
 #if GC_MARK_STACK
@@ -2744,7 +2710,7 @@
 	  register struct cons_block *new;
 	  new = (struct cons_block *) lisp_align_malloc (sizeof *new,
 							 MEM_TYPE_CONS);
-	  bzero ((char *) new->gcmarkbits, sizeof new->gcmarkbits);
+	  memset (new->gcmarkbits, 0, sizeof new->gcmarkbits);
 	  new->next = cons_block;
 	  cons_block = new;
 	  cons_block_index = 0;
@@ -2766,7 +2732,7 @@
 
 /* Get an error now if there's any junk in the cons free list.  */
 void
-check_cons_list ()
+check_cons_list (void)
 {
 #ifdef GC_CHECK_CONS_LIST
   struct Lisp_Cons *tail = cons_free_list;
@@ -2779,39 +2745,34 @@
 /* Make a list of 1, 2, 3, 4 or 5 specified objects.  */
 
 Lisp_Object
-list1 (arg1)
-     Lisp_Object arg1;
+list1 (Lisp_Object arg1)
 {
   return Fcons (arg1, Qnil);
 }
 
 Lisp_Object
-list2 (arg1, arg2)
-     Lisp_Object arg1, arg2;
+list2 (Lisp_Object arg1, Lisp_Object arg2)
 {
   return Fcons (arg1, Fcons (arg2, Qnil));
 }
 
 
 Lisp_Object
-list3 (arg1, arg2, arg3)
-     Lisp_Object arg1, arg2, arg3;
+list3 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
 {
   return Fcons (arg1, Fcons (arg2, Fcons (arg3, Qnil)));
 }
 
 
 Lisp_Object
-list4 (arg1, arg2, arg3, arg4)
-     Lisp_Object arg1, arg2, arg3, arg4;
+list4 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4)
 {
   return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, Qnil))));
 }
 
 
 Lisp_Object
-list5 (arg1, arg2, arg3, arg4, arg5)
-     Lisp_Object arg1, arg2, arg3, arg4, arg5;
+list5 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4, Lisp_Object arg5)
 {
   return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4,
 						       Fcons (arg5, Qnil)))));
@@ -2904,8 +2865,7 @@
    with room for LEN Lisp_Objects.  */
 
 static struct Lisp_Vector *
-allocate_vectorlike (len)
-     EMACS_INT len;
+allocate_vectorlike (EMACS_INT len)
 {
   struct Lisp_Vector *p;
   size_t nbytes;
@@ -2946,8 +2906,7 @@
 /* Allocate a vector with NSLOTS slots.  */
 
 struct Lisp_Vector *
-allocate_vector (nslots)
-     EMACS_INT nslots;
+allocate_vector (EMACS_INT nslots)
 {
   struct Lisp_Vector *v = allocate_vectorlike (nslots);
   v->size = nslots;
@@ -2958,9 +2917,7 @@
 /* Allocate other vector-like structures.  */
 
 struct Lisp_Vector *
-allocate_pseudovector (memlen, lisplen, tag)
-     int memlen, lisplen;
-     EMACS_INT tag;
+allocate_pseudovector (int memlen, int lisplen, EMACS_INT tag)
 {
   struct Lisp_Vector *v = allocate_vectorlike (memlen);
   EMACS_INT i;
@@ -2982,38 +2939,38 @@
 
 
 struct window *
-allocate_window ()
+allocate_window (void)
 {
   return ALLOCATE_PSEUDOVECTOR(struct window, current_matrix, PVEC_WINDOW);
 }
 
 
 struct terminal *
-allocate_terminal ()
+allocate_terminal (void)
 {
   struct terminal *t = ALLOCATE_PSEUDOVECTOR (struct terminal,
 					      next_terminal, PVEC_TERMINAL);
   /* Zero out the non-GC'd fields.  FIXME: This should be made unnecessary.  */
-  bzero (&(t->next_terminal),
-	 ((char*)(t+1)) - ((char*)&(t->next_terminal)));
+  memset (&t->next_terminal, 0,
+	  (char*) (t + 1) - (char*) &t->next_terminal);
 
   return t;
 }
 
 struct frame *
-allocate_frame ()
+allocate_frame (void)
 {
   struct frame *f = ALLOCATE_PSEUDOVECTOR (struct frame,
 					   face_cache, PVEC_FRAME);
   /* Zero out the non-GC'd fields.  FIXME: This should be made unnecessary.  */
-  bzero (&(f->face_cache),
-	 ((char*)(f+1)) - ((char*)&(f->face_cache)));
+  memset (&f->face_cache, 0,
+	  (char *) (f + 1) - (char *) &f->face_cache);
   return f;
 }
 
 
 struct Lisp_Process *
-allocate_process ()
+allocate_process (void)
 {
   return ALLOCATE_PSEUDOVECTOR (struct Lisp_Process, pid, PVEC_PROCESS);
 }
@@ -3142,7 +3099,7 @@
 /* Initialize symbol allocation.  */
 
 static void
-init_symbol ()
+init_symbol (void)
 {
   symbol_block = NULL;
   symbol_block_index = SYMBOL_BLOCK_SIZE;
@@ -3233,7 +3190,7 @@
 static int n_marker_blocks;
 
 static void
-init_marker ()
+init_marker (void)
 {
   marker_block = NULL;
   marker_block_index = MARKER_BLOCK_SIZE;
@@ -3244,7 +3201,7 @@
 /* Return a newly allocated Lisp_Misc object, with no substructure.  */
 
 Lisp_Object
-allocate_misc ()
+allocate_misc (void)
 {
   Lisp_Object val;
 
@@ -3286,8 +3243,7 @@
 /* Free a Lisp_Misc object */
 
 void
-free_misc (misc)
-     Lisp_Object misc;
+free_misc (Lisp_Object misc)
 {
   XMISCTYPE (misc) = Lisp_Misc_Free;
   XMISC (misc)->u_free.chain = marker_free_list;
@@ -3301,9 +3257,7 @@
    The unwind function can get the C values back using XSAVE_VALUE.  */
 
 Lisp_Object
-make_save_value (pointer, integer)
-     void *pointer;
-     int integer;
+make_save_value (void *pointer, int integer)
 {
   register Lisp_Object val;
   register struct Lisp_Save_Value *p;
@@ -3338,8 +3292,7 @@
 /* Put MARKER back on the free list after using it temporarily.  */
 
 void
-free_marker (marker)
-     Lisp_Object marker;
+free_marker (Lisp_Object marker)
 {
   unchain_marker (XMARKER (marker));
   free_misc (marker);
@@ -3353,9 +3306,7 @@
    Any number of arguments, even zero arguments, are allowed.  */
 
 Lisp_Object
-make_event_array (nargs, args)
-     register int nargs;
-     Lisp_Object *args;
+make_event_array (register int nargs, Lisp_Object *args)
 {
   int i;
 
@@ -3395,7 +3346,7 @@
 /* Called if malloc returns zero.  */
 
 void
-memory_full ()
+memory_full (void)
 {
   int i;
 
@@ -3435,7 +3386,7 @@
    and also directly from this file, in case we're not using ralloc.c.  */
 
 void
-refill_memory_reserve ()
+refill_memory_reserve (void)
 {
 #ifndef SYSTEM_MALLOC
   if (spare_memory[0] == 0)
@@ -3483,7 +3434,7 @@
 /* Initialize this part of alloc.c.  */
 
 static void
-mem_init ()
+mem_init (void)
 {
   mem_z.left = mem_z.right = MEM_NIL;
   mem_z.parent = NULL;
@@ -3497,8 +3448,7 @@
    MEM_NIL if there is no node in the tree containing START.  */
 
 static INLINE struct mem_node *
-mem_find (start)
-     void *start;
+mem_find (void *start)
 {
   struct mem_node *p;
 
@@ -3521,9 +3471,7 @@
    pointer to the node that was inserted.  */
 
 static struct mem_node *
-mem_insert (start, end, type)
-     void *start, *end;
-     enum mem_type type;
+mem_insert (void *start, void *end, enum mem_type type)
 {
   struct mem_node *c, *parent, *x;
 
@@ -3595,8 +3543,7 @@
    balance the tree, after node X has been inserted; X is always red.  */
 
 static void
-mem_insert_fixup (x)
-     struct mem_node *x;
+mem_insert_fixup (struct mem_node *x)
 {
   while (x != mem_root && x->parent->color == MEM_RED)
     {
@@ -3674,8 +3621,7 @@
        b   c            a   b  */
 
 static void
-mem_rotate_left (x)
-     struct mem_node *x;
+mem_rotate_left (struct mem_node *x)
 {
   struct mem_node *y;
 
@@ -3714,8 +3660,7 @@
     a   b                  b   c  */
 
 static void
-mem_rotate_right (x)
-     struct mem_node *x;
+mem_rotate_right (struct mem_node *x)
 {
   struct mem_node *y = x->left;
 
@@ -3744,8 +3689,7 @@
 /* Delete node Z from the tree.  If Z is null or MEM_NIL, do nothing.  */
 
 static void
-mem_delete (z)
-     struct mem_node *z;
+mem_delete (struct mem_node *z)
 {
   struct mem_node *x, *y;
 
@@ -3799,8 +3743,7 @@
    deletion.  */
 
 static void
-mem_delete_fixup (x)
-     struct mem_node *x;
+mem_delete_fixup (struct mem_node *x)
 {
   while (x != mem_root && x->color == MEM_BLACK)
     {
@@ -3881,9 +3824,7 @@
    the heap.  M is a pointer to the mem_block for P.  */
 
 static INLINE int
-live_string_p (m, p)
-     struct mem_node *m;
-     void *p;
+live_string_p (struct mem_node *m, void *p)
 {
   if (m->type == MEM_TYPE_STRING)
     {
@@ -3906,9 +3847,7 @@
    the heap.  M is a pointer to the mem_block for P.  */
 
 static INLINE int
-live_cons_p (m, p)
-     struct mem_node *m;
-     void *p;
+live_cons_p (struct mem_node *m, void *p)
 {
   if (m->type == MEM_TYPE_CONS)
     {
@@ -3934,9 +3873,7 @@
    the heap.  M is a pointer to the mem_block for P.  */
 
 static INLINE int
-live_symbol_p (m, p)
-     struct mem_node *m;
-     void *p;
+live_symbol_p (struct mem_node *m, void *p)
 {
   if (m->type == MEM_TYPE_SYMBOL)
     {
@@ -3962,9 +3899,7 @@
    the heap.  M is a pointer to the mem_block for P.  */
 
 static INLINE int
-live_float_p (m, p)
-     struct mem_node *m;
-     void *p;
+live_float_p (struct mem_node *m, void *p)
 {
   if (m->type == MEM_TYPE_FLOAT)
     {
@@ -3988,9 +3923,7 @@
    the heap.  M is a pointer to the mem_block for P.  */
 
 static INLINE int
-live_misc_p (m, p)
-     struct mem_node *m;
-     void *p;
+live_misc_p (struct mem_node *m, void *p)
 {
   if (m->type == MEM_TYPE_MISC)
     {
@@ -4016,9 +3949,7 @@
    M is a pointer to the mem_block for P.  */
 
 static INLINE int
-live_vector_p (m, p)
-     struct mem_node *m;
-     void *p;
+live_vector_p (struct mem_node *m, void *p)
 {
   return (p == m->start && m->type == MEM_TYPE_VECTORLIKE);
 }
@@ -4028,9 +3959,7 @@
    pointer to the mem_block for P.  */
 
 static INLINE int
-live_buffer_p (m, p)
-     struct mem_node *m;
-     void *p;
+live_buffer_p (struct mem_node *m, void *p)
 {
   /* P must point to the start of the block, and the buffer
      must not have been killed.  */
@@ -4096,8 +4025,7 @@
 /* Mark OBJ if we can prove it's a Lisp_Object.  */
 
 static INLINE void
-mark_maybe_object (obj)
-     Lisp_Object obj;
+mark_maybe_object (Lisp_Object obj)
 {
   void *po = (void *) XPNTR (obj);
   struct mem_node *m = mem_find (po);
@@ -4160,8 +4088,7 @@
    marked.  */
 
 static INLINE void
-mark_maybe_pointer (p)
-     void *p;
+mark_maybe_pointer (void *p)
 {
   struct mem_node *m;
 
@@ -4241,9 +4168,7 @@
    or END+OFFSET..START. */
 
 static void
-mark_memory (start, end, offset)
-     void *start, *end;
-     int offset;
+mark_memory (void *start, void *end, int offset)
 {
   Lisp_Object *p;
   void **pp;
@@ -4459,7 +4384,7 @@
    equally on the stack.  */
 
 static void
-mark_stack ()
+mark_stack (void)
 {
   int i;
   /* jmp_buf may not be aligned enough on darwin-ppc64 */
@@ -4534,8 +4459,7 @@
 
 /* Determine whether it is safe to access memory at address P.  */
 static int
-valid_pointer_p (p)
-     void *p;
+valid_pointer_p (void *p)
 {
 #ifdef WINDOWSNT
   return w32_valid_pointer_p (p, 16);
@@ -4566,8 +4490,7 @@
    so it should only be used in code for manual debugging.  */
 
 int
-valid_lisp_object_p (obj)
-     Lisp_Object obj;
+valid_lisp_object_p (Lisp_Object obj)
 {
   void *p;
 #if GC_MARK_STACK
@@ -4645,9 +4568,7 @@
    allocated.  TYPE < 0 means it's not used for a Lisp object.  */
 
 static POINTER_TYPE *
-pure_alloc (size, type)
-     size_t size;
-     int type;
+pure_alloc (size_t size, int type)
 {
   POINTER_TYPE *result;
 #ifdef USE_LSB_TAG
@@ -4701,7 +4622,7 @@
 /* Print a warning if PURESIZE is too small.  */
 
 void
-check_pure_size ()
+check_pure_size (void)
 {
   if (pure_bytes_used_before_overflow)
     message ("emacs:0:Pure Lisp storage overflow (approx. %d bytes needed)",
@@ -4714,9 +4635,7 @@
    address.  Return NULL if not found.  */
 
 static char *
-find_string_data_in_pure (data, nbytes)
-     const char *data;
-     int nbytes;
+find_string_data_in_pure (const char *data, int nbytes)
 {
   int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max;
   const unsigned char *p;
@@ -4785,10 +4704,7 @@
    string; then the string is not protected from gc.  */
 
 Lisp_Object
-make_pure_string (data, nchars, nbytes, multibyte)
-     const char *data;
-     int nchars, nbytes;
-     int multibyte;
+make_pure_string (const char *data, int nchars, int nbytes, int multibyte)
 {
   Lisp_Object string;
   struct Lisp_String *s;
@@ -4798,7 +4714,7 @@
   if (s->data == NULL)
     {
       s->data = (unsigned char *) pure_alloc (nbytes + 1, -1);
-      bcopy (data, s->data, nbytes);
+      memcpy (s->data, data, nbytes);
       s->data[nbytes] = '\0';
     }
   s->size = nchars;
@@ -4831,8 +4747,7 @@
    of CAR as car and CDR as cdr.  */
 
 Lisp_Object
-pure_cons (car, cdr)
-     Lisp_Object car, cdr;
+pure_cons (Lisp_Object car, Lisp_Object cdr)
 {
   register Lisp_Object new;
   struct Lisp_Cons *p;
@@ -4848,8 +4763,7 @@
 /* Value is a float object with value NUM allocated from pure space.  */
 
 static Lisp_Object
-make_pure_float (num)
-     double num;
+make_pure_float (double num)
 {
   register Lisp_Object new;
   struct Lisp_Float *p;
@@ -4865,8 +4779,7 @@
    pure space.  */
 
 Lisp_Object
-make_pure_vector (len)
-     EMACS_INT len;
+make_pure_vector (EMACS_INT len)
 {
   Lisp_Object new;
   struct Lisp_Vector *p;
@@ -4949,8 +4862,7 @@
    VARADDRESS.  */
 
 void
-staticpro (varaddress)
-     Lisp_Object *varaddress;
+staticpro (Lisp_Object *varaddress)
 {
   staticvec[staticidx++] = varaddress;
   if (staticidx >= NSTATICS)
@@ -4965,7 +4877,7 @@
 /* Temporarily prevent garbage collection.  */
 
 int
-inhibit_garbage_collection ()
+inhibit_garbage_collection (void)
 {
   int count = SPECPDL_INDEX ();
   int nbits = min (VALBITS, BITS_PER_INT);
@@ -5069,9 +4981,9 @@
 	  if (stack_copy)
 	    {
 	      if ((EMACS_INT) (&stack_top_variable - stack_bottom) > 0)
-		bcopy (stack_bottom, stack_copy, i);
+		memcpy (stack_copy, stack_bottom, i);
 	      else
-		bcopy (&stack_top_variable, stack_copy, i);
+		memcpy (stack_copy, &stack_top_variable, i);
 	    }
 	}
     }
@@ -5104,7 +5016,7 @@
 
 #ifdef USE_GTK
   {
-    extern void xg_mark_data ();
+    extern void xg_mark_data (void);
     xg_mark_data ();
   }
 #endif
@@ -5297,8 +5209,7 @@
    only interesting objects referenced from glyphs are strings.  */
 
 static void
-mark_glyph_matrix (matrix)
-     struct glyph_matrix *matrix;
+mark_glyph_matrix (struct glyph_matrix *matrix)
 {
   struct glyph_row *row = matrix->rows;
   struct glyph_row *end = row + matrix->nrows;
@@ -5324,8 +5235,7 @@
 /* Mark Lisp faces in the face cache C.  */
 
 static void
-mark_face_cache (c)
-     struct face_cache *c;
+mark_face_cache (struct face_cache *c)
 {
   if (c)
     {
@@ -5360,8 +5270,7 @@
 static int mark_object_loop_halt;
 
 static void
-mark_vectorlike (ptr)
-     struct Lisp_Vector *ptr;
+mark_vectorlike (struct Lisp_Vector *ptr)
 {
   register EMACS_INT size = ptr->size;
   register int i;
@@ -5384,8 +5293,7 @@
    symbols.  */
 
 static void
-mark_char_table (ptr)
-     struct Lisp_Vector *ptr;
+mark_char_table (struct Lisp_Vector *ptr)
 {
   register EMACS_INT size = ptr->size & PSEUDOVECTOR_SIZE_MASK;
   register int i;
@@ -5409,8 +5317,7 @@
 }
 
 void
-mark_object (arg)
-     Lisp_Object arg;
+mark_object (Lisp_Object arg)
 {
   register Lisp_Object obj = arg;
 #ifdef GC_CHECK_MARKED_OBJECTS
@@ -5719,8 +5626,7 @@
 /* Mark the pointers in a buffer structure.  */
 
 static void
-mark_buffer (buf)
-     Lisp_Object buf;
+mark_buffer (Lisp_Object buf)
 {
   register struct buffer *buffer = XBUFFER (buf);
   register Lisp_Object *ptr, tmp;
@@ -5787,8 +5693,7 @@
    either marked or does not need to be marked to survive.  */
 
 int
-survives_gc_p (obj)
-     Lisp_Object obj;
+survives_gc_p (Lisp_Object obj)
 {
   int survives_p;
 
@@ -5834,7 +5739,7 @@
 /* Sweep: find all structures not marked, and free them. */
 
 static void
-gc_sweep ()
+gc_sweep (void)
 {
   /* Remove or mark entries in weak hash tables.
      This must be done before any object is unmarked.  */
@@ -6251,10 +6156,7 @@
 int suppress_checking;
 
 void
-die (msg, file, line)
-     const char *msg;
-     const char *file;
-     int line;
+die (const char *msg, const char *file, int line)
 {
   fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n",
 	   file, line, msg);
@@ -6264,7 +6166,7 @@
 /* Initialization */
 
 void
-init_alloc_once ()
+init_alloc_once (void)
 {
   /* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet!  */
   purebeg = PUREBEG;
@@ -6319,7 +6221,7 @@
 }
 
 void
-init_alloc ()
+init_alloc (void)
 {
   gcprolist = 0;
   byte_stack_list = 0;
@@ -6333,7 +6235,7 @@
 }
 
 void
-syms_of_alloc ()
+syms_of_alloc (void)
 {
   DEFVAR_INT ("gc-cons-threshold", &gc_cons_threshold,
 	      doc: /* *Number of bytes of consing between garbage collections.
--- a/src/atimer.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/atimer.c	Thu Jul 08 17:09:35 2010 +0900
@@ -21,11 +21,11 @@
 #include <signal.h>
 #include <stdio.h>
 #include <setjmp.h>
-#include <lisp.h>
-#include <syssignal.h>
-#include <systime.h>
-#include <blockinput.h>
-#include <atimer.h>
+#include "lisp.h"
+#include "syssignal.h"
+#include "systime.h"
+#include "blockinput.h"
+#include "atimer.h"
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -64,11 +64,11 @@
 
 /* Function prototypes.  */
 
-static void set_alarm P_ ((void));
-static void schedule_atimer P_ ((struct atimer *));
-static struct atimer *append_atimer_lists P_ ((struct atimer *,
-					       struct atimer *));
-SIGTYPE alarm_signal_handler ();
+static void set_alarm (void);
+static void schedule_atimer (struct atimer *);
+static struct atimer *append_atimer_lists (struct atimer *,
+                                           struct atimer *);
+SIGTYPE alarm_signal_handler (int signo);
 
 
 /* Start a new atimer of type TYPE.  TIME specifies when the timer is
@@ -90,11 +90,8 @@
    to cancel_atimer; don't free it yourself.  */
 
 struct atimer *
-start_atimer (type, time, fn, client_data)
-     enum atimer_type type;
-     EMACS_TIME time;
-     atimer_callback fn;
-     void *client_data;
+start_atimer (enum atimer_type type, EMACS_TIME time, atimer_callback fn,
+	      void *client_data)
 {
   struct atimer *t;
 
@@ -119,7 +116,7 @@
     t = (struct atimer *) xmalloc (sizeof *t);
 
   /* Fill the atimer structure.  */
-  bzero (t, sizeof *t);
+  memset (t, 0, sizeof *t);
   t->type = type;
   t->fn = fn;
   t->client_data = client_data;
@@ -159,8 +156,7 @@
 /* Cancel and free atimer TIMER.  */
 
 void
-cancel_atimer (timer)
-     struct atimer *timer;
+cancel_atimer (struct atimer *timer)
 {
   int i;
 
@@ -199,8 +195,7 @@
    result list.  */
 
 static struct atimer *
-append_atimer_lists (list1, list2)
-     struct atimer *list1, *list2;
+append_atimer_lists (struct atimer *list1, struct atimer *list2)
 {
   if (list1 == NULL)
     return list2;
@@ -221,8 +216,7 @@
 /* Stop all timers except timer T.  T null means stop all timers.  */
 
 void
-stop_other_atimers (t)
-     struct atimer *t;
+stop_other_atimers (struct atimer *t)
 {
   BLOCK_ATIMERS;
 
@@ -257,7 +251,7 @@
    stop_other_atimers.  */
 
 void
-run_all_atimers ()
+run_all_atimers (void)
 {
   if (stopped_atimers)
     {
@@ -283,8 +277,7 @@
 /* A version of run_all_timers suitable for a record_unwind_protect.  */
 
 Lisp_Object
-unwind_stop_other_atimers (dummy)
-     Lisp_Object dummy;
+unwind_stop_other_atimers (Lisp_Object dummy)
 {
   run_all_atimers ();
   return Qnil;
@@ -294,7 +287,7 @@
 /* Arrange for a SIGALRM to arrive when the next timer is ripe.  */
 
 static void
-set_alarm ()
+set_alarm (void)
 {
   if (atimers)
     {
@@ -315,7 +308,7 @@
 	  EMACS_SET_USECS (time, 1000);
 	}
 
-      bzero (&it, sizeof it);
+      memset (&it, 0, sizeof it);
       it.it_value = time;
       setitimer (ITIMER_REAL, &it, 0);
 #else /* not HAVE_SETITIMER */
@@ -330,8 +323,7 @@
    already.  */
 
 static void
-schedule_atimer (t)
-     struct atimer *t;
+schedule_atimer (struct atimer *t)
 {
   struct atimer *a = atimers, *prev = NULL;
 
@@ -349,7 +341,7 @@
 }
 
 static void
-run_timers ()
+run_timers (void)
 {
   EMACS_TIME now;
 
@@ -401,8 +393,7 @@
    SIGALRM.  */
 
 SIGTYPE
-alarm_signal_handler (signo)
-     int signo;
+alarm_signal_handler (int signo)
 {
 #ifndef SYNC_INPUT
   SIGNAL_THREAD_CHECK (signo);
@@ -420,7 +411,7 @@
 /* Call alarm_signal_handler for pending timers.  */
 
 void
-do_pending_atimers ()
+do_pending_atimers (void)
 {
   if (pending_atimers)
     {
@@ -435,8 +426,7 @@
    some systems like HPUX (see process.c).  */
 
 void
-turn_on_atimers (on)
-     int on;
+turn_on_atimers (int on)
 {
   if (on)
     {
@@ -449,7 +439,7 @@
 
 
 void
-init_atimer ()
+init_atimer (void)
 {
   free_atimers = stopped_atimers = atimers = NULL;
   pending_atimers = 0;
--- a/src/atimer.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/atimer.h	Thu Jul 08 17:09:35 2010 +0900
@@ -20,13 +20,6 @@
 #ifndef EMACS_ATIMER_H
 #define EMACS_ATIMER_H
 
-/* Declare the prototype for a general external function.  */
-#if defined (PROTOTYPES) || defined (WINDOWSNT)
-#define P_(proto) proto
-#else
-#define P_(proto) ()
-#endif
-
 #include "systime.h"		/* for EMACS_TIME */
 
 /* Forward declaration.  */
@@ -49,7 +42,7 @@
 
 /* Type of timer callback functions.  */
 
-typedef void (* atimer_callback) P_ ((struct atimer *timer));
+typedef void (* atimer_callback) (struct atimer *timer);
 
 /* Structure describing an asynchronous timer.  */
 
@@ -77,15 +70,15 @@
 
 /* Function prototypes.  */
 
-struct atimer *start_atimer P_ ((enum atimer_type, EMACS_TIME,
-				 atimer_callback, void *));
-void cancel_atimer P_ ((struct atimer *));
-void do_pending_atimers P_ ((void));
-void init_atimer P_ ((void));
-void turn_on_atimers P_ ((int));
-void stop_other_atimers P_ ((struct atimer *));
-void run_all_atimers P_ ((void));
-Lisp_Object unwind_stop_other_atimers P_ ((Lisp_Object));
+struct atimer *start_atimer (enum atimer_type, EMACS_TIME,
+                             atimer_callback, void *);
+void cancel_atimer (struct atimer *);
+void do_pending_atimers (void);
+void init_atimer (void);
+void turn_on_atimers (int);
+void stop_other_atimers (struct atimer *);
+void run_all_atimers (void);
+Lisp_Object unwind_stop_other_atimers (Lisp_Object);
 
 #endif /* EMACS_ATIMER_H */
 
--- a/src/autodeps.mk	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/autodeps.mk	Thu Jul 08 17:09:35 2010 +0900
@@ -2,5 +2,5 @@
 
 ## This is inserted in src/Makefile if AUTO_DEPEND=yes.
 
-ALLOBJS=$(START_FILES) ${obj} ${otherobj} prefix-args.o
+ALLOBJS=$(START_FILES) ${obj} ${otherobj}
 -include $(ALLOBJS:%.o=${DEPDIR}/%.d)
--- a/src/bidi.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/bidi.c	Thu Jul 08 17:09:35 2010 +0900
@@ -49,16 +49,9 @@
    rule X9 and to its modifications decribed in the "Implementation
    Notes" section of UAX#9, under "Retaining Format Codes".  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
 #include <stdio.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
-
 #include <setjmp.h>
 
 #include "lisp.h"
@@ -106,7 +99,7 @@
 static Lisp_Object Qparagraph_start, Qparagraph_separate;
 
 static void
-bidi_initialize ()
+bidi_initialize (void)
 {
 
 #include "biditype.h"
--- a/src/blockinput.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/blockinput.h	Thu Jul 08 17:09:35 2010 +0900
@@ -123,7 +123,7 @@
 
 /* Defined in keyboard.c */
 /* Don't use a prototype here; it causes trouble in some files.  */
-extern void reinvoke_input_signal ();
+extern void reinvoke_input_signal (void);
 
 #endif /* EMACS_BLOCKINPUT_H */
 
--- a/src/buffer.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/buffer.c	Thu Jul 08 17:09:35 2010 +0900
@@ -106,13 +106,13 @@
 int last_per_buffer_idx;
 
 EXFUN (Fset_buffer, 1);
-void set_buffer_internal P_ ((struct buffer *b));
-void set_buffer_internal_1 P_ ((struct buffer *b));
-static void call_overlay_mod_hooks P_ ((Lisp_Object list, Lisp_Object overlay,
-					int after, Lisp_Object arg1,
-					Lisp_Object arg2, Lisp_Object arg3));
-static void swap_out_buffer_local_variables P_ ((struct buffer *b));
-static void reset_buffer_local_variables P_ ((struct buffer *b, int permanent_too));
+void set_buffer_internal (struct buffer *b);
+void set_buffer_internal_1 (struct buffer *b);
+static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay,
+                                    int after, Lisp_Object arg1,
+                                    Lisp_Object arg2, Lisp_Object arg3);
+static void swap_out_buffer_local_variables (struct buffer *b);
+static void reset_buffer_local_variables (struct buffer *b, int permanent_too);
 
 /* Alist of all buffer names vs the buffers. */
 /* This used to be a variable, but is no longer,
@@ -168,20 +168,19 @@
 Lisp_Object Qinsert_in_front_hooks;
 Lisp_Object Qinsert_behind_hooks;
 
-static void alloc_buffer_text P_ ((struct buffer *, size_t));
-static void free_buffer_text P_ ((struct buffer *b));
-static struct Lisp_Overlay * copy_overlays P_ ((struct buffer *, struct Lisp_Overlay *));
-static void modify_overlay P_ ((struct buffer *, EMACS_INT, EMACS_INT));
-static Lisp_Object buffer_lisp_local_variables P_ ((struct buffer *));
-
-extern char * emacs_strerror P_ ((int));
+static void alloc_buffer_text (struct buffer *, size_t);
+static void free_buffer_text (struct buffer *b);
+static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *);
+static void modify_overlay (struct buffer *, EMACS_INT, EMACS_INT);
+static Lisp_Object buffer_lisp_local_variables (struct buffer *);
+
+extern char * emacs_strerror (int);
 
 /* For debugging; temporary.  See set_buffer_internal.  */
 /* Lisp_Object Qlisp_mode, Vcheck_symbol; */
 
 void
-nsberror (spec)
-     Lisp_Object spec;
+nsberror (Lisp_Object spec)
 {
   if (STRINGP (spec))
     error ("No buffer named %s", SDATA (spec));
@@ -248,9 +247,7 @@
    and don't ever QUIT.  */
 
 static Lisp_Object
-assoc_ignore_text_properties (key, list)
-     register Lisp_Object key;
-     Lisp_Object list;
+assoc_ignore_text_properties (register Lisp_Object key, Lisp_Object list)
 {
   register Lisp_Object tail;
   for (tail = list; CONSP (tail); tail = XCDR (tail))
@@ -312,8 +309,7 @@
 }
 
 Lisp_Object
-get_truename_buffer (filename)
-     register Lisp_Object filename;
+get_truename_buffer (register Lisp_Object filename)
 {
   register Lisp_Object tail, buf, tem;
 
@@ -437,9 +433,7 @@
    LIST, but for buffer B.  */
 
 static struct Lisp_Overlay *
-copy_overlays (b, list)
-     struct buffer *b;
-     struct Lisp_Overlay *list;
+copy_overlays (struct buffer *b, struct Lisp_Overlay *list)
 {
   Lisp_Object buffer;
   struct Lisp_Overlay *result = NULL, *tail = NULL;
@@ -489,8 +483,7 @@
    copied.  */
 
 static void
-clone_per_buffer_values (from, to)
-     struct buffer *from, *to;
+clone_per_buffer_values (struct buffer *from, struct buffer *to)
 {
   Lisp_Object to_buffer;
   int offset;
@@ -521,7 +514,7 @@
       PER_BUFFER_VALUE (to, offset) = obj;
     }
 
-  bcopy (from->local_flags, to->local_flags, sizeof to->local_flags);
+  memcpy (to->local_flags, from->local_flags, sizeof to->local_flags);
 
   to->overlays_before = copy_overlays (to, from->overlays_before);
   to->overlays_after = copy_overlays (to, from->overlays_after);
@@ -658,8 +651,7 @@
 }
 
 void
-delete_all_overlays (b)
-     struct buffer *b;
+delete_all_overlays (struct buffer *b)
 {
   Lisp_Object overlay;
 
@@ -689,8 +681,7 @@
    claims it doesn't belong to it.  */
 
 void
-reset_buffer (b)
-     register struct buffer *b;
+reset_buffer (register struct buffer *b)
 {
   b->filename = Qnil;
   b->file_truename = Qnil;
@@ -734,9 +725,7 @@
    we preserve those.  */
 
 static void
-reset_buffer_local_variables (b, permanent_too)
-     register struct buffer *b;
-     int permanent_too;
+reset_buffer_local_variables (register struct buffer *b, int permanent_too)
 {
   register int offset;
   int i;
@@ -993,8 +982,7 @@
    in special slots in the buffer object.  */
 
 static Lisp_Object
-buffer_lisp_local_variables (buf)
-     struct buffer *buf;
+buffer_lisp_local_variables (struct buffer *buf)
 {
   Lisp_Object result = Qnil;
   register Lisp_Object tail;
@@ -1293,7 +1281,7 @@
      (buffer, visible_ok, frame)
      register Lisp_Object buffer, visible_ok, frame;
 {
-  Lisp_Object Fset_buffer_major_mode ();
+  Lisp_Object Fset_buffer_major_mode (Lisp_Object buffer);
   register Lisp_Object tail, buf, notsogood, tem, pred, add_ons;
   notsogood = Qnil;
 
@@ -1618,8 +1606,7 @@
    means that other_buffer is more likely to choose a relevant buffer.  */
 
 void
-record_buffer (buf)
-     Lisp_Object buf;
+record_buffer (Lisp_Object buf)
 {
   register Lisp_Object link, prev;
   Lisp_Object frame;
@@ -1734,8 +1721,7 @@
    If NORECORD is non-nil, don't call record_buffer.  */
 
 Lisp_Object
-switch_to_buffer_1 (buffer_or_name, norecord)
-     Lisp_Object buffer_or_name, norecord;
+switch_to_buffer_1 (Lisp_Object buffer_or_name, Lisp_Object norecord)
 {
   register Lisp_Object buffer;
 
@@ -1831,8 +1817,7 @@
    time, and that increments windows_or_buffers_changed.  */
 
 void
-set_buffer_internal (b)
-     register struct buffer *b;
+set_buffer_internal (register struct buffer *b)
 {
   if (current_buffer != b)
     set_buffer_internal_1 (b);
@@ -1842,8 +1827,7 @@
    This is used by redisplay.  */
 
 void
-set_buffer_internal_1 (b)
-     register struct buffer *b;
+set_buffer_internal_1 (register struct buffer *b)
 {
   register struct buffer *old_buf;
   register Lisp_Object tail;
@@ -1939,8 +1923,7 @@
    This avoids certain things that don't need to be done within redisplay.  */
 
 void
-set_buffer_temp (b)
-     struct buffer *b;
+set_buffer_temp (struct buffer *b)
 {
   register struct buffer *old_buf;
 
@@ -2019,8 +2002,7 @@
 /* Set the current buffer to BUFFER provided it is alive.  */
 
 Lisp_Object
-set_buffer_if_live (buffer)
-     Lisp_Object buffer;
+set_buffer_if_live (Lisp_Object buffer)
 {
   if (! NILP (XBUFFER (buffer)->name))
     Fset_buffer (buffer);
@@ -2120,8 +2102,7 @@
 }
 
 void
-validate_region (b, e)
-     register Lisp_Object *b, *e;
+validate_region (register Lisp_Object *b, register Lisp_Object *e)
 {
   CHECK_NUMBER_COERCE_MARKER (*b);
   CHECK_NUMBER_COERCE_MARKER (*e);
@@ -2141,8 +2122,7 @@
    and return the adjusted position.  */
 
 static int
-advance_to_char_boundary (byte_pos)
-     int byte_pos;
+advance_to_char_boundary (int byte_pos)
 {
   int c;
 
@@ -2175,7 +2155,7 @@
 }
 
 #ifdef REL_ALLOC
-extern void r_alloc_reset_variable P_ ((POINTER_TYPE *, POINTER_TYPE *));
+extern void r_alloc_reset_variable (POINTER_TYPE *, POINTER_TYPE *);
 #endif /* REL_ALLOC */
 
 DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
@@ -2644,8 +2624,7 @@
    for their current values.  */
 
 static void
-swap_out_buffer_local_variables (b)
-     struct buffer *b;
+swap_out_buffer_local_variables (struct buffer *b)
 {
   Lisp_Object oalist, alist, buffer;
 
@@ -2690,14 +2669,8 @@
    default (BEGV or ZV).  */
 
 int
-overlays_at (pos, extend, vec_ptr, len_ptr, next_ptr, prev_ptr, change_req)
-     EMACS_INT pos;
-     int extend;
-     Lisp_Object **vec_ptr;
-     int *len_ptr;
-     EMACS_INT *next_ptr;
-     EMACS_INT *prev_ptr;
-     int change_req;
+overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, int *len_ptr,
+	     EMACS_INT *next_ptr, EMACS_INT *prev_ptr, int change_req)
 {
   Lisp_Object overlay, start, end;
   struct Lisp_Overlay *tail;
@@ -2835,13 +2808,8 @@
    But we still return the total number of overlays.  */
 
 static int
-overlays_in (beg, end, extend, vec_ptr, len_ptr, next_ptr, prev_ptr)
-     int beg, end;
-     int extend;
-     Lisp_Object **vec_ptr;
-     int *len_ptr;
-     int *next_ptr;
-     int *prev_ptr;
+overlays_in (int beg, int end, int extend, Lisp_Object **vec_ptr, int *len_ptr,
+	     int *next_ptr, int *prev_ptr)
 {
   Lisp_Object overlay, ostart, oend;
   struct Lisp_Overlay *tail;
@@ -2962,8 +2930,7 @@
    `mouse-face' property overlapping OVERLAY.  */
 
 int
-mouse_face_overlay_overlaps (overlay)
-     Lisp_Object overlay;
+mouse_face_overlay_overlaps (Lisp_Object overlay)
 {
   int start = OVERLAY_POSITION (OVERLAY_START (overlay));
   int end = OVERLAY_POSITION (OVERLAY_END (overlay));
@@ -2992,8 +2959,7 @@
 
 /* Fast function to just test if we're at an overlay boundary.  */
 int
-overlay_touches_p (pos)
-     int pos;
+overlay_touches_p (int pos)
 {
   Lisp_Object overlay;
   struct Lisp_Overlay *tail;
@@ -3038,8 +3004,7 @@
 };
 
 static int
-compare_overlays (v1, v2)
-     const void *v1, *v2;
+compare_overlays (const void *v1, const void *v2)
 {
   const struct sortvec *s1 = (const struct sortvec *) v1;
   const struct sortvec *s2 = (const struct sortvec *) v2;
@@ -3056,10 +3021,7 @@
    The return value is the new size; this may be smaller than the original
    size if some of the overlays were invalid or were window-specific.  */
 int
-sort_overlays (overlay_vec, noverlays, w)
-     Lisp_Object *overlay_vec;
-     int noverlays;
-     struct window *w;
+sort_overlays (Lisp_Object *overlay_vec, int noverlays, struct window *w)
 {
   int i, j;
   struct sortvec *sortvec;
@@ -3139,8 +3101,7 @@
 
 /* A comparison function suitable for passing to qsort.  */
 static int
-cmp_for_strings (as1, as2)
-     char *as1, *as2;
+cmp_for_strings (const void *as1, const void *as2)
 {
   struct sortstr *s1 = (struct sortstr *)as1;
   struct sortstr *s2 = (struct sortstr *)as2;
@@ -3152,10 +3113,7 @@
 }
 
 static void
-record_overlay_string (ssl, str, str2, pri, size)
-     struct sortstrlist *ssl;
-     Lisp_Object str, str2, pri;
-     int size;
+record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str2, Lisp_Object pri, int size)
 {
   int nbytes;
 
@@ -3211,10 +3169,7 @@
    subsequent calls.  */
 
 int
-overlay_strings (pos, w, pstr)
-     EMACS_INT pos;
-     struct window *w;
-     unsigned char **pstr;
+overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
 {
   Lisp_Object overlay, window, str;
   struct Lisp_Overlay *ov;
@@ -3337,9 +3292,7 @@
 /* Shift overlays in BUF's overlay lists, to center the lists at POS.  */
 
 void
-recenter_overlay_lists (buf, pos)
-     struct buffer *buf;
-     EMACS_INT pos;
+recenter_overlay_lists (struct buffer *buf, EMACS_INT pos)
 {
   Lisp_Object overlay, beg, end;
   struct Lisp_Overlay *prev, *tail, *next;
@@ -3488,9 +3441,7 @@
 }
 
 void
-adjust_overlays_for_insert (pos, length)
-     EMACS_INT pos;
-     EMACS_INT length;
+adjust_overlays_for_insert (EMACS_INT pos, EMACS_INT length)
 {
   /* After an insertion, the lists are still sorted properly,
      but we may need to update the value of the overlay center.  */
@@ -3499,9 +3450,7 @@
 }
 
 void
-adjust_overlays_for_delete (pos, length)
-     EMACS_INT pos;
-     EMACS_INT length;
+adjust_overlays_for_delete (EMACS_INT pos, EMACS_INT length)
 {
   if (current_buffer->overlay_center < pos)
     /* The deletion was to our right.  No change needed; the before- and
@@ -3526,8 +3475,7 @@
    Such an overlay might even have negative size at this point.
    If so, we'll make the overlay empty. */
 void
-fix_start_end_in_overlays (start, end)
-     register int start, end;
+fix_start_end_in_overlays (register int start, register int end)
 {
   Lisp_Object overlay;
   struct Lisp_Overlay *before_list, *after_list;
@@ -3673,9 +3621,7 @@
    was at PREV, and now is at POS.  */
 
 void
-fix_overlays_before (bp, prev, pos)
-     struct buffer *bp;
-     EMACS_INT prev, pos;
+fix_overlays_before (struct buffer *bp, EMACS_INT prev, EMACS_INT pos)
 {
   /* If parent is nil, replace overlays_before; otherwise, parent->next.  */
   struct Lisp_Overlay *tail = bp->overlays_before, *parent = NULL, *right_pair;
@@ -3841,9 +3787,7 @@
 /* Mark a section of BUF as needing redisplay because of overlays changes.  */
 
 static void
-modify_overlay (buf, start, end)
-     struct buffer *buf;
-     EMACS_INT start, end;
+modify_overlay (struct buffer *buf, EMACS_INT start, EMACS_INT end)
 {
   if (start > end)
     {
@@ -3870,11 +3814,10 @@
 }
 
 
-Lisp_Object Fdelete_overlay ();
+Lisp_Object Fdelete_overlay (Lisp_Object overlay);
 
 static struct Lisp_Overlay *
-unchain_overlay (list, overlay)
-     struct Lisp_Overlay *list, *overlay;
+unchain_overlay (struct Lisp_Overlay *list, struct Lisp_Overlay *overlay)
 {
   struct Lisp_Overlay *tmp, *prev;
   for (tmp = list, prev = NULL; tmp; prev = tmp, tmp = tmp->next)
@@ -4333,8 +4276,7 @@
    to the end of last_overlay_modification_hooks.  */
 
 static void
-add_overlay_mod_hooklist (functionlist, overlay)
-     Lisp_Object functionlist, overlay;
+add_overlay_mod_hooklist (Lisp_Object functionlist, Lisp_Object overlay)
 {
   int oldsize = XVECTOR (last_overlay_modification_hooks)->size;
 
@@ -4362,10 +4304,8 @@
    and the length of deleted or replaced old text.  */
 
 void
-report_overlay_modification (start, end, after, arg1, arg2, arg3)
-     Lisp_Object start, end;
-     int after;
-     Lisp_Object arg1, arg2, arg3;
+report_overlay_modification (Lisp_Object start, Lisp_Object end, int after,
+			     Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
 {
   Lisp_Object prop, overlay;
   struct Lisp_Overlay *tail;
@@ -4473,8 +4413,8 @@
     Lisp_Object *copy = (Lisp_Object *) alloca (size * sizeof (Lisp_Object));
     int i;
 
-    bcopy (XVECTOR (last_overlay_modification_hooks)->contents,
-	   copy, size * sizeof (Lisp_Object));
+    memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents,
+	    size * sizeof (Lisp_Object));
     gcpro1.var = copy;
     gcpro1.nvars = size;
 
@@ -4490,10 +4430,8 @@
 }
 
 static void
-call_overlay_mod_hooks (list, overlay, after, arg1, arg2, arg3)
-     Lisp_Object list, overlay;
-     int after;
-     Lisp_Object arg1, arg2, arg3;
+call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, int after,
+			Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
 {
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
 
@@ -4513,8 +4451,7 @@
 /* Delete any zero-sized overlays at position POS, if the `evaporate'
    property is set.  */
 void
-evaporate_overlays (pos)
-     EMACS_INT pos;
+evaporate_overlays (EMACS_INT pos)
 {
   Lisp_Object overlay, hit_list;
   struct Lisp_Overlay *tail;
@@ -4552,9 +4489,7 @@
    in the slot with offset OFFSET.  */
 
 void
-buffer_slot_type_mismatch (newval, type)
-     Lisp_Object newval;
-     int type;
+buffer_slot_type_mismatch (Lisp_Object newval, int type)
 {
   Lisp_Object predicate;
 
@@ -4693,13 +4628,13 @@
 
 /* Function prototypes.  */
 
-static int mmap_free_1 P_ ((struct mmap_region *));
-static int mmap_enlarge P_ ((struct mmap_region *, int));
-static struct mmap_region *mmap_find P_ ((POINTER_TYPE *, POINTER_TYPE *));
-static POINTER_TYPE *mmap_alloc P_ ((POINTER_TYPE **, size_t));
-static POINTER_TYPE *mmap_realloc P_ ((POINTER_TYPE **, size_t));
-static void mmap_free P_ ((POINTER_TYPE **ptr));
-static void mmap_init P_ ((void));
+static int mmap_free_1 (struct mmap_region *);
+static int mmap_enlarge (struct mmap_region *, int);
+static struct mmap_region *mmap_find (POINTER_TYPE *, POINTER_TYPE *);
+static POINTER_TYPE *mmap_alloc (POINTER_TYPE **, size_t);
+static POINTER_TYPE *mmap_realloc (POINTER_TYPE **, size_t);
+static void mmap_free (POINTER_TYPE **ptr);
+static void mmap_init (void);
 
 
 /* Return a region overlapping address range START...END, or null if
@@ -4942,7 +4877,7 @@
 	    }
 	  else if (mmap_alloc (var, nbytes))
 	    {
-	      bcopy (old_ptr, *var, r->nbytes_specified);
+	      memcpy (*var, old_ptr, r->nbytes_specified);
 	      mmap_free_1 (MMAP_REGION (old_ptr));
 	      result = *var;
 	      r = MMAP_REGION (result);
@@ -5032,18 +4967,16 @@
  ***********************************************************************/
 
 #ifdef REL_ALLOC
-extern POINTER_TYPE *r_alloc P_ ((POINTER_TYPE **, size_t));
-extern POINTER_TYPE *r_re_alloc P_ ((POINTER_TYPE **, size_t));
-extern void r_alloc_free P_ ((POINTER_TYPE **ptr));
+extern POINTER_TYPE *r_alloc (POINTER_TYPE **, size_t);
+extern POINTER_TYPE *r_re_alloc (POINTER_TYPE **, size_t);
+extern void r_alloc_free (POINTER_TYPE **ptr);
 #endif /* REL_ALLOC */
 
 
 /* Allocate NBYTES bytes for buffer B's text buffer.  */
 
 static void
-alloc_buffer_text (b, nbytes)
-     struct buffer *b;
-     size_t nbytes;
+alloc_buffer_text (struct buffer *b, size_t nbytes)
 {
   POINTER_TYPE *p;
 
@@ -5098,8 +5031,7 @@
 /* Free buffer B's text buffer.  */
 
 static void
-free_buffer_text (b)
-     struct buffer *b;
+free_buffer_text (struct buffer *b)
 {
   BLOCK_INPUT;
 
@@ -5122,11 +5054,11 @@
  ***********************************************************************/
 
 void
-init_buffer_once ()
+init_buffer_once (void)
 {
   int idx;
 
-  bzero (buffer_permanent_local_flags, sizeof buffer_permanent_local_flags);
+  memset (buffer_permanent_local_flags, 0, sizeof buffer_permanent_local_flags);
 
   /* Make sure all markable slots in buffer_defaults
      are initialized reasonably, so mark_buffer won't choke.  */
@@ -5214,7 +5146,7 @@
   if (sizeof (EMACS_INT) != sizeof (Lisp_Object)) abort ();
 
   /* 0 means not a lisp var, -1 means always local, else mask */
-  bzero (&buffer_local_flags, sizeof buffer_local_flags);
+  memset (&buffer_local_flags, 0, sizeof buffer_local_flags);
   XSETINT (buffer_local_flags.filename, -1);
   XSETINT (buffer_local_flags.directory, -1);
   XSETINT (buffer_local_flags.backed_up, -1);
@@ -5318,7 +5250,7 @@
 }
 
 void
-init_buffer ()
+init_buffer (void)
 {
   char *pwd;
   Lisp_Object temp;
@@ -5402,12 +5334,8 @@
   } while (0)
 
 static void
-defvar_per_buffer (bo_fwd, namestring, address, type, doc)
-     struct Lisp_Buffer_Objfwd *bo_fwd;
-     char *namestring;
-     Lisp_Object *address;
-     Lisp_Object type;
-     char *doc;
+defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, char *namestring,
+		   Lisp_Object *address, Lisp_Object type, char *doc)
 {
   struct Lisp_Symbol *sym;
   int offset;
@@ -5435,7 +5363,7 @@
 
 /* initialize the buffer routines */
 void
-syms_of_buffer ()
+syms_of_buffer (void)
 {
   staticpro (&last_overlay_modification_hooks);
   last_overlay_modification_hooks
@@ -6338,7 +6266,7 @@
 }
 
 void
-keys_of_buffer ()
+keys_of_buffer (void)
 {
   initial_define_key (control_x_map, 'b', "switch-to-buffer");
   initial_define_key (control_x_map, 'k', "kill-buffer");
--- a/src/buffer.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/buffer.h	Thu Jul 08 17:09:35 2010 +0900
@@ -225,12 +225,12 @@
 #define BUF_TEMP_SET_PT(buffer, position) \
   (temp_set_point ((buffer), (position)))
 
-extern void set_point P_ ((EMACS_INT));
-extern INLINE void temp_set_point P_ ((struct buffer *, EMACS_INT));
-extern void set_point_both P_ ((EMACS_INT, EMACS_INT));
-extern INLINE void temp_set_point_both P_ ((struct buffer *,
-					    EMACS_INT, EMACS_INT));
-extern void enlarge_buffer_text P_ ((struct buffer *, EMACS_INT));
+extern void set_point (EMACS_INT);
+extern INLINE void temp_set_point (struct buffer *, EMACS_INT);
+extern void set_point_both (EMACS_INT, EMACS_INT);
+extern INLINE void temp_set_point_both (struct buffer *,
+                                        EMACS_INT, EMACS_INT);
+extern void enlarge_buffer_text (struct buffer *, EMACS_INT);
 
 
 /* Macros for setting the BEGV, ZV or PT of a given buffer.
@@ -857,23 +857,23 @@
 
 extern struct buffer buffer_local_symbols;
 
-extern void delete_all_overlays P_ ((struct buffer *));
-extern void reset_buffer P_ ((struct buffer *));
-extern void evaporate_overlays P_ ((EMACS_INT));
-extern int overlays_at P_ ((EMACS_INT pos, int extend, Lisp_Object **vec_ptr,
-			    int *len_ptr, EMACS_INT *next_ptr,
-			    EMACS_INT *prev_ptr, int change_req));
-extern int sort_overlays P_ ((Lisp_Object *, int, struct window *));
-extern void recenter_overlay_lists P_ ((struct buffer *, EMACS_INT));
-extern int overlay_strings P_ ((EMACS_INT, struct window *, unsigned char **));
-extern void validate_region P_ ((Lisp_Object *, Lisp_Object *));
-extern void set_buffer_internal P_ ((struct buffer *));
-extern void set_buffer_internal_1 P_ ((struct buffer *));
-extern void set_buffer_temp P_ ((struct buffer *));
-extern void record_buffer P_ ((Lisp_Object));
-extern void buffer_slot_type_mismatch P_ ((Lisp_Object, int)) NO_RETURN;
-extern void fix_overlays_before P_ ((struct buffer *, EMACS_INT, EMACS_INT));
-extern void mmap_set_vars P_ ((int));
+extern void delete_all_overlays (struct buffer *);
+extern void reset_buffer (struct buffer *);
+extern void evaporate_overlays (EMACS_INT);
+extern int overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr,
+                        int *len_ptr, EMACS_INT *next_ptr,
+                        EMACS_INT *prev_ptr, int change_req);
+extern int sort_overlays (Lisp_Object *, int, struct window *);
+extern void recenter_overlay_lists (struct buffer *, EMACS_INT);
+extern int overlay_strings (EMACS_INT, struct window *, unsigned char **);
+extern void validate_region (Lisp_Object *, Lisp_Object *);
+extern void set_buffer_internal (struct buffer *);
+extern void set_buffer_internal_1 (struct buffer *);
+extern void set_buffer_temp (struct buffer *);
+extern void record_buffer (Lisp_Object);
+extern void buffer_slot_type_mismatch (Lisp_Object, int) NO_RETURN;
+extern void fix_overlays_before (struct buffer *, EMACS_INT, EMACS_INT);
+extern void mmap_set_vars (int);
 
 /* Get overlays at POSN into array OVERLAYS with NOVERLAYS elements.
    If NEXTP is non-NULL, return next overlay there.
--- a/src/bytecode.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/bytecode.c	Thu Jul 08 17:09:35 2010 +0900
@@ -272,7 +272,7 @@
 /* Mark objects on byte_stack_list.  Called during GC.  */
 
 void
-mark_byte_stack ()
+mark_byte_stack (void)
 {
   struct byte_stack *stack;
   Lisp_Object *obj;
@@ -301,7 +301,7 @@
    counters.  Called when GC has completed.  */
 
 void
-unmark_byte_stack ()
+unmark_byte_stack (void)
 {
   struct byte_stack *stack;
 
@@ -1678,7 +1678,7 @@
 }
 
 void
-syms_of_bytecode ()
+syms_of_bytecode (void)
 {
   Qbytecode = intern_c_string ("byte-code");
   staticpro (&Qbytecode);
--- a/src/callint.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/callint.c	Thu Jul 08 17:09:35 2010 +0900
@@ -30,7 +30,7 @@
 #include "keymap.h"
 
 #ifdef HAVE_INDEX
-extern char *index P_ ((const char *, int));
+extern char *index (const char *, int);
 #endif
 
 extern Lisp_Object Qcursor_in_echo_area;
@@ -140,8 +140,7 @@
 /* Quotify EXP: if EXP is constant, return it.
    If EXP is not constant, return (quote EXP).  */
 Lisp_Object
-quotify_arg (exp)
-     register Lisp_Object exp;
+quotify_arg (register Lisp_Object exp)
 {
   if (!INTEGERP (exp) && !STRINGP (exp)
       && !NILP (exp) && !EQ (exp, Qt))
@@ -152,8 +151,7 @@
 
 /* Modify EXP by quotifying each element (except the first).  */
 Lisp_Object
-quotify_args (exp)
-     Lisp_Object exp;
+quotify_args (Lisp_Object exp)
 {
   register Lisp_Object tail;
   Lisp_Object next;
@@ -169,8 +167,7 @@
     = {"", "point", "mark", "region-beginning", "region-end"};
 
 static void
-check_mark (for_region)
-     int for_region;
+check_mark (int for_region)
 {
   Lisp_Object tem;
   tem = Fmarker_buffer (current_buffer->mark);
@@ -191,8 +188,7 @@
    of VALUES to do its job.  */
 
 static void
-fix_command (input, values)
-     Lisp_Object input, values;
+fix_command (Lisp_Object input, Lisp_Object values)
 {
   if (CONSP (input))
     {
@@ -352,8 +348,7 @@
       /* Make a copy of string so that if a GC relocates specs,
 	 `string' will still be valid.  */
       string = (unsigned char *) alloca (SBYTES (specs) + 1);
-      bcopy (SDATA (specs), string,
-	     SBYTES (specs) + 1);
+      memcpy (string, SDATA (specs), SBYTES (specs) + 1);
     }
   else
     {
@@ -897,7 +892,7 @@
 }
 
 void
-syms_of_callint ()
+syms_of_callint (void)
 {
   point_marker = Fmake_marker ();
   staticpro (&point_marker);
--- a/src/callproc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/callproc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -137,8 +137,7 @@
 EXFUN (Fgetenv_internal, 2);
 
 static Lisp_Object
-call_process_kill (fdpid)
-     Lisp_Object fdpid;
+call_process_kill (Lisp_Object fdpid)
 {
   emacs_close (XFASTINT (Fcar (fdpid)));
   EMACS_KILLPG (XFASTINT (Fcdr (fdpid)), SIGKILL);
@@ -147,8 +146,7 @@
 }
 
 Lisp_Object
-call_process_cleanup (arg)
-     Lisp_Object arg;
+call_process_cleanup (Lisp_Object arg)
 {
   Lisp_Object fdpid = Fcdr (arg);
 #if defined (MSDOS)
@@ -777,10 +775,8 @@
 				  PT_BYTE + process_coding.produced);
 		carryover = process_coding.carryover_bytes;
 		if (carryover > 0)
-		  /* As CARRYOVER should not be that large, we had
-		     better avoid overhead of bcopy.  */
-		  BCOPY_SHORT (process_coding.carryover, buf,
-			       process_coding.carryover_bytes);
+		  memcpy (buf, process_coding.carryover,
+			  process_coding.carryover_bytes);
 	      }
 	  }
 
@@ -848,8 +844,7 @@
 }
 
 static Lisp_Object
-delete_temp_file (name)
-     Lisp_Object name;
+delete_temp_file (Lisp_Object name)
 {
   /* Suppress jka-compr handling, etc.  */
   int count = SPECPDL_INDEX ();
@@ -919,7 +914,7 @@
 
   pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir);
   tempfile = (char *) alloca (SBYTES (pattern) + 1);
-  bcopy (SDATA (pattern), tempfile, SBYTES (pattern) + 1);
+  memcpy (tempfile, SDATA (pattern), SBYTES (pattern) + 1);
   coding_systems = Qt;
 
 #ifdef HAVE_MKSTEMP
@@ -997,7 +992,7 @@
   RETURN_UNGCPRO (unbind_to (count, Fcall_process (nargs, args)));
 }
 
-static int relocate_fd ();
+static int relocate_fd (int fd, int minfd);
 
 static char **
 add_env (char **env, char **new_env, char *string)
@@ -1052,11 +1047,7 @@
    executable directory by the parent.  */
 
 int
-child_setup (in, out, err, new_argv, set_pgrp, current_dir)
-     int in, out, err;
-     register char **new_argv;
-     int set_pgrp;
-     Lisp_Object current_dir;
+child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, Lisp_Object current_dir)
 {
   char **env;
   char *pwd_var;
@@ -1106,8 +1097,8 @@
     pwd_var = (char *) alloca (i + 6);
 #endif
     temp = pwd_var + 4;
-    bcopy ("PWD=", pwd_var, 4);
-    bcopy (SDATA (current_dir), temp, i);
+    memcpy (pwd_var, "PWD=", 4);
+    memcpy (temp, SDATA (current_dir), i);
     if (!IS_DIRECTORY_SEP (temp[i - 1])) temp[i++] = DIRECTORY_SEP;
     temp[i] = 0;
 
@@ -1295,8 +1286,7 @@
 /* Move the file descriptor FD so that its number is not less than MINFD.
    If the file descriptor is moved at all, the original is freed.  */
 static int
-relocate_fd (fd, minfd)
-     int fd, minfd;
+relocate_fd (int fd, int minfd)
 {
   if (fd >= minfd)
     return fd;
@@ -1322,12 +1312,7 @@
 }
 
 static int
-getenv_internal_1 (var, varlen, value, valuelen, env)
-     char *var;
-     int varlen;
-     char **value;
-     int *valuelen;
-     Lisp_Object env;
+getenv_internal_1 (char *var, int varlen, char **value, int *valuelen, Lisp_Object env)
 {
   for (; CONSP (env); env = XCDR (env))
     {
@@ -1338,7 +1323,7 @@
 	  /* NT environment variables are case insensitive.  */
 	  && ! strnicmp (SDATA (entry), var, varlen)
 #else  /* not WINDOWSNT */
-	  && ! bcmp (SDATA (entry), var, varlen)
+	  && ! memcmp (SDATA (entry), var, varlen)
 #endif /* not WINDOWSNT */
 	  )
 	{
@@ -1361,12 +1346,7 @@
 }
 
 static int
-getenv_internal (var, varlen, value, valuelen, frame)
-     char *var;
-     int varlen;
-     char **value;
-     int *valuelen;
-     Lisp_Object frame;
+getenv_internal (char *var, int varlen, char **value, int *valuelen, Lisp_Object frame)
 {
   /* Try to find VAR in Vprocess_environment first.  */
   if (getenv_internal_1 (var, varlen, value, valuelen,
@@ -1428,8 +1408,7 @@
 /* A version of getenv that consults the Lisp environment lists,
    easily callable from C.  */
 char *
-egetenv (var)
-     char *var;
+egetenv (char *var)
 {
   char *value;
   int valuelen;
@@ -1444,7 +1423,7 @@
 /* This is run before init_cmdargs.  */
 
 void
-init_callproc_1 ()
+init_callproc_1 (void)
 {
   char *data_dir = egetenv ("EMACSDATA");
   char *doc_dir = egetenv ("EMACSDOC");
@@ -1466,7 +1445,7 @@
 /* This is run after init_cmdargs, when Vinstallation_directory is valid.  */
 
 void
-init_callproc ()
+init_callproc (void)
 {
   char *data_dir = egetenv ("EMACSDATA");
 
@@ -1555,7 +1534,7 @@
 }
 
 void
-set_initial_environment ()
+set_initial_environment (void)
 {
   register char **envp;
 #ifndef CANNOT_DUMP
@@ -1575,7 +1554,7 @@
 }
 
 void
-syms_of_callproc ()
+syms_of_callproc (void)
 {
 #ifdef DOS_NT
   Qbuffer_file_type = intern ("buffer-file-type");
--- a/src/casefiddle.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/casefiddle.c	Thu Jul 08 17:09:35 2010 +0900
@@ -33,9 +33,7 @@
 Lisp_Object Qidentity;
 
 Lisp_Object
-casify_object (flag, obj)
-     enum case_action flag;
-     Lisp_Object obj;
+casify_object (enum case_action flag, Lisp_Object obj)
 {
   register int c, c1;
   register int inword = flag == CASE_DOWN;
@@ -130,7 +128,7 @@
 	      unsigned char *old_dst = dst;
 	      o_size += o_size;	/* Probably overkill, but extremely rare.  */
 	      SAFE_ALLOCA (dst, void *, o_size);
-	      bcopy (old_dst, dst, o - old_dst);
+	      memcpy (dst, old_dst, o - old_dst);
 	      o = dst + (o - old_dst);
 	    }
 	  c = STRING_CHAR_AND_LENGTH (SDATA (obj) + i_byte, len);
@@ -200,9 +198,7 @@
    b and e specify range of buffer to operate on. */
 
 void
-casify_region (flag, b, e)
-     enum case_action flag;
-     Lisp_Object b, e;
+casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e)
 {
   register int c;
   register int inword = flag == CASE_DOWN;
@@ -358,9 +354,7 @@
 }
 
 static Lisp_Object
-operate_on_word (arg, newpoint)
-     Lisp_Object arg;
-     EMACS_INT *newpoint;
+operate_on_word (Lisp_Object arg, EMACS_INT *newpoint)
 {
   Lisp_Object val;
   int farend;
@@ -427,7 +421,7 @@
 }
 
 void
-syms_of_casefiddle ()
+syms_of_casefiddle (void)
 {
   Qidentity = intern_c_string ("identity");
   staticpro (&Qidentity);
@@ -445,7 +439,7 @@
 }
 
 void
-keys_of_casefiddle ()
+keys_of_casefiddle (void)
 {
   initial_define_key (control_x_map, Ctl('U'), "upcase-region");
   Fput (intern ("upcase-region"), Qdisabled, Qt);
--- a/src/casetab.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/casetab.c	Thu Jul 08 17:09:35 2010 +0900
@@ -34,9 +34,9 @@
 int case_temp1;
 Lisp_Object case_temp2;
 
-static void set_canon ();
-static void set_identity ();
-static void shuffle ();
+static void set_canon (Lisp_Object case_table, Lisp_Object range, Lisp_Object elt);
+static void set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt);
+static void shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt);
 
 DEFUN ("case-table-p", Fcase_table_p, Scase_table_p, 1, 1, 0,
        doc: /* Return t if OBJECT is a case table.
@@ -63,8 +63,7 @@
 }
 
 static Lisp_Object
-check_case_table (obj)
-     Lisp_Object obj;
+check_case_table (Lisp_Object obj)
 {
   CHECK_TYPE (!NILP (Fcase_table_p (obj)), Qcase_table_p, obj);
   return (obj);
@@ -85,7 +84,7 @@
   return Vascii_downcase_table;
 }
 
-static Lisp_Object set_case_table ();
+static Lisp_Object set_case_table (Lisp_Object table, int standard);
 
 DEFUN ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0,
        doc: /* Select a new case table for the current buffer.
@@ -120,9 +119,7 @@
 }
 
 static Lisp_Object
-set_case_table (table, standard)
-     Lisp_Object table;
-     int standard;
+set_case_table (Lisp_Object table, int standard)
 {
   Lisp_Object up, canon, eqv;
 
@@ -184,8 +181,7 @@
    CASE_TABLE.  */
 
 static void
-set_canon (case_table, range, elt)
-     Lisp_Object case_table, range, elt;
+set_canon (Lisp_Object case_table, Lisp_Object range, Lisp_Object elt)
 {
   Lisp_Object up = XCHAR_TABLE (case_table)->extras[0];
   Lisp_Object canon = XCHAR_TABLE (case_table)->extras[1];
@@ -200,8 +196,7 @@
    character.  This is called in map_char_table.  */
 
 static void
-set_identity (table, c, elt)
-     Lisp_Object table, c, elt;
+set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
 {
   if (NATNUMP (elt))
     {
@@ -225,8 +220,7 @@
    operated.  */
 
 static void
-shuffle (table, c, elt)
-     Lisp_Object table, c, elt;
+shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
 {
   if (NATNUMP (elt))
     {
@@ -250,7 +244,7 @@
 }
 
 void
-init_casetab_once ()
+init_casetab_once (void)
 {
   register int i;
   Lisp_Object down, up;
@@ -296,7 +290,7 @@
 }
 
 void
-syms_of_casetab ()
+syms_of_casetab (void)
 {
   Qcase_table_p = intern_c_string ("case-table-p");
   staticpro (&Qcase_table_p);
--- a/src/category.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/category.c	Thu Jul 08 17:09:35 2010 +0900
@@ -59,11 +59,10 @@
 
 /* Category set staff.  */
 
-static Lisp_Object hash_get_category_set P_ ((Lisp_Object, Lisp_Object));
+static Lisp_Object hash_get_category_set (Lisp_Object, Lisp_Object);
 
 static Lisp_Object
-hash_get_category_set (table, category_set)
-     Lisp_Object table, category_set;
+hash_get_category_set (Lisp_Object table, Lisp_Object category_set)
 {
   Lisp_Object val;
   struct Lisp_Hash_Table *h;
@@ -117,7 +116,7 @@
 
 /* Category staff.  */
 
-Lisp_Object check_category_table ();
+Lisp_Object check_category_table (Lisp_Object table);
 
 DEFUN ("define-category", Fdefine_category, Sdefine_category, 2, 3, 0,
        doc: /* Define CATEGORY as a category which is described by DOCSTRING.
@@ -196,8 +195,7 @@
    wrong-type-argument.  */
 
 Lisp_Object
-check_category_table (table)
-     Lisp_Object table;
+check_category_table (Lisp_Object table)
 {
   if (NILP (table))
     return current_buffer->category_table;
@@ -224,8 +222,7 @@
 
 
 static void
-copy_category_entry (table, c, val)
-     Lisp_Object table, c, val;
+copy_category_entry (Lisp_Object table, Lisp_Object c, Lisp_Object val)
 {
   val = Fcopy_sequence (val);
   if (CONSP (c))
@@ -240,8 +237,7 @@
    binding TABLE to a sub char table.  */
 
 Lisp_Object
-copy_category_table (table)
-     Lisp_Object table;
+copy_category_table (Lisp_Object table)
 {
   table = copy_char_table (table);
 
@@ -304,8 +300,7 @@
 
 
 Lisp_Object
-char_category_set (c)
-     int c;
+char_category_set (int c)
 {
   return CHAR_TABLE_REF (current_buffer->category_table, c);
 }
@@ -344,8 +339,7 @@
 }
 
 void
-set_category_set (category_set, category, val)
-     Lisp_Object category_set, category, val;
+set_category_set (Lisp_Object category_set, Lisp_Object category, Lisp_Object val)
 {
   do {
     int idx = XINT (category) / 8;
@@ -420,8 +414,7 @@
    directly.  */
 
 int
-word_boundary_p (c1, c2)
-     int c1, c2;
+word_boundary_p (int c1, int c2)
 {
   Lisp_Object category_set1, category_set2;
   Lisp_Object tail;
@@ -466,7 +459,7 @@
 
 
 void
-init_category_once ()
+init_category_once (void)
 {
   /* This has to be done here, before we call Fmake_char_table.  */
   Qcategory_table = intern_c_string ("category-table");
@@ -489,7 +482,7 @@
 }
 
 void
-syms_of_category ()
+syms_of_category (void)
 {
   Qcategoryp = intern_c_string ("categoryp");
   staticpro (&Qcategoryp);
--- a/src/category.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/category.h	Thu Jul 08 17:09:35 2010 +0900
@@ -113,8 +113,8 @@
   (!(SINGLE_BYTE_CHAR_P (c1) && SINGLE_BYTE_CHAR_P (c2))	\
    && word_boundary_p (c1, c2))
 
-extern int word_boundary_p P_ ((int, int));
-extern void set_category_set P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
+extern int word_boundary_p (int, int);
+extern void set_category_set (Lisp_Object, Lisp_Object, Lisp_Object);
 
 /* arch-tag: 309dfe83-c3e2-4d22-8e81-faae5aece0ff
    (do not change this comment) */
--- a/src/ccl.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/ccl.c	Thu Jul 08 17:09:35 2010 +0900
@@ -862,11 +862,7 @@
 static struct ccl_prog_stack ccl_prog_stack_struct[256];
 
 void
-ccl_driver (ccl, source, destination, src_size, dst_size, charset_list)
-     struct ccl_program *ccl;
-     int *source, *destination;
-     int src_size, dst_size;
-     Lisp_Object charset_list;
+ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size, int dst_size, Lisp_Object charset_list)
 {
   register int *reg = ccl->reg;
   register int ic = ccl->ic;
@@ -1719,7 +1715,7 @@
 	    msglen = strlen (msg);
 	    if (dst + msglen <= (dst_bytes ? dst_end : src))
 	      {
-		bcopy (msg, dst, msglen);
+		memcpy (dst, msg, msglen);
 		dst += msglen;
 	      }
 
@@ -1732,7 +1728,7 @@
 		msglen = strlen (msg);
 		if (dst + msglen > (dst_bytes ? dst_end : src))
 		  break;
-		bcopy (msg, dst, msglen);
+		memcpy (dst, msg, msglen);
 		dst += msglen;
 	      }
 	    goto ccl_finish;
@@ -1765,7 +1761,7 @@
 	  int i = src_end - src;
 	  if (dst_bytes && (dst_end - dst) < i)
 	    i = dst_end - dst;
-	  bcopy (src, dst, i);
+	  memcpy (dst, src, i);
 	  src += i;
 	  dst += i;
 #else
@@ -1795,8 +1791,7 @@
    or nil if CCL contains invalid data.  */
 
 static Lisp_Object
-resolve_symbol_ccl_program (ccl)
-     Lisp_Object ccl;
+resolve_symbol_ccl_program (Lisp_Object ccl)
 {
   int i, veclen, unresolved = 0;
   Lisp_Object result, contents, val;
@@ -1867,9 +1862,7 @@
    symbols, return Qnil.  */
 
 static Lisp_Object
-ccl_get_compiled_code (ccl_prog, idx)
-     Lisp_Object ccl_prog;
-     int *idx;
+ccl_get_compiled_code (Lisp_Object ccl_prog, int *idx)
 {
   Lisp_Object val, slot;
 
@@ -1910,9 +1903,7 @@
 
    If CCL_PROG is nil, we just reset the structure pointed by CCL.  */
 int
-setup_ccl_program (ccl, ccl_prog)
-     struct ccl_program *ccl;
-     Lisp_Object ccl_prog;
+setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog)
 {
   int i;
 
@@ -1953,8 +1944,7 @@
 /* Check if CCL is updated or not.  If not, re-setup members of CCL.  */
 
 int
-check_ccl_update (ccl)
-     struct ccl_program *ccl;
+check_ccl_update (struct ccl_program *ccl)
 {
   Lisp_Object slot, ccl_prog;
 
@@ -2315,7 +2305,7 @@
 
 
 void
-syms_of_ccl ()
+syms_of_ccl (void)
 {
   staticpro (&Vccl_program_table);
   Vccl_program_table = Fmake_vector (make_number (32), Qnil);
--- a/src/ccl.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/ccl.h	Thu Jul 08 17:09:35 2010 +0900
@@ -97,13 +97,13 @@
 
 /* Setup fields of the structure pointed by CCL appropriately for the
    execution of ccl program CCL_PROG (symbol or vector).  */
-extern int setup_ccl_program P_ ((struct ccl_program *, Lisp_Object));
+extern int setup_ccl_program (struct ccl_program *, Lisp_Object);
 
 /* Check if CCL is updated or not.  If not, re-setup members of CCL.  */
-extern int check_ccl_update P_ ((struct ccl_program *));
+extern int check_ccl_update (struct ccl_program *);
 
-extern void ccl_driver P_ ((struct ccl_program *, int *, int *, int, int,
-			    Lisp_Object));
+extern void ccl_driver (struct ccl_program *, int *, int *, int, int,
+                        Lisp_Object);
 
 /* Vector of CCL program names vs corresponding program data.  */
 extern Lisp_Object Vccl_program_table;
--- a/src/character.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/character.c	Thu Jul 08 17:09:35 2010 +0900
@@ -93,8 +93,7 @@
    character code if possible.  Return the resulting code.  */
 
 int
-char_resolve_modifier_mask (c)
-     int c;
+char_resolve_modifier_mask (int c)
 {
   /* A non-ASCII character can't reflect modifier bits to the code.  */
   if (! ASCII_CHAR_P ((c & ~CHAR_MODIFIER_MASK)))
@@ -143,9 +142,7 @@
    handle them appropriately.  */
 
 int
-char_string (c, p)
-     unsigned c;
-     unsigned char *p;
+char_string (unsigned int c, unsigned char *p)
 {
   int bytes;
 
@@ -199,10 +196,7 @@
    character) of the multibyte form.  */
 
 int
-string_char (p, advanced, len)
-     const unsigned char *p;
-     const unsigned char **advanced;
-     int *len;
+string_char (const unsigned char *p, const unsigned char **advanced, int *len)
 {
   int c;
   const unsigned char *saved_p = p;
@@ -245,9 +239,7 @@
    case, translace C by all tables.  */
 
 int
-translate_char (table, c)
-     Lisp_Object table;
-     int c;
+translate_char (Lisp_Object table, int c)
 {
   if (CHAR_TABLE_P (table))
     {
@@ -272,9 +264,7 @@
    future.  */
 
 int
-multibyte_char_to_unibyte (c, rev_tbl)
-     int c;
-     Lisp_Object rev_tbl;
+multibyte_char_to_unibyte (int c, Lisp_Object rev_tbl)
 {
   if (c < 0x80)
     return c;
@@ -287,8 +277,7 @@
    by charset_unibyte.  */
 
 int
-multibyte_char_to_unibyte_safe (c)
-     int c;
+multibyte_char_to_unibyte_safe (int c)
 {
   if (c < 0x80)
     return c;
@@ -446,9 +435,7 @@
    occupies on the screen.  */
 
 int
-strwidth (str, len)
-     unsigned char *str;
-     int len;
+strwidth (unsigned char *str, int len)
 {
   return c_string_width (str, len, -1, NULL, NULL);
 }
@@ -461,9 +448,7 @@
    in *NCHARS and *NBYTES respectively.  */
 
 int
-lisp_string_width (string, precision, nchars, nbytes)
-     Lisp_Object string;
-     int precision, *nchars, *nbytes;
+lisp_string_width (Lisp_Object string, int precision, int *nchars, int *nbytes)
 {
   int len = SCHARS (string);
   /* This set multibyte to 0 even if STRING is multibyte when it
@@ -573,9 +558,7 @@
    nil, we treat each byte as a character.  */
 
 EMACS_INT
-chars_in_text (ptr, nbytes)
-     const unsigned char *ptr;
-     EMACS_INT nbytes;
+chars_in_text (const unsigned char *ptr, EMACS_INT nbytes)
 {
   /* current_buffer is null at early stages of Emacs initialization.  */
   if (current_buffer == 0
@@ -591,9 +574,7 @@
    ignores enable-multibyte-characters.  */
 
 EMACS_INT
-multibyte_chars_in_text (ptr, nbytes)
-     const unsigned char *ptr;
-     EMACS_INT nbytes;
+multibyte_chars_in_text (const unsigned char *ptr, EMACS_INT nbytes)
 {
   const unsigned char *endp = ptr + nbytes;
   int chars = 0;
@@ -618,9 +599,7 @@
    represented by 2-byte in a multibyte text.  */
 
 void
-parse_str_as_multibyte (str, len, nchars, nbytes)
-     const unsigned char *str;
-     int len, *nchars, *nbytes;
+parse_str_as_multibyte (const unsigned char *str, int len, int *nchars, int *nbytes)
 {
   const unsigned char *endp = str + len;
   int n, chars = 0, bytes = 0;
@@ -662,9 +641,7 @@
    resulting text.  */
 
 int
-str_as_multibyte (str, len, nbytes, nchars)
-     unsigned char *str;
-     int len, nbytes, *nchars;
+str_as_multibyte (unsigned char *str, int len, int nbytes, int *nchars)
 {
   unsigned char *p = str, *endp = str + nbytes;
   unsigned char *to;
@@ -691,7 +668,7 @@
   to = p;
   nbytes = endp - p;
   endp = str + len;
-  safe_bcopy ((char *) p, (char *) (endp - nbytes), nbytes);
+  memmove (endp - nbytes, p, nbytes);
   p = endp - nbytes;
 
   if (nbytes >= MAX_MULTIBYTE_LENGTH)
@@ -740,9 +717,7 @@
    `str_to_multibyte'.  */
 
 int
-parse_str_to_multibyte (str, len)
-     unsigned char *str;
-     int len;
+parse_str_to_multibyte (unsigned char *str, int len)
 {
   unsigned char *endp = str + len;
   int bytes;
@@ -760,9 +735,7 @@
    enough.  */
 
 int
-str_to_multibyte (str, len, bytes)
-     unsigned char *str;
-     int len, bytes;
+str_to_multibyte (unsigned char *str, int len, int bytes)
 {
   unsigned char *p = str, *endp = str + bytes;
   unsigned char *to;
@@ -773,7 +746,7 @@
   to = p;
   bytes = endp - p;
   endp = str + len;
-  safe_bcopy ((char *) p, (char *) (endp - bytes), bytes);
+  memmove (endp - bytes, p, bytes);
   p = endp - bytes;
   while (p < endp)
     {
@@ -791,9 +764,7 @@
    unibyte.  */
 
 int
-str_as_unibyte (str, bytes)
-     unsigned char *str;
-     int bytes;
+str_as_unibyte (unsigned char *str, int bytes)
 {
   const unsigned char *p = str, *endp = str + bytes;
   unsigned char *to;
@@ -835,11 +806,7 @@
    Note: Currently the arg ACCEPT_LATIN_1 is not used.  */
 
 EMACS_INT
-str_to_unibyte (src, dst, chars, accept_latin_1)
-     const unsigned char *src;
-     unsigned char *dst;
-     EMACS_INT chars;
-     int accept_latin_1;
+str_to_unibyte (const unsigned char *src, unsigned char *dst, EMACS_INT chars, int accept_latin_1)
 {
   EMACS_INT i;
 
@@ -859,8 +826,7 @@
 
 
 int
-string_count_byte8 (string)
-     Lisp_Object string;
+string_count_byte8 (Lisp_Object string)
 {
   int multibyte = STRING_MULTIBYTE (string);
   int nbytes = SBYTES (string);
@@ -890,8 +856,7 @@
 
 
 Lisp_Object
-string_escape_byte8 (string)
-     Lisp_Object string;
+string_escape_byte8 (Lisp_Object string)
 {
   int nchars = SCHARS (string);
   int nbytes = SBYTES (string);
@@ -1088,14 +1053,14 @@
 
 
 void
-init_character_once ()
+init_character_once (void)
 {
 }
 
 #ifdef emacs
 
 void
-syms_of_character ()
+syms_of_character (void)
 {
   DEFSYM (Qcharacterp, "characterp");
   DEFSYM (Qauto_fill_chars, "auto-fill-chars");
--- a/src/character.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/character.h	Thu Jul 08 17:09:35 2010 +0900
@@ -596,24 +596,24 @@
    : 0)
 
 
-extern int char_resolve_modifier_mask P_ ((int));
-extern int char_string P_ ((unsigned, unsigned char *));
-extern int string_char P_ ((const unsigned char *,
-			    const unsigned char **, int *));
+extern int char_resolve_modifier_mask (int);
+extern int char_string (unsigned, unsigned char *);
+extern int string_char (const unsigned char *,
+                        const unsigned char **, int *);
 
-extern int translate_char P_ ((Lisp_Object, int c));
-extern int char_printable_p P_ ((int c));
-extern void parse_str_as_multibyte P_ ((const unsigned char *, int, int *,
-					int *));
-extern int parse_str_to_multibyte P_ ((unsigned char *, int));
-extern int str_as_multibyte P_ ((unsigned char *, int, int, int *));
-extern int str_to_multibyte P_ ((unsigned char *, int, int));
-extern int str_as_unibyte P_ ((unsigned char *, int));
-extern EMACS_INT str_to_unibyte P_ ((const unsigned char *, unsigned char *,
-				     EMACS_INT, int));
-extern int strwidth P_ ((unsigned char *, int));
-extern int c_string_width P_ ((const unsigned char *, int, int, int *, int *));
-extern int lisp_string_width P_ ((Lisp_Object, int, int *, int *));
+extern int translate_char (Lisp_Object, int c);
+extern int char_printable_p (int c);
+extern void parse_str_as_multibyte (const unsigned char *, int, int *,
+                                    int *);
+extern int parse_str_to_multibyte (unsigned char *, int);
+extern int str_as_multibyte (unsigned char *, int, int, int *);
+extern int str_to_multibyte (unsigned char *, int, int);
+extern int str_as_unibyte (unsigned char *, int);
+extern EMACS_INT str_to_unibyte (const unsigned char *, unsigned char *,
+                                 EMACS_INT, int);
+extern int strwidth (unsigned char *, int);
+extern int c_string_width (const unsigned char *, int, int, int *, int *);
+extern int lisp_string_width (Lisp_Object, int, int *, int *);
 
 extern Lisp_Object Vprintable_chars;
 
@@ -624,7 +624,7 @@
 extern Lisp_Object Vchar_unify_table;
 extern Lisp_Object Vunicode_category_table;
 
-extern Lisp_Object string_escape_byte8 P_ ((Lisp_Object));
+extern Lisp_Object string_escape_byte8 (Lisp_Object);
 
 /* Return a translation table of id number ID.  */
 #define GET_TRANSLATION_TABLE(id) \
@@ -636,18 +636,6 @@
 extern Lisp_Object Vchar_script_table;
 extern Lisp_Object Vscript_representative_chars;
 
-/* Copy LEN bytes from FROM to TO.  This macro should be used only
-   when a caller knows that LEN is short and the obvious copy loop is
-   faster than calling bcopy which has some overhead.  Copying a
-   multibyte sequence of a character is the typical case.  */
-
-#define BCOPY_SHORT(from, to, len)		\
-  do {						\
-    int i = len;				\
-    unsigned char *from_p = from, *to_p = to;	\
-    while (i--) *to_p++ = *from_p++;		\
-  } while (0)
-
 #define DEFSYM(sym, name)	\
   do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (0)
 
--- a/src/charset.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/charset.c	Thu Jul 08 17:09:35 2010 +0900
@@ -129,10 +129,10 @@
 
 /* Defined in chartab.c */
 extern void
-map_char_table_for_charset P_ ((void (*c_function) (Lisp_Object, Lisp_Object),
-				Lisp_Object function, Lisp_Object table,
-				Lisp_Object arg, struct charset *charset,
-				unsigned from, unsigned to));
+map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object),
+                            Lisp_Object function, Lisp_Object table,
+                            Lisp_Object arg, struct charset *charset,
+                            unsigned from, unsigned to);
 
 #define CODE_POINT_TO_INDEX(charset, code)				\
   ((charset)->code_linear_p						\
@@ -267,11 +267,7 @@
 */
 
 static void
-load_charset_map (charset, entries, n_entries, control_flag)
-  struct charset *charset;
-  struct charset_map_entries *entries;
-  int n_entries;
-  int control_flag;
+load_charset_map (struct charset *charset, struct charset_map_entries *entries, int n_entries, int control_flag)
 {
   Lisp_Object vec, table;
   unsigned max_code = CHARSET_MAX_CODE (charset);
@@ -440,9 +436,7 @@
    paying attention to comment charcter '#'.  */
 
 static INLINE unsigned
-read_hex (fp, eof)
-     FILE *fp;
-     int *eof;
+read_hex (FILE *fp, int *eof)
 {
   int c;
   unsigned n;
@@ -497,13 +491,10 @@
    Note that this function uses `openp' to open MAPFILE but ignores
    `file-name-handler-alist' to avoid running any Lisp code.  */
 
-extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object));
+extern void add_to_log (char *, Lisp_Object, Lisp_Object);
 
 static void
-load_charset_map_from_file (charset, mapfile, control_flag)
-     struct charset *charset;
-     Lisp_Object mapfile;
-     int control_flag;
+load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile, int control_flag)
 {
   unsigned min_code = CHARSET_MIN_CODE (charset);
   unsigned max_code = CHARSET_MAX_CODE (charset);
@@ -531,7 +522,7 @@
   SAFE_ALLOCA (head, struct charset_map_entries *,
 	       sizeof (struct charset_map_entries));
   entries = head;
-  bzero (entries, sizeof (struct charset_map_entries));
+  memset (entries, 0, sizeof (struct charset_map_entries));
 
   n_entries = 0;
   eof = 0;
@@ -558,7 +549,7 @@
 	  SAFE_ALLOCA (entries->next, struct charset_map_entries *,
 		       sizeof (struct charset_map_entries));
 	  entries = entries->next;
-	  bzero (entries, sizeof (struct charset_map_entries));
+	  memset (entries, 0, sizeof (struct charset_map_entries));
 	}
       idx = n_entries % 0x10000;
       entries->entry[idx].from = from;
@@ -573,10 +564,7 @@
 }
 
 static void
-load_charset_map_from_vector (charset, vec, control_flag)
-     struct charset *charset;
-     Lisp_Object vec;
-     int control_flag;
+load_charset_map_from_vector (struct charset *charset, Lisp_Object vec, int control_flag)
 {
   unsigned min_code = CHARSET_MIN_CODE (charset);
   unsigned max_code = CHARSET_MAX_CODE (charset);
@@ -597,7 +585,7 @@
   SAFE_ALLOCA (head, struct charset_map_entries *,
 	       sizeof (struct charset_map_entries));
   entries = head;
-  bzero (entries, sizeof (struct charset_map_entries));
+  memset (entries, 0, sizeof (struct charset_map_entries));
 
   n_entries = 0;
   for (i = 0; i < len; i += 2)
@@ -634,7 +622,7 @@
 	  SAFE_ALLOCA (entries->next, struct charset_map_entries *,
 		       sizeof (struct charset_map_entries));
 	  entries = entries->next;
-	  bzero (entries, sizeof (struct charset_map_entries));
+	  memset (entries, 0, sizeof (struct charset_map_entries));
 	}
       idx = n_entries % 0x10000;
       entries->entry[idx].from = from;
@@ -652,9 +640,7 @@
    map it is (see the comment of load_charset_map for the detail).  */
 
 static void
-load_charset (charset, control_flag)
-     struct charset *charset;
-     int control_flag;
+load_charset (struct charset *charset, int control_flag)
 {
   Lisp_Object map;
 
@@ -684,15 +670,12 @@
 }
 
 
-void map_charset_for_dump P_ ((void (*c_function) (Lisp_Object, Lisp_Object),
-			       Lisp_Object function, Lisp_Object arg,
-			       unsigned from, unsigned to));
+void map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object),
+                           Lisp_Object function, Lisp_Object arg,
+                           unsigned from, unsigned to);
 
 void
-map_charset_for_dump (c_function, function, arg, from, to)
-     void (*c_function) (Lisp_Object, Lisp_Object);
-     Lisp_Object function, arg;
-     unsigned from, to;
+map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object), Lisp_Object function, Lisp_Object arg, unsigned int from, unsigned int to)
 {
   int from_idx = CODE_POINT_TO_INDEX (temp_charset_work->current, from);
   int to_idx = CODE_POINT_TO_INDEX (temp_charset_work->current, to);
@@ -750,7 +733,7 @@
 void
 map_charset_chars (c_function, function, arg,
 		   charset, from, to)
-     void (*c_function) P_ ((Lisp_Object, Lisp_Object));
+     void (*c_function) (Lisp_Object, Lisp_Object);
      Lisp_Object function, arg;
      struct charset *charset;
      unsigned from, to;
@@ -952,7 +935,7 @@
   if (! charset.code_linear_p)
     {
       charset.code_space_mask = (unsigned char *) xmalloc (256);
-      bzero (charset.code_space_mask, 256);
+      memset (charset.code_space_mask, 0, 256);
       for (i = 0; i < 4; i++)
 	for (j = charset.code_space[i * 4]; j <= charset.code_space[i * 4 + 1];
 	     j++)
@@ -1075,7 +1058,7 @@
 
   charset.unified_p = 0;
 
-  bzero (charset.fast_map, sizeof (charset.fast_map));
+  memset (charset.fast_map, 0, sizeof (charset.fast_map));
 
   if (! NILP (args[charset_arg_code_offset]))
     {
@@ -1208,8 +1191,8 @@
 	  struct charset *new_table
 	    = (struct charset *) xmalloc (sizeof (struct charset)
 					  * (charset_table_size + 16));
-	  bcopy (charset_table, new_table,
-		 sizeof (struct charset) * charset_table_size);
+	  memcpy (new_table, charset_table,
+		  sizeof (struct charset) * charset_table_size);
 	  charset_table_size += 16;
 	  charset_table = new_table;
 	}
@@ -1299,17 +1282,13 @@
    charset.  */
 
 static int
-define_charset_internal (name, dimension, code_space, min_code, max_code,
-			 iso_final, iso_revision, emacs_mule_id,
-			 ascii_compatible, supplementary,
-			 code_offset)
-     Lisp_Object name;
-     int dimension;
-     unsigned char *code_space;
-     unsigned min_code, max_code;
-     int iso_final, iso_revision, emacs_mule_id;
-     int ascii_compatible, supplementary;
-     int code_offset;
+define_charset_internal (Lisp_Object name,
+			 int dimension,
+			 unsigned char *code_space,
+			 unsigned min_code, unsigned max_code,
+			 int iso_final, int iso_revision, int emacs_mule_id,
+			 int ascii_compatible, int supplementary,
+			 int code_offset)
 {
   Lisp_Object args[charset_arg_max];
   Lisp_Object plist[14];
@@ -1484,8 +1463,7 @@
 }
 
 static void
-check_iso_charset_parameter (dimension, chars, final_char)
-     Lisp_Object dimension, chars, final_char;
+check_iso_charset_parameter (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char)
 {
   CHECK_NATNUM (dimension);
   CHECK_NATNUM (chars);
@@ -1535,8 +1513,7 @@
 */
 
 int
-string_xstring_p (string)
-     Lisp_Object string;
+string_xstring_p (Lisp_Object string)
 {
   const unsigned char *p = SDATA (string);
   const unsigned char *endp = p + SBYTES (string);
@@ -1563,11 +1540,7 @@
    It may lookup a translation table TABLE if supplied.  */
 
 static void
-find_charsets_in_text (ptr, nchars, nbytes, charsets, table, multibyte)
-     const unsigned char *ptr;
-     EMACS_INT nchars, nbytes;
-     Lisp_Object charsets, table;
-     int multibyte;
+find_charsets_in_text (const unsigned char *ptr, EMACS_INT nchars, EMACS_INT nbytes, Lisp_Object charsets, Lisp_Object table, int multibyte)
 {
   const unsigned char *pend = ptr + nbytes;
 
@@ -1689,9 +1662,7 @@
    value of Vchar_unify_table for C; i.e. it is nil, an integer, or a
    charset symbol.  */
 int
-maybe_unify_char (c, val)
-     int c;
-     Lisp_Object val;
+maybe_unify_char (int c, Lisp_Object val)
 {
   struct charset *charset;
 
@@ -1724,9 +1695,7 @@
    CHARSET.  */
 
 int
-decode_char (charset, code)
-     struct charset *charset;
-     unsigned code;
+decode_char (struct charset *charset, unsigned int code)
 {
   int c, char_index;
   enum charset_method method = CHARSET_METHOD (charset);
@@ -1805,9 +1774,7 @@
    use CHARSET's strict_max_char instead of max_char.  */
 
 unsigned
-encode_char (charset, c)
-     struct charset *charset;
-     int c;
+encode_char (struct charset *charset, int c)
 {
   unsigned code;
   enum charset_method method = CHARSET_METHOD (charset);
@@ -2057,10 +2024,7 @@
    Vcharset_ordered_list.  */
 
 struct charset *
-char_charset (c, charset_list, code_return)
-     int c;
-     Lisp_Object charset_list;
-     unsigned *code_return;
+char_charset (int c, Lisp_Object charset_list, unsigned int *code_return)
 {
   int maybe_null = 0;
 
@@ -2314,7 +2278,7 @@
 
 
 void
-init_charset ()
+init_charset (void)
 {
   Lisp_Object tempdir;
   tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory);
@@ -2332,7 +2296,7 @@
 
 
 void
-init_charset_once ()
+init_charset_once (void)
 {
   int i, j, k;
 
@@ -2353,7 +2317,7 @@
 #ifdef emacs
 
 void
-syms_of_charset ()
+syms_of_charset (void)
 {
   DEFSYM (Qcharsetp, "charsetp");
 
--- a/src/charset.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/charset.h	Thu Jul 08 17:09:35 2010 +0900
@@ -534,17 +534,17 @@
 
 extern int charset_unibyte;
 
-extern struct charset *char_charset P_ ((int, Lisp_Object, unsigned *));
-extern Lisp_Object charset_attributes P_ ((int));
+extern struct charset *char_charset (int, Lisp_Object, unsigned *);
+extern Lisp_Object charset_attributes (int);
 
-extern int maybe_unify_char P_ ((int, Lisp_Object));
-extern int decode_char P_ ((struct charset *, unsigned));
-extern unsigned encode_char P_ ((struct charset *, int));
-extern int string_xstring_p P_ ((Lisp_Object));
+extern int maybe_unify_char (int, Lisp_Object);
+extern int decode_char (struct charset *, unsigned);
+extern unsigned encode_char (struct charset *, int);
+extern int string_xstring_p (Lisp_Object);
 
-extern void map_charset_chars P_ ((void (*) (Lisp_Object, Lisp_Object),
-				   Lisp_Object, Lisp_Object,
-				   struct charset *, unsigned, unsigned));
+extern void map_charset_chars (void (*) (Lisp_Object, Lisp_Object),
+                               Lisp_Object, Lisp_Object,
+                               struct charset *, unsigned, unsigned);
 
 EXFUN (Funify_charset, 3);
 
--- a/src/chartab.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/chartab.c	Thu Jul 08 17:09:35 2010 +0900
@@ -92,9 +92,7 @@
 }
 
 static Lisp_Object
-make_sub_char_table (depth, min_char, defalt)
-     int depth, min_char;
-     Lisp_Object defalt;
+make_sub_char_table (int depth, int min_char, Lisp_Object defalt)
 {
   Lisp_Object table;
   int size = VECSIZE (struct Lisp_Sub_Char_Table) - 1 + chartab_size[depth];
@@ -108,8 +106,7 @@
 }
 
 static Lisp_Object
-char_table_ascii (table)
-     Lisp_Object table;
+char_table_ascii (Lisp_Object table)
 {
   Lisp_Object sub;
 
@@ -123,8 +120,7 @@
 }
 
 Lisp_Object
-copy_sub_char_table (table)
-     Lisp_Object table;
+copy_sub_char_table (Lisp_Object table)
 {
   Lisp_Object copy;
   int depth = XINT (XSUB_CHAR_TABLE (table)->depth);
@@ -148,8 +144,7 @@
 
 
 Lisp_Object
-copy_char_table (table)
-     Lisp_Object table;
+copy_char_table (Lisp_Object table)
 {
   Lisp_Object copy;
   int size = XCHAR_TABLE (table)->size & PSEUDOVECTOR_SIZE_MASK;
@@ -175,9 +170,7 @@
 }
 
 Lisp_Object
-sub_char_table_ref (table, c)
-     Lisp_Object table;
-     int c;
+sub_char_table_ref (Lisp_Object table, int c)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
   int depth = XINT (tbl->depth);
@@ -191,9 +184,7 @@
 }
 
 Lisp_Object
-char_table_ref (table, c)
-     Lisp_Object table;
-     int c;
+char_table_ref (Lisp_Object table, int c)
 {
   struct Lisp_Char_Table *tbl = XCHAR_TABLE (table);
   Lisp_Object val;
@@ -220,11 +211,7 @@
 }
 
 static Lisp_Object
-sub_char_table_ref_and_range (table, c, from, to, defalt)
-     Lisp_Object table;
-     int c;
-     int *from, *to;
-     Lisp_Object defalt;
+sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp_Object defalt)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
   int depth = XINT (tbl->depth);
@@ -286,10 +273,7 @@
    1) are different from that of C.  */
 
 Lisp_Object
-char_table_ref_and_range (table, c, from, to)
-     Lisp_Object table;
-     int c;
-     int *from, *to;
+char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to)
 {
   struct Lisp_Char_Table *tbl = XCHAR_TABLE (table);
   int index = CHARTAB_IDX (c, 0, 0), idx;
@@ -363,10 +347,7 @@
 
 
 static void
-sub_char_table_set (table, c, val)
-     Lisp_Object table;
-     int c;
-     Lisp_Object val;
+sub_char_table_set (Lisp_Object table, int c, Lisp_Object val)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
   int depth = XINT ((tbl)->depth);
@@ -390,10 +371,7 @@
 }
 
 Lisp_Object
-char_table_set (table, c, val)
-     Lisp_Object table;
-     int c;
-     Lisp_Object val;
+char_table_set (Lisp_Object table, int c, Lisp_Object val)
 {
   struct Lisp_Char_Table *tbl = XCHAR_TABLE (table);
 
@@ -421,12 +399,7 @@
 }
 
 static void
-sub_char_table_set_range (table, depth, min_char, from, to, val)
-     Lisp_Object *table;
-     int depth;
-     int min_char;
-     int from, to;
-     Lisp_Object val;
+sub_char_table_set_range (Lisp_Object *table, int depth, int min_char, int from, int to, Lisp_Object val)
 {
   int max_char = min_char + chartab_chars[depth] - 1;
 
@@ -454,10 +427,7 @@
 
 
 Lisp_Object
-char_table_set_range (table, from, to, val)
-     Lisp_Object table;
-     int from, to;
-     Lisp_Object val;
+char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val)
 {
   struct Lisp_Char_Table *tbl = XCHAR_TABLE (table);
   Lisp_Object *contents = tbl->contents;
@@ -640,9 +610,7 @@
    integer.  If the element is not a character, return CH itself.  */
 
 int
-char_table_translate (table, ch)
-     Lisp_Object table;
-     int ch;
+char_table_translate (Lisp_Object table, int ch)
 {
   Lisp_Object value;
   value = Faref (table, make_number (ch));
@@ -652,8 +620,7 @@
 }
 
 static Lisp_Object
-optimize_sub_char_table (table, test)
-     Lisp_Object table, test;
+optimize_sub_char_table (Lisp_Object table, Lisp_Object test)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
   int depth = XINT (tbl->depth);
@@ -723,10 +690,9 @@
    following characters in TABLE have the same value.  */
 
 static Lisp_Object
-map_sub_char_table (c_function, function, table, arg, val, range,
-		    default_val, parent)
-     void (*c_function) P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-     Lisp_Object function, table, arg, val, range, default_val, parent;
+map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
+		    Lisp_Object function, Lisp_Object table, Lisp_Object arg, Lisp_Object val,
+		    Lisp_Object range, Lisp_Object default_val, Lisp_Object parent)
 {
   /* Pointer to the elements of TABLE. */
   Lisp_Object *contents;
@@ -840,9 +806,7 @@
    ARG is passed to C_FUNCTION when that is called.  */
 
 void
-map_char_table (c_function, function, table, arg)
-     void (*c_function) P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-     Lisp_Object function, table, arg;
+map_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object function, Lisp_Object table, Lisp_Object arg)
 {
   Lisp_Object range, val;
   struct gcpro gcpro1, gcpro2, gcpro3;
@@ -913,12 +877,10 @@
 
 
 static void
-map_sub_char_table_for_charset (c_function, function, table, arg, range,
-				charset, from, to)
-     void (*c_function) P_ ((Lisp_Object, Lisp_Object));
-     Lisp_Object function, table, arg, range;
-     struct charset *charset;
-     unsigned from, to;
+map_sub_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object),
+				Lisp_Object function, Lisp_Object table, Lisp_Object arg,
+				Lisp_Object range, struct charset *charset,
+				unsigned from, unsigned to)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
   int depth = XINT (tbl->depth);
@@ -1000,12 +962,10 @@
    map_charset_chars.  */
 
 void
-map_char_table_for_charset (c_function, function, table, arg,
-			    charset, from, to)
-     void (*c_function) P_ ((Lisp_Object, Lisp_Object));
-     Lisp_Object function, table, arg;
-     struct charset *charset;
-     unsigned from, to;
+map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object), 
+			    Lisp_Object function, Lisp_Object table, Lisp_Object arg,
+			    struct charset *charset,
+			    unsigned from, unsigned to)
 {
   Lisp_Object range;
   int c, i;
@@ -1049,7 +1009,7 @@
 
 
 void
-syms_of_chartab ()
+syms_of_chartab (void)
 {
   defsubr (&Smake_char_table);
   defsubr (&Schar_table_parent);
--- a/src/cm.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/cm.c	Thu Jul 08 17:09:35 2010 +0900
@@ -33,8 +33,8 @@
 /* For now, don't try to include termcap.h.  On some systems,
    configure finds a non-standard termcap.h that the main build
    won't find.  */
-extern void tputs P_ ((const char *, int, int (*)(int)));
-extern char *tgoto P_ ((const char *, int, int));
+extern void tputs (const char *, int, int (*)(int));
+extern char *tgoto (const char *, int, int);
 
 #define	BIG	9999		/* 9999 good on VAXen.  For 16 bit machines
 				   use about 2000.... */
@@ -45,8 +45,7 @@
 
 /* ARGSUSED */
 int
-evalcost (c)
-     char c;
+evalcost (int c)
 {
   cost++;
   return c;
@@ -56,8 +55,7 @@
 struct tty_display_info *current_tty;
 
 int
-cmputc (c)
-     char c;
+cmputc (int c)
 {
   if (current_tty->termscript)
     putc (c & 0177, current_tty->termscript);
@@ -326,9 +324,7 @@
 #define	USECR	3
 
 void
-cmgoto (tty, row, col)
-     struct tty_display_info *tty;
-     int row, col;
+cmgoto (struct tty_display_info *tty, int row, int col)
 {
     int     homecost,
             crcost,
@@ -434,7 +430,7 @@
 void
 Wcm_clear (struct tty_display_info *tty)
 {
-  bzero (tty->Wcm, sizeof (struct cm));
+  memset (tty->Wcm, 0, sizeof (struct cm));
   UP = 0;
   BC = 0;
 }
--- a/src/cm.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/cm.h	Thu Jul 08 17:09:35 2010 +0900
@@ -158,17 +158,17 @@
 #define losecursor(tty)	 (curX(tty) = -1, curY(tty) = -1)
 
 extern int cost;
-extern int evalcost ();
+extern int evalcost (int c);
 
 #define emacs_tputs(tty, str, affcnt, putc) (current_tty = (tty), tputs (str, affcnt, putc))
 
 extern struct tty_display_info *current_tty;
-extern void cmcheckmagic P_ ((struct tty_display_info *));
-extern int cmputc P_ ((int));
-extern void cmcostinit P_ ((struct tty_display_info *));
-extern void cmgoto P_ ((struct tty_display_info *, int, int));
-extern void Wcm_clear P_ ((struct tty_display_info *));
-extern int Wcm_init P_ ((struct tty_display_info *));
+extern void cmcheckmagic (struct tty_display_info *);
+extern int cmputc (int);
+extern void cmcostinit (struct tty_display_info *);
+extern void cmgoto (struct tty_display_info *, int, int);
+extern void Wcm_clear (struct tty_display_info *);
+extern int Wcm_init (struct tty_display_info *);
 
 /* arch-tag: acc1535a-7136-49d6-b22d-9bc85702251b
    (do not change this comment) */
--- a/src/cmds.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/cmds.c	Thu Jul 08 17:09:35 2010 +0900
@@ -356,9 +356,7 @@
 static Lisp_Object Qexpand_abbrev;
 
 int
-internal_self_insert (c, noautofill)
-     int c;
-     int noautofill;
+internal_self_insert (int c, int noautofill)
 {
   int hairy = 0;
   Lisp_Object tem;
@@ -546,7 +544,7 @@
 /* module initialization */
 
 void
-syms_of_cmds ()
+syms_of_cmds (void)
 {
   Qkill_backward_chars = intern_c_string ("kill-backward-chars");
   staticpro (&Qkill_backward_chars);
@@ -587,7 +585,7 @@
 }
 
 void
-keys_of_cmds ()
+keys_of_cmds (void)
 {
   int n;
 
--- a/src/coding.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/coding.c	Thu Jul 08 17:09:35 2010 +0900
@@ -154,9 +154,8 @@
 
 #if 0
 static int
-detect_coding_XXX (coding, detect_info)
-     struct coding_system *coding;
-     struct coding_detection_info *detect_info;
+detect_coding_XXX (struct coding_system *coding,
+		   struct coding_detection_info *detect_info)
 {
   const unsigned char *src = coding->source;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -203,8 +202,7 @@
 
 #if 0
 static void
-decode_coding_XXXX (coding)
-     struct coding_system *coding;
+decode_coding_XXXX (struct coding_system *coding)
 {
   const unsigned char *src = coding->source + coding->consumed;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -261,8 +259,7 @@
   Below is a template of these functions.  */
 #if 0
 static void
-encode_coding_XXX (coding)
-     struct coding_system *coding;
+encode_coding_XXX (struct coding_system *coding)
 {
   int multibytep = coding->dst_multibyte;
   int *charbuf = coding->charbuf;
@@ -896,80 +893,80 @@
 
 
 /* Prototypes for static functions.  */
-static void record_conversion_result P_ ((struct coding_system *coding,
-					  enum coding_result_code result));
-static int detect_coding_utf_8 P_ ((struct coding_system *,
-				    struct coding_detection_info *info));
-static void decode_coding_utf_8 P_ ((struct coding_system *));
-static int encode_coding_utf_8 P_ ((struct coding_system *));
-
-static int detect_coding_utf_16 P_ ((struct coding_system *,
-				     struct coding_detection_info *info));
-static void decode_coding_utf_16 P_ ((struct coding_system *));
-static int encode_coding_utf_16 P_ ((struct coding_system *));
-
-static int detect_coding_iso_2022 P_ ((struct coding_system *,
-				       struct coding_detection_info *info));
-static void decode_coding_iso_2022 P_ ((struct coding_system *));
-static int encode_coding_iso_2022 P_ ((struct coding_system *));
-
-static int detect_coding_emacs_mule P_ ((struct coding_system *,
-					 struct coding_detection_info *info));
-static void decode_coding_emacs_mule P_ ((struct coding_system *));
-static int encode_coding_emacs_mule P_ ((struct coding_system *));
-
-static int detect_coding_sjis P_ ((struct coding_system *,
-				   struct coding_detection_info *info));
-static void decode_coding_sjis P_ ((struct coding_system *));
-static int encode_coding_sjis P_ ((struct coding_system *));
-
-static int detect_coding_big5 P_ ((struct coding_system *,
-				   struct coding_detection_info *info));
-static void decode_coding_big5 P_ ((struct coding_system *));
-static int encode_coding_big5 P_ ((struct coding_system *));
-
-static int detect_coding_ccl P_ ((struct coding_system *,
-				  struct coding_detection_info *info));
-static void decode_coding_ccl P_ ((struct coding_system *));
-static int encode_coding_ccl P_ ((struct coding_system *));
-
-static void decode_coding_raw_text P_ ((struct coding_system *));
-static int encode_coding_raw_text P_ ((struct coding_system *));
-
-static void coding_set_source P_ ((struct coding_system *));
-static void coding_set_destination P_ ((struct coding_system *));
-static void coding_alloc_by_realloc P_ ((struct coding_system *, EMACS_INT));
-static void coding_alloc_by_making_gap P_ ((struct coding_system *,
-					    EMACS_INT, EMACS_INT));
-static unsigned char *alloc_destination P_ ((struct coding_system *,
-					     EMACS_INT, unsigned char *));
-static void setup_iso_safe_charsets P_ ((Lisp_Object));
-static unsigned char *encode_designation_at_bol P_ ((struct coding_system *,
-						     int *, int *,
-						     unsigned char *));
-static int detect_eol P_ ((const unsigned char *,
-			   EMACS_INT, enum coding_category));
-static Lisp_Object adjust_coding_eol_type P_ ((struct coding_system *, int));
-static void decode_eol P_ ((struct coding_system *));
-static Lisp_Object get_translation_table P_ ((Lisp_Object, int, int *));
-static Lisp_Object get_translation P_ ((Lisp_Object, int *, int *));
-static int produce_chars P_ ((struct coding_system *, Lisp_Object, int));
-static INLINE void produce_charset P_ ((struct coding_system *, int *,
-					EMACS_INT));
-static void produce_annotation P_ ((struct coding_system *, EMACS_INT));
-static int decode_coding P_ ((struct coding_system *));
-static INLINE int *handle_composition_annotation P_ ((EMACS_INT, EMACS_INT,
-						      struct coding_system *,
-						      int *, EMACS_INT *));
-static INLINE int *handle_charset_annotation P_ ((EMACS_INT, EMACS_INT,
-						  struct coding_system *,
-						  int *, EMACS_INT *));
-static void consume_chars P_ ((struct coding_system *, Lisp_Object, int));
-static int encode_coding P_ ((struct coding_system *));
-static Lisp_Object make_conversion_work_buffer P_ ((int));
-static Lisp_Object code_conversion_restore P_ ((Lisp_Object));
-static INLINE int char_encodable_p P_ ((int, Lisp_Object));
-static Lisp_Object make_subsidiaries P_ ((Lisp_Object));
+static void record_conversion_result (struct coding_system *coding,
+                                      enum coding_result_code result);
+static int detect_coding_utf_8 (struct coding_system *,
+                                struct coding_detection_info *info);
+static void decode_coding_utf_8 (struct coding_system *);
+static int encode_coding_utf_8 (struct coding_system *);
+
+static int detect_coding_utf_16 (struct coding_system *,
+                                 struct coding_detection_info *info);
+static void decode_coding_utf_16 (struct coding_system *);
+static int encode_coding_utf_16 (struct coding_system *);
+
+static int detect_coding_iso_2022 (struct coding_system *,
+                                   struct coding_detection_info *info);
+static void decode_coding_iso_2022 (struct coding_system *);
+static int encode_coding_iso_2022 (struct coding_system *);
+
+static int detect_coding_emacs_mule (struct coding_system *,
+                                     struct coding_detection_info *info);
+static void decode_coding_emacs_mule (struct coding_system *);
+static int encode_coding_emacs_mule (struct coding_system *);
+
+static int detect_coding_sjis (struct coding_system *,
+                               struct coding_detection_info *info);
+static void decode_coding_sjis (struct coding_system *);
+static int encode_coding_sjis (struct coding_system *);
+
+static int detect_coding_big5 (struct coding_system *,
+                               struct coding_detection_info *info);
+static void decode_coding_big5 (struct coding_system *);
+static int encode_coding_big5 (struct coding_system *);
+
+static int detect_coding_ccl (struct coding_system *,
+                              struct coding_detection_info *info);
+static void decode_coding_ccl (struct coding_system *);
+static int encode_coding_ccl (struct coding_system *);
+
+static void decode_coding_raw_text (struct coding_system *);
+static int encode_coding_raw_text (struct coding_system *);
+
+static void coding_set_source (struct coding_system *);
+static void coding_set_destination (struct coding_system *);
+static void coding_alloc_by_realloc (struct coding_system *, EMACS_INT);
+static void coding_alloc_by_making_gap (struct coding_system *,
+                                        EMACS_INT, EMACS_INT);
+static unsigned char *alloc_destination (struct coding_system *,
+                                         EMACS_INT, unsigned char *);
+static void setup_iso_safe_charsets (Lisp_Object);
+static unsigned char *encode_designation_at_bol (struct coding_system *,
+                                                 int *, int *,
+                                                 unsigned char *);
+static int detect_eol (const unsigned char *,
+                       EMACS_INT, enum coding_category);
+static Lisp_Object adjust_coding_eol_type (struct coding_system *, int);
+static void decode_eol (struct coding_system *);
+static Lisp_Object get_translation_table (Lisp_Object, int, int *);
+static Lisp_Object get_translation (Lisp_Object, int *, int *);
+static int produce_chars (struct coding_system *, Lisp_Object, int);
+static INLINE void produce_charset (struct coding_system *, int *,
+                                    EMACS_INT);
+static void produce_annotation (struct coding_system *, EMACS_INT);
+static int decode_coding (struct coding_system *);
+static INLINE int *handle_composition_annotation (EMACS_INT, EMACS_INT,
+                                                  struct coding_system *,
+                                                  int *, EMACS_INT *);
+static INLINE int *handle_charset_annotation (EMACS_INT, EMACS_INT,
+                                              struct coding_system *,
+                                              int *, EMACS_INT *);
+static void consume_chars (struct coding_system *, Lisp_Object, int);
+static int encode_coding (struct coding_system *);
+static Lisp_Object make_conversion_work_buffer (int);
+static Lisp_Object code_conversion_restore (Lisp_Object);
+static INLINE int char_encodable_p (int, Lisp_Object);
+static Lisp_Object make_subsidiaries (Lisp_Object);
 
 static void
 record_conversion_result (struct coding_system *coding,
@@ -1106,8 +1103,7 @@
 
 
 static void
-coding_set_source (coding)
-     struct coding_system *coding;
+coding_set_source (struct coding_system *coding)
 {
   if (BUFFERP (coding->src_object))
     {
@@ -1129,8 +1125,7 @@
 }
 
 static void
-coding_set_destination (coding)
-     struct coding_system *coding;
+coding_set_destination (struct coding_system *coding)
 {
   if (BUFFERP (coding->dst_object))
     {
@@ -1159,9 +1154,7 @@
 
 
 static void
-coding_alloc_by_realloc (coding, bytes)
-     struct coding_system *coding;
-     EMACS_INT bytes;
+coding_alloc_by_realloc (struct coding_system *coding, EMACS_INT bytes)
 {
   coding->destination = (unsigned char *) xrealloc (coding->destination,
 						    coding->dst_bytes + bytes);
@@ -1169,9 +1162,8 @@
 }
 
 static void
-coding_alloc_by_making_gap (coding, gap_head_used, bytes)
-     struct coding_system *coding;
-     EMACS_INT gap_head_used, bytes;
+coding_alloc_by_making_gap (struct coding_system *coding,
+			    EMACS_INT gap_head_used, EMACS_INT bytes)
 {
   if (EQ (coding->src_object, coding->dst_object))
     {
@@ -1200,10 +1192,8 @@
 
 
 static unsigned char *
-alloc_destination (coding, nbytes, dst)
-     struct coding_system *coding;
-     EMACS_INT nbytes;
-     unsigned char *dst;
+alloc_destination (struct coding_system *coding, EMACS_INT nbytes,
+		   unsigned char *dst)
 {
   EMACS_INT offset = dst - coding->destination;
 
@@ -1301,9 +1291,8 @@
 #define UTF_8_BOM_3 0xBF
 
 static int
-detect_coding_utf_8 (coding, detect_info)
-     struct coding_system *coding;
-     struct coding_detection_info *detect_info;
+detect_coding_utf_8 (struct coding_system *coding,
+		     struct coding_detection_info *detect_info)
 {
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -1386,8 +1375,7 @@
 
 
 static void
-decode_coding_utf_8 (coding)
-     struct coding_system *coding;
+decode_coding_utf_8 (struct coding_system *coding)
 {
   const unsigned char *src = coding->source + coding->consumed;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -1435,8 +1423,6 @@
     }
   CODING_UTF_8_BOM (coding) = utf_without_bom;
 
-
-
   while (1)
     {
       int c, c1, c2, c3, c4, c5;
@@ -1459,7 +1445,7 @@
 	{
 	  c = - c1;
 	}
-      else if (UTF_8_1_OCTET_P(c1))
+      else if (UTF_8_1_OCTET_P (c1))
 	{
 	  if (eol_crlf && c1 == '\r')
 	    ONE_MORE_BYTE (byte_after_cr);
@@ -1543,8 +1529,7 @@
 
 
 static int
-encode_coding_utf_8 (coding)
-     struct coding_system *coding;
+encode_coding_utf_8 (struct coding_system *coding)
 {
   int multibytep = coding->dst_multibyte;
   int *charbuf = coding->charbuf;
@@ -1623,9 +1608,8 @@
 
 
 static int
-detect_coding_utf_16 (coding, detect_info)
-     struct coding_system *coding;
-     struct coding_detection_info *detect_info;
+detect_coding_utf_16 (struct coding_system *coding,
+		      struct coding_detection_info *detect_info)
 {
   const unsigned char *src = coding->source, *src_base = src;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -1708,8 +1692,7 @@
 }
 
 static void
-decode_coding_utf_16 (coding)
-     struct coding_system *coding;
+decode_coding_utf_16 (struct coding_system *coding)
 {
   const unsigned char *src = coding->source + coding->consumed;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -1837,8 +1820,7 @@
 }
 
 static int
-encode_coding_utf_16 (coding)
-     struct coding_system *coding;
+encode_coding_utf_16 (struct coding_system *coding)
 {
   int multibytep = coding->dst_multibyte;
   int *charbuf = coding->charbuf;
@@ -1979,9 +1961,8 @@
    else return 0.  */
 
 static int
-detect_coding_emacs_mule (coding, detect_info)
-     struct coding_system *coding;
-     struct coding_detection_info *detect_info;
+detect_coding_emacs_mule (struct coding_system *coding,
+			  struct coding_detection_info *detect_info)
 {
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -2069,11 +2050,9 @@
    -1.  If SRC is too short, return -2.  */
 
 int
-emacs_mule_char (coding, src, nbytes, nchars, id, cmp_status)
-     struct coding_system *coding;
-     const unsigned char *src;
-     int *nbytes, *nchars, *id;
-     struct composition_status *cmp_status;
+emacs_mule_char (struct coding_system *coding, const unsigned char *src,
+		 int *nbytes, int *nchars, int *id,
+		 struct composition_status *cmp_status)
 {
   const unsigned char *src_end = coding->source + coding->src_bytes;
   const unsigned char *src_base = src;
@@ -2210,7 +2189,7 @@
    (3) alt&rule composition: 0x80 0xF5 BYTES CHARS | ALT RULE ... ALT CHAR ...
 
    and these old form:
-  
+
    (4) relative composition: 0x80 | MSEQ ... MSEQ
    (5) rulebase composition: 0x80 0xFF | MSEQ MRULE ... MSEQ
 
@@ -2391,9 +2370,8 @@
 
 
 static int
-emacs_mule_finish_composition (charbuf, cmp_status)
-     int *charbuf;
-     struct composition_status *cmp_status;
+emacs_mule_finish_composition (int *charbuf,
+			       struct composition_status *cmp_status)
 {
   int idx = - cmp_status->length;
   int new_chars;
@@ -2448,8 +2426,7 @@
 
 
 static void
-decode_coding_emacs_mule (coding)
-     struct coding_system *coding;
+decode_coding_emacs_mule (struct coding_system *coding)
 {
   const unsigned char *src = coding->source + coding->consumed;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -2713,8 +2690,7 @@
 
 
 static int
-encode_coding_emacs_mule (coding)
-     struct coding_system *coding;
+encode_coding_emacs_mule (struct coding_system *coding)
 {
   int multibytep = coding->dst_multibyte;
   int *charbuf = coding->charbuf;
@@ -3007,8 +2983,7 @@
   (CODING_ISO_INITIAL (&coding_categories[category], 1) >= 0)
 
 static void
-setup_iso_safe_charsets (attrs)
-     Lisp_Object attrs;
+setup_iso_safe_charsets (Lisp_Object attrs)
 {
   Lisp_Object charset_list, safe_charsets;
   Lisp_Object request;
@@ -3076,9 +3051,8 @@
    If it is, return 1, else return 0.  */
 
 static int
-detect_coding_iso_2022 (coding, detect_info)
-     struct coding_system *coding;
-     struct coding_detection_info *detect_info;
+detect_coding_iso_2022 (struct coding_system *coding,
+			struct coding_detection_info *detect_info)
 {
   const unsigned char *src = coding->source, *src_base = src;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -3442,12 +3416,10 @@
 
 /* Finish the current composition as invalid.  */
 
-static int finish_composition P_ ((int *, struct composition_status *));
+static int finish_composition (int *, struct composition_status *);
 
 static int
-finish_composition (charbuf, cmp_status)
-     int *charbuf;
-     struct composition_status *cmp_status;
+finish_composition (int *charbuf, struct composition_status *cmp_status)
 {
   int idx = - cmp_status->length;
   int new_chars;
@@ -3584,8 +3556,7 @@
 /* See the above "GENERAL NOTES on `decode_coding_XXX ()' functions".  */
 
 static void
-decode_coding_iso_2022 (coding)
-     struct coding_system *coding;
+decode_coding_iso_2022 (struct coding_system *coding)
 {
   const unsigned char *src = coding->source + coding->consumed;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -4317,7 +4288,7 @@
 
 #define ENCODE_ISO_CHARACTER(charset, c)				   \
   do {									   \
-    int code = ENCODE_CHAR ((charset),(c));				   \
+    int code = ENCODE_CHAR ((charset), (c));				   \
 									   \
     if (CHARSET_DIMENSION (charset) == 1)				   \
       ENCODE_ISO_CHARACTER_DIMENSION1 ((charset), code);		   \
@@ -4331,11 +4302,9 @@
    Return new DST.  */
 
 unsigned char *
-encode_invocation_designation (charset, coding, dst, p_nchars)
-     struct charset *charset;
-     struct coding_system *coding;
-     unsigned char *dst;
-     int *p_nchars;
+encode_invocation_designation (struct charset *charset,
+			       struct coding_system *coding,
+			       unsigned char *dst, int *p_nchars)
 {
   int multibytep = coding->dst_multibyte;
   int produced_chars = *p_nchars;
@@ -4447,10 +4416,8 @@
    find all the necessary designations.  */
 
 static unsigned char *
-encode_designation_at_bol (coding, charbuf, charbuf_end, dst)
-     struct coding_system *coding;
-     int *charbuf, *charbuf_end;
-     unsigned char *dst;
+encode_designation_at_bol (struct coding_system *coding, int *charbuf,
+			   int *charbuf_end, unsigned char *dst)
 {
   struct charset *charset;
   /* Table of charsets to be designated to each graphic register.  */
@@ -4500,8 +4467,7 @@
 /* See the above "GENERAL NOTES on `encode_coding_XXX ()' functions".  */
 
 static int
-encode_coding_iso_2022 (coding)
-     struct coding_system *coding;
+encode_coding_iso_2022 (struct coding_system *coding)
 {
   int multibytep = coding->dst_multibyte;
   int *charbuf = coding->charbuf;
@@ -4691,9 +4657,8 @@
    CATEGORY_MASK_SJIS, else return 0.  */
 
 static int
-detect_coding_sjis (coding, detect_info)
-     struct coding_system *coding;
-     struct coding_detection_info *detect_info;
+detect_coding_sjis (struct coding_system *coding,
+		    struct coding_detection_info *detect_info)
 {
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -4749,9 +4714,8 @@
    CATEGORY_MASK_BIG5, else return 0.  */
 
 static int
-detect_coding_big5 (coding, detect_info)
-     struct coding_system *coding;
-     struct coding_detection_info *detect_info;
+detect_coding_big5 (struct coding_system *coding,
+		    struct coding_detection_info *detect_info)
 {
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -4797,8 +4761,7 @@
    If SJIS_P is 1, decode SJIS text, else decode BIG5 test.  */
 
 static void
-decode_coding_sjis (coding)
-     struct coding_system *coding;
+decode_coding_sjis (struct coding_system *coding)
 {
   const unsigned char *src = coding->source + coding->consumed;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -4916,8 +4879,7 @@
 }
 
 static void
-decode_coding_big5 (coding)
-     struct coding_system *coding;
+decode_coding_big5 (struct coding_system *coding)
 {
   const unsigned char *src = coding->source + coding->consumed;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -5021,8 +4983,7 @@
    SJIS text, else encode BIG5 text.  */
 
 static int
-encode_coding_sjis (coding)
-     struct coding_system *coding;
+encode_coding_sjis (struct coding_system *coding)
 {
   int multibytep = coding->dst_multibyte;
   int *charbuf = coding->charbuf;
@@ -5114,8 +5075,7 @@
 }
 
 static int
-encode_coding_big5 (coding)
-     struct coding_system *coding;
+encode_coding_big5 (struct coding_system *coding)
 {
   int multibytep = coding->dst_multibyte;
   int *charbuf = coding->charbuf;
@@ -5193,9 +5153,8 @@
    CATEGORY_MASK_CCL, else return 0.  */
 
 static int
-detect_coding_ccl (coding, detect_info)
-     struct coding_system *coding;
-     struct coding_detection_info *detect_info;
+detect_coding_ccl (struct coding_system *coding,
+		   struct coding_detection_info *detect_info)
 {
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -5234,8 +5193,7 @@
 }
 
 static void
-decode_coding_ccl (coding)
-     struct coding_system *coding;
+decode_coding_ccl (struct coding_system *coding)
 {
   const unsigned char *src = coding->source + coding->consumed;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -5304,8 +5262,7 @@
 }
 
 static int
-encode_coding_ccl (coding)
-     struct coding_system *coding;
+encode_coding_ccl (struct coding_system *coding)
 {
   struct ccl_program *ccl = &coding->spec.ccl->ccl;
   int multibytep = coding->dst_multibyte;
@@ -5374,8 +5331,7 @@
 /* See the above "GENERAL NOTES on `decode_coding_XXX ()' functions".  */
 
 static void
-decode_coding_raw_text (coding)
-     struct coding_system *coding;
+decode_coding_raw_text (struct coding_system *coding)
 {
   int eol_crlf =
     !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -5394,8 +5350,7 @@
 }
 
 static int
-encode_coding_raw_text (coding)
-     struct coding_system *coding;
+encode_coding_raw_text (struct coding_system *coding)
 {
   int multibytep = coding->dst_multibyte;
   int *charbuf = coding->charbuf;
@@ -5478,9 +5433,8 @@
    is, return 1, else return 0.  */
 
 static int
-detect_coding_charset (coding, detect_info)
-     struct coding_system *coding;
-     struct coding_detection_info *detect_info;
+detect_coding_charset (struct coding_system *coding,
+		       struct coding_detection_info *detect_info)
 {
   const unsigned char *src = coding->source, *src_base;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -5582,8 +5536,7 @@
 }
 
 static void
-decode_coding_charset (coding)
-     struct coding_system *coding;
+decode_coding_charset (struct coding_system *coding)
 {
   const unsigned char *src = coding->source + coding->consumed;
   const unsigned char *src_end = coding->source + coding->src_bytes;
@@ -5711,8 +5664,7 @@
 }
 
 static int
-encode_coding_charset (coding)
-     struct coding_system *coding;
+encode_coding_charset (struct coding_system *coding)
 {
   int multibytep = coding->dst_multibyte;
   int *charbuf = coding->charbuf;
@@ -5782,9 +5734,7 @@
    CODING_SYSTEM is invalid, signal an error.  */
 
 void
-setup_coding_system (coding_system, coding)
-     Lisp_Object coding_system;
-     struct coding_system *coding;
+setup_coding_system (Lisp_Object coding_system, struct coding_system *coding)
 {
   Lisp_Object attrs;
   Lisp_Object eol_type;
@@ -5987,8 +5937,7 @@
 /* Return a list of charsets supported by CODING.  */
 
 Lisp_Object
-coding_charset_list (coding)
-     struct coding_system *coding;
+coding_charset_list (struct coding_system *coding)
 {
   Lisp_Object attrs, charset_list;
 
@@ -6011,8 +5960,7 @@
 /* Return a list of charsets supported by CODING-SYSTEM.  */
 
 Lisp_Object
-coding_system_charset_list (coding_system)
-     Lisp_Object coding_system;
+coding_system_charset_list (Lisp_Object coding_system)
 {
   int id;
   Lisp_Object attrs, charset_list;
@@ -6045,8 +5993,7 @@
    eol_type as CODING-SYSTEM.  */
 
 Lisp_Object
-raw_text_coding_system (coding_system)
-     Lisp_Object coding_system;
+raw_text_coding_system (Lisp_Object coding_system)
 {
   Lisp_Object spec, attrs;
   Lisp_Object eol_type, raw_text_eol_type;
@@ -6077,8 +6024,7 @@
    (system_eol_type).  */
 
 Lisp_Object
-coding_inherit_eol_type (coding_system, parent)
-     Lisp_Object coding_system, parent;
+coding_inherit_eol_type (Lisp_Object coding_system, Lisp_Object parent)
 {
   Lisp_Object spec, eol_type;
 
@@ -6233,10 +6179,8 @@
 #define MAX_EOL_CHECK_COUNT 3
 
 static int
-detect_eol (source, src_bytes, category)
-     const unsigned char *source;
-     EMACS_INT src_bytes;
-     enum coding_category category;
+detect_eol (const unsigned char *source, EMACS_INT src_bytes,
+	    enum coding_category category)
 {
   const unsigned char *src = source, *src_end = src + src_bytes;
   unsigned char c;
@@ -6334,9 +6278,7 @@
 
 
 static Lisp_Object
-adjust_coding_eol_type (coding, eol_seen)
-     struct coding_system *coding;
-     int eol_seen;
+adjust_coding_eol_type (struct coding_system *coding, int eol_seen)
 {
   Lisp_Object eol_type;
 
@@ -6364,8 +6306,7 @@
    system.  */
 
 void
-detect_coding (coding)
-     struct coding_system *coding;
+detect_coding (struct coding_system *coding)
 {
   const unsigned char *src, *src_end;
   int saved_mode = coding->mode;
@@ -6544,8 +6485,7 @@
 
 
 static void
-decode_eol (coding)
-     struct coding_system *coding;
+decode_eol (struct coding_system *coding)
 {
   Lisp_Object eol_type;
   unsigned char *p, *pbeg, *pend;
@@ -6610,7 +6550,7 @@
 	  for (p = pend - 2; p >= pbeg; p--)
 	    if (*p == '\r')
 	      {
-		safe_bcopy ((char *) (p + 1), (char *) p, pend-- - p - 1);
+		memmove (p, p + 1, pend-- - p - 1);
 		n++;
 	      }
 	}
@@ -6647,9 +6587,7 @@
    decoding (ENCODEP is zero). */
 
 static Lisp_Object
-get_translation_table (attrs, encodep, max_lookup)
-     Lisp_Object attrs;
-     int encodep, *max_lookup;
+get_translation_table (Lisp_Object attrs, int encodep, int *max_lookup)
 {
   Lisp_Object standard, translation_table;
   Lisp_Object val;
@@ -6751,9 +6689,7 @@
    If BUF is too short to lookup characters in FROM, return Qt.  */
 
 static Lisp_Object
-get_translation (trans, buf, buf_end)
-     Lisp_Object trans;
-     int *buf, *buf_end;
+get_translation (Lisp_Object trans, int *buf, int *buf_end)
 {
 
   if (INTEGERP (trans))
@@ -6780,10 +6716,8 @@
 
 
 static int
-produce_chars (coding, translation_table, last_block)
-     struct coding_system *coding;
-     Lisp_Object translation_table;
-     int last_block;
+produce_chars (struct coding_system *coding, Lisp_Object translation_table,
+	       int last_block)
 {
   unsigned char *dst = coding->destination + coding->produced;
   unsigned char *dst_end = coding->destination + coding->dst_bytes;
@@ -6981,10 +6915,7 @@
  */
 
 static INLINE void
-produce_composition (coding, charbuf, pos)
-     struct coding_system *coding;
-     int *charbuf;
-     EMACS_INT pos;
+produce_composition (struct coding_system *coding, int *charbuf, EMACS_INT pos)
 {
   int len;
   EMACS_INT to;
@@ -7028,10 +6959,7 @@
  */
 
 static INLINE void
-produce_charset (coding, charbuf, pos)
-     struct coding_system *coding;
-     int *charbuf;
-     EMACS_INT pos;
+produce_charset (struct coding_system *coding, int *charbuf, EMACS_INT pos)
 {
   EMACS_INT from = pos - charbuf[2];
   struct charset *charset = CHARSET_FROM_ID (charbuf[3]);
@@ -7066,9 +6994,7 @@
 
 
 static void
-produce_annotation (coding, pos)
-     struct coding_system *coding;
-     EMACS_INT pos;
+produce_annotation (struct coding_system *coding, EMACS_INT pos)
 {
   int *charbuf = coding->charbuf;
   int *charbuf_end = charbuf + coding->charbuf_used;
@@ -7123,8 +7049,7 @@
 */
 
 static int
-decode_coding (coding)
-     struct coding_system *coding;
+decode_coding (struct coding_system *coding)
 {
   Lisp_Object attrs;
   Lisp_Object undo_list;
@@ -7262,11 +7187,9 @@
    return BUF.  */
 
 static INLINE int *
-handle_composition_annotation (pos, limit, coding, buf, stop)
-     EMACS_INT pos, limit;
-     struct coding_system *coding;
-     int *buf;
-     EMACS_INT *stop;
+handle_composition_annotation (EMACS_INT pos, EMACS_INT limit,
+			       struct coding_system *coding, int *buf,
+			       EMACS_INT *stop)
 {
   EMACS_INT start, end;
   Lisp_Object prop;
@@ -7347,11 +7270,9 @@
    property value is non-nil (limiting by LIMIT), and return BUF.  */
 
 static INLINE int *
-handle_charset_annotation (pos, limit, coding, buf, stop)
-     EMACS_INT pos, limit;
-     struct coding_system *coding;
-     int *buf;
-     EMACS_INT *stop;
+handle_charset_annotation (EMACS_INT pos, EMACS_INT limit,
+			   struct coding_system *coding, int *buf,
+			   EMACS_INT *stop)
 {
   Lisp_Object val, next;
   int id;
@@ -7371,10 +7292,8 @@
 
 
 static void
-consume_chars (coding, translation_table, max_lookup)
-     struct coding_system *coding;
-     Lisp_Object translation_table;
-     int max_lookup;
+consume_chars (struct coding_system *coding, Lisp_Object translation_table,
+	       int max_lookup)
 {
   int *buf = coding->charbuf;
   int *buf_end = coding->charbuf + coding->charbuf_size;
@@ -7530,8 +7449,7 @@
    memory area specified by CODING->destination.  */
 
 static int
-encode_coding (coding)
-     struct coding_system *coding;
+encode_coding (struct coding_system *coding)
 {
   Lisp_Object attrs;
   Lisp_Object translation_table;
@@ -7595,8 +7513,7 @@
    multibyteness of returning buffer.  */
 
 static Lisp_Object
-make_conversion_work_buffer (multibyte)
-     int multibyte;
+make_conversion_work_buffer (int multibyte)
 {
   Lisp_Object name, workbuf;
   struct buffer *current;
@@ -7628,8 +7545,7 @@
 
 
 static Lisp_Object
-code_conversion_restore (arg)
-     Lisp_Object arg;
+code_conversion_restore (Lisp_Object arg)
 {
   Lisp_Object current, workbuf;
   struct gcpro gcpro1;
@@ -7650,8 +7566,7 @@
 }
 
 Lisp_Object
-code_conversion_save (with_work_buf, multibyte)
-     int with_work_buf, multibyte;
+code_conversion_save (int with_work_buf, int multibyte)
 {
   Lisp_Object workbuf = Qnil;
 
@@ -7663,11 +7578,10 @@
 }
 
 int
-decode_coding_gap (coding, chars, bytes)
-     struct coding_system *coding;
-     EMACS_INT chars, bytes;
-{
-  int count = specpdl_ptr - specpdl;
+decode_coding_gap (struct coding_system *coding,
+		   EMACS_INT chars, EMACS_INT bytes)
+{
+  int count = SPECPDL_INDEX ();
   Lisp_Object attrs;
 
   code_conversion_save (0, 0);
@@ -7710,11 +7624,10 @@
 }
 
 int
-encode_coding_gap (coding, chars, bytes)
-     struct coding_system *coding;
-     EMACS_INT chars, bytes;
-{
-  int count = specpdl_ptr - specpdl;
+encode_coding_gap (struct coding_system *coding,
+		   EMACS_INT chars, EMACS_INT bytes)
+{
+  int count = SPECPDL_INDEX ();
 
   code_conversion_save (0, 0);
 
@@ -7765,14 +7678,13 @@
  */
 
 void
-decode_coding_object (coding, src_object, from, from_byte, to, to_byte,
-		      dst_object)
-     struct coding_system *coding;
-     Lisp_Object src_object;
-     EMACS_INT from, from_byte, to, to_byte;
-     Lisp_Object dst_object;
-{
-  int count = specpdl_ptr - specpdl;
+decode_coding_object (struct coding_system *coding,
+		      Lisp_Object src_object,
+		      EMACS_INT from, EMACS_INT from_byte,
+		      EMACS_INT to, EMACS_INT to_byte,
+		      Lisp_Object dst_object)
+{
+  int count = SPECPDL_INDEX ();
   unsigned char *destination;
   EMACS_INT dst_bytes;
   EMACS_INT chars = to - from;
@@ -7902,7 +7814,7 @@
 	    }
 	  if (BEGV < GPT && GPT < BEGV + coding->produced_char)
 	    move_gap_both (BEGV, BEGV_BYTE);
-	  bcopy (BEGV_ADDR, destination, coding->produced);
+	  memcpy (destination, BEGV_ADDR, coding->produced);
 	  coding->destination = destination;
 	}
     }
@@ -7956,14 +7868,13 @@
 
 
 void
-encode_coding_object (coding, src_object, from, from_byte, to, to_byte,
-		      dst_object)
-     struct coding_system *coding;
-     Lisp_Object src_object;
-     EMACS_INT from, from_byte, to, to_byte;
-     Lisp_Object dst_object;
-{
-  int count = specpdl_ptr - specpdl;
+encode_coding_object (struct coding_system *coding,
+		      Lisp_Object src_object,
+		      EMACS_INT from, EMACS_INT from_byte,
+		      EMACS_INT to, EMACS_INT to_byte,
+		      Lisp_Object dst_object)
+{
+  int count = SPECPDL_INDEX ();
   EMACS_INT chars = to - from;
   EMACS_INT bytes = to_byte - from_byte;
   Lisp_Object attrs;
@@ -8165,7 +8076,7 @@
 
 
 Lisp_Object
-preferred_coding_system ()
+preferred_coding_system (void)
 {
   int id = coding_categories[coding_priorities[0]].id;
 
@@ -8269,13 +8180,10 @@
    detect only text-format.  */
 
 Lisp_Object
-detect_coding_system (src, src_chars, src_bytes, highest, multibytep,
-		      coding_system)
-     const unsigned char *src;
-     EMACS_INT src_chars, src_bytes;
-     int highest;
-     int multibytep;
-     Lisp_Object coding_system;
+detect_coding_system (const unsigned char *src,
+		      EMACS_INT src_chars, EMACS_INT src_bytes,
+		      int highest, int multibytep,
+		      Lisp_Object coding_system)
 {
   const unsigned char *src_end = src + src_bytes;
   Lisp_Object attrs, eol_type;
@@ -8643,9 +8551,7 @@
 
 
 static INLINE int
-char_encodable_p (c, attrs)
-     int c;
-     Lisp_Object attrs;
+char_encodable_p (int c, Lisp_Object attrs)
 {
   Lisp_Object tail;
   struct charset *charset;
@@ -9031,9 +8937,9 @@
 
 
 Lisp_Object
-code_convert_region (start, end, coding_system, dst_object, encodep, norecord)
-     Lisp_Object start, end, coding_system, dst_object;
-     int encodep, norecord;
+code_convert_region (Lisp_Object start, Lisp_Object end,
+		     Lisp_Object coding_system, Lisp_Object dst_object,
+		     int encodep, int norecord)
 {
   struct coding_system coding;
   EMACS_INT from, from_byte, to, to_byte;
@@ -9172,9 +9078,8 @@
    ENCODE_FILE, thus we ignore character composition.  */
 
 Lisp_Object
-code_convert_string_norecord (string, coding_system, encodep)
-     Lisp_Object string, coding_system;
-     int encodep;
+code_convert_string_norecord (Lisp_Object string, Lisp_Object coding_system,
+			      int encodep)
 {
   return code_convert_string (string, coding_system, Qt, encodep, 0, 1);
 }
@@ -9577,7 +9482,7 @@
   int changed[coding_category_max];
   enum coding_category priorities[coding_category_max];
 
-  bzero (changed, sizeof changed);
+  memset (changed, 0, sizeof changed);
 
   for (i = j = 0; i < nargs; i++)
     {
@@ -9612,7 +9517,7 @@
       priorities[i] = coding_priorities[j];
     }
 
-  bcopy (priorities, coding_priorities, sizeof priorities);
+  memcpy (coding_priorities, priorities, sizeof priorities);
 
   /* Update `coding-category-list'.  */
   Vcoding_category_list = Qnil;
@@ -9656,19 +9561,18 @@
 static const char *const suffixes[] = { "-unix", "-dos", "-mac" };
 
 static Lisp_Object
-make_subsidiaries (base)
-     Lisp_Object base;
+make_subsidiaries (Lisp_Object base)
 {
   Lisp_Object subsidiaries;
   int base_name_len = SBYTES (SYMBOL_NAME (base));
   char *buf = (char *) alloca (base_name_len + 6);
   int i;
 
-  bcopy (SDATA (SYMBOL_NAME (base)), buf, base_name_len);
+  memcpy (buf, SDATA (SYMBOL_NAME (base)), base_name_len);
   subsidiaries = Fmake_vector (make_number (3), Qnil);
   for (i = 0; i < 3; i++)
     {
-      bcopy (suffixes[i], buf + base_name_len, strlen (suffixes[i]) + 1);
+      memcpy (buf + base_name_len, suffixes[i], strlen (suffixes[i]) + 1);
       ASET (subsidiaries, i, intern (buf));
     }
   return subsidiaries;
@@ -10210,7 +10114,7 @@
 DEFUN ("coding-system-put", Fcoding_system_put, Scoding_system_put,
        3, 3, 0,
        doc: /* Change value in CODING-SYSTEM's property list PROP to VAL.  */)
-  (coding_system, prop, val)
+     (coding_system, prop, val)
      Lisp_Object coding_system, prop, val;
 {
   Lisp_Object spec, attrs;
@@ -10308,7 +10212,7 @@
        1, 1, 0,
        doc: /* Return the base of CODING-SYSTEM.
 Any alias or subsidiary coding system is not a base coding system.  */)
-  (coding_system)
+     (coding_system)
      Lisp_Object coding_system;
 {
   Lisp_Object spec, attrs;
@@ -10385,7 +10289,7 @@
 /*** 9. Post-amble ***/
 
 void
-init_coding_once ()
+init_coding_once (void)
 {
   int i;
 
@@ -10427,7 +10331,7 @@
 #ifdef emacs
 
 void
-syms_of_coding ()
+syms_of_coding (void)
 {
   staticpro (&Vcoding_system_hash_table);
   {
@@ -10968,7 +10872,7 @@
     for (i = 0; i < coding_category_max; i++)
       Fset (AREF (Vcoding_category_table, i), Qno_conversion);
   }
-#if defined (MSDOS) || defined (WINDOWSNT)
+#if defined (DOS_NT)
   system_eol_type = Qdos;
 #else
   system_eol_type = Qunix;
@@ -10977,8 +10881,7 @@
 }
 
 char *
-emacs_strerror (error_number)
-     int error_number;
+emacs_strerror (int error_number)
 {
   char *str;
 
--- a/src/coding.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/coding.h	Thu Jul 08 17:09:35 2010 +0900
@@ -499,10 +499,10 @@
 
   int default_char;
 
-  int (*detector) P_ ((struct coding_system *,
-		       struct coding_detection_info *));
-  void (*decoder) P_ ((struct coding_system *));
-  int (*encoder) P_ ((struct coding_system *));
+  int (*detector) (struct coding_system *,
+                   struct coding_detection_info *);
+  void (*decoder) (struct coding_system *);
+  int (*encoder) (struct coding_system *);
 };
 
 /* Meanings of bits in the member `common_flags' of the structure
@@ -691,33 +691,33 @@
 #define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, 1)
 
 /* Extern declarations.  */
-extern Lisp_Object code_conversion_save P_ ((int, int));
-extern int decoding_buffer_size P_ ((struct coding_system *, int));
-extern int encoding_buffer_size P_ ((struct coding_system *, int));
-extern void setup_coding_system P_ ((Lisp_Object, struct coding_system *));
-extern Lisp_Object coding_charset_list P_ ((struct coding_system *));
-extern Lisp_Object coding_system_charset_list P_ ((Lisp_Object));
-extern void detect_coding P_ ((struct coding_system *));
-extern Lisp_Object code_convert_region P_ ((Lisp_Object, Lisp_Object,
-					    Lisp_Object, Lisp_Object,
-					    int, int));
-extern Lisp_Object code_convert_string P_ ((Lisp_Object, Lisp_Object,
-					    Lisp_Object, int, int, int));
-extern Lisp_Object code_convert_string_norecord P_ ((Lisp_Object, Lisp_Object,
-						     int));
-extern Lisp_Object raw_text_coding_system P_ ((Lisp_Object));
-extern Lisp_Object coding_inherit_eol_type P_ ((Lisp_Object, Lisp_Object));
+extern Lisp_Object code_conversion_save (int, int);
+extern int decoding_buffer_size (struct coding_system *, int);
+extern int encoding_buffer_size (struct coding_system *, int);
+extern void setup_coding_system (Lisp_Object, struct coding_system *);
+extern Lisp_Object coding_charset_list (struct coding_system *);
+extern Lisp_Object coding_system_charset_list (Lisp_Object);
+extern void detect_coding (struct coding_system *);
+extern Lisp_Object code_convert_region (Lisp_Object, Lisp_Object,
+                                        Lisp_Object, Lisp_Object,
+                                        int, int);
+extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object,
+                                        Lisp_Object, int, int, int);
+extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object,
+                                                 int);
+extern Lisp_Object raw_text_coding_system (Lisp_Object);
+extern Lisp_Object coding_inherit_eol_type (Lisp_Object, Lisp_Object);
 
-extern int decode_coding_gap P_ ((struct coding_system *,
-				  EMACS_INT, EMACS_INT));
-extern int encode_coding_gap P_ ((struct coding_system *,
-				  EMACS_INT, EMACS_INT));
-extern void decode_coding_object P_ ((struct coding_system *,
-				      Lisp_Object, EMACS_INT, EMACS_INT,
-				      EMACS_INT, EMACS_INT, Lisp_Object));
-extern void encode_coding_object P_ ((struct coding_system *,
-				      Lisp_Object, EMACS_INT, EMACS_INT,
-				      EMACS_INT, EMACS_INT, Lisp_Object));
+extern int decode_coding_gap (struct coding_system *,
+                              EMACS_INT, EMACS_INT);
+extern int encode_coding_gap (struct coding_system *,
+                              EMACS_INT, EMACS_INT);
+extern void decode_coding_object (struct coding_system *,
+                                  Lisp_Object, EMACS_INT, EMACS_INT,
+                                  EMACS_INT, EMACS_INT, Lisp_Object);
+extern void encode_coding_object (struct coding_system *,
+                                  Lisp_Object, EMACS_INT, EMACS_INT,
+                                  EMACS_INT, EMACS_INT, Lisp_Object);
 
 /* Macros for backward compatibility.  */
 
@@ -753,7 +753,7 @@
   } while (0)
 
 
-extern Lisp_Object preferred_coding_system P_ (());
+extern Lisp_Object preferred_coding_system (void);
 
 
 extern Lisp_Object Qutf_8, Qutf_8_emacs;
@@ -780,7 +780,7 @@
 extern Lisp_Object Qstart_process, Qopen_network_stream;
 extern Lisp_Object Qwrite_region;
 
-extern char *emacs_strerror P_ ((int));
+extern char *emacs_strerror (int);
 
 /* Coding-system for reading files and receiving data from process.  */
 extern Lisp_Object Vcoding_system_for_read;
@@ -823,7 +823,7 @@
 extern Lisp_Object Qcoding_system_error;
 
 extern char emacs_mule_bytes[256];
-extern int emacs_mule_string_char P_ ((unsigned char *));
+extern int emacs_mule_string_char (unsigned char *);
 
 #endif /* EMACS_CODING_H */
 
--- a/src/composite.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/composite.c	Thu Jul 08 17:09:35 2010 +0900
@@ -180,9 +180,7 @@
    If the composition is invalid, return -1.  */
 
 int
-get_composition_id (charpos, bytepos, nchars, prop, string)
-     int charpos, bytepos, nchars;
-     Lisp_Object prop, string;
+get_composition_id (int charpos, int bytepos, int nchars, Lisp_Object prop, Lisp_Object string)
 {
   Lisp_Object id, length, components, key, *key_contents;
   int glyph_len;
@@ -429,10 +427,7 @@
    This doesn't check the validity of composition.  */
 
 int
-find_composition (pos, limit, start, end, prop, object)
-     int pos, limit;
-     EMACS_INT *start, *end;
-     Lisp_Object *prop, object;
+find_composition (int pos, int limit, EMACS_INT *start, EMACS_INT *end, Lisp_Object *prop, Lisp_Object object)
 {
   Lisp_Object val;
 
@@ -470,9 +465,7 @@
    FROM and TO with property PROP.  */
 
 static void
-run_composition_function (from, to, prop)
-     int from, to;
-     Lisp_Object prop;
+run_composition_function (int from, int to, Lisp_Object prop)
 {
   Lisp_Object func;
   EMACS_INT start, end;
@@ -504,9 +497,7 @@
    change is deletion, FROM == TO.  Otherwise, FROM < TO.  */
 
 void
-update_compositions (from, to, check_mask)
-     EMACS_INT from, to;
-     int check_mask;
+update_compositions (EMACS_INT from, EMACS_INT to, int check_mask)
 {
   Lisp_Object prop;
   EMACS_INT start, end;
@@ -612,8 +603,7 @@
    top-level copies of them so that none of them are `eq'.  */
 
 void
-make_composition_value_copy (list)
-     Lisp_Object list;
+make_composition_value_copy (Lisp_Object list)
 {
   Lisp_Object plist, val;
 
@@ -638,9 +628,7 @@
    indices START and END in STRING.  */
 
 void
-compose_text (start, end, components, modification_func, string)
-     int start, end;
-     Lisp_Object components, modification_func, string;
+compose_text (int start, int end, Lisp_Object components, Lisp_Object modification_func, Lisp_Object string)
 {
   Lisp_Object prop;
 
@@ -651,9 +639,9 @@
 }
 
 
-static Lisp_Object autocmp_chars P_ ((Lisp_Object, EMACS_INT, EMACS_INT,
-				      EMACS_INT, struct window *,
-				      struct face *, Lisp_Object));
+static Lisp_Object autocmp_chars (Lisp_Object, EMACS_INT, EMACS_INT,
+                                  EMACS_INT, struct window *,
+                                  struct face *, Lisp_Object);
 
 
 /* Lisp glyph-string handlers */
@@ -664,11 +652,10 @@
 
 static Lisp_Object gstring_hash_table;
 
-static Lisp_Object gstring_lookup_cache P_ ((Lisp_Object));
+static Lisp_Object gstring_lookup_cache (Lisp_Object);
 
 static Lisp_Object
-gstring_lookup_cache (header)
-     Lisp_Object header;
+gstring_lookup_cache (Lisp_Object header)
 {
   struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table);
   int i = hash_lookup (h, header, NULL);
@@ -677,9 +664,7 @@
 }
 
 Lisp_Object
-composition_gstring_put_cache (gstring, len)
-     Lisp_Object gstring;
-     int len;
+composition_gstring_put_cache (Lisp_Object gstring, int len)
 {
   struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table);
   unsigned hash;
@@ -707,21 +692,19 @@
 }
 
 Lisp_Object
-composition_gstring_from_id (id)
-     int id;
+composition_gstring_from_id (int id)
 {
   struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table);
 
   return HASH_VALUE (h, id);
 }
 
-static Lisp_Object fill_gstring_header P_ ((Lisp_Object, Lisp_Object,
-					    Lisp_Object, Lisp_Object,
-					    Lisp_Object));
+static Lisp_Object fill_gstring_header (Lisp_Object, Lisp_Object,
+                                        Lisp_Object, Lisp_Object,
+                                        Lisp_Object);
 
 int
-composition_gstring_p (gstring)
-     Lisp_Object gstring;
+composition_gstring_p (Lisp_Object gstring)
 {
   Lisp_Object header;
   int i;
@@ -752,10 +735,7 @@
 }
 
 int
-composition_gstring_width (gstring, from, to, metrics)
-     Lisp_Object gstring;
-     int from, to;
-     struct font_metrics *metrics;
+composition_gstring_width (Lisp_Object gstring, int from, int to, struct font_metrics *metrics)
 {
   Lisp_Object *glyph;
   int width = 0;
@@ -811,8 +791,7 @@
 static Lisp_Object gstring_work_headers;
 
 static Lisp_Object
-fill_gstring_header (header, start, end, font_object, string)
-     Lisp_Object header, start, end, font_object, string;
+fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end, Lisp_Object font_object, Lisp_Object string)
 {
   EMACS_INT from, to, from_byte;
   EMACS_INT len, i;
@@ -869,11 +848,10 @@
   return header;
 }
 
-extern void font_fill_lglyph_metrics P_ ((Lisp_Object, Lisp_Object));
+extern void font_fill_lglyph_metrics (Lisp_Object, Lisp_Object);
 
 static void
-fill_gstring_body (gstring)
-     Lisp_Object gstring;
+fill_gstring_body (Lisp_Object gstring)
 {
   Lisp_Object font_object = LGSTRING_FONT (gstring);
   Lisp_Object header = AREF (gstring, 0);
@@ -923,12 +901,7 @@
    object.  Otherwise return nil.  */
 
 static Lisp_Object
-autocmp_chars (rule, charpos, bytepos, limit, win, face, string)
-     Lisp_Object rule;
-     EMACS_INT charpos, bytepos, limit;
-     struct window *win;
-     struct face *face;
-     Lisp_Object string;
+autocmp_chars (Lisp_Object rule, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT limit, struct window *win, struct face *face, Lisp_Object string)
 {
   int count = SPECPDL_INDEX ();
   FRAME_PTR f = XFRAME (win->frame);
@@ -1020,10 +993,7 @@
    composition.  */
 
 void
-composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string)
-     struct composition_it *cmp_it;
-     EMACS_INT charpos, bytepos, endpos;
-     Lisp_Object string;
+composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT endpos, Lisp_Object string)
 {
   EMACS_INT start, end, c;
   Lisp_Object prop, val;
@@ -1253,12 +1223,7 @@
    CMP_IT->stop_pos, and return 0.  */
 
 int
-composition_reseat_it (cmp_it, charpos, bytepos, endpos, w, face, string)
-     struct composition_it *cmp_it;
-     EMACS_INT charpos, bytepos, endpos;
-     struct window *w;
-     struct face *face;
-     Lisp_Object string;
+composition_reseat_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT endpos, struct window *w, struct face *face, Lisp_Object string)
 {
   if (endpos <= charpos)
     {
@@ -1417,10 +1382,7 @@
    the cluster, or -1 if the composition is somehow broken.  */
 
 int
-composition_update_it (cmp_it, charpos, bytepos, string)
-     struct composition_it *cmp_it;
-     EMACS_INT charpos, bytepos;
-     Lisp_Object string;
+composition_update_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, Lisp_Object string)
 {
   int i, c;
 
@@ -1543,9 +1505,7 @@
    the composition, and return 1.  Otherwise, return 0.  */
 
 static int
-find_automatic_composition (pos, limit, start, end, gstring, string)
-     EMACS_INT pos, limit, *start, *end;
-     Lisp_Object *gstring, string;
+find_automatic_composition (EMACS_INT pos, EMACS_INT limit, EMACS_INT *start, EMACS_INT *end, Lisp_Object *gstring, Lisp_Object string)
 {
   EMACS_INT head, tail, stop;
   /* Limit to check a composition after POS.  */
@@ -1716,8 +1676,7 @@
    to NEW_PT.  */
 
 int
-composition_adjust_point (last_pt, new_pt)
-     EMACS_INT last_pt, new_pt;
+composition_adjust_point (EMACS_INT last_pt, EMACS_INT new_pt)
 {
   EMACS_INT charpos, bytepos, startpos, beg, end, pos;
   Lisp_Object val;
@@ -1974,7 +1933,7 @@
 
 
 void
-syms_of_composite ()
+syms_of_composite (void)
 {
   int i;
 
--- a/src/composite.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/composite.h	Thu Jul 08 17:09:35 2010 +0900
@@ -212,16 +212,16 @@
 extern Lisp_Object Qauto_composition_function;
 extern Lisp_Object Vcomposition_function_table;
 
-extern int get_composition_id P_ ((int, int, int, Lisp_Object, Lisp_Object));
-extern int find_composition P_ ((int, int, EMACS_INT *, EMACS_INT *, Lisp_Object *,
-				 Lisp_Object));
-extern void update_compositions P_ ((EMACS_INT, EMACS_INT, int));
-extern void make_composition_value_copy P_ ((Lisp_Object));
-extern void compose_region P_ ((int, int, Lisp_Object, Lisp_Object,
-				Lisp_Object));
-extern void syms_of_composite P_ ((void));
-extern void compose_text P_ ((int, int, Lisp_Object, Lisp_Object,
-			      Lisp_Object));
+extern int get_composition_id (int, int, int, Lisp_Object, Lisp_Object);
+extern int find_composition (int, int, EMACS_INT *, EMACS_INT *, Lisp_Object *,
+                             Lisp_Object);
+extern void update_compositions (EMACS_INT, EMACS_INT, int);
+extern void make_composition_value_copy (Lisp_Object);
+extern void compose_region (int, int, Lisp_Object, Lisp_Object,
+                            Lisp_Object);
+extern void syms_of_composite (void);
+extern void compose_text (int, int, Lisp_Object, Lisp_Object,
+                          Lisp_Object);
 
 /* Macros for lispy glyph-string.  This is completely different from
    struct glyph_string.  */
@@ -303,23 +303,23 @@
 struct face;
 struct font_metrics;
 
-extern Lisp_Object composition_gstring_put_cache P_ ((Lisp_Object, int));
-extern Lisp_Object composition_gstring_from_id P_ ((int));
-extern int composition_gstring_p P_ ((Lisp_Object));
-extern int composition_gstring_width P_ ((Lisp_Object, int, int,
-					  struct font_metrics *));
+extern Lisp_Object composition_gstring_put_cache (Lisp_Object, int);
+extern Lisp_Object composition_gstring_from_id (int);
+extern int composition_gstring_p (Lisp_Object);
+extern int composition_gstring_width (Lisp_Object, int, int,
+                                      struct font_metrics *);
 
-extern void composition_compute_stop_pos P_ ((struct composition_it *,
-					      EMACS_INT, EMACS_INT, EMACS_INT,
-					      Lisp_Object));
-extern int composition_reseat_it P_ ((struct composition_it *,
-				      EMACS_INT, EMACS_INT, EMACS_INT,
-				      struct window *, struct face *,
-				      Lisp_Object));
-extern int composition_update_it P_ ((struct composition_it *,
-				      EMACS_INT, EMACS_INT, Lisp_Object));
+extern void composition_compute_stop_pos (struct composition_it *,
+                                          EMACS_INT, EMACS_INT, EMACS_INT,
+                                          Lisp_Object);
+extern int composition_reseat_it (struct composition_it *,
+                                  EMACS_INT, EMACS_INT, EMACS_INT,
+                                  struct window *, struct face *,
+                                  Lisp_Object);
+extern int composition_update_it (struct composition_it *,
+                                  EMACS_INT, EMACS_INT, Lisp_Object);
 
-extern int composition_adjust_point P_ ((EMACS_INT, EMACS_INT));
+extern int composition_adjust_point (EMACS_INT, EMACS_INT);
 
 EXFUN (Fcompose_region_internal, 4);
 EXFUN (Fcompose_string_internal, 5);
--- a/src/config.in	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/config.in	Thu Jul 08 17:09:35 2010 +0900
@@ -102,15 +102,6 @@
 /* Define to 1 if ALSA is available. */
 #undef HAVE_ALSA
 
-/* Define to 1 if you have the `bcmp' function. */
-#undef HAVE_BCMP
-
-/* Define to 1 if you have the `bcopy' function. */
-#undef HAVE_BCOPY
-
-/* Define to 1 if you have the `bzero' function. */
-#undef HAVE_BZERO
-
 /* Define to 1 if you have the `cbrt' function. */
 #undef HAVE_CBRT
 
@@ -933,6 +924,9 @@
 /* Define to 1 if using GTK. */
 #undef USE_GTK
 
+/* Define this to use a lisp union for the Lisp_Object data type. */
+#undef USE_LISP_UNION_TYPE
+
 /* Define to 1 if using the Lucid X toolkit. */
 #undef USE_LUCID
 
@@ -1104,11 +1098,6 @@
 
 #define my_strftime nstrftime	/* for strftime.c */
 
-/* Some of the files of Emacs which are intended for use with other
-   programs assume that if you have a config.h file, you must declare
-   the type of getenv.  */
-extern char *getenv ();
-
 /* These default definitions are good for almost all machines.
    The exceptions override them in m/MACHINE.h.  */
 
@@ -1138,23 +1127,11 @@
 /* Define if the compiler supports function prototypes.  It may do so but
    not define __STDC__ (e.g. DEC C by default) or may define it as zero.  */
 #undef PROTOTYPES
-/* For mktime.c:  */
-#ifndef __P
-# if defined PROTOTYPES
-#  define __P(args) args
-# else
-#  define __P(args) ()
-# endif  /* GCC.  */
-#endif /* __P */
 
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
 
-#ifdef HAVE_STRINGS_H
-#include <strings.h>  /* May be needed for bcopy & al.  */
-#endif
-
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
@@ -1196,16 +1173,6 @@
 #  endif
 #endif
 
-#ifndef HAVE_BCOPY
-#define bcopy(a,b,s) memcpy (b,a,s)
-#endif
-#ifndef HAVE_BZERO
-#define bzero(a,s) memset (a,0,s)
-#endif
-#ifndef HAVE_BCMP
-#define BCMP memcmp
-#endif
-
 #endif /* EMACS_CONFIG_H */
 
 /*
--- a/src/data.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/data.c	Thu Jul 08 17:09:35 2010 +0900
@@ -50,7 +50,7 @@
 #include <math.h>
 
 #if !defined (atof)
-extern double atof ();
+extern double atof (const char *);
 #endif /* !atof */
 
 Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound;
@@ -97,16 +97,14 @@
 
 
 void
-circular_list_error (list)
-     Lisp_Object list;
+circular_list_error (Lisp_Object list)
 {
   xsignal (Qcircular_list, list);
 }
 
 
 Lisp_Object
-wrong_type_argument (predicate, value)
-     register Lisp_Object predicate, value;
+wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value)
 {
   /* If VALUE is not even a valid Lisp object, we'd want to abort here
      where we can get a backtrace showing where it came from.  We used
@@ -119,21 +117,19 @@
 }
 
 void
-pure_write_error ()
+pure_write_error (void)
 {
   error ("Attempt to modify read-only object");
 }
 
 void
-args_out_of_range (a1, a2)
-     Lisp_Object a1, a2;
+args_out_of_range (Lisp_Object a1, Lisp_Object a2)
 {
   xsignal2 (Qargs_out_of_range, a1, a2);
 }
 
 void
-args_out_of_range_3 (a1, a2, a3)
-     Lisp_Object a1, a2, a3;
+args_out_of_range_3 (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3)
 {
   xsignal3 (Qargs_out_of_range, a1, a2, a3);
 }
@@ -146,8 +142,7 @@
 /* On a few machines, XINT can only be done by calling this.  */
 
 int
-sign_extend_lisp_int (num)
-     EMACS_INT num;
+sign_extend_lisp_int (EMACS_INT num)
 {
   if (num & (((EMACS_INT) 1) << (VALBITS - 1)))
     return num | (((EMACS_INT) (-1)) << VALBITS);
@@ -840,8 +835,7 @@
    indirections contains a loop.  */
 
 struct Lisp_Symbol *
-indirect_variable (symbol)
-     struct Lisp_Symbol *symbol;
+indirect_variable (struct Lisp_Symbol *symbol)
 {
   struct Lisp_Symbol *tortoise, *hare;
 
@@ -892,8 +886,7 @@
   ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv))
 
 Lisp_Object
-do_symval_forwarding (valcontents)
-     register union Lisp_Fwd *valcontents;
+do_symval_forwarding (register union Lisp_Fwd *valcontents)
 {
   register Lisp_Object val;
   switch (XFWDTYPE (valcontents))
@@ -947,11 +940,7 @@
   } while (0)
 
 static void
-store_symval_forwarding (/* symbol, */ valcontents, newval, buf)
-     /* struct Lisp_Symbol *symbol; */
-     union Lisp_Fwd *valcontents;
-     register Lisp_Object newval;
-     struct buffer *buf;
+store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newval, struct buffer *buf)
 {
   switch (XFWDTYPE (valcontents))
     {
@@ -1032,8 +1021,7 @@
    This makes it safe to alter the status of other bindings.  */
 
 void
-swap_in_global_binding (symbol)
-     struct Lisp_Symbol *symbol;
+swap_in_global_binding (struct Lisp_Symbol *symbol)
 {
   struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (symbol);
 
@@ -1059,9 +1047,7 @@
    This could be another forwarding pointer.  */
 
 static void
-swap_in_symval_forwarding (symbol, blv)
-     struct Lisp_Symbol *symbol;
-     struct Lisp_Buffer_Local_Value *blv;
+swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_Value *blv)
 {
   register Lisp_Object tem1;
 
@@ -1111,8 +1097,7 @@
    within this function.  Great care is required for this.  */
 
 Lisp_Object
-find_symbol_value (symbol)
-     Lisp_Object symbol;
+find_symbol_value (Lisp_Object symbol)
 {
   struct Lisp_Symbol *sym;
 
@@ -1183,8 +1168,7 @@
 }
 
 static int
-let_shadows_global_binding_p (symbol)
-     Lisp_Object symbol;
+let_shadows_global_binding_p (Lisp_Object symbol)
 {
   struct specbinding *p;
 
@@ -1204,9 +1188,7 @@
    If BINDFLAG is nonzero, we don't do that.  */
 
 void
-set_internal (symbol, newval, where, bindflag)
-     register Lisp_Object symbol, newval, where;
-     int bindflag;
+set_internal (register Lisp_Object symbol, register Lisp_Object newval, register Lisp_Object where, int bindflag)
 {
   int voide = EQ (newval, Qunbound);
   struct Lisp_Symbol *sym;
@@ -1357,8 +1339,7 @@
    Return Qunbound if it is void.  */
 
 Lisp_Object
-default_value (symbol)
-     Lisp_Object symbol;
+default_value (Lisp_Object symbol)
 {
   struct Lisp_Symbol *sym;
 
@@ -2057,7 +2038,7 @@
 /* This code is disabled now that we use the selected frame to return
    keyboard-local-values. */
 #if 0
-extern struct terminal *get_terminal P_ ((Lisp_Object display, int));
+extern struct terminal *get_terminal (Lisp_Object display, int);
 
 DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0,
        doc: /* Return the terminal-local value of SYMBOL on TERMINAL.
@@ -2109,8 +2090,7 @@
    This is like Findirect_function, except that it doesn't signal an
    error if the chain ends up unbound.  */
 Lisp_Object
-indirect_function (object)
-     register Lisp_Object object;
+indirect_function (register Lisp_Object object)
 {
   Lisp_Object tortoise, hare;
 
@@ -2284,13 +2264,13 @@
 	  USE_SAFE_ALLOCA;
 
 	  SAFE_ALLOCA (str, unsigned char *, nbytes);
-	  bcopy (SDATA (array), str, nbytes);
+	  memcpy (str, SDATA (array), nbytes);
 	  allocate_string_data (XSTRING (array), nchars,
 				nbytes + new_bytes - prev_bytes);
-	  bcopy (str, SDATA (array), idxval_byte);
+	  memcpy (SDATA (array), str, idxval_byte);
 	  p1 = SDATA (array) + idxval_byte;
-	  bcopy (str + idxval_byte + prev_bytes, p1 + new_bytes,
-		 nbytes - (idxval_byte + prev_bytes));
+	  memcpy (p1 + new_bytes, str + idxval_byte + prev_bytes,
+		  nbytes - (idxval_byte + prev_bytes));
 	  SAFE_FREE ();
 	  clear_string_char_byte_cache ();
 	}
@@ -2326,9 +2306,7 @@
 enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal };
 
 Lisp_Object
-arithcompare (num1, num2, comparison)
-     Lisp_Object num1, num2;
-     enum comparison comparison;
+arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison)
 {
   double f1 = 0, f2 = 0;
   int floatp = 0;
@@ -2454,8 +2432,7 @@
    when the value fits in one.  */
 
 Lisp_Object
-long_to_cons (i)
-     unsigned long i;
+long_to_cons (long unsigned int i)
 {
   unsigned long top = i >> 16;
   unsigned int bot = i & 0xFFFF;
@@ -2467,8 +2444,7 @@
 }
 
 unsigned long
-cons_to_long (c)
-     Lisp_Object c;
+cons_to_long (Lisp_Object c)
 {
   Lisp_Object top, bot;
   if (INTEGERP (c))
@@ -2509,8 +2485,7 @@
 }
 
 INLINE static int
-digit_to_number (character, base)
-     int character, base;
+digit_to_number (int character, int base)
 {
   int digit;
 
@@ -2605,15 +2580,12 @@
     Amin
   };
 
-static Lisp_Object float_arith_driver P_ ((double, int, enum arithop,
-					   int, Lisp_Object *));
-extern Lisp_Object fmod_float ();
+static Lisp_Object float_arith_driver (double, int, enum arithop,
+                                       int, Lisp_Object *);
+extern Lisp_Object fmod_float (Lisp_Object, Lisp_Object);
 
 Lisp_Object
-arith_driver (code, nargs, args)
-     enum arithop code;
-     int nargs;
-     register Lisp_Object *args;
+arith_driver (enum arithop code, int nargs, register Lisp_Object *args)
 {
   register Lisp_Object val;
   register int argnum;
@@ -2698,12 +2670,7 @@
 #define isnan(x) ((x) != (x))
 
 static Lisp_Object
-float_arith_driver (accum, argnum, code, nargs, args)
-     double accum;
-     register int argnum;
-     enum arithop code;
-     int nargs;
-     register Lisp_Object *args;
+float_arith_driver (double accum, register int argnum, enum arithop code, int nargs, register Lisp_Object *args)
 {
   register Lisp_Object val;
   double next;
@@ -3038,7 +3005,7 @@
 
 
 void
-syms_of_data ()
+syms_of_data (void)
 {
   Lisp_Object error_tail, arith_tail;
 
@@ -3467,8 +3434,7 @@
 }
 
 SIGTYPE
-arith_error (signo)
-     int signo;
+arith_error (int signo)
 {
   sigsetmask (SIGEMPTYMASK);
 
@@ -3477,7 +3443,7 @@
 }
 
 void
-init_data ()
+init_data (void)
 {
   /* Don't do this if just dumping out.
      We don't want to call `signal' in this case
--- a/src/dbusbind.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/dbusbind.c	Thu Jul 08 17:09:35 2010 +0900
@@ -163,8 +163,7 @@
 /* Determine the DBusType of a given Lisp symbol.  OBJECT must be one
    of the predefined D-Bus type symbols.  */
 static int
-xd_symbol_to_dbus_type (object)
-     Lisp_Object object;
+xd_symbol_to_dbus_type (Lisp_Object object)
 {
   return
     ((EQ (object, QCdbus_type_byte)) ? DBUS_TYPE_BYTE
@@ -221,10 +220,7 @@
    signature is embedded, or DBUS_TYPE_INVALID.  It is needed for the
    check that DBUS_TYPE_DICT_ENTRY occurs only as array element.  */
 static void
-xd_signature (signature, dtype, parent_type, object)
-     char *signature;
-     unsigned int dtype, parent_type;
-     Lisp_Object object;
+xd_signature (char *signature, unsigned int dtype, unsigned int parent_type, Lisp_Object object)
 {
   unsigned int subtype;
   Lisp_Object elt;
@@ -393,10 +389,7 @@
    `dbus-send-signal', into corresponding C values appended as
    arguments to a D-Bus message.  */
 static void
-xd_append_arg (dtype, object, iter)
-     unsigned int dtype;
-     Lisp_Object object;
-     DBusMessageIter *iter;
+xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter)
 {
   char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH];
   DBusMessageIter subiter;
@@ -604,9 +597,7 @@
    D-Bus message must be a valid DBusType.  Compound D-Bus types
    result always in a Lisp list.  */
 static Lisp_Object
-xd_retrieve_arg (dtype, iter)
-     unsigned int dtype;
-     DBusMessageIter *iter;
+xd_retrieve_arg (unsigned int dtype, DBusMessageIter *iter)
 {
 
   switch (dtype)
@@ -725,8 +716,7 @@
 /* Initialize D-Bus connection.  BUS is a Lisp symbol, either :system
    or :session.  It tells which D-Bus to be initialized.  */
 static DBusConnection *
-xd_initialize (bus)
-     Lisp_Object bus;
+xd_initialize (Lisp_Object bus)
 {
   DBusConnection *connection;
   DBusError derror;
@@ -766,9 +756,7 @@
 /* Add connection file descriptor to input_wait_mask, in order to
    let select() detect, whether a new message has been arrived.  */
 dbus_bool_t
-xd_add_watch (watch, data)
-     DBusWatch *watch;
-     void *data;
+xd_add_watch (DBusWatch *watch, void *data)
 {
   /* We check only for incoming data.  */
   if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE)
@@ -797,9 +785,7 @@
 /* Remove connection file descriptor from input_wait_mask.  DATA is
    the used bus, either QCdbus_system_bus or QCdbus_session_bus.  */
 void
-xd_remove_watch (watch, data)
-     DBusWatch *watch;
-     void *data;
+xd_remove_watch (DBusWatch *watch, void *data)
 {
   /* We check only for incoming data.  */
   if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE)
@@ -1569,8 +1555,7 @@
 /* Check, whether there is pending input in the message queue of the
    D-Bus BUS.  BUS is a Lisp symbol, either :system or :session.  */
 int
-xd_get_dispatch_status (bus)
-     Lisp_Object bus;
+xd_get_dispatch_status (Lisp_Object bus)
 {
   DBusConnection *connection;
 
@@ -1589,7 +1574,7 @@
 
 /* Check for queued incoming messages from the system and session buses.  */
 int
-xd_pending_messages ()
+xd_pending_messages (void)
 {
 
   /* Vdbus_registered_objects_table will be initialized as hash table
@@ -1606,8 +1591,7 @@
 /* Read queued incoming message of the D-Bus BUS.  BUS is a Lisp
    symbol, either :system or :session.  */
 static Lisp_Object
-xd_read_message (bus)
-     Lisp_Object bus;
+xd_read_message (Lisp_Object bus)
 {
   Lisp_Object args, key, value;
   struct gcpro gcpro1;
@@ -1764,7 +1748,7 @@
 
 /* Read queued incoming messages from the system and session buses.  */
 void
-xd_read_queued_messages ()
+xd_read_queued_messages (void)
 {
 
   /* Vdbus_registered_objects_table will be initialized as hash table
@@ -1990,7 +1974,7 @@
 
 
 void
-syms_of_dbusbind ()
+syms_of_dbusbind (void)
 {
 
   Qdbus_init_bus = intern_c_string ("dbus-init-bus");
--- a/src/dired.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/dired.c	Thu Jul 08 17:09:35 2010 +0900
@@ -90,10 +90,10 @@
 #include "blockinput.h"
 
 /* Returns a search buffer, with a fastmap allocated and ready to go.  */
-extern struct re_pattern_buffer *compile_pattern ();
+extern struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *, Lisp_Object, int, int);
 
 /* From filemode.c.  Can't go in Lisp.h because of `stat'.  */
-extern void filemodestring P_ ((struct stat *, char *));
+extern void filemodestring (struct stat *, char *);
 
 /* if system does not have symbolic links, it does not have lstat.
    In that case, use ordinary stat instead.  */
@@ -115,7 +115,7 @@
 Lisp_Object Qfile_attributes;
 Lisp_Object Qfile_attributes_lessp;
 
-static int scmp P_ ((unsigned char *, unsigned char *, int));
+static int scmp (unsigned char *, unsigned char *, int);
 
 #ifdef WINDOWSNT
 Lisp_Object
@@ -127,8 +127,7 @@
 #endif
 
 Lisp_Object
-directory_files_internal_unwind (dh)
-     Lisp_Object dh;
+directory_files_internal_unwind (Lisp_Object dh)
 {
   DIR *d = (DIR *) XSAVE_VALUE (dh)->pointer;
   BLOCK_INPUT;
@@ -143,10 +142,7 @@
    In the latter case, ID_FORMAT is passed to Ffile_attributes.  */
 
 Lisp_Object
-directory_files_internal (directory, full, match, nosort, attrs, id_format)
-     Lisp_Object directory, full, match, nosort;
-     int attrs;
-     Lisp_Object id_format;
+directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object match, Lisp_Object nosort, int attrs, Lisp_Object id_format)
 {
   DIR *d;
   int directory_nbytes;
@@ -293,15 +289,14 @@
 		  int nchars;
 
 		  fullname = make_uninit_multibyte_string (nbytes, nbytes);
-		  bcopy (SDATA (directory), SDATA (fullname),
-			 directory_nbytes);
+		  memcpy (SDATA (fullname), SDATA (directory),
+			  directory_nbytes);
 
 		  if (needsep)
 		    SSET (fullname, directory_nbytes, DIRECTORY_SEP);
 
-		  bcopy (SDATA (name),
-			 SDATA (fullname) + directory_nbytes + needsep,
-			 len);
+		  memcpy (SDATA (fullname) + directory_nbytes + needsep,
+			  SDATA (name), len);
 
 		  nchars = chars_in_text (SDATA (fullname), nbytes);
 
@@ -417,7 +412,7 @@
 }
 
 
-Lisp_Object file_name_completion ();
+Lisp_Object file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int ver_flag, Lisp_Object predicate);
 
 DEFUN ("file-name-completion", Ffile_name_completion, Sfile_name_completion,
        2, 3, 0,
@@ -476,14 +471,11 @@
   return file_name_completion (file, directory, 1, 0, Qnil);
 }
 
-static int file_name_completion_stat ();
+static int file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp, struct stat *st_addr);
 Lisp_Object Qdefault_directory;
 
 Lisp_Object
-file_name_completion (file, dirname, all_flag, ver_flag, predicate)
-     Lisp_Object file, dirname;
-     int all_flag, ver_flag;
-     Lisp_Object predicate;
+file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int ver_flag, Lisp_Object predicate)
 {
   DIR *d;
   int bestmatchsize = 0;
@@ -825,9 +817,7 @@
    else number of chars that match at the beginning.  */
 
 static int
-scmp (s1, s2, len)
-     register unsigned char *s1, *s2;
-     int len;
+scmp (register unsigned char *s1, register unsigned char *s2, int len)
 {
   register int l = len;
 
@@ -848,10 +838,7 @@
 }
 
 static int
-file_name_completion_stat (dirname, dp, st_addr)
-     Lisp_Object dirname;
-     DIRENTRY *dp;
-     struct stat *st_addr;
+file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp, struct stat *st_addr)
 {
   int len = NAMLEN (dp);
   int pos = SCHARS (dirname);
@@ -869,11 +856,11 @@
   _djstat_flags = _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
 #endif /* MSDOS */
 
-  bcopy (SDATA (dirname), fullname, pos);
+  memcpy (fullname, SDATA (dirname), pos);
   if (!IS_DIRECTORY_SEP (fullname[pos - 1]))
     fullname[pos++] = DIRECTORY_SEP;
 
-  bcopy (dp->d_name, fullname + pos, len);
+  memcpy (fullname + pos, dp->d_name, len);
   fullname[pos + len] = 0;
 
 #ifdef S_IFLNK
@@ -893,8 +880,7 @@
 }
 
 Lisp_Object
-make_time (time)
-     time_t time;
+make_time (time_t time)
 {
   return Fcons (make_number (time >> 16),
 		Fcons (make_number (time & 0177777), Qnil));
@@ -979,10 +965,10 @@
   Lisp_Object values[12];
   Lisp_Object encoded;
   struct stat s;
-#if defined (BSD4_2) || defined (BSD4_3)
+#ifdef BSD4_2
   Lisp_Object dirname;
   struct stat sdir;
-#endif
+#endif /* BSD4_2 */
   char modes[10];
   Lisp_Object handler;
   struct gcpro gcpro1;
@@ -1049,7 +1035,7 @@
 
   filemodestring (&s, modes);
   values[8] = make_string (modes, 10);
-#if defined (BSD4_2) || defined (BSD4_3) /* file gid will be dir gid */
+#ifdef BSD4_2 /* file gid will be dir gid */
   dirname = Ffile_name_directory (filename);
   if (! NILP (dirname))
     encoded = ENCODE_FILE (dirname);
@@ -1059,7 +1045,7 @@
     values[9] = Qt;
 #else					/* file gid will be egid */
   values[9] = (s.st_gid != getegid ()) ? Qt : Qnil;
-#endif	/* BSD4_2 (or BSD4_3) */
+#endif	/* not BSD4_2 */
   if (!FIXNUM_OVERFLOW_P (s.st_ino))
     /* Keep the most common cases as integers.  */
     values[10] = make_number (s.st_ino);
@@ -1103,7 +1089,7 @@
 }
 
 void
-syms_of_dired ()
+syms_of_dired (void)
 {
   Qdirectory_files = intern_c_string ("directory-files");
   Qdirectory_files_and_attributes = intern_c_string ("directory-files-and-attributes");
--- a/src/dispextern.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/dispextern.h	Thu Jul 08 17:09:35 2010 +0900
@@ -642,7 +642,7 @@
    This aborts if any pointer is found twice.  */
 
 #if GLYPH_DEBUG
-void check_matrix_pointer_lossage P_ ((struct glyph_matrix *));
+void check_matrix_pointer_lossage (struct glyph_matrix *);
 #define CHECK_MATRIX(MATRIX) check_matrix_pointer_lossage ((MATRIX))
 #else
 #define CHECK_MATRIX(MATRIX) (void) 0
@@ -914,7 +914,7 @@
    we don't try to access rows that are out of bounds.  */
 
 #if GLYPH_DEBUG
-struct glyph_row *matrix_row P_ ((struct glyph_matrix *, int));
+struct glyph_row *matrix_row (struct glyph_matrix *, int);
 #define MATRIX_ROW(MATRIX, ROW)   matrix_row ((MATRIX), (ROW))
 #else
 #define MATRIX_ROW(MATRIX, ROW)	  ((MATRIX)->rows + (ROW))
@@ -2478,7 +2478,7 @@
 
 /* Handlers for setting frame parameters.  */
 
-typedef void (*frame_parm_handler) P_ ((struct frame *, Lisp_Object, Lisp_Object));
+typedef void (*frame_parm_handler) (struct frame *, Lisp_Object, Lisp_Object);
 
 
 /* Structure holding system-dependent interface functions needed
@@ -2491,110 +2491,110 @@
 
   /* Produce glyphs/get display metrics for the display element IT is
      loaded with.  */
-  void (*produce_glyphs) P_ ((struct it *it));
+  void (*produce_glyphs) (struct it *it);
 
   /* Write or insert LEN glyphs from STRING at the nominal output
      position.  */
-  void (*write_glyphs) P_ ((struct glyph *string, int len));
-  void (*insert_glyphs) P_ ((struct glyph *start, int len));
+  void (*write_glyphs) (struct glyph *string, int len);
+  void (*insert_glyphs) (struct glyph *start, int len);
 
   /* Clear from nominal output position to X.  X < 0 means clear
      to right end of display.  */
-  void (*clear_end_of_line) P_ ((int x));
+  void (*clear_end_of_line) (int x);
 
   /* Function to call to scroll the display as described by RUN on
      window W.  */
-  void (*scroll_run_hook) P_ ((struct window *w, struct run *run));
+  void (*scroll_run_hook) (struct window *w, struct run *run);
 
   /* Function to call after a line in a display has been completely
      updated.  Used to draw truncation marks and alike.  DESIRED_ROW
      is the desired row which has been updated.  */
-  void (*after_update_window_line_hook) P_ ((struct glyph_row *desired_row));
+  void (*after_update_window_line_hook) (struct glyph_row *desired_row);
 
   /* Function to call before beginning to update window W in
      window-based redisplay.  */
-  void (*update_window_begin_hook) P_ ((struct window *w));
+  void (*update_window_begin_hook) (struct window *w);
 
   /* Function to call after window W has been updated in window-based
      redisplay.  CURSOR_ON_P non-zero means switch cursor on.
      MOUSE_FACE_OVERWRITTEN_P non-zero means that some lines in W
      that contained glyphs in mouse-face were overwritten, so we
      have to update the mouse highlight.  */
-  void (*update_window_end_hook) P_ ((struct window *w, int cursor_on_p,
-				      int mouse_face_overwritten_p));
+  void (*update_window_end_hook) (struct window *w, int cursor_on_p,
+                                  int mouse_face_overwritten_p);
 
   /* Move cursor to row/column position VPOS/HPOS, pixel coordinates
      Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
      are window-relative pixel positions.  */
-  void (*cursor_to) P_ ((int vpos, int hpos, int y, int x));
+  void (*cursor_to) (int vpos, int hpos, int y, int x);
 
   /* Flush the display of frame F.  For X, this is XFlush.  */
-  void (*flush_display) P_ ((struct frame *f));
+  void (*flush_display) (struct frame *f);
 
   /* Flush the display of frame F if non-NULL.  This is called
      during redisplay, and should be NULL on systems which flushes
      automatically before reading input.  */
-  void (*flush_display_optional) P_ ((struct frame *f));
+  void (*flush_display_optional) (struct frame *f);
 
   /* Clear the mouse hightlight in window W, if there is any.  */
-  void (*clear_window_mouse_face) P_ ((struct window *w));
+  void (*clear_window_mouse_face) (struct window *w);
 
   /* Set *LEFT and *RIGHT to the left and right overhang of GLYPH on
      frame F.  */
-  void (*get_glyph_overhangs) P_ ((struct glyph *glyph, struct frame *f,
-				   int *left, int *right));
+  void (*get_glyph_overhangs) (struct glyph *glyph, struct frame *f,
+                               int *left, int *right);
 
   /* Fix the display of AREA of ROW in window W for overlapping rows.
      This function is called from redraw_overlapping_rows after
      desired rows have been made current.  */
-  void (*fix_overlapping_area) P_ ((struct window *w, struct glyph_row *row,
-				    enum glyph_row_area area, int));
+  void (*fix_overlapping_area) (struct window *w, struct glyph_row *row,
+                                enum glyph_row_area area, int);
 
 #ifdef HAVE_WINDOW_SYSTEM
 
   /* Draw a fringe bitmap in window W of row ROW using parameters P.  */
-  void (*draw_fringe_bitmap) P_ ((struct window *w, struct glyph_row *row,
-				  struct draw_fringe_bitmap_params *p));
+  void (*draw_fringe_bitmap) (struct window *w, struct glyph_row *row,
+                              struct draw_fringe_bitmap_params *p);
 
   /* Define and destroy fringe bitmap no. WHICH.  */
-  void (*define_fringe_bitmap) P_ ((int which, unsigned short *bits,
-				    int h, int wd));
-  void (*destroy_fringe_bitmap) P_ ((int which));
+  void (*define_fringe_bitmap) (int which, unsigned short *bits,
+                                int h, int wd);
+  void (*destroy_fringe_bitmap) (int which);
 
 /* Compute left and right overhang of glyph string S.
    A NULL pointer if platform does not support this. */
-  void (*compute_glyph_string_overhangs) P_ ((struct glyph_string *s));
+  void (*compute_glyph_string_overhangs) (struct glyph_string *s);
 
 /* Draw a glyph string S.  */
-  void (*draw_glyph_string) P_ ((struct glyph_string *s));
+  void (*draw_glyph_string) (struct glyph_string *s);
 
 /* Define cursor CURSOR on frame F.  */
-  void (*define_frame_cursor) P_ ((struct frame *f, Cursor cursor));
+  void (*define_frame_cursor) (struct frame *f, Cursor cursor);
 
 /* Clear the area at (X,Y,WIDTH,HEIGHT) of frame F.  */
-  void (*clear_frame_area) P_ ((struct frame *f, int x, int y,
-				int width, int height));
+  void (*clear_frame_area) (struct frame *f, int x, int y,
+                            int width, int height);
 
 /* Draw specified cursor CURSOR_TYPE of width CURSOR_WIDTH
    at row GLYPH_ROW on window W if ON_P is 1.  If ON_P is
    0, don't draw cursor.  If ACTIVE_P is 1, system caret
    should track this cursor (when applicable).  */
-  void (*draw_window_cursor) P_ ((struct window *w,
-				  struct glyph_row *glyph_row,
-				  int x, int y,
-				  int cursor_type, int cursor_width,
-				  int on_p, int active_p));
+  void (*draw_window_cursor) (struct window *w,
+                              struct glyph_row *glyph_row,
+                              int x, int y,
+                              int cursor_type, int cursor_width,
+                              int on_p, int active_p);
 
 /* Draw vertical border for window W from (X,Y0) to (X,Y1).  */
-  void (*draw_vertical_window_border) P_ ((struct window *w,
-					   int x, int y0, int y1));
+  void (*draw_vertical_window_border) (struct window *w,
+                                       int x, int y0, int y1);
 
 /* Shift display of frame F to make room for inserted glyphs.
    The area at pixel (X,Y) of width WIDTH and height HEIGHT is
    shifted right by SHIFT_BY pixels.  */
-  void (*shift_glyphs_for_insert) P_ ((struct frame *f,
-				       int x, int y, int width,
-				       int height, int shift_by));
+  void (*shift_glyphs_for_insert) (struct frame *f,
+                                   int x, int y, int width,
+                                   int height, int shift_by);
 
 #endif /* HAVE_WINDOW_SYSTEM */
 };
@@ -2621,14 +2621,14 @@
 
   /* Check that SPEC is a valid image specification for the given
      image type.  Value is non-zero if SPEC is valid.  */
-  int (* valid_p) P_ ((Lisp_Object spec));
+  int (* valid_p) (Lisp_Object spec);
 
   /* Load IMG which is used on frame F from information contained in
      IMG->spec.  Value is non-zero if successful.  */
-  int (* load) P_ ((struct frame *f, struct image *img));
+  int (* load) (struct frame *f, struct image *img);
 
   /* Free resources of image IMG which is used on frame F.  */
-  void (* free) P_ ((struct frame *f, struct image *img));
+  void (* free) (struct frame *f, struct image *img);
 
   /* Next in list of all supported image types.  */
   struct image_type *next;
@@ -2885,65 +2885,65 @@
 
 /* Defined in bidi.c */
 
-extern void bidi_init_it P_ ((EMACS_INT, EMACS_INT, struct bidi_it *));
-extern void bidi_move_to_visually_next P_ ((struct bidi_it *));
-extern void bidi_paragraph_init P_ ((bidi_dir_t, struct bidi_it *));
-extern int  bidi_mirror_char P_ ((int));
+extern void bidi_init_it (EMACS_INT, EMACS_INT, struct bidi_it *);
+extern void bidi_move_to_visually_next (struct bidi_it *);
+extern void bidi_paragraph_init (bidi_dir_t, struct bidi_it *);
+extern int  bidi_mirror_char (int);
 
 /* Defined in xdisp.c */
 
-struct glyph_row *row_containing_pos P_ ((struct window *, int,
-					  struct glyph_row *,
-					  struct glyph_row *, int));
-EMACS_INT string_buffer_position P_ ((struct window *, Lisp_Object,
-				      EMACS_INT));
-int line_bottom_y P_ ((struct it *));
-int display_prop_intangible_p P_ ((Lisp_Object));
-void resize_echo_area_exactly P_ ((void));
-int resize_mini_window P_ ((struct window *, int));
-int try_window P_ ((Lisp_Object, struct text_pos, int));
-void window_box P_ ((struct window *, int, int *, int *, int *, int *));
-int window_box_height P_ ((struct window *));
-int window_text_bottom_y P_ ((struct window *));
-int window_box_width P_ ((struct window *, int));
-int window_box_left P_ ((struct window *, int));
-int window_box_left_offset P_ ((struct window *, int));
-int window_box_right P_ ((struct window *, int));
-int window_box_right_offset P_ ((struct window *, int));
-void window_box_edges P_ ((struct window *, int, int *, int *, int *, int *));
-int estimate_mode_line_height P_ ((struct frame *, enum face_id));
-void pixel_to_glyph_coords P_ ((struct frame *, int, int, int *, int *,
-				NativeRectangle *, int));
-int glyph_to_pixel_coords P_ ((struct window *, int, int, int *, int *));
-void remember_mouse_glyph P_ ((struct frame *, int, int, NativeRectangle *));
-
-void mark_window_display_accurate P_ ((Lisp_Object, int));
-void redisplay_preserve_echo_area P_ ((int));
-int set_cursor_from_row P_ ((struct window *, struct glyph_row *,
-			     struct glyph_matrix *, int, int, int, int));
-void init_iterator P_ ((struct it *, struct window *, EMACS_INT,
-			EMACS_INT, struct glyph_row *, enum face_id));
-void init_iterator_to_row_start P_ ((struct it *, struct window *,
-				     struct glyph_row *));
-int get_next_display_element P_ ((struct it *));
-void set_iterator_to_next P_ ((struct it *, int));
-void start_display P_ ((struct it *, struct window *, struct text_pos));
-void move_it_to P_ ((struct it *, int, int, int, int, int));
-void move_it_vertically P_ ((struct it *, int));
-void move_it_vertically_backward P_ ((struct it *, int));
-void move_it_by_lines P_ ((struct it *, int, int));
-void move_it_past_eol P_ ((struct it *));
+struct glyph_row *row_containing_pos (struct window *, int,
+                                      struct glyph_row *,
+                                      struct glyph_row *, int);
+EMACS_INT string_buffer_position (struct window *, Lisp_Object,
+                                  EMACS_INT);
+int line_bottom_y (struct it *);
+int display_prop_intangible_p (Lisp_Object);
+void resize_echo_area_exactly (void);
+int resize_mini_window (struct window *, int);
+int try_window (Lisp_Object, struct text_pos, int);
+void window_box (struct window *, int, int *, int *, int *, int *);
+int window_box_height (struct window *);
+int window_text_bottom_y (struct window *);
+int window_box_width (struct window *, int);
+int window_box_left (struct window *, int);
+int window_box_left_offset (struct window *, int);
+int window_box_right (struct window *, int);
+int window_box_right_offset (struct window *, int);
+void window_box_edges (struct window *, int, int *, int *, int *, int *);
+int estimate_mode_line_height (struct frame *, enum face_id);
+void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
+                            NativeRectangle *, int);
+int glyph_to_pixel_coords (struct window *, int, int, int *, int *);
+void remember_mouse_glyph (struct frame *, int, int, NativeRectangle *);
+
+void mark_window_display_accurate (Lisp_Object, int);
+void redisplay_preserve_echo_area (int);
+int set_cursor_from_row (struct window *, struct glyph_row *,
+                         struct glyph_matrix *, int, int, int, int);
+void init_iterator (struct it *, struct window *, EMACS_INT,
+                    EMACS_INT, struct glyph_row *, enum face_id);
+void init_iterator_to_row_start (struct it *, struct window *,
+                                 struct glyph_row *);
+int get_next_display_element (struct it *);
+void set_iterator_to_next (struct it *, int);
+void start_display (struct it *, struct window *, struct text_pos);
+void move_it_to (struct it *, int, int, int, int, int);
+void move_it_vertically (struct it *, int);
+void move_it_vertically_backward (struct it *, int);
+void move_it_by_lines (struct it *, int, int);
+void move_it_past_eol (struct it *);
 void move_it_in_display_line (struct it *it,
 			      EMACS_INT to_charpos, int to_x,
 			      enum move_operation_enum op);
-int in_display_vector_p P_ ((struct it *));
-int frame_mode_line_height P_ ((struct frame *));
-void highlight_trailing_whitespace P_ ((struct frame *, struct glyph_row *));
+int in_display_vector_p (struct it *);
+int frame_mode_line_height (struct frame *);
+void highlight_trailing_whitespace (struct frame *, struct glyph_row *);
 extern Lisp_Object Qtool_bar;
 extern Lisp_Object Vshow_trailing_whitespace;
 extern int mode_line_in_non_selected_windows;
 extern int redisplaying_p;
-extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object));
+extern void add_to_log (char *, Lisp_Object, Lisp_Object);
 extern int help_echo_showing_p;
 extern int current_mode_line_height, current_header_line_height;
 extern Lisp_Object help_echo_string, help_echo_window;
@@ -2955,67 +2955,67 @@
 extern int unibyte_display_via_language_environment;
 extern EMACS_INT underline_minimum_offset;
 
-extern void reseat_at_previous_visible_line_start P_ ((struct it *));
-
-extern int calc_pixel_width_or_height P_ ((double *, struct it *, Lisp_Object,
-					   struct font *, int, int *));
+extern void reseat_at_previous_visible_line_start (struct it *);
+
+extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object,
+                                       struct font *, int, int *);
 
 #ifdef HAVE_WINDOW_SYSTEM
 
 #if GLYPH_DEBUG
-extern void dump_glyph_string P_ ((struct glyph_string *));
+extern void dump_glyph_string (struct glyph_string *);
 #endif
 
-extern void x_get_glyph_overhangs P_ ((struct glyph *, struct frame *,
-				       int *, int *));
-extern void x_produce_glyphs P_ ((struct it *));
-
-extern void x_write_glyphs P_ ((struct glyph *, int));
-extern void x_insert_glyphs P_ ((struct glyph *, int len));
-extern void x_clear_end_of_line P_ ((int));
+extern void x_get_glyph_overhangs (struct glyph *, struct frame *,
+                                   int *, int *);
+extern void x_produce_glyphs (struct it *);
+
+extern void x_write_glyphs (struct glyph *, int);
+extern void x_insert_glyphs (struct glyph *, int len);
+extern void x_clear_end_of_line (int);
 
 extern int x_stretch_cursor_p;
 extern struct cursor_pos output_cursor;
 
-extern void x_fix_overlapping_area P_ ((struct window *, struct glyph_row *,
-					enum glyph_row_area, int));
-extern void draw_phys_cursor_glyph P_ ((struct window *,
-					  struct glyph_row *,
-					  enum draw_glyphs_face));
-extern void get_phys_cursor_geometry P_ ((struct window *, struct glyph_row *,
-					  struct glyph *, int *, int *, int *));
-extern void erase_phys_cursor P_ ((struct window *));
-extern void display_and_set_cursor P_ ((struct window *,
-					  int, int, int, int, int));
-
-extern void set_output_cursor P_ ((struct cursor_pos *));
-extern void x_cursor_to P_ ((int, int, int, int));
-
-extern void x_update_cursor P_ ((struct frame *, int));
-extern void x_clear_cursor P_ ((struct window *));
-extern void x_draw_vertical_border P_ ((struct window *w));
-
-extern void frame_to_window_pixel_xy P_ ((struct window *, int *, int *));
-extern int get_glyph_string_clip_rects P_ ((struct glyph_string *,
-					    NativeRectangle *, int));
-extern void get_glyph_string_clip_rect P_ ((struct glyph_string *,
-					    NativeRectangle *nr));
-extern Lisp_Object find_hot_spot P_ ((Lisp_Object, int, int));
-extern void note_mouse_highlight P_ ((struct frame *, int, int));
-extern void x_clear_window_mouse_face P_ ((struct window *));
-extern void cancel_mouse_face P_ ((struct frame *));
-
-extern void handle_tool_bar_click P_ ((struct frame *,
-				       int, int, int, unsigned int));
+extern void x_fix_overlapping_area (struct window *, struct glyph_row *,
+                                    enum glyph_row_area, int);
+extern void draw_phys_cursor_glyph (struct window *,
+                                    struct glyph_row *,
+                                    enum draw_glyphs_face);
+extern void get_phys_cursor_geometry (struct window *, struct glyph_row *,
+                                      struct glyph *, int *, int *, int *);
+extern void erase_phys_cursor (struct window *);
+extern void display_and_set_cursor (struct window *,
+                                    int, int, int, int, int);
+
+extern void set_output_cursor (struct cursor_pos *);
+extern void x_cursor_to (int, int, int, int);
+
+extern void x_update_cursor (struct frame *, int);
+extern void x_clear_cursor (struct window *);
+extern void x_draw_vertical_border (struct window *w);
+
+extern void frame_to_window_pixel_xy (struct window *, int *, int *);
+extern int get_glyph_string_clip_rects (struct glyph_string *,
+                                        NativeRectangle *, int);
+extern void get_glyph_string_clip_rect (struct glyph_string *,
+                                        NativeRectangle *nr);
+extern Lisp_Object find_hot_spot (Lisp_Object, int, int);
+extern void note_mouse_highlight (struct frame *, int, int);
+extern void x_clear_window_mouse_face (struct window *);
+extern void cancel_mouse_face (struct frame *);
+
+extern void handle_tool_bar_click (struct frame *,
+                                   int, int, int, unsigned int);
 
 /* msdos.c defines its own versions of these functions. */
-extern int clear_mouse_face P_ ((Display_Info *));
-extern void show_mouse_face P_ ((Display_Info *, enum draw_glyphs_face));
-extern int cursor_in_mouse_face_p P_ ((struct window *w));
-
-extern void expose_frame P_ ((struct frame *, int, int, int, int));
-extern int x_intersect_rectangles P_ ((XRectangle *, XRectangle *,
-				       XRectangle *));
+extern int clear_mouse_face (Display_Info *);
+extern void show_mouse_face (Display_Info *, enum draw_glyphs_face);
+extern int cursor_in_mouse_face_p (struct window *w);
+
+extern void expose_frame (struct frame *, int, int, int, int);
+extern int x_intersect_rectangles (XRectangle *, XRectangle *,
+                                   XRectangle *);
 #endif
 
 /* Flags passed to try_window.  */
@@ -3025,107 +3025,107 @@
 /* Defined in fringe.c */
 
 int lookup_fringe_bitmap (Lisp_Object);
-void draw_fringe_bitmap P_ ((struct window *, struct glyph_row *, int));
-void draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *));
-int draw_window_fringes P_ ((struct window *, int));
-int update_window_fringes P_ ((struct window *, int));
-void compute_fringe_widths P_ ((struct frame *, int));
+void draw_fringe_bitmap (struct window *, struct glyph_row *, int);
+void draw_row_fringe_bitmaps (struct window *, struct glyph_row *);
+int draw_window_fringes (struct window *, int);
+int update_window_fringes (struct window *, int);
+void compute_fringe_widths (struct frame *, int);
 
 #ifdef WINDOWSNT
-void w32_init_fringe P_ ((struct redisplay_interface *));
-void w32_reset_fringes P_ ((void));
+void w32_init_fringe (struct redisplay_interface *);
+void w32_reset_fringes (void);
 #endif
 /* Defined in image.c */
 
 #ifdef HAVE_WINDOW_SYSTEM
 
-extern int x_bitmap_height P_ ((struct frame *, int));
-extern int x_bitmap_width P_ ((struct frame *, int));
-extern int x_bitmap_pixmap P_ ((struct frame *, int));
-extern void x_reference_bitmap P_ ((struct frame *, int));
-extern int x_create_bitmap_from_data P_ ((struct frame *, char *,
-					  unsigned int, unsigned int));
-extern int x_create_bitmap_from_file P_ ((struct frame *, Lisp_Object));
+extern int x_bitmap_height (struct frame *, int);
+extern int x_bitmap_width (struct frame *, int);
+extern int x_bitmap_pixmap (struct frame *, int);
+extern void x_reference_bitmap (struct frame *, int);
+extern int x_create_bitmap_from_data (struct frame *, char *,
+                                      unsigned int, unsigned int);
+extern int x_create_bitmap_from_file (struct frame *, Lisp_Object);
 #if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
-extern int x_create_bitmap_from_xpm_data P_ ((struct frame *f, char **bits));
+extern int x_create_bitmap_from_xpm_data (struct frame *f, char **bits);
 #endif
 #ifndef x_destroy_bitmap
-extern void x_destroy_bitmap P_ ((struct frame *, int));
+extern void x_destroy_bitmap (struct frame *, int);
 #endif
-extern void x_destroy_all_bitmaps P_ ((Display_Info *));
-extern int x_create_bitmap_mask P_ ((struct frame * , int));
-extern Lisp_Object x_find_image_file P_ ((Lisp_Object));
-
-void x_kill_gs_process P_ ((Pixmap, struct frame *));
-struct image_cache *make_image_cache P_ ((void));
-void free_image_cache P_ ((struct frame *));
-void clear_image_caches P_ ((Lisp_Object));
-void mark_image_cache P_ ((struct image_cache *));
-int valid_image_p P_ ((Lisp_Object));
-void prepare_image_for_display P_ ((struct frame *, struct image *));
-int lookup_image P_ ((struct frame *, Lisp_Object));
-
-unsigned long image_background P_ ((struct image *, struct frame *,
-				    XImagePtr_or_DC ximg));
-int image_background_transparent P_ ((struct image *, struct frame *,
-				      XImagePtr_or_DC mask));
-
-int image_ascent P_ ((struct image *, struct face *, struct glyph_slice *));
+extern void x_destroy_all_bitmaps (Display_Info *);
+extern int x_create_bitmap_mask (struct frame * , int);
+extern Lisp_Object x_find_image_file (Lisp_Object);
+
+void x_kill_gs_process (Pixmap, struct frame *);
+struct image_cache *make_image_cache (void);
+void free_image_cache (struct frame *);
+void clear_image_caches (Lisp_Object);
+void mark_image_cache (struct image_cache *);
+int valid_image_p (Lisp_Object);
+void prepare_image_for_display (struct frame *, struct image *);
+int lookup_image (struct frame *, Lisp_Object);
+
+unsigned long image_background (struct image *, struct frame *,
+                                XImagePtr_or_DC ximg);
+int image_background_transparent (struct image *, struct frame *,
+                                  XImagePtr_or_DC mask);
+
+int image_ascent (struct image *, struct face *, struct glyph_slice *);
 
 #endif
 
 /* Defined in sysdep.c */
 
-void get_tty_size P_ ((int, int *, int *));
-void request_sigio P_ ((void));
-void unrequest_sigio P_ ((void));
-int tabs_safe_p P_ ((int));
-void init_baud_rate P_ ((int));
-void init_sigio P_ ((int));
+void get_tty_size (int, int *, int *);
+void request_sigio (void);
+void unrequest_sigio (void);
+int tabs_safe_p (int);
+void init_baud_rate (int);
+void init_sigio (int);
 
 /* Defined in xfaces.c */
 
 #ifdef HAVE_X_WINDOWS
-void x_free_colors P_ ((struct frame *, unsigned long *, int));
+void x_free_colors (struct frame *, unsigned long *, int);
 #endif
 
-void update_face_from_frame_parameter P_ ((struct frame *, Lisp_Object,
-					   Lisp_Object));
-Lisp_Object tty_color_name P_ ((struct frame *, int));
-void clear_face_cache P_ ((int));
-unsigned long load_color P_ ((struct frame *, struct face *, Lisp_Object,
-			      enum lface_attribute_index));
-void unload_color P_ ((struct frame *, unsigned long));
-char *choose_face_font P_ ((struct frame *, Lisp_Object *, Lisp_Object,
-			    int *));
-int ascii_face_of_lisp_face P_ ((struct frame *, int));
-void prepare_face_for_display P_ ((struct frame *, struct face *));
-int xstrcasecmp P_ ((const unsigned char *, const unsigned char *));
-int lookup_face P_ ((struct frame *, Lisp_Object *));
-int lookup_named_face P_ ((struct frame *, Lisp_Object, int));
-int lookup_basic_face P_ ((struct frame *, int));
-int smaller_face P_ ((struct frame *, int, int));
-int face_with_height P_ ((struct frame *, int, int));
-int lookup_derived_face P_ ((struct frame *, Lisp_Object, int, int));
-void init_frame_faces P_ ((struct frame *));
-void free_frame_faces P_ ((struct frame *));
-void recompute_basic_faces P_ ((struct frame *));
-int face_at_buffer_position P_ ((struct window *w, EMACS_INT pos,
-				 EMACS_INT region_beg, EMACS_INT region_end,
-				 EMACS_INT *endptr, EMACS_INT limit,
-				 int mouse, int base_face_id));
-int face_for_overlay_string P_ ((struct window *w, EMACS_INT pos,
-				 EMACS_INT region_beg, EMACS_INT region_end,
-				 EMACS_INT *endptr, EMACS_INT limit,
-				 int mouse, Lisp_Object overlay));
-int face_at_string_position P_ ((struct window *w, Lisp_Object string,
-				 EMACS_INT pos, EMACS_INT bufpos,
-				 EMACS_INT region_beg, EMACS_INT region_end,
-				 EMACS_INT *endptr, enum face_id, int mouse));
-int merge_faces P_ ((struct frame *, Lisp_Object, int, int));
-int compute_char_face P_ ((struct frame *, int, Lisp_Object));
-void free_all_realized_faces P_ ((Lisp_Object));
-void free_realized_face P_ ((struct frame *, struct face *));
+void update_face_from_frame_parameter (struct frame *, Lisp_Object,
+                                       Lisp_Object);
+Lisp_Object tty_color_name (struct frame *, int);
+void clear_face_cache (int);
+unsigned long load_color (struct frame *, struct face *, Lisp_Object,
+                          enum lface_attribute_index);
+void unload_color (struct frame *, unsigned long);
+char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
+                        int *);
+int ascii_face_of_lisp_face (struct frame *, int);
+void prepare_face_for_display (struct frame *, struct face *);
+int xstrcasecmp (const unsigned char *, const unsigned char *);
+int lookup_face (struct frame *, Lisp_Object *);
+int lookup_named_face (struct frame *, Lisp_Object, int);
+int lookup_basic_face (struct frame *, int);
+int smaller_face (struct frame *, int, int);
+int face_with_height (struct frame *, int, int);
+int lookup_derived_face (struct frame *, Lisp_Object, int, int);
+void init_frame_faces (struct frame *);
+void free_frame_faces (struct frame *);
+void recompute_basic_faces (struct frame *);
+int face_at_buffer_position (struct window *w, EMACS_INT pos,
+                             EMACS_INT region_beg, EMACS_INT region_end,
+                             EMACS_INT *endptr, EMACS_INT limit,
+                             int mouse, int base_face_id);
+int face_for_overlay_string (struct window *w, EMACS_INT pos,
+                             EMACS_INT region_beg, EMACS_INT region_end,
+                             EMACS_INT *endptr, EMACS_INT limit,
+                             int mouse, Lisp_Object overlay);
+int face_at_string_position (struct window *w, Lisp_Object string,
+                             EMACS_INT pos, EMACS_INT bufpos,
+                             EMACS_INT region_beg, EMACS_INT region_end,
+                             EMACS_INT *endptr, enum face_id, int mouse);
+int merge_faces (struct frame *, Lisp_Object, int, int);
+int compute_char_face (struct frame *, int, Lisp_Object);
+void free_all_realized_faces (Lisp_Object);
+void free_realized_face (struct frame *, struct face *);
 extern Lisp_Object Qforeground_color, Qbackground_color;
 extern Lisp_Object Qframe_set_background_mode;
 extern char unspecified_fg[], unspecified_bg[];
@@ -3135,24 +3135,24 @@
 /* Defined in xfns.c  */
 
 #ifdef HAVE_X_WINDOWS
-void gamma_correct P_ ((struct frame *, XColor *));
+void gamma_correct (struct frame *, XColor *);
 #endif
 #ifdef WINDOWSNT
-void gamma_correct P_ ((struct frame *, COLORREF *));
+void gamma_correct (struct frame *, COLORREF *);
 #endif
 
 #ifdef HAVE_WINDOW_SYSTEM
 
-int x_screen_planes P_ ((struct frame *));
-void x_implicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
+int x_screen_planes (struct frame *);
+void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
 
 extern Lisp_Object tip_frame;
 extern Window tip_window;
 EXFUN (Fx_show_tip, 6);
 EXFUN (Fx_hide_tip, 0);
-extern void start_hourglass P_ ((void));
-extern void cancel_hourglass P_ ((void));
-extern int hourglass_started P_ ((void));
+extern void start_hourglass (void);
+extern void cancel_hourglass (void);
+extern int hourglass_started (void);
 extern int display_hourglass_p;
 extern int hourglass_shown_p;
 struct atimer;			/* Defined in atimer.h.  */
@@ -3161,8 +3161,8 @@
 extern struct atimer *hourglass_atimer;
 
 /* Each GUI implements these.  FIXME: move into RIF. */
-extern void show_hourglass P_ ((struct atimer *));
-extern void hide_hourglass P_ ((void));
+extern void show_hourglass (struct atimer *);
+extern void hide_hourglass (void);
 
 /* Returns the background color of IMG, calculating one heuristically if
    necessary.  If non-zero, XIMG is an existing XImage object to use for
@@ -3187,116 +3187,116 @@
 
 /* Defined in xmenu.c  */
 
-int popup_activated P_ ((void));
+int popup_activated (void);
 
 /* Defined in dispnew.c  */
 
 extern int inverse_video;
-extern int required_matrix_width P_ ((struct window *));
-extern int required_matrix_height P_ ((struct window *));
-extern Lisp_Object buffer_posn_from_coords P_ ((struct window *,
-						int *, int *,
-						struct display_pos *,
-						Lisp_Object *,
-						int *, int *, int *, int *));
-extern Lisp_Object mode_line_string P_ ((struct window *, enum window_part,
-					 int *, int *, int *,
-					 Lisp_Object *,
-					 int *, int *, int *, int *));
-extern Lisp_Object marginal_area_string P_ ((struct window *, enum window_part,
-					     int *, int *, int *,
-					     Lisp_Object *,
-					     int *, int *, int *, int *));
-extern void redraw_frame P_ ((struct frame *));
-extern void redraw_garbaged_frames P_ ((void));
-extern void cancel_line P_ ((int, struct frame *));
-extern void init_desired_glyphs P_ ((struct frame *));
-extern int scroll_frame_lines P_ ((struct frame *, int, int, int, int));
-extern int update_frame P_ ((struct frame *, int, int));
-extern int scrolling P_ ((struct frame *));
-extern void bitch_at_user P_ ((void));
-void adjust_glyphs P_ ((struct frame *));
-void free_glyphs P_ ((struct frame *));
-void free_window_matrices P_ ((struct window *));
-void check_glyph_memory P_ ((void));
-void mirrored_line_dance P_ ((struct glyph_matrix *, int, int, int *, char *));
-void clear_glyph_matrix P_ ((struct glyph_matrix *));
-void clear_current_matrices P_ ((struct frame *f));
-void clear_desired_matrices P_ ((struct frame *));
-void shift_glyph_matrix P_ ((struct window *, struct glyph_matrix *,
-			     int, int, int));
-void rotate_matrix P_ ((struct glyph_matrix *, int, int, int));
-void increment_matrix_positions P_ ((struct glyph_matrix *,
-				     int, int, int, int));
-void blank_row P_ ((struct window *, struct glyph_row *, int));
-void increment_row_positions P_ ((struct glyph_row *, int, int));
-void enable_glyph_matrix_rows P_ ((struct glyph_matrix *, int, int, int));
-void clear_glyph_row P_ ((struct glyph_row *));
-void prepare_desired_row P_ ((struct glyph_row *));
-int line_hash_code P_ ((struct glyph_row *));
-void set_window_update_flags P_ ((struct window *, int));
-void redraw_frame P_ ((struct frame *));
-void redraw_garbaged_frames P_ ((void));
-int scroll_cost P_ ((struct frame *, int, int, int));
-int update_frame P_ ((struct frame *, int, int));
-void update_single_window P_ ((struct window *, int));
-int scrolling P_ ((struct frame *));
-void do_pending_window_change P_ ((int));
-void change_frame_size P_ ((struct frame *, int, int, int, int, int));
-void bitch_at_user P_ ((void));
-void init_display P_ ((void));
-void syms_of_display P_ ((void));
+extern int required_matrix_width (struct window *);
+extern int required_matrix_height (struct window *);
+extern Lisp_Object buffer_posn_from_coords (struct window *,
+                                            int *, int *,
+                                            struct display_pos *,
+                                            Lisp_Object *,
+                                            int *, int *, int *, int *);
+extern Lisp_Object mode_line_string (struct window *, enum window_part,
+                                     int *, int *, int *,
+                                     Lisp_Object *,
+                                     int *, int *, int *, int *);
+extern Lisp_Object marginal_area_string (struct window *, enum window_part,
+                                         int *, int *, int *,
+                                         Lisp_Object *,
+                                         int *, int *, int *, int *);
+extern void redraw_frame (struct frame *);
+extern void redraw_garbaged_frames (void);
+extern void cancel_line (int, struct frame *);
+extern void init_desired_glyphs (struct frame *);
+extern int scroll_frame_lines (struct frame *, int, int, int, int);
+extern int update_frame (struct frame *, int, int);
+extern int scrolling (struct frame *);
+extern void bitch_at_user (void);
+void adjust_glyphs (struct frame *);
+void free_glyphs (struct frame *);
+void free_window_matrices (struct window *);
+void check_glyph_memory (void);
+void mirrored_line_dance (struct glyph_matrix *, int, int, int *, char *);
+void clear_glyph_matrix (struct glyph_matrix *);
+void clear_current_matrices (struct frame *f);
+void clear_desired_matrices (struct frame *);
+void shift_glyph_matrix (struct window *, struct glyph_matrix *,
+                         int, int, int);
+void rotate_matrix (struct glyph_matrix *, int, int, int);
+void increment_matrix_positions (struct glyph_matrix *,
+                                 int, int, int, int);
+void blank_row (struct window *, struct glyph_row *, int);
+void increment_row_positions (struct glyph_row *, int, int);
+void enable_glyph_matrix_rows (struct glyph_matrix *, int, int, int);
+void clear_glyph_row (struct glyph_row *);
+void prepare_desired_row (struct glyph_row *);
+int line_hash_code (struct glyph_row *);
+void set_window_update_flags (struct window *, int);
+void redraw_frame (struct frame *);
+void redraw_garbaged_frames (void);
+int scroll_cost (struct frame *, int, int, int);
+int update_frame (struct frame *, int, int);
+void update_single_window (struct window *, int);
+int scrolling (struct frame *);
+void do_pending_window_change (int);
+void change_frame_size (struct frame *, int, int, int, int, int);
+void bitch_at_user (void);
+void init_display (void);
+void syms_of_display (void);
 extern Lisp_Object Qredisplay_dont_pause;
-void spec_glyph_lookup_face P_ ((struct window *, GLYPH *));
+void spec_glyph_lookup_face (struct window *, GLYPH *);
 
 /* Defined in terminal.c */
 
-extern void ring_bell P_ ((struct frame *));
-extern void update_begin P_ ((struct frame *));
-extern void update_end P_ ((struct frame *));
-extern void set_terminal_window P_ ((struct frame *, int));
-extern void cursor_to P_ ((struct frame *, int, int));
-extern void raw_cursor_to P_ ((struct frame *, int, int));
-extern void clear_to_end P_ ((struct frame *));
-extern void clear_frame P_ ((struct frame *));
-extern void clear_end_of_line P_ ((struct frame *, int));
-extern void write_glyphs P_ ((struct frame *, struct glyph *, int));
-extern void insert_glyphs P_ ((struct frame *, struct glyph *, int));
-extern void delete_glyphs P_ ((struct frame *, int));
-extern void ins_del_lines P_ ((struct frame *, int, int));
-
-extern struct terminal *init_initial_terminal P_ ((void));
+extern void ring_bell (struct frame *);
+extern void update_begin (struct frame *);
+extern void update_end (struct frame *);
+extern void set_terminal_window (struct frame *, int);
+extern void cursor_to (struct frame *, int, int);
+extern void raw_cursor_to (struct frame *, int, int);
+extern void clear_to_end (struct frame *);
+extern void clear_frame (struct frame *);
+extern void clear_end_of_line (struct frame *, int);
+extern void write_glyphs (struct frame *, struct glyph *, int);
+extern void insert_glyphs (struct frame *, struct glyph *, int);
+extern void delete_glyphs (struct frame *, int);
+extern void ins_del_lines (struct frame *, int, int);
+
+extern struct terminal *init_initial_terminal (void);
 
 
 /* Defined in term.c */
 
-extern void tty_set_terminal_modes P_ ((struct terminal *));
-extern void tty_reset_terminal_modes P_ ((struct terminal *));
-extern void tty_turn_off_insert P_ ((struct tty_display_info *));
-extern void tty_turn_off_highlight P_ ((struct tty_display_info *));
-extern int string_cost P_ ((char *));
-extern int per_line_cost P_ ((char *));
-extern void calculate_costs P_ ((struct frame *));
-extern void produce_glyphs P_ ((struct it *));
-extern void produce_special_glyphs P_ ((struct it *, enum display_element_type));
-extern int tty_capable_p P_ ((struct tty_display_info *, unsigned, unsigned long, unsigned long));
+extern void tty_set_terminal_modes (struct terminal *);
+extern void tty_reset_terminal_modes (struct terminal *);
+extern void tty_turn_off_insert (struct tty_display_info *);
+extern void tty_turn_off_highlight (struct tty_display_info *);
+extern int string_cost (char *);
+extern int per_line_cost (char *);
+extern void calculate_costs (struct frame *);
+extern void produce_glyphs (struct it *);
+extern void produce_special_glyphs (struct it *, enum display_element_type);
+extern int tty_capable_p (struct tty_display_info *, unsigned, unsigned long, unsigned long);
 extern void set_tty_color_mode (struct tty_display_info *, struct frame *);
-extern struct terminal *get_tty_terminal P_ ((Lisp_Object, int));
-extern struct terminal *get_named_tty P_ ((char *));
+extern struct terminal *get_tty_terminal (Lisp_Object, int);
+extern struct terminal *get_named_tty (char *);
 EXFUN (Ftty_type, 1);
-extern void create_tty_output P_ ((struct frame *));
-extern struct terminal *init_tty P_ ((char *, char *, int));
+extern void create_tty_output (struct frame *);
+extern struct terminal *init_tty (char *, char *, int);
 
 
 /* Defined in scroll.c */
 
-extern int scrolling_max_lines_saved P_ ((int, int, int *, int *, int *));
-extern int scroll_cost P_ ((struct frame *, int, int, int));
-extern void do_line_insertion_deletion_costs P_ ((struct frame *, char *,
-						  char *, char *, char *,
-						  char *, char *, int));
-void scrolling_1 P_ ((struct frame *, int, int, int, int *, int *, int *,
-		      int *, int));
+extern int scrolling_max_lines_saved (int, int, int *, int *, int *);
+extern int scroll_cost (struct frame *, int, int, int);
+extern void do_line_insertion_deletion_costs (struct frame *, char *,
+                                              char *, char *, char *,
+                                              char *, char *, int);
+void scrolling_1 (struct frame *, int, int, int, int *, int *, int *,
+                  int *, int);
 
 /* Defined in frame.c */
 
@@ -3313,20 +3313,20 @@
   RES_TYPE_BOOLEAN_NUMBER
 };
 
-extern Lisp_Object x_get_arg P_ ((Display_Info *, Lisp_Object,
-				  Lisp_Object, char *, char *class,
-				  enum resource_types));
-extern Lisp_Object x_frame_get_arg P_ ((struct frame *, Lisp_Object,
-					Lisp_Object, char *, char *,
-					enum resource_types));
-extern Lisp_Object x_frame_get_and_record_arg P_ ((
-					struct frame *, Lisp_Object,
-					Lisp_Object, char *, char *,
-					enum resource_types));
-extern Lisp_Object x_default_parameter P_ ((struct frame *, Lisp_Object,
-					    Lisp_Object, Lisp_Object,
-					    char *, char *,
-					    enum resource_types));
+extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object,
+                              Lisp_Object, char *, char *class,
+                              enum resource_types);
+extern Lisp_Object x_frame_get_arg (struct frame *, Lisp_Object,
+                                    Lisp_Object, char *, char *,
+                                    enum resource_types);
+extern Lisp_Object x_frame_get_and_record_arg (
+                                               struct frame *, Lisp_Object,
+                                               Lisp_Object, char *, char *,
+                                               enum resource_types);
+extern Lisp_Object x_default_parameter (struct frame *, Lisp_Object,
+                                        Lisp_Object, Lisp_Object,
+                                        char *, char *,
+                                        enum resource_types);
 
 #endif /* HAVE_WINDOW_SYSTEM */
 
--- a/src/dispnew.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/dispnew.c	Thu Jul 08 17:09:35 2010 +0900
@@ -114,73 +114,73 @@
 
 /* Function prototypes.  */
 
-static struct glyph_matrix *save_current_matrix P_ ((struct frame *));
-static void restore_current_matrix P_ ((struct frame *, struct glyph_matrix *));
-static int showing_window_margins_p P_ ((struct window *));
-static void fake_current_matrices P_ ((Lisp_Object));
-static void redraw_overlapping_rows P_ ((struct window *, int));
-static void redraw_overlapped_rows P_ ((struct window *, int));
-static int count_blanks P_ ((struct glyph *, int));
-static int count_match P_ ((struct glyph *, struct glyph *,
-			    struct glyph *, struct glyph *));
-static unsigned line_draw_cost P_ ((struct glyph_matrix *, int));
-static void update_frame_line P_ ((struct frame *, int));
+static struct glyph_matrix *save_current_matrix (struct frame *);
+static void restore_current_matrix (struct frame *, struct glyph_matrix *);
+static int showing_window_margins_p (struct window *);
+static void fake_current_matrices (Lisp_Object);
+static void redraw_overlapping_rows (struct window *, int);
+static void redraw_overlapped_rows (struct window *, int);
+static int count_blanks (struct glyph *, int);
+static int count_match (struct glyph *, struct glyph *,
+                        struct glyph *, struct glyph *);
+static unsigned line_draw_cost (struct glyph_matrix *, int);
+static void update_frame_line (struct frame *, int);
 static struct dim allocate_matrices_for_frame_redisplay
-     P_ ((Lisp_Object, int, int, int, int *));
-static void allocate_matrices_for_window_redisplay P_ ((struct window *));
-static int realloc_glyph_pool P_ ((struct glyph_pool *, struct dim));
-static void adjust_frame_glyphs P_ ((struct frame *));
-struct glyph_matrix *new_glyph_matrix P_ ((struct glyph_pool *));
-static void free_glyph_matrix P_ ((struct glyph_matrix *));
-static void adjust_glyph_matrix P_ ((struct window *, struct glyph_matrix *,
-				     int, int, struct dim));
-static void change_frame_size_1 P_ ((struct frame *, int, int, int, int, int));
-static void swap_glyph_pointers P_ ((struct glyph_row *, struct glyph_row *));
+     (Lisp_Object, int, int, int, int *);
+static void allocate_matrices_for_window_redisplay (struct window *);
+static int realloc_glyph_pool (struct glyph_pool *, struct dim);
+static void adjust_frame_glyphs (struct frame *);
+struct glyph_matrix *new_glyph_matrix (struct glyph_pool *);
+static void free_glyph_matrix (struct glyph_matrix *);
+static void adjust_glyph_matrix (struct window *, struct glyph_matrix *,
+                                 int, int, struct dim);
+static void change_frame_size_1 (struct frame *, int, int, int, int, int);
+static void swap_glyph_pointers (struct glyph_row *, struct glyph_row *);
 #if GLYPH_DEBUG
-static int glyph_row_slice_p P_ ((struct glyph_row *, struct glyph_row *));
+static int glyph_row_slice_p (struct glyph_row *, struct glyph_row *);
 #endif
-static void fill_up_frame_row_with_spaces P_ ((struct glyph_row *, int));
-static void build_frame_matrix_from_window_tree P_ ((struct glyph_matrix *,
-						     struct window *));
-static void build_frame_matrix_from_leaf_window P_ ((struct glyph_matrix *,
-						     struct window *));
-static struct glyph_pool *new_glyph_pool P_ ((void));
-static void free_glyph_pool P_ ((struct glyph_pool *));
-static void adjust_frame_glyphs_initially P_ ((void));
-static void adjust_frame_message_buffer P_ ((struct frame *));
-static void adjust_decode_mode_spec_buffer P_ ((struct frame *));
-static void fill_up_glyph_row_with_spaces P_ ((struct glyph_row *));
-static void build_frame_matrix P_ ((struct frame *));
-void clear_current_matrices P_ ((struct frame *));
-void scroll_glyph_matrix_range P_ ((struct glyph_matrix *, int, int,
-				    int, int));
-static void clear_window_matrices P_ ((struct window *, int));
-static void fill_up_glyph_row_area_with_spaces P_ ((struct glyph_row *, int));
-static int scrolling_window P_ ((struct window *, int));
-static int update_window_line P_ ((struct window *, int, int *));
-static void update_marginal_area P_ ((struct window *, int, int));
-static int update_text_area P_ ((struct window *, int));
-static void make_current P_ ((struct glyph_matrix *, struct glyph_matrix *,
-			      int));
-static void mirror_make_current P_ ((struct window *, int));
-void check_window_matrix_pointers P_ ((struct window *));
+static void fill_up_frame_row_with_spaces (struct glyph_row *, int);
+static void build_frame_matrix_from_window_tree (struct glyph_matrix *,
+                                                 struct window *);
+static void build_frame_matrix_from_leaf_window (struct glyph_matrix *,
+                                                 struct window *);
+static struct glyph_pool *new_glyph_pool (void);
+static void free_glyph_pool (struct glyph_pool *);
+static void adjust_frame_glyphs_initially (void);
+static void adjust_frame_message_buffer (struct frame *);
+static void adjust_decode_mode_spec_buffer (struct frame *);
+static void fill_up_glyph_row_with_spaces (struct glyph_row *);
+static void build_frame_matrix (struct frame *);
+void clear_current_matrices (struct frame *);
+void scroll_glyph_matrix_range (struct glyph_matrix *, int, int,
+                                int, int);
+static void clear_window_matrices (struct window *, int);
+static void fill_up_glyph_row_area_with_spaces (struct glyph_row *, int);
+static int scrolling_window (struct window *, int);
+static int update_window_line (struct window *, int, int *);
+static void update_marginal_area (struct window *, int, int);
+static int update_text_area (struct window *, int);
+static void make_current (struct glyph_matrix *, struct glyph_matrix *,
+                          int);
+static void mirror_make_current (struct window *, int);
+void check_window_matrix_pointers (struct window *);
 #if GLYPH_DEBUG
-static void check_matrix_pointers P_ ((struct glyph_matrix *,
-				       struct glyph_matrix *));
+static void check_matrix_pointers (struct glyph_matrix *,
+                                   struct glyph_matrix *);
 #endif
-static void mirror_line_dance P_ ((struct window *, int, int, int *, char *));
-static int update_window_tree P_ ((struct window *, int));
-static int update_window P_ ((struct window *, int));
-static int update_frame_1 P_ ((struct frame *, int, int));
-static void set_window_cursor_after_update P_ ((struct window *));
-static int row_equal_p P_ ((struct window *, struct glyph_row *,
-			    struct glyph_row *, int));
-static void adjust_frame_glyphs_for_window_redisplay P_ ((struct frame *));
-static void adjust_frame_glyphs_for_frame_redisplay P_ ((struct frame *));
-static void reverse_rows P_ ((struct glyph_matrix *, int, int));
-static int margin_glyphs_to_reserve P_ ((struct window *, int, Lisp_Object));
-static void sync_window_with_frame_matrix_rows P_ ((struct window *));
-struct window *frame_row_to_window P_ ((struct window *, int));
+static void mirror_line_dance (struct window *, int, int, int *, char *);
+static int update_window_tree (struct window *, int);
+static int update_window (struct window *, int);
+static int update_frame_1 (struct frame *, int, int);
+static void set_window_cursor_after_update (struct window *);
+static int row_equal_p (struct window *, struct glyph_row *,
+                        struct glyph_row *, int);
+static void adjust_frame_glyphs_for_window_redisplay (struct frame *);
+static void adjust_frame_glyphs_for_frame_redisplay (struct frame *);
+static void reverse_rows (struct glyph_matrix *, int, int);
+static int margin_glyphs_to_reserve (struct window *, int, Lisp_Object);
+static void sync_window_with_frame_matrix_rows (struct window *);
+struct window *frame_row_to_window (struct window *, int);
 
 
 /* Non-zero means don't pause redisplay for pending input.  (This is
@@ -325,8 +325,8 @@
 
 #if GLYPH_DEBUG
 
-static int window_to_frame_vpos P_ ((struct window *, int));
-static int window_to_frame_hpos P_ ((struct window *, int));
+static int window_to_frame_vpos (struct window *, int);
+static int window_to_frame_hpos (struct window *, int);
 #define WINDOW_TO_FRAME_VPOS(W, VPOS) window_to_frame_vpos ((W), (VPOS))
 #define WINDOW_TO_FRAME_HPOS(W, HPOS) window_to_frame_hpos ((W), (HPOS))
 
@@ -355,8 +355,8 @@
 
 static unsigned history_tick;
 
-static void add_frame_display_history P_ ((struct frame *, int));
-static void add_window_display_history P_ ((struct window *, char *, int));
+static void add_frame_display_history (struct frame *, int);
+static void add_window_display_history (struct window *, char *, int);
 
 /* Add to the redisplay history how window W has been displayed.
    MSG is a trace containing the information how W's glyph matrix
@@ -436,65 +436,15 @@
 #endif /* GLYPH_DEBUG == 0 */
 
 
-/* Like bcopy except never gets confused by overlap.  Let this be the
-   first function defined in this file, or change emacs.c where the
-   address of this function is used.  */
+#ifdef PROFILING
+/* FIXME: only used to find text start for profiling.  */
 
 void
-safe_bcopy (from, to, size)
-     const char *from;
-     char *to;
-     int size;
+safe_bcopy (const char *from, char *to, int size)
 {
-  if (size <= 0 || from == to)
-    return;
-
-  /* If the source and destination don't overlap, then bcopy can
-     handle it.  If they do overlap, but the destination is lower in
-     memory than the source, we'll assume bcopy can handle that.  */
-  if (to < from || from + size <= to)
-    bcopy (from, to, size);
-
-  /* Otherwise, we'll copy from the end.  */
-  else
-    {
-      register const char *endf = from + size;
-      register char *endt = to + size;
-
-      /* If TO - FROM is large, then we should break the copy into
-	 nonoverlapping chunks of TO - FROM bytes each.  However, if
-	 TO - FROM is small, then the bcopy function call overhead
-	 makes this not worth it.  The crossover point could be about
-	 anywhere.  Since I don't think the obvious copy loop is too
-	 bad, I'm trying to err in its favor.  */
-      if (to - from < 64)
-	{
-	  do
-	    *--endt = *--endf;
-	  while (endf != from);
-	}
-      else
-	{
-	  for (;;)
-	    {
-	      endt -= (to - from);
-	      endf -= (to - from);
-
-	      if (endt < to)
-		break;
-
-	      bcopy (endf, endt, to - from);
-	    }
-
-	  /* If SIZE wasn't a multiple of TO - FROM, there will be a
-	     little left over.  The amount left over is (endt + (to -
-	     from)) - to, which is endt - from.  */
-	  bcopy (from, to, endt - from);
-	}
-    }
+  abort ();
 }
-
-
+#endif
 
 /***********************************************************************
 			    Glyph Matrices
@@ -507,14 +457,13 @@
    POOL, the structure is otherwise zeroed.  */
 
 struct glyph_matrix *
-new_glyph_matrix (pool)
-     struct glyph_pool *pool;
+new_glyph_matrix (struct glyph_pool *pool)
 {
   struct glyph_matrix *result;
 
   /* Allocate and clear.  */
   result = (struct glyph_matrix *) xmalloc (sizeof *result);
-  bzero (result, sizeof *result);
+  memset (result, 0, sizeof *result);
 
   /* Increment number of allocated matrices.  This count is used
      to detect memory leaks.  */
@@ -538,8 +487,7 @@
    matrix also frees the glyph memory in this case.  */
 
 static void
-free_glyph_matrix (matrix)
-     struct glyph_matrix *matrix;
+free_glyph_matrix (struct glyph_matrix *matrix)
 {
   if (matrix)
     {
@@ -569,10 +517,7 @@
    or a float.  */
 
 static int
-margin_glyphs_to_reserve (w, total_glyphs, margin)
-     struct window *w;
-     int total_glyphs;
-     Lisp_Object margin;
+margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin)
 {
   int n;
 
@@ -613,11 +558,7 @@
    leads to screen flickering.  */
 
 static void
-adjust_glyph_matrix (w, matrix, x, y, dim)
-     struct window *w;
-     struct glyph_matrix *matrix;
-     int x, y;
-     struct dim dim;
+adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y, struct dim dim)
 {
   int i;
   int new_rows;
@@ -667,8 +608,8 @@
       int size = dim.height * sizeof (struct glyph_row);
       new_rows = dim.height - matrix->rows_allocated;
       matrix->rows = (struct glyph_row *) xrealloc (matrix->rows, size);
-      bzero (matrix->rows + matrix->rows_allocated,
-	     new_rows * sizeof *matrix->rows);
+      memset (matrix->rows + matrix->rows_allocated, 0,
+	      new_rows * sizeof *matrix->rows);
       matrix->rows_allocated = dim.height;
     }
   else
@@ -860,9 +801,7 @@
    below).  */
 
 static void
-reverse_rows (matrix, start, end)
-     struct glyph_matrix *matrix;
-     int start, end;
+reverse_rows (struct glyph_matrix *matrix, int start, int end)
 {
   int i, j;
 
@@ -891,9 +830,7 @@
    rotating right.  */
 
 void
-rotate_matrix (matrix, first, last, by)
-     struct glyph_matrix *matrix;
-     int first, last, by;
+rotate_matrix (struct glyph_matrix *matrix, int first, int last, int by)
 {
   if (by < 0)
     {
@@ -918,9 +855,7 @@
    DELTA_BYTES.  */
 
 void
-increment_matrix_positions (matrix, start, end, delta, delta_bytes)
-     struct glyph_matrix *matrix;
-     int start, end, delta, delta_bytes;
+increment_matrix_positions (struct glyph_matrix *matrix, int start, int end, int delta, int delta_bytes)
 {
   /* Check that START and END are reasonable values.  */
   xassert (start >= 0 && start <= matrix->nrows);
@@ -937,10 +872,7 @@
    ENABLED_P is non-zero, enabled_p flags in rows will be set to 1.  */
 
 void
-enable_glyph_matrix_rows (matrix, start, end, enabled_p)
-     struct glyph_matrix *matrix;
-     int start, end;
-     int enabled_p;
+enable_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end, int enabled_p)
 {
   xassert (start <= end);
   xassert (start >= 0 && start < matrix->nrows);
@@ -962,8 +894,7 @@
    currently present is the flag MATRIX->no_scrolling_p.  */
 
 void
-clear_glyph_matrix (matrix)
-     struct glyph_matrix *matrix;
+clear_glyph_matrix (struct glyph_matrix *matrix)
 {
   if (matrix)
     {
@@ -978,10 +909,7 @@
    and recompute their visible height.  */
 
 void
-shift_glyph_matrix (w, matrix, start, end, dy)
-     struct window *w;
-     struct glyph_matrix *matrix;
-     int start, end, dy;
+shift_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int start, int end, int dy)
 {
   int min_y, max_y;
 
@@ -1012,8 +940,7 @@
    current matrix.  */
 
 void
-clear_current_matrices (f)
-     register struct frame *f;
+clear_current_matrices (register struct frame *f)
 {
   /* Clear frame current matrix, if we have one.  */
   if (f->current_matrix)
@@ -1038,8 +965,7 @@
 /* Clear out all display lines of F for a coming redisplay.  */
 
 void
-clear_desired_matrices (f)
-     register struct frame *f;
+clear_desired_matrices (register struct frame *f)
 {
   if (f->desired_matrix)
     clear_glyph_matrix (f->desired_matrix);
@@ -1060,9 +986,7 @@
    non-zero clear desired matrices, otherwise clear current matrices.  */
 
 static void
-clear_window_matrices (w, desired_p)
-     struct window *w;
-     int desired_p;
+clear_window_matrices (struct window *w, int desired_p)
 {
   while (w)
     {
@@ -1106,8 +1030,7 @@
 static struct glyph_row null_row;
 
 void
-clear_glyph_row (row)
-     struct glyph_row *row;
+clear_glyph_row (struct glyph_row *row)
 {
   struct glyph *p[1 + LAST_AREA];
 
@@ -1133,7 +1056,7 @@
 	 returned by xmalloc.  If flickering happens again, activate
 	 the code below.  If the flickering is gone with that, chances
 	 are that the flickering has the same reason as here.  */
-  bzero (p[0], (char *) p[LAST_AREA] - (char *) p[0]);
+  memset (p[0], 0, (char *) p[LAST_AREA] - (char *) p[0]);
 #endif
 }
 
@@ -1142,10 +1065,7 @@
    in window W starting at y-position Y.  */
 
 void
-blank_row (w, row, y)
-     struct window *w;
-     struct glyph_row *row;
-     int y;
+blank_row (struct window *w, struct glyph_row *row, int y)
 {
   int min_y, max_y;
 
@@ -1174,9 +1094,7 @@
    ends.  */
 
 void
-increment_row_positions (row, delta, delta_bytes)
-     struct glyph_row *row;
-     int delta, delta_bytes;
+increment_row_positions (struct glyph_row *row, int delta, int delta_bytes)
 {
   int area, i;
 
@@ -1251,8 +1169,7 @@
 /* Exchange pointers to glyph memory between glyph rows A and B.  */
 
 static INLINE void
-swap_glyph_pointers (a, b)
-     struct glyph_row *a, *b;
+swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b)
 {
   int i;
   for (i = 0; i < LAST_AREA + 1; ++i)
@@ -1268,19 +1185,18 @@
    that glyph pointers in the structures are left unchanged.  */
 
 INLINE void
-copy_row_except_pointers (to, from)
-     struct glyph_row *to, *from;
+copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
 {
   struct glyph *pointers[1 + LAST_AREA];
 
   /* Save glyph pointers of TO.  */
-  bcopy (to->glyphs, pointers, sizeof to->glyphs);
+  memcpy (pointers, to->glyphs, sizeof to->glyphs);
 
   /* Do a structure assignment.  */
   *to = *from;
 
   /* Restore original pointers of TO.  */
-  bcopy (pointers, to->glyphs, sizeof to->glyphs);
+  memcpy (to->glyphs, pointers, sizeof to->glyphs);
 }
 
 
@@ -1290,9 +1206,7 @@
    positions in row TO by DELTA/ DELTA_BYTES.  */
 
 void
-copy_glyph_row_contents (to, from, delta, delta_bytes)
-     struct glyph_row *to, *from;
-     int delta, delta_bytes;
+copy_glyph_row_contents (struct glyph_row *to, struct glyph_row *from, int delta, int delta_bytes)
 {
   int area;
 
@@ -1303,8 +1217,8 @@
   /* Copy glyphs from FROM to TO.  */
   for (area = 0; area < LAST_AREA; ++area)
     if (from->used[area])
-      bcopy (from->glyphs[area], to->glyphs[area],
-	     from->used[area] * sizeof (struct glyph));
+      memcpy (to->glyphs[area], from->glyphs[area],
+	      from->used[area] * sizeof (struct glyph));
 
   /* Increment buffer positions in TO by DELTA.  */
   increment_row_positions (to, delta, delta_bytes);
@@ -1317,8 +1231,7 @@
    a memory leak.  */
 
 static INLINE void
-assign_row (to, from)
-     struct glyph_row *to, *from;
+assign_row (struct glyph_row *to, struct glyph_row *from)
 {
   swap_glyph_pointers (to, from);
   copy_row_except_pointers (to, from);
@@ -1378,8 +1291,7 @@
    call to this function really clears it.  */
 
 void
-prepare_desired_row (row)
-     struct glyph_row *row;
+prepare_desired_row (struct glyph_row *row)
 {
   if (!row->enabled_p)
     {
@@ -1395,8 +1307,7 @@
 /* Return a hash code for glyph row ROW.  */
 
 int
-line_hash_code (row)
-     struct glyph_row *row;
+line_hash_code (struct glyph_row *row)
 {
   int hash = 0;
 
@@ -1429,9 +1340,7 @@
    zero, leading and trailing spaces are ignored.  */
 
 static unsigned int
-line_draw_cost (matrix, vpos)
-     struct glyph_matrix *matrix;
-     int vpos;
+line_draw_cost (struct glyph_matrix *matrix, int vpos)
 {
   struct glyph_row *row = matrix->rows + vpos;
   struct glyph *beg = row->glyphs[TEXT_AREA];
@@ -1492,10 +1401,7 @@
    flags of A and B, too.  */
 
 static INLINE int
-row_equal_p (w, a, b, mouse_face_p)
-     struct window *w;
-     struct glyph_row *a, *b;
-     int mouse_face_p;
+row_equal_p (struct window *w, struct glyph_row *a, struct glyph_row *b, int mouse_face_p)
 {
   if (a == b)
     return 1;
@@ -1565,13 +1471,13 @@
    incremented for each pool allocated.  */
 
 static struct glyph_pool *
-new_glyph_pool ()
+new_glyph_pool (void)
 {
   struct glyph_pool *result;
 
   /* Allocate a new glyph_pool and clear it.  */
   result = (struct glyph_pool *) xmalloc (sizeof *result);
-  bzero (result, sizeof *result);
+  memset (result, 0, sizeof *result);
 
   /* For memory leak and double deletion checking.  */
   ++glyph_pool_count;
@@ -1588,8 +1494,7 @@
    was passed to free_glyph_pool.  */
 
 static void
-free_glyph_pool (pool)
-     struct glyph_pool *pool;
+free_glyph_pool (struct glyph_pool *pool)
 {
   if (pool)
     {
@@ -1613,9 +1518,7 @@
    re-adjusting window glyph matrices necessary.  */
 
 static int
-realloc_glyph_pool (pool, matrix_dim)
-     struct glyph_pool *pool;
-     struct dim matrix_dim;
+realloc_glyph_pool (struct glyph_pool *pool, struct dim matrix_dim)
 {
   int needed;
   int changed_p;
@@ -1635,7 +1538,7 @@
       else
 	{
 	  pool->glyphs = (struct glyph *) xmalloc (size);
-	  bzero (pool->glyphs, size);
+	  memset (pool->glyphs, 0, size);
 	}
 
       pool->nglyphs = needed;
@@ -1994,8 +1897,7 @@
 /* Return the required height of glyph matrices for window W.  */
 
 int
-required_matrix_height (w)
-     struct window *w;
+required_matrix_height (struct window *w)
 {
 #ifdef HAVE_WINDOW_SYSTEM
   struct frame *f = XFRAME (w->frame);
@@ -2021,8 +1923,7 @@
 /* Return the required width of glyph matrices for window W.  */
 
 int
-required_matrix_width (w)
-     struct window *w;
+required_matrix_width (struct window *w)
 {
 #ifdef HAVE_WINDOW_SYSTEM
   struct frame *f = XFRAME (w->frame);
@@ -2050,8 +1951,7 @@
    window whose matrices must be allocated/reallocated.  */
 
 static void
-allocate_matrices_for_window_redisplay (w)
-     struct window *w;
+allocate_matrices_for_window_redisplay (struct window *w)
 {
   while (w)
     {
@@ -2088,8 +1988,7 @@
    changes, or its window configuration changes.  */
 
 void
-adjust_glyphs (f)
-     struct frame *f;
+adjust_glyphs (struct frame *f)
 {
   /* Block input so that expose events and other events that access
      glyph matrices are not processed while we are changing them.  */
@@ -2121,7 +2020,7 @@
    windows to estimated values.  */
 
 static void
-adjust_frame_glyphs_initially ()
+adjust_frame_glyphs_initially (void)
 {
   struct frame *sf = SELECTED_FRAME ();
   struct window *root = XWINDOW (sf->root_window);
@@ -2148,8 +2047,7 @@
 /* Allocate/reallocate glyph matrices of a single frame F.  */
 
 static void
-adjust_frame_glyphs (f)
-     struct frame *f;
+adjust_frame_glyphs (struct frame *f)
 {
   if (FRAME_WINDOW_P (f))
     adjust_frame_glyphs_for_window_redisplay (f);
@@ -2167,8 +2065,7 @@
 /* Return 1 if any window in the tree has nonzero window margins.  See
    the hack at the end of adjust_frame_glyphs_for_frame_redisplay.  */
 static int
-showing_window_margins_p (w)
-     struct window *w;
+showing_window_margins_p (struct window *w)
 {
   while (w)
     {
@@ -2196,8 +2093,7 @@
    windows from the frame's current matrix.  */
 
 static void
-fake_current_matrices (window)
-     Lisp_Object window;
+fake_current_matrices (Lisp_Object window)
 {
   struct window *w;
 
@@ -2247,18 +2143,17 @@
    a glyph matrix holding the contents of F's current frame matrix.  */
 
 static struct glyph_matrix *
-save_current_matrix (f)
-     struct frame *f;
+save_current_matrix (struct frame *f)
 {
   int i;
   struct glyph_matrix *saved;
 
   saved = (struct glyph_matrix *) xmalloc (sizeof *saved);
-  bzero (saved, sizeof *saved);
+  memset (saved, 0, sizeof *saved);
   saved->nrows = f->current_matrix->nrows;
   saved->rows = (struct glyph_row *) xmalloc (saved->nrows
 					      * sizeof *saved->rows);
-  bzero (saved->rows, saved->nrows * sizeof *saved->rows);
+  memset (saved->rows, 0, saved->nrows * sizeof *saved->rows);
 
   for (i = 0; i < saved->nrows; ++i)
     {
@@ -2266,7 +2161,7 @@
       struct glyph_row *to = saved->rows + i;
       size_t nbytes = from->used[TEXT_AREA] * sizeof (struct glyph);
       to->glyphs[TEXT_AREA] = (struct glyph *) xmalloc (nbytes);
-      bcopy (from->glyphs[TEXT_AREA], to->glyphs[TEXT_AREA], nbytes);
+      memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA], nbytes);
       to->used[TEXT_AREA] = from->used[TEXT_AREA];
     }
 
@@ -2278,9 +2173,7 @@
    and free memory associated with SAVED.  */
 
 static void
-restore_current_matrix (f, saved)
-     struct frame *f;
-     struct glyph_matrix *saved;
+restore_current_matrix (struct frame *f, struct glyph_matrix *saved)
 {
   int i;
 
@@ -2289,7 +2182,7 @@
       struct glyph_row *from = saved->rows + i;
       struct glyph_row *to = f->current_matrix->rows + i;
       size_t nbytes = from->used[TEXT_AREA] * sizeof (struct glyph);
-      bcopy (from->glyphs[TEXT_AREA], to->glyphs[TEXT_AREA], nbytes);
+      memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA], nbytes);
       to->used[TEXT_AREA] = from->used[TEXT_AREA];
       xfree (from->glyphs[TEXT_AREA]);
     }
@@ -2304,8 +2197,7 @@
    frame-based redisplay.  */
 
 static void
-adjust_frame_glyphs_for_frame_redisplay (f)
-     struct frame *f;
+adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
 {
   struct dim matrix_dim;
   int pool_changed_p;
@@ -2405,8 +2297,7 @@
    window-based redisplay.  */
 
 static void
-adjust_frame_glyphs_for_window_redisplay (f)
-     struct frame *f;
+adjust_frame_glyphs_for_window_redisplay (struct frame *f)
 {
   struct window *w;
 
@@ -2474,8 +2365,7 @@
    eventually without causing trouble).  */
 
 static void
-adjust_frame_message_buffer (f)
-     struct frame *f;
+adjust_frame_message_buffer (struct frame *f)
 {
   int size = FRAME_MESSAGE_BUF_SIZE (f) + 1;
 
@@ -2493,8 +2383,7 @@
 /* Re-allocate buffer for decode_mode_spec on frame F.  */
 
 static void
-adjust_decode_mode_spec_buffer (f)
-     struct frame *f;
+adjust_decode_mode_spec_buffer (struct frame *f)
 {
   f->decode_mode_spec_buffer
     = (char *) xrealloc (f->decode_mode_spec_buffer,
@@ -2513,8 +2402,7 @@
    the function is called when F is destroyed.  */
 
 void
-free_glyphs (f)
-     struct frame *f;
+free_glyphs (struct frame *f)
 {
   if (f && f->glyphs_initialized_p)
     {
@@ -2575,8 +2463,7 @@
    the same tree more than once.  */
 
 void
-free_window_matrices (w)
-     struct window *w;
+free_window_matrices (struct window *w)
 {
   while (w)
     {
@@ -2606,7 +2493,7 @@
    explicitly and check that nothing is left allocated.  */
 
 void
-check_glyph_memory ()
+check_glyph_memory (void)
 {
   Lisp_Object tail, frame;
 
@@ -2690,8 +2577,7 @@
    sure not to touch them in this function.  */
 
 static void
-build_frame_matrix (f)
-     struct frame *f;
+build_frame_matrix (struct frame *f)
 {
   int i;
 
@@ -2713,9 +2599,7 @@
    matrices.  W is the root of a window tree.  */
 
 static void
-build_frame_matrix_from_window_tree (matrix, w)
-     struct glyph_matrix *matrix;
-     struct window *w;
+build_frame_matrix_from_window_tree (struct glyph_matrix *matrix, struct window *w)
 {
   while (w)
     {
@@ -2743,9 +2627,7 @@
    preserve_other_columns in the old redisplay.  */
 
 static void
-build_frame_matrix_from_leaf_window (frame_matrix, w)
-     struct glyph_matrix *frame_matrix;
-     struct window *w;
+build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct window *w)
 {
   struct glyph_matrix *window_matrix;
   int window_y, frame_y;
@@ -2811,9 +2693,9 @@
       if (current_row_p)
 	{
 	  /* Copy window row to frame row.  */
-	  bcopy (window_row->glyphs[0],
-		 frame_row->glyphs[TEXT_AREA] + window_matrix->matrix_x,
-		 window_matrix->matrix_w * sizeof (struct glyph));
+	  memcpy (frame_row->glyphs[TEXT_AREA] + window_matrix->matrix_x,
+		  window_row->glyphs[0],
+		  window_matrix->matrix_w * sizeof (struct glyph));
 	}
       else
 	{
@@ -2862,9 +2744,7 @@
    for instance, vertical separators, truncation markers, etc.  */
 
 void
-spec_glyph_lookup_face (w, glyph)
-     struct window *w;
-     GLYPH *glyph;
+spec_glyph_lookup_face (struct window *w, GLYPH *glyph)
 {
   int lface_id = GLYPH_FACE (*glyph);
   /* Convert the glyph's specified face to a realized (cache) face.  */
@@ -2893,8 +2773,7 @@
    To be called for frame-based redisplay, only.  */
 
 static void
-fill_up_glyph_row_with_spaces (row)
-     struct glyph_row *row;
+fill_up_glyph_row_with_spaces (struct glyph_row *row)
 {
   fill_up_glyph_row_area_with_spaces (row, LEFT_MARGIN_AREA);
   fill_up_glyph_row_area_with_spaces (row, TEXT_AREA);
@@ -2906,9 +2785,7 @@
    frame-based redisplay only.  */
 
 static void
-fill_up_glyph_row_area_with_spaces (row, area)
-     struct glyph_row *row;
-     int area;
+fill_up_glyph_row_area_with_spaces (struct glyph_row *row, int area)
 {
   if (row->glyphs[area] < row->glyphs[area + 1])
     {
@@ -2926,9 +2803,7 @@
    reached.  In frame matrices only one area, TEXT_AREA, is used.  */
 
 static void
-fill_up_frame_row_with_spaces (row, upto)
-     struct glyph_row *row;
-     int upto;
+fill_up_frame_row_with_spaces (struct glyph_row *row, int upto)
 {
   int i = row->used[TEXT_AREA];
   struct glyph *glyph = row->glyphs[TEXT_AREA];
@@ -2950,8 +2825,7 @@
    working on frame matrices or not.  */
 
 static INLINE void
-set_frame_matrix_frame (f)
-     struct frame *f;
+set_frame_matrix_frame (struct frame *f)
 {
   frame_matrix_frame = f;
 }
@@ -2966,9 +2840,7 @@
    operations in window matrices of frame_matrix_frame.  */
 
 static INLINE void
-make_current (desired_matrix, current_matrix, row)
-     struct glyph_matrix *desired_matrix, *current_matrix;
-     int row;
+make_current (struct glyph_matrix *desired_matrix, struct glyph_matrix *current_matrix, int row)
 {
   struct glyph_row *current_row = MATRIX_ROW (current_matrix, row);
   struct glyph_row *desired_row = MATRIX_ROW (desired_matrix, row);
@@ -2995,9 +2867,7 @@
    matrices of leaf windows in the window tree rooted at W.  */
 
 static void
-mirror_make_current (w, frame_row)
-     struct window *w;
-     int frame_row;
+mirror_make_current (struct window *w, int frame_row)
 {
   while (w)
     {
@@ -3062,7 +2932,7 @@
 
   /* Make a copy of the original rows.  */
   old_rows = (struct glyph_row *) alloca (nlines * sizeof *old_rows);
-  bcopy (new_rows, old_rows, nlines * sizeof *old_rows);
+  memcpy (old_rows, new_rows, nlines * sizeof *old_rows);
 
   /* Assign new rows, maybe clear lines.  */
   for (i = 0; i < nlines; ++i)
@@ -3090,8 +2960,7 @@
    the current frame matrix.  */
 
 static void
-sync_window_with_frame_matrix_rows (w)
-     struct window *w;
+sync_window_with_frame_matrix_rows (struct window *w)
 {
   struct frame *f = XFRAME (w->frame);
   struct glyph_row *window_row, *window_row_end, *frame_row;
@@ -3128,9 +2997,7 @@
    row ROW.  Value is null if none is found.  */
 
 struct window *
-frame_row_to_window (w, row)
-     struct window *w;
-     int row;
+frame_row_to_window (struct window *w, int row)
 {
   struct window *found = NULL;
 
@@ -3163,11 +3030,7 @@
    which is empty.  */
 
 static void
-mirror_line_dance (w, unchanged_at_top, nlines, copy_from, retained_p)
-     struct window *w;
-     int unchanged_at_top, nlines;
-     int *copy_from;
-     char *retained_p;
+mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy_from, char *retained_p)
 {
   while (w)
     {
@@ -3187,7 +3050,7 @@
 
 	  /* Make a copy of the original rows of matrix m.  */
 	  old_rows = (struct glyph_row *) alloca (m->nrows * sizeof *old_rows);
-	  bcopy (m->rows, old_rows, m->nrows * sizeof *old_rows);
+	  memcpy (old_rows, m->rows, m->nrows * sizeof *old_rows);
 
 	  for (i = 0; i < nlines; ++i)
 	    {
@@ -3419,8 +3282,7 @@
    function redraw-frame.  */
 
 void
-redraw_frame (f)
-     struct frame *f;
+redraw_frame (struct frame *f)
 {
   Lisp_Object frame;
   XSETFRAME (frame, f);
@@ -3446,7 +3308,7 @@
    visible frames marked as garbaged.  */
 
 void
-redraw_garbaged_frames ()
+redraw_garbaged_frames (void)
 {
   Lisp_Object tail, frame;
 
@@ -3471,10 +3333,7 @@
    Value is non-zero if redisplay was stopped due to pending input.  */
 
 int
-update_frame (f, force_p, inhibit_hairy_id_p)
-     struct frame *f;
-     int force_p;
-     int inhibit_hairy_id_p;
+update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
 {
   /* 1 means display has been paused because of pending input.  */
   int paused_p;
@@ -3606,9 +3465,7 @@
    don't stop updating when input is pending.  */
 
 static int
-update_window_tree (w, force_p)
-     struct window *w;
-     int force_p;
+update_window_tree (struct window *w, int force_p)
 {
   int paused_p = 0;
 
@@ -3632,9 +3489,7 @@
    FORCE_P is non-zero, don't stop updating if input is pending.  */
 
 void
-update_single_window (w, force_p)
-     struct window *w;
-     int force_p;
+update_single_window (struct window *w, int force_p)
 {
   if (w->must_be_updated_p)
     {
@@ -3679,9 +3534,7 @@
    overlapped by other rows.  YB is bottom-most y-position in W.  */
 
 static void
-redraw_overlapped_rows (w, yb)
-     struct window *w;
-     int yb;
+redraw_overlapped_rows (struct window *w, int yb)
 {
   int i;
   struct frame *f = XFRAME (WINDOW_FRAME (w));
@@ -3729,9 +3582,7 @@
    others.  YB is bottom-most y-position in W.  */
 
 static void
-redraw_overlapping_rows (w, yb)
-     struct window *w;
-     int yb;
+redraw_overlapping_rows (struct window *w, int yb)
 {
   int i, bottom_y;
   struct glyph_row *row;
@@ -3793,8 +3644,7 @@
    which is below what's displayed in the window.  */
 
 void
-check_current_matrix_flags (w)
-     struct window *w;
+check_current_matrix_flags (struct window *w)
 {
   int last_seen_p = 0;
   int i, yb = window_text_bottom_y (w);
@@ -3816,9 +3666,7 @@
    not stop when detecting pending input.  */
 
 static int
-update_window (w, force_p)
-     struct window *w;
-     int force_p;
+update_window (struct window *w, int force_p)
 {
   struct glyph_matrix *desired_matrix = w->desired_matrix;
   int paused_p;
@@ -4010,9 +3858,7 @@
    AREA can be either LEFT_MARGIN_AREA or RIGHT_MARGIN_AREA.  */
 
 static void
-update_marginal_area (w, area, vpos)
-     struct window *w;
-     int area, vpos;
+update_marginal_area (struct window *w, int area, int vpos)
 {
   struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos);
   struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w)));
@@ -4035,9 +3881,7 @@
    Value is non-zero if display has changed.  */
 
 static int
-update_text_area (w, vpos)
-     struct window *w;
-     int vpos;
+update_text_area (struct window *w, int vpos)
 {
   struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos);
   struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos);
@@ -4282,9 +4126,7 @@
    changed.  */
 
 static int
-update_window_line (w, vpos, mouse_face_overwritten_p)
-     struct window *w;
-     int vpos, *mouse_face_overwritten_p;
+update_window_line (struct window *w, int vpos, int *mouse_face_overwritten_p)
 {
   struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos);
   struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos);
@@ -4353,8 +4195,7 @@
    be called from update_window.  */
 
 static void
-set_window_cursor_after_update (w)
-     struct window *w;
+set_window_cursor_after_update (struct window *w)
 {
   struct frame *f = XFRAME (w->frame);
   struct redisplay_interface *rif = FRAME_RIF (f);
@@ -4438,9 +4279,7 @@
    tree rooted at W.  */
 
 void
-set_window_update_flags (w, on_p)
-     struct window *w;
-     int on_p;
+set_window_update_flags (struct window *w, int on_p)
 {
   while (w)
     {
@@ -4518,9 +4357,7 @@
    of window W.  */
 
 static INLINE struct row_entry *
-add_row_entry (w, row)
-     struct window *w;
-     struct glyph_row *row;
+add_row_entry (struct window *w, struct glyph_row *row)
 {
   struct row_entry *entry;
   int i = row->hash % row_table_size;
@@ -4571,9 +4408,7 @@
    1	if we did scroll.  */
 
 static int
-scrolling_window (w, header_line_p)
-     struct window *w;
-     int header_line_p;
+scrolling_window (struct window *w, int header_line_p)
 {
   struct glyph_matrix *desired_matrix = w->desired_matrix;
   struct glyph_matrix *current_matrix = w->current_matrix;
@@ -4681,7 +4516,7 @@
       row_table_size = next_almost_prime (3 * n);
       nbytes = row_table_size * sizeof *row_table;
       row_table = (struct row_entry **) xrealloc (row_table, nbytes);
-      bzero (row_table, nbytes);
+      memset (row_table, 0, nbytes);
     }
 
   if (n > row_entry_pool_size)
@@ -4876,10 +4711,7 @@
    Value is non-zero if update was stopped due to pending input.  */
 
 static int
-update_frame_1 (f, force_p, inhibit_id_p)
-     struct frame *f;
-     int force_p;
-     int inhibit_id_p;
+update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
 {
   /* Frame matrices to work on.  */
   struct glyph_matrix *current_matrix = f->current_matrix;
@@ -5089,8 +4921,7 @@
 /* Do line insertions/deletions on frame F for frame-based redisplay.  */
 
 int
-scrolling (frame)
-     struct frame *frame;
+scrolling (struct frame *frame)
 {
   int unchanged_at_top, unchanged_at_bottom;
   int window_size;
@@ -5184,9 +5015,7 @@
    which is LEN glyphs long.  */
 
 static int
-count_blanks (r, len)
-     struct glyph *r;
-     int len;
+count_blanks (struct glyph *r, int len)
 {
   int i;
 
@@ -5203,8 +5032,7 @@
    of STR2.  Value is the number of equal glyphs equal at the start.  */
 
 static int
-count_match (str1, end1, str2, end2)
-     struct glyph *str1, *end1, *str2, *end2;
+count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct glyph *end2)
 {
   struct glyph *p1 = str1;
   struct glyph *p2 = str2;
@@ -5227,9 +5055,7 @@
 /* Perform a frame-based update on line VPOS in frame FRAME.  */
 
 static void
-update_frame_line (f, vpos)
-     struct frame *f;
-     int vpos;
+update_frame_line (struct frame *f, int vpos)
 {
   struct glyph *obody, *nbody, *op1, *op2, *np1, *nend;
   int tem;
@@ -5545,13 +5371,7 @@
    Adjust *X and *Y to character positions.  */
 
 Lisp_Object
-buffer_posn_from_coords (w, x, y, pos, object, dx, dy, width, height)
-     struct window *w;
-     int *x, *y;
-     struct display_pos *pos;
-     Lisp_Object *object;
-     int *dx, *dy;
-     int *width, *height;
+buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *pos, Lisp_Object *object, int *dx, int *dy, int *width, int *height)
 {
   struct it it;
   Lisp_Object old_current_buffer = Fcurrent_buffer ();
@@ -5646,14 +5466,7 @@
    *CHARPOS is set to the position in the string returned.  */
 
 Lisp_Object
-mode_line_string (w, part, x, y, charpos, object, dx, dy, width, height)
-     struct window *w;
-     enum window_part part;
-     int *x, *y;
-     int *charpos;
-     Lisp_Object *object;
-     int *dx, *dy;
-     int *width, *height;
+mode_line_string (struct window *w, enum window_part part, int *x, int *y, int *charpos, Lisp_Object *object, int *dx, int *dy, int *width, int *height)
 {
   struct glyph_row *row;
   struct glyph *glyph, *end;
@@ -5720,14 +5533,7 @@
    the string returned.  */
 
 Lisp_Object
-marginal_area_string (w, part, x, y, charpos, object, dx, dy, width, height)
-     struct window *w;
-     enum window_part part;
-     int *x, *y;
-     int *charpos;
-     Lisp_Object *object;
-     int *dx, *dy;
-     int *width, *height;
+marginal_area_string (struct window *w, enum window_part part, int *x, int *y, int *charpos, Lisp_Object *object, int *dx, int *dy, int *width, int *height)
 {
   struct glyph_row *row = w->current_matrix->rows;
   struct glyph *glyph, *end;
@@ -5816,8 +5622,8 @@
 #ifdef SIGWINCH
 
 SIGTYPE
-window_change_signal (signalnum) /* If we don't have an argument, */
-     int signalnum;		/* some compilers complain in signal calls.  */
+window_change_signal (int signalnum) /* If we don't have an argument, */
+                   		/* some compilers complain in signal calls.  */
 {
   int width, height;
   int old_errno = errno;
@@ -5865,8 +5671,7 @@
    safe to change frame sizes  while a redisplay is in progress.  */
 
 void
-do_pending_window_change (safe)
-     int safe;
+do_pending_window_change (int safe)
 {
   /* If window_change_signal should have run before, run it now.  */
   if (redisplaying_p && !safe)
@@ -5902,9 +5707,7 @@
    safe to change frame sizes while a redisplay is in progress.  */
 
 void
-change_frame_size (f, newheight, newwidth, pretend, delay, safe)
-     register struct frame *f;
-     int newheight, newwidth, pretend, delay, safe;
+change_frame_size (register struct frame *f, int newheight, int newwidth, int pretend, int delay, int safe)
 {
   Lisp_Object tail, frame;
 
@@ -5923,9 +5726,7 @@
 }
 
 static void
-change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe)
-     register struct frame *f;
-     int newheight, newwidth, pretend, delay, safe;
+change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int pretend, int delay, int safe)
 {
   int new_frame_total_cols;
   int count = SPECPDL_INDEX ();
@@ -6153,7 +5954,7 @@
 }
 
 void
-bitch_at_user ()
+bitch_at_user (void)
 {
   if (noninteractive)
     putchar (07);
@@ -6230,9 +6031,7 @@
 */
 
 Lisp_Object
-sit_for (timeout, reading, do_display)
-     Lisp_Object timeout;
-     int reading, do_display;
+sit_for (Lisp_Object timeout, int reading, int do_display)
 {
   int sec, usec;
 
@@ -6448,7 +6247,7 @@
    decoding routine to set up variables in the terminal package.  */
 
 void
-init_display ()
+init_display (void)
 {
   char *terminal_type;
 
@@ -6710,7 +6509,7 @@
  ***********************************************************************/
 
 void
-syms_of_display ()
+syms_of_display (void)
 {
   defsubr (&Sredraw_frame);
   defsubr (&Sredraw_display);
--- a/src/disptab.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/disptab.h	Thu Jul 08 17:09:35 2010 +0900
@@ -32,7 +32,7 @@
 #define DISP_INVIS_VECTOR(dp) ((dp)->extras[4])
 #define DISP_BORDER_GLYPH(dp) ((dp)->extras[5])
 
-extern Lisp_Object disp_char_vector P_ ((struct Lisp_Char_Table *, int));
+extern Lisp_Object disp_char_vector (struct Lisp_Char_Table *, int);
 
 #define DISP_CHAR_VECTOR(dp, c)				\
   (ASCII_CHAR_P(c)					\
@@ -44,10 +44,10 @@
    : disp_char_vector ((dp), (c)))
 
 /* Defined in window.c.  */
-extern struct Lisp_Char_Table *window_display_table P_ ((struct window *));
+extern struct Lisp_Char_Table *window_display_table (struct window *);
 
 /* Defined in indent.c.  */
-extern struct Lisp_Char_Table *buffer_display_table P_ ((void));
+extern struct Lisp_Char_Table *buffer_display_table (void);
 
 /* Display table to use for vectors that don't specify their own.  */
 extern Lisp_Object Vstandard_display_table;
--- a/src/doc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/doc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -46,7 +46,7 @@
 #include "buildobj.h"
 
 #ifdef HAVE_INDEX
-extern char *index P_ ((const char *, int));
+extern char *index (const char *, int);
 #endif
 
 Lisp_Object Vdoc_file_name;
@@ -65,14 +65,13 @@
 static int get_doc_string_buffer_size;
 
 static unsigned char *read_bytecode_pointer;
-Lisp_Object Fsnarf_documentation P_ ((Lisp_Object));
+Lisp_Object Fsnarf_documentation (Lisp_Object);
 
 /* readchar in lread.c calls back here to fetch the next byte.
    If UNREADFLAG is 1, we unread a byte.  */
 
 int
-read_bytecode_char (unreadflag)
-     int unreadflag;
+read_bytecode_char (int unreadflag)
 {
   if (unreadflag)
     {
@@ -102,9 +101,7 @@
    and return a cons cell.  */
 
 Lisp_Object
-get_doc_string (filepos, unibyte, definition)
-     Lisp_Object filepos;
-     int unibyte, definition;
+get_doc_string (Lisp_Object filepos, int unibyte, int definition)
 {
   char *from, *to;
   register int fd;
@@ -311,15 +308,13 @@
    of a compiled function from the .elc file.  */
 
 Lisp_Object
-read_doc_string (filepos)
-     Lisp_Object filepos;
+read_doc_string (Lisp_Object filepos)
 {
   return get_doc_string (filepos, 0, 1);
 }
 
 static int
-reread_doc_file (file)
-     Lisp_Object file;
+reread_doc_file (Lisp_Object file)
 {
 #if 0
   Lisp_Object reply, prompt[3];
@@ -515,10 +510,8 @@
 /* Scanning the DOC files and placing docstring offsets into functions.  */
 
 static void
-store_function_docstring (fun, offset)
-     Lisp_Object fun;
-     /* Use EMACS_INT because we get this from pointer subtraction.  */
-     EMACS_INT offset;
+store_function_docstring (Lisp_Object fun, EMACS_INT offset)
+/* Use EMACS_INT because we get offset from pointer subtraction.  */
 {
   fun = indirect_function (fun);
 
@@ -693,7 +686,7 @@
 	}
       pos += end - buf;
       filled -= end - buf;
-      bcopy (end, buf, filled);
+      memcpy (buf, end, filled);
     }
   emacs_close (fd);
   return Qnil;
@@ -772,7 +765,7 @@
 	      if (len == 1)
 		*bufp = *strp;
 	      else
-		bcopy (strp, bufp, len);
+		memcpy (bufp, strp, len);
 	      strp += len;
 	      bufp += len;
 	      nchars++;
@@ -824,7 +817,7 @@
 	      int offset = bufp - buf;
 	      buf = (unsigned char *) xrealloc (buf, bsize += 4);
 	      bufp = buf + offset;
-	      bcopy ("M-x ", bufp, 4);
+	      memcpy (bufp, "M-x ", 4);
 	      bufp += 4;
 	      nchars += 4;
 	      if (multibyte)
@@ -918,7 +911,7 @@
 	    int offset = bufp - buf;
 	    buf = (unsigned char *) xrealloc (buf, bsize += length_byte);
 	    bufp = buf + offset;
-	    bcopy (start, bufp, length_byte);
+	    memcpy (bufp, start, length_byte);
 	    bufp += length_byte;
 	    nchars += length;
 	    /* Check STRING again in case gc relocated it.  */
@@ -935,7 +928,7 @@
 	  if (len == 1)
 	    *bufp = *strp;
 	  else
-	    bcopy (strp, bufp, len);
+	    memcpy (bufp, strp, len);
 	  strp += len;
 	  bufp += len;
 	  nchars++;
@@ -951,7 +944,7 @@
 }
 
 void
-syms_of_doc ()
+syms_of_doc (void)
 {
   Qfunction_documentation = intern_c_string ("function-documentation");
   staticpro (&Qfunction_documentation);
--- a/src/doprnt.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/doprnt.c	Thu Jul 08 17:09:35 2010 +0900
@@ -48,8 +48,6 @@
    another macro.  */
 #include "character.h"
 
-static int doprnt1 ();
-
 /* Generate output from a format-spec FORMAT,
    terminated at position FORMAT_END.
    Output goes in BUFFER, which has room for BUFSIZE chars.
@@ -61,13 +59,7 @@
    Integers are passed as C integers.  */
 
 int
-doprnt (buffer, bufsize, format, format_end, nargs, args)
-     char *buffer;
-     register int bufsize;
-     char *format;
-     char *format_end;
-     int nargs;
-     char **args;
+doprnt (char *buffer, register int bufsize, char *format, char *format_end, int nargs, char **args)
 {
   int cnt = 0;			/* Number of arg to gobble next */
   register char *fmt = format;	/* Pointer into format string */
@@ -237,12 +229,12 @@
 		  /* Truncate the string at character boundary.  */
 		  tem = bufsize;
 		  while (!CHAR_HEAD_P (string[tem - 1])) tem--;
-		  bcopy (string, bufptr, tem);
+		  memcpy (bufptr, string, tem);
 		  /* We must calculate WIDTH again.  */
 		  width = strwidth (bufptr, tem);
 		}
 	      else
-		bcopy (string, bufptr, tem);
+		memcpy (bufptr, string, tem);
 	      bufptr += tem;
 	      bufsize -= tem;
 	      if (minlen < 0)
--- a/src/dosfns.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/dosfns.c	Thu Jul 08 17:09:35 2010 +0900
@@ -283,7 +283,7 @@
 #endif /* !HAVE_X_WINDOWS */
 
 void
-init_dosfns ()
+init_dosfns (void)
 {
   union REGS regs;
   _go32_dpmi_registers dpmiregs;
@@ -481,9 +481,7 @@
    sets the name in the frame struct, but has no other effects.  */
 
 void
-x_set_title (f, name)
-     struct frame *f;
-     Lisp_Object name;
+x_set_title (struct frame *f, Lisp_Object name)
 {
   /* Don't change the title if it's already NAME.  */
   if (EQ (name, f->title))
@@ -536,7 +534,7 @@
    (There are no other processes on DOS, right?)  */
 
 Lisp_Object
-list_system_processes ()
+list_system_processes (void)
 {
   Lisp_Object proclist = Qnil;
 
@@ -689,7 +687,8 @@
 /*
  *	Define everything
  */
-syms_of_dosfns ()
+void
+syms_of_dosfns (void)
 {
   defsubr (&Sint86);
   defsubr (&Sdos_memget);
--- a/src/dosfns.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/dosfns.h	Thu Jul 08 17:09:35 2010 +0900
@@ -38,8 +38,8 @@
 #ifndef HAVE_X_WINDOWS
 extern Lisp_Object Vdos_display_scancodes;
 
-extern int         msdos_stdcolor_idx  P_ ((const char *));
-extern Lisp_Object msdos_stdcolor_name P_ ((int));
+extern int         msdos_stdcolor_idx  (const char *);
+extern Lisp_Object msdos_stdcolor_name (int);
 #endif
 
 /* arch-tag: a83b8c4c-63c8-451e-9e94-bc72e3e2f8bc
--- a/src/editfns.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/editfns.c	Thu Jul 08 17:09:35 2010 +0900
@@ -86,38 +86,38 @@
     (1000 - TM_YEAR_BASE <= (tm_year) && (tm_year) <= 9999 - TM_YEAR_BASE)
 #endif
 
-extern size_t emacs_strftimeu P_ ((char *, size_t, const char *,
-				   const struct tm *, int));
+extern size_t emacs_strftimeu (char *, size_t, const char *,
+                               const struct tm *, int);
 
 #ifdef WINDOWSNT
 extern Lisp_Object w32_get_internal_run_time ();
 #endif
 
-static int tm_diff P_ ((struct tm *, struct tm *));
-static void find_field P_ ((Lisp_Object, Lisp_Object, Lisp_Object, int *, Lisp_Object, int *));
-static void update_buffer_properties P_ ((int, int));
-static Lisp_Object region_limit P_ ((int));
-int lisp_time_argument P_ ((Lisp_Object, time_t *, int *));
-static size_t emacs_memftimeu P_ ((char *, size_t, const char *,
-				   size_t, const struct tm *, int));
+static int tm_diff (struct tm *, struct tm *);
+static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, int *, Lisp_Object, int *);
+static void update_buffer_properties (int, int);
+static Lisp_Object region_limit (int);
+int lisp_time_argument (Lisp_Object, time_t *, int *);
+static size_t emacs_memftimeu (char *, size_t, const char *,
+                               size_t, const struct tm *, int);
 static void general_insert_function (void (*) (const unsigned char *, EMACS_INT),
 				     void (*) (Lisp_Object, EMACS_INT,
 					       EMACS_INT, EMACS_INT,
 					       EMACS_INT, int),
 				     int, int, Lisp_Object *);
-static Lisp_Object subst_char_in_region_unwind P_ ((Lisp_Object));
-static Lisp_Object subst_char_in_region_unwind_1 P_ ((Lisp_Object));
-static void transpose_markers P_ ((int, int, int, int, int, int, int, int));
+static Lisp_Object subst_char_in_region_unwind (Lisp_Object);
+static Lisp_Object subst_char_in_region_unwind_1 (Lisp_Object);
+static void transpose_markers (int, int, int, int, int, int, int, int);
 
 #ifdef HAVE_INDEX
-extern char *index P_ ((const char *, int));
+extern char *index (const char *, int);
 #endif
 
 Lisp_Object Vbuffer_access_fontify_functions;
 Lisp_Object Qbuffer_access_fontify_functions;
 Lisp_Object Vbuffer_access_fontified_property;
 
-Lisp_Object Fuser_full_name P_ ((Lisp_Object));
+Lisp_Object Fuser_full_name (Lisp_Object);
 
 /* Non-nil means don't stop at field boundary in text motion commands.  */
 
@@ -141,7 +141,7 @@
 
 
 void
-init_editfns ()
+init_editfns (void)
 {
   char *user_name;
   register unsigned char *p;
@@ -253,8 +253,7 @@
 }
 
 static Lisp_Object
-buildmark (charpos, bytepos)
-     int charpos, bytepos;
+buildmark (int charpos, int bytepos)
 {
   register Lisp_Object mark;
   mark = Fmake_marker ();
@@ -280,8 +279,7 @@
 }
 
 int
-clip_to_bounds (lower, num, upper)
-     int lower, num, upper;
+clip_to_bounds (int lower, int num, int upper)
 {
   if (num < lower)
     return lower;
@@ -328,8 +326,7 @@
    If there is no region active, signal an error. */
 
 static Lisp_Object
-region_limit (beginningp)
-     int beginningp;
+region_limit (int beginningp)
 {
   extern Lisp_Object Vmark_even_if_inactive; /* Defined in callint.c. */
   Lisp_Object m;
@@ -377,10 +374,7 @@
    of length LEN.  */
 
 static int
-overlays_around (pos, vec, len)
-     int pos;
-     Lisp_Object *vec;
-     int len;
+overlays_around (int pos, Lisp_Object *vec, int len)
 {
   Lisp_Object overlay, start, end;
   struct Lisp_Overlay *tail;
@@ -436,9 +430,7 @@
    window-specific overlays are considered only if they are associated
    with OBJECT. */
 Lisp_Object
-get_pos_property (position, prop, object)
-     Lisp_Object position, object;
-     register Lisp_Object prop;
+get_pos_property (Lisp_Object position, register Lisp_Object prop, Lisp_Object object)
 {
   CHECK_NUMBER_COERCE_MARKER (position);
 
@@ -533,11 +525,7 @@
    is not stored.  */
 
 static void
-find_field (pos, merge_at_boundary, beg_limit, beg, end_limit, end)
-     Lisp_Object pos;
-     Lisp_Object merge_at_boundary;
-     Lisp_Object beg_limit, end_limit;
-     int *beg, *end;
+find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, Lisp_Object beg_limit, int *beg, Lisp_Object end_limit, int *end)
 {
   /* Fields right before and after the point.  */
   Lisp_Object before_field, after_field;
@@ -900,7 +888,7 @@
 
 
 Lisp_Object
-save_excursion_save ()
+save_excursion_save (void)
 {
   int visible = (XBUFFER (XWINDOW (selected_window)->buffer)
 		 == current_buffer);
@@ -913,8 +901,7 @@
 }
 
 Lisp_Object
-save_excursion_restore (info)
-     Lisp_Object info;
+save_excursion_restore (Lisp_Object info)
 {
   Lisp_Object tem, tem1, omark, nmark;
   struct gcpro gcpro1, gcpro2, gcpro3;
@@ -1418,7 +1405,7 @@
 
       login = Fuser_login_name (make_number (pw->pw_uid));
       r = (unsigned char *) alloca (strlen (p) + SCHARS (login) + 1);
-      bcopy (p, r, q - p);
+      memcpy (r, p, q - p);
       r[q - p] = 0;
       strcat (r, SDATA (login));
       r[q - p] = UPCASE (r[q - p]);
@@ -1440,7 +1427,7 @@
 /* For the benefit of callers who don't want to include lisp.h */
 
 char *
-get_system_name ()
+get_system_name (void)
 {
   if (STRINGP (Vsystem_name))
     return (char *) SDATA (Vsystem_name);
@@ -1449,7 +1436,7 @@
 }
 
 char *
-get_operating_system_release()
+get_operating_system_release (void)
 {
   if (STRINGP (Voperating_system_release))
     return (char *) SDATA (Voperating_system_release);
@@ -1527,10 +1514,7 @@
 
 
 int
-lisp_time_argument (specified_time, result, usec)
-     Lisp_Object specified_time;
-     time_t *result;
-     int *usec;
+lisp_time_argument (Lisp_Object specified_time, time_t *result, int *usec)
 {
   if (NILP (specified_time))
     {
@@ -1611,13 +1595,7 @@
    This function behaves like emacs_strftimeu, except it allows null
    bytes in FORMAT.  */
 static size_t
-emacs_memftimeu (s, maxsize, format, format_len, tp, ut)
-      char *s;
-      size_t maxsize;
-      const char *format;
-      size_t format_len;
-      const struct tm *tp;
-      int ut;
+emacs_memftimeu (char *s, size_t maxsize, const char *format, size_t format_len, const struct tm *tp, int ut)
 {
   size_t total = 0;
 
@@ -1950,8 +1928,7 @@
 /* Yield A - B, measured in seconds.
    This function is copied from the GNU C Library.  */
 static int
-tm_diff (a, b)
-     struct tm *a, *b;
+tm_diff (struct tm *a, struct tm *b)
 {
   /* Compute intervening leap days correctly even if year is negative.
      Take care to avoid int overflow in leap day calculations,
@@ -2098,8 +2075,7 @@
    responsibility to free.  */
 
 void
-set_time_zone_rule (tzstring)
-     char *tzstring;
+set_time_zone_rule (char *tzstring)
 {
   int envptrs;
   char **from, **to, **newenv;
@@ -2221,8 +2197,7 @@
 }
 
 void
-insert1 (arg)
-     Lisp_Object arg;
+insert1 (Lisp_Object arg)
 {
   Finsert (1, &arg);
 }
@@ -2408,9 +2383,7 @@
    buffer substrings.  */
 
 Lisp_Object
-make_buffer_string (start, end, props)
-     int start, end;
-     int props;
+make_buffer_string (int start, int end, int props)
 {
   int start_byte = CHAR_TO_BYTE (start);
   int end_byte = CHAR_TO_BYTE (end);
@@ -2434,9 +2407,7 @@
    buffer substrings.  */
 
 Lisp_Object
-make_buffer_string_both (start, start_byte, end, end_byte, props)
-     int start, start_byte, end, end_byte;
-     int props;
+make_buffer_string_both (int start, int start_byte, int end, int end_byte, int props)
 {
   Lisp_Object result, tem, tem1;
 
@@ -2447,8 +2418,7 @@
     result = make_uninit_multibyte_string (end - start, end_byte - start_byte);
   else
     result = make_uninit_string (end - start);
-  bcopy (BYTE_POS_ADDR (start_byte), SDATA (result),
-	 end_byte - start_byte);
+  memcpy (SDATA (result), BYTE_POS_ADDR (start_byte), end_byte - start_byte);
 
   /* If desired, update and copy the text properties.  */
   if (props)
@@ -2470,8 +2440,7 @@
    in the current buffer, if necessary.  */
 
 static void
-update_buffer_properties (start, end)
-     int start, end;
+update_buffer_properties (int start, int end)
 {
   /* If this buffer has some access functions,
      call them, specifying the range of the buffer being accessed.  */
@@ -2757,15 +2726,13 @@
 }
 
 static Lisp_Object
-subst_char_in_region_unwind (arg)
-     Lisp_Object arg;
+subst_char_in_region_unwind (Lisp_Object arg)
 {
   return current_buffer->undo_list = arg;
 }
 
 static Lisp_Object
-subst_char_in_region_unwind_1 (arg)
-     Lisp_Object arg;
+subst_char_in_region_unwind_1 (Lisp_Object arg)
 {
   return current_buffer->filename = arg;
 }
@@ -2953,7 +2920,7 @@
 }
 
 
-static Lisp_Object check_translation P_ ((int, int, int, Lisp_Object));
+static Lisp_Object check_translation (int, int, int, Lisp_Object);
 
 /* Helper function for Ftranslate_region_internal.
 
@@ -2962,9 +2929,7 @@
    element is found, return it.  Otherwise return Qnil.  */
 
 static Lisp_Object
-check_translation (pos, pos_byte, end, val)
-     int pos, pos_byte, end;
-     Lisp_Object val;
+check_translation (int pos, int pos_byte, int end, Lisp_Object val)
 {
   int buf_size = 16, buf_used = 0;
   int *buf = alloca (sizeof (int) * buf_size);
@@ -3263,7 +3228,7 @@
 }
 
 Lisp_Object
-save_restriction_save ()
+save_restriction_save (void)
 {
   if (BEGV == BEG && ZV == Z)
     /* The common case that the buffer isn't narrowed.
@@ -3287,8 +3252,7 @@
 }
 
 Lisp_Object
-save_restriction_restore (data)
-     Lisp_Object data;
+save_restriction_restore (Lisp_Object data)
 {
   struct buffer *cur = NULL;
   struct buffer *buf = (CONSP (data)
@@ -3472,7 +3436,7 @@
 	  message_length = SBYTES (val);
 	  message_text = (char *)xrealloc (message_text, message_length);
 	}
-      bcopy (SDATA (val), message_text, SBYTES (val));
+      memcpy (message_text, SDATA (val), SBYTES (val));
       message2 (message_text, SBYTES (val),
 		STRING_MULTIBYTE (val));
       return val;
@@ -3627,7 +3591,7 @@
      string itself, will not be used.  Element NARGS, corresponding to
      no argument, *will* be assigned to in the case that a `%' and `.'
      occur after the final format specifier.  */
-  int *precision = (int *) (alloca((nargs + 1) * sizeof (int)));
+  int *precision = (int *) (alloca ((nargs + 1) * sizeof (int)));
   int longest_format;
   Lisp_Object val;
   int arg_intervals = 0;
@@ -3689,12 +3653,12 @@
     int i;
     if (!info)
       info = (struct info *) alloca (nbytes);
-    bzero (info, nbytes);
+    memset (info, 0, nbytes);
     for (i = 0; i <= nargs; i++)
       info[i].start = -1;
     if (!discarded)
       SAFE_ALLOCA (discarded, char *, SBYTES (args[0]));
-    bzero (discarded, SBYTES (args[0]));
+    memset (discarded, 0, SBYTES (args[0]));
   }
 
   /* Add to TOTAL enough space to hold the converted arguments.  */
@@ -3798,7 +3762,7 @@
 	       string will finally appear (Bug#5710). */
 	    actual_width = lisp_string_width (args[n], -1, NULL, NULL);
 	    if (precision[n] != -1)
-	      actual_width = min(actual_width,precision[n]);
+	      actual_width = min (actual_width, precision[n]);
 	  }
 	/* Would get MPV otherwise, since Lisp_Int's `point' to low memory.  */
 	else if (INTEGERP (args[n]) && *format != 's')
@@ -3911,7 +3875,7 @@
 	  discarded[format - format_start] = 1;
 	  format++;
 
-	  while (index("-+0# ", *format))
+	  while (index ("-+0# ", *format))
 	    {
 	      if (*format == '-')
 		{
@@ -4008,8 +3972,8 @@
 	    {
 	      int this_nchars;
 
-	      bcopy (this_format_start, this_format,
-		     format - this_format_start);
+	      memcpy (this_format, this_format_start,
+		      format - this_format_start);
 	      this_format[format - this_format_start] = 0;
 
 	      if (format[-1] == 'e' || format[-1] == 'f' || format[-1] == 'g')
@@ -4209,9 +4173,7 @@
 }
 
 Lisp_Object
-format2 (string1, arg0, arg1)
-     char *string1;
-     Lisp_Object arg0, arg1;
+format2 (char *string1, Lisp_Object arg0, Lisp_Object arg1)
 {
   Lisp_Object args[3];
   args[0] = build_string (string1);
@@ -4488,9 +4450,9 @@
 	  start1_addr = BYTE_POS_ADDR (start1_byte);
 	  start2_addr = BYTE_POS_ADDR (start2_byte);
 
-          bcopy (start2_addr, temp, len2_byte);
-          bcopy (start1_addr, start1_addr + len2_byte, len1_byte);
-          bcopy (temp, start1_addr, len2_byte);
+          memcpy (temp, start2_addr, len2_byte);
+          memcpy (start1_addr + len2_byte, start1_addr, len1_byte);
+          memcpy (start1_addr, temp, len2_byte);
 	  SAFE_FREE ();
         }
       else
@@ -4501,9 +4463,9 @@
 	  SAFE_ALLOCA (temp, unsigned char *, len1_byte);
 	  start1_addr = BYTE_POS_ADDR (start1_byte);
 	  start2_addr = BYTE_POS_ADDR (start2_byte);
-          bcopy (start1_addr, temp, len1_byte);
-          bcopy (start2_addr, start1_addr, len2_byte);
-          bcopy (temp, start1_addr + len2_byte, len1_byte);
+          memcpy (temp, start1_addr, len1_byte);
+          memcpy (start1_addr, start2_addr, len2_byte);
+          memcpy (start1_addr + len2_byte, temp, len1_byte);
 	  SAFE_FREE ();
         }
       graft_intervals_into_buffer (tmp_interval1, start1 + len2,
@@ -4541,9 +4503,9 @@
 	  SAFE_ALLOCA (temp, unsigned char *, len1_byte);
 	  start1_addr = BYTE_POS_ADDR (start1_byte);
 	  start2_addr = BYTE_POS_ADDR (start2_byte);
-          bcopy (start1_addr, temp, len1_byte);
-          bcopy (start2_addr, start1_addr, len2_byte);
-          bcopy (temp, start2_addr, len1_byte);
+          memcpy (temp, start1_addr, len1_byte);
+          memcpy (start1_addr, start2_addr, len2_byte);
+          memcpy (start2_addr, temp, len1_byte);
 	  SAFE_FREE ();
 
           graft_intervals_into_buffer (tmp_interval1, start2,
@@ -4571,10 +4533,10 @@
 	  SAFE_ALLOCA (temp, unsigned char *, len2_byte);
 	  start1_addr = BYTE_POS_ADDR (start1_byte);
 	  start2_addr = BYTE_POS_ADDR (start2_byte);
-          bcopy (start2_addr, temp, len2_byte);
-          bcopy (start1_addr, start1_addr + len_mid + len2_byte, len1_byte);
-          safe_bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid);
-          bcopy (temp, start1_addr, len2_byte);
+          memcpy (temp, start2_addr, len2_byte);
+          memcpy (start1_addr + len_mid + len2_byte, start1_addr, len1_byte);
+          memmove (start1_addr + len2_byte, start1_addr + len1_byte, len_mid);
+          memcpy (start1_addr, temp, len2_byte);
 	  SAFE_FREE ();
 
           graft_intervals_into_buffer (tmp_interval1, end2 - len1,
@@ -4604,10 +4566,10 @@
 	  SAFE_ALLOCA (temp, unsigned char *, len1_byte);
 	  start1_addr = BYTE_POS_ADDR (start1_byte);
 	  start2_addr = BYTE_POS_ADDR (start2_byte);
-          bcopy (start1_addr, temp, len1_byte);
-          bcopy (start2_addr, start1_addr, len2_byte);
-          bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid);
-          bcopy (temp, start1_addr + len2_byte + len_mid, len1_byte);
+          memcpy (temp, start1_addr, len1_byte);
+          memcpy (start1_addr, start2_addr, len2_byte);
+          memcpy (start1_addr + len2_byte, start1_addr + len1_byte, len_mid);
+          memcpy (start1_addr + len2_byte + len_mid, temp, len1_byte);
 	  SAFE_FREE ();
 
           graft_intervals_into_buffer (tmp_interval1, end2 - len1,
@@ -4639,7 +4601,7 @@
 
 
 void
-syms_of_editfns ()
+syms_of_editfns (void)
 {
   environbuf = 0;
   initial_tz = 0;
--- a/src/emacs.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/emacs.c	Thu Jul 08 17:09:35 2010 +0900
@@ -90,10 +90,10 @@
 const char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc.";
 const char emacs_version[] = "24.0.50";
 
-extern void malloc_warning P_ ((char *));
-extern void set_time_zone_rule P_ ((char *));
+extern void malloc_warning (char *);
+extern void set_time_zone_rule (char *);
 #ifdef HAVE_INDEX
-extern char *index P_ ((const char *, int));
+extern char *index (const char *, int);
 #endif
 
 /* Make these values available in GDB, which doesn't see macros.  */
@@ -157,9 +157,9 @@
    static data inside glibc's malloc.  */
 void *malloc_state_ptr;
 /* From glibc, a routine that returns a copy of the malloc internal state.  */
-extern void *malloc_get_state ();
+extern void *malloc_get_state (void);
 /* From glibc, a routine that overwrites the malloc internal state.  */
-extern int malloc_set_state ();
+extern int malloc_set_state (void*);
 /* Non-zero if the MALLOC_CHECK_ environment variable was set while
    dumping.  Used to work around a bug in glibc's malloc.  */
 int malloc_using_checking;
@@ -252,8 +252,8 @@
 char **initial_argv;
 int initial_argc;
 
-static void sort_args ();
-void syms_of_emacs ();
+static void sort_args (int argc, char **argv);
+void syms_of_emacs (void);
 
 /* MSVC needs each string be shorter than 2048 bytes, so the usage
    strings below are split to not overflow this limit.  */
@@ -361,7 +361,7 @@
 /* If non-null, call this function from fatal_error_signal before
    committing suicide.  */
 
-void (*fatal_error_signal_hook) P_ ((void));
+void (*fatal_error_signal_hook) (void);
 
 #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
 /* When compiled with GTK and running under Gnome,
@@ -374,8 +374,7 @@
 
 /* Handle bus errors, invalid instruction, etc.  */
 SIGTYPE
-fatal_error_signal (sig)
-     int sig;
+fatal_error_signal (int sig)
 {
   SIGNAL_THREAD_CHECK (sig);
   fatal_error_code = sig;
@@ -444,10 +443,7 @@
 /* Code for dealing with Lisp access to the Unix command line.  */
 
 static void
-init_cmdargs (argc, argv, skip_args)
-     int argc;
-     char **argv;
-     int skip_args;
+init_cmdargs (int argc, char **argv, int skip_args)
 {
   register int i;
   Lisp_Object name, dir, tem;
@@ -644,14 +640,7 @@
    enough information to do it right.  */
 
 static int
-argmatch (argv, argc, sstr, lstr, minlen, valptr, skipptr)
-     char **argv;
-     int argc;
-     char *sstr;
-     char *lstr;
-     int minlen;
-     char **valptr;
-     int *skipptr;
+argmatch (char **argv, int argc, char *sstr, char *lstr, int minlen, char **valptr, int *skipptr)
 {
   char *p = NULL;
   int arglen;
@@ -709,7 +698,7 @@
    possible using this special hook.  */
 
 static void
-malloc_initialize_hook ()
+malloc_initialize_hook (void)
 {
 #ifndef USE_CRT_DLL
   extern char **environ;
@@ -747,7 +736,7 @@
     }
 }
 
-void (*__malloc_initialize_hook) () = malloc_initialize_hook;
+void (*__malloc_initialize_hook) (void) = malloc_initialize_hook;
 
 #endif /* DOUG_LEA_MALLOC */
 
@@ -1202,7 +1191,7 @@
 #endif
 #if defined (HAVE_GTK_AND_PTHREAD) && !defined (SYSTEM_MALLOC) && !defined (DOUG_LEA_MALLOC)
       {
-	extern void malloc_enable_thread P_ ((void));
+        extern void malloc_enable_thread (void);
 
 	malloc_enable_thread ();
       }
@@ -1772,13 +1761,14 @@
       extern char etext;
 #endif
       extern void safe_bcopy ();
-      extern void dump_opcode_frequencies ();
 
       atexit (_mcleanup);
       /* This uses safe_bcopy because that function comes first in the
 	 Emacs executable.  It might be better to use something that
 	 gives the start of the text segment, but start_of_text is not
 	 defined on all systems now.  */
+      /* FIXME: Does not work on architectures with function
+	 descriptors.  */
       monstartup (safe_bcopy, &etext);
     }
   else
@@ -1928,9 +1918,7 @@
    than once, eliminate all but one copy of it.  */
 
 static void
-sort_args (argc, argv)
-     int argc;
-     char **argv;
+sort_args (int argc, char **argv)
 {
   char **new = (char **) xmalloc (sizeof (char *) * argc);
   /* For each element of argv,
@@ -2071,7 +2059,7 @@
   while (to < argc)
     new[to++] = 0;
 
-  bcopy (new, argv, sizeof (char *) * argc);
+  memcpy (argv, new, sizeof (char *) * argc);
 
   xfree (options);
   xfree (new);
@@ -2322,10 +2310,7 @@
 /* Set system locale CATEGORY, with previous locale *PLOCALE, to
    DESIRED_LOCALE.  */
 static void
-synchronize_locale (category, plocale, desired_locale)
-     int category;
-     Lisp_Object *plocale;
-     Lisp_Object desired_locale;
+synchronize_locale (int category, Lisp_Object *plocale, Lisp_Object desired_locale)
 {
   if (! EQ (*plocale, desired_locale))
     {
--- a/src/eval.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/eval.c	Thu Jul 08 17:09:35 2010 +0900
@@ -170,19 +170,19 @@
 
 extern Lisp_Object Qfunction;
 
-static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*));
-static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN;
+static Lisp_Object funcall_lambda (Lisp_Object, int, Lisp_Object*);
+static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN;
 
 #if __GNUC__
 /* "gcc -O3" enables automatic function inlining, which optimizes out
    the arguments for the invocations of these functions, whereas they
    expect these values on the stack.  */
-Lisp_Object apply1 () __attribute__((noinline));
-Lisp_Object call2 () __attribute__((noinline));
+Lisp_Object apply1 (Lisp_Object fn, Lisp_Object arg) __attribute__((noinline));
+Lisp_Object call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2) __attribute__((noinline));
 #endif
 
 void
-init_eval_once ()
+init_eval_once (void)
 {
   specpdl_size = 50;
   specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding));
@@ -195,7 +195,7 @@
 }
 
 void
-init_eval ()
+init_eval (void)
 {
   specpdl_ptr = specpdl;
   catchlist = 0;
@@ -214,8 +214,7 @@
 /* unwind-protect function used by call_debugger.  */
 
 static Lisp_Object
-restore_stack_limits (data)
-     Lisp_Object data;
+restore_stack_limits (Lisp_Object data)
 {
   max_specpdl_size = XINT (XCAR (data));
   max_lisp_eval_depth = XINT (XCDR (data));
@@ -225,8 +224,7 @@
 /* Call the Lisp debugger, giving it argument ARG.  */
 
 Lisp_Object
-call_debugger (arg)
-     Lisp_Object arg;
+call_debugger (Lisp_Object arg)
 {
   int debug_while_redisplaying;
   int count = SPECPDL_INDEX ();
@@ -282,8 +280,7 @@
 }
 
 void
-do_debug_on_call (code)
-     Lisp_Object code;
+do_debug_on_call (Lisp_Object code)
 {
   debug_on_next_call = 0;
   backtrace_list->debug_on_exit = 1;
@@ -609,8 +606,7 @@
     called is a built-in.  */
 
 int
-interactive_p (exclude_subrs_p)
-     int exclude_subrs_p;
+interactive_p (int exclude_subrs_p)
 {
   struct backtrace *btp;
   Lisp_Object fun;
@@ -932,8 +928,7 @@
 
 /* Error handler used in Fuser_variable_p.  */
 static Lisp_Object
-user_variable_p_eh (ignore)
-     Lisp_Object ignore;
+user_variable_p_eh (Lisp_Object ignore)
 {
   return Qnil;
 }
@@ -1219,10 +1214,7 @@
    This is how catches are done from within C code. */
 
 Lisp_Object
-internal_catch (tag, func, arg)
-     Lisp_Object tag;
-     Lisp_Object (*func) ();
-     Lisp_Object arg;
+internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object arg)
 {
   /* This structure is made part of the chain `catchlist'.  */
   struct catchtag c;
@@ -1267,9 +1259,7 @@
    This is used for correct unwinding in Fthrow and Fsignal.  */
 
 static void
-unwind_to_catch (catch, value)
-     struct catchtag *catch;
-     Lisp_Object value;
+unwind_to_catch (struct catchtag *catch, Lisp_Object value)
 {
   register int last_time;
 
@@ -1400,9 +1390,8 @@
    rather than passed in a list.  Used by Fbyte_code.  */
 
 Lisp_Object
-internal_lisp_condition_case (var, bodyform, handlers)
-     volatile Lisp_Object var;
-     Lisp_Object bodyform, handlers;
+internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform,
+			      Lisp_Object handlers)
 {
   Lisp_Object val;
   struct catchtag c;
@@ -1469,10 +1458,8 @@
    but allow the debugger to run if that is enabled.  */
 
 Lisp_Object
-internal_condition_case (bfun, handlers, hfun)
-     Lisp_Object (*bfun) ();
-     Lisp_Object handlers;
-     Lisp_Object (*hfun) ();
+internal_condition_case (Lisp_Object (*bfun) (void), Lisp_Object handlers,
+			 Lisp_Object (*hfun) (Lisp_Object))
 {
   Lisp_Object val;
   struct catchtag c;
@@ -1516,11 +1503,8 @@
 /* Like internal_condition_case but call BFUN with ARG as its argument.  */
 
 Lisp_Object
-internal_condition_case_1 (bfun, arg, handlers, hfun)
-     Lisp_Object (*bfun) ();
-     Lisp_Object arg;
-     Lisp_Object handlers;
-     Lisp_Object (*hfun) ();
+internal_condition_case_1 (Lisp_Object (*bfun) (Lisp_Object), Lisp_Object arg,
+			   Lisp_Object handlers, Lisp_Object (*hfun) (Lisp_Object))
 {
   Lisp_Object val;
   struct catchtag c;
@@ -1660,8 +1644,8 @@
 }
 
 
-static Lisp_Object find_handler_clause P_ ((Lisp_Object, Lisp_Object,
-					    Lisp_Object, Lisp_Object));
+static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object,
+                                        Lisp_Object, Lisp_Object);
 
 DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0,
        doc: /* Signal an error.  Args are ERROR-SYMBOL and associated DATA.
@@ -1790,8 +1774,7 @@
    Used for anything but Qquit (which can return from Fsignal).  */
 
 void
-xsignal (error_symbol, data)
-     Lisp_Object error_symbol, data;
+xsignal (Lisp_Object error_symbol, Lisp_Object data)
 {
   Fsignal (error_symbol, data);
   abort ();
@@ -1800,29 +1783,25 @@
 /* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list.  */
 
 void
-xsignal0 (error_symbol)
-     Lisp_Object error_symbol;
+xsignal0 (Lisp_Object error_symbol)
 {
   xsignal (error_symbol, Qnil);
 }
 
 void
-xsignal1 (error_symbol, arg)
-     Lisp_Object error_symbol, arg;
+xsignal1 (Lisp_Object error_symbol, Lisp_Object arg)
 {
   xsignal (error_symbol, list1 (arg));
 }
 
 void
-xsignal2 (error_symbol, arg1, arg2)
-     Lisp_Object error_symbol, arg1, arg2;
+xsignal2 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2)
 {
   xsignal (error_symbol, list2 (arg1, arg2));
 }
 
 void
-xsignal3 (error_symbol, arg1, arg2, arg3)
-     Lisp_Object error_symbol, arg1, arg2, arg3;
+xsignal3 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
 {
   xsignal (error_symbol, list3 (arg1, arg2, arg3));
 }
@@ -1831,9 +1810,7 @@
    If ARG is not a genuine list, make it a one-element list.  */
 
 void
-signal_error (s, arg)
-     char *s;
-     Lisp_Object arg;
+signal_error (char *s, Lisp_Object arg)
 {
   Lisp_Object tortoise, hare;
 
@@ -1862,8 +1839,7 @@
    a list containing one of CONDITIONS.  */
 
 static int
-wants_debugger (list, conditions)
-     Lisp_Object list, conditions;
+wants_debugger (Lisp_Object list, Lisp_Object conditions)
 {
   if (NILP (list))
     return 0;
@@ -1887,8 +1863,7 @@
    according to debugger-ignored-errors.  */
 
 static int
-skip_debugger (conditions, data)
-     Lisp_Object conditions, data;
+skip_debugger (Lisp_Object conditions, Lisp_Object data)
 {
   Lisp_Object tail;
   int first_string = 1;
@@ -1925,8 +1900,7 @@
    SIG and DATA describe the signal, as in find_handler_clause.  */
 
 static int
-maybe_call_debugger (conditions, sig, data)
-     Lisp_Object conditions, sig, data;
+maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data)
 {
   Lisp_Object combined_data;
 
@@ -1962,8 +1936,8 @@
    a second error here in case we're handling specpdl overflow.  */
 
 static Lisp_Object
-find_handler_clause (handlers, conditions, sig, data)
-     Lisp_Object handlers, conditions, sig, data;
+find_handler_clause (Lisp_Object handlers, Lisp_Object conditions,
+		     Lisp_Object sig, Lisp_Object data)
 {
   register Lisp_Object h;
   register Lisp_Object tem;
@@ -2205,8 +2179,7 @@
 }
 
 Lisp_Object
-un_autoload (oldqueue)
-     Lisp_Object oldqueue;
+un_autoload (Lisp_Object oldqueue)
 {
   register Lisp_Object queue, first, second;
 
@@ -2233,8 +2206,7 @@
    FUNDEF is the autoload definition (a list).  */
 
 void
-do_autoload (fundef, funname)
-     Lisp_Object fundef, funname;
+do_autoload (Lisp_Object fundef, Lisp_Object funname)
 {
   int count = SPECPDL_INDEX ();
   Lisp_Object fun;
@@ -2259,7 +2231,7 @@
      the function.  We do this in the specific case of autoloading
      because autoloading is not an explicit request "load this file",
      but rather a request to "call this function".
-     
+
      The value saved here is to be restored into Vautoload_queue.  */
   record_unwind_protect (un_autoload, Vautoload_queue);
   Vautoload_queue = Qt;
@@ -2358,7 +2330,7 @@
       if (XSUBR (fun)->max_args == UNEVALLED)
 	{
 	  backtrace.evalargs = 0;
-	  val = (*XSUBR (fun)->function) (args_left);
+	  val = (XSUBR (fun)->function.a1) (args_left);
 	  goto done;
 	}
 
@@ -2384,7 +2356,7 @@
 	  backtrace.args = vals;
 	  backtrace.nargs = XINT (numargs);
 
-	  val = (*XSUBR (fun)->function) (XINT (numargs), vals);
+	  val = (XSUBR (fun)->function.am) (XINT (numargs), vals);
 	  UNGCPRO;
 	  goto done;
 	}
@@ -2408,40 +2380,40 @@
       switch (i)
 	{
 	case 0:
-	  val = (*XSUBR (fun)->function) ();
+	  val = (XSUBR (fun)->function.a0) ();
 	  goto done;
 	case 1:
-	  val = (*XSUBR (fun)->function) (argvals[0]);
+	  val = (XSUBR (fun)->function.a1) (argvals[0]);
 	  goto done;
 	case 2:
-	  val = (*XSUBR (fun)->function) (argvals[0], argvals[1]);
+	  val = (XSUBR (fun)->function.a2) (argvals[0], argvals[1]);
 	  goto done;
 	case 3:
-	  val = (*XSUBR (fun)->function) (argvals[0], argvals[1],
-					  argvals[2]);
+	  val = (XSUBR (fun)->function.a3) (argvals[0], argvals[1],
+					    argvals[2]);
 	  goto done;
 	case 4:
-	  val = (*XSUBR (fun)->function) (argvals[0], argvals[1],
-					  argvals[2], argvals[3]);
+	  val = (XSUBR (fun)->function.a4) (argvals[0], argvals[1],
+					    argvals[2], argvals[3]);
 	  goto done;
 	case 5:
-	  val = (*XSUBR (fun)->function) (argvals[0], argvals[1], argvals[2],
-					  argvals[3], argvals[4]);
+	  val = (XSUBR (fun)->function.a5) (argvals[0], argvals[1], argvals[2],
+					    argvals[3], argvals[4]);
 	  goto done;
 	case 6:
-	  val = (*XSUBR (fun)->function) (argvals[0], argvals[1], argvals[2],
-					  argvals[3], argvals[4], argvals[5]);
+	  val = (XSUBR (fun)->function.a6) (argvals[0], argvals[1], argvals[2],
+					    argvals[3], argvals[4], argvals[5]);
 	  goto done;
 	case 7:
-	  val = (*XSUBR (fun)->function) (argvals[0], argvals[1], argvals[2],
-					  argvals[3], argvals[4], argvals[5],
-					  argvals[6]);
+	  val = (XSUBR (fun)->function.a7) (argvals[0], argvals[1], argvals[2],
+					    argvals[3], argvals[4], argvals[5],
+					    argvals[6]);
 	  goto done;
 
 	case 8:
-	  val = (*XSUBR (fun)->function) (argvals[0], argvals[1], argvals[2],
-					  argvals[3], argvals[4], argvals[5],
-					  argvals[6], argvals[7]);
+	  val = (XSUBR (fun)->function.a8) (argvals[0], argvals[1], argvals[2],
+					    argvals[3], argvals[4], argvals[5],
+					    argvals[6], argvals[7]);
 	  goto done;
 
 	default:
@@ -2557,7 +2529,7 @@
       gcpro1.nvars = 1 + numargs;
     }
 
-  bcopy (args, funcall_args, nargs * sizeof (Lisp_Object));
+  memcpy (funcall_args, args, nargs * sizeof (Lisp_Object));
   /* Spread the last arg we got.  Its first element goes in
      the slot that it used to occupy, hence this value of I.  */
   i = nargs - 1;
@@ -2574,8 +2546,8 @@
 /* Run hook variables in various ways.  */
 
 enum run_hooks_condition {to_completion, until_success, until_failure};
-static Lisp_Object run_hook_with_args P_ ((int, Lisp_Object *,
-					   enum run_hooks_condition));
+static Lisp_Object run_hook_with_args (int, Lisp_Object *,
+                                       enum run_hooks_condition);
 
 DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0,
        doc: /* Run each hook in HOOKS.
@@ -2682,10 +2654,7 @@
    except that it isn't necessary to gcpro ARGS[0].  */
 
 static Lisp_Object
-run_hook_with_args (nargs, args, cond)
-     int nargs;
-     Lisp_Object *args;
-     enum run_hooks_condition cond;
+run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond)
 {
   Lisp_Object sym, val, ret;
   struct gcpro gcpro1, gcpro2, gcpro3;
@@ -2765,10 +2734,7 @@
    except that it isn't necessary to gcpro ARGS[0].  */
 
 Lisp_Object
-run_hook_list_with_args (funlist, nargs, args)
-     Lisp_Object funlist;
-     int nargs;
-     Lisp_Object *args;
+run_hook_list_with_args (Lisp_Object funlist, int nargs, Lisp_Object *args)
 {
   Lisp_Object sym;
   Lisp_Object val;
@@ -2810,8 +2776,7 @@
 /* Run the hook HOOK, giving each function the two args ARG1 and ARG2.  */
 
 void
-run_hook_with_args_2 (hook, arg1, arg2)
-     Lisp_Object hook, arg1, arg2;
+run_hook_with_args_2 (Lisp_Object hook, Lisp_Object arg1, Lisp_Object arg2)
 {
   Lisp_Object temp[3];
   temp[0] = hook;
@@ -2823,8 +2788,7 @@
 
 /* Apply fn to arg */
 Lisp_Object
-apply1 (fn, arg)
-     Lisp_Object fn, arg;
+apply1 (Lisp_Object fn, Lisp_Object arg)
 {
   struct gcpro gcpro1;
 
@@ -2843,8 +2807,7 @@
 
 /* Call function fn on no arguments */
 Lisp_Object
-call0 (fn)
-     Lisp_Object fn;
+call0 (Lisp_Object fn)
 {
   struct gcpro gcpro1;
 
@@ -2855,8 +2818,7 @@
 /* Call function fn with 1 argument arg1 */
 /* ARGSUSED */
 Lisp_Object
-call1 (fn, arg1)
-     Lisp_Object fn, arg1;
+call1 (Lisp_Object fn, Lisp_Object arg1)
 {
   struct gcpro gcpro1;
   Lisp_Object args[2];
@@ -2871,8 +2833,7 @@
 /* Call function fn with 2 arguments arg1, arg2 */
 /* ARGSUSED */
 Lisp_Object
-call2 (fn, arg1, arg2)
-     Lisp_Object fn, arg1, arg2;
+call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2)
 {
   struct gcpro gcpro1;
   Lisp_Object args[3];
@@ -2887,8 +2848,7 @@
 /* Call function fn with 3 arguments arg1, arg2, arg3 */
 /* ARGSUSED */
 Lisp_Object
-call3 (fn, arg1, arg2, arg3)
-     Lisp_Object fn, arg1, arg2, arg3;
+call3 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
 {
   struct gcpro gcpro1;
   Lisp_Object args[4];
@@ -2904,8 +2864,8 @@
 /* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */
 /* ARGSUSED */
 Lisp_Object
-call4 (fn, arg1, arg2, arg3, arg4)
-     Lisp_Object fn, arg1, arg2, arg3, arg4;
+call4 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
+       Lisp_Object arg4)
 {
   struct gcpro gcpro1;
   Lisp_Object args[5];
@@ -2922,8 +2882,8 @@
 /* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */
 /* ARGSUSED */
 Lisp_Object
-call5 (fn, arg1, arg2, arg3, arg4, arg5)
-     Lisp_Object fn, arg1, arg2, arg3, arg4, arg5;
+call5 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
+       Lisp_Object arg4, Lisp_Object arg5)
 {
   struct gcpro gcpro1;
   Lisp_Object args[6];
@@ -2941,8 +2901,8 @@
 /* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */
 /* ARGSUSED */
 Lisp_Object
-call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6)
-     Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6;
+call6 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
+       Lisp_Object arg4, Lisp_Object arg5, Lisp_Object arg6)
 {
   struct gcpro gcpro1;
   Lisp_Object args[7];
@@ -2961,8 +2921,8 @@
 /* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */
 /* ARGSUSED */
 Lisp_Object
-call7 (fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-     Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7;
+call7 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
+       Lisp_Object arg4, Lisp_Object arg5, Lisp_Object arg6, Lisp_Object arg7)
 {
   struct gcpro gcpro1;
   Lisp_Object args[8];
@@ -3051,14 +3011,14 @@
 
       if (XSUBR (fun)->max_args == MANY)
 	{
-	  val = (*XSUBR (fun)->function) (numargs, args + 1);
+	  val = (XSUBR (fun)->function.am) (numargs, args + 1);
 	  goto done;
 	}
 
       if (XSUBR (fun)->max_args > numargs)
 	{
 	  internal_args = (Lisp_Object *) alloca (XSUBR (fun)->max_args * sizeof (Lisp_Object));
-	  bcopy (args + 1, internal_args, numargs * sizeof (Lisp_Object));
+	  memcpy (internal_args, args + 1, numargs * sizeof (Lisp_Object));
 	  for (i = numargs; i < XSUBR (fun)->max_args; i++)
 	    internal_args[i] = Qnil;
 	}
@@ -3067,44 +3027,44 @@
       switch (XSUBR (fun)->max_args)
 	{
 	case 0:
-	  val = (*XSUBR (fun)->function) ();
+	  val = (XSUBR (fun)->function.a0) ();
 	  goto done;
 	case 1:
-	  val = (*XSUBR (fun)->function) (internal_args[0]);
+	  val = (XSUBR (fun)->function.a1) (internal_args[0]);
 	  goto done;
 	case 2:
-	  val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1]);
+	  val = (XSUBR (fun)->function.a2) (internal_args[0], internal_args[1]);
 	  goto done;
 	case 3:
-	  val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
-					  internal_args[2]);
+	  val = (XSUBR (fun)->function.a3) (internal_args[0], internal_args[1],
+					    internal_args[2]);
 	  goto done;
 	case 4:
-	  val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
-					  internal_args[2], internal_args[3]);
+	  val = (XSUBR (fun)->function.a4) (internal_args[0], internal_args[1],
+					    internal_args[2], internal_args[3]);
 	  goto done;
 	case 5:
-	  val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
-					  internal_args[2], internal_args[3],
-					  internal_args[4]);
+	  val = (XSUBR (fun)->function.a5) (internal_args[0], internal_args[1],
+					    internal_args[2], internal_args[3],
+					    internal_args[4]);
 	  goto done;
 	case 6:
-	  val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
-					  internal_args[2], internal_args[3],
-					  internal_args[4], internal_args[5]);
+	  val = (XSUBR (fun)->function.a6) (internal_args[0], internal_args[1],
+					    internal_args[2], internal_args[3],
+					    internal_args[4], internal_args[5]);
 	  goto done;
 	case 7:
-	  val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
-					  internal_args[2], internal_args[3],
-					  internal_args[4], internal_args[5],
-					  internal_args[6]);
+	  val = (XSUBR (fun)->function.a7) (internal_args[0], internal_args[1],
+					    internal_args[2], internal_args[3],
+					    internal_args[4], internal_args[5],
+					    internal_args[6]);
 	  goto done;
 
 	case 8:
-	  val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
-					  internal_args[2], internal_args[3],
-					  internal_args[4], internal_args[5],
-					  internal_args[6], internal_args[7]);
+	  val = (XSUBR (fun)->function.a8) (internal_args[0], internal_args[1],
+					    internal_args[2], internal_args[3],
+					    internal_args[4], internal_args[5],
+					    internal_args[6], internal_args[7]);
 	  goto done;
 
 	default:
@@ -3147,9 +3107,7 @@
 }
 
 Lisp_Object
-apply_lambda (fun, args, eval_flag)
-     Lisp_Object fun, args;
-     int eval_flag;
+apply_lambda (Lisp_Object fun, Lisp_Object args, int eval_flag)
 {
   Lisp_Object args_left;
   Lisp_Object numargs;
@@ -3196,10 +3154,7 @@
    FUN must be either a lambda-expression or a compiled-code object.  */
 
 static Lisp_Object
-funcall_lambda (fun, nargs, arg_vector)
-     Lisp_Object fun;
-     int nargs;
-     register Lisp_Object *arg_vector;
+funcall_lambda (Lisp_Object fun, int nargs, register Lisp_Object *arg_vector)
 {
   Lisp_Object val, syms_left, next;
   int count = SPECPDL_INDEX ();
@@ -3291,7 +3246,7 @@
 }
 
 void
-grow_specpdl ()
+grow_specpdl (void)
 {
   register int count = SPECPDL_INDEX ();
   if (specpdl_size >= max_specpdl_size)
@@ -3324,8 +3279,7 @@
      BUFFER did not yet have a buffer-local value).  */
 
 void
-specbind (symbol, value)
-     Lisp_Object symbol, value;
+specbind (Lisp_Object symbol, Lisp_Object value)
 {
   struct Lisp_Symbol *sym;
 
@@ -3423,9 +3377,7 @@
 }
 
 void
-record_unwind_protect (function, arg)
-     Lisp_Object (*function) P_ ((Lisp_Object));
-     Lisp_Object arg;
+record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg)
 {
   eassert (!handling_signal);
 
@@ -3438,9 +3390,7 @@
 }
 
 Lisp_Object
-unbind_to (count, value)
-     int count;
-     Lisp_Object value;
+unbind_to (int count, Lisp_Object value)
 {
   Lisp_Object quitf = Vquit_flag;
   struct gcpro gcpro1, gcpro2;
@@ -3623,7 +3573,7 @@
 
 
 void
-mark_backtrace ()
+mark_backtrace (void)
 {
   register struct backtrace *backlist;
   register int i;
@@ -3642,7 +3592,7 @@
 }
 
 void
-syms_of_eval ()
+syms_of_eval (void)
 {
   DEFVAR_INT ("max-specpdl-size", &max_specpdl_size,
 	      doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's.
--- a/src/fileio.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/fileio.c	Thu Jul 08 17:09:35 2010 +0900
@@ -240,15 +240,13 @@
 
 Lisp_Object Qcar_less_than_car;
 
-static int a_write P_ ((int, Lisp_Object, int, int,
-			Lisp_Object *, struct coding_system *));
-static int e_write P_ ((int, Lisp_Object, int, int, struct coding_system *));
+static int a_write (int, Lisp_Object, int, int,
+                    Lisp_Object *, struct coding_system *);
+static int e_write (int, Lisp_Object, int, int, struct coding_system *);
 
 
 void
-report_file_error (string, data)
-     const char *string;
-     Lisp_Object data;
+report_file_error (const char *string, Lisp_Object data)
 {
   Lisp_Object errstring;
   int errorno = errno;
@@ -286,8 +284,7 @@
 }
 
 Lisp_Object
-close_file_unwind (fd)
-     Lisp_Object fd;
+close_file_unwind (Lisp_Object fd)
 {
   emacs_close (XFASTINT (fd));
   return Qnil;
@@ -296,8 +293,7 @@
 /* Restore point, having saved it as a marker.  */
 
 Lisp_Object
-restore_point_unwind (location)
-     Lisp_Object location;
+restore_point_unwind (Lisp_Object location)
 {
   Fgoto_char (location);
   Fset_marker (location, Qnil, Qnil);
@@ -429,7 +425,7 @@
   filename = FILE_SYSTEM_CASE (filename);
 #ifdef DOS_NT
   beg = (unsigned char *) alloca (SBYTES (filename) + 1);
-  bcopy (SDATA (filename), beg, SBYTES (filename) + 1);
+  memcpy (beg, SDATA (filename), SBYTES (filename) + 1);
 #else
   beg = SDATA (filename);
 #endif
@@ -539,8 +535,7 @@
 
 
 char *
-file_name_as_directory (out, in)
-     char *out, *in;
+file_name_as_directory (char *out, char *in)
 {
   int size = strlen (in) - 1;
 
@@ -604,8 +599,7 @@
  */
 
 int
-directory_file_name (src, dst)
-     char *src, *dst;
+directory_file_name (char *src, char *dst)
 {
   long slen;
 
@@ -688,9 +682,7 @@
    generated.  */
 
 Lisp_Object
-make_temp_name (prefix, base64_p)
-     Lisp_Object prefix;
-     int base64_p;
+make_temp_name (Lisp_Object prefix, int base64_p)
 {
   Lisp_Object val;
   int len, clen;
@@ -733,10 +725,10 @@
   if (!STRING_MULTIBYTE (prefix))
     STRING_SET_UNIBYTE (val);
   data = SDATA (val);
-  bcopy(SDATA (prefix), data, len);
+  memcpy (data, SDATA (prefix), len);
   p = data + len;
 
-  bcopy (pidbuf, p, pidlen);
+  memcpy (p, pidbuf, pidlen);
   p += pidlen;
 
   /* Here we try to minimize useless stat'ing when this function is
@@ -947,7 +939,7 @@
 
   /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */
   nm = (unsigned char *) alloca (SBYTES (name) + 1);
-  bcopy (SDATA (name), nm, SBYTES (name) + 1);
+  memcpy (nm, SDATA (name), SBYTES (name) + 1);
 
 #ifdef DOS_NT
   /* Note if special escape prefix is present, but remove for now.  */
@@ -1101,7 +1093,7 @@
 	  unsigned char *o, *p;
 	  for (p = nm; *p && (!IS_DIRECTORY_SEP (*p)); p++);
 	  o = alloca (p - nm + 1);
-	  bcopy ((char *) nm, o, p - nm);
+	  memcpy (o, nm, p - nm);
 	  o [p - nm] = 0;
 
 	  BLOCK_INPUT;
@@ -1252,7 +1244,7 @@
 	  )
 	{
 	  unsigned char *temp = (unsigned char *) alloca (length);
-	  bcopy (newdir, temp, length - 1);
+	  memcpy (temp, newdir, length - 1);
 	  temp[length - 1] = 0;
 	  newdir = temp;
 	}
@@ -1475,7 +1467,7 @@
 	int len = ptr ? ptr - user : strlen (user);
 	/* Copy the user name into temp storage. */
 	o = (unsigned char *) alloca (len + 1);
-	bcopy ((char *) user, o, len);
+	memcpy (o, user, len);
 	o[len] = 0;
 
 	/* Look up the user name. */
@@ -1558,8 +1550,7 @@
 
 /* If /~ or // appears, discard everything through first slash.  */
 static int
-file_name_absolute_p (filename)
-     const unsigned char *filename;
+file_name_absolute_p (const unsigned char *filename)
 {
   return
     (IS_DIRECTORY_SEP (*filename) || *filename == '~'
@@ -1571,8 +1562,7 @@
 }
 
 static unsigned char *
-search_embedded_absfilename (nm, endp)
-     unsigned char *nm, *endp;
+search_embedded_absfilename (unsigned char *nm, unsigned char *endp)
 {
   unsigned char *p, *s;
 
@@ -1593,7 +1583,7 @@
 	    {
 	      unsigned char *o = alloca (s - p + 1);
 	      struct passwd *pw;
-	      bcopy (p, o, s - p);
+	      memcpy (o, p, s - p);
 	      o [s - p] = 0;
 
 	      /* If we have ~user and `user' exists, discard
@@ -1650,7 +1640,7 @@
      decode of environment variables, causing the original Lisp_String
      data to be relocated.  */
   nm = (unsigned char *) alloca (SBYTES (filename) + 1);
-  bcopy (SDATA (filename), nm, SBYTES (filename) + 1);
+  memcpy (nm, SDATA (filename), SBYTES (filename) + 1);
 
 #ifdef DOS_NT
   dostounix_filename (nm);
@@ -1823,8 +1813,7 @@
    (directory-file-name (expand-file-name FOO)).  */
 
 Lisp_Object
-expand_and_dir_to_file (filename, defdir)
-     Lisp_Object filename, defdir;
+expand_and_dir_to_file (Lisp_Object filename, Lisp_Object defdir)
 {
   register Lisp_Object absname;
 
@@ -1853,12 +1842,7 @@
    If QUICK is nonzero, we ask for y or n, not yes or no.  */
 
 void
-barf_or_query_if_file_exists (absname, querystring, interactive, statptr, quick)
-     Lisp_Object absname;
-     unsigned char *querystring;
-     int interactive;
-     struct stat *statptr;
-     int quick;
+barf_or_query_if_file_exists (Lisp_Object absname, unsigned char *querystring, int interactive, struct stat *statptr, int quick)
 {
   register Lisp_Object tem, encoded_filename;
   struct stat statbuf;
@@ -2228,8 +2212,7 @@
 }
 
 static Lisp_Object
-internal_delete_file_1 (ignore)
-     Lisp_Object ignore;
+internal_delete_file_1 (Lisp_Object ignore)
 {
   return Qt;
 }
@@ -2495,8 +2478,7 @@
 /* Return nonzero if file FILENAME exists and can be executed.  */
 
 static int
-check_executable (filename)
-     char *filename;
+check_executable (char *filename)
 {
 #ifdef DOS_NT
   int len = strlen (filename);
@@ -2520,8 +2502,7 @@
 /* Return nonzero if file FILENAME exists and can be written.  */
 
 static int
-check_writable (filename)
-     char *filename;
+check_writable (char *filename)
 {
 #ifdef MSDOS
   struct stat st;
@@ -2752,7 +2733,7 @@
     {
       bufsize *= 2;
       buf = (char *) xrealloc (buf, bufsize);
-      bzero (buf, bufsize);
+      memset (buf, 0, bufsize);
 
       errno = 0;
       valsize = readlink (SDATA (filename), buf, bufsize);
@@ -3101,7 +3082,7 @@
   return value;
 }
 
-extern int lisp_time_argument P_ ((Lisp_Object, time_t *, int *));
+extern int lisp_time_argument (Lisp_Object, time_t *, int *);
 
 DEFUN ("set-file-times", Fset_file_times, Sset_file_times, 1, 2, 0,
        doc: /* Set times of file FILENAME to TIME.
@@ -3235,8 +3216,7 @@
 	o set back the buffer multibyteness.  */
 
 static Lisp_Object
-decide_coding_unwind (unwind_data)
-     Lisp_Object unwind_data;
+decide_coding_unwind (Lisp_Object unwind_data)
 {
   Lisp_Object multibyte, undo_list, buffer;
 
@@ -3268,12 +3248,12 @@
 
 
 /* Read from a non-regular file.
-   Read non_regular_trytry bytes max from non_regular_fd.
+   Read non_regular_nbytes bytes max from non_regular_fd.
    Non_regular_inserted specifies where to put the read bytes.
    Value is the number of bytes read.  */
 
 static Lisp_Object
-read_non_regular ()
+read_non_regular (Lisp_Object ignore)
 {
   EMACS_INT nbytes;
 
@@ -3291,7 +3271,7 @@
    in insert-file-contents.  */
 
 static Lisp_Object
-read_non_regular_quit ()
+read_non_regular_quit (Lisp_Object ignore)
 {
   return Qnil;
 }
@@ -3857,7 +3837,7 @@
 				  conversion_buffer);
 	  unprocessed = coding.carryover_bytes;
 	  if (coding.carryover_bytes > 0)
-	    bcopy (coding.carryover, read_buf, unprocessed);
+	    memcpy (read_buf, coding.carryover, unprocessed);
 	}
       UNGCPRO;
       emacs_close (fd);
@@ -4445,11 +4425,10 @@
   RETURN_UNGCPRO (unbind_to (count, val));
 }
 
-static Lisp_Object build_annotations P_ ((Lisp_Object, Lisp_Object));
+static Lisp_Object build_annotations (Lisp_Object, Lisp_Object);
 
 static Lisp_Object
-build_annotations_unwind (arg)
-     Lisp_Object arg;
+build_annotations_unwind (Lisp_Object arg)
 {
   Vwrite_region_annotation_buffers = arg;
   return Qnil;
@@ -4458,10 +4437,9 @@
 /* Decide the coding-system to encode the data with.  */
 
 static Lisp_Object
-choose_write_coding_system (start, end, filename,
-			    append, visit, lockname, coding)
-     Lisp_Object start, end, filename, append, visit, lockname;
-     struct coding_system *coding;
+choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
+			    Lisp_Object append, Lisp_Object visit, Lisp_Object lockname,
+			    struct coding_system *coding)
 {
   Lisp_Object val;
   Lisp_Object eol_parent = Qnil;
@@ -4904,7 +4882,7 @@
   return Qnil;
 }
 
-Lisp_Object merge ();
+Lisp_Object merge (Lisp_Object, Lisp_Object, Lisp_Object);
 
 DEFUN ("car-less-than-car", Fcar_less_than_car, Scar_less_than_car, 2, 2, 0,
        doc: /* Return t if (car A) is numerically less than (car B).  */)
@@ -4923,8 +4901,7 @@
    as save-excursion would do.  */
 
 static Lisp_Object
-build_annotations (start, end)
-     Lisp_Object start, end;
+build_annotations (Lisp_Object start, Lisp_Object end)
 {
   Lisp_Object annotations;
   Lisp_Object p, res;
@@ -5013,13 +4990,7 @@
    The return value is negative in case of system call failure.  */
 
 static int
-a_write (desc, string, pos, nchars, annot, coding)
-     int desc;
-     Lisp_Object string;
-     register int nchars;
-     int pos;
-     Lisp_Object *annot;
-     struct coding_system *coding;
+a_write (int desc, Lisp_Object string, int pos, register int nchars, Lisp_Object *annot, struct coding_system *coding)
 {
   Lisp_Object tem;
   int nextpos;
@@ -5063,11 +5034,7 @@
    are indexes to the string STRING.  */
 
 static int
-e_write (desc, string, start, end, coding)
-     int desc;
-     Lisp_Object string;
-     int start, end;
-     struct coding_system *coding;
+e_write (int desc, Lisp_Object string, int start, int end, struct coding_system *coding)
 {
   if (STRINGP (string))
     {
@@ -5259,8 +5226,7 @@
 }
 
 Lisp_Object
-auto_save_error (error)
-     Lisp_Object error;
+auto_save_error (Lisp_Object error)
 {
   Lisp_Object args[3], msg;
   int i, nbytes;
@@ -5279,7 +5245,7 @@
   GCPRO1 (msg);
   nbytes = SBYTES (msg);
   SAFE_ALLOCA (msgbuf, char *, nbytes);
-  bcopy (SDATA (msg), msgbuf, nbytes);
+  memcpy (msgbuf, SDATA (msg), nbytes);
 
   for (i = 0; i < 3; ++i)
     {
@@ -5296,7 +5262,7 @@
 }
 
 Lisp_Object
-auto_save_1 ()
+auto_save_1 (void)
 {
   struct stat st;
   Lisp_Object modes;
@@ -5322,8 +5288,8 @@
 }
 
 static Lisp_Object
-do_auto_save_unwind (arg)  /* used as unwind-protect function */
-     Lisp_Object arg;
+do_auto_save_unwind (Lisp_Object arg)  /* used as unwind-protect function */
+                     
 {
   FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer;
   auto_saving = 0;
@@ -5337,16 +5303,15 @@
 }
 
 static Lisp_Object
-do_auto_save_unwind_1 (value)  /* used as unwind-protect function */
-     Lisp_Object value;
+do_auto_save_unwind_1 (Lisp_Object value)  /* used as unwind-protect function */
+                       
 {
   minibuffer_auto_raise = XINT (value);
   return Qnil;
 }
 
 static Lisp_Object
-do_auto_save_make_dir (dir)
-     Lisp_Object dir;
+do_auto_save_make_dir (Lisp_Object dir)
 {
   Lisp_Object mode;
 
@@ -5356,8 +5321,7 @@
 }
 
 static Lisp_Object
-do_auto_save_eh (ignore)
-     Lisp_Object ignore;
+do_auto_save_eh (Lisp_Object ignore)
 {
   return Qnil;
 }
@@ -5627,8 +5591,7 @@
 }
 
 Lisp_Object
-Fread_file_name (prompt, dir, default_filename, mustmatch, initial, predicate)
-     Lisp_Object prompt, dir, default_filename, mustmatch, initial, predicate;
+Fread_file_name (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object initial, Lisp_Object predicate)
 {
   struct gcpro gcpro1, gcpro2;
   Lisp_Object args[7];
@@ -5646,7 +5609,7 @@
 
 
 void
-syms_of_fileio ()
+syms_of_fileio (void)
 {
   Qoperations = intern_c_string ("operations");
   Qexpand_file_name = intern_c_string ("expand-file-name");
--- a/src/filelock.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/filelock.c	Thu Jul 08 17:09:35 2010 +0900
@@ -34,9 +34,7 @@
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -122,11 +120,11 @@
 extern Lisp_Object Vshell_file_name;
 
 #ifdef BOOT_TIME
-static void get_boot_time_1 P_ ((char *, int));
+static void get_boot_time_1 (char *, int);
 #endif
 
 static time_t
-get_boot_time ()
+get_boot_time (void)
 {
 #if defined (BOOT_TIME)
   int counter;
@@ -253,9 +251,7 @@
    Success is indicated by setting BOOT_TIME to a larger value.  */
 
 void
-get_boot_time_1 (filename, newest)
-     char *filename;
-     int newest;
+get_boot_time_1 (char *filename, int newest)
 {
   struct utmp ut, *utp;
   int desc;
@@ -326,9 +322,7 @@
    fill_in_lock_file_name (lock, (file)))
 
 static void
-fill_in_lock_file_name (lockfile, fn)
-     register char *lockfile;
-     register Lisp_Object fn;
+fill_in_lock_file_name (register char *lockfile, register Lisp_Object fn)
 {
   register char *p;
   struct stat st;
@@ -364,9 +358,7 @@
    Return 1 if successful, 0 if not.  */
 
 static int
-lock_file_1 (lfname, force)
-     char *lfname;
-     int force;
+lock_file_1 (char *lfname, int force)
 {
   register int err;
   time_t boot_time;
@@ -408,8 +400,7 @@
 /* Return 1 if times A and B are no more than one second apart.  */
 
 int
-within_one_second (a, b)
-     time_t a, b;
+within_one_second (time_t a, time_t b)
 {
   return (a - b >= -1 && a - b <= 1);
 }
@@ -420,12 +411,10 @@
    or -1 if something is wrong with the locking mechanism.  */
 
 static int
-current_lock_owner (owner, lfname)
-     lock_info_type *owner;
-     char *lfname;
+current_lock_owner (lock_info_type *owner, char *lfname)
 {
 #ifndef index
-  extern char *rindex (), *index ();
+  extern char *rindex (const char *, int), *index (const char *, int);
 #endif
   int len, ret;
   int local_owner = 0;
@@ -540,9 +529,7 @@
    Return -1 if cannot lock for any other reason.  */
 
 static int
-lock_if_free (clasher, lfname)
-     lock_info_type *clasher;
-     register char *lfname;
+lock_if_free (lock_info_type *clasher, register char *lfname)
 {
   while (lock_file_1 (lfname, 0) == 0)
     {
@@ -585,8 +572,7 @@
    take away the lock, or return nil meaning ignore the lock.  */
 
 void
-lock_file (fn)
-     Lisp_Object fn;
+lock_file (Lisp_Object fn)
 {
   register Lisp_Object attack, orig_fn, encoded_fn;
   register char *lfname, *locker;
@@ -645,8 +631,7 @@
 }
 
 void
-unlock_file (fn)
-     register Lisp_Object fn;
+unlock_file (register Lisp_Object fn)
 {
   register char *lfname;
 
@@ -660,7 +645,7 @@
 }
 
 void
-unlock_all_files ()
+unlock_all_files (void)
 {
   register Lisp_Object tail;
   register struct buffer *b;
@@ -709,8 +694,7 @@
 /* Unlock the file visited in buffer BUFFER.  */
 
 void
-unlock_buffer (buffer)
-     struct buffer *buffer;
+unlock_buffer (struct buffer *buffer)
 {
   if (BUF_SAVE_MODIFF (buffer) < BUF_MODIFF (buffer)
       && STRINGP (buffer->file_truename))
@@ -750,14 +734,14 @@
 /* Initialization functions.  */
 
 void
-init_filelock ()
+init_filelock (void)
 {
   boot_time = 0;
   boot_time_initialized = 0;
 }
 
 void
-syms_of_filelock ()
+syms_of_filelock (void)
 {
   DEFVAR_LISP ("temporary-file-directory", &Vtemporary_file_directory,
 	       doc: /* The directory for writing temporary files.  */);
--- a/src/filemode.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/filemode.c	Thu Jul 08 17:09:35 2010 +0900
@@ -17,10 +17,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
    USA.  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 
@@ -90,10 +87,10 @@
 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
 #endif
 
-void mode_string ();
-static char ftypelet ();
-static void rwx ();
-static void setst ();
+void mode_string (short unsigned int mode, char *str);
+static char ftypelet (long int bits);
+static void rwx (short unsigned int bits, char *chars);
+static void setst (short unsigned int bits, char *chars);
 
 /* filemodestring - fill in string STR with an ls-style ASCII
    representation of the st_mode field of file stats block STATP.
@@ -132,9 +129,7 @@
 	'T' if the file is sticky but not executable.  */
 
 void
-filemodestring (statp, str)
-     struct stat *statp;
-     char *str;
+filemodestring (struct stat *statp, char *str)
 {
   mode_string (statp->st_mode, str);
 }
@@ -143,9 +138,7 @@
    is given as an argument.  */
 
 void
-mode_string (mode, str)
-     unsigned short mode;
-     char *str;
+mode_string (short unsigned int mode, char *str)
 {
   str[0] = ftypelet ((long) mode);
   rwx ((mode & 0700) << 0, &str[1]);
@@ -167,8 +160,7 @@
    '?' for any other file type.  */
 
 static char
-ftypelet (bits)
-     long bits;
+ftypelet (long int bits)
 {
 #ifdef S_ISBLK
   if (S_ISBLK (bits))
@@ -207,9 +199,7 @@
    flags in CHARS accordingly.  */
 
 static void
-rwx (bits, chars)
-     unsigned short bits;
-     char *chars;
+rwx (short unsigned int bits, char *chars)
 {
   chars[0] = (bits & S_IRUSR) ? 'r' : '-';
   chars[1] = (bits & S_IWUSR) ? 'w' : '-';
@@ -220,9 +210,7 @@
    according to the file mode BITS.  */
 
 static void
-setst (bits, chars)
-     unsigned short bits;
-     char *chars;
+setst (short unsigned int bits, char *chars)
 {
 #ifdef S_ISUID
   if (bits & S_ISUID)
--- a/src/floatfns.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/floatfns.c	Thu Jul 08 17:09:35 2010 +0900
@@ -70,7 +70,7 @@
 
 /* This declaration is omitted on some systems, like Ultrix.  */
 #if !defined (HPUX) && defined (HAVE_LOGB) && !defined (logb)
-extern double logb ();
+extern double logb (double);
 #endif /* not HPUX and HAVE_LOGB and no logb macro */
 
 #if defined(DOMAIN) && defined(SING) && defined(OVERFLOW)
@@ -778,11 +778,10 @@
 /* the rounding functions  */
 
 static Lisp_Object
-rounding_driver (arg, divisor, double_round, int_round2, name)
-     register Lisp_Object arg, divisor;
-     double (*double_round) ();
-     EMACS_INT (*int_round2) ();
-     char *name;
+rounding_driver (Lisp_Object arg, Lisp_Object divisor,
+		 double (*double_round) (double),
+		 EMACS_INT (*int_round2) (EMACS_INT, EMACS_INT),
+		 char *name)
 {
   CHECK_NUMBER_OR_FLOAT (arg);
 
@@ -832,8 +831,7 @@
    integer functions.  */
 
 static EMACS_INT
-ceiling2 (i1, i2)
-     EMACS_INT i1, i2;
+ceiling2 (EMACS_INT i1, EMACS_INT i2)
 {
   return (i2 < 0
 	  ? (i1 < 0  ?  ((-1 - i1) / -i2) + 1  :  - (i1 / -i2))
@@ -841,8 +839,7 @@
 }
 
 static EMACS_INT
-floor2 (i1, i2)
-     EMACS_INT i1, i2;
+floor2 (EMACS_INT i1, EMACS_INT i2)
 {
   return (i2 < 0
 	  ? (i1 <= 0  ?  -i1 / -i2  :  -1 - ((i1 - 1) / -i2))
@@ -850,8 +847,7 @@
 }
 
 static EMACS_INT
-truncate2 (i1, i2)
-     EMACS_INT i1, i2;
+truncate2 (EMACS_INT i1, EMACS_INT i2)
 {
   return (i2 < 0
 	  ? (i1 < 0  ?  -i1 / -i2  :  - (i1 / -i2))
@@ -859,8 +855,7 @@
 }
 
 static EMACS_INT
-round2 (i1, i2)
-     EMACS_INT i1, i2;
+round2 (EMACS_INT i1, EMACS_INT i2)
 {
   /* The C language's division operator gives us one remainder R, but
      we want the remainder R1 on the other side of 0 if R1 is closer
@@ -880,16 +875,14 @@
 #define emacs_rint rint
 #else
 static double
-emacs_rint (d)
-     double d;
+emacs_rint (double d)
 {
   return floor (d + 0.5);
 }
 #endif
 
 static double
-double_identity (d)
-     double d;
+double_identity (double d)
 {
   return d;
 }
@@ -941,8 +934,7 @@
 
 
 Lisp_Object
-fmod_float (x, y)
-     register Lisp_Object x, y;
+fmod_float (Lisp_Object x, Lisp_Object y)
 {
   double f1, f2;
 
--- a/src/fns.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/fns.c	Thu Jul 08 17:09:35 2010 +0900
@@ -74,10 +74,10 @@
 
 extern Lisp_Object Qinput_method_function;
 
-static int internal_equal P_ ((Lisp_Object , Lisp_Object, int, int));
-
-extern long get_random ();
-extern void seed_random P_ ((long));
+static int internal_equal (Lisp_Object , Lisp_Object, int, int);
+
+extern long get_random (void);
+extern void seed_random (long);
 
 #ifndef HAVE_UNISTD_H
 extern long time ();
@@ -233,7 +233,7 @@
 
   if (SCHARS (s1) != SCHARS (s2)
       || SBYTES (s1) != SBYTES (s2)
-      || bcmp (SDATA (s1), SDATA (s2), SBYTES (s1)))
+      || memcmp (SDATA (s1), SDATA (s2), SBYTES (s1)))
     return Qnil;
   return Qt;
 }
@@ -383,15 +383,14 @@
 /* "gcc -O3" enables automatic function inlining, which optimizes out
    the arguments for the invocations of this function, whereas it
    expects these values on the stack.  */
-static Lisp_Object concat P_ ((int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special)) __attribute__((noinline));
+static Lisp_Object concat (int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special) __attribute__((noinline));
 #else  /* !__GNUC__ */
-static Lisp_Object concat P_ ((int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special));
+static Lisp_Object concat (int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special);
 #endif
 
 /* ARGSUSED */
 Lisp_Object
-concat2 (s1, s2)
-     Lisp_Object s1, s2;
+concat2 (Lisp_Object s1, Lisp_Object s2)
 {
   Lisp_Object args[2];
   args[0] = s1;
@@ -401,8 +400,7 @@
 
 /* ARGSUSED */
 Lisp_Object
-concat3 (s1, s2, s3)
-     Lisp_Object s1, s2, s3;
+concat3 (Lisp_Object s1, Lisp_Object s2, Lisp_Object s3)
 {
   Lisp_Object args[3];
   args[0] = s1;
@@ -471,8 +469,8 @@
 	   / BOOL_VECTOR_BITS_PER_CHAR);
 
       val = Fmake_bool_vector (Flength (arg), Qnil);
-      bcopy (XBOOL_VECTOR (arg)->data, XBOOL_VECTOR (val)->data,
-	     size_in_chars);
+      memcpy (XBOOL_VECTOR (val)->data, XBOOL_VECTOR (arg)->data,
+	      size_in_chars);
       return val;
     }
 
@@ -492,11 +490,7 @@
 };
 
 static Lisp_Object
-concat (nargs, args, target_type, last_special)
-     int nargs;
-     Lisp_Object *args;
-     enum Lisp_Type target_type;
-     int last_special;
+concat (int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special)
 {
   Lisp_Object val;
   register Lisp_Object tail;
@@ -643,8 +637,7 @@
 	{
 	  int thislen_byte = SBYTES (this);
 
-	  bcopy (SDATA (this), SDATA (val) + toindex_byte,
-		 SBYTES (this));
+	  memcpy (SDATA (val) + toindex_byte, SDATA (this), SBYTES (this));
 	  if (! NULL_INTERVAL_P (STRING_INTERVALS (this)))
 	    {
 	      textprops[num_textprops].argnum = argnum;
@@ -777,7 +770,7 @@
 static EMACS_INT string_char_byte_cache_bytepos;
 
 void
-clear_string_char_byte_cache ()
+clear_string_char_byte_cache (void)
 {
   string_char_byte_cache_string = Qnil;
 }
@@ -785,9 +778,7 @@
 /* Return the byte index corresponding to CHAR_INDEX in STRING.  */
 
 EMACS_INT
-string_char_to_byte (string, char_index)
-     Lisp_Object string;
-     EMACS_INT char_index;
+string_char_to_byte (Lisp_Object string, EMACS_INT char_index)
 {
   EMACS_INT i_byte;
   EMACS_INT best_below, best_below_byte;
@@ -847,9 +838,7 @@
 /* Return the character index corresponding to BYTE_INDEX in STRING.  */
 
 EMACS_INT
-string_byte_to_char (string, byte_index)
-     Lisp_Object string;
-     EMACS_INT byte_index;
+string_byte_to_char (Lisp_Object string, EMACS_INT byte_index)
 {
   EMACS_INT i, i_byte;
   EMACS_INT best_below, best_below_byte;
@@ -913,8 +902,7 @@
 /* Convert STRING to a multibyte string.  */
 
 Lisp_Object
-string_make_multibyte (string)
-     Lisp_Object string;
+string_make_multibyte (Lisp_Object string)
 {
   unsigned char *buf;
   EMACS_INT nbytes;
@@ -947,8 +935,7 @@
    converted to eight-bit characters. */
 
 Lisp_Object
-string_to_multibyte (string)
-     Lisp_Object string;
+string_to_multibyte (Lisp_Object string)
 {
   unsigned char *buf;
   EMACS_INT nbytes;
@@ -965,7 +952,7 @@
     return make_multibyte_string (SDATA (string), nbytes, nbytes);
 
   SAFE_ALLOCA (buf, unsigned char *, nbytes);
-  bcopy (SDATA (string), buf, SBYTES (string));
+  memcpy (buf, SDATA (string), SBYTES (string));
   str_to_multibyte (buf, nbytes, SBYTES (string));
 
   ret = make_multibyte_string (buf, SCHARS (string), nbytes);
@@ -978,8 +965,7 @@
 /* Convert STRING to a single-byte string.  */
 
 Lisp_Object
-string_make_unibyte (string)
-     Lisp_Object string;
+string_make_unibyte (Lisp_Object string)
 {
   int nchars;
   unsigned char *buf;
@@ -1052,7 +1038,7 @@
       int bytes = SBYTES (string);
       unsigned char *str = (unsigned char *) xmalloc (bytes);
 
-      bcopy (SDATA (string), str, bytes);
+      memcpy (str, SDATA (string), bytes);
       bytes = str_as_unibyte (str, bytes);
       string = make_unibyte_string (str, bytes);
       xfree (str);
@@ -1089,8 +1075,7 @@
 			      SBYTES (string),
 			      &nchars, &nbytes);
       new_string = make_uninit_multibyte_string (nchars, nbytes);
-      bcopy (SDATA (string), SDATA (new_string),
-	     SBYTES (string));
+      memcpy (SDATA (new_string), SDATA (string), SBYTES (string));
       if (nbytes != SBYTES (string))
 	str_as_multibyte (SDATA (new_string), nbytes,
 			  SBYTES (string), NULL);
@@ -1311,9 +1296,7 @@
    both in characters and in bytes.  */
 
 Lisp_Object
-substring_both (string, from, from_byte, to, to_byte)
-     Lisp_Object string;
-     int from, from_byte, to, to_byte;
+substring_both (Lisp_Object string, int from, int from_byte, int to, int to_byte)
 {
   Lisp_Object res;
   int size;
@@ -1495,8 +1478,7 @@
    Use only on lists known never to be circular.  */
 
 Lisp_Object
-assq_no_quit (key, list)
-     Lisp_Object key, list;
+assq_no_quit (Lisp_Object key, Lisp_Object list)
 {
   while (CONSP (list)
 	 && (!CONSP (XCAR (list))
@@ -1547,8 +1529,7 @@
    Use only on lists known never to be circular.  */
 
 Lisp_Object
-assoc_no_quit (key, list)
-     Lisp_Object key, list;
+assoc_no_quit (Lisp_Object key, Lisp_Object list)
 {
   while (CONSP (list)
 	 && (!CONSP (XCAR (list))
@@ -1824,7 +1805,7 @@
   return new;
 }
 
-Lisp_Object merge ();
+Lisp_Object merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred);
 
 DEFUN ("sort", Fsort, Ssort, 2, 2, 0,
        doc: /* Sort LIST, stably, comparing elements using PREDICATE.
@@ -1858,9 +1839,7 @@
 }
 
 Lisp_Object
-merge (org_l1, org_l2, pred)
-     Lisp_Object org_l1, org_l2;
-     Lisp_Object pred;
+merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred)
 {
   Lisp_Object value;
   register Lisp_Object tail;
@@ -2117,9 +2096,7 @@
    PROPS, if non-nil, means compare string text properties too.  */
 
 static int
-internal_equal (o1, o2, depth, props)
-     register Lisp_Object o1, o2;
-     int depth, props;
+internal_equal (register Lisp_Object o1, register Lisp_Object o2, int depth, int props)
 {
   if (depth > 200)
     error ("Stack overflow in equal");
@@ -2191,8 +2168,8 @@
 
 	    if (XBOOL_VECTOR (o1)->size != XBOOL_VECTOR (o2)->size)
 	      return 0;
-	    if (bcmp (XBOOL_VECTOR (o1)->data, XBOOL_VECTOR (o2)->data,
-		      size_in_chars))
+	    if (memcmp (XBOOL_VECTOR (o1)->data, XBOOL_VECTOR (o2)->data,
+			size_in_chars))
 	      return 0;
 	    return 1;
 	  }
@@ -2226,8 +2203,7 @@
 	return 0;
       if (SBYTES (o1) != SBYTES (o2))
 	return 0;
-      if (bcmp (SDATA (o1), SDATA (o2),
-		SBYTES (o1)))
+      if (memcmp (SDATA (o1), SDATA (o2), SBYTES (o1)))
 	return 0;
       if (props && !compare_string_intervals (o1, o2))
 	return 0;
@@ -2240,7 +2216,6 @@
   return 0;
 }
 
-extern Lisp_Object Fmake_char_internal ();
 
 DEFUN ("fillarray", Ffillarray, Sfillarray, 2, 2, 0,
        doc: /* Store each element of ARRAY with ITEM.
@@ -2326,7 +2301,7 @@
   int len;
   CHECK_STRING (string);
   len = SBYTES (string);
-  bzero (SDATA (string), len);
+  memset (SDATA (string), 0, len);
   STRING_SET_CHARS (string, len);
   STRING_SET_UNIBYTE (string);
   return Qnil;
@@ -2334,8 +2309,7 @@
 
 /* ARGSUSED */
 Lisp_Object
-nconc2 (s1, s2)
-     Lisp_Object s1, s2;
+nconc2 (Lisp_Object s1, Lisp_Object s2)
 {
   Lisp_Object args[2];
   args[0] = s1;
@@ -2390,10 +2364,7 @@
  LENI is the length of VALS, which should also be the length of SEQ.  */
 
 static void
-mapcar1 (leni, vals, fn, seq)
-     int leni;
-     Lisp_Object *vals;
-     Lisp_Object fn, seq;
+mapcar1 (int leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq)
 {
   register Lisp_Object tail;
   Lisp_Object dummy;
@@ -2702,8 +2673,7 @@
    Anything that calls this function must protect from GC!  */
 
 Lisp_Object
-do_yes_or_no_p (prompt)
-     Lisp_Object prompt;
+do_yes_or_no_p (Lisp_Object prompt)
 {
   return call1 (intern ("yes-or-no-p"), prompt);
 }
@@ -2870,8 +2840,7 @@
 Lisp_Object require_nesting_list;
 
 Lisp_Object
-require_unwind (old_value)
-     Lisp_Object old_value;
+require_unwind (Lisp_Object old_value)
 {
   return require_nesting_list = old_value;
 }
@@ -3224,8 +3193,8 @@
    base64 characters.  */
 
 
-static int base64_encode_1 P_ ((const char *, char *, int, int, int));
-static int base64_decode_1 P_ ((const char *, char *, int, int, int *));
+static int base64_encode_1 (const char *, char *, int, int, int);
+static int base64_decode_1 (const char *, char *, int, int, int *);
 
 DEFUN ("base64-encode-region", Fbase64_encode_region, Sbase64_encode_region,
        2, 3, "r",
@@ -3333,12 +3302,7 @@
 }
 
 static int
-base64_encode_1 (from, to, length, line_break, multibyte)
-     const char *from;
-     char *to;
-     int length;
-     int line_break;
-     int multibyte;
+base64_encode_1 (const char *from, char *to, int length, int line_break, int multibyte)
 {
   int counter = 0, i = 0;
   char *e = to;
@@ -3535,12 +3499,7 @@
    characters in *NCHARS_RETURN.  */
 
 static int
-base64_decode_1 (from, to, length, multibyte, nchars_return)
-     const char *from;
-     char *to;
-     int length;
-     int multibyte;
-     int *nchars_return;
+base64_decode_1 (const char *from, char *to, int length, int multibyte, int *nchars_return)
 {
   int i = 0;
   char *e = to;
@@ -3652,25 +3611,25 @@
 
 /* Function prototypes.  */
 
-static struct Lisp_Hash_Table *check_hash_table P_ ((Lisp_Object));
-static int get_key_arg P_ ((Lisp_Object, int, Lisp_Object *, char *));
-static void maybe_resize_hash_table P_ ((struct Lisp_Hash_Table *));
-static int cmpfn_eql P_ ((struct Lisp_Hash_Table *, Lisp_Object, unsigned,
-			  Lisp_Object, unsigned));
-static int cmpfn_equal P_ ((struct Lisp_Hash_Table *, Lisp_Object, unsigned,
-			    Lisp_Object, unsigned));
-static int cmpfn_user_defined P_ ((struct Lisp_Hash_Table *, Lisp_Object,
-				   unsigned, Lisp_Object, unsigned));
-static unsigned hashfn_eq P_ ((struct Lisp_Hash_Table *, Lisp_Object));
-static unsigned hashfn_eql P_ ((struct Lisp_Hash_Table *, Lisp_Object));
-static unsigned hashfn_equal P_ ((struct Lisp_Hash_Table *, Lisp_Object));
-static unsigned hashfn_user_defined P_ ((struct Lisp_Hash_Table *,
-					 Lisp_Object));
-static unsigned sxhash_string P_ ((unsigned char *, int));
-static unsigned sxhash_list P_ ((Lisp_Object, int));
-static unsigned sxhash_vector P_ ((Lisp_Object, int));
-static unsigned sxhash_bool_vector P_ ((Lisp_Object));
-static int sweep_weak_table P_ ((struct Lisp_Hash_Table *, int));
+static struct Lisp_Hash_Table *check_hash_table (Lisp_Object);
+static int get_key_arg (Lisp_Object, int, Lisp_Object *, char *);
+static void maybe_resize_hash_table (struct Lisp_Hash_Table *);
+static int cmpfn_eql (struct Lisp_Hash_Table *, Lisp_Object, unsigned,
+                      Lisp_Object, unsigned);
+static int cmpfn_equal (struct Lisp_Hash_Table *, Lisp_Object, unsigned,
+                        Lisp_Object, unsigned);
+static int cmpfn_user_defined (struct Lisp_Hash_Table *, Lisp_Object,
+                               unsigned, Lisp_Object, unsigned);
+static unsigned hashfn_eq (struct Lisp_Hash_Table *, Lisp_Object);
+static unsigned hashfn_eql (struct Lisp_Hash_Table *, Lisp_Object);
+static unsigned hashfn_equal (struct Lisp_Hash_Table *, Lisp_Object);
+static unsigned hashfn_user_defined (struct Lisp_Hash_Table *,
+                                     Lisp_Object);
+static unsigned sxhash_string (unsigned char *, int);
+static unsigned sxhash_list (Lisp_Object, int);
+static unsigned sxhash_vector (Lisp_Object, int);
+static unsigned sxhash_bool_vector (Lisp_Object);
+static int sweep_weak_table (struct Lisp_Hash_Table *, int);
 
 
 
@@ -3682,8 +3641,7 @@
    Lisp_Hash_Table.  Otherwise, signal an error.  */
 
 static struct Lisp_Hash_Table *
-check_hash_table (obj)
-     Lisp_Object obj;
+check_hash_table (Lisp_Object obj)
 {
   CHECK_HASH_TABLE (obj);
   return XHASH_TABLE (obj);
@@ -3694,8 +3652,7 @@
    number.  */
 
 int
-next_almost_prime (n)
-     int n;
+next_almost_prime (int n)
 {
   if (n % 2 == 0)
     n += 1;
@@ -3714,11 +3671,7 @@
    a DEFUN parameter list.  */
 
 static int
-get_key_arg (key, nargs, args, used)
-     Lisp_Object key;
-     int nargs;
-     Lisp_Object *args;
-     char *used;
+get_key_arg (Lisp_Object key, int nargs, Lisp_Object *args, char *used)
 {
   int i;
 
@@ -3743,10 +3696,7 @@
    vector that are not copied from VEC are set to INIT.  */
 
 Lisp_Object
-larger_vector (vec, new_size, init)
-     Lisp_Object vec;
-     int new_size;
-     Lisp_Object init;
+larger_vector (Lisp_Object vec, int new_size, Lisp_Object init)
 {
   struct Lisp_Vector *v;
   int i, old_size;
@@ -3756,8 +3706,7 @@
   xassert (new_size >= old_size);
 
   v = allocate_vector (new_size);
-  bcopy (XVECTOR (vec)->contents, v->contents,
-	 old_size * sizeof *v->contents);
+  memcpy (v->contents, XVECTOR (vec)->contents, old_size * sizeof *v->contents);
   for (i = old_size; i < new_size; ++i)
     v->contents[i] = init;
   XSETVECTOR (vec, v);
@@ -3774,10 +3723,7 @@
    KEY2 are the same.  */
 
 static int
-cmpfn_eql (h, key1, hash1, key2, hash2)
-     struct Lisp_Hash_Table *h;
-     Lisp_Object key1, key2;
-     unsigned hash1, hash2;
+cmpfn_eql (struct Lisp_Hash_Table *h, Lisp_Object key1, unsigned int hash1, Lisp_Object key2, unsigned int hash2)
 {
   return (FLOATP (key1)
 	  && FLOATP (key2)
@@ -3790,10 +3736,7 @@
    KEY2 are the same.  */
 
 static int
-cmpfn_equal (h, key1, hash1, key2, hash2)
-     struct Lisp_Hash_Table *h;
-     Lisp_Object key1, key2;
-     unsigned hash1, hash2;
+cmpfn_equal (struct Lisp_Hash_Table *h, Lisp_Object key1, unsigned int hash1, Lisp_Object key2, unsigned int hash2)
 {
   return hash1 == hash2 && !NILP (Fequal (key1, key2));
 }
@@ -3804,10 +3747,7 @@
    if KEY1 and KEY2 are the same.  */
 
 static int
-cmpfn_user_defined (h, key1, hash1, key2, hash2)
-     struct Lisp_Hash_Table *h;
-     Lisp_Object key1, key2;
-     unsigned hash1, hash2;
+cmpfn_user_defined (struct Lisp_Hash_Table *h, Lisp_Object key1, unsigned int hash1, Lisp_Object key2, unsigned int hash2)
 {
   if (hash1 == hash2)
     {
@@ -3828,9 +3768,7 @@
    in a Lisp integer.  */
 
 static unsigned
-hashfn_eq (h, key)
-     struct Lisp_Hash_Table *h;
-     Lisp_Object key;
+hashfn_eq (struct Lisp_Hash_Table *h, Lisp_Object key)
 {
   unsigned hash = XUINT (key) ^ XTYPE (key);
   xassert ((hash & ~INTMASK) == 0);
@@ -3843,9 +3781,7 @@
    in a Lisp integer.  */
 
 static unsigned
-hashfn_eql (h, key)
-     struct Lisp_Hash_Table *h;
-     Lisp_Object key;
+hashfn_eql (struct Lisp_Hash_Table *h, Lisp_Object key)
 {
   unsigned hash;
   if (FLOATP (key))
@@ -3862,9 +3798,7 @@
    in a Lisp integer.  */
 
 static unsigned
-hashfn_equal (h, key)
-     struct Lisp_Hash_Table *h;
-     Lisp_Object key;
+hashfn_equal (struct Lisp_Hash_Table *h, Lisp_Object key)
 {
   unsigned hash = sxhash (key, 0);
   xassert ((hash & ~INTMASK) == 0);
@@ -3877,9 +3811,7 @@
    guaranteed to fit in a Lisp integer.  */
 
 static unsigned
-hashfn_user_defined (h, key)
-     struct Lisp_Hash_Table *h;
-     Lisp_Object key;
+hashfn_user_defined (struct Lisp_Hash_Table *h, Lisp_Object key)
 {
   Lisp_Object args[2], hash;
 
@@ -4003,8 +3935,7 @@
    only the table itself is.  */
 
 Lisp_Object
-copy_hash_table (h1)
-     struct Lisp_Hash_Table *h1;
+copy_hash_table (struct Lisp_Hash_Table *h1)
 {
   Lisp_Object table;
   struct Lisp_Hash_Table *h2;
@@ -4012,7 +3943,7 @@
 
   h2 = allocate_hash_table ();
   next = h2->vec_next;
-  bcopy (h1, h2, sizeof *h2);
+  memcpy (h2, h1, sizeof *h2);
   h2->vec_next = next;
   h2->key_and_value = Fcopy_sequence (h1->key_and_value);
   h2->hash = Fcopy_sequence (h1->hash);
@@ -4035,8 +3966,7 @@
    because it's already too large, throw an error.  */
 
 static INLINE void
-maybe_resize_hash_table (h)
-     struct Lisp_Hash_Table *h;
+maybe_resize_hash_table (struct Lisp_Hash_Table *h)
 {
   if (NILP (h->next_free))
     {
@@ -4101,10 +4031,7 @@
    matching KEY, or -1 if not found.  */
 
 int
-hash_lookup (h, key, hash)
-     struct Lisp_Hash_Table *h;
-     Lisp_Object key;
-     unsigned *hash;
+hash_lookup (struct Lisp_Hash_Table *h, Lisp_Object key, unsigned int *hash)
 {
   unsigned hash_code;
   int start_of_bucket;
@@ -4138,10 +4065,7 @@
    Value is the index of the entry in H matching KEY.  */
 
 int
-hash_put (h, key, value, hash)
-     struct Lisp_Hash_Table *h;
-     Lisp_Object key, value;
-     unsigned hash;
+hash_put (struct Lisp_Hash_Table *h, Lisp_Object key, Lisp_Object value, unsigned int hash)
 {
   int start_of_bucket, i;
 
@@ -4171,9 +4095,7 @@
 /* Remove the entry matching KEY from hash table H, if there is one.  */
 
 static void
-hash_remove_from_table (h, key)
-     struct Lisp_Hash_Table *h;
-     Lisp_Object key;
+hash_remove_from_table (struct Lisp_Hash_Table *h, Lisp_Object key)
 {
   unsigned hash_code;
   int start_of_bucket;
@@ -4221,8 +4143,7 @@
 /* Clear hash table H.  */
 
 void
-hash_clear (h)
-     struct Lisp_Hash_Table *h;
+hash_clear (struct Lisp_Hash_Table *h)
 {
   if (h->count > 0)
     {
@@ -4251,7 +4172,7 @@
  ************************************************************************/
 
 void
-init_weak_hash_tables ()
+init_weak_hash_tables (void)
 {
   weak_hash_tables = NULL;
 }
@@ -4262,9 +4183,7 @@
    non-zero if anything was marked.  */
 
 static int
-sweep_weak_table (h, remove_entries_p)
-     struct Lisp_Hash_Table *h;
-     int remove_entries_p;
+sweep_weak_table (struct Lisp_Hash_Table *h, int remove_entries_p)
 {
   int bucket, n, marked;
 
@@ -4352,7 +4271,7 @@
    from Vweak_hash_tables.  Called from gc_sweep.  */
 
 void
-sweep_weak_hash_tables ()
+sweep_weak_hash_tables (void)
 {
   struct Lisp_Hash_Table *h, *used, *next;
   int marked;
@@ -4420,9 +4339,7 @@
    code returned is guaranteed to fit in a Lisp integer.  */
 
 static unsigned
-sxhash_string (ptr, len)
-     unsigned char *ptr;
-     int len;
+sxhash_string (unsigned char *ptr, int len)
 {
   unsigned char *p = ptr;
   unsigned char *end = p + len;
@@ -4445,9 +4362,7 @@
    list.  We don't recurse deeper than SXHASH_MAX_DEPTH in it.  */
 
 static unsigned
-sxhash_list (list, depth)
-     Lisp_Object list;
-     int depth;
+sxhash_list (Lisp_Object list, int depth)
 {
   unsigned hash = 0;
   int i;
@@ -4475,9 +4390,7 @@
    the Lisp structure.  */
 
 static unsigned
-sxhash_vector (vec, depth)
-     Lisp_Object vec;
-     int depth;
+sxhash_vector (Lisp_Object vec, int depth)
 {
   unsigned hash = ASIZE (vec);
   int i, n;
@@ -4496,8 +4409,7 @@
 /* Return a hash for bool-vector VECTOR.  */
 
 static unsigned
-sxhash_bool_vector (vec)
-     Lisp_Object vec;
+sxhash_bool_vector (Lisp_Object vec)
 {
   unsigned hash = XBOOL_VECTOR (vec)->size;
   int i, n;
@@ -4514,9 +4426,7 @@
    structure.  Value is an unsigned integer clipped to INTMASK.  */
 
 unsigned
-sxhash (obj, depth)
-     Lisp_Object obj;
-     int depth;
+sxhash (Lisp_Object obj, int depth)
 {
   unsigned hash;
 
@@ -4639,7 +4549,7 @@
   /* The vector `used' is used to keep track of arguments that
      have been consumed.  */
   used = (char *) alloca (nargs * sizeof *used);
-  bzero (used, nargs * sizeof *used);
+  memset (used, 0, nargs * sizeof *used);
 
   /* See if there's a `:test TEST' among the arguments.  */
   i = get_key_arg (QCtest, nargs, args, used);
@@ -5110,7 +5020,7 @@
 
 
 void
-syms_of_fns ()
+syms_of_fns (void)
 {
   /* Hash table stuff.  */
   Qhash_table_p = intern_c_string ("hash-table-p");
@@ -5286,7 +5196,7 @@
 
 
 void
-init_fns ()
+init_fns (void)
 {
 }
 
--- a/src/font.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/font.c	Thu Jul 08 17:09:35 2010 +0900
@@ -175,7 +175,7 @@
 /* Creaters of font-related Lisp object.  */
 
 Lisp_Object
-font_make_spec ()
+font_make_spec (void)
 {
   Lisp_Object font_spec;
   struct font_spec *spec
@@ -187,7 +187,7 @@
 }
 
 Lisp_Object
-font_make_entity ()
+font_make_entity (void)
 {
   Lisp_Object font_entity;
   struct font_entity *entity
@@ -202,10 +202,7 @@
    not nil, copy properties from ENTITY to the font-object.  If
    PIXELSIZE is positive, set the `size' property to PIXELSIZE.  */
 Lisp_Object
-font_make_object (size, entity, pixelsize)
-     int size;
-     Lisp_Object entity;
-     int pixelsize;
+font_make_object (int size, Lisp_Object entity, int pixelsize)
 {
   Lisp_Object font_object;
   struct font *font
@@ -229,10 +226,10 @@
 
 
 
-static int font_pixel_size P_ ((FRAME_PTR f, Lisp_Object));
-static Lisp_Object font_open_entity P_ ((FRAME_PTR, Lisp_Object, int));
-static Lisp_Object font_matching_entity P_ ((FRAME_PTR, Lisp_Object *,
-					     Lisp_Object));
+static int font_pixel_size (FRAME_PTR f, Lisp_Object);
+static Lisp_Object font_open_entity (FRAME_PTR, Lisp_Object, int);
+static Lisp_Object font_matching_entity (FRAME_PTR, Lisp_Object *,
+                                         Lisp_Object);
 
 /* Number of registered font drivers.  */
 static int num_font_drivers;
@@ -245,10 +242,7 @@
    STR.  */
 
 Lisp_Object
-font_intern_prop (str, len, force_symbol)
-     char *str;
-     int len;
-     int force_symbol;
+font_intern_prop (char *str, int len, int force_symbol)
 {
   int i;
   Lisp_Object tem;
@@ -290,9 +284,7 @@
 /* Return a pixel size of font-spec SPEC on frame F.  */
 
 static int
-font_pixel_size (f, spec)
-     FRAME_PTR f;
-     Lisp_Object spec;
+font_pixel_size (FRAME_PTR f, Lisp_Object spec)
 {
 #ifdef HAVE_WINDOW_SYSTEM
   Lisp_Object size = AREF (spec, FONT_SIZE_INDEX);
@@ -327,10 +319,7 @@
    VAL is an integer.  */
 
 int
-font_style_to_value (prop, val, noerror)
-     enum font_property_index prop;
-     Lisp_Object val;
-     int noerror;
+font_style_to_value (enum font_property_index prop, Lisp_Object val, int noerror)
 {
   Lisp_Object table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX);
   int len = ASIZE (table);
@@ -395,10 +384,7 @@
 }
 
 Lisp_Object
-font_style_symbolic (font, prop, for_face)
-     Lisp_Object font;
-     enum font_property_index prop;
-     int for_face;
+font_style_symbolic (Lisp_Object font, enum font_property_index prop, int for_face)
 {
   Lisp_Object val = AREF (font, prop);
   Lisp_Object table, elt;
@@ -416,7 +402,7 @@
 
 extern Lisp_Object Vface_alternative_font_family_alist;
 
-extern Lisp_Object find_font_encoding P_ ((Lisp_Object));
+extern Lisp_Object find_font_encoding (Lisp_Object);
 
 
 /* Return ENCODING or a cons of ENCODING and REPERTORY of the font
@@ -424,8 +410,7 @@
    of the font.  REPERTORY is a charset symbol or nil.  */
 
 Lisp_Object
-find_font_encoding (fontname)
-     Lisp_Object fontname;
+find_font_encoding (Lisp_Object fontname)
 {
   Lisp_Object tail, elt;
 
@@ -448,9 +433,7 @@
    REGISTRY is available, return 0.  Otherwise return -1.  */
 
 int
-font_registry_charsets (registry, encoding, repertory)
-     Lisp_Object registry;
-     struct charset **encoding, **repertory;
+font_registry_charsets (Lisp_Object registry, struct charset **encoding, struct charset **repertory)
 {
   Lisp_Object val;
   int encoding_id, repertory_id;
@@ -508,16 +491,15 @@
 /* Font property value validaters.  See the comment of
    font_property_table for the meaning of the arguments.  */
 
-static Lisp_Object font_prop_validate P_ ((int, Lisp_Object, Lisp_Object));
-static Lisp_Object font_prop_validate_symbol P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object font_prop_validate_style P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object font_prop_validate_non_neg P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object font_prop_validate_spacing P_ ((Lisp_Object, Lisp_Object));
-static int get_font_prop_index P_ ((Lisp_Object));
+static Lisp_Object font_prop_validate (int, Lisp_Object, Lisp_Object);
+static Lisp_Object font_prop_validate_symbol (Lisp_Object, Lisp_Object);
+static Lisp_Object font_prop_validate_style (Lisp_Object, Lisp_Object);
+static Lisp_Object font_prop_validate_non_neg (Lisp_Object, Lisp_Object);
+static Lisp_Object font_prop_validate_spacing (Lisp_Object, Lisp_Object);
+static int get_font_prop_index (Lisp_Object);
 
 static Lisp_Object
-font_prop_validate_symbol (prop, val)
-     Lisp_Object prop, val;
+font_prop_validate_symbol (Lisp_Object prop, Lisp_Object val)
 {
   if (STRINGP (val))
     val = Fintern (val, Qnil);
@@ -530,8 +512,7 @@
 
 
 static Lisp_Object
-font_prop_validate_style (style, val)
-     Lisp_Object style, val;
+font_prop_validate_style (Lisp_Object style, Lisp_Object val)
 {
   enum font_property_index prop = (EQ (style, QCweight) ? FONT_WEIGHT_INDEX
 				   : EQ (style, QCslant) ? FONT_SLANT_INDEX
@@ -565,16 +546,14 @@
 }
 
 static Lisp_Object
-font_prop_validate_non_neg (prop, val)
-     Lisp_Object prop, val;
+font_prop_validate_non_neg (Lisp_Object prop, Lisp_Object val)
 {
   return (NATNUMP (val) || (FLOATP (val) && XFLOAT_DATA (val) >= 0)
 	  ? val : Qerror);
 }
 
 static Lisp_Object
-font_prop_validate_spacing (prop, val)
-     Lisp_Object prop, val;
+font_prop_validate_spacing (Lisp_Object prop, Lisp_Object val)
 {
   if (NILP (val) || (NATNUMP (val) && XINT (val) <= FONT_SPACING_CHARCELL))
     return val;
@@ -595,8 +574,7 @@
 }
 
 static Lisp_Object
-font_prop_validate_otf (prop, val)
-     Lisp_Object prop, val;
+font_prop_validate_otf (Lisp_Object prop, Lisp_Object val)
 {
   Lisp_Object tail, tmp;
   int i;
@@ -638,7 +616,7 @@
   /* Function to validate PROP's value VAL, or NULL if any value is
      ok.  The value is VAL or its regularized value if VAL is valid,
      and Qerror if not.  */
-  Lisp_Object (*validater) P_ ((Lisp_Object prop, Lisp_Object val));
+  Lisp_Object (*validater) (Lisp_Object prop, Lisp_Object val);
 } font_property_table[] =
   { { &QCtype, font_prop_validate_symbol },
     { &QCfoundry, font_prop_validate_symbol },
@@ -667,8 +645,7 @@
    already known property.  */
 
 static int
-get_font_prop_index (key)
-     Lisp_Object key;
+get_font_prop_index (Lisp_Object key)
 {
   int i;
 
@@ -683,9 +660,7 @@
    signal an error.  The value is VAL or the regularized one.  */
 
 static Lisp_Object
-font_prop_validate (idx, prop, val)
-     int idx;
-     Lisp_Object prop, val;
+font_prop_validate (int idx, Lisp_Object prop, Lisp_Object val)
 {
   Lisp_Object validated;
 
@@ -710,8 +685,7 @@
    keeping the sorting order.  Don't check the validity of VAL.  */
 
 Lisp_Object
-font_put_extra (font, prop, val)
-     Lisp_Object font, prop, val;
+font_put_extra (Lisp_Object font, Lisp_Object prop, Lisp_Object val)
 {
   Lisp_Object extra = AREF (font, FONT_EXTRA_INDEX);
   Lisp_Object slot = (NILP (extra) ? Qnil : assq_no_quit (prop, extra));
@@ -740,9 +714,9 @@
 
 /* Font name parser and unparser */
 
-static int parse_matrix P_ ((char *));
-static int font_expand_wildcards P_ ((Lisp_Object *, int));
-static int font_parse_name P_ ((char *, Lisp_Object));
+static int parse_matrix (char *);
+static int font_expand_wildcards (Lisp_Object *, int);
+static int font_parse_name (char *, Lisp_Object);
 
 /* An enumerator for each field of an XLFD font name.  */
 enum xlfd_field_index
@@ -799,8 +773,7 @@
    -1.  */
 
 static int
-parse_matrix (p)
-     char *p;
+parse_matrix (char *p)
 {
   double matrix[4];
   char *end;
@@ -822,9 +795,7 @@
    field position by its contents.  */
 
 static int
-font_expand_wildcards (field, n)
-     Lisp_Object field[XLFD_LAST_INDEX];
-     int n;
+font_expand_wildcards (Lisp_Object *field, int n)
 {
   /* Copy of FIELD.  */
   Lisp_Object tmp[XLFD_LAST_INDEX];
@@ -1058,9 +1029,7 @@
    a fully specified XLFD.  */
 
 int
-font_parse_xlfd (name, font)
-     char *name;
-     Lisp_Object font;
+font_parse_xlfd (char *name, Lisp_Object font)
 {
   int len = strlen (name);
   int i, j, n;
@@ -1242,11 +1211,7 @@
    0, use PIXEL_SIZE instead.  */
 
 int
-font_unparse_xlfd (font, pixel_size, name, nbytes)
-     Lisp_Object font;
-     int pixel_size;
-     char *name;
-     int nbytes;
+font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
 {
   char *f[XLFD_REGISTRY_INDEX + 1];
   Lisp_Object val;
@@ -1389,9 +1354,7 @@
    This function tries to guess which format it is.  */
 
 int
-font_parse_fcname (name, font)
-     char *name;
-     Lisp_Object font;
+font_parse_fcname (char *name, Lisp_Object font)
 {
   char *p, *q;
   char *size_beg = NULL, *size_end = NULL;
@@ -1648,11 +1611,7 @@
    FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead.  */
 
 int
-font_unparse_fcname (font, pixel_size, name, nbytes)
-     Lisp_Object font;
-     int pixel_size;
-     char *name;
-     int nbytes;
+font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
 {
   Lisp_Object family, foundry;
   Lisp_Object tail, val;
@@ -1771,11 +1730,7 @@
    size.  */
 
 int
-font_unparse_gtkname (font, f, name, nbytes)
-     Lisp_Object font;
-     struct frame *f;
-     char *name;
-     int nbytes;
+font_unparse_gtkname (Lisp_Object font, struct frame *f, char *name, int nbytes)
 {
   char *p;
   int len = 1;
@@ -1858,9 +1813,7 @@
    0.  Otherwise return -1.  */
 
 static int
-font_parse_name (name, font)
-     char *name;
-     Lisp_Object font;
+font_parse_name (char *name, Lisp_Object font)
 {
   if (name[0] == '-' || index (name, '*') || index (name, '?'))
     return font_parse_xlfd (name, font);
@@ -1873,8 +1826,7 @@
    part.  */
 
 void
-font_parse_family_registry (family, registry, font_spec)
-     Lisp_Object family, registry, font_spec;
+font_parse_family_registry (Lisp_Object family, Lisp_Object registry, Lisp_Object font_spec)
 {
   int len;
   char *p0, *p1;
@@ -2220,17 +2172,16 @@
 
 /* Font sorting */
 
-static unsigned font_score P_ ((Lisp_Object, Lisp_Object *));
-static int font_compare P_ ((const void *, const void *));
-static Lisp_Object font_sort_entities P_ ((Lisp_Object, Lisp_Object,
-					  Lisp_Object, int));
+static unsigned font_score (Lisp_Object, Lisp_Object *);
+static int font_compare (const void *, const void *);
+static Lisp_Object font_sort_entities (Lisp_Object, Lisp_Object,
+                                       Lisp_Object, int);
 
 /* Return a rescaling ratio of FONT_ENTITY.  */
 extern Lisp_Object Vface_font_rescale_alist;
 
 static double
-font_rescale_ratio (font_entity)
-     Lisp_Object font_entity;
+font_rescale_ratio (Lisp_Object font_entity)
 {
   Lisp_Object tail, elt;
   Lisp_Object name = Qnil;
@@ -2277,8 +2228,7 @@
    SPEC_PROP.  */
 
 static unsigned
-font_score (entity, spec_prop)
-     Lisp_Object entity, *spec_prop;
+font_score (Lisp_Object entity, Lisp_Object *spec_prop)
 {
   unsigned score = 0;
   int i;
@@ -2352,8 +2302,7 @@
 /* The comparison function for qsort.  */
 
 static int
-font_compare (d1, d2)
-     const void *d1, *d2;
+font_compare (const void *d1, const void *d2)
 {
   const struct font_sort_data *data1 = d1;
   const struct font_sort_data *data2 = d2;
@@ -2381,9 +2330,7 @@
    such a case.  */
 
 static Lisp_Object
-font_sort_entities (list, prefer, frame, best_only)
-     Lisp_Object list, prefer, frame;
-     int best_only;
+font_sort_entities (Lisp_Object list, Lisp_Object prefer, Lisp_Object frame, int best_only)
 {
   Lisp_Object prefer_prop[FONT_SPEC_MAX];
   int len, maxlen, i;
@@ -2488,8 +2435,7 @@
    function with font_sort_order after setting up it.  */
 
 void
-font_update_sort_order (order)
-     int *order;
+font_update_sort_order (int *order)
 {
   int i, shift_bits;
 
@@ -2509,8 +2455,7 @@
 }
 
 static int
-font_check_otf_features (script, langsys, features, table)
-     Lisp_Object script, langsys, features, table;
+font_check_otf_features (Lisp_Object script, Lisp_Object langsys, Lisp_Object features, Lisp_Object table)
 {
   Lisp_Object val;
   int negative;
@@ -2584,8 +2529,7 @@
    specification SPEC.  */
 
 int
-font_match_p (spec, font)
-     Lisp_Object spec, font;
+font_match_p (Lisp_Object spec, Lisp_Object font)
 {
   Lisp_Object prop[FONT_SPEC_MAX], *props;
   Lisp_Object extra, font_extra;
@@ -2701,16 +2645,14 @@
    is a number frames sharing this cache, and FONT-CACHE-DATA is a
    cons (FONT-SPEC FONT-ENTITY ...).  */
 
-static void font_prepare_cache P_ ((FRAME_PTR, struct font_driver *));
-static void font_finish_cache P_ ((FRAME_PTR, struct font_driver *));
-static Lisp_Object font_get_cache P_ ((FRAME_PTR, struct font_driver *));
-static void font_clear_cache P_ ((FRAME_PTR, Lisp_Object,
-				  struct font_driver *));
+static void font_prepare_cache (FRAME_PTR, struct font_driver *);
+static void font_finish_cache (FRAME_PTR, struct font_driver *);
+static Lisp_Object font_get_cache (FRAME_PTR, struct font_driver *);
+static void font_clear_cache (FRAME_PTR, Lisp_Object,
+                              struct font_driver *);
 
 static void
-font_prepare_cache (f, driver)
-     FRAME_PTR f;
-     struct font_driver *driver;
+font_prepare_cache (FRAME_PTR f, struct font_driver *driver)
 {
   Lisp_Object cache, val;
 
@@ -2732,9 +2674,7 @@
 
 
 static void
-font_finish_cache (f, driver)
-     FRAME_PTR f;
-     struct font_driver *driver;
+font_finish_cache (FRAME_PTR f, struct font_driver *driver)
 {
   Lisp_Object cache, val, tmp;
 
@@ -2755,9 +2695,7 @@
 
 
 static Lisp_Object
-font_get_cache (f, driver)
-     FRAME_PTR f;
-     struct font_driver *driver;
+font_get_cache (FRAME_PTR f, struct font_driver *driver)
 {
   Lisp_Object val = driver->get_cache (f);
   Lisp_Object type = driver->type;
@@ -2773,10 +2711,7 @@
 static int num_fonts;
 
 static void
-font_clear_cache (f, cache, driver)
-     FRAME_PTR f;
-     Lisp_Object cache;
-     struct font_driver *driver;
+font_clear_cache (FRAME_PTR f, Lisp_Object cache, struct font_driver *driver)
 {
   Lisp_Object tail, elt;
   Lisp_Object tail2, entity;
@@ -2830,9 +2765,7 @@
 extern Lisp_Object Vface_ignored_fonts;
 
 Lisp_Object
-font_delete_unmatched (vec, spec, size)
-     Lisp_Object vec, spec;
-     int size;
+font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size)
 {
   Lisp_Object entity, val;
   enum font_property_index prop;
@@ -2905,8 +2838,7 @@
    same font-driver.  */
 
 Lisp_Object
-font_list_entities (frame, spec)
-     Lisp_Object frame, spec;
+font_list_entities (Lisp_Object frame, Lisp_Object spec)
 {
   FRAME_PTR f = XFRAME (frame);
   struct font_driver_list *driver_list = f->font_driver_list;
@@ -2982,9 +2914,7 @@
    font-related attributes.  */
 
 static Lisp_Object
-font_matching_entity (f, attrs, spec)
-     FRAME_PTR f;
-     Lisp_Object *attrs, spec;
+font_matching_entity (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec)
 {
   struct font_driver_list *driver_list = f->font_driver_list;
   Lisp_Object ftype, size, entity;
@@ -3032,10 +2962,7 @@
    opened font object.  */
 
 static Lisp_Object
-font_open_entity (f, entity, pixel_size)
-     FRAME_PTR f;
-     Lisp_Object entity;
-     int pixel_size;
+font_open_entity (FRAME_PTR f, Lisp_Object entity, int pixel_size)
 {
   struct font_driver_list *driver_list;
   Lisp_Object objlist, size, val, font_object;
@@ -3111,9 +3038,7 @@
 /* Close FONT_OBJECT that is opened on frame F.  */
 
 void
-font_close_object (f, font_object)
-     FRAME_PTR f;
-     Lisp_Object font_object;
+font_close_object (FRAME_PTR f, Lisp_Object font_object)
 {
   struct font *font = XFONT_OBJECT (font_object);
 
@@ -3134,10 +3059,7 @@
    FONT is a font-entity and it must be opened to check.  */
 
 int
-font_has_char (f, font, c)
-     FRAME_PTR f;
-     Lisp_Object font;
-     int c;
+font_has_char (FRAME_PTR f, Lisp_Object font, int c)
 {
   struct font *fontp;
 
@@ -3172,9 +3094,7 @@
 /* Return the glyph ID of FONT_OBJECT for character C.  */
 
 unsigned
-font_encode_char (font_object, c)
-     Lisp_Object font_object;
-     int c;
+font_encode_char (Lisp_Object font_object, int c)
 {
   struct font *font;
 
@@ -3187,8 +3107,7 @@
 /* Return the name of FONT_OBJECT.  */
 
 Lisp_Object
-font_get_name (font_object)
-     Lisp_Object font_object;
+font_get_name (Lisp_Object font_object)
 {
   font_assert (FONT_OBJECT_P (font_object));
   return AREF (font_object, FONT_NAME_INDEX);
@@ -3198,8 +3117,7 @@
 /* Return the specification of FONT_OBJECT.  */
 
 Lisp_Object
-font_get_spec (font_object)
-     Lisp_Object font_object;
+font_get_spec (Lisp_Object font_object)
 {
   Lisp_Object spec = font_make_spec ();
   int i;
@@ -3216,8 +3134,7 @@
    could not be parsed by font_parse_name, return Qnil.  */
 
 Lisp_Object
-font_spec_from_name (font_name)
-     Lisp_Object font_name;
+font_spec_from_name (Lisp_Object font_name)
 {
   Lisp_Object spec = Ffont_spec (0, NULL);
 
@@ -3231,9 +3148,7 @@
 
 
 void
-font_clear_prop (attrs, prop)
-     Lisp_Object *attrs;
-     enum font_property_index prop;
+font_clear_prop (Lisp_Object *attrs, enum font_property_index prop)
 {
   Lisp_Object font = attrs[LFACE_FONT_INDEX];
 
@@ -3284,9 +3199,7 @@
 }
 
 void
-font_update_lface (f, attrs)
-     FRAME_PTR f;
-     Lisp_Object *attrs;
+font_update_lface (FRAME_PTR f, Lisp_Object *attrs)
 {
   Lisp_Object spec;
 
@@ -3333,9 +3246,7 @@
    supports C and matches best with ATTRS and PIXEL_SIZE.  */
 
 static Lisp_Object
-font_select_entity (frame, entities, attrs, pixel_size, c)
-     Lisp_Object frame, entities, *attrs;
-     int pixel_size, c;
+font_select_entity (Lisp_Object frame, Lisp_Object entities, Lisp_Object *attrs, int pixel_size, int c)
 {
   Lisp_Object font_entity;
   Lisp_Object prefer;
@@ -3380,11 +3291,7 @@
    character that the entity must support.  */
 
 Lisp_Object
-font_find_for_lface (f, attrs, spec, c)
-     FRAME_PTR f;
-     Lisp_Object *attrs;
-     Lisp_Object spec;
-     int c;
+font_find_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec, int c)
 {
   Lisp_Object work;
   Lisp_Object frame, entities, val;
@@ -3534,11 +3441,7 @@
 
 
 Lisp_Object
-font_open_for_lface (f, entity, attrs, spec)
-     FRAME_PTR f;
-     Lisp_Object entity;
-     Lisp_Object *attrs;
-     Lisp_Object spec;
+font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_Object spec)
 {
   int size;
 
@@ -3581,9 +3484,7 @@
    font-object.  */
 
 Lisp_Object
-font_load_for_lface (f, attrs, spec)
-     FRAME_PTR f;
-     Lisp_Object *attrs, spec;
+font_load_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec)
 {
   Lisp_Object entity, name;
 
@@ -3613,9 +3514,7 @@
 /* Make FACE on frame F ready to use the font opened for FACE.  */
 
 void
-font_prepare_for_face (f, face)
-     FRAME_PTR f;
-     struct face *face;
+font_prepare_for_face (FRAME_PTR f, struct face *face)
 {
   if (face->font->driver->prepare_face)
     face->font->driver->prepare_face (f, face);
@@ -3625,9 +3524,7 @@
 /* Make FACE on frame F stop using the font opened for FACE.  */
 
 void
-font_done_for_face (f, face)
-     FRAME_PTR f;
-     struct face *face;
+font_done_for_face (FRAME_PTR f, struct face *face)
 {
   if (face->font->driver->done_face)
     face->font->driver->done_face (f, face);
@@ -3639,9 +3536,7 @@
    font is found, return Qnil.  */
 
 Lisp_Object
-font_open_by_spec (f, spec)
-     FRAME_PTR f;
-     Lisp_Object spec;
+font_open_by_spec (FRAME_PTR f, Lisp_Object spec)
 {
   Lisp_Object attrs[LFACE_VECTOR_SIZE];
 
@@ -3665,9 +3560,7 @@
    found, return Qnil.  */
 
 Lisp_Object
-font_open_by_name (f, name)
-     FRAME_PTR f;
-     char *name;
+font_open_by_name (FRAME_PTR f, char *name)
 {
   Lisp_Object args[2];
   Lisp_Object spec, ret;
@@ -3697,9 +3590,7 @@
    (e.g. syms_of_xfont).  */
 
 void
-register_font_driver (driver, f)
-     struct font_driver *driver;
-     FRAME_PTR f;
+register_font_driver (struct font_driver *driver, FRAME_PTR f)
 {
   struct font_driver_list *root = f ? f->font_driver_list : font_driver_list;
   struct font_driver_list *prev, *list;
@@ -3727,8 +3618,7 @@
 }
 
 void
-free_font_driver_list (f)
-     FRAME_PTR f;
+free_font_driver_list (FRAME_PTR f)
 {
   struct font_driver_list *list, *next;
 
@@ -3750,9 +3640,7 @@
    F.  */
 
 Lisp_Object
-font_update_drivers (f, new_drivers)
-     FRAME_PTR f;
-     Lisp_Object new_drivers;
+font_update_drivers (FRAME_PTR f, Lisp_Object new_drivers)
 {
   Lisp_Object active_drivers = Qnil;
   struct font_driver *driver;
@@ -3843,10 +3731,7 @@
 }
 
 int
-font_put_frame_data (f, driver, data)
-     FRAME_PTR f;
-     struct font_driver *driver;
-     void *data;
+font_put_frame_data (FRAME_PTR f, struct font_driver *driver, void *data)
 {
   struct font_data_list *list, *prev;
 
@@ -3880,9 +3765,7 @@
 
 
 void *
-font_get_frame_data (f, driver)
-     FRAME_PTR f;
-     struct font_driver *driver;
+font_get_frame_data (FRAME_PTR f, struct font_driver *driver)
 {
   struct font_data_list *list;
 
@@ -3901,12 +3784,7 @@
    STRING.  */
 
 Lisp_Object
-font_at (c, pos, face, w, string)
-     int c;
-     EMACS_INT pos;
-     struct face *face;
-     struct window *w;
-     Lisp_Object string;
+font_at (int c, EMACS_INT pos, struct face *face, struct window *w, Lisp_Object string)
 {
   FRAME_PTR f;
   int multibyte;
@@ -3988,11 +3866,7 @@
    It is assured that the current buffer (or STRING) is multibyte.  */
 
 Lisp_Object
-font_range (pos, limit, w, face, string)
-     EMACS_INT pos, *limit;
-     struct window *w;
-     struct face *face;
-     Lisp_Object string;
+font_range (EMACS_INT pos, EMACS_INT *limit, struct window *w, struct face *face, Lisp_Object string)
 {
   EMACS_INT pos_byte, ignore;
   int c;
@@ -4584,8 +4458,7 @@
 
 
 void
-font_fill_lglyph_metrics (glyph, font_object)
-     Lisp_Object glyph, font_object;
+font_fill_lglyph_metrics (Lisp_Object glyph, Lisp_Object font_object)
 {
   struct font *font = XFONT_OBJECT (font_object);
   unsigned code;
@@ -5242,9 +5115,7 @@
   build_style_table ((TBL), sizeof TBL / sizeof (struct table_entry))
 
 static Lisp_Object
-build_style_table (entry, nelement)
-     struct table_entry *entry;
-     int nelement;
+build_style_table (const struct table_entry *entry, int nelement)
 {
   int i, j;
   Lisp_Object table, elt;
@@ -5274,9 +5145,7 @@
    opening), ARG is the argument for the action, and RESULT is the
    result of the action.  */
 void
-font_add_log (action, arg, result)
-     char *action;
-     Lisp_Object arg, result;
+font_add_log (char *action, Lisp_Object arg, Lisp_Object result)
 {
   Lisp_Object tail, val;
   int i;
@@ -5362,9 +5231,7 @@
    as font_add_log.  */
 
 void
-font_deferred_log (action, arg, result)
-     char *action;
-     Lisp_Object arg, result;
+font_deferred_log (char *action, Lisp_Object arg, Lisp_Object result)
 {
   if (EQ (Vfont_log, Qt))
     return;
@@ -5373,17 +5240,17 @@
   ASET (Vfont_log_deferred, 2, result);
 }
 
-extern void syms_of_ftfont P_ (());
-extern void syms_of_xfont P_ (());
-extern void syms_of_xftfont P_ (());
-extern void syms_of_ftxfont P_ (());
-extern void syms_of_bdffont P_ (());
-extern void syms_of_w32font P_ (());
-extern void syms_of_atmfont P_ (());
-extern void syms_of_nsfont P_ (());
+extern void syms_of_ftfont (void);
+extern void syms_of_xfont (void);
+extern void syms_of_xftfont (void);
+extern void syms_of_ftxfont (void);
+extern void syms_of_bdffont (void);
+extern void syms_of_w32font (void);
+extern void syms_of_atmfont (void);
+extern void syms_of_nsfont (void);
 
 void
-syms_of_font ()
+syms_of_font (void)
 {
   sort_shift_bits[FONT_TYPE_INDEX] = 0;
   sort_shift_bits[FONT_SLANT_INDEX] = 2;
@@ -5570,7 +5437,7 @@
 }
 
 void
-init_font ()
+init_font (void)
 {
   Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt;
 }
--- a/src/font.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/font.h	Thu Jul 08 17:09:35 2010 +0900
@@ -512,7 +512,7 @@
 
   /* Return a cache of font-entities on frame F.  The cache must be a
      cons whose cdr part is the actual cache area.  */
-  Lisp_Object (*get_cache) P_ ((FRAME_PTR F));
+  Lisp_Object (*get_cache) (FRAME_PTR F);
 
   /* List fonts exactly matching with FONT_SPEC on FRAME.  The value
      is a list of font-entities.  The font properties to be considered
@@ -535,7 +535,7 @@
 
      This and the following `match' are the only APIs that allocate
      font-entities.  */
-  Lisp_Object (*list) P_ ((Lisp_Object frame, Lisp_Object font_spec));
+  Lisp_Object (*list) (Lisp_Object frame, Lisp_Object font_spec);
 
   /* Return a font-entity most closely matching with FONT_SPEC on
      FRAME.  Which font property to consider, and how to calculate the
@@ -544,92 +544,92 @@
 
      The properties that the font-entity has is the same as `list'
      method.  */
-  Lisp_Object (*match) P_ ((Lisp_Object frame, Lisp_Object font_spec));
+  Lisp_Object (*match) (Lisp_Object frame, Lisp_Object font_spec);
 
   /* Optional.
      List available families.  The value is a list of family names
      (symbols).  */
-  Lisp_Object (*list_family) P_ ((Lisp_Object frame));
+  Lisp_Object (*list_family) (Lisp_Object frame);
 
   /* Optional (if FONT_EXTRA_INDEX is not Lisp_Save_Value).
      Free FONT_EXTRA_INDEX field of FONT_ENTITY.  */
-  void (*free_entity) P_ ((Lisp_Object font_entity));
+  void (*free_entity) (Lisp_Object font_entity);
 
   /* Open a font specified by FONT_ENTITY on frame F.  If the font is
      scalable, open it with PIXEL_SIZE.  */
-  Lisp_Object (*open) P_ ((FRAME_PTR f, Lisp_Object font_entity,
-			   int pixel_size));
+  Lisp_Object (*open) (FRAME_PTR f, Lisp_Object font_entity,
+                       int pixel_size);
 
   /* Close FONT on frame F.  */
-  void (*close) P_ ((FRAME_PTR f, struct font *font));
+  void (*close) (FRAME_PTR f, struct font *font);
 
   /* Optional (if FACE->extra is not used).
      Prepare FACE for displaying characters by FONT on frame F by
      storing some data in FACE->extra.  If successful, return 0.
      Otherwise, return -1.  */
-  int (*prepare_face) P_ ((FRAME_PTR f, struct face *face));
+  int (*prepare_face) (FRAME_PTR f, struct face *face);
 
   /* Optional.
      Done FACE for displaying characters by FACE->font on frame F.  */
-  void (*done_face) P_ ((FRAME_PTR f, struct face *face));
+  void (*done_face) (FRAME_PTR f, struct face *face);
 
   /* Optional.
      If FONT (FONT-ENTITY or FONT-OBJECT) has a glyph for character C
      (Unicode code point), return 1.  If not, return 0.  If FONT is
      FONT-ENTITY and it must be opened to check it, return -1.  */
-  int (*has_char) P_ ((Lisp_Object font, int c));
+  int (*has_char) (Lisp_Object font, int c);
 
   /* Return a glyph code of FONT for characer C (Unicode code point).
      If FONT doesn't have such a glyph, return FONT_INVALID_CODE.  */
-  unsigned (*encode_char) P_ ((struct font *font, int c));
+  unsigned (*encode_char) (struct font *font, int c);
 
   /* Computate the total metrics of the NGLYPHS glyphs specified by
      the font FONT and the sequence of glyph codes CODE, and store the
      result in METRICS.  */
-  int (*text_extents) P_ ((struct font *font,
-			   unsigned *code, int nglyphs,
-			   struct font_metrics *metrics));
+  int (*text_extents) (struct font *font,
+                       unsigned *code, int nglyphs,
+                       struct font_metrics *metrics);
 
   /* Optional.
      Draw glyphs between FROM and TO of S->char2b at (X Y) pixel
      position of frame F with S->FACE and S->GC.  If WITH_BACKGROUND
      is nonzero, fill the background in advance.  It is assured that
      WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars).  */
-  int (*draw) P_ ((struct glyph_string *s, int from, int to,
-		   int x, int y, int with_background));
+  int (*draw) (struct glyph_string *s, int from, int to,
+               int x, int y, int with_background);
 
   /* Optional.
      Store bitmap data for glyph-code CODE of FONT in BITMAP.  It is
      intended that this method is callled from the other font-driver
      for actual drawing.  */
-  int (*get_bitmap) P_ ((struct font *font, unsigned code,
-			 struct font_bitmap *bitmap,
-			 int bits_per_pixel));
+  int (*get_bitmap) (struct font *font, unsigned code,
+                     struct font_bitmap *bitmap,
+                     int bits_per_pixel);
 
   /* Optional.
      Free bitmap data in BITMAP.  */
-  void (*free_bitmap) P_ ((struct font *font, struct font_bitmap *bitmap));
+  void (*free_bitmap) (struct font *font, struct font_bitmap *bitmap);
 
   /* Optional.
      Return an outline data for glyph-code CODE of FONT.  The format
      of the outline data depends on the font-driver.  */
-  void *(*get_outline) P_ ((struct font *font, unsigned code));
+  void *(*get_outline) (struct font *font, unsigned code);
 
   /* Optional.
      Free OUTLINE (that is obtained by the above method).  */
-  void (*free_outline) P_ ((struct font *font, void *outline));
+  void (*free_outline) (struct font *font, void *outline);
 
   /* Optional.
      Get coordinates of the INDEXth anchor point of the glyph whose
      code is CODE.  Store the coordinates in *X and *Y.  Return 0 if
      the operations was successfull.  Otherwise return -1.  */
-  int (*anchor_point) P_ ((struct font *font, unsigned code, int index,
-			   int *x, int *y));
+  int (*anchor_point) (struct font *font, unsigned code, int index,
+                       int *x, int *y);
 
   /* Optional.
      Return a list describing which scripts/languages FONT
      supports by which GSUB/GPOS features of OpenType tables.  */
-  Lisp_Object (*otf_capability) P_ ((struct font *font));
+  Lisp_Object (*otf_capability) (struct font *font);
 
   /* Optional.
      Apply FONT's OTF-FEATURES to the glyph string.
@@ -646,20 +646,20 @@
      Return the number of output codes.  If none of the features are
      applicable to the input data, return 0.  If GSTRING-OUT is too
      short, return -1.  */
-  int (*otf_drive) P_ ((struct font *font, Lisp_Object features,
-		       Lisp_Object gstring_in, int from, int to,
-		       Lisp_Object gstring_out, int idx, int alternate_subst));
+  int (*otf_drive) (struct font *font, Lisp_Object features,
+                    Lisp_Object gstring_in, int from, int to,
+                    Lisp_Object gstring_out, int idx, int alternate_subst);
 
   /* Optional.
      Make the font driver ready for frame F.  Usually this function
      makes some data specific to F and stores it in F by calling
      font_put_frame_data ().  */
-  int (*start_for_frame) P_ ((FRAME_PTR f));
+  int (*start_for_frame) (FRAME_PTR f);
 
   /* Optional.
      End using the driver for frame F.  Usually this function free
      some data stored for F.  */
-  int (*end_for_frame) P_ ((FRAME_PTR f));
+  int (*end_for_frame) (FRAME_PTR f);
 
   /* Optional.
 
@@ -675,14 +675,14 @@
      a new glyph object and storing it in GSTRING.  If (M) is greater
      than the length of GSTRING, nil should be return.  In that case,
      this function is called again with the larger GSTRING.  */
-  Lisp_Object (*shape) P_ ((Lisp_Object lgstring));
+  Lisp_Object (*shape) (Lisp_Object lgstring);
 
   /* Optional.
 
      If FONT is usable on frame F, return 0.  Otherwise return -1.
      This method is used only for debugging.  If this method is NULL,
      Emacs assumes that the font is usable on any frame.  */
-  int (*check) P_ ((FRAME_PTR F, struct font *font));
+  int (*check) (FRAME_PTR F, struct font *font);
 
   /* Optional.
 
@@ -690,18 +690,18 @@
      FONT.  VARIATIONS is an array of 256 elements.  If the variation
      selector N (1..256) defines a glyph, that glyph code is stored in
      the (N-1)th element of VARIATIONS.  */
-  int (*get_variation_glyphs) P_ ((struct font *font,
-				   int c, unsigned variations[256]));
+  int (*get_variation_glyphs) (struct font *font,
+                               int c, unsigned variations[256]);
 
-  void (*filter_properties) P_ ((Lisp_Object font, Lisp_Object properties));
+  void (*filter_properties) (Lisp_Object font, Lisp_Object properties);
 
   /* Optional.
 
      Return non-zero if FONT_OBJECT can be used as a (cached) font
      for ENTITY on frame F.  */
-  int (*cached_font_ok) P_ ((struct frame *f,
-                             Lisp_Object font_object,
-                             Lisp_Object entity));
+  int (*cached_font_ok) (struct frame *f,
+                         Lisp_Object font_object,
+                         Lisp_Object entity);
 };
 
 
@@ -744,80 +744,80 @@
 EXFUN (Fclear_font_cache, 0);
 EXFUN (Ffont_xlfd_name, 2);
 
-extern Lisp_Object font_make_spec P_ ((void));
-extern Lisp_Object font_make_entity P_ ((void));
-extern Lisp_Object font_make_object P_ ((int, Lisp_Object, int));
+extern Lisp_Object font_make_spec (void);
+extern Lisp_Object font_make_entity (void);
+extern Lisp_Object font_make_object (int, Lisp_Object, int);
 
-extern Lisp_Object find_font_encoding P_ ((Lisp_Object));
-extern int font_registry_charsets P_ ((Lisp_Object, struct charset **,
-				       struct charset **));
-extern int font_style_to_value P_ ((enum font_property_index prop,
-				    Lisp_Object name, int noerror));
-extern Lisp_Object font_style_symbolic P_ ((Lisp_Object font,
-					    enum font_property_index prop,
-					    int for_face));
+extern Lisp_Object find_font_encoding (Lisp_Object);
+extern int font_registry_charsets (Lisp_Object, struct charset **,
+                                   struct charset **);
+extern int font_style_to_value (enum font_property_index prop,
+                                Lisp_Object name, int noerror);
+extern Lisp_Object font_style_symbolic (Lisp_Object font,
+                                        enum font_property_index prop,
+                                        int for_face);
 
-extern int font_match_p P_ ((Lisp_Object spec, Lisp_Object font));
-extern Lisp_Object font_list_entities P_ ((Lisp_Object frame,
-					   Lisp_Object spec));
+extern int font_match_p (Lisp_Object spec, Lisp_Object font);
+extern Lisp_Object font_list_entities (Lisp_Object frame,
+                                       Lisp_Object spec);
 
-extern Lisp_Object font_get_name P_ ((Lisp_Object font_object));
-extern Lisp_Object font_spec_from_name P_ ((Lisp_Object font_name));
-extern Lisp_Object font_get_frame P_ ((Lisp_Object font_object));
-extern int font_has_char P_ ((FRAME_PTR, Lisp_Object, int));
-extern unsigned font_encode_char P_ ((Lisp_Object, int));
+extern Lisp_Object font_get_name (Lisp_Object font_object);
+extern Lisp_Object font_spec_from_name (Lisp_Object font_name);
+extern Lisp_Object font_get_frame (Lisp_Object font_object);
+extern int font_has_char (FRAME_PTR, Lisp_Object, int);
+extern unsigned font_encode_char (Lisp_Object, int);
 
-extern void font_clear_prop P_ ((Lisp_Object *attrs,
-				 enum font_property_index prop));
-extern void font_update_lface P_ ((FRAME_PTR f, Lisp_Object *attrs));
-extern Lisp_Object font_find_for_lface P_ ((FRAME_PTR f, Lisp_Object *lface,
-					    Lisp_Object spec, int c));
-extern Lisp_Object font_open_for_lface P_ ((FRAME_PTR f, Lisp_Object entity,
-					    Lisp_Object *lface,
-					    Lisp_Object spec));
-extern Lisp_Object font_load_for_lface P_ ((FRAME_PTR f, Lisp_Object *lface,
-					    Lisp_Object spec));
-extern void font_prepare_for_face P_ ((FRAME_PTR f, struct face *face));
-extern void font_done_for_face P_ ((FRAME_PTR f, struct face *face));
+extern void font_clear_prop (Lisp_Object *attrs,
+                             enum font_property_index prop);
+extern void font_update_lface (FRAME_PTR f, Lisp_Object *attrs);
+extern Lisp_Object font_find_for_lface (FRAME_PTR f, Lisp_Object *lface,
+                                        Lisp_Object spec, int c);
+extern Lisp_Object font_open_for_lface (FRAME_PTR f, Lisp_Object entity,
+                                        Lisp_Object *lface,
+                                        Lisp_Object spec);
+extern Lisp_Object font_load_for_lface (FRAME_PTR f, Lisp_Object *lface,
+                                        Lisp_Object spec);
+extern void font_prepare_for_face (FRAME_PTR f, struct face *face);
+extern void font_done_for_face (FRAME_PTR f, struct face *face);
 
-extern Lisp_Object font_open_by_spec P_ ((FRAME_PTR f, Lisp_Object spec));
-extern Lisp_Object font_open_by_name P_ ((FRAME_PTR f, char *name));
+extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec);
+extern Lisp_Object font_open_by_name (FRAME_PTR f, char *name);
 extern void font_close_object (FRAME_PTR f, Lisp_Object font_object);
 
-extern Lisp_Object font_intern_prop P_ ((char *str, int len, int force_symbol));
-extern void font_update_sort_order P_ ((int *order));
+extern Lisp_Object font_intern_prop (char *str, int len, int force_symbol);
+extern void font_update_sort_order (int *order);
 
-extern void font_parse_family_registry P_ ((Lisp_Object family,
-					    Lisp_Object registry,
-					    Lisp_Object spec));
-extern Lisp_Object font_spec_from_family_registry P_ ((Lisp_Object family,
-						       Lisp_Object registry));
+extern void font_parse_family_registry (Lisp_Object family,
+                                        Lisp_Object registry,
+                                        Lisp_Object spec);
+extern Lisp_Object font_spec_from_family_registry (Lisp_Object family,
+                                                   Lisp_Object registry);
 
-extern int font_parse_xlfd P_ ((char *name, Lisp_Object font));
-extern int font_unparse_xlfd P_ ((Lisp_Object font, int pixel_size,
-				  char *name, int bytes));
-extern int font_parse_fcname P_ ((char *name, Lisp_Object font));
-extern int font_unparse_fcname P_ ((Lisp_Object font, int pixel_size,
-				  char *name, int bytes));
-extern int font_unparse_gtkname P_ ((Lisp_Object, struct frame *, char *, int));
-extern void register_font_driver P_ ((struct font_driver *driver, FRAME_PTR f));
-extern void free_font_driver_list P_ ((FRAME_PTR f));
-extern Lisp_Object font_update_drivers P_ ((FRAME_PTR f, Lisp_Object list));
-extern Lisp_Object font_at P_ ((int c, EMACS_INT pos, struct face *face,
-				struct window *w, Lisp_Object object));
+extern int font_parse_xlfd (char *name, Lisp_Object font);
+extern int font_unparse_xlfd (Lisp_Object font, int pixel_size,
+                              char *name, int bytes);
+extern int font_parse_fcname (char *name, Lisp_Object font);
+extern int font_unparse_fcname (Lisp_Object font, int pixel_size,
+                                char *name, int bytes);
+extern int font_unparse_gtkname (Lisp_Object, struct frame *, char *, int);
+extern void register_font_driver (struct font_driver *driver, FRAME_PTR f);
+extern void free_font_driver_list (FRAME_PTR f);
+extern Lisp_Object font_update_drivers (FRAME_PTR f, Lisp_Object list);
+extern Lisp_Object font_at (int c, EMACS_INT pos, struct face *face,
+                            struct window *w, Lisp_Object object);
 extern Lisp_Object font_range (EMACS_INT, EMACS_INT *,
 			       struct window *, struct face *,
 			       Lisp_Object);
-extern void font_fill_lglyph_metrics P_ ((Lisp_Object, Lisp_Object));
+extern void font_fill_lglyph_metrics (Lisp_Object, Lisp_Object);
 
-extern Lisp_Object font_put_extra P_ ((Lisp_Object font, Lisp_Object prop,
-                                       Lisp_Object val));
+extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop,
+                                   Lisp_Object val);
 
-extern int font_put_frame_data P_ ((FRAME_PTR f,
-				    struct font_driver *driver,
-				    void *data));
-extern void *font_get_frame_data P_ ((FRAME_PTR f,
-				      struct font_driver *driver));
+extern int font_put_frame_data (FRAME_PTR f,
+                                struct font_driver *driver,
+                                void *data);
+extern void *font_get_frame_data (FRAME_PTR f,
+                                  struct font_driver *driver);
 
 #ifdef HAVE_FREETYPE
 extern struct font_driver ftfont_driver;
@@ -842,8 +842,8 @@
 #endif
 
 extern Lisp_Object Vfont_log;
-extern void font_add_log P_ ((char *, Lisp_Object, Lisp_Object));
-extern void font_deferred_log P_ ((char *, Lisp_Object, Lisp_Object));
+extern void font_add_log (char *, Lisp_Object, Lisp_Object);
+extern void font_deferred_log (char *, Lisp_Object, Lisp_Object);
 
 #define FONT_ADD_LOG(ACTION, ARG, RESULT)	\
   do {						\
--- a/src/fontset.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/fontset.c	Thu Jul 08 17:09:35 2010 +0900
@@ -203,23 +203,23 @@
 Lisp_Object Votf_script_alist;
 
 /* Check if any window system is used now.  */
-void (*check_window_system_func) P_ ((void));
+void (*check_window_system_func) (void);
 
 
 /* Prototype declarations for static functions.  */
-static Lisp_Object fontset_add P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
-				    Lisp_Object));
-static Lisp_Object fontset_find_font P_ ((Lisp_Object, int, struct face *,
-					  int, int));
-static void reorder_font_vector P_ ((Lisp_Object, struct font *));
-static Lisp_Object fontset_font P_ ((Lisp_Object, int, struct face *, int));
-static Lisp_Object make_fontset P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-static Lisp_Object fontset_pattern_regexp P_ ((Lisp_Object));
-static void accumulate_script_ranges P_ ((Lisp_Object, Lisp_Object,
-					  Lisp_Object));
-Lisp_Object find_font_encoding P_ ((Lisp_Object));
+static Lisp_Object fontset_add (Lisp_Object, Lisp_Object, Lisp_Object,
+                                Lisp_Object);
+static Lisp_Object fontset_find_font (Lisp_Object, int, struct face *,
+                                      int, int);
+static void reorder_font_vector (Lisp_Object, struct font *);
+static Lisp_Object fontset_font (Lisp_Object, int, struct face *, int);
+static Lisp_Object make_fontset (Lisp_Object, Lisp_Object, Lisp_Object);
+static Lisp_Object fontset_pattern_regexp (Lisp_Object);
+static void accumulate_script_ranges (Lisp_Object, Lisp_Object,
+                                      Lisp_Object);
+Lisp_Object find_font_encoding (Lisp_Object);
 
-static void set_fontset_font P_ ((Lisp_Object, Lisp_Object));
+static void set_fontset_font (Lisp_Object, Lisp_Object);
 
 #ifdef FONTSET_DEBUG
 
@@ -306,9 +306,7 @@
    : fontset_ref ((fontset), (c)))
 
 static Lisp_Object
-fontset_ref (fontset, c)
-     Lisp_Object fontset;
-     int c;
+fontset_ref (Lisp_Object fontset, int c)
 {
   Lisp_Object elt;
 
@@ -343,8 +341,7 @@
    : fontset_add ((fontset), (range), (elt), (add)))
 
 static Lisp_Object
-fontset_add (fontset, range, elt, add)
-     Lisp_Object fontset, range, elt, add;
+fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Object add)
 {
   Lisp_Object args[2];
   int idx = (EQ (add, Qappend) ? 0 : 1);
@@ -376,8 +373,7 @@
 }
 
 static int
-fontset_compare_rfontdef (val1, val2)
-     const void *val1, *val2;
+fontset_compare_rfontdef (const void *val1, const void *val2)
 {
   return (RFONT_DEF_SCORE (*(Lisp_Object *) val1)
 	  - RFONT_DEF_SCORE (*(Lisp_Object *) val2));
@@ -392,12 +388,10 @@
    If PREFERRED_FAMILY is not nil, that family has the higher priority
    if the encoding charsets or languages in font-specs are the same.  */
 
-extern Lisp_Object Fassoc_string ();
+extern Lisp_Object Fassoc_string (Lisp_Object, Lisp_Object, Lisp_Object);
 
 static void
-reorder_font_vector (font_group, font)
-     Lisp_Object font_group;
-     struct font *font;
+reorder_font_vector (Lisp_Object font_group, struct font *font)
 {
   Lisp_Object vec, font_object;
   int size;
@@ -525,11 +519,7 @@
    If FALLBACK is nonzero, search only fallback fonts.  */
 
 static Lisp_Object
-fontset_find_font (fontset, c, face, id, fallback)
-     Lisp_Object fontset;
-     int c;
-     struct face *face;
-     int id, fallback;
+fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fallback)
 {
   Lisp_Object vec, font_group;
   int i, charset_matched = 0, found_index;
@@ -728,11 +718,7 @@
 
 
 static Lisp_Object
-fontset_font (fontset, c, face, id)
-     Lisp_Object fontset;
-     int c;
-     struct face *face;
-     int id;
+fontset_font (Lisp_Object fontset, int c, struct face *face, int id)
 {
   Lisp_Object rfont_def, default_rfont_def;
   Lisp_Object base_fontset;
@@ -793,8 +779,7 @@
    BASE.  */
 
 static Lisp_Object
-make_fontset (frame, name, base)
-     Lisp_Object frame, name, base;
+make_fontset (Lisp_Object frame, Lisp_Object name, Lisp_Object base)
 {
   Lisp_Object fontset;
   int size = ASIZE (Vfontset_table);
@@ -835,8 +820,7 @@
 /* Return the name of the fontset who has ID.  */
 
 Lisp_Object
-fontset_name (id)
-     int id;
+fontset_name (int id)
 {
   Lisp_Object fontset;
 
@@ -848,8 +832,7 @@
 /* Return the ASCII font name of the fontset who has ID.  */
 
 Lisp_Object
-fontset_ascii (id)
-     int id;
+fontset_ascii (int id)
 {
   Lisp_Object fontset, elt;
 
@@ -861,9 +844,7 @@
 }
 
 void
-free_realized_fontset (f, fontset)
-     FRAME_PTR f;
-     Lisp_Object fontset;
+free_realized_fontset (FRAME_PTR f, Lisp_Object fontset)
 {
   Lisp_Object tail;
 
@@ -879,9 +860,7 @@
    free_realized_face.  */
 
 void
-free_face_fontset (f, face)
-     FRAME_PTR f;
-     struct face *face;
+free_face_fontset (FRAME_PTR f, struct face *face)
 {
   Lisp_Object fontset;
 
@@ -915,9 +894,7 @@
    when C is not an ASCII character.  */
 
 int
-face_suitable_for_char_p (face, c)
-     struct face *face;
-     int c;
+face_suitable_for_char_p (struct face *face, int c)
 {
   Lisp_Object fontset, rfont_def;
 
@@ -934,11 +911,7 @@
    the macro FACE_FOR_CHAR.  */
 
 int
-face_for_char (f, face, c, pos, object)
-     FRAME_PTR f;
-     struct face *face;
-     int c, pos;
-     Lisp_Object object;
+face_for_char (FRAME_PTR f, struct face *face, int c, int pos, Lisp_Object object)
 {
   Lisp_Object fontset, rfont_def, charset;
   int face_id;
@@ -1006,10 +979,7 @@
 
 
 Lisp_Object
-font_for_char (face, c, pos, object)
-     struct face *face;
-     int c, pos;
-     Lisp_Object object;
+font_for_char (struct face *face, int c, int pos, Lisp_Object object)
 {
   Lisp_Object fontset, rfont_def, charset;
   int id;
@@ -1059,10 +1029,7 @@
    Called from realize_x_face.  */
 
 int
-make_fontset_for_ascii_face (f, base_fontset_id, face)
-     FRAME_PTR f;
-     int base_fontset_id;
-     struct face *face;
+make_fontset_for_ascii_face (FRAME_PTR f, int base_fontset_id, struct face *face)
 {
   Lisp_Object base_fontset, fontset, frame;
 
@@ -1096,8 +1063,7 @@
    expression corresponding to PATTERN.  */
 
 static Lisp_Object
-fontset_pattern_regexp (pattern)
-     Lisp_Object pattern;
+fontset_pattern_regexp (Lisp_Object pattern)
 {
   if (!index ((char *) SDATA (pattern), '*')
       && !index ((char *) SDATA (pattern), '?'))
@@ -1171,9 +1137,7 @@
 */
 
 int
-fs_query_fontset (name, name_pattern)
-     Lisp_Object name;
-     int name_pattern;
+fs_query_fontset (Lisp_Object name, int name_pattern)
 {
   Lisp_Object tem;
   int i;
@@ -1246,10 +1210,7 @@
 /* Return a list of base fontset names matching PATTERN on frame F.  */
 
 Lisp_Object
-list_fontsets (f, pattern, size)
-     FRAME_PTR f;
-     Lisp_Object pattern;
-     int size;
+list_fontsets (FRAME_PTR f, Lisp_Object pattern, int size)
 {
   Lisp_Object frame, regexp, val;
   int id;
@@ -1285,8 +1246,7 @@
 /* Free all realized fontsets whose base fontset is BASE.  */
 
 static void
-free_realized_fontsets (base)
-     Lisp_Object base;
+free_realized_fontsets (Lisp_Object base)
 {
   int id;
 
@@ -1343,8 +1303,7 @@
    Set *FRAME to the actual frame.  */
 
 static Lisp_Object
-check_fontset_name (name, frame)
-     Lisp_Object name, *frame;
+check_fontset_name (Lisp_Object name, Lisp_Object *frame)
 {
   int id;
 
@@ -1373,8 +1332,7 @@
 }
 
 static void
-accumulate_script_ranges (arg, range, val)
-     Lisp_Object arg, range, val;
+accumulate_script_ranges (Lisp_Object arg, Lisp_Object range, Lisp_Object val)
 {
   if (EQ (XCAR (arg), val))
     {
@@ -1399,8 +1357,7 @@
    case.  */
 
 static void
-set_fontset_font (arg, range)
-     Lisp_Object arg, range;
+set_fontset_font (Lisp_Object arg, Lisp_Object range)
 {
   Lisp_Object fontset, font_def, add, ascii, script_range_list;
   int from = XINT (XCAR (range)), to = XINT (XCDR (range));
@@ -1440,7 +1397,7 @@
 }
 
 extern Lisp_Object QCfamily, QCregistry;
-static void update_auto_fontset_alist P_ ((Lisp_Object, Lisp_Object));
+static void update_auto_fontset_alist (Lisp_Object, Lisp_Object);
 
 
 DEFUN ("set-fontset-font", Fset_fontset_font, Sset_fontset_font, 3, 5, 0,
@@ -1762,8 +1719,7 @@
    user intends to use FONT-OBJECT for Latin characters.  */
 
 int
-fontset_from_font (font_object)
-     Lisp_Object font_object;
+fontset_from_font (Lisp_Object font_object)
 {
   Lisp_Object font_name = font_get_name (font_object);
   Lisp_Object font_spec = Fcopy_font_spec (font_object);
@@ -1819,8 +1775,7 @@
    fontset_from_font.  */
 
 static void
-update_auto_fontset_alist (font_object, fontset)
-     Lisp_Object font_object, fontset;
+update_auto_fontset_alist (Lisp_Object font_object, Lisp_Object fontset)
 {
   Lisp_Object prev, tail;
 
@@ -2224,7 +2179,7 @@
 #endif	/* FONTSET_DEBUG */
 
 void
-syms_of_fontset ()
+syms_of_fontset (void)
 {
   DEFSYM (Qfontset, "fontset");
   Fput (Qfontset, Qchar_table_extra_slots, make_number (9));
--- a/src/fontset.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/fontset.h	Thu Jul 08 17:09:35 2010 +0900
@@ -28,22 +28,22 @@
 #define EMACS_FONTSET_H
 
 /* Check if any window system is used now.  */
-extern void (*check_window_system_func) P_ ((void));
+extern void (*check_window_system_func) (void);
 
 struct face;
 
-extern void free_face_fontset P_ ((FRAME_PTR, struct face *));
-extern Lisp_Object fontset_font_pattern P_ ((FRAME_PTR, struct face *, int));
-extern int face_suitable_for_char_p P_ ((struct face *, int));
-extern int face_for_char P_ ((FRAME_PTR, struct face *, int,
-			      int, Lisp_Object));
-extern Lisp_Object font_for_char P_ ((struct face *, int, int, Lisp_Object));
+extern void free_face_fontset (FRAME_PTR, struct face *);
+extern Lisp_Object fontset_font_pattern (FRAME_PTR, struct face *, int);
+extern int face_suitable_for_char_p (struct face *, int);
+extern int face_for_char (FRAME_PTR, struct face *, int,
+                          int, Lisp_Object);
+extern Lisp_Object font_for_char (struct face *, int, int, Lisp_Object);
 
-extern int make_fontset_for_ascii_face P_ ((FRAME_PTR, int, struct face *));
-extern int fontset_from_font P_ ((Lisp_Object));
-extern int fs_query_fontset P_ ((Lisp_Object, int));
+extern int make_fontset_for_ascii_face (FRAME_PTR, int, struct face *);
+extern int fontset_from_font (Lisp_Object);
+extern int fs_query_fontset (Lisp_Object, int);
 EXFUN (Fquery_fontset, 2);
-extern Lisp_Object list_fontsets P_ ((struct frame *, Lisp_Object, int));
+extern Lisp_Object list_fontsets (struct frame *, Lisp_Object, int);
 
 extern Lisp_Object Vuse_default_ascent;
 extern Lisp_Object Vignore_relative_composition;
@@ -52,12 +52,12 @@
 extern Lisp_Object Vvertical_centering_font_regexp;
 extern Lisp_Object Votf_script_alist;
 
-extern Lisp_Object fontset_name P_ ((int));
-extern Lisp_Object fontset_ascii P_ ((int));
-extern int fontset_height P_ ((int));
+extern Lisp_Object fontset_name (int);
+extern Lisp_Object fontset_ascii (int);
+extern int fontset_height (int);
 
 struct font;
-extern int face_for_font P_ ((struct frame *, Lisp_Object, struct face *));
+extern int face_for_font (struct frame *, Lisp_Object, struct face *);
 
 #endif /* EMACS_FONTSET_H */
 
--- a/src/frame.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/frame.c	Thu Jul 08 17:09:35 2010 +0900
@@ -142,9 +142,7 @@
 int focus_follows_mouse;
 
 static void
-set_menu_bar_lines_1 (window, n)
-     Lisp_Object window;
-     int n;
+set_menu_bar_lines_1 (Lisp_Object window, int n)
 {
   struct window *w = XWINDOW (window);
 
@@ -170,9 +168,7 @@
 }
 
 void
-set_menu_bar_lines (f, value, oldval)
-     struct frame *f;
-     Lisp_Object value, oldval;
+set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   int nlines;
   int olines = FRAME_MENU_BAR_LINES (f);
@@ -202,10 +198,10 @@
 Lisp_Object Vframe_list;
 
 extern Lisp_Object Vminibuffer_list;
-extern Lisp_Object get_minibuffer ();
-extern Lisp_Object Fhandle_switch_frame ();
-extern Lisp_Object Fredirect_frame_focus ();
-extern Lisp_Object x_get_focus_frame ();
+extern Lisp_Object get_minibuffer (int);
+extern Lisp_Object Fhandle_switch_frame (Lisp_Object event);
+extern Lisp_Object Fredirect_frame_focus (Lisp_Object frame, Lisp_Object focus_frame);
+extern Lisp_Object x_get_focus_frame (struct frame *frame);
 extern Lisp_Object QCname, Qfont_param;
 
 
@@ -282,8 +278,7 @@
 }
 
 struct frame *
-make_frame (mini_p)
-     int mini_p;
+make_frame (int mini_p)
 {
   Lisp_Object frame;
   register struct frame *f;
@@ -433,10 +428,7 @@
    default (the global minibuffer).  */
 
 struct frame *
-make_frame_without_minibuffer (mini_window, kb, display)
-     register Lisp_Object mini_window;
-     KBOARD *kb;
-     Lisp_Object display;
+make_frame_without_minibuffer (register Lisp_Object mini_window, KBOARD *kb, Lisp_Object display)
 {
   register struct frame *f;
   struct gcpro gcpro1;
@@ -485,7 +477,7 @@
 /* Make a frame containing only a minibuffer window.  */
 
 struct frame *
-make_minibuffer_frame ()
+make_minibuffer_frame (void)
 {
   /* First make a frame containing just a root window, no minibuffer.  */
 
@@ -784,9 +776,7 @@
    The value of NORECORD is passed as argument to Fselect_window.  */
 
 Lisp_Object
-do_switch_frame (frame, track, for_deletion, norecord)
-     Lisp_Object frame, norecord;
-     int track, for_deletion;
+do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object norecord)
 {
   struct frame *sf = SELECTED_FRAME ();
 
@@ -1061,9 +1051,7 @@
    Otherwise, include all frames.  */
 
 static Lisp_Object
-next_frame (frame, minibuf)
-     Lisp_Object frame;
-     Lisp_Object minibuf;
+next_frame (Lisp_Object frame, Lisp_Object minibuf)
 {
   Lisp_Object tail;
   int passed = 0;
@@ -1141,9 +1129,7 @@
    Otherwise, include all frames.  */
 
 static Lisp_Object
-prev_frame (frame, minibuf)
-     Lisp_Object frame;
-     Lisp_Object minibuf;
+prev_frame (Lisp_Object frame, Lisp_Object minibuf)
 {
   Lisp_Object tail;
   Lisp_Object prev;
@@ -1261,8 +1247,7 @@
    (Exception: if F is the terminal frame, and we are using X, return 1.)  */
 
 int
-other_visible_frames (f)
-     FRAME_PTR f;
+other_visible_frames (FRAME_PTR f)
 {
   /* We know the selected frame is visible,
      so if F is some other frame, it can't be the sole visible one.  */
@@ -1316,11 +1301,11 @@
   this.  Any other value of FORCE implements the semantics
   described for Fdelete_frame.  */
 Lisp_Object
-delete_frame (frame, force)
+delete_frame (Lisp_Object frame, Lisp_Object force)
      /* If we use `register' here, gcc-4.0.2 on amd64 using
 	-DUSE_LISP_UNION_TYPE complains further down that we're getting the
 	address of `force'.  Go figure.  */
-     Lisp_Object frame, force;
+                              
 {
   struct frame *f;
   struct frame *sf = SELECTED_FRAME ();
@@ -1823,7 +1808,7 @@
   return Qnil;
 }
 
-static void make_frame_visible_1 P_ ((Lisp_Object));
+static void make_frame_visible_1 (Lisp_Object);
 
 DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible,
        0, 1, "",
@@ -1858,8 +1843,7 @@
    and all its descendents.  */
 
 static void
-make_frame_visible_1 (window)
-     Lisp_Object window;
+make_frame_visible_1 (Lisp_Object window)
 {
   struct window *w;
 
@@ -2136,9 +2120,7 @@
 /* Return the value of frame parameter PROP in frame FRAME.  */
 
 Lisp_Object
-get_frame_param (frame, prop)
-     register struct frame *frame;
-     Lisp_Object prop;
+get_frame_param (register struct frame *frame, Lisp_Object prop)
 {
   register Lisp_Object tem;
 
@@ -2151,8 +2133,7 @@
 /* Return the buffer-predicate of the selected frame.  */
 
 Lisp_Object
-frame_buffer_predicate (frame)
-     Lisp_Object frame;
+frame_buffer_predicate (Lisp_Object frame)
 {
   return XFRAME (frame)->buffer_predicate;
 }
@@ -2160,8 +2141,7 @@
 /* Return the buffer-list of the selected frame.  */
 
 Lisp_Object
-frame_buffer_list (frame)
-     Lisp_Object frame;
+frame_buffer_list (Lisp_Object frame)
 {
   return XFRAME (frame)->buffer_list;
 }
@@ -2169,8 +2149,7 @@
 /* Set the buffer-list of the selected frame.  */
 
 void
-set_frame_buffer_list (frame, list)
-     Lisp_Object frame, list;
+set_frame_buffer_list (Lisp_Object frame, Lisp_Object list)
 {
   XFRAME (frame)->buffer_list = list;
 }
@@ -2178,8 +2157,7 @@
 /* Discard BUFFER from the buffer-list and buried-buffer-list of each frame.  */
 
 void
-frames_discard_buffer (buffer)
-     Lisp_Object buffer;
+frames_discard_buffer (Lisp_Object buffer)
 {
   Lisp_Object frame, tail;
 
@@ -2196,9 +2174,7 @@
    If the alist already has an element for PROP, we change it.  */
 
 void
-store_in_alist (alistptr, prop, val)
-     Lisp_Object *alistptr, val;
-     Lisp_Object prop;
+store_in_alist (Lisp_Object *alistptr, Lisp_Object prop, Lisp_Object val)
 {
   register Lisp_Object tem;
 
@@ -2210,9 +2186,7 @@
 }
 
 static int
-frame_name_fnn_p (str, len)
-     char *str;
-     EMACS_INT len;
+frame_name_fnn_p (char *str, EMACS_INT len)
 {
   if (len > 1 && str[0] == 'F')
     {
@@ -2230,9 +2204,7 @@
    Modeled after x_set_name which is used for WINDOW frames.  */
 
 static void
-set_term_frame_name (f, name)
-     struct frame *f;
-     Lisp_Object name;
+set_term_frame_name (struct frame *f, Lisp_Object name)
 {
   f->explicit_name = ! NILP (name);
 
@@ -2270,9 +2242,7 @@
 }
 
 void
-store_frame_param (f, prop, val)
-     struct frame *f;
-     Lisp_Object prop, val;
+store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
 {
   register Lisp_Object old_alist_elt;
 
@@ -2893,12 +2863,7 @@
  */
 
 void
-x_fullscreen_adjust (f, width, height, top_pos, left_pos)
-     struct frame *f;
-     int *width;
-     int *height;
-     int *top_pos;
-     int *left_pos;
+x_fullscreen_adjust (struct frame *f, int *width, int *height, int *top_pos, int *left_pos)
 {
   int newwidth = FRAME_COLS (f);
   int newheight = FRAME_LINES (f);
@@ -2941,9 +2906,7 @@
    to store the new value in the parameter alist.  */
 
 void
-x_set_frame_parameters (f, alist)
-     FRAME_PTR f;
-     Lisp_Object alist;
+x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist)
 {
   Lisp_Object tail;
 
@@ -3217,9 +3180,7 @@
    param_alist need to be considered here.  */
 
 void
-x_report_frame_params (f, alistptr)
-     struct frame *f;
-     Lisp_Object *alistptr;
+x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
 {
   char buf[16];
   Lisp_Object tem;
@@ -3288,9 +3249,7 @@
    the previous value of that parameter, NEW_VALUE is the new value. */
 
 void
-x_set_fullscreen (f, new_value, old_value)
-     struct frame *f;
-     Lisp_Object new_value, old_value;
+x_set_fullscreen (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
 {
   if (NILP (new_value))
     f->want_fullscreen = FULLSCREEN_NONE;
@@ -3312,9 +3271,7 @@
    the previous value of that parameter, NEW_VALUE is the new value.  */
 
 void
-x_set_line_spacing (f, new_value, old_value)
-     struct frame *f;
-     Lisp_Object new_value, old_value;
+x_set_line_spacing (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
 {
   if (NILP (new_value))
     f->extra_line_spacing = 0;
@@ -3331,9 +3288,7 @@
    the previous value of that parameter, NEW_VALUE is the new value.  */
 
 void
-x_set_screen_gamma (f, new_value, old_value)
-     struct frame *f;
-     Lisp_Object new_value, old_value;
+x_set_screen_gamma (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
 {
   Lisp_Object bgcolor;
 
@@ -3363,9 +3318,7 @@
 
 
 void
-x_set_font (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   Lisp_Object frame, font_object, font_param = Qnil;
   int fontset = -1;
@@ -3462,9 +3415,7 @@
 
 
 void
-x_set_font_backend (f, new_value, old_value)
-     struct frame *f;
-     Lisp_Object new_value, old_value;
+x_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
 {
   if (! NILP (new_value)
       && !CONSP (new_value))
@@ -3520,17 +3471,13 @@
 
 
 void
-x_set_fringe_width (f, new_value, old_value)
-     struct frame *f;
-     Lisp_Object new_value, old_value;
+x_set_fringe_width (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
 {
   compute_fringe_widths (f, 1);
 }
 
 void
-x_set_border_width (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   CHECK_NUMBER (arg);
 
@@ -3544,9 +3491,7 @@
 }
 
 void
-x_set_internal_border_width (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   int old = FRAME_INTERNAL_BORDER_WIDTH (f);
 
@@ -3574,9 +3519,7 @@
 }
 
 void
-x_set_visibility (f, value, oldval)
-     struct frame *f;
-     Lisp_Object value, oldval;
+x_set_visibility (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   Lisp_Object frame;
   XSETFRAME (frame, f);
@@ -3590,33 +3533,25 @@
 }
 
 void
-x_set_autoraise (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_autoraise (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   f->auto_raise = !EQ (Qnil, arg);
 }
 
 void
-x_set_autolower (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_autolower (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   f->auto_lower = !EQ (Qnil, arg);
 }
 
 void
-x_set_unsplittable (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_unsplittable (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   f->no_split = !NILP (arg);
 }
 
 void
-x_set_vertical_scroll_bars (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_vertical_scroll_bars (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   if ((EQ (arg, Qleft) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f))
       || (EQ (arg, Qright) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f))
@@ -3647,9 +3582,7 @@
 }
 
 void
-x_set_scroll_bar_width (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   int wid = FRAME_COLUMN_WIDTH (f);
 
@@ -3684,8 +3617,7 @@
 /* Return non-nil if frame F wants a bitmap icon.  */
 
 Lisp_Object
-x_icon_type (f)
-     FRAME_PTR f;
+x_icon_type (FRAME_PTR f)
 {
   Lisp_Object tem;
 
@@ -3697,9 +3629,7 @@
 }
 
 void
-x_set_alpha (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   double alpha = 1.0;
   double newval[2];
@@ -3757,7 +3687,7 @@
    Fix it up, or set it to `emacs' if it is too hopeless.  */
 
 void
-validate_x_resource_name ()
+validate_x_resource_name (void)
 {
   int len = 0;
   /* Number of valid characters in the resource name.  */
@@ -3824,17 +3754,15 @@
 }
 
 
-extern char *x_get_string_resource P_ ((XrmDatabase, char *, char *));
-extern Display_Info *check_x_display_info P_ ((Lisp_Object));
+extern char *x_get_string_resource (XrmDatabase, char *, char *);
+extern Display_Info *check_x_display_info (Lisp_Object);
 
 
 /* Get specified attribute from resource database RDB.
    See Fx_get_resource below for other parameters.  */
 
 static Lisp_Object
-xrdb_get_resource (rdb, attribute, class, component, subclass)
-     XrmDatabase rdb;
-     Lisp_Object attribute, class, component, subclass;
+xrdb_get_resource (XrmDatabase rdb, Lisp_Object attribute, Lisp_Object class, Lisp_Object component, Lisp_Object subclass)
 {
   register char *value;
   char *name_key;
@@ -3919,9 +3847,7 @@
 /* Get an X resource, like Fx_get_resource, but for display DPYINFO.  */
 
 Lisp_Object
-display_x_get_resource (dpyinfo, attribute, class, component, subclass)
-     Display_Info *dpyinfo;
-     Lisp_Object attribute, class, component, subclass;
+display_x_get_resource (Display_Info *dpyinfo, Lisp_Object attribute, Lisp_Object class, Lisp_Object component, Lisp_Object subclass)
 {
   return xrdb_get_resource (dpyinfo->xrdb,
 			    attribute, class, component, subclass);
@@ -3931,8 +3857,7 @@
 /* Used when C code wants a resource value.  */
 /* Called from oldXMenu/Create.c.  */
 char *
-x_get_resource_string (attribute, class)
-     char *attribute, *class;
+x_get_resource_string (char *attribute, char *class)
 {
   char *name_key;
   char *class_key;
@@ -3965,12 +3890,7 @@
    and don't let it get stored in any Lisp-visible variables!  */
 
 Lisp_Object
-x_get_arg (dpyinfo, alist, param, attribute, class, type)
-     Display_Info *dpyinfo;
-     Lisp_Object alist, param;
-     char *attribute;
-     char *class;
-     enum resource_types type;
+x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type)
 {
   register Lisp_Object tem;
 
@@ -4068,12 +3988,7 @@
 }
 
 Lisp_Object
-x_frame_get_arg (f, alist, param, attribute, class, type)
-     struct frame *f;
-     Lisp_Object alist, param;
-     char *attribute;
-     char *class;
-     enum resource_types type;
+x_frame_get_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type)
 {
   return x_get_arg (FRAME_X_DISPLAY_INFO (f),
 		    alist, param, attribute, class, type);
@@ -4082,12 +3997,7 @@
 /* Like x_frame_get_arg, but also record the value in f->param_alist.  */
 
 Lisp_Object
-x_frame_get_and_record_arg (f, alist, param, attribute, class, type)
-     struct frame *f;
-     Lisp_Object alist, param;
-     char *attribute;
-     char *class;
-     enum resource_types type;
+x_frame_get_and_record_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type)
 {
   Lisp_Object value;
 
@@ -4107,14 +4017,7 @@
    If that is not found either, use the value DEFLT.  */
 
 Lisp_Object
-x_default_parameter (f, alist, prop, deflt, xprop, xclass, type)
-     struct frame *f;
-     Lisp_Object alist;
-     Lisp_Object prop;
-     Lisp_Object deflt;
-     char *xprop;
-     char *xclass;
-     enum resource_types type;
+x_default_parameter (struct frame *f, Lisp_Object alist, Lisp_Object prop, Lisp_Object deflt, char *xprop, char *xclass, enum resource_types type)
 {
   Lisp_Object tem;
 
@@ -4208,10 +4111,7 @@
 #define DEFAULT_COLS 80
 
 int
-x_figure_window_size (f, parms, toolbar_p)
-     struct frame *f;
-     Lisp_Object parms;
-     int toolbar_p;
+x_figure_window_size (struct frame *f, Lisp_Object parms, int toolbar_p)
 {
   register Lisp_Object tem0, tem1, tem2;
   long window_prompting = 0;
@@ -4386,7 +4286,7 @@
 #endif /* HAVE_WINDOW_SYSTEM */
 
 void
-frame_make_pointer_invisible ()
+frame_make_pointer_invisible (void)
 {
   if (! NILP (Vmake_pointer_invisible))
     {
@@ -4406,7 +4306,7 @@
 }
 
 void
-frame_make_pointer_visible ()
+frame_make_pointer_visible (void)
 {
   /* We don't check Vmake_pointer_invisible here in case the
      pointer was invisible when Vmake_pointer_invisible was set to nil.  */
@@ -4431,7 +4331,7 @@
  ***********************************************************************/
 
 void
-syms_of_frame ()
+syms_of_frame (void)
 {
   Qframep = intern_c_string ("framep");
   staticpro (&Qframep);
--- a/src/frame.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/frame.h	Thu Jul 08 17:09:35 2010 +0900
@@ -828,19 +828,19 @@
 
 extern struct frame *last_nonminibuf_frame;
 
-extern struct frame *make_initial_frame P_ ((void));
-extern struct frame *make_terminal_frame P_ ((struct terminal *));
-extern struct frame *make_frame P_ ((int));
+extern struct frame *make_initial_frame (void);
+extern struct frame *make_terminal_frame (struct terminal *);
+extern struct frame *make_frame (int);
 #ifdef HAVE_WINDOW_SYSTEM
-extern struct frame *make_minibuffer_frame P_ ((void));
-extern struct frame *make_frame_without_minibuffer P_ ((Lisp_Object,
-							struct kboard *,
-							Lisp_Object));
+extern struct frame *make_minibuffer_frame (void);
+extern struct frame *make_frame_without_minibuffer (Lisp_Object,
+                                                    struct kboard *,
+                                                    Lisp_Object);
 #endif /* HAVE_WINDOW_SYSTEM */
-extern int other_visible_frames P_ ((struct frame *));
-extern void frame_make_pointer_invisible P_ ((void));
-extern void frame_make_pointer_visible P_ ((void));
-extern Lisp_Object delete_frame P_ ((Lisp_Object, Lisp_Object));
+extern int other_visible_frames (struct frame *);
+extern void frame_make_pointer_invisible (void);
+extern void frame_make_pointer_visible (void);
+extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object);
 
 extern Lisp_Object Vframe_list;
 extern Lisp_Object Vdefault_frame_alist;
@@ -1081,11 +1081,11 @@
 
 /* These are in xterm.c, w32term.c, etc.  */
 
-extern void x_set_scroll_bar_default_width P_ ((struct frame *));
-extern void x_set_offset P_ ((struct frame *, int, int, int));
-extern void x_wm_set_icon_position P_ ((struct frame *, int, int));
+extern void x_set_scroll_bar_default_width (struct frame *);
+extern void x_set_offset (struct frame *, int, int, int);
+extern void x_wm_set_icon_position (struct frame *, int, int);
 
-extern Lisp_Object x_new_font P_ ((struct frame *, Lisp_Object, int));
+extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int);
 
 /* These are in frame.c  */
 
@@ -1095,38 +1095,38 @@
 
 extern Lisp_Object Qface_set_after_frame_default;
 
-extern void x_fullscreen_adjust P_ ((struct frame *f, int *, int *,
-				     int *, int *));
+extern void x_fullscreen_adjust (struct frame *f, int *, int *,
+                                 int *, int *);
 
-extern void x_set_frame_parameters P_ ((struct frame *, Lisp_Object));
-extern void x_report_frame_params P_ ((struct frame *, Lisp_Object *));
+extern void x_set_frame_parameters (struct frame *, Lisp_Object);
+extern void x_report_frame_params (struct frame *, Lisp_Object *);
 
-extern void x_set_fullscreen P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_line_spacing P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_screen_gamma P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_font_backend P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_fringe_width P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_internal_border_width P_ ((struct frame *, Lisp_Object,
-					     Lisp_Object));
-extern void x_set_visibility P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_autoraise P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_autolower P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_unsplittable P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_set_vertical_scroll_bars P_ ((struct frame *, Lisp_Object,
-					    Lisp_Object));
-extern void x_set_scroll_bar_width P_ ((struct frame *, Lisp_Object,
-					Lisp_Object));
+extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_screen_gamma (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_font (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_font_backend (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_fringe_width (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_border_width (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_internal_border_width (struct frame *, Lisp_Object,
+                                         Lisp_Object);
+extern void x_set_visibility (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_autoraise (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_autolower (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_unsplittable (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_vertical_scroll_bars (struct frame *, Lisp_Object,
+                                        Lisp_Object);
+extern void x_set_scroll_bar_width (struct frame *, Lisp_Object,
+                                    Lisp_Object);
 
-extern Lisp_Object x_icon_type P_ ((struct frame *));
+extern Lisp_Object x_icon_type (struct frame *);
 
-extern int x_figure_window_size P_ ((struct frame *, Lisp_Object, int));
+extern int x_figure_window_size (struct frame *, Lisp_Object, int);
 
 extern Lisp_Object Vframe_alpha_lower_limit;
-extern void x_set_alpha P_ ((struct frame *, Lisp_Object, Lisp_Object));
+extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object);
 
-extern void validate_x_resource_name P_ ((void));
+extern void validate_x_resource_name (void);
                                            
 extern Lisp_Object display_x_get_resource (Display_Info *,
 					   Lisp_Object attribute,
--- a/src/fringe.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/fringe.c	Thu Jul 08 17:09:35 2010 +0900
@@ -490,8 +490,7 @@
    Return 0 if not a bitmap.  */
 
 int
-lookup_fringe_bitmap (bitmap)
-     Lisp_Object bitmap;
+lookup_fringe_bitmap (Lisp_Object bitmap)
 {
   int bn;
 
@@ -517,8 +516,7 @@
    Return BN if not found in Vfringe_bitmaps.  */
 
 static Lisp_Object
-get_fringe_bitmap_name (bn)
-     int bn;
+get_fringe_bitmap_name (int bn)
 {
   Lisp_Object bitmaps;
   Lisp_Object num;
@@ -550,11 +548,7 @@
 */
 
 static void
-draw_fringe_bitmap_1 (w, row, left_p, overlay, which)
-     struct window *w;
-     struct glyph_row *row;
-     int left_p, overlay;
-     int which;
+draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int overlay, int which)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   struct draw_fringe_bitmap_params p;
@@ -582,11 +576,10 @@
 
   if (face_id == DEFAULT_FACE_ID)
     {
-      Lisp_Object face;
-
-      if ((face = fringe_faces[which], NILP (face))
-	  || (face_id = lookup_derived_face (f, face, FRINGE_FACE_ID, 0),
-	      face_id < 0))
+      Lisp_Object face = fringe_faces[which];
+      face_id = NILP (face) ? lookup_named_face (f, Qfringe, 0)
+	: lookup_derived_face (f, face, FRINGE_FACE_ID, 0);
+      if (face_id < 0)
 	face_id = FRINGE_FACE_ID;
     }
 
@@ -690,9 +683,7 @@
 }
 
 static int
-get_logical_cursor_bitmap (w, cursor)
-     struct window *w;
-     Lisp_Object cursor;
+get_logical_cursor_bitmap (struct window *w, Lisp_Object cursor)
 {
   Lisp_Object cmap, bm = Qnil;
 
@@ -715,10 +706,7 @@
 }
 
 static int
-get_logical_fringe_bitmap (w, bitmap, right_p, partial_p)
-     struct window *w;
-     Lisp_Object bitmap;
-     int right_p, partial_p;
+get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, int partial_p)
 {
   Lisp_Object cmap, bm1 = Qnil, bm2 = Qnil, bm;
   int ln1 = 0, ln2 = 0;
@@ -818,10 +806,7 @@
 
 
 void
-draw_fringe_bitmap (w, row, left_p)
-     struct window *w;
-     struct glyph_row *row;
-     int left_p;
+draw_fringe_bitmap (struct window *w, struct glyph_row *row, int left_p)
 {
   int overlay = 0;
 
@@ -874,9 +859,7 @@
    function with input blocked.  */
 
 void
-draw_row_fringe_bitmaps (w, row)
-     struct window *w;
-     struct glyph_row *row;
+draw_row_fringe_bitmaps (struct window *w, struct glyph_row *row)
 {
   xassert (interrupt_input_blocked);
 
@@ -904,9 +887,7 @@
 */
 
 int
-draw_window_fringes (w, no_fringe)
-     struct window *w;
-     int no_fringe;
+draw_window_fringes (struct window *w, int no_fringe)
 {
   struct glyph_row *row;
   int yb = window_text_bottom_y (w);
@@ -944,9 +925,7 @@
    If KEEP_CURRENT_P is 0, update current_matrix too.  */
 
 int
-update_window_fringes (w, keep_current_p)
-     struct window *w;
-     int keep_current_p;
+update_window_fringes (struct window *w, int keep_current_p)
 {
   struct glyph_row *row, *cur = 0;
   int yb = window_text_bottom_y (w);
@@ -1188,9 +1167,7 @@
 */
 
 void
-compute_fringe_widths (f, redraw)
-     struct frame *f;
-     int redraw;
+compute_fringe_widths (struct frame *f, int redraw)
 {
   int o_left = FRAME_LEFT_FRINGE_WIDTH (f);
   int o_right = FRAME_RIGHT_FRINGE_WIDTH (f);
@@ -1272,8 +1249,7 @@
 /* Free resources used by a user-defined bitmap.  */
 
 void
-destroy_fringe_bitmap (n)
-     int n;
+destroy_fringe_bitmap (int n)
 {
   struct fringe_bitmap **fbp;
 
@@ -1342,10 +1318,7 @@
 #endif                          /* HAVE_X_WINDOWS */
 
 void
-init_fringe_bitmap (which, fb, once_p)
-     int which;
-     struct fringe_bitmap *fb;
-     int once_p;
+init_fringe_bitmap (int which, struct fringe_bitmap *fb, int once_p)
 {
   if (once_p || fb->dynamic)
     {
@@ -1520,7 +1493,7 @@
   xfb = (struct fringe_bitmap *) xmalloc (sizeof fb
 					  + fb.height * BYTES_PER_BITMAP_ROW);
   fb.bits = b = (unsigned short *) (xfb + 1);
-  bzero (b, fb.height);
+  memset (b, 0, fb.height);
 
   j = 0;
   while (j < fb.height)
@@ -1620,7 +1593,7 @@
  ***********************************************************************/
 
 void
-syms_of_fringe ()
+syms_of_fringe (void)
 {
   Qtruncation = intern_c_string ("truncation");
   staticpro (&Qtruncation);
@@ -1657,7 +1630,7 @@
 /* Garbage collection hook */
 
 void
-mark_fringe_data ()
+mark_fringe_data (void)
 {
   int i;
 
@@ -1669,7 +1642,7 @@
 /* Initialize this module when Emacs starts.  */
 
 void
-init_fringe_once ()
+init_fringe_once (void)
 {
   int bt;
 
@@ -1678,7 +1651,7 @@
 }
 
 void
-init_fringe ()
+init_fringe (void)
 {
   int i;
 
--- a/src/ftfont.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/ftfont.c	Thu Jul 08 17:09:35 2010 +0900
@@ -80,16 +80,16 @@
     FTFONT_CACHE_FOR_ENTITY
   };
 
-static Lisp_Object ftfont_pattern_entity P_ ((FcPattern *, Lisp_Object));
+static Lisp_Object ftfont_pattern_entity (FcPattern *, Lisp_Object);
 
-static Lisp_Object ftfont_resolve_generic_family P_ ((Lisp_Object,
-						      FcPattern *));
-static Lisp_Object ftfont_lookup_cache P_ ((Lisp_Object,
-					    enum ftfont_cache_for));
+static Lisp_Object ftfont_resolve_generic_family (Lisp_Object,
+                                                  FcPattern *);
+static Lisp_Object ftfont_lookup_cache (Lisp_Object,
+                                        enum ftfont_cache_for);
 
-static void ftfont_filter_properties P_ ((Lisp_Object font, Lisp_Object alist));
+static void ftfont_filter_properties (Lisp_Object font, Lisp_Object alist);
                                                 
-Lisp_Object ftfont_font_format P_ ((FcPattern *, Lisp_Object));
+Lisp_Object ftfont_font_format (FcPattern *, Lisp_Object);
 
 #define SYMBOL_FcChar8(SYM) (FcChar8 *) SDATA (SYMBOL_NAME (SYM))
 
@@ -188,9 +188,7 @@
 }
 
 static Lisp_Object
-ftfont_pattern_entity (p, extra)
-     FcPattern *p;
-     Lisp_Object extra;
+ftfont_pattern_entity (FcPattern *p, Lisp_Object extra)
 {
   Lisp_Object key, cache, entity;
   char *file, *str;
@@ -289,9 +287,7 @@
 static Lisp_Object ftfont_generic_family_list;
 
 static Lisp_Object
-ftfont_resolve_generic_family (family, pattern)
-     Lisp_Object family;
-     FcPattern *pattern;
+ftfont_resolve_generic_family (Lisp_Object family, FcPattern *pattern)
 {
   Lisp_Object slot;
   FcPattern *match;
@@ -348,9 +344,7 @@
 };
 
 static Lisp_Object
-ftfont_lookup_cache (key, cache_for)
-     Lisp_Object key;
-     enum ftfont_cache_for cache_for;
+ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for)
 {
   Lisp_Object cache, val, entity;
   struct ftfont_cache_data *cache_data;
@@ -450,8 +444,7 @@
 }
 
 FcCharSet *
-ftfont_get_fc_charset (entity)
-     Lisp_Object entity;
+ftfont_get_fc_charset (Lisp_Object entity)
 {
   Lisp_Object val, cache;
   struct ftfont_cache_data *cache_data;
@@ -486,26 +479,26 @@
 }
 #endif	/* HAVE_LIBOTF */
 
-static Lisp_Object ftfont_get_cache P_ ((FRAME_PTR));
-static Lisp_Object ftfont_list P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object ftfont_match P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object ftfont_list_family P_ ((Lisp_Object));
-static Lisp_Object ftfont_open P_ ((FRAME_PTR, Lisp_Object, int));
-static void ftfont_close P_ ((FRAME_PTR, struct font *));
-static int ftfont_has_char P_ ((Lisp_Object, int));
-static unsigned ftfont_encode_char P_ ((struct font *, int));
-static int ftfont_text_extents P_ ((struct font *, unsigned *, int,
-				    struct font_metrics *));
-static int ftfont_get_bitmap P_ ((struct font *, unsigned,
-				  struct font_bitmap *, int));
-static int ftfont_anchor_point P_ ((struct font *, unsigned, int,
-				    int *, int *));
-static Lisp_Object ftfont_otf_capability P_ ((struct font *));
-static Lisp_Object ftfont_shape P_ ((Lisp_Object));
+static Lisp_Object ftfont_get_cache (FRAME_PTR);
+static Lisp_Object ftfont_list (Lisp_Object, Lisp_Object);
+static Lisp_Object ftfont_match (Lisp_Object, Lisp_Object);
+static Lisp_Object ftfont_list_family (Lisp_Object);
+static Lisp_Object ftfont_open (FRAME_PTR, Lisp_Object, int);
+static void ftfont_close (FRAME_PTR, struct font *);
+static int ftfont_has_char (Lisp_Object, int);
+static unsigned ftfont_encode_char (struct font *, int);
+static int ftfont_text_extents (struct font *, unsigned *, int,
+                                struct font_metrics *);
+static int ftfont_get_bitmap (struct font *, unsigned,
+                              struct font_bitmap *, int);
+static int ftfont_anchor_point (struct font *, unsigned, int,
+                                int *, int *);
+static Lisp_Object ftfont_otf_capability (struct font *);
+static Lisp_Object ftfont_shape (Lisp_Object);
 
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS
-static int ftfont_variation_glyphs P_ ((struct font *, int c,
-					unsigned variations[256]));
+static int ftfont_variation_glyphs (struct font *, int c,
+                                    unsigned variations[256]);
 #endif /* HAVE_OTF_GET_VARIATION_GLYPHS */
 
 struct font_driver ftfont_driver =
@@ -559,15 +552,13 @@
 extern Lisp_Object QCname;
 
 static Lisp_Object
-ftfont_get_cache (f)
-     FRAME_PTR f;
+ftfont_get_cache (FRAME_PTR f)
 {
   return freetype_font_cache;
 }
 
 static int
-ftfont_get_charset (registry)
-     Lisp_Object registry;
+ftfont_get_charset (Lisp_Object registry)
 {
   char *str = (char *) SDATA (SYMBOL_NAME (registry));
   char *re = alloca (SBYTES (SYMBOL_NAME (registry)) * 2 + 1);
@@ -705,16 +696,12 @@
   return spec;
 }
 
-static FcPattern *ftfont_spec_pattern P_ ((Lisp_Object, char *,
-					   struct OpenTypeSpec **,
-					   char **langname));
+static FcPattern *ftfont_spec_pattern (Lisp_Object, char *,
+                                       struct OpenTypeSpec **,
+                                       char **langname);
 
 static FcPattern *
-ftfont_spec_pattern (spec, otlayout, otspec, langname)
-     Lisp_Object spec;
-     char *otlayout;
-     struct OpenTypeSpec **otspec;
-     char **langname;
+ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **otspec, char **langname)
 {
   Lisp_Object tmp, extra;
   FcPattern *pattern = NULL;
@@ -871,8 +858,7 @@
 }
 
 static Lisp_Object
-ftfont_list (frame, spec)
-     Lisp_Object frame, spec;
+ftfont_list (Lisp_Object frame, Lisp_Object spec)
 {
   Lisp_Object val = Qnil, family, adstyle;
   int i;
@@ -1069,8 +1055,7 @@
 }
 
 static Lisp_Object
-ftfont_match (frame, spec)
-     Lisp_Object frame, spec;
+ftfont_match (Lisp_Object frame, Lisp_Object spec)
 {
   Lisp_Object entity = Qnil;
   FcPattern *pattern, *match = NULL;
@@ -1120,8 +1105,7 @@
 }
 
 static Lisp_Object
-ftfont_list_family (frame)
-     Lisp_Object frame;
+ftfont_list_family (Lisp_Object frame)
 {
   Lisp_Object list = Qnil;
   FcPattern *pattern = NULL;
@@ -1164,10 +1148,7 @@
 
 
 static Lisp_Object
-ftfont_open (f, entity, pixel_size)
-     FRAME_PTR f;
-     Lisp_Object entity;
-     int pixel_size;
+ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
 {
   struct ftfont_info *ftfont_info;
   struct font *font;
@@ -1307,9 +1288,7 @@
 }
 
 static void
-ftfont_close (f, font)
-     FRAME_PTR f;
-     struct font *font;
+ftfont_close (FRAME_PTR f, struct font *font)
 {
   struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
   Lisp_Object val, cache;
@@ -1335,9 +1314,7 @@
 }
 
 static int
-ftfont_has_char (font, c)
-     Lisp_Object font;
-     int c;
+ftfont_has_char (Lisp_Object font, int c)
 {
   struct charset *cs = NULL;
 
@@ -1367,9 +1344,7 @@
 }
 
 static unsigned
-ftfont_encode_char (font, c)
-     struct font *font;
-     int c;
+ftfont_encode_char (struct font *font, int c)
 {
   struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
   FT_Face ft_face = ftfont_info->ft_size->face;
@@ -1380,11 +1355,7 @@
 }
 
 static int
-ftfont_text_extents (font, code, nglyphs, metrics)
-     struct font *font;
-     unsigned *code;
-     int nglyphs;
-     struct font_metrics *metrics;
+ftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics)
 {
   struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
   FT_Face ft_face = ftfont_info->ft_size->face;
@@ -1394,7 +1365,7 @@
   if (ftfont_info->ft_size != ft_face->size)
     FT_Activate_Size (ftfont_info->ft_size);
   if (metrics)
-    bzero (metrics, sizeof (struct font_metrics));
+    memset (metrics, 0, sizeof (struct font_metrics));
   for (i = 0, first = 1; i < nglyphs; i++)
     {
       if (FT_Load_Glyph (ft_face, code[i], FT_LOAD_DEFAULT) == 0)
@@ -1439,11 +1410,7 @@
 }
 
 static int
-ftfont_get_bitmap (font, code, bitmap, bits_per_pixel)
-     struct font *font;
-     unsigned code;
-     struct font_bitmap *bitmap;
-     int bits_per_pixel;
+ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bitmap, int bits_per_pixel)
 {
   struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
   FT_Face ft_face = ftfont_info->ft_size->face;
@@ -1487,11 +1454,7 @@
 }
 
 static int
-ftfont_anchor_point (font, code, index, x, y)
-     struct font *font;
-     unsigned code;
-     int index;
-     int *x, *y;
+ftfont_anchor_point (struct font *font, unsigned int code, int index, int *x, int *y)
 {
   struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
   FT_Face ft_face = ftfont_info->ft_size->face;
@@ -2677,9 +2640,7 @@
 };
 
 static void
-ftfont_filter_properties (font, alist)
-     Lisp_Object font;
-     Lisp_Object alist;
+ftfont_filter_properties (Lisp_Object font, Lisp_Object alist)
 {
   Lisp_Object it;
   int i;
@@ -2721,7 +2682,7 @@
 
 
 void
-syms_of_ftfont ()
+syms_of_ftfont (void)
 {
   DEFSYM (Qfreetype, "freetype");
   DEFSYM (Qmonospace, "monospace");
--- a/src/ftxfont.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/ftxfont.c	Thu Jul 08 17:09:35 2010 +0900
@@ -39,12 +39,12 @@
 static Lisp_Object Qftx;
 
 /* Prototypes for helper function.  */
-static GC *ftxfont_get_gcs P_ ((FRAME_PTR, unsigned long, unsigned long));
-static int ftxfont_draw_bitmap P_ ((FRAME_PTR, GC, GC *, struct font *,
-				    unsigned, int, int, XPoint *, int, int *,
-				    int));
-static void ftxfont_draw_backgrond P_ ((FRAME_PTR, struct font *, GC,
-					int, int, int));
+static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long);
+static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *,
+                                unsigned, int, int, XPoint *, int, int *,
+                                int);
+static void ftxfont_draw_backgrond (FRAME_PTR, struct font *, GC,
+                                    int, int, int);
 
 struct ftxfont_frame_data
 {
@@ -61,9 +61,7 @@
 /* Return an array of 6 GCs for antialiasing.  */
 
 static GC *
-ftxfont_get_gcs (f, foreground, background)
-     FRAME_PTR f;
-     unsigned long foreground, background;
+ftxfont_get_gcs (FRAME_PTR f, long unsigned int foreground, long unsigned int background)
 {
   XColor color;
   XGCValues xgcv;
@@ -140,15 +138,7 @@
 }
 
 static int
-ftxfont_draw_bitmap (f, gc_fore, gcs, font, code, x, y, p, size, n, flush)
-     FRAME_PTR f;
-     GC gc_fore, *gcs;
-     struct font *font;
-     unsigned code;
-     int x, y;
-     XPoint *p;
-     int size, *n;
-     int flush;
+ftxfont_draw_bitmap (FRAME_PTR f, GC gc_fore, GC *gcs, struct font *font, unsigned int code, int x, int y, XPoint *p, int size, int *n, int flush)
 {
   struct font_bitmap bitmap;
   unsigned char *b;
@@ -224,11 +214,7 @@
 }
 
 static void
-ftxfont_draw_backgrond (f, font, gc, x, y, width)
-     FRAME_PTR f;
-     struct font *font;
-     GC gc;
-     int x, y, width;
+ftxfont_draw_backgrond (FRAME_PTR f, struct font *font, GC gc, int x, int y, int width)
 {
   XGCValues xgcv;
 
@@ -241,18 +227,16 @@
 }
 
 /* Prototypes for font-driver methods.  */
-static Lisp_Object ftxfont_list P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object ftxfont_match P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object ftxfont_open P_ ((FRAME_PTR, Lisp_Object, int));
-static void ftxfont_close P_ ((FRAME_PTR, struct font *));
-static int ftxfont_draw P_ ((struct glyph_string *, int, int, int, int, int));
+static Lisp_Object ftxfont_list (Lisp_Object, Lisp_Object);
+static Lisp_Object ftxfont_match (Lisp_Object, Lisp_Object);
+static Lisp_Object ftxfont_open (FRAME_PTR, Lisp_Object, int);
+static void ftxfont_close (FRAME_PTR, struct font *);
+static int ftxfont_draw (struct glyph_string *, int, int, int, int, int);
 
 struct font_driver ftxfont_driver;
 
 static Lisp_Object
-ftxfont_list (frame, spec)
-     Lisp_Object frame;
-     Lisp_Object spec;
+ftxfont_list (Lisp_Object frame, Lisp_Object spec)
 {
   Lisp_Object list = ftfont_driver.list (frame, spec), tail;
   
@@ -262,9 +246,7 @@
 }
 
 static Lisp_Object
-ftxfont_match (frame, spec)
-     Lisp_Object frame;
-     Lisp_Object spec;
+ftxfont_match (Lisp_Object frame, Lisp_Object spec)
 {
   Lisp_Object entity = ftfont_driver.match (frame, spec);
 
@@ -274,10 +256,7 @@
 }
 
 static Lisp_Object
-ftxfont_open (f, entity, pixel_size)
-     FRAME_PTR f;
-     Lisp_Object entity;
-     int pixel_size;
+ftxfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
 {
   Lisp_Object font_object;
   struct font *font;
@@ -291,17 +270,13 @@
 }
 
 static void
-ftxfont_close (f, font)
-     FRAME_PTR f;
-     struct font *font;
+ftxfont_close (FRAME_PTR f, struct font *font)
 {
   ftfont_driver.close (f, font);
 }
 
 static int
-ftxfont_draw (s, from, to, x, y, with_background)
-     struct glyph_string *s;
-     int from, to, x, y, with_background;
+ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background)
 {
   FRAME_PTR f = s->f;
   struct face *face = s->face;
@@ -372,8 +347,7 @@
 }
 
 static int
-ftxfont_end_for_frame (f)
-     FRAME_PTR f;
+ftxfont_end_for_frame (FRAME_PTR f)
 {
   struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver);
   
@@ -396,7 +370,7 @@
 
 
 void
-syms_of_ftxfont ()
+syms_of_ftxfont (void)
 {
   DEFSYM (Qftx, "ftx");
 
--- a/src/getloadavg.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/getloadavg.c	Thu Jul 08 17:09:35 2010 +0900
@@ -713,7 +713,7 @@
       for (i = 0; i < conf.config_maxclass; ++i)
 	{
 	  struct class_stats stats;
-	  bzero ((char *) &stats, sizeof stats);
+	  memset (&stats, 0, sizeof stats);
 
 	  desc.sd_type = CPUTYPE_CLASS;
 	  desc.sd_objid = i;
--- a/src/gmalloc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/gmalloc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -1969,12 +1969,12 @@
 #endif
 
 /* Old hook values.  */
-static void (*old_free_hook) __P ((__ptr_t ptr));
-static __ptr_t (*old_malloc_hook) __P ((__malloc_size_t size));
-static __ptr_t (*old_realloc_hook) __P ((__ptr_t ptr, __malloc_size_t size));
+static void (*old_free_hook) (__ptr_t ptr);
+static __ptr_t (*old_malloc_hook) (__malloc_size_t size);
+static __ptr_t (*old_realloc_hook) (__ptr_t ptr, __malloc_size_t size);
 
 /* Function to call when something awful happens.  */
-static void (*abortfunc) __P ((enum mcheck_status));
+static void (*abortfunc) (enum mcheck_status);
 
 /* Arbitrary magical numbers.  */
 #define MAGICWORD	0xfedabeeb
@@ -1992,7 +1992,7 @@
 #if	defined(_LIBC) || defined(STDC_HEADERS) || defined(USG)
 #define flood memset
 #else
-static void flood __P ((__ptr_t, int, __malloc_size_t));
+static void flood (__ptr_t, int, __malloc_size_t);
 static void
 flood (ptr, val, size)
      __ptr_t ptr;
@@ -2005,7 +2005,7 @@
 }
 #endif
 
-static enum mcheck_status checkhdr __P ((const struct hdr *));
+static enum mcheck_status checkhdr (const struct hdr *);
 static enum mcheck_status
 checkhdr (hdr)
      const struct hdr *hdr;
@@ -2031,7 +2031,7 @@
   return status;
 }
 
-static void freehook __P ((__ptr_t));
+static void freehook (__ptr_t);
 static void
 freehook (ptr)
      __ptr_t ptr;
@@ -2053,7 +2053,7 @@
   __free_hook = freehook;
 }
 
-static __ptr_t mallochook __P ((__malloc_size_t));
+static __ptr_t mallochook (__malloc_size_t);
 static __ptr_t
 mallochook (size)
      __malloc_size_t size;
@@ -2073,7 +2073,7 @@
   return (__ptr_t) (hdr + 1);
 }
 
-static __ptr_t reallochook __P ((__ptr_t, __malloc_size_t));
+static __ptr_t reallochook (__ptr_t, __malloc_size_t);
 static __ptr_t
 reallochook (ptr, size)
      __ptr_t ptr;
@@ -2146,7 +2146,7 @@
 
 int
 mcheck (func)
-     void (*func) __P ((enum mcheck_status));
+     void (*func) (enum mcheck_status);
 {
   abortfunc = (func != NULL) ? func : &mabort;
 
--- a/src/gtkutil.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/gtkutil.c	Thu Jul 08 17:09:35 2010 +0900
@@ -85,9 +85,7 @@
    W can be a GtkMenu or a GtkWindow widget.  */
 
 static void
-xg_set_screen (w, f)
-     GtkWidget *w;
-     FRAME_PTR f;
+xg_set_screen (GtkWidget *w, FRAME_PTR f)
 {
   if (FRAME_X_DISPLAY (f) != GDK_DISPLAY ())
     {
@@ -110,9 +108,7 @@
    multipe displays.  */
 
 void
-xg_display_open (display_name, dpy)
-     char *display_name;
-     Display **dpy;
+xg_display_open (char *display_name, Display **dpy)
 {
   GdkDisplay *gdpy;
 
@@ -180,7 +176,7 @@
    Return a pointer to the allocated structure.  */
 
 widget_value *
-malloc_widget_value ()
+malloc_widget_value (void)
 {
   widget_value *wv;
   if (widget_value_free_list)
@@ -202,8 +198,7 @@
    by malloc_widget_value, and no substructures.  */
 
 void
-free_widget_value (wv)
-     widget_value *wv;
+free_widget_value (widget_value *wv)
 {
   if (wv->free_list)
     abort ();
@@ -227,8 +222,7 @@
    scroll bars on display DPY.  */
 
 GdkCursor *
-xg_create_default_cursor (dpy)
-     Display *dpy;
+xg_create_default_cursor (Display *dpy)
 {
   GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpy);
   return gdk_cursor_new_for_display (gdpy, GDK_LEFT_PTR);
@@ -237,10 +231,9 @@
 /* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel.  */
 
 static GdkPixbuf *
-xg_get_pixbuf_from_pix_and_mask (gpix, gmask, cmap)
-     GdkPixmap *gpix;
-     GdkPixmap *gmask;
-     GdkColormap *cmap;
+xg_get_pixbuf_from_pix_and_mask (GdkPixmap *gpix,
+                                 GdkPixmap *gmask,
+                                 GdkColormap *cmap)
 {
   int width, height;
   GdkPixbuf *icon_buf, *tmp_buf;
@@ -291,8 +284,7 @@
 }
 
 static Lisp_Object
-file_for_image (image)
-     Lisp_Object image;
+file_for_image (Lisp_Object image)
 {
   Lisp_Object specified_file = Qnil;
   Lisp_Object tail;
@@ -319,11 +311,10 @@
    If OLD_WIDGET is not NULL, that widget is modified.  */
 
 static GtkWidget *
-xg_get_image_for_pixmap (f, img, widget, old_widget)
-     FRAME_PTR f;
-     struct image *img;
-     GtkWidget *widget;
-     GtkImage *old_widget;
+xg_get_image_for_pixmap (FRAME_PTR f,
+                         struct image *img,
+                         GtkWidget *widget,
+                         GtkImage *old_widget)
 {
   GdkPixmap *gpix;
   GdkPixmap *gmask;
@@ -391,9 +382,7 @@
    and it is those widgets that are visible.  */
 
 static void
-xg_set_cursor (w, cursor)
-     GtkWidget *w;
-     GdkCursor *cursor;
+xg_set_cursor (GtkWidget *w, GdkCursor *cursor)
 {
   GdkWindow *window = gtk_widget_get_window(w);
   GList *children = gdk_window_peek_children (window);
@@ -446,8 +435,7 @@
    with g_free.  */
 
 static char *
-get_utf8_string (str)
-     char *str;
+get_utf8_string (char *str)
 {
   char *utf8_str = str;
 
@@ -526,8 +514,7 @@
    F is the frame we shall set geometry for.  */
 
 static void
-xg_set_geometry (f)
-     FRAME_PTR f;
+xg_set_geometry (FRAME_PTR f)
 {
   if (f->size_hint_flags & (USPosition | PPosition))
     {
@@ -558,8 +545,7 @@
    and use a GtkFixed widget, this doesn't happen automatically.  */
 
 static void
-xg_clear_under_internal_border (f)
-     FRAME_PTR f;
+xg_clear_under_internal_border (FRAME_PTR f)
 {
   if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0)
     {
@@ -597,9 +583,7 @@
    PIXELWIDTH, PIXELHEIGHT is the new size in pixels.  */
 
 void
-xg_frame_resized (f, pixelwidth, pixelheight)
-     FRAME_PTR f;
-     int pixelwidth, pixelheight;
+xg_frame_resized (FRAME_PTR f, int pixelwidth, int pixelheight)
 {
   int rows, columns;
 
@@ -635,10 +619,7 @@
    COLUMNS/ROWS is the size the edit area shall have after the resize.  */
 
 void
-xg_frame_set_char_size (f, cols, rows)
-     FRAME_PTR f;
-     int cols;
-     int rows;
+xg_frame_set_char_size (FRAME_PTR f, int cols, int rows)
 {
   int pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows)
     + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
@@ -700,8 +681,7 @@
    The policy is to keep the number of editable lines.  */
 
 static void
-xg_height_changed (f)
-     FRAME_PTR f;
+xg_height_changed (FRAME_PTR f)
 {
   gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
                      FRAME_PIXEL_WIDTH (f), FRAME_TOTAL_PIXEL_HEIGHT (f));
@@ -716,9 +696,7 @@
    Return 0 if no widget match WDESC.  */
 
 GtkWidget *
-xg_win_to_widget (dpy, wdesc)
-     Display *dpy;
-     Window wdesc;
+xg_win_to_widget (Display *dpy, Window wdesc)
 {
   gpointer gdkwin;
   GtkWidget *gwdesc = 0;
@@ -742,10 +720,7 @@
    W is the widget that color will be used for.  Used to find colormap.  */
 
 static void
-xg_pix_to_gcolor (w, pixel, c)
-     GtkWidget *w;
-     unsigned long pixel;
-     GdkColor *c;
+xg_pix_to_gcolor (GtkWidget *w, long unsigned int pixel, GdkColor *c)
 {
   GdkColormap *map = gtk_widget_get_colormap (w);
   gdk_colormap_query_color (map, pixel, c);
@@ -755,8 +730,7 @@
    Return 0 if creation failed, non-zero otherwise.  */
 
 int
-xg_create_frame_widgets (f)
-     FRAME_PTR f;
+xg_create_frame_widgets (FRAME_PTR f)
 {
   GtkWidget *wtop;
   GtkWidget *wvbox;
@@ -882,10 +856,7 @@
    flag (this is useful when FLAGS is 0).  */
 
 void
-x_wm_set_size_hint (f, flags, user_position)
-     FRAME_PTR f;
-     long flags;
-     int user_position;
+x_wm_set_size_hint (FRAME_PTR f, long int flags, int user_position)
 {
   /* Must use GTK routines here, otherwise GTK resets the size hints
      to its own defaults.  */
@@ -981,9 +952,7 @@
    BG is the pixel value to change to.  */
 
 void
-xg_set_background_color (f, bg)
-     FRAME_PTR f;
-     unsigned long bg;
+xg_set_background_color (FRAME_PTR f, long unsigned int bg)
 {
   if (FRAME_GTK_WIDGET (f))
     {
@@ -1001,10 +970,7 @@
    functions so GTK does not overwrite the icon.  */
 
 void
-xg_set_frame_icon (f, icon_pixmap, icon_mask)
-     FRAME_PTR f;
-     Pixmap icon_pixmap;
-     Pixmap icon_mask;
+xg_set_frame_icon (FRAME_PTR f, Pixmap icon_pixmap, Pixmap icon_mask)
 {
     GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
     GdkPixmap *gpix = gdk_pixmap_foreign_new_for_display (gdpy, icon_pixmap);
@@ -1064,10 +1030,7 @@
    Returns TRUE to end propagation of event.  */
 
 static gboolean
-dialog_delete_callback (w, event, user_data)
-     GtkWidget *w;
-     GdkEvent *event;
-     gpointer user_data;
+dialog_delete_callback (GtkWidget *w, GdkEvent *event, gpointer user_data)
 {
   gtk_widget_unmap (w);
   return TRUE;
@@ -1081,10 +1044,9 @@
    Returns the GTK dialog widget.  */
 
 static GtkWidget *
-create_dialog (wv, select_cb, deactivate_cb)
-     widget_value *wv;
-     GCallback select_cb;
-     GCallback deactivate_cb;
+create_dialog (widget_value *wv,
+               GCallback select_cb,
+               GCallback deactivate_cb)
 {
   char *title = get_dialog_title (wv->name[0]);
   int total_buttons = wv->name[1] - '0';
@@ -1199,12 +1161,9 @@
    USER_DATA is what we passed in to g_signal_connect.  */
 
 static void
-xg_dialog_response_cb (w,
-                       response,
-                       user_data)
-     GtkDialog *w;
-     gint response;
-     gpointer user_data;
+xg_dialog_response_cb (GtkDialog *w,
+		       gint response,
+		       gpointer user_data)
 {
   struct xg_dialog_data *dd = (struct xg_dialog_data *)user_data;
   dd->response = response;
@@ -1215,8 +1174,7 @@
 /*  Destroy the dialog.  This makes it pop down.  */
 
 static Lisp_Object
-pop_down_dialog (arg)
-     Lisp_Object arg;
+pop_down_dialog (Lisp_Object arg)
 {
   struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
   struct xg_dialog_data *dd = (struct xg_dialog_data *) p->pointer;
@@ -1237,8 +1195,7 @@
     We pass in DATA as gpointer* so we can use this as a callback.  */
 
 static gboolean
-xg_maybe_add_timer (data)
-     gpointer data;
+xg_maybe_add_timer (gpointer data)
 {
   struct xg_dialog_data *dd = (struct xg_dialog_data *) data;
   EMACS_TIME next_time = timer_check (1);
@@ -1262,10 +1219,7 @@
    The dialog W is not destroyed when this function returns.  */
 
 static int
-xg_dialog_run (f, w)
-     FRAME_PTR f;
-     GtkWidget *w;
-
+xg_dialog_run (FRAME_PTR f, GtkWidget *w)
 {
   int count = SPECPDL_INDEX ();
   struct xg_dialog_data dd;
@@ -1308,7 +1262,7 @@
    Return zero if not.  */
 
 int
-xg_uses_old_file_dialog ()
+xg_uses_old_file_dialog (void)
 {
 #ifdef HAVE_GTK_FILE_SELECTION_NEW
   extern int x_gtk_use_old_file_dialog;
@@ -1319,14 +1273,13 @@
 }
 
 
-typedef char * (*xg_get_file_func) P_ ((GtkWidget *));
+typedef char * (*xg_get_file_func) (GtkWidget *);
 
 /* Return the selected file for file chooser dialog W.
    The returned string must be free:d.  */
 
 static char *
-xg_get_file_name_from_chooser (w)
-     GtkWidget *w;
+xg_get_file_name_from_chooser (GtkWidget *w)
 {
   return gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (w));
 }
@@ -1335,9 +1288,7 @@
    WIDGET is the toggle widget, DATA is the file chooser dialog.  */
 
 static void
-xg_toggle_visibility_cb (widget, data)
-     GtkWidget *widget;
-     gpointer data;
+xg_toggle_visibility_cb (GtkWidget *widget, gpointer data)
 {
   GtkFileChooser *dialog = GTK_FILE_CHOOSER (data);
   gboolean visible;
@@ -1353,10 +1304,7 @@
    changes that property by right clicking in the file list.  */
 
 static void
-xg_toggle_notify_cb (gobject, arg1, user_data)
-     GObject *gobject;
-     GParamSpec *arg1;
-     gpointer user_data;
+xg_toggle_notify_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data)
 {
   extern int x_gtk_show_hidden_files;
 
@@ -1394,13 +1342,11 @@
    Returns the created widget.  */
 
 static GtkWidget *
-xg_get_file_with_chooser (f, prompt, default_filename,
-                          mustmatch_p, only_dir_p, func)
-     FRAME_PTR f;
-     char *prompt;
-     char *default_filename;
-     int mustmatch_p, only_dir_p;
-     xg_get_file_func *func;
+xg_get_file_with_chooser (FRAME_PTR f,
+			  char *prompt,
+			  char *default_filename,
+			  int mustmatch_p, int only_dir_p,
+			  xg_get_file_func *func)
 {
   char message[1024];
 
@@ -1503,8 +1449,7 @@
    The returned string must be free:d.  */
 
 static char *
-xg_get_file_name_from_selector (w)
-     GtkWidget *w;
+xg_get_file_name_from_selector (GtkWidget *w)
 {
   GtkFileSelection *filesel = GTK_FILE_SELECTION (w);
   return xstrdup ((char*) gtk_file_selection_get_filename (filesel));
@@ -1521,13 +1466,11 @@
    Returns the created widget.  */
 
 static GtkWidget *
-xg_get_file_with_selection (f, prompt, default_filename,
-                            mustmatch_p, only_dir_p, func)
-     FRAME_PTR f;
-     char *prompt;
-     char *default_filename;
-     int mustmatch_p, only_dir_p;
-     xg_get_file_func *func;
+xg_get_file_with_selection (FRAME_PTR f,
+                            char *prompt,
+                            char *default_filename,
+                            int mustmatch_p, int only_dir_p,
+                            xg_get_file_func *func)
 {
   GtkWidget *filewin;
   GtkFileSelection *filesel;
@@ -1565,11 +1508,11 @@
    The returned string must be freed by the caller.  */
 
 char *
-xg_get_file_name (f, prompt, default_filename, mustmatch_p, only_dir_p)
-     FRAME_PTR f;
-     char *prompt;
-     char *default_filename;
-     int mustmatch_p, only_dir_p;
+xg_get_file_name (FRAME_PTR f,
+                  char *prompt,
+                  char *default_filename,
+                  int mustmatch_p,
+                  int only_dir_p)
 {
   GtkWidget *w = 0;
   char *fn = 0;
@@ -1623,9 +1566,7 @@
    DEFAULT_NAME, if non-zero, is the default font name.  */
 
 char *
-xg_get_font_name (f, default_name)
-     FRAME_PTR f;
-     char *default_name;
+xg_get_font_name (FRAME_PTR f, char *default_name)
 {
   GtkWidget *w;
   char *fontname = NULL;
@@ -1690,10 +1631,7 @@
    allocated xg_menu_cb_data if CL_DATA is NULL.  */
 
 static xg_menu_cb_data *
-make_cl_data (cl_data, f, highlight_cb)
-     xg_menu_cb_data *cl_data;
-     FRAME_PTR f;
-     GCallback highlight_cb;
+make_cl_data (xg_menu_cb_data *cl_data, FRAME_PTR f, GCallback highlight_cb)
 {
   if (! cl_data)
     {
@@ -1724,10 +1662,9 @@
    creating the menu bar.  */
 
 static void
-update_cl_data (cl_data, f, highlight_cb)
-     xg_menu_cb_data *cl_data;
-     FRAME_PTR f;
-     GCallback highlight_cb;
+update_cl_data (xg_menu_cb_data *cl_data,
+                FRAME_PTR f,
+                GCallback highlight_cb)
 {
   if (cl_data)
     {
@@ -1742,8 +1679,7 @@
    If reference count is zero, free CL_DATA.  */
 
 static void
-unref_cl_data (cl_data)
-     xg_menu_cb_data *cl_data;
+unref_cl_data (xg_menu_cb_data *cl_data)
 {
   if (cl_data && cl_data->ref_count > 0)
     {
@@ -1759,7 +1695,7 @@
 /* Function that marks all lisp data during GC.  */
 
 void
-xg_mark_data ()
+xg_mark_data (void)
 {
   xg_list_node *iter;
 
@@ -1781,9 +1717,7 @@
    CLIENT_DATA points to the xg_menu_item_cb_data associated with the W.  */
 
 static void
-menuitem_destroy_callback (w, client_data)
-     GtkWidget *w;
-     gpointer client_data;
+menuitem_destroy_callback (GtkWidget *w, gpointer client_data)
 {
   if (client_data)
     {
@@ -1801,10 +1735,9 @@
    Returns FALSE to tell GTK to keep processing this event.  */
 
 static gboolean
-menuitem_highlight_callback (w, event, client_data)
-     GtkWidget *w;
-     GdkEventCrossing *event;
-     gpointer client_data;
+menuitem_highlight_callback (GtkWidget *w,
+                             GdkEventCrossing *event,
+                             gpointer client_data)
 {
   GdkEvent ev;
   GtkWidget *subwidget;
@@ -1832,9 +1765,7 @@
    CLIENT_DATA points to the xg_menu_cb_data associated with W.  */
 
 static void
-menu_destroy_callback (w, client_data)
-     GtkWidget *w;
-     gpointer client_data;
+menu_destroy_callback (GtkWidget *w, gpointer client_data)
 {
   unref_cl_data ((xg_menu_cb_data*) client_data);
 }
@@ -1845,9 +1776,7 @@
    Returns the GtkHBox.  */
 
 static GtkWidget *
-make_widget_for_menu_item (utf8_label, utf8_key)
-     char *utf8_label;
-     char *utf8_key;
+make_widget_for_menu_item (char *utf8_label, char *utf8_key)
 {
   GtkWidget *wlbl;
   GtkWidget *wkey;
@@ -1885,11 +1814,10 @@
    but the MacOS X version doesn't either, so I guess that is OK.  */
 
 static GtkWidget *
-make_menu_item (utf8_label, utf8_key, item, group)
-     char *utf8_label;
-     char *utf8_key;
-     widget_value *item;
-     GSList **group;
+make_menu_item (char *utf8_label,
+                char *utf8_key,
+                widget_value *item,
+                GSList **group)
 {
   GtkWidget *w;
   GtkWidget *wtoadd = 0;
@@ -1984,7 +1912,7 @@
 /* Returns non-zero if there are detached menus.  */
 
 int
-xg_have_tear_offs ()
+xg_have_tear_offs (void)
 {
   return xg_detached_menus > 0;
 }
@@ -1995,9 +1923,7 @@
    CLIENT_DATA is not used.  */
 
 static void
-tearoff_remove (widget, client_data)
-     GtkWidget *widget;
-     gpointer client_data;
+tearoff_remove (GtkWidget *widget, gpointer client_data)
 {
   if (xg_detached_menus > 0) --xg_detached_menus;
 }
@@ -2008,9 +1934,7 @@
    CLIENT_DATA is not used.  */
 
 static void
-tearoff_activate (widget, client_data)
-     GtkWidget *widget;
-     gpointer client_data;
+tearoff_activate (GtkWidget *widget, gpointer client_data)
 {
   GtkWidget *menu = gtk_widget_get_parent (widget);
   if (gtk_menu_get_tearoff_state (GTK_MENU (menu)))
@@ -2038,13 +1962,12 @@
    Returns the created GtkWidget.  */
 
 static GtkWidget *
-xg_create_one_menuitem (item, f, select_cb, highlight_cb, cl_data, group)
-     widget_value *item;
-     FRAME_PTR f;
-     GCallback select_cb;
-     GCallback highlight_cb;
-     xg_menu_cb_data *cl_data;
-     GSList **group;
+xg_create_one_menuitem (widget_value *item,
+                        FRAME_PTR f,
+                        GCallback select_cb,
+                        GCallback highlight_cb,
+                        xg_menu_cb_data *cl_data,
+                        GSList **group)
 {
   char *utf8_label;
   char *utf8_key;
@@ -2087,10 +2010,6 @@
   return w;
 }
 
-static GtkWidget *create_menus P_ ((widget_value *, FRAME_PTR, GCallback,
-				    GCallback, GCallback, int, int, int,
-				    GtkWidget *, xg_menu_cb_data *, char *));
-
 /* Create a full menu tree specified by DATA.
    F is the frame the created menu belongs to.
    SELECT_CB is the callback to use when a menu item is selected.
@@ -2114,19 +2033,17 @@
    This function calls itself to create submenus.  */
 
 static GtkWidget *
-create_menus (data, f, select_cb, deactivate_cb, highlight_cb,
-              pop_up_p, menu_bar_p, add_tearoff_p, topmenu, cl_data, name)
-     widget_value *data;
-     FRAME_PTR f;
-     GCallback select_cb;
-     GCallback deactivate_cb;
-     GCallback highlight_cb;
-     int pop_up_p;
-     int menu_bar_p;
-     int add_tearoff_p;
-     GtkWidget *topmenu;
-     xg_menu_cb_data *cl_data;
-     char *name;
+create_menus (widget_value *data,
+              FRAME_PTR f,
+              GCallback select_cb,
+              GCallback deactivate_cb,
+              GCallback highlight_cb,
+              int pop_up_p,
+              int menu_bar_p,
+              int add_tearoff_p,
+              GtkWidget *topmenu,
+              xg_menu_cb_data *cl_data,
+              char *name)
 {
   widget_value *item;
   GtkWidget *wmenu = topmenu;
@@ -2317,8 +2234,7 @@
 /* Return the label for menu item WITEM.  */
 
 static const char *
-xg_get_menu_item_label (witem)
-     GtkMenuItem *witem;
+xg_get_menu_item_label (GtkMenuItem *witem)
 {
   GtkLabel *wlabel = GTK_LABEL (gtk_bin_get_child (GTK_BIN (witem)));
   return gtk_label_get_label (wlabel);
@@ -2327,9 +2243,7 @@
 /* Return non-zero if the menu item WITEM has the text LABEL.  */
 
 static int
-xg_item_label_same_p (witem, label)
-     GtkMenuItem *witem;
-     char *label;
+xg_item_label_same_p (GtkMenuItem *witem, char *label)
 {
   int is_same = 0;
   char *utf8_label = get_utf8_string (label);
@@ -2348,8 +2262,7 @@
 /* Destroy widgets in LIST.  */
 
 static void
-xg_destroy_widgets (list)
-     GList *list;
+xg_destroy_widgets (GList *list)
 {
   GList *iter;
 
@@ -2375,18 +2288,16 @@
    This function calls itself to walk through the menu bar names.  */
 
 static void
-xg_update_menubar (menubar, f, list, iter, pos, val,
-                   select_cb, deactivate_cb, highlight_cb, cl_data)
-     GtkWidget *menubar;
-     FRAME_PTR f;
-     GList **list;
-     GList *iter;
-     int pos;
-     widget_value *val;
-     GCallback select_cb;
-     GCallback deactivate_cb;
-     GCallback highlight_cb;
-     xg_menu_cb_data *cl_data;
+xg_update_menubar (GtkWidget *menubar,
+		   FRAME_PTR f,
+		   GList **list,
+		   GList *iter,
+		   int pos,
+		   widget_value *val,
+		   GCallback select_cb,
+		   GCallback deactivate_cb,
+		   GCallback highlight_cb,
+		   xg_menu_cb_data *cl_data)
 {
   if (! iter && ! val)
     return;
@@ -2502,7 +2413,7 @@
               Insert X.  */
 
           int nr = pos;
-          GList *group = 0;
+          GSList *group = 0;
           GtkWidget *w = xg_create_one_menuitem (val,
                                                  f,
                                                  select_cb,
@@ -2561,12 +2472,11 @@
    CL_DATA is the data to set in the widget for menu invocation.  */
 
 static void
-xg_update_menu_item (val, w, select_cb, highlight_cb, cl_data)
-     widget_value *val;
-     GtkWidget *w;
-     GCallback select_cb;
-     GCallback highlight_cb;
-     xg_menu_cb_data *cl_data;
+xg_update_menu_item (widget_value *val,
+                     GtkWidget *w,
+                     GCallback select_cb,
+                     GCallback highlight_cb,
+                     xg_menu_cb_data *cl_data)
 {
   GtkWidget *wchild;
   GtkLabel *wlbl = 0;
@@ -2666,9 +2576,7 @@
 /* Update the toggle menu item W so it corresponds to VAL.  */
 
 static void
-xg_update_toggle_item (val, w)
-     widget_value *val;
-     GtkWidget *w;
+xg_update_toggle_item (widget_value *val, GtkWidget *w)
 {
   gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (w), val->selected);
 }
@@ -2676,9 +2584,7 @@
 /* Update the radio menu item W so it corresponds to VAL.  */
 
 static void
-xg_update_radio_item (val, w)
-     widget_value *val;
-     GtkWidget *w;
+xg_update_radio_item (widget_value *val, GtkWidget *w)
 {
   gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (w), val->selected);
 }
@@ -2696,15 +2602,13 @@
    was NULL.  */
 
 static GtkWidget *
-xg_update_submenu (submenu, f, val,
-                   select_cb, deactivate_cb, highlight_cb, cl_data)
-     GtkWidget *submenu;
-     FRAME_PTR f;
-     widget_value *val;
-     GCallback select_cb;
-     GCallback deactivate_cb;
-     GCallback highlight_cb;
-     xg_menu_cb_data *cl_data;
+xg_update_submenu (GtkWidget *submenu,
+		   FRAME_PTR f,
+		   widget_value *val,
+		   GCallback select_cb,
+		   GCallback deactivate_cb,
+		   GCallback highlight_cb,
+		   xg_menu_cb_data *cl_data)
 {
   GtkWidget *newsub = submenu;
   GList *list = 0;
@@ -2876,7 +2780,7 @@
           GList *iter;
           GtkWidget *sub = 0;
           GtkWidget *newsub;
-          GtkMenuItem *witem;
+          GtkMenuItem *witem = 0;
 
           /* Find sub menu that corresponds to val and update it.  */
           for (iter = list ; iter; iter = g_list_next (iter))
@@ -2899,7 +2803,7 @@
           /* sub may still be NULL.  If we just updated non deep and added
              a new menu bar item, it has no sub menu yet.  So we set the
              newly created sub menu under witem.  */
-          if (newsub != sub)
+          if (newsub != sub && witem != 0)
             {
               xg_set_screen (newsub, f);
               gtk_menu_item_set_submenu (witem, newsub);
@@ -2915,8 +2819,7 @@
    changed.  Value is non-zero if widgets were updated.  */
 
 int
-xg_update_frame_menubar (f)
-     FRAME_PTR f;
+xg_update_frame_menubar (FRAME_PTR f)
 {
   struct x_output *x = f->output_data.x;
   GtkRequisition req;
@@ -2946,8 +2849,7 @@
    This is used when deleting a frame, and when turning off the menu bar.  */
 
 void
-free_frame_menubar (f)
-     FRAME_PTR f;
+free_frame_menubar (FRAME_PTR f)
 {
   struct x_output *x = f->output_data.x;
 
@@ -2995,8 +2897,7 @@
 /* Store the widget pointer W in id_to_widget and return the integer index.  */
 
 static int
-xg_store_widget_in_map (w)
-     GtkWidget *w;
+xg_store_widget_in_map (GtkWidget *w)
 {
   int i;
 
@@ -3034,8 +2935,7 @@
    Called when scroll bar is destroyed.  */
 
 static void
-xg_remove_widget_from_map (idx)
-     int idx;
+xg_remove_widget_from_map (int idx)
 {
   if (idx < id_to_widget.max_size && id_to_widget.widgets[idx] != 0)
     {
@@ -3047,8 +2947,7 @@
 /* Get the widget pointer at IDX from id_to_widget. */
 
 static GtkWidget *
-xg_get_widget_from_map (idx)
-     int idx;
+xg_get_widget_from_map (int idx)
 {
   if (idx < id_to_widget.max_size && id_to_widget.widgets[idx] != 0)
     return id_to_widget.widgets[idx];
@@ -3060,9 +2959,7 @@
    Return -1 if WID not in id_to_widget.  */
 
 int
-xg_get_scroll_id_for_window (dpy, wid)
-     Display *dpy;
-     Window wid;
+xg_get_scroll_id_for_window (Display *dpy, Window wid)
 {
   int idx;
   GtkWidget *w;
@@ -3084,9 +2981,7 @@
    We free pointer to last scroll bar values here and remove the index.  */
 
 static void
-xg_gtk_scroll_destroy (widget, data)
-     GtkWidget *widget;
-     gpointer data;
+xg_gtk_scroll_destroy (GtkWidget *widget, gpointer data)
 {
   int id = (int) (EMACS_INT) data; /* The EMACS_INT cast avoids a warning. */
   xg_remove_widget_from_map (id);
@@ -3101,11 +2996,11 @@
    to set resources for the widget.  */
 
 void
-xg_create_scroll_bar (f, bar, scroll_callback, end_callback, scroll_bar_name)
-     FRAME_PTR f;
-     struct scroll_bar *bar;
-     GCallback scroll_callback, end_callback;
-     char *scroll_bar_name;
+xg_create_scroll_bar (FRAME_PTR f,
+                      struct scroll_bar *bar,
+                      GCallback scroll_callback,
+                      GCallback end_callback,
+                      char *scroll_bar_name)
 {
   GtkWidget *wscroll;
   GtkWidget *webox;
@@ -3158,9 +3053,7 @@
 /* Remove the scroll bar represented by SCROLLBAR_ID from the frame F.  */
 
 void
-xg_remove_scroll_bar (f, scrollbar_id)
-     FRAME_PTR f;
-     int scrollbar_id;
+xg_remove_scroll_bar (FRAME_PTR f, int scrollbar_id)
 {
   GtkWidget *w = xg_get_widget_from_map (scrollbar_id);
   if (w)
@@ -3178,13 +3071,12 @@
    WIDTH, HEIGHT is the size in pixels the bar shall have.  */
 
 void
-xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height)
-     FRAME_PTR f;
-     int scrollbar_id;
-     int top;
-     int left;
-     int width;
-     int height;
+xg_update_scrollbar_pos (FRAME_PTR f,
+                         int scrollbar_id,
+                         int top,
+                         int left,
+                         int width,
+                         int height)
 {
 
   GtkWidget *wscroll = xg_get_widget_from_map (scrollbar_id);
@@ -3245,9 +3137,10 @@
    displaying PORTION out of a whole WHOLE, and our position POSITION.  */
 
 void
-xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
-     struct scroll_bar *bar;
-     int portion, position, whole;
+xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
+                                 int portion,
+                                 int position,
+                                 int whole)
 {
   GtkWidget *wscroll = xg_get_widget_from_map (bar->x_window);
 
@@ -3329,9 +3222,7 @@
    Return non-zero if the event is for a scroll bar, zero otherwise.  */
 
 int
-xg_event_is_for_scrollbar (f, event)
-     FRAME_PTR f;
-     XEvent *event;
+xg_event_is_for_scrollbar (FRAME_PTR f, XEvent *event)
 {
   int retval = 0;
 
@@ -3386,10 +3277,9 @@
    tool bar.  0 is the first button.  */
 
 static gboolean
-xg_tool_bar_button_cb (widget, event, user_data)
-    GtkWidget      *widget;
-    GdkEventButton *event;
-    gpointer        user_data;
+xg_tool_bar_button_cb (GtkWidget *widget,
+                       GdkEventButton *event,
+                       gpointer user_data)
 {
   /* Casts to avoid warnings when gpointer is 64 bits and int is 32 bits */
   gpointer ptr = (gpointer) (EMACS_INT) event->state;
@@ -3404,9 +3294,7 @@
    tool bar.  0 is the first button.  */
 
 static void
-xg_tool_bar_callback (w, client_data)
-     GtkWidget *w;
-     gpointer client_data;
+xg_tool_bar_callback (GtkWidget *w, gpointer client_data)
 {
   /* The EMACS_INT cast avoids a warning. */
   int idx = (int) (EMACS_INT) client_data;
@@ -3455,9 +3343,7 @@
    tool bar.  0 is the first button.  */
 
 static void
-xg_tool_bar_proxy_callback (w, client_data)
-     GtkWidget *w;
-     gpointer client_data;
+xg_tool_bar_proxy_callback (GtkWidget *w, gpointer client_data)
 {
   GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w),
                                                       XG_TOOL_BAR_PROXY_BUTTON));
@@ -3466,18 +3352,17 @@
 
 
 static gboolean
-xg_tool_bar_help_callback P_ ((GtkWidget *w,
-                               GdkEventCrossing *event,
-                               gpointer client_data));
+xg_tool_bar_help_callback (GtkWidget *w,
+                           GdkEventCrossing *event,
+                           gpointer client_data);
 
 /* This callback is called when a help is to be shown for an item in
    the detached tool bar when the detached tool bar it is not expanded.  */
 
 static gboolean
-xg_tool_bar_proxy_help_callback (w, event, client_data)
-     GtkWidget *w;
-     GdkEventCrossing *event;
-     gpointer client_data;
+xg_tool_bar_proxy_help_callback (GtkWidget *w,
+                                 GdkEventCrossing *event,
+                                 gpointer client_data)
 {
   GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w),
                                                       XG_TOOL_BAR_PROXY_BUTTON));
@@ -3503,9 +3388,7 @@
    blank.  */
 
 static gboolean
-xg_tool_bar_menu_proxy (toolitem, user_data)
-     GtkToolItem *toolitem;
-     gpointer user_data;
+xg_tool_bar_menu_proxy (GtkToolItem *toolitem, gpointer user_data)
 {
   GtkWidget *weventbox = gtk_bin_get_child (GTK_BIN (toolitem));
   GtkButton *wbutton = GTK_BUTTON (gtk_bin_get_child (GTK_BIN (weventbox)));
@@ -3615,10 +3498,9 @@
    CLIENT_DATA is a pointer to the frame the tool bar belongs to.  */
 
 static void
-xg_tool_bar_detach_callback (wbox, w, client_data)
-     GtkHandleBox *wbox;
-     GtkWidget *w;
-     gpointer client_data;
+xg_tool_bar_detach_callback (GtkHandleBox *wbox,
+                             GtkWidget *w,
+                             gpointer client_data)
 {
   FRAME_PTR f = (FRAME_PTR) client_data;
   extern int x_gtk_whole_detached_tool_bar;
@@ -3646,10 +3528,9 @@
    CLIENT_DATA is a pointer to the frame the tool bar belongs to.  */
 
 static void
-xg_tool_bar_attach_callback (wbox, w, client_data)
-     GtkHandleBox *wbox;
-     GtkWidget *w;
-     gpointer client_data;
+xg_tool_bar_attach_callback (GtkHandleBox *wbox,
+                             GtkWidget *w,
+                             gpointer client_data)
 {
   FRAME_PTR f = (FRAME_PTR) client_data;
   g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL);
@@ -3676,10 +3557,9 @@
    Returns FALSE to tell GTK to keep processing this event.  */
 
 static gboolean
-xg_tool_bar_help_callback (w, event, client_data)
-     GtkWidget *w;
-     GdkEventCrossing *event;
-     gpointer client_data;
+xg_tool_bar_help_callback (GtkWidget *w,
+                           GdkEventCrossing *event,
+                           gpointer client_data)
 {
   /* The EMACS_INT cast avoids a warning. */
   int idx = (int) (EMACS_INT) client_data;
@@ -3718,10 +3598,9 @@
    Returns FALSE to tell GTK to keep processing this event.  */
 
 static gboolean
-xg_tool_bar_item_expose_callback (w, event, client_data)
-     GtkWidget *w;
-     GdkEventExpose *event;
-     gpointer client_data;
+xg_tool_bar_item_expose_callback (GtkWidget *w,
+                                  GdkEventExpose *event,
+                                  gpointer client_data)
 {
   gint width, height;
 
@@ -3742,8 +3621,7 @@
 /* Attach a tool bar to frame F.  */
 
 static void
-xg_pack_tool_bar (f)
-     FRAME_PTR f;
+xg_pack_tool_bar (FRAME_PTR f)
 {
   struct x_output *x = f->output_data.x;
   int vbox_pos = x->menubar_widget ? 1 : 0;
@@ -3777,8 +3655,7 @@
 #endif
 
 static void
-xg_create_tool_bar (f)
-     FRAME_PTR f;
+xg_create_tool_bar (FRAME_PTR f)
 {
   struct x_output *x = f->output_data.x;
 
@@ -3799,10 +3676,7 @@
    Returns IMAGE if RTL is not found.  */
 
 static Lisp_Object
-find_rtl_image (f, image, rtl)
-     FRAME_PTR f;
-     Lisp_Object image;
-     Lisp_Object rtl;
+find_rtl_image (FRAME_PTR f, Lisp_Object image, Lisp_Object rtl)
 {
   int i;
   Lisp_Object file, rtl_name;
@@ -3955,8 +3829,7 @@
 extern Lisp_Object Qx_gtk_map_stock;
 
 void
-update_frame_tool_bar (f)
-     FRAME_PTR f;
+update_frame_tool_bar (FRAME_PTR f)
 {
   int i;
   GtkRequisition old_req, new_req;
@@ -4020,7 +3893,6 @@
       GtkWidget *wbutton = NULL;
       GtkWidget *weventbox;
       Lisp_Object specified_file;
-      Lisp_Object lbl = PROP (TOOL_BAR_ITEM_LABEL);
       char *label = SSDATA (PROP (TOOL_BAR_ITEM_LABEL));
       
       ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), i);
@@ -4191,7 +4063,8 @@
             }
           else if (img && old_img != img->pixmap)
             {
-              (void) xg_get_image_for_pixmap (f, img, x->widget, wimage);
+              (void) xg_get_image_for_pixmap (f, img, x->widget,
+                                              GTK_IMAGE (wimage));
               g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_IMAGE_DATA,
                                  (gpointer)img->pixmap);
 
@@ -4237,8 +4110,7 @@
    Remove the tool bar.  */
 
 void
-free_frame_tool_bar (f)
-     FRAME_PTR f;
+free_frame_tool_bar (FRAME_PTR f)
 {
   struct x_output *x = f->output_data.x;
 
@@ -4269,7 +4141,7 @@
                       Initializing
 ***********************************************************************/
 void
-xg_initialize ()
+xg_initialize (void)
 {
   GtkBindingSet *binding_set;
 
--- a/src/gtkutil.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/gtkutil.h	Thu Jul 08 17:09:35 2010 +0900
@@ -122,89 +122,89 @@
 extern int use_old_gtk_file_dialog;
 #endif
 
-extern widget_value *malloc_widget_value P_ ((void));
-extern void free_widget_value P_ ((widget_value *));
+extern widget_value *malloc_widget_value (void);
+extern void free_widget_value (widget_value *);
 
-extern int xg_uses_old_file_dialog P_ ((void));
+extern int xg_uses_old_file_dialog (void);
 
-extern char *xg_get_file_name P_ ((FRAME_PTR f,
-                                   char *prompt,
-                                   char *default_filename,
-                                   int mustmatch_p,
-                                   int only_dir_p));
+extern char *xg_get_file_name (FRAME_PTR f,
+                               char *prompt,
+                               char *default_filename,
+                               int mustmatch_p,
+                               int only_dir_p);
 
-extern char *xg_get_font_name P_ ((FRAME_PTR f, char *));
+extern char *xg_get_font_name (FRAME_PTR f, char *);
 
-extern GtkWidget *xg_create_widget P_ ((char *type,
-                                        char *name,
-                                        FRAME_PTR f,
-                                        widget_value *val,
-                                        GCallback select_cb,
-                                        GCallback deactivate_cb,
-                                        GCallback hightlight_cb));
+extern GtkWidget *xg_create_widget (char *type,
+                                    char *name,
+                                    FRAME_PTR f,
+                                    widget_value *val,
+                                    GCallback select_cb,
+                                    GCallback deactivate_cb,
+                                    GCallback hightlight_cb);
 
-extern void xg_modify_menubar_widgets P_ ((GtkWidget *menubar,
-                                           FRAME_PTR f,
-                                           widget_value *val,
-                                           int deep_p,
-                                           GCallback select_cb,
-                                           GCallback deactivate_cb,
-                                           GCallback hightlight_cb));
+extern void xg_modify_menubar_widgets (GtkWidget *menubar,
+                                       FRAME_PTR f,
+                                       widget_value *val,
+                                       int deep_p,
+                                       GCallback select_cb,
+                                       GCallback deactivate_cb,
+                                       GCallback hightlight_cb);
 
-extern int xg_update_frame_menubar P_ ((FRAME_PTR f));
+extern int xg_update_frame_menubar (FRAME_PTR f);
 
-extern int xg_have_tear_offs P_ ((void));
+extern int xg_have_tear_offs (void);
 
-extern int xg_get_scroll_id_for_window P_ ((Display *dpy, Window wid));
+extern int xg_get_scroll_id_for_window (Display *dpy, Window wid);
 
-extern void xg_create_scroll_bar P_ ((FRAME_PTR f,
-                                      struct scroll_bar *bar,
-                                      GCallback scroll_callback,
-                                      GCallback end_callback,
-                                      char *scroll_bar_name));
-extern void xg_remove_scroll_bar P_ ((FRAME_PTR f, int scrollbar_id));
+extern void xg_create_scroll_bar (FRAME_PTR f,
+                                  struct scroll_bar *bar,
+                                  GCallback scroll_callback,
+                                  GCallback end_callback,
+                                  char *scroll_bar_name);
+extern void xg_remove_scroll_bar (FRAME_PTR f, int scrollbar_id);
 
-extern void xg_update_scrollbar_pos P_ ((FRAME_PTR f,
-                                         int scrollbar_id,
-                                         int top,
-                                         int left,
-                                         int width,
-                                         int height));
+extern void xg_update_scrollbar_pos (FRAME_PTR f,
+                                     int scrollbar_id,
+                                     int top,
+                                     int left,
+                                     int width,
+                                     int height);
 
-extern void xg_set_toolkit_scroll_bar_thumb P_ ((struct scroll_bar *bar,
-                                                 int portion,
-                                                 int position,
-                                                 int whole));
-extern int xg_event_is_for_scrollbar P_ ((FRAME_PTR f, XEvent *event));
+extern void xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
+                                             int portion,
+                                             int position,
+                                             int whole);
+extern int xg_event_is_for_scrollbar (FRAME_PTR f, XEvent *event);
 
-extern void update_frame_tool_bar P_ ((FRAME_PTR f));
-extern void free_frame_tool_bar P_ ((FRAME_PTR f));
+extern void update_frame_tool_bar (FRAME_PTR f);
+extern void free_frame_tool_bar (FRAME_PTR f);
 
-extern void xg_frame_resized P_ ((FRAME_PTR f,
-                                  int pixelwidth,
-                                  int pixelheight));
-extern void xg_frame_set_char_size P_ ((FRAME_PTR f, int cols, int rows));
-extern GtkWidget * xg_win_to_widget P_ ((Display *dpy, Window wdesc));
+extern void xg_frame_resized (FRAME_PTR f,
+                              int pixelwidth,
+                              int pixelheight);
+extern void xg_frame_set_char_size (FRAME_PTR f, int cols, int rows);
+extern GtkWidget * xg_win_to_widget (Display *dpy, Window wdesc);
 
-extern void xg_display_open P_ ((char *display_name, Display **dpy));
-extern void xg_display_close P_ ((Display *dpy));
-extern GdkCursor * xg_create_default_cursor P_ ((Display *dpy));
+extern void xg_display_open (char *display_name, Display **dpy);
+extern void xg_display_close (Display *dpy);
+extern GdkCursor * xg_create_default_cursor (Display *dpy);
 
-extern int xg_create_frame_widgets P_ ((FRAME_PTR f));
-extern void x_wm_set_size_hint P_ ((FRAME_PTR f,
-                                    long flags,
-                                    int user_position));
-extern void xg_set_background_color P_ ((FRAME_PTR f, unsigned long bg));
+extern int xg_create_frame_widgets (FRAME_PTR f);
+extern void x_wm_set_size_hint (FRAME_PTR f,
+                                long flags,
+                                int user_position);
+extern void xg_set_background_color (FRAME_PTR f, unsigned long bg);
 
-extern void xg_set_frame_icon P_ ((FRAME_PTR f,
-                                   Pixmap icon_pixmap,
-                                   Pixmap icon_mask));
+extern void xg_set_frame_icon (FRAME_PTR f,
+                               Pixmap icon_pixmap,
+                               Pixmap icon_mask);
 
 /* Mark all callback data that are Lisp_object:s during GC.  */
-extern void xg_mark_data P_ ((void));
+extern void xg_mark_data (void);
 
 /* Initialize GTK specific parts.  */
-extern void xg_initialize P_ ((void));
+extern void xg_initialize (void);
 
 /* Setting scrollbar values invokes the callback.  Use this variable
    to indicate that the callback should do nothing.  */
--- a/src/image.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/image.c	Thu Jul 08 17:09:35 2010 +0900
@@ -127,16 +127,16 @@
 Lisp_Object Vx_bitmap_file_path;
 
 
-static void x_disable_image P_ ((struct frame *, struct image *));
-static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object,
-				  Lisp_Object));
-
-static void init_color_table P_ ((void));
-static unsigned long lookup_rgb_color P_ ((struct frame *f, int r, int g, int b));
+static void x_disable_image (struct frame *, struct image *);
+static void x_edge_detection (struct frame *, struct image *, Lisp_Object,
+                              Lisp_Object);
+
+static void init_color_table (void);
+static unsigned long lookup_rgb_color (struct frame *f, int r, int g, int b);
 #ifdef COLOR_TABLE_SUPPORT
-static void free_color_table P_ ((void));
-static unsigned long *colors_in_color_table P_ ((int *n));
-static unsigned long lookup_pixel_color P_ ((struct frame *f, unsigned long p));
+static void free_color_table (void);
+static unsigned long *colors_in_color_table (int *n);
+static unsigned long lookup_pixel_color (struct frame *f, unsigned long p);
 #endif
 
 /* Code to deal with bitmaps.  Bitmaps are referenced by their bitmap
@@ -157,7 +157,7 @@
            unsigned long plane_mask, int format)
 {
   /* TODO: not sure what this function is supposed to do.. */
-  ns_retain_object(pixmap);
+  ns_retain_object (pixmap);
   return pixmap;
 }
 
@@ -165,7 +165,7 @@
 unsigned long
 XGetPixel (XImagePtr ximage, int x, int y)
 {
-  return ns_get_pixel(ximage, x, y);
+  return ns_get_pixel (ximage, x, y);
 }
 
 /* use with imgs created by ns_image_for_XPM; alpha set to 1;
@@ -173,7 +173,7 @@
 void
 XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
 {
-  ns_put_pixel(ximage, x, y, pixel);
+  ns_put_pixel (ximage, x, y, pixel);
 }
 #endif /* HAVE_NS */
 
@@ -181,26 +181,20 @@
 /* Functions to access the contents of a bitmap, given an id.  */
 
 int
-x_bitmap_height (f, id)
-     FRAME_PTR f;
-     int id;
+x_bitmap_height (FRAME_PTR f, int id)
 {
   return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height;
 }
 
 int
-x_bitmap_width (f, id)
-     FRAME_PTR f;
-     int id;
+x_bitmap_width (FRAME_PTR f, int id)
 {
   return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width;
 }
 
 #if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
 int
-x_bitmap_pixmap (f, id)
-     FRAME_PTR f;
-     int id;
+x_bitmap_pixmap (FRAME_PTR f, int id)
 {
   return (int) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
 }
@@ -208,9 +202,7 @@
 
 #ifdef HAVE_X_WINDOWS
 int
-x_bitmap_mask (f, id)
-     FRAME_PTR f;
-     int id;
+x_bitmap_mask (FRAME_PTR f, int id)
 {
   return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask;
 }
@@ -219,8 +211,7 @@
 /* Allocate a new bitmap record.  Returns index of new record.  */
 
 static int
-x_allocate_bitmap_record (f)
-     FRAME_PTR f;
+x_allocate_bitmap_record (FRAME_PTR f)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   int i;
@@ -251,9 +242,7 @@
 /* Add one reference to the reference count of the bitmap with id ID.  */
 
 void
-x_reference_bitmap (f, id)
-     FRAME_PTR f;
-     int id;
+x_reference_bitmap (FRAME_PTR f, int id)
 {
   ++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount;
 }
@@ -261,10 +250,7 @@
 /* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS.  */
 
 int
-x_create_bitmap_from_data (f, bits, width, height)
-     struct frame *f;
-     char *bits;
-     unsigned int width, height;
+x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsigned int height)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   int id;
@@ -288,7 +274,7 @@
 #endif /* HAVE_NTGUI */
 
 #ifdef HAVE_NS
-  void *bitmap = ns_image_from_XBM(bits, width, height);
+  void *bitmap = ns_image_from_XBM (bits, width, height);
   if (!bitmap)
       return -1;
 #endif
@@ -323,9 +309,7 @@
 /* Create bitmap from file FILE for frame F.  */
 
 int
-x_create_bitmap_from_file (f, file)
-     struct frame *f;
-     Lisp_Object file;
+x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 
@@ -335,7 +319,7 @@
 
 #ifdef HAVE_NS
   int id;
-  void *bitmap = ns_image_from_file(file);
+  void *bitmap = ns_image_from_file (file);
 
   if (!bitmap)
       return -1;
@@ -346,8 +330,8 @@
   dpyinfo->bitmaps[id - 1].refcount = 1;
   dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SBYTES (file) + 1);
   dpyinfo->bitmaps[id - 1].depth = 1;
-  dpyinfo->bitmaps[id - 1].height = ns_image_width(bitmap);
-  dpyinfo->bitmaps[id - 1].width = ns_image_height(bitmap);
+  dpyinfo->bitmaps[id - 1].height = ns_image_width (bitmap);
+  dpyinfo->bitmaps[id - 1].width = ns_image_height (bitmap);
   strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file));
   return id;
 #endif
@@ -402,9 +386,7 @@
 /* Free bitmap B.  */
 
 static void
-free_bitmap_record (dpyinfo, bm)
-     Display_Info *dpyinfo;
-     Bitmap_Record *bm;
+free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm)
 {
 #ifdef HAVE_X_WINDOWS
   XFreePixmap (dpyinfo->display, bm->pixmap);
@@ -417,7 +399,7 @@
 #endif /* HAVE_NTGUI */
 
 #ifdef HAVE_NS
-  ns_release_object(bm->img);
+  ns_release_object (bm->img);
 #endif
 
   if (bm->file)
@@ -430,9 +412,7 @@
 /* Remove reference to bitmap with id number ID.  */
 
 void
-x_destroy_bitmap (f, id)
-     FRAME_PTR f;
-     int id;
+x_destroy_bitmap (FRAME_PTR f, int id)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 
@@ -452,8 +432,7 @@
 /* Free all the bitmaps for the display specified by DPYINFO.  */
 
 void
-x_destroy_all_bitmaps (dpyinfo)
-     Display_Info *dpyinfo;
+x_destroy_all_bitmaps (Display_Info *dpyinfo)
 {
   int i;
   Bitmap_Record *bm = dpyinfo->bitmaps;
@@ -471,25 +450,23 @@
 /* Useful functions defined in the section
    `Image type independent image structures' below. */
 
-static unsigned long four_corners_best P_ ((XImagePtr ximg,
-					    int *corners,
-					    unsigned long width,
-					    unsigned long height));
-
-static int x_create_x_image_and_pixmap P_ ((struct frame *f, int width, int height,
-					    int depth, XImagePtr *ximg,
-					    Pixmap *pixmap));
-
-static void x_destroy_x_image P_ ((XImagePtr ximg));
+static unsigned long four_corners_best (XImagePtr ximg,
+                                        int *corners,
+                                        unsigned long width,
+                                        unsigned long height);
+
+static int x_create_x_image_and_pixmap (struct frame *f, int width, int height,
+                                        int depth, XImagePtr *ximg,
+                                        Pixmap *pixmap);
+
+static void x_destroy_x_image (XImagePtr ximg);
 
 
 /* Create a mask of a bitmap. Note is this not a perfect mask.
    It's nicer with some borders in this context */
 
 int
-x_create_bitmap_mask (f, id)
-     struct frame *f;
-     int id;
+x_create_bitmap_mask (struct frame *f, int id)
 {
   Pixmap pixmap, mask;
   XImagePtr ximg, mask_img;
@@ -619,13 +596,13 @@
 
 /* Function prototypes.  */
 
-static Lisp_Object define_image_type P_ ((struct image_type *type, int loaded));
-static struct image_type *lookup_image_type P_ ((Lisp_Object symbol));
-static void image_error P_ ((char *format, Lisp_Object, Lisp_Object));
-static void x_laplace P_ ((struct frame *, struct image *));
-static void x_emboss P_ ((struct frame *, struct image *));
-static int x_build_heuristic_mask P_ ((struct frame *, struct image *,
-				       Lisp_Object));
+static Lisp_Object define_image_type (struct image_type *type, int loaded);
+static struct image_type *lookup_image_type (Lisp_Object symbol);
+static void image_error (char *format, Lisp_Object, Lisp_Object);
+static void x_laplace (struct frame *, struct image *);
+static void x_emboss (struct frame *, struct image *);
+static int x_build_heuristic_mask (struct frame *, struct image *,
+                                   Lisp_Object);
 
 #define CACHE_IMAGE_TYPE(type, status) \
   do { Vimage_type_cache = Fcons (Fcons (type, status), Vimage_type_cache); } while (0)
@@ -637,9 +614,7 @@
    image_types and caches the loading status of TYPE.  */
 
 static Lisp_Object
-define_image_type (type, loaded)
-     struct image_type *type;
-     int loaded;
+define_image_type (struct image_type *type, int loaded)
 {
   Lisp_Object success;
 
@@ -650,7 +625,7 @@
       /* Make a copy of TYPE to avoid a bus error in a dumped Emacs.
          The initialized data segment is read-only.  */
       struct image_type *p = (struct image_type *) xmalloc (sizeof *p);
-      bcopy (type, p, sizeof *p);
+      memcpy (p, type, sizeof *p);
       p->next = image_types;
       image_types = p;
       success = Qt;
@@ -665,8 +640,7 @@
    structure.  Value is null if SYMBOL is not a known image type.  */
 
 static INLINE struct image_type *
-lookup_image_type (symbol)
-     Lisp_Object symbol;
+lookup_image_type (Lisp_Object symbol)
 {
   struct image_type *type;
 
@@ -690,8 +664,7 @@
    image type.  */
 
 int
-valid_image_p (object)
-     Lisp_Object object;
+valid_image_p (Lisp_Object object)
 {
   int valid_p = 0;
 
@@ -726,9 +699,7 @@
    therefore simply displays a message.  */
 
 static void
-image_error (format, arg1, arg2)
-     char *format;
-     Lisp_Object arg1, arg2;
+image_error (char *format, Lisp_Object arg1, Lisp_Object arg2)
 {
   add_to_log (format, arg1, arg2);
 }
@@ -776,9 +747,9 @@
 };
 
 
-static int parse_image_spec P_ ((Lisp_Object, struct image_keyword *,
-				 int, Lisp_Object));
-static Lisp_Object image_spec_value P_ ((Lisp_Object, Lisp_Object, int *));
+static int parse_image_spec (Lisp_Object, struct image_keyword *,
+                             int, Lisp_Object);
+static Lisp_Object image_spec_value (Lisp_Object, Lisp_Object, int *);
 
 
 /* Parse image spec SPEC according to KEYWORDS.  A valid image spec
@@ -788,11 +759,8 @@
    allowed keyword/value pairs.  Value is non-zero if SPEC is valid.  */
 
 static int
-parse_image_spec (spec, keywords, nkeywords, type)
-     Lisp_Object spec;
-     struct image_keyword *keywords;
-     int nkeywords;
-     Lisp_Object type;
+parse_image_spec (Lisp_Object spec, struct image_keyword *keywords,
+		  int nkeywords, Lisp_Object type)
 {
   int i;
   Lisp_Object plist;
@@ -928,9 +896,7 @@
    to 1 if KEY was found in SPEC, set it to 0 otherwise.  */
 
 static Lisp_Object
-image_spec_value (spec, key, found)
-     Lisp_Object spec, key;
-     int *found;
+image_spec_value (Lisp_Object spec, Lisp_Object key, int *found)
 {
   Lisp_Object tail;
 
@@ -1037,9 +1003,9 @@
 		 Image type independent image structures
  ***********************************************************************/
 
-static struct image *make_image P_ ((Lisp_Object spec, unsigned hash));
-static void free_image P_ ((struct frame *f, struct image *img));
-static int check_image_size P_ ((struct frame *f, int width, int height));
+static struct image *make_image (Lisp_Object spec, unsigned hash);
+static void free_image (struct frame *f, struct image *img);
+static int check_image_size (struct frame *f, int width, int height);
 
 #define MAX_IMAGE_SIZE 6.0
 Lisp_Object Vmax_image_size;
@@ -1048,15 +1014,13 @@
    SPEC.  SPEC has a hash value of HASH.  */
 
 static struct image *
-make_image (spec, hash)
-     Lisp_Object spec;
-     unsigned hash;
+make_image (Lisp_Object spec, unsigned int hash)
 {
   struct image *img = (struct image *) xmalloc (sizeof *img);
   Lisp_Object file = image_spec_value (spec, QCfile, NULL);
 
   xassert (valid_image_p (spec));
-  bzero (img, sizeof *img);
+  memset (img, 0, sizeof *img);
   img->dependencies = NILP (file) ? Qnil : list1 (file);
   img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL));
   xassert (img->type != NULL);
@@ -1072,9 +1036,7 @@
 /* Free image IMG which was used on frame F, including its resources.  */
 
 static void
-free_image (f, img)
-     struct frame *f;
-     struct image *img;
+free_image (struct frame *f, struct image *img)
 {
   if (img)
     {
@@ -1101,10 +1063,7 @@
    otherwise, return 0. */
 
 int
-check_image_size (f, width, height)
-     struct frame *f;
-     int width;
-     int height;
+check_image_size (struct frame *f, int width, int height)
 {
   int w, h;
 
@@ -1135,9 +1094,7 @@
    drawing an image.  */
 
 void
-prepare_image_for_display (f, img)
-     struct frame *f;
-     struct image *img;
+prepare_image_for_display (struct frame *f, struct image *img)
 {
   EMACS_TIME t;
 
@@ -1157,10 +1114,7 @@
    drawn in face FACE.  */
 
 int
-image_ascent (img, face, slice)
-     struct image *img;
-     struct face *face;
-     struct glyph_slice *slice;
+image_ascent (struct image *img, struct face *face, struct glyph_slice *slice)
 {
   int height;
   int ascent;
@@ -1206,10 +1160,8 @@
    On W32, XIMG is assumed to a device context with the bitmap selected.  */
 
 static RGB_PIXEL_COLOR
-four_corners_best (ximg, corners, width, height)
-     XImagePtr_or_DC ximg;
-     int *corners;
-     unsigned long width, height;
+four_corners_best (XImagePtr_or_DC ximg, int *corners,
+		   unsigned long width, unsigned long height)
 {
   RGB_PIXEL_COLOR corner_pixels[4], best;
   int i, best_count;
@@ -1259,10 +1211,10 @@
 #elif defined (HAVE_NS)
 
 #define Destroy_Image(ximg, dummy) \
-  ns_release_object(ximg)
+  ns_release_object (ximg)
 
 #define Free_Pixmap(display, pixmap) \
-  ns_release_object(pixmap)
+  ns_release_object (pixmap)
 
 #else
 
@@ -1281,10 +1233,7 @@
    use for the heuristic.  */
 
 RGB_PIXEL_COLOR
-image_background (img, f, ximg)
-     struct image *img;
-     struct frame *f;
-     XImagePtr_or_DC ximg;
+image_background (struct image *img, struct frame *f, XImagePtr_or_DC ximg)
 {
   if (! img->background_valid)
     /* IMG doesn't have a background yet, try to guess a reasonable value.  */
@@ -1323,10 +1272,7 @@
    existing XImage object to use for the heuristic.  */
 
 int
-image_background_transparent (img, f, mask)
-     struct image *img;
-     struct frame *f;
-     XImagePtr_or_DC mask;
+image_background_transparent (struct image *img, struct frame *f, XImagePtr_or_DC mask)
 {
   if (! img->background_transparent_valid)
     /* IMG doesn't have a background yet, try to guess a reasonable value.  */
@@ -1371,13 +1317,13 @@
 		  Helper functions for X image types
  ***********************************************************************/
 
-static void x_clear_image_1 P_ ((struct frame *, struct image *, int,
-				 int, int));
-static void x_clear_image P_ ((struct frame *f, struct image *img));
-static unsigned long x_alloc_image_color P_ ((struct frame *f,
-					      struct image *img,
-					      Lisp_Object color_name,
-					      unsigned long dflt));
+static void x_clear_image_1 (struct frame *, struct image *, int,
+                             int, int);
+static void x_clear_image (struct frame *f, struct image *img);
+static unsigned long x_alloc_image_color (struct frame *f,
+                                          struct image *img,
+                                          Lisp_Object color_name,
+                                          unsigned long dflt);
 
 
 /* Clear X resources of image IMG on frame F.  PIXMAP_P non-zero means
@@ -1386,10 +1332,8 @@
    the image, if any.  */
 
 static void
-x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p)
-     struct frame *f;
-     struct image *img;
-     int pixmap_p, mask_p, colors_p;
+x_clear_image_1 (struct frame *f, struct image *img, int pixmap_p, int mask_p,
+		 int colors_p)
 {
   if (pixmap_p && img->pixmap)
     {
@@ -1422,9 +1366,7 @@
 /* Free X resources of image IMG which is used on frame F.  */
 
 static void
-x_clear_image (f, img)
-     struct frame *f;
-     struct image *img;
+x_clear_image (struct frame *f, struct image *img)
 {
   BLOCK_INPUT;
   x_clear_image_1 (f, img, 1, 1, 1);
@@ -1438,11 +1380,8 @@
    color.  */
 
 static unsigned long
-x_alloc_image_color (f, img, color_name, dflt)
-     struct frame *f;
-     struct image *img;
-     Lisp_Object color_name;
-     unsigned long dflt;
+x_alloc_image_color (struct frame *f, struct image *img, Lisp_Object color_name,
+		     unsigned long dflt)
 {
   XColor color;
   unsigned long result;
@@ -1472,25 +1411,25 @@
 			     Image Cache
  ***********************************************************************/
 
-static struct image *search_image_cache P_ ((struct frame *, Lisp_Object, unsigned));
-static void cache_image P_ ((struct frame *f, struct image *img));
-static void postprocess_image P_ ((struct frame *, struct image *));
+static struct image *search_image_cache (struct frame *, Lisp_Object, unsigned);
+static void cache_image (struct frame *f, struct image *img);
+static void postprocess_image (struct frame *, struct image *);
 
 /* Return a new, initialized image cache that is allocated from the
    heap.  Call free_image_cache to free an image cache.  */
 
 struct image_cache *
-make_image_cache ()
+make_image_cache (void)
 {
   struct image_cache *c = (struct image_cache *) xmalloc (sizeof *c);
   int size;
 
-  bzero (c, sizeof *c);
+  memset (c, 0, sizeof *c);
   c->size = 50;
   c->images = (struct image **) xmalloc (c->size * sizeof *c->images);
   size = IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
   c->buckets = (struct image **) xmalloc (size);
-  bzero (c->buckets, size);
+  memset (c->buckets, 0, size);
   return c;
 }
 
@@ -1498,10 +1437,7 @@
 /* Find an image matching SPEC in the cache, and return it.  If no
    image is found, return NULL.  */
 static struct image *
-search_image_cache (f, spec, hash)
-     struct frame *f;
-     Lisp_Object spec;
-     unsigned hash;
+search_image_cache (struct frame *f, Lisp_Object spec, unsigned int hash)
 {
   struct image *img;
   struct image_cache *c = FRAME_IMAGE_CACHE (f);
@@ -1534,9 +1470,7 @@
 /* Search frame F for an image with spec SPEC, and free it.  */
 
 static void
-uncache_image (f, spec)
-     struct frame *f;
-     Lisp_Object spec;
+uncache_image (struct frame *f, Lisp_Object spec)
 {
   struct image *img = search_image_cache (f, spec, sxhash (spec, 0));
   if (img)
@@ -1548,8 +1482,7 @@
    caches.  */
 
 void
-free_image_cache (f)
-     struct frame *f;
+free_image_cache (struct frame *f)
 {
   struct image_cache *c = FRAME_IMAGE_CACHE (f);
   if (c)
@@ -1725,9 +1658,7 @@
    by the image's specification,  */
 
 static void
-postprocess_image (f, img)
-     struct frame *f;
-     struct image *img;
+postprocess_image (struct frame *f, struct image *img)
 {
   /* Manipulation of the image's mask.  */
   if (img->pixmap)
@@ -1800,9 +1731,7 @@
    SPEC must be a valid Lisp image specification (see valid_image_p).  */
 
 int
-lookup_image (f, spec)
-     struct frame *f;
-     Lisp_Object spec;
+lookup_image (struct frame *f, Lisp_Object spec)
 {
   struct image_cache *c;
   struct image *img;
@@ -1922,9 +1851,7 @@
 /* Cache image IMG in the image cache of frame F.  */
 
 static void
-cache_image (f, img)
-     struct frame *f;
-     struct image *img;
+cache_image (struct frame *f, struct image *img)
 {
   struct image_cache *c = FRAME_IMAGE_CACHE (f);
   int i;
@@ -1964,8 +1891,7 @@
 /* Mark Lisp objects in image IMG.  */
 
 static void
-mark_image (img)
-     struct image *img;
+mark_image (struct image *img)
 {
   mark_object (img->spec);
   mark_object (img->dependencies);
@@ -2033,10 +1959,10 @@
 
 #endif /* HAVE_NTGUI */
 
-static int x_create_x_image_and_pixmap P_ ((struct frame *, int, int, int,
-					    XImagePtr *, Pixmap *));
-static void x_destroy_x_image P_ ((XImagePtr));
-static void x_put_x_image P_ ((struct frame *, XImagePtr, Pixmap, int, int));
+static int x_create_x_image_and_pixmap (struct frame *, int, int, int,
+                                        XImagePtr *, Pixmap *);
+static void x_destroy_x_image (XImagePtr);
+static void x_put_x_image (struct frame *, XImagePtr, Pixmap, int, int);
 
 
 /* Create an XImage and a pixmap of size WIDTH x HEIGHT for use on
@@ -2049,11 +1975,8 @@
    should indicate the bit depth of the image.  */
 
 static int
-x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap)
-     struct frame *f;
-     int width, height, depth;
-     XImagePtr *ximg;
-     Pixmap *pixmap;
+x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth,
+			     XImagePtr *ximg, Pixmap *pixmap)
 {
 #ifdef HAVE_X_WINDOWS
   Display *display = FRAME_X_DISPLAY (f);
@@ -2125,8 +2048,8 @@
       return 0;
     }
 
-  header = &((*ximg)->info.bmiHeader);
-  bzero (&((*ximg)->info), sizeof (BITMAPINFO));
+  header = &(*ximg)->info.bmiHeader;
+  memset (&(*ximg)->info, 0, sizeof (BITMAPINFO));
   header->biSize = sizeof (*header);
   header->biWidth = width;
   header->biHeight = -height;  /* negative indicates a top-down bitmap.  */
@@ -2176,7 +2099,7 @@
 #endif /* HAVE_NTGUI */
 
 #ifdef HAVE_NS
-  *pixmap = ns_image_for_XPM(width, height, depth);
+  *pixmap = ns_image_for_XPM (width, height, depth);
   if (*pixmap == 0)
     {
       *ximg = NULL;
@@ -2192,8 +2115,7 @@
 /* Destroy XImage XIMG.  Free XIMG->data.  */
 
 static void
-x_destroy_x_image (ximg)
-     XImagePtr ximg;
+x_destroy_x_image (XImagePtr ximg)
 {
   xassert (interrupt_input_blocked);
   if (ximg)
@@ -2209,7 +2131,7 @@
       xfree (ximg);
 #endif /* HAVE_NTGUI */
 #ifdef HAVE_NS
-      ns_release_object(ximg);
+      ns_release_object (ximg);
 #endif /* HAVE_NS */
     }
 }
@@ -2219,11 +2141,7 @@
    are width and height of both the image and pixmap.  */
 
 static void
-x_put_x_image (f, ximg, pixmap, width, height)
-     struct frame *f;
-     XImagePtr ximg;
-     Pixmap pixmap;
-     int width, height;
+x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int height)
 {
 #ifdef HAVE_X_WINDOWS
   GC gc;
@@ -2244,7 +2162,7 @@
 
 #ifdef HAVE_NS
   xassert (ximg == pixmap);
-  ns_retain_object(ximg);
+  ns_retain_object (ximg);
 #endif
 }
 
@@ -2253,7 +2171,7 @@
 			      File Handling
  ***********************************************************************/
 
-static unsigned char *slurp_file P_ ((char *, int *));
+static unsigned char *slurp_file (char *, int *);
 
 
 /* Find image file FILE.  Look in data-directory/images, then
@@ -2261,8 +2179,7 @@
    found, or nil if not found.  */
 
 Lisp_Object
-x_find_image_file (file)
-     Lisp_Object file;
+x_find_image_file (Lisp_Object file)
 {
   Lisp_Object file_found, search_path;
   struct gcpro gcpro1, gcpro2;
@@ -2297,9 +2214,7 @@
    occurred.  *SIZE is set to the size of the file.  */
 
 static unsigned char *
-slurp_file (file, size)
-     char *file;
-     int *size;
+slurp_file (char *file, int *size)
 {
   FILE *fp = NULL;
   unsigned char *buf = NULL;
@@ -2333,15 +2248,15 @@
 			      XBM images
  ***********************************************************************/
 
-static int xbm_scan P_ ((unsigned char **, unsigned char *, char *, int *));
-static int xbm_load P_ ((struct frame *f, struct image *img));
-static int xbm_load_image P_ ((struct frame *f, struct image *img,
-			       unsigned char *, unsigned char *));
-static int xbm_image_p P_ ((Lisp_Object object));
-static int xbm_read_bitmap_data P_ ((struct frame *f,
-				     unsigned char *, unsigned char *,
-				     int *, int *, unsigned char **, int));
-static int xbm_file_p P_ ((Lisp_Object));
+static int xbm_scan (unsigned char **, unsigned char *, char *, int *);
+static int xbm_load (struct frame *f, struct image *img);
+static int xbm_load_image (struct frame *f, struct image *img,
+                           unsigned char *, unsigned char *);
+static int xbm_image_p (Lisp_Object object);
+static int xbm_read_bitmap_data (struct frame *f,
+                                 unsigned char *, unsigned char *,
+                                 int *, int *, unsigned char **, int);
+static int xbm_file_p (Lisp_Object);
 
 
 /* Indices of image specification fields in xbm_format, below.  */
@@ -2434,12 +2349,11 @@
    displayed is used.  */
 
 static int
-xbm_image_p (object)
-     Lisp_Object object;
+xbm_image_p (Lisp_Object object)
 {
   struct image_keyword kw[XBM_LAST];
 
-  bcopy (xbm_format, kw, sizeof kw);
+  memcpy (kw, xbm_format, sizeof kw);
   if (!parse_image_spec (object, kw, XBM_LAST, Qxbm))
     return 0;
 
@@ -2528,10 +2442,7 @@
    scanning a number, store its value in *IVAL.  */
 
 static int
-xbm_scan (s, end, sval, ival)
-     unsigned char **s, *end;
-     char *sval;
-     int *ival;
+xbm_scan (unsigned char **s, unsigned char *end, char *sval, int *ival)
 {
   unsigned int c;
 
@@ -2632,7 +2543,7 @@
   w1 = (width + 7) / 8;         /* nb of 8bits elt in X bitmap */
   w2 = ((width + 15) / 16) * 2; /* nb of 16bits elt in W32 bitmap */
   bits = (unsigned char *) alloca (height * w2);
-  bzero (bits, height * w2);
+  memset (bits, 0, height * w2);
   for (i = 0; i < height; i++)
     {
       p = bits + i*w2;
@@ -2695,12 +2606,9 @@
 
 
 static void
-Create_Pixmap_From_Bitmap_Data (f, img, data, fg, bg, non_default_colors)
-     struct frame *f;
-     struct image *img;
-     char *data;
-     RGB_PIXEL_COLOR fg, bg;
-     int non_default_colors;
+Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data,
+				RGB_PIXEL_COLOR fg, RGB_PIXEL_COLOR bg,
+				int non_default_colors)
 {
 #ifdef HAVE_NTGUI
   img->pixmap
@@ -2711,7 +2619,7 @@
     convert_mono_to_color_image (f, img, fg, bg);
 
 #elif defined (HAVE_NS)
-  img->pixmap = ns_image_from_XBM(data, img->width, img->height);
+  img->pixmap = ns_image_from_XBM (data, img->width, img->height);
 
 #else
   img->pixmap
@@ -2736,12 +2644,9 @@
    invalid (the bitmap remains unread).  */
 
 static int
-xbm_read_bitmap_data (f, contents, end, width, height, data, inhibit_image_error)
-     struct frame *f;
-     unsigned char *contents, *end;
-     int *width, *height;
-     unsigned char **data;
-     int inhibit_image_error;
+xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *end,
+		      int *width, int *height, unsigned char **data,
+		      int inhibit_image_error)
 {
   unsigned char *s = contents;
   char buffer[BUFSIZ];
@@ -2890,10 +2795,8 @@
    successful.  */
 
 static int
-xbm_load_image (f, img, contents, end)
-     struct frame *f;
-     struct image *img;
-     unsigned char *contents, *end;
+xbm_load_image (struct frame *f, struct image *img, unsigned char *contents,
+		unsigned char *end)
 {
   int rc;
   unsigned char *data;
@@ -2949,8 +2852,7 @@
 /* Value is non-zero if DATA looks like an in-memory XBM file.  */
 
 static int
-xbm_file_p (data)
-     Lisp_Object data;
+xbm_file_p (Lisp_Object data)
 {
   int w, h;
   return (STRINGP (data)
@@ -2964,9 +2866,7 @@
    non-zero if successful.  */
 
 static int
-xbm_load (f, img)
-     struct frame *f;
-     struct image *img;
+xbm_load (struct frame *f, struct image *img)
 {
   int success_p = 0;
   Lisp_Object file_name;
@@ -3018,7 +2918,7 @@
       in_memory_file_p = xbm_file_p (data);
 
       /* Parse the image specification.  */
-      bcopy (xbm_format, fmt, sizeof fmt);
+      memcpy (fmt, xbm_format, sizeof fmt);
       parsed_p = parse_image_spec (img->spec, fmt, XBM_LAST, Qxbm);
       xassert (parsed_p);
 
@@ -3064,9 +2964,9 @@
 		{
 		  Lisp_Object line = XVECTOR (data)->contents[i];
 		  if (STRINGP (line))
-		    bcopy (SDATA (line), p, nbytes);
+		    memcpy (p, SDATA (line), nbytes);
 		  else
-		    bcopy (XBOOL_VECTOR (line)->data, p, nbytes);
+		    memcpy (p, XBOOL_VECTOR (line)->data, nbytes);
 		}
 	    }
 	  else if (STRINGP (data))
@@ -3082,7 +2982,7 @@
             invertedBits = bits;
             nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR
               * img->height;
-            bits = (char *) alloca(nbytes);
+            bits = (char *) alloca (nbytes);
             for (i = 0; i < nbytes; i++)
               bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]);
           }
@@ -3114,9 +3014,9 @@
 
 #if defined (HAVE_XPM) || defined (HAVE_NS)
 
-static int xpm_image_p P_ ((Lisp_Object object));
-static int xpm_load P_ ((struct frame *f, struct image *img));
-static int xpm_valid_color_symbols_p P_ ((Lisp_Object));
+static int xpm_image_p (Lisp_Object object);
+static int xpm_load (struct frame *f, struct image *img);
+static int xpm_valid_color_symbols_p (Lisp_Object);
 
 #endif /* HAVE_XPM || HAVE_NS */
 
@@ -3207,12 +3107,12 @@
 
 #ifdef ALLOC_XPM_COLORS
 
-static void xpm_init_color_cache P_ ((struct frame *, XpmAttributes *));
-static void xpm_free_color_cache P_ ((void));
-static int xpm_lookup_color P_ ((struct frame *, char *, XColor *));
-static int xpm_color_bucket P_ ((char *));
-static struct xpm_cached_color *xpm_cache_color P_ ((struct frame *, char *,
-						     XColor *, int));
+static void xpm_init_color_cache (struct frame *, XpmAttributes *);
+static void xpm_free_color_cache (void);
+static int xpm_lookup_color (struct frame *, char *, XColor *);
+static int xpm_color_bucket (char *);
+static struct xpm_cached_color *xpm_cache_color (struct frame *, char *,
+                                                 XColor *, int);
 
 /* An entry in a hash table used to cache color definitions of named
    colors.  This cache is necessary to speed up XPM image loading in
@@ -3240,9 +3140,7 @@
 /* Initialize the color cache.  */
 
 static void
-xpm_init_color_cache (f, attrs)
-     struct frame *f;
-     XpmAttributes *attrs;
+xpm_init_color_cache (struct frame *f, XpmAttributes *attrs)
 {
   size_t nbytes = XPM_COLOR_CACHE_BUCKETS * sizeof *xpm_color_cache;
   xpm_color_cache = (struct xpm_cached_color **) xmalloc (nbytes);
@@ -3268,7 +3166,7 @@
 /* Free the color cache.  */
 
 static void
-xpm_free_color_cache ()
+xpm_free_color_cache (void)
 {
   struct xpm_cached_color *p, *next;
   int i;
@@ -3289,8 +3187,7 @@
    cache.  */
 
 static int
-xpm_color_bucket (color_name)
-     char *color_name;
+xpm_color_bucket (char *color_name)
 {
   unsigned h = 0;
   char *s;
@@ -3306,11 +3203,7 @@
    entry added.  */
 
 static struct xpm_cached_color *
-xpm_cache_color (f, color_name, color, bucket)
-     struct frame *f;
-     char *color_name;
-     XColor *color;
-     int bucket;
+xpm_cache_color (struct frame *f, char *color_name, XColor *color, int bucket)
 {
   size_t nbytes;
   struct xpm_cached_color *p;
@@ -3333,10 +3226,7 @@
    allocation failed.  */
 
 static int
-xpm_lookup_color (f, color_name, color)
-     struct frame *f;
-     char *color_name;
-     XColor *color;
+xpm_lookup_color (struct frame *f, char *color_name, XColor *color)
 {
   struct xpm_cached_color *p;
   int h = xpm_color_bucket (color_name);
@@ -3358,7 +3248,7 @@
      with transparency, and it's useful.  */
   else if (strcmp ("opaque", color_name) == 0)
     {
-      bzero (color, sizeof (XColor));  /* Is this necessary/correct?  */
+      memset (color, 0, sizeof (XColor));  /* Is this necessary/correct?  */
       color->pixel = FRAME_FOREGROUND_PIXEL (f);
       p = xpm_cache_color (f, color_name, color, h);
     }
@@ -3373,12 +3263,8 @@
    if successful.  */
 
 static int
-xpm_alloc_color (dpy, cmap, color_name, color, closure)
-     Display *dpy;
-     Colormap cmap;
-     char *color_name;
-     XColor *color;
-     void *closure;
+xpm_alloc_color (Display *dpy, Colormap cmap, char *color_name, XColor *color,
+		 void *closure)
 {
   return xpm_lookup_color ((struct frame *) closure, color_name, color);
 }
@@ -3389,12 +3275,7 @@
    non-zero if successful.  */
 
 static int
-xpm_free_colors (dpy, cmap, pixels, npixels, closure)
-     Display *dpy;
-     Colormap cmap;
-     Pixel *pixels;
-     int npixels;
-     void *closure;
+xpm_free_colors (Display *dpy, Colormap cmap, Pixel *pixels, int npixels, void *closure)
 {
   return 1;
 }
@@ -3434,8 +3315,7 @@
    cdr are strings.  */
 
 static int
-xpm_valid_color_symbols_p (color_symbols)
-     Lisp_Object color_symbols;
+xpm_valid_color_symbols_p (Lisp_Object color_symbols)
 {
   while (CONSP (color_symbols))
     {
@@ -3454,11 +3334,10 @@
 /* Value is non-zero if OBJECT is a valid XPM image specification.  */
 
 static int
-xpm_image_p (object)
-     Lisp_Object object;
+xpm_image_p (Lisp_Object object)
 {
   struct image_keyword fmt[XPM_LAST];
-  bcopy (xpm_format, fmt, sizeof fmt);
+  memcpy (fmt, xpm_format, sizeof fmt);
   return (parse_image_spec (object, fmt, XPM_LAST, Qxpm)
 	  /* Either `:file' or `:data' must be present.  */
 	  && fmt[XPM_FILE].count + fmt[XPM_DATA].count == 1
@@ -3472,16 +3351,14 @@
 
 #if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
 int
-x_create_bitmap_from_xpm_data (f, bits)
-     struct frame *f;
-     char **bits;
+x_create_bitmap_from_xpm_data (struct frame *f, char **bits)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   int id, rc;
   XpmAttributes attrs;
   Pixmap bitmap, mask;
 
-  bzero (&attrs, sizeof attrs);
+  memset (&attrs, 0, sizeof attrs);
 
   attrs.visual = FRAME_X_VISUAL (f);
   attrs.colormap = FRAME_X_COLORMAP (f);
@@ -3517,9 +3394,7 @@
 #ifdef HAVE_XPM
 
 static int
-xpm_load (f, img)
-     struct frame *f;
-     struct image *img;
+xpm_load (struct frame *f, struct image *img)
 {
   int rc;
   XpmAttributes attrs;
@@ -3531,7 +3406,7 @@
 
   /* Configure the XPM lib.  Use the visual of frame F.  Allocate
      close colors.  Return colors allocated.  */
-  bzero (&attrs, sizeof attrs);
+  memset (&attrs, 0, sizeof attrs);
 
 #ifndef HAVE_NTGUI
   attrs.visual = FRAME_X_VISUAL (f);
@@ -3578,7 +3453,7 @@
       /* Allocate an XpmColorSymbol array.  */
       size = attrs.numsymbols * sizeof *xpm_syms;
       xpm_syms = (XpmColorSymbol *) alloca (size);
-      bzero (xpm_syms, size);
+      memset (xpm_syms, 0, size);
       attrs.colorsymbols = xpm_syms;
 
       /* Fill the color symbol array.  */
@@ -3752,25 +3627,25 @@
 /* XPM support functions for NS where libxpm is not available.
    Only XPM version 3 (without any extensions) is supported.  */
 
-static int xpm_scan P_ ((const unsigned char **, const unsigned char *,
-			 const unsigned char **, int *));
+static int xpm_scan (const unsigned char **, const unsigned char *,
+                     const unsigned char **, int *);
 static Lisp_Object xpm_make_color_table_v
-  P_ ((void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
-       Lisp_Object (**) (Lisp_Object, const unsigned char *, int)));
-static void xpm_put_color_table_v P_ ((Lisp_Object, const unsigned char *,
-				       int, Lisp_Object));
-static Lisp_Object xpm_get_color_table_v P_ ((Lisp_Object,
-					      const unsigned char *, int));
+  (void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
+   Lisp_Object (**) (Lisp_Object, const unsigned char *, int));
+static void xpm_put_color_table_v (Lisp_Object, const unsigned char *,
+                                   int, Lisp_Object);
+static Lisp_Object xpm_get_color_table_v (Lisp_Object,
+                                          const unsigned char *, int);
 static Lisp_Object xpm_make_color_table_h
-  P_ ((void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
-       Lisp_Object (**) (Lisp_Object, const unsigned char *, int)));
-static void xpm_put_color_table_h P_ ((Lisp_Object, const unsigned char *,
-				       int, Lisp_Object));
-static Lisp_Object xpm_get_color_table_h P_ ((Lisp_Object,
-					      const unsigned char *, int));
-static int xpm_str_to_color_key P_ ((const char *));
-static int xpm_load_image P_ ((struct frame *, struct image *,
-			       const unsigned char *, const unsigned char *));
+  (void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
+   Lisp_Object (**) (Lisp_Object, const unsigned char *, int));
+static void xpm_put_color_table_h (Lisp_Object, const unsigned char *,
+                                   int, Lisp_Object);
+static Lisp_Object xpm_get_color_table_h (Lisp_Object,
+                                          const unsigned char *, int);
+static int xpm_str_to_color_key (const char *);
+static int xpm_load_image (struct frame *, struct image *,
+                           const unsigned char *, const unsigned char *);
 
 /* Tokens returned from xpm_scan.  */
 
@@ -3984,7 +3859,7 @@
   if (!(end - s >= 9 && memcmp (s, "/* XPM */", 9) == 0))
     goto failure;
   s += 9;
-  match();
+  match ();
   expect_ident ("static");
   expect_ident ("char");
   expect ('*');
@@ -4134,8 +4009,8 @@
 		     (!EQ (color_val, Qt) ? PIX_MASK_DRAW
 		      : (have_mask = 1, PIX_MASK_RETAIN)));
 #else
-          if (EQ(color_val, Qt))
-            ns_set_alpha(ximg, x, y, 0);
+          if (EQ (color_val, Qt))
+            ns_set_alpha (ximg, x, y, 0);
 #endif
 	}
       if (y + 1 < height)
@@ -4273,11 +4148,11 @@
 /* Initialize the color table.  */
 
 static void
-init_color_table ()
+init_color_table (void)
 {
   int size = CT_SIZE * sizeof (*ct_table);
   ct_table = (struct ct_color **) xmalloc (size);
-  bzero (ct_table, size);
+  memset (ct_table, 0, size);
   ct_colors_allocated = 0;
 }
 
@@ -4285,7 +4160,7 @@
 /* Free memory associated with the color table.  */
 
 static void
-free_color_table ()
+free_color_table (void)
 {
   int i;
   struct ct_color *p, *next;
@@ -4308,9 +4183,7 @@
    G, B, and make an entry in the color table.  */
 
 static unsigned long
-lookup_rgb_color (f, r, g, b)
-     struct frame *f;
-     int r, g, b;
+lookup_rgb_color (struct frame *f, int r, int g, int b)
 {
   unsigned hash = CT_HASH_RGB (r, g, b);
   int i = hash % CT_SIZE;
@@ -4405,9 +4278,7 @@
    table.  If not already present, allocate it.  Value is PIXEL.  */
 
 static unsigned long
-lookup_pixel_color (f, pixel)
-     struct frame *f;
-     unsigned long pixel;
+lookup_pixel_color (struct frame *f, unsigned long pixel)
 {
   int i = pixel % CT_SIZE;
   struct ct_color *p;
@@ -4459,8 +4330,7 @@
    allocated via xmalloc.  Set *N to the number of colors.  */
 
 static unsigned long *
-colors_in_color_table (n)
-     int *n;
+colors_in_color_table (int *n)
 {
   int i, j;
   struct ct_color *p;
@@ -4515,9 +4385,9 @@
 			      Algorithms
  ***********************************************************************/
 
-static XColor *x_to_xcolors P_ ((struct frame *, struct image *, int));
-static void x_from_xcolors P_ ((struct frame *, struct image *, XColor *));
-static void x_detect_edges P_ ((struct frame *, struct image *, int[9], int));
+static XColor *x_to_xcolors (struct frame *, struct image *, int);
+static void x_from_xcolors (struct frame *, struct image *, XColor *);
+static void x_detect_edges (struct frame *, struct image *, int[9], int);
 
 #ifdef HAVE_NTGUI
 static void XPutPixel (XImagePtr , int, int, COLORREF);
@@ -4558,10 +4428,7 @@
    allocated with xmalloc; it must be freed by the caller.  */
 
 static XColor *
-x_to_xcolors (f, img, rgb_p)
-     struct frame *f;
-     struct image *img;
-     int rgb_p;
+x_to_xcolors (struct frame *f, struct image *img, int rgb_p)
 {
   int x, y;
   XColor *colors, *p;
@@ -4674,10 +4541,7 @@
    COLORS will be freed; an existing IMG->pixmap will be freed, too.  */
 
 static void
-x_from_xcolors (f, img, colors)
-     struct frame *f;
-     struct image *img;
-     XColor *colors;
+x_from_xcolors (struct frame *f, struct image *img, XColor *colors)
 {
   int x, y;
   XImagePtr oimg = NULL;
@@ -4719,10 +4583,7 @@
    outgoing image.  */
 
 static void
-x_detect_edges (f, img, matrix, color_adjust)
-     struct frame *f;
-     struct image *img;
-     int matrix[9], color_adjust;
+x_detect_edges (struct frame *f, struct image *img, int *matrix, int color_adjust)
 {
   XColor *colors = x_to_xcolors (f, img, 1);
   XColor *new, *p;
@@ -4788,9 +4649,7 @@
    on frame F.  */
 
 static void
-x_emboss (f, img)
-     struct frame *f;
-     struct image *img;
+x_emboss (struct frame *f, struct image *img)
 {
   x_detect_edges (f, img, emboss_matrix, 0xffff / 2);
 }
@@ -4801,9 +4660,7 @@
    to draw disabled buttons, for example.  */
 
 static void
-x_laplace (f, img)
-     struct frame *f;
-     struct image *img;
+x_laplace (struct frame *f, struct image *img)
 {
   x_detect_edges (f, img, laplace_matrix, 45000);
 }
@@ -4821,10 +4678,8 @@
    number.  */
 
 static void
-x_edge_detection (f, img, matrix, color_adjust)
-     struct frame *f;
-     struct image *img;
-     Lisp_Object matrix, color_adjust;
+x_edge_detection (struct frame *f, struct image *img, Lisp_Object matrix,
+		  Lisp_Object color_adjust)
 {
   int i = 0;
   int trans[9];
@@ -4853,9 +4708,7 @@
 /* Transform image IMG on frame F so that it looks disabled.  */
 
 static void
-x_disable_image (f, img)
-     struct frame *f;
-     struct image *img;
+x_disable_image (struct frame *f, struct image *img)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 #ifdef HAVE_NTGUI
@@ -4957,10 +4810,7 @@
    heuristically.  Value is non-zero if successful. */
 
 static int
-x_build_heuristic_mask (f, img, how)
-     struct frame *f;
-     struct image *img;
-     Lisp_Object how;
+x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
 {
   XImagePtr_or_DC ximg;
 #ifndef HAVE_NTGUI
@@ -4998,7 +4848,7 @@
   /* Create the bit array serving as mask.  */
   row_width = (img->width + 7) / 8;
   mask_img = xmalloc (row_width * img->height);
-  bzero (mask_img, row_width * img->height);
+  memset (mask_img, 0, row_width * img->height);
 
   /* Create a memory device context for IMG->pixmap.  */
   frame_dc = get_frame_dc (f);
@@ -5047,7 +4897,7 @@
 				  ? PIX_MASK_DRAW : PIX_MASK_RETAIN));
 #else
       if (XGetPixel (ximg, x, y) == bg)
-        ns_set_alpha(ximg, x, y, 0);
+        ns_set_alpha (ximg, x, y, 0);
 #endif /* HAVE_NS */
 #ifndef HAVE_NS
   /* Fill in the background_transparent field while we have the mask handy. */
@@ -5087,9 +4937,9 @@
 		       PBM (mono, gray, color)
  ***********************************************************************/
 
-static int pbm_image_p P_ ((Lisp_Object object));
-static int pbm_load P_ ((struct frame *f, struct image *img));
-static int pbm_scan_number P_ ((unsigned char **, unsigned char *));
+static int pbm_image_p (Lisp_Object object);
+static int pbm_load (struct frame *f, struct image *img);
+static int pbm_scan_number (unsigned char **, unsigned char *);
 
 /* The symbol `pbm' identifying images of this type.  */
 
@@ -5146,12 +4996,11 @@
 /* Return non-zero if OBJECT is a valid PBM image specification.  */
 
 static int
-pbm_image_p (object)
-     Lisp_Object object;
+pbm_image_p (Lisp_Object object)
 {
   struct image_keyword fmt[PBM_LAST];
 
-  bcopy (pbm_format, fmt, sizeof fmt);
+  memcpy (fmt, pbm_format, sizeof fmt);
 
   if (!parse_image_spec (object, fmt, PBM_LAST, Qpbm))
     return 0;
@@ -5166,8 +5015,7 @@
    end of input.  */
 
 static int
-pbm_scan_number (s, end)
-     unsigned char **s, *end;
+pbm_scan_number (unsigned char **s, unsigned char *end)
 {
   int c = 0, val = -1;
 
@@ -5242,9 +5090,7 @@
 /* Load PBM image IMG for use on frame F.  */
 
 static int
-pbm_load (f, img)
-     struct frame *f;
-     struct image *img;
+pbm_load (struct frame *f, struct image *img)
 {
   int raw_p, x, y;
   int width, height, max_color_idx = 0;
@@ -5366,7 +5212,7 @@
       unsigned long bg = FRAME_BACKGROUND_PIXEL (f);
 
       /* Parse the image specification.  */
-      bcopy (pbm_format, fmt, sizeof fmt);
+      memcpy (fmt, pbm_format, sizeof fmt);
       parse_image_spec (img->spec, fmt, PBM_LAST, Qpbm);
 
       /* Get foreground and background colors, maybe allocate colors.  */
@@ -5511,8 +5357,8 @@
 
 /* Function prototypes.  */
 
-static int png_image_p P_ ((Lisp_Object object));
-static int png_load P_ ((struct frame *f, struct image *img));
+static int png_image_p (Lisp_Object object);
+static int png_load (struct frame *f, struct image *img);
 
 /* The symbol `png' identifying images of this type.  */
 
@@ -5566,11 +5412,10 @@
 /* Return non-zero if OBJECT is a valid PNG image specification.  */
 
 static int
-png_image_p (object)
-     Lisp_Object object;
+png_image_p (Lisp_Object object)
 {
   struct image_keyword fmt[PNG_LAST];
-  bcopy (png_format, fmt, sizeof fmt);
+  memcpy (fmt, png_format, sizeof fmt);
 
   if (!parse_image_spec (object, fmt, PNG_LAST, Qpng))
     return 0;
@@ -5671,9 +5516,7 @@
    is initialized.  */
 
 static void
-my_png_error (png_ptr, msg)
-     png_struct *png_ptr;
-     char *msg;
+my_png_error (png_struct *png_ptr, const char *msg)
 {
   xassert (png_ptr != NULL);
   image_error ("PNG error: %s", build_string (msg), Qnil);
@@ -5682,9 +5525,7 @@
 
 
 static void
-my_png_warning (png_ptr, msg)
-     png_struct *png_ptr;
-     char *msg;
+my_png_warning (png_struct *png_ptr, const char *msg)
 {
   xassert (png_ptr != NULL);
   image_error ("PNG warning: %s", build_string (msg), Qnil);
@@ -5705,10 +5546,7 @@
    bytes from the input to DATA.  */
 
 static void
-png_read_from_memory (png_ptr, data, length)
-     png_structp png_ptr;
-     png_bytep data;
-     png_size_t length;
+png_read_from_memory (png_structp png_ptr, png_bytep data, png_size_t length)
 {
   struct png_memory_storage *tbr
     = (struct png_memory_storage *) fn_png_get_io_ptr (png_ptr);
@@ -5716,7 +5554,7 @@
   if (length > tbr->len - tbr->index)
     fn_png_error (png_ptr, "Read error");
 
-  bcopy (tbr->bytes + tbr->index, data, length);
+  memcpy (data, tbr->bytes + tbr->index, length);
   tbr->index = tbr->index + length;
 }
 
@@ -5726,10 +5564,7 @@
    bytes from the input to DATA.  */
 
 static void
-png_read_from_file (png_ptr, data, length)
-     png_structp png_ptr;
-     png_bytep data;
-     png_size_t length;
+png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length)
 {
   FILE *fp = (FILE *) fn_png_get_io_ptr (png_ptr);
 
@@ -5742,9 +5577,7 @@
    successful.  */
 
 static int
-png_load (f, img)
-     struct frame *f;
-     struct image *img;
+png_load (struct frame *f, struct image *img)
 {
   Lisp_Object file, specified_file;
   Lisp_Object specified_data;
@@ -5923,7 +5756,7 @@
 	    {
 	      png_color_16 user_bg;
 
-	      bzero (&user_bg, sizeof user_bg);
+	      memset (&user_bg, 0, sizeof user_bg);
 	      user_bg.red = color.red >> shift;
 	      user_bg.green = color.green >> shift;
 	      user_bg.blue = color.blue >> shift;
@@ -5943,7 +5776,7 @@
 	  color.pixel = FRAME_BACKGROUND_PIXEL (f);
 	  x_query_color (f, &color);
 
-	  bzero (&frame_background, sizeof frame_background);
+	  memset (&frame_background, 0, sizeof frame_background);
 	  frame_background.red = color.red >> shift;
 	  frame_background.green = color.green >> shift;
 	  frame_background.blue = color.blue >> shift;
@@ -6113,8 +5946,8 @@
 
 #if defined (HAVE_JPEG) || defined (HAVE_NS)
 
-static int jpeg_image_p P_ ((Lisp_Object object));
-static int jpeg_load P_ ((struct frame *f, struct image *img));
+static int jpeg_image_p (Lisp_Object object);
+static int jpeg_load (struct frame *f, struct image *img);
 
 /* The symbol `jpeg' identifying images of this type.  */
 
@@ -6168,12 +6001,11 @@
 /* Return non-zero if OBJECT is a valid JPEG image specification.  */
 
 static int
-jpeg_image_p (object)
-     Lisp_Object object;
+jpeg_image_p (Lisp_Object object)
 {
   struct image_keyword fmt[JPEG_LAST];
 
-  bcopy (jpeg_format, fmt, sizeof fmt);
+  memcpy (fmt, jpeg_format, sizeof fmt);
 
   if (!parse_image_spec (object, fmt, JPEG_LAST, Qjpeg))
     return 0;
@@ -6268,8 +6100,7 @@
 
 
 static void
-my_error_exit (cinfo)
-     j_common_ptr cinfo;
+my_error_exit (j_common_ptr cinfo)
 {
   struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err;
   longjmp (mgr->setjmp_buffer, 1);
@@ -6281,8 +6112,7 @@
    libjpeg.doc from the JPEG lib distribution.  */
 
 static void
-our_common_init_source (cinfo)
-     j_decompress_ptr cinfo;
+our_common_init_source (j_decompress_ptr cinfo)
 {
 }
 
@@ -6291,8 +6121,7 @@
    jpeg_finish_decompress() after all data has been processed.  */
 
 static void
-our_common_term_source (cinfo)
-     j_decompress_ptr cinfo;
+our_common_term_source (j_decompress_ptr cinfo)
 {
 }
 
@@ -6304,8 +6133,7 @@
 static JOCTET our_memory_buffer[2];
 
 static boolean
-our_memory_fill_input_buffer (cinfo)
-     j_decompress_ptr cinfo;
+our_memory_fill_input_buffer (j_decompress_ptr cinfo)
 {
   /* Insert a fake EOI marker.  */
   struct jpeg_source_mgr *src = cinfo->src;
@@ -6323,9 +6151,7 @@
    is the JPEG data source manager.  */
 
 static void
-our_memory_skip_input_data (cinfo, num_bytes)
-     j_decompress_ptr cinfo;
-     long num_bytes;
+our_memory_skip_input_data (j_decompress_ptr cinfo, long int num_bytes)
 {
   struct jpeg_source_mgr *src = (struct jpeg_source_mgr *) cinfo->src;
 
@@ -6345,10 +6171,7 @@
    reading the image.  */
 
 static void
-jpeg_memory_src (cinfo, data, len)
-     j_decompress_ptr cinfo;
-     JOCTET *data;
-     unsigned int len;
+jpeg_memory_src (j_decompress_ptr cinfo, JOCTET *data, unsigned int len)
 {
   struct jpeg_source_mgr *src;
 
@@ -6391,8 +6214,7 @@
    whenever more data is needed.  The data is read from a FILE *.  */
 
 static boolean
-our_stdio_fill_input_buffer (cinfo)
-     j_decompress_ptr cinfo;
+our_stdio_fill_input_buffer (j_decompress_ptr cinfo)
 {
   struct jpeg_stdio_mgr *src;
 
@@ -6423,9 +6245,7 @@
    is the JPEG data source manager.  */
 
 static void
-our_stdio_skip_input_data (cinfo, num_bytes)
-     j_decompress_ptr cinfo;
-     long num_bytes;
+our_stdio_skip_input_data (j_decompress_ptr cinfo, long int num_bytes)
 {
   struct jpeg_stdio_mgr *src;
   src = (struct jpeg_stdio_mgr *) cinfo->src;
@@ -6455,9 +6275,7 @@
    reading the image.  */
 
 static void
-jpeg_file_src (cinfo, fp)
-     j_decompress_ptr cinfo;
-     FILE *fp;
+jpeg_file_src (j_decompress_ptr cinfo, FILE *fp)
 {
   struct jpeg_stdio_mgr *src;
 
@@ -6491,9 +6309,7 @@
    from the JPEG lib.  */
 
 static int
-jpeg_load (f, img)
-     struct frame *f;
-     struct image *img;
+jpeg_load (struct frame *f, struct image *img)
 {
   struct jpeg_decompress_struct cinfo;
   struct my_jpeg_error_mgr mgr;
@@ -6669,9 +6485,9 @@
 static int
 jpeg_load (struct frame *f, struct image *img)
 {
-  return ns_load_image(f, img,
-                       image_spec_value (img->spec, QCfile, NULL),
-                       image_spec_value (img->spec, QCdata, NULL));
+  return ns_load_image (f, img,
+			image_spec_value (img->spec, QCfile, NULL),
+			image_spec_value (img->spec, QCdata, NULL));
 }
 #endif  /* HAVE_NS */
 
@@ -6685,8 +6501,8 @@
 
 #if defined (HAVE_TIFF) || defined (HAVE_NS)
 
-static int tiff_image_p P_ ((Lisp_Object object));
-static int tiff_load P_ ((struct frame *f, struct image *img));
+static int tiff_image_p (Lisp_Object object);
+static int tiff_load (struct frame *f, struct image *img);
 
 /* The symbol `tiff' identifying images of this type.  */
 
@@ -6742,11 +6558,10 @@
 /* Return non-zero if OBJECT is a valid TIFF image specification.  */
 
 static int
-tiff_image_p (object)
-     Lisp_Object object;
+tiff_image_p (Lisp_Object object)
 {
   struct image_keyword fmt[TIFF_LAST];
-  bcopy (tiff_format, fmt, sizeof fmt);
+  memcpy (fmt, tiff_format, sizeof fmt);
 
   if (!parse_image_spec (object, fmt, TIFF_LAST, Qtiff))
     return 0;
@@ -6823,34 +6638,25 @@
 tiff_memory_source;
 
 static size_t
-tiff_read_from_memory (data, buf, size)
-     thandle_t data;
-     tdata_t buf;
-     tsize_t size;
+tiff_read_from_memory (thandle_t data, tdata_t buf, tsize_t size)
 {
   tiff_memory_source *src = (tiff_memory_source *) data;
 
   if (size > src->len - src->index)
     return (size_t) -1;
-  bcopy (src->bytes + src->index, buf, size);
+  memcpy (buf, src->bytes + src->index, size);
   src->index += size;
   return size;
 }
 
 static size_t
-tiff_write_from_memory (data, buf, size)
-     thandle_t data;
-     tdata_t buf;
-     tsize_t size;
+tiff_write_from_memory (thandle_t data, tdata_t buf, tsize_t size)
 {
   return (size_t) -1;
 }
 
 static toff_t
-tiff_seek_in_memory (data, off, whence)
-     thandle_t data;
-     toff_t off;
-     int whence;
+tiff_seek_in_memory (thandle_t data, toff_t off, int whence)
 {
   tiff_memory_source *src = (tiff_memory_source *) data;
   int idx;
@@ -6881,44 +6687,34 @@
 }
 
 static int
-tiff_close_memory (data)
-     thandle_t data;
+tiff_close_memory (thandle_t data)
 {
   /* NOOP */
   return 0;
 }
 
 static int
-tiff_mmap_memory (data, pbase, psize)
-     thandle_t data;
-     tdata_t *pbase;
-     toff_t *psize;
+tiff_mmap_memory (thandle_t data, tdata_t *pbase, toff_t *psize)
 {
   /* It is already _IN_ memory. */
   return 0;
 }
 
 static void
-tiff_unmap_memory (data, base, size)
-     thandle_t data;
-     tdata_t base;
-     toff_t size;
+tiff_unmap_memory (thandle_t data, tdata_t base, toff_t size)
 {
   /* We don't need to do this. */
 }
 
 static toff_t
-tiff_size_of_memory (data)
-     thandle_t data;
+tiff_size_of_memory (thandle_t data)
 {
   return ((tiff_memory_source *) data)->len;
 }
 
 
 static void
-tiff_error_handler (title, format, ap)
-     const char *title, *format;
-     va_list ap;
+tiff_error_handler (const char *title, const char *format, va_list ap)
 {
   char buf[512];
   int len;
@@ -6930,9 +6726,7 @@
 
 
 static void
-tiff_warning_handler (title, format, ap)
-     const char *title, *format;
-     va_list ap;
+tiff_warning_handler (const char *title, const char *format, va_list ap)
 {
   char buf[512];
   int len;
@@ -6947,9 +6741,7 @@
    successful.  */
 
 static int
-tiff_load (f, img)
-     struct frame *f;
-     struct image *img;
+tiff_load (struct frame *f, struct image *img)
 {
   Lisp_Object file, specified_file;
   Lisp_Object specified_data;
@@ -7120,9 +6912,9 @@
 static int
 tiff_load (struct frame *f, struct image *img)
 {
-  return ns_load_image(f, img,
-                       image_spec_value (img->spec, QCfile, NULL),
-                       image_spec_value (img->spec, QCdata, NULL));
+  return ns_load_image (f, img,
+                        image_spec_value (img->spec, QCfile, NULL),
+                        image_spec_value (img->spec, QCdata, NULL));
 }
 #endif  /* HAVE_NS */
 
@@ -7136,9 +6928,9 @@
 
 #if defined (HAVE_GIF) || defined (HAVE_NS)
 
-static int gif_image_p P_ ((Lisp_Object object));
-static int gif_load P_ ((struct frame *f, struct image *img));
-static void gif_clear_image P_ ((struct frame *f, struct image *img));
+static int gif_image_p (Lisp_Object object);
+static int gif_load (struct frame *f, struct image *img);
+static void gif_clear_image (struct frame *f, struct image *img);
 
 /* The symbol `gif' identifying images of this type.  */
 
@@ -7194,9 +6986,7 @@
 /* Free X resources of GIF image IMG which is used on frame F.  */
 
 static void
-gif_clear_image (f, img)
-     struct frame *f;
-     struct image *img;
+gif_clear_image (struct frame *f, struct image *img)
 {
   /* IMG->data.ptr_val may contain metadata with extension data.  */
   img->data.lisp_val = Qnil;
@@ -7206,11 +6996,10 @@
 /* Return non-zero if OBJECT is a valid GIF image specification.  */
 
 static int
-gif_image_p (object)
-     Lisp_Object object;
+gif_image_p (Lisp_Object object)
 {
   struct image_keyword fmt[GIF_LAST];
-  bcopy (gif_format, fmt, sizeof fmt);
+  memcpy (fmt, gif_format, sizeof fmt);
 
   if (!parse_image_spec (object, fmt, GIF_LAST, Qgif))
     return 0;
@@ -7290,17 +7079,14 @@
 static gif_memory_source *current_gif_memory_src;
 
 static int
-gif_read_from_memory (file, buf, len)
-     GifFileType *file;
-     GifByteType *buf;
-     int len;
+gif_read_from_memory (GifFileType *file, GifByteType *buf, int len)
 {
   gif_memory_source *src = current_gif_memory_src;
 
   if (len > src->len - src->index)
     return -1;
 
-  bcopy (src->bytes + src->index, buf, len);
+  memcpy (buf, src->bytes + src->index, len);
   src->index += len;
   return len;
 }
@@ -7313,9 +7099,7 @@
 static const int interlace_increment[] = {8, 8, 4, 2};
 
 static int
-gif_load (f, img)
-     struct frame *f;
-     struct image *img;
+gif_load (struct frame *f, struct image *img)
 {
   Lisp_Object file, specified_file;
   Lisp_Object specified_data;
@@ -7438,7 +7222,7 @@
   if (!gif_color_map)
     gif_color_map = gif->SColorMap;
   init_color_table ();
-  bzero (pixel_colors, sizeof pixel_colors);
+  memset (pixel_colors, 0, sizeof pixel_colors);
 
   if (gif_color_map)
     for (i = 0; i < gif_color_map->ColorCount; ++i)
@@ -7558,9 +7342,9 @@
 static int
 gif_load (struct frame *f, struct image *img)
 {
-  return ns_load_image(f, img,
-                       image_spec_value (img->spec, QCfile, NULL),
-                       image_spec_value (img->spec, QCdata, NULL));
+  return ns_load_image (f, img,
+                        image_spec_value (img->spec, QCfile, NULL),
+			image_spec_value (img->spec, QCdata, NULL));
 }
 #endif /* HAVE_NS */
 
@@ -7576,11 +7360,11 @@
 
 /* Function prototypes.  */
 
-static int svg_image_p P_ ((Lisp_Object object));
-static int svg_load P_ ((struct frame *f, struct image *img));
-
-static int svg_load_image P_ ((struct frame *, struct image *,
-			       unsigned char *, unsigned int));
+static int svg_image_p (Lisp_Object object);
+static int svg_load (struct frame *f, struct image *img);
+
+static int svg_load_image (struct frame *, struct image *,
+                           unsigned char *, unsigned int);
 
 /* The symbol `svg' identifying images of this type. */
 
@@ -7645,11 +7429,10 @@
    identify the SVG format.   */
 
 static int
-svg_image_p (object)
-     Lisp_Object object;
+svg_image_p (Lisp_Object object)
 {
   struct image_keyword fmt[SVG_LAST];
-  bcopy (svg_format, fmt, sizeof fmt);
+  memcpy (fmt, svg_format, sizeof fmt);
 
   if (!parse_image_spec (object, fmt, SVG_LAST, Qsvg))
     return 0;
@@ -7748,9 +7531,7 @@
    the prototype thus needs to be compatible with that structure.  */
 
 static int
-svg_load (f, img)
-     struct frame *f;
-     struct image *img;
+svg_load (struct frame *f, struct image *img)
 {
   int success_p = 0;
   Lisp_Object file_name;
@@ -7807,15 +7588,10 @@
 
    Returns non-zero when successful.  */
 static int
-svg_load_image (f, img, contents, size)
-    /* Pointer to emacs frame structure.  */
-     struct frame *f;
-     /* Pointer to emacs image structure.  */
-     struct image *img;
-     /* String containing the SVG XML data to be parsed.  */
-     unsigned char *contents;
-     /* Size of data in bytes.  */
-     unsigned int size;
+svg_load_image (struct frame *f,         /* Pointer to emacs frame structure.  */
+		struct image *img,       /* Pointer to emacs image structure.  */
+		unsigned char *contents, /* String containing the SVG XML data to be parsed.  */
+		unsigned int size)       /* Size of data in bytes.  */
 {
   RsvgHandle *rsvg_handle;
   RsvgDimensionData dimension_data;
@@ -7890,7 +7666,7 @@
       background.pixel = FRAME_BACKGROUND_PIXEL (f);
       x_query_color (f, &background);
 #else
-      ns_query_color(FRAME_BACKGROUND_COLOR (f), &background, 1);
+      ns_query_color (FRAME_BACKGROUND_COLOR (f), &background, 1);
 #endif
     }
 
@@ -7982,9 +7758,9 @@
 
 #ifdef HAVE_GHOSTSCRIPT
 
-static int gs_image_p P_ ((Lisp_Object object));
-static int gs_load P_ ((struct frame *f, struct image *img));
-static void gs_clear_image P_ ((struct frame *f, struct image *img));
+static int gs_image_p (Lisp_Object object);
+static int gs_load (struct frame *f, struct image *img);
+static void gs_clear_image (struct frame *f, struct image *img);
 
 /* Keyword symbols.  */
 
@@ -8045,9 +7821,7 @@
 /* Free X resources of Ghostscript image IMG which is used on frame F.  */
 
 static void
-gs_clear_image (f, img)
-     struct frame *f;
-     struct image *img;
+gs_clear_image (struct frame *f, struct image *img)
 {
   /* IMG->data.ptr_val may contain a recorded colormap.  */
   xfree (img->data.ptr_val);
@@ -8059,14 +7833,13 @@
    specification.  */
 
 static int
-gs_image_p (object)
-     Lisp_Object object;
+gs_image_p (Lisp_Object object)
 {
   struct image_keyword fmt[GS_LAST];
   Lisp_Object tem;
   int i;
 
-  bcopy (gs_format, fmt, sizeof fmt);
+  memcpy (fmt, gs_format, sizeof fmt);
 
   if (!parse_image_spec (object, fmt, GS_LAST, Qpostscript))
     return 0;
@@ -8100,9 +7873,7 @@
    if successful.  */
 
 static int
-gs_load (f, img)
-     struct frame *f;
-     struct image *img;
+gs_load (struct frame *f, struct image *img)
 {
   char buffer[100];
   Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width;
@@ -8180,9 +7951,7 @@
    telling Emacs that Ghostscript has finished drawing.  */
 
 void
-x_kill_gs_process (pixmap, f)
-     Pixmap pixmap;
-     struct frame *f;
+x_kill_gs_process (Pixmap pixmap, struct frame *f)
 {
   struct image_cache *c = FRAME_IMAGE_CACHE (f);
   int class, i;
@@ -8375,7 +8144,7 @@
 }
 
 void
-syms_of_image ()
+syms_of_image (void)
 {
   extern Lisp_Object Qrisky_local_variable;   /* Syms_of_xdisp has already run.  */
 
@@ -8560,7 +8329,7 @@
 }
 
 void
-init_image ()
+init_image (void)
 {
 }
 
--- a/src/indent.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/indent.c	Thu Jul 08 17:09:35 2010 +0900
@@ -61,8 +61,8 @@
 
 static int last_known_column_modified;
 
-static double current_column_1 P_ ((void));
-static double position_indentation P_ ((int));
+static double current_column_1 (void);
+static double position_indentation (int);
 
 /* Cache of beginning of line found by the last call of
    current_column. */
@@ -72,7 +72,7 @@
 /* Get the display table to use for the current buffer.  */
 
 struct Lisp_Char_Table *
-buffer_display_table ()
+buffer_display_table (void)
 {
   Lisp_Object thisbuf;
 
@@ -89,9 +89,7 @@
 /* Return the width of character C under display table DP.  */
 
 static int
-character_width (c, dp)
-     int c;
-     struct Lisp_Char_Table *dp;
+character_width (int c, struct Lisp_Char_Table *dp)
 {
   Lisp_Object elt;
 
@@ -125,9 +123,7 @@
    invalidate the buffer's width_run_cache.  */
 
 int
-disptab_matches_widthtab (disptab, widthtab)
-     struct Lisp_Char_Table *disptab;
-     struct Lisp_Vector *widthtab;
+disptab_matches_widthtab (struct Lisp_Char_Table *disptab, struct Lisp_Vector *widthtab)
 {
   int i;
 
@@ -145,9 +141,7 @@
 /* Recompute BUF's width table, using the display table DISPTAB.  */
 
 void
-recompute_width_table (buf, disptab)
-     struct buffer *buf;
-     struct Lisp_Char_Table *disptab;
+recompute_width_table (struct buffer *buf, struct Lisp_Char_Table *disptab)
 {
   int i;
   struct Lisp_Vector *widthtab;
@@ -166,7 +160,7 @@
    state of current_buffer's cache_long_line_scans variable.  */
 
 static void
-width_run_cache_on_off ()
+width_run_cache_on_off (void)
 {
   if (NILP (current_buffer->cache_long_line_scans)
       /* And, for the moment, this feature doesn't work on multibyte
@@ -217,11 +211,7 @@
    will equal the return value.  */
 
 EMACS_INT
-skip_invisible (pos, next_boundary_p, to, window)
-     EMACS_INT pos;
-     EMACS_INT *next_boundary_p;
-     EMACS_INT to;
-     Lisp_Object window;
+skip_invisible (EMACS_INT pos, EMACS_INT *next_boundary_p, EMACS_INT to, Lisp_Object window)
 {
   Lisp_Object prop, position, overlay_limit, proplimit;
   Lisp_Object buffer, tmp;
@@ -332,13 +322,13 @@
 /* Cancel any recorded value of the horizontal position.  */
 
 void
-invalidate_current_column ()
+invalidate_current_column (void)
 {
   last_known_column_point = 0;
 }
 
 double
-current_column ()
+current_column (void)
 {
   register int col;
   register unsigned char *ptr, *stop;
@@ -556,7 +546,7 @@
   w = ! NILP (window) ? XWINDOW (window) : NULL;
 
   if (tab_width <= 0 || tab_width > 1000) tab_width = 8;
-  bzero (&cmp_it, sizeof cmp_it);
+  memset (&cmp_it, 0, sizeof cmp_it);
   cmp_it.id = -1;
   composition_compute_stop_pos (&cmp_it, scan, scan_byte, end, Qnil);
 
@@ -723,7 +713,7 @@
    due to text properties or overlays.  */
 
 static double
-current_column_1 ()
+current_column_1 (void)
 {
   EMACS_INT col = MOST_POSITIVE_FIXNUM;
   EMACS_INT opoint = PT;
@@ -867,7 +857,7 @@
 }
 
 
-static double position_indentation P_ ((int));
+static double position_indentation (int);
 
 DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation,
        0, 0, 0,
@@ -887,8 +877,7 @@
 }
 
 static double
-position_indentation (pos_byte)
-     register int pos_byte;
+position_indentation (register int pos_byte)
 {
   register EMACS_INT column = 0;
   register EMACS_INT tab_width = XINT (current_buffer->tab_width);
@@ -977,9 +966,7 @@
    preceding line.  */
 
 int
-indented_beyond_p (pos, pos_byte, column)
-     int pos, pos_byte;
-     double column;
+indented_beyond_p (int pos, int pos_byte, double column)
 {
   double val;
   int opoint = PT, opoint_byte = PT_BYTE;
@@ -1137,12 +1124,7 @@
    the scroll bars if they are turned on.  */
 
 struct position *
-compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, hscroll, tab_offset, win)
-     EMACS_INT from, fromvpos, fromhpos, to, tovpos, tohpos;
-     int did_motion;
-     EMACS_INT width;
-     EMACS_INT hscroll, tab_offset;
-     struct window *win;
+compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_motion, EMACS_INT to, EMACS_INT tovpos, EMACS_INT tohpos, EMACS_INT width, EMACS_INT hscroll, EMACS_INT tab_offset, struct window *win)
 {
   register EMACS_INT hpos = fromhpos;
   register EMACS_INT vpos = fromvpos;
@@ -1232,7 +1214,7 @@
   pos_byte = prev_pos_byte = CHAR_TO_BYTE (from);
   contin_hpos = 0;
   prev_tab_offset = tab_offset;
-  bzero (&cmp_it, sizeof cmp_it);
+  memset (&cmp_it, 0, sizeof cmp_it);
   cmp_it.id = -1;
   composition_compute_stop_pos (&cmp_it, pos, pos_byte, to, Qnil);
 
@@ -1856,9 +1838,7 @@
 struct position val_vmotion;
 
 struct position *
-vmotion (from, vtarget, w)
-     register EMACS_INT from, vtarget;
-     struct window *w;
+vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w)
 {
   EMACS_INT hscroll = XINT (w->hscroll);
   struct position pos;
@@ -2183,7 +2163,7 @@
 /* File's initialization.  */
 
 void
-syms_of_indent ()
+syms_of_indent (void)
 {
   DEFVAR_BOOL ("indent-tabs-mode", &indent_tabs_mode,
 	       doc: /* *Indentation can insert tabs if this is non-nil.  */);
--- a/src/indent.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/indent.h	Thu Jul 08 17:09:35 2010 +0900
@@ -49,16 +49,16 @@
     EMACS_INT tab_offset;
   };
 
-struct position *compute_motion P_ ((EMACS_INT from, EMACS_INT fromvpos,
-				     EMACS_INT fromhpos, int did_motion,
-				     EMACS_INT to, EMACS_INT tovpos,
-				     EMACS_INT tohpos,
-				     EMACS_INT width, EMACS_INT hscroll,
-				     EMACS_INT tab_offset, struct window *));
-struct position *vmotion P_ ((EMACS_INT from, EMACS_INT vtarget,
-			      struct window *));
-EMACS_INT skip_invisible P_ ((EMACS_INT pos, EMACS_INT *next_boundary_p,
-			      EMACS_INT to, Lisp_Object window));
+struct position *compute_motion (EMACS_INT from, EMACS_INT fromvpos,
+                                 EMACS_INT fromhpos, int did_motion,
+                                 EMACS_INT to, EMACS_INT tovpos,
+                                 EMACS_INT tohpos,
+                                 EMACS_INT width, EMACS_INT hscroll,
+                                 EMACS_INT tab_offset, struct window *);
+struct position *vmotion (EMACS_INT from, EMACS_INT vtarget,
+                          struct window *);
+EMACS_INT skip_invisible (EMACS_INT pos, EMACS_INT *next_boundary_p,
+                          EMACS_INT to, Lisp_Object window);
 
 /* Value of point when current_column was called */
 extern EMACS_INT last_known_column_point;
@@ -68,12 +68,12 @@
 /* Return true if the display table DISPTAB specifies the same widths
    for characters as WIDTHTAB.  We use this to decide when to
    invalidate the buffer's column_cache.  */
-int disptab_matches_widthtab P_ ((struct Lisp_Char_Table *disptab,
-				  struct Lisp_Vector *widthtab));
+int disptab_matches_widthtab (struct Lisp_Char_Table *disptab,
+                              struct Lisp_Vector *widthtab);
 
 /* Recompute BUF's width table, using the display table DISPTAB.  */
-void recompute_width_table P_ ((struct buffer *buf,
-				struct Lisp_Char_Table *disptab));
+void recompute_width_table (struct buffer *buf,
+                            struct Lisp_Char_Table *disptab);
 
 
 /* arch-tag: f9feb373-5bff-4f4f-9198-94805d00cfd7
--- a/src/insdel.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/insdel.c	Thu Jul 08 17:09:35 2010 +0900
@@ -51,7 +51,7 @@
 					EMACS_INT, EMACS_INT, EMACS_INT);
 static void adjust_point (EMACS_INT nchars, EMACS_INT nbytes);
 
-Lisp_Object Fcombine_after_change_execute ();
+Lisp_Object Fcombine_after_change_execute (void);
 
 /* Non-nil means don't call the after-change-functions right away,
    just record an element in combine_after_change_list.  */
@@ -85,7 +85,7 @@
   else
 
 void
-check_markers ()
+check_markers (void)
 {
   register struct Lisp_Marker *tail;
   int multibyte = ! NILP (current_buffer->enable_multibyte_characters);
@@ -164,28 +164,9 @@
       /* Move at most 32000 chars before checking again for a quit.  */
       if (i > 32000)
 	i = 32000;
-#ifdef GAP_USE_BCOPY
-      if (i >= 128
-	  /* bcopy is safe if the two areas of memory do not overlap
-	     or on systems where bcopy is always safe for moving upward.  */
-	  && (BCOPY_UPWARD_SAFE
-	      || to - from >= 128))
-	{
-	  /* If overlap is not safe, avoid it by not moving too many
-	     characters at once.  */
-	  if (!BCOPY_UPWARD_SAFE && i > to - from)
-	    i = to - from;
-	  new_s1 -= i;
-	  from -= i, to -= i;
-	  bcopy (from, to, i);
-	}
-      else
-#endif
-	{
-	  new_s1 -= i;
-	  while (--i >= 0)
-	    *--to = *--from;
-	}
+      new_s1 -= i;
+      from -= i, to -= i;
+      memmove (to, from, i);
     }
 
   /* Adjust markers, and buffer data structure, to put the gap at BYTEPOS.
@@ -238,28 +219,9 @@
       /* Move at most 32000 chars before checking again for a quit.  */
       if (i > 32000)
 	i = 32000;
-#ifdef GAP_USE_BCOPY
-      if (i >= 128
-	  /* bcopy is safe if the two areas of memory do not overlap
-	     or on systems where bcopy is always safe for moving downward.  */
-	  && (BCOPY_DOWNWARD_SAFE
-	      || from - to >= 128))
-	{
-	  /* If overlap is not safe, avoid it by not moving too many
-	     characters at once.  */
-	  if (!BCOPY_DOWNWARD_SAFE && i > from - to)
-	    i = from - to;
-	  new_s1 += i;
-	  bcopy (from, to, i);
-	  from += i, to += i;
-	}
-      else
-#endif
-	{
-	  new_s1 += i;
-	  while (--i >= 0)
-	    *to++ = *from++;
-	}
+      new_s1 += i;
+      memmove (to, from, i);
+      from += i, to += i;
     }
 
   adjust_markers_gap_motion (GPT_BYTE + GAP_SIZE, bytepos + GAP_SIZE,
@@ -585,7 +547,7 @@
   /* Pretend that the last unwanted part of the gap is the entire gap,
      and that the first desired part of the gap is part of the buffer
      text.  */
-  bzero (GPT_ADDR, new_gap_size);
+  memset (GPT_ADDR, 0, new_gap_size);
   GPT += new_gap_size;
   GPT_BYTE += new_gap_size;
   Z += new_gap_size;
@@ -636,7 +598,7 @@
 {
   if (from_multibyte == to_multibyte)
     {
-      bcopy (from_addr, to_addr, nbytes);
+      memcpy (to_addr, from_addr, nbytes);
       return nbytes;
     }
   else if (from_multibyte)
@@ -966,7 +928,7 @@
   MODIFF++;
   CHARS_MODIFF = MODIFF;
 
-  bcopy (string, GPT_ADDR, nbytes);
+  memcpy (GPT_ADDR, string, nbytes);
 
   GAP_SIZE -= nbytes;
   GPT += nchars;
@@ -1007,7 +969,7 @@
    copy them into the buffer.
 
    It does not work to use `insert' for this, because a GC could happen
-   before we bcopy the stuff into the buffer, and relocate the string
+   before we copy the stuff into the buffer, and relocate the string
    without insert noticing.  */
 
 void
@@ -1182,7 +1144,7 @@
    into the current buffer.
 
    It does not work to use `insert' for this, because a malloc could happen
-   and relocate BUF's text before the bcopy happens.  */
+   and relocate BUF's text before the copy happens.  */
 
 void
 insert_from_buffer (struct buffer *buf,
@@ -1712,7 +1674,7 @@
     make_gap (insbytes - GAP_SIZE);
 
   /* Copy the replacement text into the buffer.  */
-  bcopy (ins, GPT_ADDR, insbytes);
+  memcpy (GPT_ADDR, ins, insbytes);
 
 #ifdef BYTE_COMBINING_DEBUG
   /* We have copied text into the gap, but we have not marked
@@ -2132,8 +2094,7 @@
    NO-ERROR-FLAG is nil if there was an error,
    anything else meaning no error (so this function does nothing).  */
 Lisp_Object
-reset_var_on_error (val)
-     Lisp_Object val;
+reset_var_on_error (Lisp_Object val)
 {
   if (NILP (XCDR (val)))
     Fset (XCAR (val), Qnil);
@@ -2297,8 +2258,7 @@
 }
 
 Lisp_Object
-Fcombine_after_change_execute_1 (val)
-     Lisp_Object val;
+Fcombine_after_change_execute_1 (Lisp_Object val)
 {
   Vcombine_after_change_calls = val;
   return val;
@@ -2390,7 +2350,7 @@
 }
 
 void
-syms_of_insdel ()
+syms_of_insdel (void)
 {
   staticpro (&combine_after_change_list);
   staticpro (&combine_after_change_buffer);
--- a/src/intervals.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/intervals.c	Thu Jul 08 17:09:35 2010 +0900
@@ -52,9 +52,9 @@
 
 #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set))
 
-Lisp_Object merge_properties_sticky ();
-static INTERVAL reproduce_tree P_ ((INTERVAL, INTERVAL));
-static INTERVAL reproduce_tree_obj P_ ((INTERVAL, Lisp_Object));
+Lisp_Object merge_properties_sticky (Lisp_Object pleft, Lisp_Object pright);
+static INTERVAL reproduce_tree (INTERVAL, INTERVAL);
+static INTERVAL reproduce_tree_obj (INTERVAL, Lisp_Object);
 
 /* Utility functions for intervals.  */
 
@@ -62,8 +62,7 @@
 /* Create the root interval of some object, a buffer or string.  */
 
 INTERVAL
-create_root_interval (parent)
-     Lisp_Object parent;
+create_root_interval (Lisp_Object parent)
 {
   INTERVAL new;
 
@@ -95,8 +94,7 @@
 /* Make the interval TARGET have exactly the properties of SOURCE */
 
 void
-copy_properties (source, target)
-     register INTERVAL source, target;
+copy_properties (register INTERVAL source, register INTERVAL target)
 {
   if (DEFAULT_INTERVAL_P (source) && DEFAULT_INTERVAL_P (target))
     return;
@@ -110,8 +108,7 @@
    is added to TARGET if TARGET has no such property as yet.  */
 
 static void
-merge_properties (source, target)
-     register INTERVAL source, target;
+merge_properties (register INTERVAL source, register INTERVAL target)
 {
   register Lisp_Object o, sym, val;
 
@@ -149,8 +146,7 @@
    0 otherwise.  */
 
 int
-intervals_equal (i0, i1)
-     INTERVAL i0, i1;
+intervals_equal (INTERVAL i0, INTERVAL i1)
 {
   register Lisp_Object i0_cdr, i0_sym;
   register Lisp_Object i1_cdr, i1_val;
@@ -206,10 +202,7 @@
    Pass FUNCTION two args: an interval, and ARG.  */
 
 void
-traverse_intervals_noorder (tree, function, arg)
-     INTERVAL tree;
-     void (* function) P_ ((INTERVAL, Lisp_Object));
-     Lisp_Object arg;
+traverse_intervals_noorder (INTERVAL tree, void (*function) (INTERVAL, Lisp_Object), Lisp_Object arg)
 {
   /* Minimize stack usage.  */
   while (!NULL_INTERVAL_P (tree))
@@ -229,11 +222,7 @@
    Pass FUNCTION two args: an interval, and ARG.  */
 
 void
-traverse_intervals (tree, position, function, arg)
-     INTERVAL tree;
-     int position;
-     void (* function) P_ ((INTERVAL, Lisp_Object));
-     Lisp_Object arg;
+traverse_intervals (INTERVAL tree, int position, void (*function) (INTERVAL, Lisp_Object), Lisp_Object arg)
 {
   while (!NULL_INTERVAL_P (tree))
     {
@@ -323,8 +312,7 @@
 */
 
 static INLINE INTERVAL
-rotate_right (interval)
-     INTERVAL interval;
+rotate_right (INTERVAL interval)
 {
   INTERVAL i;
   INTERVAL B = interval->left;
@@ -371,8 +359,7 @@
 */
 
 static INLINE INTERVAL
-rotate_left (interval)
-     INTERVAL interval;
+rotate_left (INTERVAL interval)
 {
   INTERVAL i;
   INTERVAL B = interval->right;
@@ -413,8 +400,7 @@
    themselves are already balanced.  */
 
 static INTERVAL
-balance_an_interval (i)
-     INTERVAL i;
+balance_an_interval (INTERVAL i)
 {
   register int old_diff, new_diff;
 
@@ -451,8 +437,7 @@
    Lisp Object.  */
 
 static INLINE INTERVAL
-balance_possible_root_interval (interval)
-     register INTERVAL interval;
+balance_possible_root_interval (register INTERVAL interval)
 {
   Lisp_Object parent;
   int have_parent = 0;
@@ -482,8 +467,7 @@
    (the amount of text).  */
 
 static INTERVAL
-balance_intervals_internal (tree)
-     register INTERVAL tree;
+balance_intervals_internal (register INTERVAL tree)
 {
   /* Balance within each side.  */
   if (tree->left)
@@ -496,8 +480,7 @@
 /* Advertised interface to balance intervals.  */
 
 INTERVAL
-balance_intervals (tree)
-     INTERVAL tree;
+balance_intervals (INTERVAL tree)
 {
   if (tree == NULL_INTERVAL)
     return NULL_INTERVAL;
@@ -519,9 +502,7 @@
    it is still a root after this operation.  */
 
 INTERVAL
-split_interval_right (interval, offset)
-     INTERVAL interval;
-     int offset;
+split_interval_right (INTERVAL interval, int offset)
 {
   INTERVAL new = make_interval ();
   int position = interval->position;
@@ -566,9 +547,7 @@
    it is still a root after this operation.  */
 
 INTERVAL
-split_interval_left (interval, offset)
-     INTERVAL interval;
-     int offset;
+split_interval_left (INTERVAL interval, int offset)
 {
   INTERVAL new = make_interval ();
   int new_length = offset;
@@ -608,8 +587,7 @@
    of another interval!  */
 
 int
-interval_start_pos (source)
-     INTERVAL source;
+interval_start_pos (INTERVAL source)
 {
   Lisp_Object parent;
 
@@ -635,9 +613,7 @@
    will update this cache based on the result of find_interval.  */
 
 INTERVAL
-find_interval (tree, position)
-     register INTERVAL tree;
-     register int position;
+find_interval (register INTERVAL tree, register int position)
 {
   /* The distance from the left edge of the subtree at TREE
                     to POSITION.  */
@@ -691,8 +667,7 @@
    find_interval).  */
 
 INTERVAL
-next_interval (interval)
-     register INTERVAL interval;
+next_interval (register INTERVAL interval)
 {
   register INTERVAL i = interval;
   register int next_position;
@@ -731,8 +706,7 @@
    find_interval).  */
 
 INTERVAL
-previous_interval (interval)
-     register INTERVAL interval;
+previous_interval (register INTERVAL interval)
 {
   register INTERVAL i;
 
@@ -771,9 +745,7 @@
    To speed up the process, we assume that the ->position of
    I and all its parents is already uptodate.  */
 INTERVAL
-update_interval (i, pos)
-     register INTERVAL i;
-     int pos;
+update_interval (register INTERVAL i, int pos)
 {
   if (NULL_INTERVAL_P (i))
     return NULL_INTERVAL;
@@ -892,9 +864,7 @@
    this text, and make it have the merged properties of both ends.  */
 
 static INTERVAL
-adjust_intervals_for_insertion (tree, position, length)
-     INTERVAL tree;
-     int position, length;
+adjust_intervals_for_insertion (INTERVAL tree, int position, int length)
 {
   register INTERVAL i;
   register INTERVAL temp;
@@ -1119,8 +1089,7 @@
 */
 
 Lisp_Object
-merge_properties_sticky (pleft, pright)
-     Lisp_Object pleft, pright;
+merge_properties_sticky (Lisp_Object pleft, Lisp_Object pright)
 {
   register Lisp_Object props, front, rear;
   Lisp_Object lfront, lrear, rfront, rrear;
@@ -1256,8 +1225,7 @@
    storing the resulting subtree into its parent.  */
 
 static INTERVAL
-delete_node (i)
-     register INTERVAL i;
+delete_node (register INTERVAL i)
 {
   register INTERVAL migrate, this;
   register int migrate_amt;
@@ -1290,8 +1258,7 @@
    for the length of I.  */
 
 void
-delete_interval (i)
-     register INTERVAL i;
+delete_interval (register INTERVAL i)
 {
   register INTERVAL parent;
   int amt = LENGTH (i);
@@ -1345,9 +1312,7 @@
    deleting the appropriate amount of text.  */
 
 static int
-interval_deletion_adjustment (tree, from, amount)
-     register INTERVAL tree;
-     register int from, amount;
+interval_deletion_adjustment (register INTERVAL tree, register int from, register int amount)
 {
   register int relative_position = from;
 
@@ -1407,9 +1372,7 @@
    buffer position, i.e. origin 1).  */
 
 static void
-adjust_intervals_for_deletion (buffer, start, length)
-     struct buffer *buffer;
-     int start, length;
+adjust_intervals_for_deletion (struct buffer *buffer, int start, int length)
 {
   register int left_to_delete = length;
   register INTERVAL tree = BUF_INTERVALS (buffer);
@@ -1460,9 +1423,7 @@
    of LENGTH.  */
 
 INLINE void
-offset_intervals (buffer, start, length)
-     struct buffer *buffer;
-     int start, length;
+offset_intervals (struct buffer *buffer, int start, int length)
 {
   if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0)
     return;
@@ -1483,8 +1444,7 @@
    interval.  */
 
 INTERVAL
-merge_interval_right (i)
-     register INTERVAL i;
+merge_interval_right (register INTERVAL i)
 {
   register int absorb = LENGTH (i);
   register INTERVAL successor;
@@ -1540,8 +1500,7 @@
    The caller must verify that this is not the first (leftmost) interval.  */
 
 INTERVAL
-merge_interval_left (i)
-     register INTERVAL i;
+merge_interval_left (register INTERVAL i)
 {
   register int absorb = LENGTH (i);
   register INTERVAL predecessor;
@@ -1595,12 +1554,11 @@
    the pointers of the copy.  */
 
 static INTERVAL
-reproduce_tree (source, parent)
-     INTERVAL source, parent;
+reproduce_tree (INTERVAL source, INTERVAL parent)
 {
   register INTERVAL t = make_interval ();
 
-  bcopy (source, t, INTERVAL_SIZE);
+  memcpy (t, source, INTERVAL_SIZE);
   copy_properties (source, t);
   SET_INTERVAL_PARENT (t, parent);
   if (! NULL_LEFT_CHILD (source))
@@ -1612,13 +1570,11 @@
 }
 
 static INTERVAL
-reproduce_tree_obj (source, parent)
-     INTERVAL source;
-     Lisp_Object parent;
+reproduce_tree_obj (INTERVAL source, Lisp_Object parent)
 {
   register INTERVAL t = make_interval ();
 
-  bcopy (source, t, INTERVAL_SIZE);
+  memcpy (t, source, INTERVAL_SIZE);
   copy_properties (source, t);
   SET_INTERVAL_OBJECT (t, parent);
   if (! NULL_LEFT_CHILD (source))
@@ -1714,11 +1670,7 @@
    text...  */
 
 void
-graft_intervals_into_buffer (source, position, length, buffer, inherit)
-     INTERVAL source;
-     int position, length;
-     struct buffer *buffer;
-     int inherit;
+graft_intervals_into_buffer (INTERVAL source, int position, int length, struct buffer *buffer, int inherit)
 {
   register INTERVAL under, over, this, prev;
   register INTERVAL tree;
@@ -1876,18 +1828,13 @@
    and for PROP appearing on the default-text-properties list.  */
 
 Lisp_Object
-textget (plist, prop)
-     Lisp_Object plist;
-     register Lisp_Object prop;
+textget (Lisp_Object plist, register Lisp_Object prop)
 {
   return lookup_char_property (plist, prop, 1);
 }
 
 Lisp_Object
-lookup_char_property (plist, prop, textprop)
-     Lisp_Object plist;
-     register Lisp_Object prop;
-     int textprop;
+lookup_char_property (Lisp_Object plist, register Lisp_Object prop, int textprop)
 {
   register Lisp_Object tail, fallback = Qnil;
 
@@ -1974,8 +1921,7 @@
    if the invisible property comes from an overlay.  */
 
 static int
-adjust_for_invis_intang (pos, test_offs, adj, test_intang)
-     int pos, test_offs, adj, test_intang;
+adjust_for_invis_intang (int pos, int test_offs, int adj, int test_intang)
 {
   Lisp_Object invis_propval, invis_overlay;
   Lisp_Object test_pos;
@@ -2237,8 +2183,7 @@
    segment that reaches all the way to point.  */
 
 void
-move_if_not_intangible (position)
-     int position;
+move_if_not_intangible (int position)
 {
   Lisp_Object pos;
   Lisp_Object intangible_propval;
@@ -2301,11 +2246,7 @@
    nil means the current buffer. */
 
 int
-get_property_and_range (pos, prop, val, start, end, object)
-     int pos;
-     Lisp_Object prop, *val;
-     EMACS_INT *start, *end;
-     Lisp_Object object;
+get_property_and_range (int pos, Lisp_Object prop, Lisp_Object *val, EMACS_INT *start, EMACS_INT *end, Lisp_Object object)
 {
   INTERVAL i, prev, next;
 
@@ -2348,10 +2289,7 @@
    POSITION must be in the accessible part of BUFFER.  */
 
 Lisp_Object
-get_local_map (position, buffer, type)
-     register int position;
-     register struct buffer *buffer;
-     Lisp_Object type;
+get_local_map (register int position, register struct buffer *buffer, Lisp_Object type)
 {
   Lisp_Object prop, lispy_position, lispy_buffer;
   int old_begv, old_zv, old_begv_byte, old_zv_byte;
@@ -2404,9 +2342,7 @@
    The new interval tree has no parent and has a starting-position of 0.  */
 
 INTERVAL
-copy_intervals (tree, start, length)
-     INTERVAL tree;
-     int start, length;
+copy_intervals (INTERVAL tree, int start, int length)
 {
   register INTERVAL i, new, t;
   register int got, prevlen;
@@ -2447,10 +2383,7 @@
 /* Give STRING the properties of BUFFER from POSITION to LENGTH.  */
 
 INLINE void
-copy_intervals_to_string (string, buffer, position, length)
-     Lisp_Object string;
-     struct buffer *buffer;
-     int position, length;
+copy_intervals_to_string (Lisp_Object string, struct buffer *buffer, int position, int length)
 {
   INTERVAL interval_copy = copy_intervals (BUF_INTERVALS (buffer),
 					   position, length);
@@ -2465,8 +2398,7 @@
    Assume they have identical characters.  */
 
 int
-compare_string_intervals (s1, s2)
-     Lisp_Object s1, s2;
+compare_string_intervals (Lisp_Object s1, Lisp_Object s2)
 {
   INTERVAL i1, i2;
   int pos = 0;
@@ -2504,10 +2436,7 @@
    START_BYTE ... END_BYTE in bytes.  */
 
 static void
-set_intervals_multibyte_1 (i, multi_flag, start, start_byte, end, end_byte)
-     INTERVAL i;
-     int multi_flag;
-     int start, start_byte, end, end_byte;
+set_intervals_multibyte_1 (INTERVAL i, int multi_flag, int start, int start_byte, int end, int end_byte)
 {
   /* Fix the length of this interval.  */
   if (multi_flag)
@@ -2617,8 +2546,7 @@
    or to fit them as non-multibyte (if MULTI_FLAG is 0).  */
 
 void
-set_intervals_multibyte (multi_flag)
-     int multi_flag;
+set_intervals_multibyte (int multi_flag)
 {
   if (BUF_INTERVALS (current_buffer))
     set_intervals_multibyte_1 (BUF_INTERVALS (current_buffer), multi_flag,
--- a/src/intervals.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/intervals.h	Thu Jul 08 17:09:35 2010 +0900
@@ -28,8 +28,8 @@
 {
   /* The first group of entries deal with the tree structure.  */
 
-  unsigned EMACS_INT total_length; /* Length of myself and both children.  */
-  unsigned EMACS_INT position;	/* Cache of interval's character position.  */
+  EMACS_UINT total_length;      /* Length of myself and both children.  */
+  EMACS_UINT position;	        /* Cache of interval's character position.  */
 				/* This field is usually updated
 				   simultaneously with an interval
 				   traversal, there is no guarantee
@@ -243,49 +243,49 @@
 
 /* Declared in alloc.c */
 
-extern INTERVAL make_interval P_ ((void));
+extern INTERVAL make_interval (void);
 
 /* Declared in intervals.c */
 
-extern INTERVAL create_root_interval P_ ((Lisp_Object));
-extern void copy_properties P_ ((INTERVAL, INTERVAL));
-extern int intervals_equal P_ ((INTERVAL, INTERVAL));
-extern void traverse_intervals P_ ((INTERVAL, int,
-				    void (*) (INTERVAL, Lisp_Object),
-				    Lisp_Object));
-extern void traverse_intervals_noorder P_ ((INTERVAL,
-				    void (*) (INTERVAL, Lisp_Object),
-				    Lisp_Object));
-extern INTERVAL split_interval_right P_ ((INTERVAL, int));
-extern INTERVAL split_interval_left P_ ((INTERVAL, int));
-extern INTERVAL find_interval P_ ((INTERVAL, int));
-extern INTERVAL next_interval P_ ((INTERVAL));
-extern INTERVAL previous_interval P_ ((INTERVAL));
-extern INTERVAL merge_interval_left P_ ((INTERVAL));
-extern INTERVAL merge_interval_right P_ ((INTERVAL));
-extern void delete_interval P_ ((INTERVAL));
-extern INLINE void offset_intervals P_ ((struct buffer *, int, int));
-extern void graft_intervals_into_buffer P_ ((INTERVAL, int, int,
-					     struct buffer *, int));
-extern void verify_interval_modification P_ ((struct buffer *, int, int));
-extern INTERVAL balance_intervals P_ ((INTERVAL));
-extern INLINE void copy_intervals_to_string P_ ((Lisp_Object, struct buffer *,
-						 int, int));
-extern INTERVAL copy_intervals P_ ((INTERVAL, int, int));
-extern int compare_string_intervals P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object textget P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object lookup_char_property P_ ((Lisp_Object, Lisp_Object, int));
-extern void move_if_not_intangible P_ ((int));
-extern int get_property_and_range P_ ((int, Lisp_Object, Lisp_Object *,
-				       EMACS_INT *, EMACS_INT *, Lisp_Object));
-extern Lisp_Object get_local_map P_ ((int, struct buffer *, Lisp_Object));
-extern INTERVAL update_interval P_ ((INTERVAL, int));
-extern void set_intervals_multibyte P_ ((int));
-extern INTERVAL validate_interval_range P_ ((Lisp_Object, Lisp_Object *,
-					     Lisp_Object *, int));
+extern INTERVAL create_root_interval (Lisp_Object);
+extern void copy_properties (INTERVAL, INTERVAL);
+extern int intervals_equal (INTERVAL, INTERVAL);
+extern void traverse_intervals (INTERVAL, int,
+                                void (*) (INTERVAL, Lisp_Object),
+                                Lisp_Object);
+extern void traverse_intervals_noorder (INTERVAL,
+                                        void (*) (INTERVAL, Lisp_Object),
+                                        Lisp_Object);
+extern INTERVAL split_interval_right (INTERVAL, int);
+extern INTERVAL split_interval_left (INTERVAL, int);
+extern INTERVAL find_interval (INTERVAL, int);
+extern INTERVAL next_interval (INTERVAL);
+extern INTERVAL previous_interval (INTERVAL);
+extern INTERVAL merge_interval_left (INTERVAL);
+extern INTERVAL merge_interval_right (INTERVAL);
+extern void delete_interval (INTERVAL);
+extern INLINE void offset_intervals (struct buffer *, int, int);
+extern void graft_intervals_into_buffer (INTERVAL, int, int,
+                                         struct buffer *, int);
+extern void verify_interval_modification (struct buffer *, int, int);
+extern INTERVAL balance_intervals (INTERVAL);
+extern INLINE void copy_intervals_to_string (Lisp_Object, struct buffer *,
+                                             int, int);
+extern INTERVAL copy_intervals (INTERVAL, int, int);
+extern int compare_string_intervals (Lisp_Object, Lisp_Object);
+extern Lisp_Object textget (Lisp_Object, Lisp_Object);
+extern Lisp_Object lookup_char_property (Lisp_Object, Lisp_Object, int);
+extern void move_if_not_intangible (int);
+extern int get_property_and_range (int, Lisp_Object, Lisp_Object *,
+                                   EMACS_INT *, EMACS_INT *, Lisp_Object);
+extern Lisp_Object get_local_map (int, struct buffer *, Lisp_Object);
+extern INTERVAL update_interval (INTERVAL, int);
+extern void set_intervals_multibyte (int);
+extern INTERVAL validate_interval_range (Lisp_Object, Lisp_Object *,
+                                         Lisp_Object *, int);
 
 /* Defined in xdisp.c */
-extern int invisible_p P_ ((Lisp_Object, Lisp_Object));
+extern int invisible_p (Lisp_Object, Lisp_Object);
 
 /* Declared in textprop.c */
 
@@ -323,27 +323,27 @@
 EXFUN (Ftext_property_any, 5);
 EXFUN (Ftext_property_not_all, 5);
 EXFUN (Fprevious_single_char_property_change, 4);
-extern Lisp_Object copy_text_properties P_ ((Lisp_Object, Lisp_Object,
-					     Lisp_Object, Lisp_Object,
-					     Lisp_Object, Lisp_Object));
-extern Lisp_Object set_text_properties P_ ((Lisp_Object, Lisp_Object,
-					    Lisp_Object, Lisp_Object,
-					    Lisp_Object));
-extern void set_text_properties_1 P_ ((Lisp_Object, Lisp_Object,
-				       Lisp_Object, Lisp_Object, INTERVAL));
+extern Lisp_Object copy_text_properties (Lisp_Object, Lisp_Object,
+                                         Lisp_Object, Lisp_Object,
+                                         Lisp_Object, Lisp_Object);
+extern Lisp_Object set_text_properties (Lisp_Object, Lisp_Object,
+                                        Lisp_Object, Lisp_Object,
+                                        Lisp_Object);
+extern void set_text_properties_1 (Lisp_Object, Lisp_Object,
+                                   Lisp_Object, Lisp_Object, INTERVAL);
 
-Lisp_Object text_property_list P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
-				    Lisp_Object));
-int add_text_properties_from_list P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-Lisp_Object extend_property_ranges P_ ((Lisp_Object, Lisp_Object));
-Lisp_Object get_char_property_and_overlay P_ ((Lisp_Object, Lisp_Object,
-					       Lisp_Object, Lisp_Object*));
-extern int text_property_stickiness P_ ((Lisp_Object prop, Lisp_Object pos,
-					 Lisp_Object buffer));
-extern Lisp_Object get_pos_property P_ ((Lisp_Object pos, Lisp_Object prop,
-					 Lisp_Object object));
+Lisp_Object text_property_list (Lisp_Object, Lisp_Object, Lisp_Object,
+                                Lisp_Object);
+int add_text_properties_from_list (Lisp_Object, Lisp_Object, Lisp_Object);
+Lisp_Object extend_property_ranges (Lisp_Object, Lisp_Object);
+Lisp_Object get_char_property_and_overlay (Lisp_Object, Lisp_Object,
+                                           Lisp_Object, Lisp_Object*);
+extern int text_property_stickiness (Lisp_Object prop, Lisp_Object pos,
+                                     Lisp_Object buffer);
+extern Lisp_Object get_pos_property (Lisp_Object pos, Lisp_Object prop,
+                                     Lisp_Object object);
 
-extern void syms_of_textprop P_ ((void));
+extern void syms_of_textprop (void);
 
 #include "composite.h"
 
--- a/src/keyboard.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/keyboard.c	Thu Jul 08 17:09:35 2010 +0900
@@ -521,17 +521,15 @@
 extern Lisp_Object Qleft_fringe, Qright_fringe;
 extern Lisp_Object QCmap;
 
-Lisp_Object recursive_edit_unwind (), command_loop ();
-Lisp_Object Fthis_command_keys ();
+Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void);
+Lisp_Object Fthis_command_keys (void);
 Lisp_Object Qextended_command_history;
-EMACS_TIME timer_check ();
+EMACS_TIME timer_check (int do_it_now);
 
 extern Lisp_Object Vhistory_length, Vtranslation_table_for_input;
 
-extern char *x_get_keysym_name ();
-
-static void record_menu_key ();
-static int echo_length ();
+static void record_menu_key (Lisp_Object c);
+static int echo_length (void);
 
 Lisp_Object Qpolling_period;
 
@@ -611,41 +609,40 @@
 #define READABLE_EVENTS_IGNORE_SQUEEZABLES	(1 << 2)
 
 /* Function for init_keyboard to call with no args (if nonzero).  */
-void (*keyboard_init_hook) ();
-
-static int read_avail_input P_ ((int));
-static void get_input_pending P_ ((int *, int));
-static int readable_events P_ ((int));
-static Lisp_Object read_char_x_menu_prompt P_ ((int, Lisp_Object *,
-						Lisp_Object, int *));
-static Lisp_Object read_char_x_menu_prompt ();
-static Lisp_Object read_char_minibuf_menu_prompt P_ ((int, int,
-						      Lisp_Object *));
-static Lisp_Object make_lispy_event P_ ((struct input_event *));
+void (*keyboard_init_hook) (void);
+
+static int read_avail_input (int);
+static void get_input_pending (int *, int);
+static int readable_events (int);
+static Lisp_Object read_char_x_menu_prompt (int, Lisp_Object *,
+                                            Lisp_Object, int *);
+static Lisp_Object read_char_minibuf_menu_prompt (int, int,
+                                                  Lisp_Object *);
+static Lisp_Object make_lispy_event (struct input_event *);
 #if defined (HAVE_MOUSE) || defined (HAVE_GPM)
-static Lisp_Object make_lispy_movement P_ ((struct frame *, Lisp_Object,
-					    enum scroll_bar_part,
-					    Lisp_Object, Lisp_Object,
-					    unsigned long));
-#endif
-static Lisp_Object modify_event_symbol P_ ((int, unsigned, Lisp_Object,
-					    Lisp_Object, char **,
-					    Lisp_Object *, unsigned));
-static Lisp_Object make_lispy_switch_frame P_ ((Lisp_Object));
-static void save_getcjmp P_ ((jmp_buf));
-static void save_getcjmp ();
-static void restore_getcjmp P_ ((jmp_buf));
-static Lisp_Object apply_modifiers P_ ((int, Lisp_Object));
-static void clear_event P_ ((struct input_event *));
-static Lisp_Object restore_kboard_configuration P_ ((Lisp_Object));
-static SIGTYPE interrupt_signal P_ ((int signalnum));
-static void handle_interrupt P_ ((void));
-static void timer_start_idle P_ ((void));
-static void timer_stop_idle P_ ((void));
-static void timer_resume_idle P_ ((void));
-static SIGTYPE handle_user_signal P_ ((int));
-static char *find_user_signal_name P_ ((int));
-static int store_user_signal_events P_ ((void));
+static Lisp_Object make_lispy_movement (struct frame *, Lisp_Object,
+                                        enum scroll_bar_part,
+                                        Lisp_Object, Lisp_Object,
+                                        unsigned long);
+#endif
+static Lisp_Object modify_event_symbol (int, unsigned, Lisp_Object,
+                                        Lisp_Object, char **,
+                                        Lisp_Object *, unsigned);
+static Lisp_Object make_lispy_switch_frame (Lisp_Object);
+static void save_getcjmp (jmp_buf);
+static void restore_getcjmp (jmp_buf);
+static Lisp_Object apply_modifiers (int, Lisp_Object);
+static void clear_event (struct input_event *);
+static Lisp_Object restore_kboard_configuration (Lisp_Object);
+static SIGTYPE interrupt_signal (int signalnum);
+static SIGTYPE input_available_signal (int signo);
+static void handle_interrupt (void);
+static void timer_start_idle (void);
+static void timer_stop_idle (void);
+static void timer_resume_idle (void);
+static SIGTYPE handle_user_signal (int);
+static char *find_user_signal_name (int);
+static int store_user_signal_events (void);
 
 /* Nonzero means don't try to suspend even if the operating system seems
    to support it.  */
@@ -658,8 +655,7 @@
    Also start echoing.  */
 
 void
-echo_prompt (str)
-     Lisp_Object str;
+echo_prompt (Lisp_Object str)
 {
   current_kboard->echo_string = str;
   current_kboard->echo_after_prompt = SCHARS (str);
@@ -671,8 +667,7 @@
    jazz), or a symbol, whose name is printed.  */
 
 void
-echo_char (c)
-     Lisp_Object c;
+echo_char (Lisp_Object c)
 {
   if (current_kboard->immediate_echo)
     {
@@ -721,7 +716,7 @@
 	      ptr = buffer + offset;
 	    }
 
-	  bcopy (text, ptr, len);
+	  memcpy (ptr, text, len);
 	  ptr += len;
 	}
 
@@ -759,7 +754,7 @@
    empty, so that it serves as a mini-prompt for the very next character.  */
 
 void
-echo_dash ()
+echo_dash (void)
 {
   /* Do nothing if not echoing at all.  */
   if (NILP (current_kboard->echo_string))
@@ -800,7 +795,7 @@
    doing so.  */
 
 void
-echo_now ()
+echo_now (void)
 {
   if (!current_kboard->immediate_echo)
     {
@@ -850,7 +845,7 @@
 /* Turn off echoing, for the start of a new command.  */
 
 void
-cancel_echoing ()
+cancel_echoing (void)
 {
   current_kboard->immediate_echo = 0;
   current_kboard->echo_after_prompt = -1;
@@ -863,7 +858,7 @@
 /* Return the length of the current echo string.  */
 
 static int
-echo_length ()
+echo_length (void)
 {
   return (STRINGP (current_kboard->echo_string)
 	  ? SCHARS (current_kboard->echo_string)
@@ -875,8 +870,7 @@
    switches frames while entering a key sequence.  */
 
 static void
-echo_truncate (nchars)
-     int nchars;
+echo_truncate (int nchars)
 {
   if (STRINGP (current_kboard->echo_string))
     current_kboard->echo_string
@@ -888,8 +882,7 @@
 
 /* Functions for manipulating this_command_keys.  */
 static void
-add_command_key (key)
-     Lisp_Object key;
+add_command_key (Lisp_Object key)
 {
 #if 0 /* Not needed after we made Freset_this_command_lengths
 	 do the job immediately.  */
@@ -916,7 +909,7 @@
 
 
 Lisp_Object
-recursive_edit_1 ()
+recursive_edit_1 (void)
 {
   int count = SPECPDL_INDEX ();
   Lisp_Object val;
@@ -961,7 +954,7 @@
 /* When an auto-save happens, record the "time", and don't do again soon.  */
 
 void
-record_auto_save ()
+record_auto_save (void)
 {
   last_auto_save = num_nonmacro_input_events;
 }
@@ -969,7 +962,7 @@
 /* Make an auto save happen as soon as possible at command level.  */
 
 void
-force_auto_save_soon ()
+force_auto_save_soon (void)
 {
   last_auto_save = - auto_save_interval - 1;
 
@@ -1014,8 +1007,7 @@
 }
 
 Lisp_Object
-recursive_edit_unwind (buffer)
-     Lisp_Object buffer;
+recursive_edit_unwind (Lisp_Object buffer)
 {
   if (BUFFERP (buffer))
     Fset_buffer (buffer);
@@ -1060,8 +1052,7 @@
    get out of it.  */
 
 void
-not_single_kboard_state (kboard)
-     KBOARD *kboard;
+not_single_kboard_state (KBOARD *kboard)
 {
   if (kboard == current_kboard)
     single_kboard = 0;
@@ -1080,8 +1071,7 @@
 static struct kboard_stack *kboard_stack;
 
 void
-push_kboard (k)
-     struct kboard *k;
+push_kboard (struct kboard *k)
 {
   struct kboard_stack *p
     = (struct kboard_stack *) xmalloc (sizeof (struct kboard_stack));
@@ -1094,7 +1084,7 @@
 }
 
 void
-pop_kboard ()
+pop_kboard (void)
 {
   struct terminal *t;
   struct kboard_stack *p = kboard_stack;
@@ -1129,8 +1119,7 @@
   locked, then this function will throw an errow.  */
 
 void
-temporarily_switch_to_single_kboard (f)
-     struct frame *f;
+temporarily_switch_to_single_kboard (struct frame *f)
 {
   int was_locked = single_kboard;
   if (was_locked)
@@ -1170,8 +1159,7 @@
 #endif
 
 static Lisp_Object
-restore_kboard_configuration (was_locked)
-     Lisp_Object was_locked;
+restore_kboard_configuration (Lisp_Object was_locked)
 {
   if (NILP (was_locked))
     single_kboard = 0;
@@ -1192,8 +1180,7 @@
    by printing an error message and returning to the editor command loop.  */
 
 Lisp_Object
-cmd_error (data)
-     Lisp_Object data;
+cmd_error (Lisp_Object data)
 {
   Lisp_Object old_level, old_length;
   char macroerror[50];
@@ -1251,9 +1238,7 @@
    string.  */
 
 void
-cmd_error_internal (data, context)
-     Lisp_Object data;
-     char *context;
+cmd_error_internal (Lisp_Object data, char *context)
 {
   struct frame *sf = SELECTED_FRAME ();
 
@@ -1304,16 +1289,16 @@
   Vsignaling_function = Qnil;
 }
 
-Lisp_Object command_loop_1 ();
-Lisp_Object command_loop_2 ();
-Lisp_Object top_level_1 ();
+Lisp_Object command_loop_1 (void);
+Lisp_Object command_loop_2 (Lisp_Object);
+Lisp_Object top_level_1 (Lisp_Object);
 
 /* Entry to editor-command-loop.
    This level has the catches for exiting/returning to editor command loop.
    It returns nil to exit recursive edit, t to abort it.  */
 
 Lisp_Object
-command_loop ()
+command_loop (void)
 {
   if (command_loop_level > 0 || minibuf_level > 0)
     {
@@ -1348,7 +1333,7 @@
    returned due to end of file (or end of kbd macro).  */
 
 Lisp_Object
-command_loop_2 ()
+command_loop_2 (Lisp_Object ignore)
 {
   register Lisp_Object val;
 
@@ -1360,13 +1345,13 @@
 }
 
 Lisp_Object
-top_level_2 ()
+top_level_2 (void)
 {
   return Feval (Vtop_level);
 }
 
 Lisp_Object
-top_level_1 ()
+top_level_1 (Lisp_Object ignore)
 {
   /* On entry to the outer level, run the startup file */
   if (!NILP (Vtop_level))
@@ -1424,8 +1409,7 @@
    of this function.  */
 
 static Lisp_Object
-tracking_off (old_value)
-     Lisp_Object old_value;
+tracking_off (Lisp_Object old_value)
 {
   do_mouse_tracking = old_value;
   if (NILP (old_value))
@@ -1475,7 +1459,7 @@
 int ignore_mouse_drag_p;
 
 static FRAME_PTR
-some_mouse_moved ()
+some_mouse_moved (void)
 {
   Lisp_Object tail, frame;
 
@@ -1499,17 +1483,16 @@
 /* This is the actual command reading loop,
    sans error-handling encapsulation.  */
 
-static int read_key_sequence P_ ((Lisp_Object *, int, Lisp_Object,
-				  int, int, int));
-void safe_run_hooks P_ ((Lisp_Object));
-static void adjust_point_for_property P_ ((int, int));
+static int read_key_sequence (Lisp_Object *, int, Lisp_Object,
+                              int, int, int);
+void safe_run_hooks (Lisp_Object);
+static void adjust_point_for_property (int, int);
 
 /* Cancel hourglass from protect_unwind.
    ARG is not used.  */
 #ifdef HAVE_WINDOW_SYSTEM
 static Lisp_Object
-cancel_hourglass_unwind (arg)
-     Lisp_Object arg;
+cancel_hourglass_unwind (Lisp_Object arg)
 {
   cancel_hourglass ();
   return Qnil;
@@ -1517,7 +1500,7 @@
 #endif
 
 Lisp_Object
-command_loop_1 ()
+command_loop_1 (void)
 {
   Lisp_Object cmd;
   Lisp_Object keybuf[30];
@@ -1862,12 +1845,10 @@
    LAST_PT is the last position of point.  */
 
 extern Lisp_Object Qafter_string, Qbefore_string;
-extern Lisp_Object get_pos_property P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
+extern Lisp_Object get_pos_property (Lisp_Object, Lisp_Object, Lisp_Object);
 
 static void
-adjust_point_for_property (last_pt, modified)
-     int last_pt;
-     int modified;
+adjust_point_for_property (int last_pt, int modified)
 {
   EMACS_INT beg, end;
   Lisp_Object val, overlay, tmp;
@@ -2017,8 +1998,7 @@
 /* Subroutine for safe_run_hooks: run the hook HOOK.  */
 
 static Lisp_Object
-safe_run_hooks_1 (hook)
-     Lisp_Object hook;
+safe_run_hooks_1 (void)
 {
   if (NILP (Vrun_hooks))
     return Qnil;
@@ -2028,8 +2008,7 @@
 /* Subroutine for safe_run_hooks: handle an error by clearing out the hook.  */
 
 static Lisp_Object
-safe_run_hooks_error (data)
-     Lisp_Object data;
+safe_run_hooks_error (Lisp_Object data)
 {
   Lisp_Object args[3];
   args[0] = build_string ("Error in %s: %s");
@@ -2044,8 +2023,7 @@
    to mysteriously evaporate.  */
 
 void
-safe_run_hooks (hook)
-     Lisp_Object hook;
+safe_run_hooks (Lisp_Object hook)
 {
   int count = SPECPDL_INDEX ();
   specbind (Qinhibit_quit, hook);
@@ -2077,7 +2055,7 @@
    there.  */
 
 void
-poll_for_input_1 ()
+poll_for_input_1 (void)
 {
 /* Tell ns_read_socket() it is being called asynchronously so it can avoid
    doing anything dangerous. */
@@ -2096,8 +2074,7 @@
    poll_timer.  */
 
 void
-poll_for_input (timer)
-     struct atimer *timer;
+poll_for_input (struct atimer *timer)
 {
   if (poll_suppress_count == 0)
     {
@@ -2116,7 +2093,7 @@
    This function is called unconditionally from various places.  */
 
 void
-start_polling ()
+start_polling (void)
 {
 #ifdef POLL_FOR_INPUT
   /* XXX This condition was (read_socket_hook && !interrupt_input),
@@ -2153,7 +2130,7 @@
 /* Nonzero if we are using polling to handle input asynchronously.  */
 
 int
-input_polling_used ()
+input_polling_used (void)
 {
 #ifdef POLL_FOR_INPUT
   /* XXX This condition was (read_socket_hook && !interrupt_input),
@@ -2168,7 +2145,7 @@
 /* Turn off polling.  */
 
 void
-stop_polling ()
+stop_polling (void)
 {
 #ifdef POLL_FOR_INPUT
   /* XXX This condition was (read_socket_hook && !interrupt_input),
@@ -2183,8 +2160,7 @@
    and start or stop polling accordingly.  */
 
 void
-set_poll_suppress_count (count)
-     int count;
+set_poll_suppress_count (int count)
 {
 #ifdef POLL_FOR_INPUT
   if (count == 0 && poll_suppress_count != 0)
@@ -2204,8 +2180,7 @@
    But don't decrease it.  */
 
 void
-bind_polling_period (n)
-     int n;
+bind_polling_period (int n)
 {
 #ifdef POLL_FOR_INPUT
   int new = polling_period;
@@ -2224,8 +2199,7 @@
 /* Apply the control modifier to CHARACTER.  */
 
 int
-make_ctrl_char (c)
-     int c;
+make_ctrl_char (int c)
 {
   /* Save the upper bits here.  */
   int upper = c & ~0177;
@@ -2294,9 +2268,8 @@
    from X code running asynchronously.  */
 
 void
-show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo)
-     Lisp_Object help, window, object, pos;
-     int ok_to_overwrite_keystroke_echo;
+show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object,
+		Lisp_Object pos, int ok_to_overwrite_keystroke_echo)
 {
   if (!NILP (help) && !STRINGP (help))
     {
@@ -2343,9 +2316,10 @@
 
 /* Input of single characters from keyboard */
 
-Lisp_Object print_help ();
-static Lisp_Object kbd_buffer_get_event ();
-static void record_char ();
+Lisp_Object print_help (Lisp_Object object);
+static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, int *used_mouse_menu,
+					 struct timeval *end_time);
+static void record_char (Lisp_Object c);
 
 static Lisp_Object help_form_saved_window_configs;
 static Lisp_Object
@@ -2394,13 +2368,8 @@
    Value is t if we showed a menu and the user rejected it.  */
 
 Lisp_Object
-read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
-     int commandflag;
-     int nmaps;
-     Lisp_Object *maps;
-     Lisp_Object prev_event;
-     int *used_mouse_menu;
-     EMACS_TIME *end_time;
+read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event,
+	   int *used_mouse_menu, struct timeval *end_time)
 {
   volatile Lisp_Object c;
   int count, jmpcount;
@@ -3311,8 +3280,7 @@
    Record it for echoing, for this-command-keys, and so on.  */
 
 static void
-record_menu_key (c)
-     Lisp_Object c;
+record_menu_key (Lisp_Object c)
 {
   /* Wipe the echo area.  */
   clear_message (1, 0);
@@ -3346,8 +3314,7 @@
 /* Return 1 if should recognize C as "the help character".  */
 
 int
-help_char_p (c)
-     Lisp_Object c;
+help_char_p (Lisp_Object c)
 {
   Lisp_Object tail;
 
@@ -3362,8 +3329,7 @@
 /* Record the input event C in various ways.  */
 
 static void
-record_char (c)
-     Lisp_Object c;
+record_char (Lisp_Object c)
 {
   int recorded = 0;
 
@@ -3497,8 +3463,7 @@
 }
 
 Lisp_Object
-print_help (object)
-     Lisp_Object object;
+print_help (Lisp_Object object)
 {
   struct buffer *old = current_buffer;
   Fprinc (object, Qnil);
@@ -3514,17 +3479,15 @@
    See read_process_output.  */
 
 static void
-save_getcjmp (temp)
-     jmp_buf temp;
-{
-  bcopy (getcjmp, temp, sizeof getcjmp);
+save_getcjmp (jmp_buf temp)
+{
+  memcpy (temp, getcjmp, sizeof getcjmp);
 }
 
 static void
-restore_getcjmp (temp)
-     jmp_buf temp;
-{
-  bcopy (temp, getcjmp, sizeof getcjmp);
+restore_getcjmp (jmp_buf temp)
+{
+  memcpy (getcjmp, temp, sizeof getcjmp);
 }
 
 /* Low level keyboard/mouse input.
@@ -3534,8 +3497,7 @@
 /* Return true if there are any events in the queue that read-char
    would return.  If this returns false, a read-char would block.  */
 static int
-readable_events (flags)
-     int flags;
+readable_events (int flags)
 {
 #ifdef HAVE_DBUS
   /* Check whether a D-Bus message has arrived.  */
@@ -3611,8 +3573,7 @@
 int stop_character;
 
 static KBOARD *
-event_to_kboard (event)
-     struct input_event *event;
+event_to_kboard (struct input_event *event)
 {
   Lisp_Object frame;
   frame = event->frame_or_window;
@@ -3630,14 +3591,25 @@
     return FRAME_KBOARD (XFRAME (frame));
 }
 
+/* Return the number of slots occupied in kbd_buffer.  */
+
+static int
+kbd_buffer_nr_stored ()
+{
+  return kbd_fetch_ptr == kbd_store_ptr
+    ? 0
+    : (kbd_fetch_ptr < kbd_store_ptr
+       ? kbd_store_ptr - kbd_fetch_ptr
+       : ((kbd_buffer + KBD_BUFFER_SIZE) - kbd_fetch_ptr
+          + (kbd_store_ptr - kbd_buffer)));
+}
 
 Lisp_Object Vthrow_on_input;
 
 /* Store an event obtained at interrupt level into kbd_buffer, fifo */
 
 void
-kbd_buffer_store_event (event)
-     register struct input_event *event;
+kbd_buffer_store_event (register struct input_event *event)
 {
   kbd_buffer_store_event_hold (event, 0);
 }
@@ -3655,9 +3627,8 @@
  */
 
 void
-kbd_buffer_store_event_hold (event, hold_quit)
-     register struct input_event *event;
-     struct input_event *hold_quit;
+kbd_buffer_store_event_hold (register struct input_event *event,
+			     struct input_event *hold_quit)
 {
   if (event->kind == NO_EVENT)
     abort ();
@@ -3704,7 +3675,7 @@
 
 	  if (hold_quit)
 	    {
-	      bcopy (event, (char *) hold_quit, sizeof (*event));
+	      memcpy (hold_quit, event, sizeof (*event));
 	      return;
 	    }
 
@@ -3753,6 +3724,17 @@
     {
       *kbd_store_ptr = *event;
       ++kbd_store_ptr;
+      if (kbd_buffer_nr_stored () > KBD_BUFFER_SIZE/2 && ! kbd_on_hold_p ())
+        {
+          /* Don't read keyboard input until we have processed kbd_buffer.
+             This happens when pasting text longer than KBD_BUFFER_SIZE/2.  */
+          hold_keyboard_input ();
+#ifdef SIGIO
+          if (!noninteractive)
+            signal (SIGIO, SIG_IGN);
+#endif
+          stop_polling ();
+        }
     }
 
   /* If we're inside while-no-input, and this event qualifies
@@ -3778,8 +3760,7 @@
 /* Put an input event back in the head of the event queue.  */
 
 void
-kbd_buffer_unget_event (event)
-     register struct input_event *event;
+kbd_buffer_unget_event (register struct input_event *event)
 {
   if (kbd_fetch_ptr == kbd_buffer)
     kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE;
@@ -3807,9 +3788,8 @@
    Value is the number of input_events generated.  */
 
 void
-gen_help_event (help, frame, window, object, pos)
-     Lisp_Object help, frame, object, window;
-     int pos;
+gen_help_event (Lisp_Object help, Lisp_Object frame, Lisp_Object window,
+		Lisp_Object object, int pos)
 {
   struct input_event event;
 
@@ -3828,8 +3808,7 @@
 /* Store HELP_EVENTs for HELP on FRAME in the input queue.  */
 
 void
-kbd_buffer_store_help_event (frame, help)
-     Lisp_Object frame, help;
+kbd_buffer_store_help_event (Lisp_Object frame, Lisp_Object help)
 {
   struct input_event event;
 
@@ -3846,7 +3825,7 @@
 /* Discard any mouse events in the event buffer by setting them to
    NO_EVENT.  */
 void
-discard_mouse_events ()
+discard_mouse_events (void)
 {
   struct input_event *sp;
   for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++)
@@ -3876,8 +3855,7 @@
    are no real input events.  */
 
 int
-kbd_buffer_events_waiting (discard)
-     int discard;
+kbd_buffer_events_waiting (int discard)
 {
   struct input_event *sp;
 
@@ -3899,8 +3877,7 @@
 /* Clear input event EVENT.  */
 
 static INLINE void
-clear_event (event)
-     struct input_event *event;
+clear_event (struct input_event *event)
 {
   event->kind = NO_EVENT;
 }
@@ -3913,13 +3890,24 @@
    We always read and discard one event.  */
 
 static Lisp_Object
-kbd_buffer_get_event (kbp, used_mouse_menu, end_time)
-     KBOARD **kbp;
-     int *used_mouse_menu;
-     EMACS_TIME *end_time;
+kbd_buffer_get_event (KBOARD **kbp,
+                      int *used_mouse_menu,
+                      struct timeval *end_time)
 {
   register int c;
   Lisp_Object obj;
+  
+  if (kbd_on_hold_p () && kbd_buffer_nr_stored () < KBD_BUFFER_SIZE/4)
+    {
+      /* Start reading input again, we have processed enough so we can
+         accept new events again.  */
+      unhold_keyboard_input ();
+#ifdef SIGIO
+      if (!noninteractive)
+        signal (SIGIO, input_available_signal);
+#endif /* SIGIO */
+      start_polling ();
+    }
 
   if (noninteractive
       /* In case we are running as a daemon, only do this before
@@ -4283,8 +4271,7 @@
    then return, without reading any user-visible events.  */
 
 void
-swallow_events (do_display)
-     int do_display;
+swallow_events (int do_display)
 {
   int old_timers_run;
 
@@ -4334,7 +4321,7 @@
    for the sake of running idle-time timers.  */
 
 static void
-timer_start_idle ()
+timer_start_idle (void)
 {
   Lisp_Object timers;
 
@@ -4362,7 +4349,7 @@
 /* Record that Emacs is no longer idle, so stop running idle-time timers.  */
 
 static void
-timer_stop_idle ()
+timer_stop_idle (void)
 {
   EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1);
 }
@@ -4370,7 +4357,7 @@
 /* Resume idle timer from last idle start time.  */
 
 static void
-timer_resume_idle ()
+timer_resume_idle (void)
 {
   if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
     return;
@@ -4401,7 +4388,7 @@
    should be done.  */
 
 static EMACS_TIME
-timer_check_2 ()
+timer_check_2 (void)
 {
   EMACS_TIME nexttime;
   EMACS_TIME now, idleness_now;
@@ -4602,12 +4589,11 @@
    Now we always run timers directly.  */
 
 EMACS_TIME
-timer_check (do_it_now)
-     int do_it_now;
+timer_check (int do_it_now)
 {
   EMACS_TIME nexttime;
 
-  do 
+  do
     {
       nexttime = timer_check_2 ();
     }
@@ -5254,10 +5240,8 @@
 /* Return position of a mouse click or wheel event */
 
 static Lisp_Object
-make_lispy_position (f, x, y, time)
-     struct frame *f;
-     Lisp_Object *x, *y;
-     unsigned long time;
+make_lispy_position (struct frame *f, Lisp_Object *x, Lisp_Object *y,
+		     unsigned long time)
 {
   Lisp_Object window;
   enum window_part part;
@@ -5444,8 +5428,7 @@
    in order to build drag events when the button is released.  */
 
 static Lisp_Object
-make_lispy_event (event)
-     struct input_event *event;
+make_lispy_event (struct input_event *event)
 {
   int i;
 
@@ -6152,12 +6135,8 @@
 #if defined(HAVE_MOUSE) || defined(HAVE_GPM)
 
 static Lisp_Object
-make_lispy_movement (frame, bar_window, part, x, y, time)
-     FRAME_PTR frame;
-     Lisp_Object bar_window;
-     enum scroll_bar_part part;
-     Lisp_Object x, y;
-     unsigned long time;
+make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part,
+		     Lisp_Object x, Lisp_Object y, unsigned long time)
 {
   /* Is it a scroll bar movement?  */
   if (frame && ! NILP (bar_window))
@@ -6192,8 +6171,7 @@
 
 /* Construct a switch frame event.  */
 static Lisp_Object
-make_lispy_switch_frame (frame)
-     Lisp_Object frame;
+make_lispy_switch_frame (Lisp_Object frame)
 {
   return Fcons (Qswitch_frame, Fcons (frame, Qnil));
 }
@@ -6209,9 +6187,7 @@
    This doesn't use any caches.  */
 
 static int
-parse_modifiers_uncached (symbol, modifier_end)
-     Lisp_Object symbol;
-     int *modifier_end;
+parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end)
 {
   Lisp_Object name;
   int i;
@@ -6321,10 +6297,7 @@
    prepended to the string BASE[0..BASE_LEN-1].
    This doesn't use any caches.  */
 static Lisp_Object
-apply_modifiers_uncached (modifiers, base, base_len, base_len_byte)
-     int modifiers;
-     char *base;
-     int base_len, base_len_byte;
+apply_modifiers_uncached (int modifiers, char *base, int base_len, int base_len_byte)
 {
   /* Since BASE could contain nulls, we can't use intern here; we have
      to use Fintern, which expects a genuine Lisp_String, and keeps a
@@ -6363,8 +6336,8 @@
 
     new_name = make_uninit_multibyte_string (mod_len + base_len,
 					     mod_len + base_len_byte);
-    bcopy (new_mods, SDATA (new_name),	       mod_len);
-    bcopy (base,     SDATA (new_name) + mod_len, base_len_byte);
+    memcpy (SDATA (new_name), new_mods, mod_len);
+    memcpy (SDATA (new_name) + mod_len, base, base_len_byte);
 
     return Fintern (new_name, Qnil);
   }
@@ -6383,8 +6356,7 @@
 
 /* Return the list of modifier symbols corresponding to the mask MODIFIERS.  */
 static Lisp_Object
-lispy_modifier_list (modifiers)
-     int modifiers;
+lispy_modifier_list (int modifiers)
 {
   Lisp_Object modifier_list;
   int i;
@@ -6409,8 +6381,7 @@
 #define KEY_TO_CHAR(k) (XINT (k) & ((1 << CHARACTERBITS) - 1))
 
 Lisp_Object
-parse_modifiers (symbol)
-     Lisp_Object symbol;
+parse_modifiers (Lisp_Object symbol)
 {
   Lisp_Object elements;
 
@@ -6479,9 +6450,7 @@
    apply_modifiers copies the value of BASE's Qevent_kind property to
    the modified symbol.  */
 static Lisp_Object
-apply_modifiers (modifiers, base)
-     int modifiers;
-     Lisp_Object base;
+apply_modifiers (int modifiers, Lisp_Object base)
 {
   Lisp_Object cache, index, entry, new_symbol;
 
@@ -6550,8 +6519,7 @@
    and M-C-foo end up being equivalent in the keymap.  */
 
 Lisp_Object
-reorder_modifiers (symbol)
-     Lisp_Object symbol;
+reorder_modifiers (Lisp_Object symbol)
 {
   /* It's hopefully okay to write the code this way, since everything
      will soon be in caches, and no consing will be done at all.  */
@@ -6596,15 +6564,9 @@
    in the symbol's name.  */
 
 static Lisp_Object
-modify_event_symbol (symbol_num, modifiers, symbol_kind, name_alist_or_stem,
-                     name_table, symbol_table, table_size)
-     int symbol_num;
-     unsigned modifiers;
-     Lisp_Object symbol_kind;
-     Lisp_Object name_alist_or_stem;
-     char **name_table;
-     Lisp_Object *symbol_table;
-     unsigned int table_size;
+modify_event_symbol (int symbol_num, unsigned int modifiers, Lisp_Object symbol_kind,
+		     Lisp_Object name_alist_or_stem, char **name_table,
+		     Lisp_Object *symbol_table, unsigned int table_size)
 {
   Lisp_Object value;
   Lisp_Object symbol_int;
@@ -6841,8 +6803,7 @@
    but it can be a Lucid-style event type list.  */
 
 int
-lucid_event_type_list_p (object)
-     Lisp_Object object;
+lucid_event_type_list_p (Lisp_Object object)
 {
   Lisp_Object tail;
 
@@ -6879,9 +6840,7 @@
    movements and toolkit scroll bar thumb drags. */
 
 static void
-get_input_pending (addr, flags)
-     int *addr;
-     int flags;
+get_input_pending (int *addr, int flags)
 {
   /* First of all, have we already counted some input?  */
   *addr = (!NILP (Vquit_flag) || readable_events (flags));
@@ -6898,8 +6857,7 @@
 /* Interface to read_avail_input, blocking SIGIO or SIGALRM if necessary.  */
 
 void
-gobble_input (expected)
-     int expected;
+gobble_input (int expected)
 {
 #ifdef HAVE_DBUS
   /* Read D-Bus messages.  */
@@ -6936,7 +6894,7 @@
    so that read_key_sequence will notice the new current buffer.  */
 
 void
-record_asynch_buffer_change ()
+record_asynch_buffer_change (void)
 {
   struct input_event event;
   Lisp_Object tem;
@@ -6986,8 +6944,7 @@
    this is a bad time to try to read input.  */
 
 static int
-read_avail_input (expected)
-     int expected;
+read_avail_input (int expected)
 {
   int nread = 0;
   int err = 0;
@@ -7120,6 +7077,10 @@
   int n_to_read, i;
   struct tty_display_info *tty = terminal->display_info.tty;
   int nread = 0;
+  int buffer_free = KBD_BUFFER_SIZE - kbd_buffer_nr_stored () - 1;
+
+  if (kbd_on_hold_p () || buffer_free <= 0)
+    return 0;
 
   if (!terminal->name)		/* Don't read from a dead terminal. */
     return 0;
@@ -7201,6 +7162,10 @@
 #endif
 #endif
 
+  /* Don't read more than we can store.  */
+  if (n_to_read > buffer_free)
+    n_to_read = buffer_free;
+
   /* Now read; for one reason or another, this will not block.
      NREAD is set to the number of chars read.  */
   do
@@ -7313,7 +7278,7 @@
 }
 
 void
-handle_async_input ()
+handle_async_input (void)
 {
   interrupt_input_pending = 0;
 #ifdef SYNC_INPUT
@@ -7340,7 +7305,7 @@
 }
 
 void
-process_pending_signals ()
+process_pending_signals (void)
 {
   if (interrupt_input_pending)
     handle_async_input ();
@@ -7351,8 +7316,7 @@
 /* Note SIGIO has been undef'd if FIONREAD is missing.  */
 
 static SIGTYPE
-input_available_signal (signo)
-     int signo;
+input_available_signal (int signo)
 {
   /* Must preserve main program's value of errno.  */
   int old_errno = errno;
@@ -7381,7 +7345,7 @@
    dealing with, without assuming that every file which uses
    UNBLOCK_INPUT also has #included the files necessary to get SIGIO. */
 void
-reinvoke_input_signal ()
+reinvoke_input_signal (void)
 {
 #ifdef SIGIO
   handle_async_input ();
@@ -7410,9 +7374,7 @@
 static struct user_signal_info *user_signals = NULL;
 
 void
-add_user_signal (sig, name)
-     int sig;
-     const char *name;
+add_user_signal (int sig, const char *name)
 {
   struct user_signal_info *p;
 
@@ -7432,8 +7394,7 @@
 }
 
 static SIGTYPE
-handle_user_signal (sig)
-     int sig;
+handle_user_signal (int sig)
 {
   int old_errno = errno;
   struct user_signal_info *p;
@@ -7462,8 +7423,7 @@
 }
 
 static char *
-find_user_signal_name (sig)
-     int sig;
+find_user_signal_name (int sig)
 {
   struct user_signal_info *p;
 
@@ -7475,7 +7435,7 @@
 }
 
 static int
-store_user_signal_events ()
+store_user_signal_events (void)
 {
   struct user_signal_info *p;
   struct input_event buf;
@@ -7488,7 +7448,7 @@
 
 	if (nstored == 0)
 	  {
-	    bzero (&buf, sizeof buf);
+	    memset (&buf, 0, sizeof buf);
 	    buf.kind = USER_SIGNAL_EVENT;
 	    buf.frame_or_window = selected_frame;
 	  }
@@ -7509,7 +7469,7 @@
 }
 
 
-static void menu_bar_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, void*));
+static void menu_bar_item (Lisp_Object, Lisp_Object, Lisp_Object, void*);
 static Lisp_Object menu_bar_one_keymap_changed_items;
 
 /* These variables hold the vector under construction within
@@ -7525,8 +7485,7 @@
    OLD is an old vector we can optionally reuse, or nil.  */
 
 Lisp_Object
-menu_bar_items (old)
-     Lisp_Object old;
+menu_bar_items (Lisp_Object old)
 {
   /* The number of keymaps we're scanning right now, and the number of
      keymaps we have allocated space for.  */
@@ -7593,7 +7552,7 @@
 	nmaps = 0;
 	if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem))
 	  maps[nmaps++] = tem;
-	bcopy (tmaps, (void *) (maps + nmaps), nminor * sizeof (maps[0]));
+	memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0]));
 	nmaps += nminor;
 	maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
       }
@@ -7634,9 +7593,9 @@
 	    tem2 = XVECTOR (menu_bar_items_vector)->contents[i + 2];
 	    tem3 = XVECTOR (menu_bar_items_vector)->contents[i + 3];
 	    if (end > i + 4)
-	      bcopy (&XVECTOR (menu_bar_items_vector)->contents[i + 4],
-		     &XVECTOR (menu_bar_items_vector)->contents[i],
-		     (end - i - 4) * sizeof (Lisp_Object));
+	      memmove (&XVECTOR (menu_bar_items_vector)->contents[i],
+		       &XVECTOR (menu_bar_items_vector)->contents[i + 4],
+		       (end - i - 4) * sizeof (Lisp_Object));
 	    XVECTOR (menu_bar_items_vector)->contents[end - 4] = tem0;
 	    XVECTOR (menu_bar_items_vector)->contents[end - 3] = tem1;
 	    XVECTOR (menu_bar_items_vector)->contents[end - 2] = tem2;
@@ -7666,9 +7625,7 @@
 Lisp_Object item_properties;
 
 static void
-menu_bar_item (key, item, dummy1, dummy2)
-     Lisp_Object key, item, dummy1;
-     void *dummy2;
+menu_bar_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy1, void *dummy2)
 {
   struct gcpro gcpro1;
   int i;
@@ -7683,9 +7640,9 @@
 	if (EQ (key, XVECTOR (menu_bar_items_vector)->contents[i]))
 	  {
 	    if (menu_bar_items_index > i + 4)
-	      bcopy (&XVECTOR (menu_bar_items_vector)->contents[i + 4],
-		     &XVECTOR (menu_bar_items_vector)->contents[i],
-		     (menu_bar_items_index - i - 4) * sizeof (Lisp_Object));
+	      memmove (&XVECTOR (menu_bar_items_vector)->contents[i],
+		       &XVECTOR (menu_bar_items_vector)->contents[i + 4],
+		       (menu_bar_items_index - i - 4) * sizeof (Lisp_Object));
 	    menu_bar_items_index -= 4;
 	  }
     }
@@ -7743,8 +7700,7 @@
 
  /* This is used as the handler when calling menu_item_eval_property.  */
 static Lisp_Object
-menu_item_eval_property_1 (arg)
-     Lisp_Object arg;
+menu_item_eval_property_1 (Lisp_Object arg)
 {
   /* If we got a quit from within the menu computation,
      quit all the way out of it.  This takes care of C-] in the debugger.  */
@@ -7757,8 +7713,7 @@
 /* Evaluate an expression and return the result (or nil if something
    went wrong).  Used to evaluate dynamic parts of menu items.  */
 Lisp_Object
-menu_item_eval_property (sexpr)
-     Lisp_Object sexpr;
+menu_item_eval_property (Lisp_Object sexpr)
 {
   int count = SPECPDL_INDEX ();
   Lisp_Object val;
@@ -7778,9 +7733,7 @@
    otherwise.  */
 
 int
-parse_menu_item (item, inmenubar)
-     Lisp_Object item;
-     int inmenubar;
+parse_menu_item (Lisp_Object item, int inmenubar)
 {
   Lisp_Object def, tem, item_string, start;
   Lisp_Object filter;
@@ -8077,10 +8030,10 @@
 
 /* Function prototypes.  */
 
-static void init_tool_bar_items P_ ((Lisp_Object));
-static void process_tool_bar_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, void*));
-static int parse_tool_bar_item P_ ((Lisp_Object, Lisp_Object));
-static void append_tool_bar_item P_ ((void));
+static void init_tool_bar_items (Lisp_Object);
+static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object, void*);
+static int parse_tool_bar_item (Lisp_Object, Lisp_Object);
+static void append_tool_bar_item (void);
 
 
 /* Return a vector of tool bar items for keymaps currently in effect.
@@ -8088,9 +8041,7 @@
    tool bar items found.  */
 
 Lisp_Object
-tool_bar_items (reuse, nitems)
-     Lisp_Object reuse;
-     int *nitems;
+tool_bar_items (Lisp_Object reuse, int *nitems)
 {
   Lisp_Object *maps;
   int nmaps, i;
@@ -8139,7 +8090,7 @@
       nmaps = 0;
       if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem))
 	maps[nmaps++] = tem;
-      bcopy (tmaps, (void *) (maps + nmaps), nminor * sizeof (maps[0]));
+      memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0]));
       nmaps += nminor;
       maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
     }
@@ -8168,9 +8119,7 @@
 /* Process the definition of KEY which is DEF.  */
 
 static void
-process_tool_bar_item (key, def, data, args)
-     Lisp_Object key, def, data;
-     void *args;
+process_tool_bar_item (Lisp_Object key, Lisp_Object def, Lisp_Object data, void *args)
 {
   int i;
   extern Lisp_Object Qundefined;
@@ -8191,9 +8140,9 @@
 	  if (EQ (key, v[TOOL_BAR_ITEM_KEY]))
 	    {
 	      if (ntool_bar_items > i + TOOL_BAR_ITEM_NSLOTS)
-		bcopy (v + TOOL_BAR_ITEM_NSLOTS, v,
-		       ((ntool_bar_items - i - TOOL_BAR_ITEM_NSLOTS)
-			* sizeof (Lisp_Object)));
+		memmove (v, v + TOOL_BAR_ITEM_NSLOTS,
+			 ((ntool_bar_items - i - TOOL_BAR_ITEM_NSLOTS)
+			  * sizeof (Lisp_Object)));
 	      ntool_bar_items -= TOOL_BAR_ITEM_NSLOTS;
 	      break;
 	    }
@@ -8255,8 +8204,7 @@
    A text label to show with the tool bar button if labels are enabled.  */
 
 static int
-parse_tool_bar_item (key, item)
-     Lisp_Object key, item;
+parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
 {
   /* Access slot with index IDX of vector tool_bar_item_properties.  */
 #define PROP(IDX) XVECTOR (tool_bar_item_properties)->contents[IDX]
@@ -8386,7 +8334,7 @@
       EMACS_INT max_lbl = 2*tool_bar_max_label_size;
       Lisp_Object new_lbl;
 
-      if (strlen (caption) < max_lbl && caption[0] != '\0') 
+      if (strlen (caption) < max_lbl && caption[0] != '\0')
         {
           strcpy (buf, caption);
           while (buf[0] != '\0' &&  buf[strlen (buf) -1] == '.')
@@ -8398,17 +8346,17 @@
       if (strlen (caption) <= max_lbl)
         label = caption;
 
-      if (strlen (label) <= max_lbl && label[0] != '\0') 
+      if (strlen (label) <= max_lbl && label[0] != '\0')
         {
           int i;
           if (label != buf) strcpy (buf, label);
 
-          for (i = 0; i < strlen (buf); ++i) 
+          for (i = 0; i < strlen (buf); ++i)
             {
               if (buf[i] == '-') buf[i] = ' ';
             }
           label = buf;
-      
+
         }
       else label = "";
 
@@ -8448,8 +8396,7 @@
    that can be reused.  */
 
 static void
-init_tool_bar_items (reuse)
-     Lisp_Object reuse;
+init_tool_bar_items (Lisp_Object reuse)
 {
   if (VECTORP (reuse))
     tool_bar_items_vector = reuse;
@@ -8463,7 +8410,7 @@
    tool_bar_item_properties */
 
 static void
-append_tool_bar_item ()
+append_tool_bar_item (void)
 {
   Lisp_Object *to, *from;
 
@@ -8478,7 +8425,7 @@
      tool_bar_items_vector.  */
   to = XVECTOR (tool_bar_items_vector)->contents + ntool_bar_items;
   from = XVECTOR (tool_bar_item_properties)->contents;
-  bcopy (from, to, TOOL_BAR_ITEM_NSLOTS * sizeof *to);
+  memcpy (to, from, TOOL_BAR_ITEM_NSLOTS * sizeof *to);
   ntool_bar_items += TOOL_BAR_ITEM_NSLOTS;
 }
 
@@ -8507,11 +8454,8 @@
    and do auto-saving in the inner call of read_char. */
 
 static Lisp_Object
-read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu)
-     int nmaps;
-     Lisp_Object *maps;
-     Lisp_Object prev_event;
-     int *used_mouse_menu;
+read_char_x_menu_prompt (int nmaps, Lisp_Object *maps, Lisp_Object prev_event,
+			 int *used_mouse_menu)
 {
   int mapno;
 
@@ -8595,10 +8539,7 @@
 static int read_char_minibuf_menu_width;
 
 static Lisp_Object
-read_char_minibuf_menu_prompt (commandflag, nmaps, maps)
-     int commandflag ;
-     int nmaps;
-     Lisp_Object *maps;
+read_char_minibuf_menu_prompt (int commandflag, int nmaps, Lisp_Object *maps)
 {
   int mapno;
   register Lisp_Object name;
@@ -8777,7 +8718,7 @@
 			  thiswidth = SCHARS (desc);
 			  if (thiswidth + i > width)
 			    thiswidth = width - i;
-			  bcopy (SDATA (desc), menu + i, thiswidth);
+			  memcpy (menu + i, SDATA (desc), thiswidth);
 			  i += thiswidth;
 			  strcpy (menu + i, " = ");
 			  i += 3;
@@ -8787,7 +8728,7 @@
 		      thiswidth = SCHARS (s);
 		      if (thiswidth + i > width)
 			thiswidth = width - i;
-		      bcopy (SDATA (s), menu + i, thiswidth);
+		      memcpy (menu + i, SDATA (s), thiswidth);
 		      i += thiswidth;
 		      menu[i] = 0;
 		    }
@@ -8863,10 +8804,8 @@
    NEXT may be the same array as CURRENT.  */
 
 static int
-follow_key (key, nmaps, current, defs, next)
-     Lisp_Object key;
-     Lisp_Object *current, *defs, *next;
-     int nmaps;
+follow_key (Lisp_Object key, int nmaps, Lisp_Object *current, Lisp_Object *defs,
+	    Lisp_Object *next)
 {
   int i, first_binding;
 
@@ -8915,9 +8854,8 @@
    that it is indeed a vector).  */
 
 static Lisp_Object
-access_keymap_keyremap (map, key, prompt, do_funcall)
-     Lisp_Object map, key, prompt;
-     int do_funcall;
+access_keymap_keyremap (Lisp_Object map, Lisp_Object key, Lisp_Object prompt,
+			int do_funcall)
 {
   Lisp_Object next;
 
@@ -8968,10 +8906,8 @@
    The return value is non-zero if the remapping actually took place.  */
 
 static int
-keyremap_step (keybuf, bufsize, fkey, input, doit, diff, prompt)
-     Lisp_Object *keybuf, prompt;
-     keyremap *fkey;
-     int input, doit, *diff, bufsize;
+keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey,
+	       int input, int doit, int *diff, Lisp_Object prompt)
 {
   Lisp_Object next, key;
 
@@ -9063,14 +8999,9 @@
    from the selected window's buffer.  */
 
 static int
-read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
-		   can_return_switch_frame, fix_current_buffer)
-     Lisp_Object *keybuf;
-     int bufsize;
-     Lisp_Object prompt;
-     int dont_downcase_last;
-     int can_return_switch_frame;
-     int fix_current_buffer;
+read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
+		   int dont_downcase_last, int can_return_switch_frame,
+		   int fix_current_buffer)
 {
   volatile Lisp_Object from_string;
   volatile int count = SPECPDL_INDEX ();
@@ -9281,8 +9212,7 @@
       if (!NILP (orig_keymap))
 	submaps[nmaps++] = orig_keymap;
 
-      bcopy (maps, (void *) (submaps + nmaps),
-	     nminor * sizeof (submaps[0]));
+      memcpy (submaps + nmaps, maps, nminor * sizeof (submaps[0]));
 
       nmaps += nminor;
 
@@ -10216,7 +10146,7 @@
   specbind (Qinput_method_use_echo_area,
 	    (NILP (command_loop) ? Qt : Qnil));
 
-  bzero (keybuf, sizeof keybuf);
+  memset (keybuf, 0, sizeof keybuf);
   GCPRO1 (keybuf[0]);
   gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0]));
 
@@ -10276,7 +10206,7 @@
   specbind (Qinput_method_use_echo_area,
 	    (NILP (command_loop) ? Qt : Qnil));
 
-  bzero (keybuf, sizeof keybuf);
+  memset (keybuf, 0, sizeof keybuf);
   GCPRO1 (keybuf[0]);
   gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0]));
 
@@ -10565,7 +10495,7 @@
 /* Return nonzero if input events are pending.  */
 
 int
-detect_input_pending ()
+detect_input_pending (void)
 {
   if (!input_pending)
     get_input_pending (&input_pending, 0);
@@ -10577,7 +10507,7 @@
    pending.  */
 
 int
-detect_input_pending_ignore_squeezables ()
+detect_input_pending_ignore_squeezables (void)
 {
   if (!input_pending)
     get_input_pending (&input_pending, READABLE_EVENTS_IGNORE_SQUEEZABLES);
@@ -10588,8 +10518,7 @@
 /* Return nonzero if input events are pending, and run any pending timers.  */
 
 int
-detect_input_pending_run_timers (do_display)
-     int do_display;
+detect_input_pending_run_timers (int do_display)
 {
   int old_timers_run = timers_run;
 
@@ -10620,7 +10549,7 @@
    So calling this function unnecessarily can't do any harm.  */
 
 void
-clear_input_pending ()
+clear_input_pending (void)
 {
   input_pending = 0;
 }
@@ -10632,7 +10561,7 @@
    to do in that case.  It isn't trivial.  */
 
 int
-requeued_events_pending_p ()
+requeued_events_pending_p (void)
 {
   return (!NILP (Vunread_command_events) || unread_command_char != -1);
 }
@@ -10667,12 +10596,10 @@
   else
     {
       val = Fvector (NUM_RECENT_KEYS, keys);
-      bcopy (keys + recent_keys_index,
-	     XVECTOR (val)->contents,
-	     (NUM_RECENT_KEYS - recent_keys_index) * sizeof (Lisp_Object));
-      bcopy (keys,
-	     XVECTOR (val)->contents + NUM_RECENT_KEYS - recent_keys_index,
-	     recent_keys_index * sizeof (Lisp_Object));
+      memcpy (XVECTOR (val)->contents, keys + recent_keys_index,
+	      (NUM_RECENT_KEYS - recent_keys_index) * sizeof (Lisp_Object));
+      memcpy (XVECTOR (val)->contents + NUM_RECENT_KEYS - recent_keys_index,
+	      keys, recent_keys_index * sizeof (Lisp_Object));
       return val;
     }
 }
@@ -10876,7 +10803,7 @@
   reset_all_sys_modes ();
   /* sys_suspend can get an error if it tries to fork a subshell
      and the system resources aren't available for that.  */
-  record_unwind_protect ((Lisp_Object (*) P_ ((Lisp_Object))) init_all_sys_modes,
+  record_unwind_protect ((Lisp_Object (*) (Lisp_Object)) init_all_sys_modes,
 			 Qnil);
   stuff_buffered_input (stuffstring);
   if (cannot_suspend)
@@ -10904,8 +10831,7 @@
    Then in any case stuff anything Emacs has read ahead and not used.  */
 
 void
-stuff_buffered_input (stuffstring)
-     Lisp_Object stuffstring;
+stuff_buffered_input (Lisp_Object stuffstring)
 {
 #ifdef SIGTSTP  /* stuff_char is defined if SIGTSTP.  */
   register unsigned char *p;
@@ -10943,8 +10869,7 @@
 }
 
 void
-set_waiting_for_input (time_to_clear)
-     EMACS_TIME *time_to_clear;
+set_waiting_for_input (struct timeval *time_to_clear)
 {
   input_available_clear_time = time_to_clear;
 
@@ -10958,7 +10883,7 @@
 }
 
 void
-clear_waiting_for_input ()
+clear_waiting_for_input (void)
 {
   /* Tell handle_interrupt not to throw back to read_char,  */
   waiting_for_input = 0;
@@ -10972,8 +10897,8 @@
    Otherwise, the handler kills Emacs.  */
 
 static SIGTYPE
-interrupt_signal (signalnum)	/* If we don't have an argument, */
-     int signalnum;		/* some compilers complain in signal calls. */
+interrupt_signal (int signalnum)	/* If we don't have an argument, some */
+					/* compilers complain in signal calls. */
 {
   /* Must preserve main program's value of errno.  */
   int old_errno = errno;
@@ -11017,7 +10942,7 @@
    non-nil, it stops the job right away. */
 
 static void
-handle_interrupt ()
+handle_interrupt (void)
 {
   char c;
 
@@ -11143,7 +11068,7 @@
 /* Handle a C-g by making read_char return C-g.  */
 
 void
-quit_throw_to_read_char ()
+quit_throw_to_read_char (void)
 {
   sigfree ();
   /* Prevent another signal from doing this before we finish.  */
@@ -11478,8 +11403,7 @@
  * Set up a new kboard object with reasonable initial values.
  */
 void
-init_kboard (kb)
-     KBOARD *kb;
+init_kboard (KBOARD *kb)
 {
   kb->Voverriding_terminal_local_map = Qnil;
   kb->Vlast_command = Qnil;
@@ -11513,8 +11437,7 @@
  * it a second time.
  */
 static void
-wipe_kboard (kb)
-     KBOARD *kb;
+wipe_kboard (KBOARD *kb)
 {
   xfree (kb->kbd_macro_buffer);
 }
@@ -11522,8 +11445,7 @@
 /* Free KB and memory referenced from it.  */
 
 void
-delete_kboard (kb)
-     KBOARD *kb;
+delete_kboard (KBOARD *kb)
 {
   KBOARD **kbp;
 
@@ -11548,7 +11470,7 @@
 }
 
 void
-init_keyboard ()
+init_keyboard (void)
 {
   /* This is correct before outermost invocation of the editor loop */
   command_loop_level = -1;
@@ -11648,7 +11570,7 @@
 };
 
 void
-syms_of_keyboard ()
+syms_of_keyboard (void)
 {
   pending_funcalls = Qnil;
   staticpro (&pending_funcalls);
@@ -12424,7 +12346,7 @@
 }
 
 void
-keys_of_keyboard ()
+keys_of_keyboard (void)
 {
   initial_define_key (global_map, Ctl ('Z'), "suspend-emacs");
   initial_define_key (control_x_map, Ctl ('Z'), "suspend-emacs");
@@ -12484,7 +12406,7 @@
 /* Mark the pointers in the kboard objects.
    Called by the Fgarbage_collector.  */
 void
-mark_kboards ()
+mark_kboards (void)
 {
   KBOARD *kb;
   Lisp_Object *p;
--- a/src/keyboard.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/keyboard.h	Thu Jul 08 17:09:35 2010 +0900
@@ -300,7 +300,7 @@
   MENU_ITEMS_ITEM_LENGTH
 };
 
-extern Lisp_Object unuse_menu_items P_ ((Lisp_Object dummy));
+extern Lisp_Object unuse_menu_items (Lisp_Object dummy);
 
 /* This is how to deal with multibyte text if HAVE_MULTILINGUAL_MENU
    isn't defined.  The use of HAVE_MULTILINGUAL_MENU could probably be
@@ -366,8 +366,8 @@
   struct _widget_value*	next;
 } widget_value;
 
-extern widget_value *xmalloc_widget_value P_ ((void));
-extern widget_value *digest_single_submenu P_ ((int, int, int));
+extern widget_value *xmalloc_widget_value (void);
+extern widget_value *digest_single_submenu (int, int, int);
 #endif /* HAVE_NS || HAVE_NTGUI */
 
 
@@ -430,10 +430,10 @@
 /* Forward declaration for prototypes.  */
 struct input_event;
 
-extern Lisp_Object parse_modifiers P_ ((Lisp_Object));
-extern Lisp_Object reorder_modifiers P_ ((Lisp_Object));
-extern Lisp_Object read_char P_ ((int, int, Lisp_Object *, Lisp_Object,
-				  int *, EMACS_TIME *));
+extern Lisp_Object parse_modifiers (Lisp_Object);
+extern Lisp_Object reorder_modifiers (Lisp_Object);
+extern Lisp_Object read_char (int, int, Lisp_Object *, Lisp_Object,
+                              int *, EMACS_TIME *);
 extern int parse_solitary_modifier (Lisp_Object symbol);
 
 
@@ -445,50 +445,50 @@
 
 extern int parse_menu_item (Lisp_Object, int);
 
-extern void echo_now P_ ((void));
-extern void init_kboard P_ ((KBOARD *));
-extern void delete_kboard P_ ((KBOARD *));
-extern void not_single_kboard_state P_ ((KBOARD *));
-extern void push_kboard P_ ((struct kboard *));
-extern void push_frame_kboard P_ ((struct frame *));
-extern void pop_kboard P_ ((void));
-extern void temporarily_switch_to_single_kboard P_ ((struct frame *));
-extern void record_asynch_buffer_change P_ ((void));
-extern SIGTYPE input_poll_signal P_ ((int));
-extern void start_polling P_ ((void));
-extern void stop_polling P_ ((void));
-extern void set_poll_suppress_count P_ ((int));
-extern void gobble_input P_ ((int));
-extern int input_polling_used P_ ((void));
-extern void clear_input_pending P_ ((void));
-extern int requeued_events_pending_p P_ ((void));
-extern void bind_polling_period P_ ((int));
-extern void stuff_buffered_input P_ ((Lisp_Object));
-extern void clear_waiting_for_input P_ ((void));
-extern void swallow_events P_ ((int));
-extern int help_char_p P_ ((Lisp_Object));
-extern void quit_throw_to_read_char P_ ((void)) NO_RETURN;
-extern void cmd_error_internal P_ ((Lisp_Object, char *));
-extern int lucid_event_type_list_p P_ ((Lisp_Object));
-extern void kbd_buffer_store_event P_ ((struct input_event *));
-extern void kbd_buffer_store_event_hold P_ ((struct input_event *,
-					     struct input_event *));
-extern void kbd_buffer_unget_event P_ ((struct input_event *));
+extern void echo_now (void);
+extern void init_kboard (KBOARD *);
+extern void delete_kboard (KBOARD *);
+extern void not_single_kboard_state (KBOARD *);
+extern void push_kboard (struct kboard *);
+extern void push_frame_kboard (struct frame *);
+extern void pop_kboard (void);
+extern void temporarily_switch_to_single_kboard (struct frame *);
+extern void record_asynch_buffer_change (void);
+extern SIGTYPE input_poll_signal (int);
+extern void start_polling (void);
+extern void stop_polling (void);
+extern void set_poll_suppress_count (int);
+extern void gobble_input (int);
+extern int input_polling_used (void);
+extern void clear_input_pending (void);
+extern int requeued_events_pending_p (void);
+extern void bind_polling_period (int);
+extern void stuff_buffered_input (Lisp_Object);
+extern void clear_waiting_for_input (void);
+extern void swallow_events (int);
+extern int help_char_p (Lisp_Object);
+extern void quit_throw_to_read_char (void) NO_RETURN;
+extern void cmd_error_internal (Lisp_Object, char *);
+extern int lucid_event_type_list_p (Lisp_Object);
+extern void kbd_buffer_store_event (struct input_event *);
+extern void kbd_buffer_store_event_hold (struct input_event *,
+                                         struct input_event *);
+extern void kbd_buffer_unget_event (struct input_event *);
 #ifdef POLL_FOR_INPUT
-extern void poll_for_input_1 P_ ((void));
+extern void poll_for_input_1 (void);
 #endif
-extern void show_help_echo P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
-				Lisp_Object, int));
-extern void gen_help_event P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
-			       Lisp_Object, int));
-extern void kbd_buffer_store_help_event P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object menu_item_eval_property P_ ((Lisp_Object));
-extern int  kbd_buffer_events_waiting P_ ((int));
-extern void add_user_signal P_ ((int, const char *));
+extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object,
+                            Lisp_Object, int);
+extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object,
+                            Lisp_Object, int);
+extern void kbd_buffer_store_help_event (Lisp_Object, Lisp_Object);
+extern Lisp_Object menu_item_eval_property (Lisp_Object);
+extern int  kbd_buffer_events_waiting (int);
+extern void add_user_signal (int, const char *);
 
-extern int tty_read_avail_input P_ ((struct terminal *, int,
-                                     struct input_event *));
-extern EMACS_TIME timer_check P_ ((int));
+extern int tty_read_avail_input (struct terminal *, int,
+                                 struct input_event *);
+extern EMACS_TIME timer_check (int);
 
 /* arch-tag: 769cbade-1ba9-4950-b886-db265b061aa3
    (do not change this comment) */
--- a/src/keymap.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/keymap.c	Thu Jul 08 17:09:35 2010 +0900
@@ -115,20 +115,20 @@
 /* Which keymaps are reverse-stored in the cache.  */
 static Lisp_Object where_is_cache_keymaps;
 
-static Lisp_Object store_in_keymap P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-static void fix_submap_inheritance P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-
-static Lisp_Object define_as_prefix P_ ((Lisp_Object, Lisp_Object));
-static void describe_command P_ ((Lisp_Object, Lisp_Object));
-static void describe_translation P_ ((Lisp_Object, Lisp_Object));
-static void describe_map P_ ((Lisp_Object, Lisp_Object,
-			      void (*) P_ ((Lisp_Object, Lisp_Object)),
-			      int, Lisp_Object, Lisp_Object*, int, int));
-static void describe_vector P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
-				 void (*) (Lisp_Object, Lisp_Object), int,
-				 Lisp_Object, Lisp_Object, int *,
-				 int, int, int));
-static void silly_event_symbol_error P_ ((Lisp_Object));
+static Lisp_Object store_in_keymap (Lisp_Object, Lisp_Object, Lisp_Object);
+static void fix_submap_inheritance (Lisp_Object, Lisp_Object, Lisp_Object);
+
+static Lisp_Object define_as_prefix (Lisp_Object, Lisp_Object);
+static void describe_command (Lisp_Object, Lisp_Object);
+static void describe_translation (Lisp_Object, Lisp_Object);
+static void describe_map (Lisp_Object, Lisp_Object,
+                          void (*) (Lisp_Object, Lisp_Object),
+			  int, Lisp_Object, Lisp_Object*, int, int);
+static void describe_vector (Lisp_Object, Lisp_Object, Lisp_Object,
+                             void (*) (Lisp_Object, Lisp_Object), int,
+                             Lisp_Object, Lisp_Object, int *,
+                             int, int, int);
+static void silly_event_symbol_error (Lisp_Object);
 
 /* Keymap object support - constructors and predicates.			*/
 
@@ -183,19 +183,13 @@
    initial_define_key (control_x_map, Ctl('X'), "exchange-point-and-mark");  */
 
 void
-initial_define_key (keymap, key, defname)
-     Lisp_Object keymap;
-     int key;
-     char *defname;
+initial_define_key (Lisp_Object keymap, int key, char *defname)
 {
   store_in_keymap (keymap, make_number (key), intern_c_string (defname));
 }
 
 void
-initial_define_lispy_key (keymap, keyname, defname)
-     Lisp_Object keymap;
-     char *keyname;
-     char *defname;
+initial_define_lispy_key (Lisp_Object keymap, char *keyname, char *defname)
 {
   store_in_keymap (keymap, intern_c_string (keyname), intern_c_string (defname));
 }
@@ -255,9 +249,7 @@
    do_autoload which can GC.  */
 
 Lisp_Object
-get_keymap (object, error, autoload)
-     Lisp_Object object;
-     int error, autoload;
+get_keymap (Lisp_Object object, int error, int autoload)
 {
   Lisp_Object tem;
 
@@ -309,9 +301,7 @@
    We assume that KEYMAP is a valid keymap.  */
 
 Lisp_Object
-keymap_parent (keymap, autoload)
-     Lisp_Object keymap;
-     int autoload;
+keymap_parent (Lisp_Object keymap, int autoload)
 {
   Lisp_Object list;
 
@@ -340,8 +330,7 @@
 
 /* Check whether MAP is one of MAPS parents.  */
 int
-keymap_memberp (map, maps)
-     Lisp_Object map, maps;
+keymap_memberp (Lisp_Object map, Lisp_Object maps)
 {
   if (NILP (map)) return 0;
   while (KEYMAPP (maps) && !EQ (map, maps))
@@ -437,8 +426,7 @@
    make sure that SUBMAP inherits that definition as its own parent.  */
 
 static void
-fix_submap_inheritance (map, event, submap)
-     Lisp_Object map, event, submap;
+fix_submap_inheritance (Lisp_Object map, Lisp_Object event, Lisp_Object submap)
 {
   Lisp_Object map_parent, parent_entry;
 
@@ -500,12 +488,7 @@
    If NOINHERIT, don't accept a subkeymap found in an inherited keymap.  */
 
 Lisp_Object
-access_keymap (map, idx, t_ok, noinherit, autoload)
-     Lisp_Object map;
-     Lisp_Object idx;
-     int t_ok;
-     int noinherit;
-     int autoload;
+access_keymap (Lisp_Object map, Lisp_Object idx, int t_ok, int noinherit, int autoload)
 {
   Lisp_Object val;
 
@@ -634,10 +617,7 @@
 }
 
 static void
-map_keymap_item (fun, args, key, val, data)
-     map_keymap_function_t fun;
-     Lisp_Object args, key, val;
-     void *data;
+map_keymap_item (map_keymap_function_t fun, Lisp_Object args, Lisp_Object key, Lisp_Object val, void *data)
 {
   /* We should maybe try to detect bindings shadowed by previous
      ones and things like that.  */
@@ -647,8 +627,7 @@
 }
 
 static void
-map_keymap_char_table_item (args, key, val)
-     Lisp_Object args, key, val;
+map_keymap_char_table_item (Lisp_Object args, Lisp_Object key, Lisp_Object val)
 {
   if (!NILP (val))
     {
@@ -707,9 +686,7 @@
 }
 
 static void
-map_keymap_call (key, val, fun, dummy)
-     Lisp_Object key, val, fun;
-     void *dummy;
+map_keymap_call (Lisp_Object key, Lisp_Object val, Lisp_Object fun, void *dummy)
 {
   call2 (fun, key, val);
 }
@@ -717,11 +694,7 @@
 /* Same as map_keymap_internal, but doesn't traverses parent keymaps as well.
    A non-zero AUTOLOAD indicates that autoloaded keymaps should be loaded.  */
 void
-map_keymap (map, fun, args, data, autoload)
-     map_keymap_function_t fun;
-     Lisp_Object map, args;
-     void *data;
-     int autoload;
+map_keymap (Lisp_Object map, map_keymap_function_t fun, Lisp_Object args, void *data, int autoload)
 {
   struct gcpro gcpro1;
   GCPRO1 (args);
@@ -739,10 +712,7 @@
 /* Same as map_keymap, but does it right, properly eliminating duplicate
    bindings due to inheritance.   */
 void
-map_keymap_canonical (map, fun, args, data)
-     map_keymap_function_t fun;
-     Lisp_Object map, args;
-     void *data;
+map_keymap_canonical (Lisp_Object map, map_keymap_function_t fun, Lisp_Object args, void *data)
 {
   struct gcpro gcpro1;
   GCPRO1 (args);
@@ -804,9 +774,7 @@
    This can GC because menu_item_eval_property calls Feval.  */
 
 Lisp_Object
-get_keyelt (object, autoload)
-     Lisp_Object object;
-     int autoload;
+get_keyelt (Lisp_Object object, int autoload)
 {
   while (1)
     {
@@ -886,10 +854,7 @@
 }
 
 static Lisp_Object
-store_in_keymap (keymap, idx, def)
-     Lisp_Object keymap;
-     register Lisp_Object idx;
-     Lisp_Object def;
+store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
 {
   /* Flush any reverse-map cache.  */
   where_is_cache = Qnil;
@@ -1044,8 +1009,7 @@
 EXFUN (Fcopy_keymap, 1);
 
 Lisp_Object
-copy_keymap_item (elt)
-     Lisp_Object elt;
+copy_keymap_item (Lisp_Object elt)
 {
   Lisp_Object res, tem;
 
@@ -1118,8 +1082,7 @@
 }
 
 static void
-copy_keymap_1 (chartable, idx, elt)
-     Lisp_Object chartable, idx, elt;
+copy_keymap_1 (Lisp_Object chartable, Lisp_Object idx, Lisp_Object elt)
 {
   Fset_char_table_range (chartable, idx, copy_keymap_item (elt));
 }
@@ -1412,8 +1375,7 @@
    Return the keymap.  */
 
 static Lisp_Object
-define_as_prefix (keymap, c)
-     Lisp_Object keymap, c;
+define_as_prefix (Lisp_Object keymap, Lisp_Object c)
 {
   Lisp_Object cmd;
 
@@ -1430,8 +1392,7 @@
 /* Append a key to the end of a key sequence.  We always make a vector.  */
 
 Lisp_Object
-append_key (key_sequence, key)
-     Lisp_Object key_sequence, key;
+append_key (Lisp_Object key_sequence, Lisp_Object key)
 {
   Lisp_Object args[2];
 
@@ -1445,8 +1406,7 @@
    signal an error if is a mistake such as RET or M-RET or C-DEL, etc.  */
 
 static void
-silly_event_symbol_error (c)
-     Lisp_Object c;
+silly_event_symbol_error (Lisp_Object c)
 {
   Lisp_Object parsed, base, name, assoc;
   int modifiers;
@@ -1515,8 +1475,7 @@
    list, let the key sequence be read, and hope some other piece of
    code signals the error.  */
 int
-current_minor_maps (modeptr, mapptr)
-     Lisp_Object **modeptr, **mapptr;
+current_minor_maps (Lisp_Object **modeptr, Lisp_Object **mapptr)
 {
   int i = 0;
   int list_number = 0;
@@ -1575,7 +1534,8 @@
 		  {
 		    if (cmm_modes)
 		      {
-			bcopy (cmm_modes, newmodes, cmm_size * sizeof cmm_modes[0]);
+			memcpy (newmodes, cmm_modes,
+				cmm_size * sizeof cmm_modes[0]);
 			free (cmm_modes);
 		      }
 		    cmm_modes = newmodes;
@@ -1586,7 +1546,8 @@
 		  {
 		    if (cmm_maps)
 		      {
-			bcopy (cmm_maps, newmaps, cmm_size * sizeof cmm_maps[0]);
+			memcpy (newmaps, cmm_maps,
+				cmm_size * sizeof cmm_maps[0]);
 			free (cmm_maps);
 		      }
 		    cmm_maps = newmaps;
@@ -2128,10 +2089,8 @@
 };
 
 static void
-accessible_keymaps_1 (key, cmd, args, data)
-     Lisp_Object key, cmd, args;
-     /* Use void* to be compatible with map_keymap_function_t.  */
-     void *data;
+accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *data)
+/* Use void* data to be compatible with map_keymap_function_t.  */
 {
   struct accessible_keymaps_data *d = data; /* Cast! */
   Lisp_Object maps = d->maps;
@@ -2389,10 +2348,7 @@
 
 
 char *
-push_key_description (c, p, force_multibyte)
-     register unsigned int c;
-     register char *p;
-     int force_multibyte;
+push_key_description (register unsigned int c, register char *p, int force_multibyte)
 {
   unsigned c2;
 
@@ -2549,9 +2505,7 @@
 }
 
 char *
-push_text_char_description (c, p)
-     register unsigned int c;
-     register char *p;
+push_text_char_description (register unsigned int c, register char *p)
 {
   if (c >= 0200)
     {
@@ -2611,8 +2565,7 @@
    Else, return 2 if SEQ uses the where_is_preferred_modifier,
    and 1 otherwise.  */
 static int
-preferred_sequence_p (seq)
-     Lisp_Object seq;
+preferred_sequence_p (Lisp_Object seq)
 {
   int i;
   int len = XINT (Flength (seq));
@@ -2643,8 +2596,8 @@
 
 /* where-is - finding a command in a set of keymaps.			*/
 
-static void where_is_internal_1 P_ ((Lisp_Object key, Lisp_Object binding,
-				     Lisp_Object args, void *data));
+static void where_is_internal_1 (Lisp_Object key, Lisp_Object binding,
+                                 Lisp_Object args, void *data);
 
 /* Like Flookup_key, but uses a list of keymaps SHADOW instead of a single map.
    Returns the first non-nil binding found in any of those maps.
@@ -2982,9 +2935,7 @@
 /* This function can GC because get_keyelt can.  */
 
 static void
-where_is_internal_1 (key, binding, args, data)
-     Lisp_Object key, binding, args;
-     void *data;
+where_is_internal_1 (Lisp_Object key, Lisp_Object binding, Lisp_Object args, void *data)
 {
   struct where_is_internal_data *d = data; /* Cast! */
   Lisp_Object definition = d->definition;
@@ -3151,12 +3102,12 @@
 	  *p++ = '\f';
 	  *p++ = '\n';
 	  *p++ = '`';
-	  bcopy (SDATA (SYMBOL_NAME (modes[i])), p,
-		 SCHARS (SYMBOL_NAME (modes[i])));
+	  memcpy (p, SDATA (SYMBOL_NAME (modes[i])),
+		  SCHARS (SYMBOL_NAME (modes[i])));
 	  p += SCHARS (SYMBOL_NAME (modes[i]));
 	  *p++ = '\'';
-	  bcopy (" Minor Mode Bindings", p, sizeof (" Minor Mode Bindings") - 1);
-	  p += sizeof (" Minor Mode Bindings") - 1;
+	  memcpy (p, " Minor Mode Bindings", strlen (" Minor Mode Bindings"));
+	  p += strlen (" Minor Mode Bindings");
 	  *p = 0;
 
 	  describe_map_tree (maps[i], 1, shadow, prefix,
@@ -3342,8 +3293,7 @@
 static int previous_description_column;
 
 static void
-describe_command (definition, args)
-     Lisp_Object definition, args;
+describe_command (Lisp_Object definition, Lisp_Object args)
 {
   register Lisp_Object tem1;
   int column = (int) current_column (); /* iftc */
@@ -3379,8 +3329,7 @@
 }
 
 static void
-describe_translation (definition, args)
-     Lisp_Object definition, args;
+describe_translation (Lisp_Object definition, Lisp_Object args)
 {
   register Lisp_Object tem1;
 
@@ -3413,8 +3362,7 @@
    the event field.  */
 
 static int
-describe_map_compare (aa, bb)
-     const void *aa, *bb;
+describe_map_compare (const void *aa, const void *bb)
 {
   const struct describe_map_elt *a = aa, *b = bb;
   if (INTEGERP (a->event) && INTEGERP (b->event))
@@ -3440,7 +3388,7 @@
 	      seen, nomenu, mention_shadow)
      register Lisp_Object map;
      Lisp_Object prefix;
-     void (*elt_describer) P_ ((Lisp_Object, Lisp_Object));
+     void (*elt_describer) (Lisp_Object, Lisp_Object);
      int partial;
      Lisp_Object shadow;
      Lisp_Object *seen;
@@ -3624,8 +3572,7 @@
 }
 
 static void
-describe_vector_princ (elt, fun)
-     Lisp_Object elt, fun;
+describe_vector_princ (Lisp_Object elt, Lisp_Object fun)
 {
   Findent_to (make_number (16), make_number (1));
   call1 (fun, elt);
@@ -3692,7 +3639,7 @@
 		 mention_shadow)
      register Lisp_Object vector;
      Lisp_Object prefix, args;
-     void (*elt_describer) P_ ((Lisp_Object, Lisp_Object));
+     void (*elt_describer) (Lisp_Object, Lisp_Object);
      int partial;
      Lisp_Object shadow;
      Lisp_Object entire_map;
@@ -3893,8 +3840,7 @@
 static Lisp_Object apropos_accumulate;
 
 static void
-apropos_accum (symbol, string)
-     Lisp_Object symbol, string;
+apropos_accum (Lisp_Object symbol, Lisp_Object string)
 {
   register Lisp_Object tem;
 
@@ -3925,7 +3871,7 @@
 }
 
 void
-syms_of_keymap ()
+syms_of_keymap (void)
 {
   Qkeymap = intern_c_string ("keymap");
   staticpro (&Qkeymap);
@@ -4119,7 +4065,7 @@
 }
 
 void
-keys_of_keymap ()
+keys_of_keymap (void)
 {
   initial_define_key (global_map, 033, "ESC-prefix");
   initial_define_key (global_map, Ctl ('X'), "Control-X-prefix");
--- a/src/keymap.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/keymap.h	Thu Jul 08 17:09:35 2010 +0900
@@ -33,21 +33,21 @@
 EXFUN (Fsingle_key_description, 2);
 EXFUN (Fwhere_is_internal, 5);
 EXFUN (Fcurrent_active_maps, 2);
-extern Lisp_Object access_keymap P_ ((Lisp_Object, Lisp_Object, int, int, int));
-extern Lisp_Object get_keyelt P_ ((Lisp_Object, int));
-extern Lisp_Object get_keymap P_ ((Lisp_Object, int, int));
+extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int);
+extern Lisp_Object get_keyelt (Lisp_Object, int);
+extern Lisp_Object get_keymap (Lisp_Object, int, int);
 EXFUN (Fset_keymap_parent, 2);
-extern void describe_map_tree P_ ((Lisp_Object, int, Lisp_Object, Lisp_Object,
-				   char *, int, int, int, int));
-extern int current_minor_maps P_ ((Lisp_Object **, Lisp_Object **));
-extern void initial_define_key P_ ((Lisp_Object, int, char *));
-extern void initial_define_lispy_key P_ ((Lisp_Object, char *, char *));
-extern void syms_of_keymap P_ ((void));
-extern void keys_of_keymap P_ ((void));
+extern void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
+                               char *, int, int, int, int);
+extern int current_minor_maps (Lisp_Object **, Lisp_Object **);
+extern void initial_define_key (Lisp_Object, int, char *);
+extern void initial_define_lispy_key (Lisp_Object, char *, char *);
+extern void syms_of_keymap (void);
+extern void keys_of_keymap (void);
 
 typedef void (*map_keymap_function_t)
-     P_ ((Lisp_Object key, Lisp_Object val, Lisp_Object args, void* data));
-extern void map_keymap P_ ((Lisp_Object map, map_keymap_function_t fun, Lisp_Object largs, void* cargs, int autoload));
+     (Lisp_Object key, Lisp_Object val, Lisp_Object args, void* data);
+extern void map_keymap (Lisp_Object map, map_keymap_function_t fun, Lisp_Object largs, void* cargs, int autoload);
 extern void map_keymap_canonical (Lisp_Object map,
 				  map_keymap_function_t fun,
 				  Lisp_Object args, void *data);
--- a/src/lisp.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/lisp.h	Thu Jul 08 17:09:35 2010 +0900
@@ -21,9 +21,6 @@
 #ifndef EMACS_LISP_H
 #define EMACS_LISP_H
 
-/* Declare the prototype for a general external function.  */
-#define P_(proto) proto
-
 /* Use the configure flag --enable-checking[=LIST] to enable various
    types of run time checks for Lisp objects.  */
 
@@ -54,7 +51,7 @@
 
 /* Extra internal type checking?  */
 extern int suppress_checking;
-extern void die P_((const char *, const char *, int)) NO_RETURN;
+extern void die (const char *, const char *, int) NO_RETURN;
 
 #ifdef ENABLE_CHECKING
 
@@ -95,10 +92,9 @@
 #endif
 #endif /* ENABLE_CHECKING */
 
-/* Define this to make Lisp_Object use a union type instead of the
-   default int.  FIXME: It might be better to add a flag to configure
-   to do this.  */
-/* #define USE_LISP_UNION_TYPE */
+/* Use the configure flag --enable-use-lisp-union-type to make
+   Lisp_Object use a union type instead of the default int.  The flag
+   causes USE_LISP_UNION_TYPE to be defined.  */
 
 /***** Select the tagging scheme.  *****/
 /* There are basically two options that control the tagging scheme:
@@ -493,7 +489,7 @@
 #define make_number(N) \
   (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; }))
 #else
-extern Lisp_Object make_number P_ ((EMACS_INT));
+extern Lisp_Object make_number (EMACS_INT);
 #endif
 
 #endif /* USE_LISP_UNION_TYPE */
@@ -651,7 +647,7 @@
     (XSTRING (string)->size = (newsize))
 
 #define STRING_COPYIN(string, index, new, count) \
-    bcopy (new, SDATA (string) + index, count)
+    memcpy (SDATA (string) + index, new, count)
 
 /* Type checking.  */
 
@@ -747,7 +743,7 @@
 #ifdef GC_CHECK_STRING_BYTES
 
 struct Lisp_String;
-extern int string_bytes P_ ((struct Lisp_String *));
+extern int string_bytes (struct Lisp_String *);
 #define STRING_BYTES(S) string_bytes ((S))
 
 #else /* not GC_CHECK_STRING_BYTES */
@@ -969,7 +965,18 @@
 struct Lisp_Subr
   {
     EMACS_UINT size;
-    Lisp_Object (*function) ();
+    union {
+      Lisp_Object (*a0) (void);
+      Lisp_Object (*a1) (Lisp_Object);
+      Lisp_Object (*a2) (Lisp_Object, Lisp_Object);
+      Lisp_Object (*a3) (Lisp_Object, Lisp_Object, Lisp_Object);
+      Lisp_Object (*a4) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
+      Lisp_Object (*a5) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
+      Lisp_Object (*a6) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
+      Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
+      Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
+      Lisp_Object (*am) (int, Lisp_Object *);
+    } function;
     short min_args, max_args;
     const char *symbol_name;
     char *intspec;
@@ -1155,11 +1162,11 @@
   struct Lisp_Hash_Table *next_weak;
 
   /* C function to compare two keys.  */
-  int (* cmpfn) P_ ((struct Lisp_Hash_Table *, Lisp_Object,
-		     unsigned, Lisp_Object, unsigned));
+  int (* cmpfn) (struct Lisp_Hash_Table *, Lisp_Object,
+                 unsigned, Lisp_Object, unsigned);
 
   /* C function to compute hash code.  */
-  unsigned (* hashfn) P_ ((struct Lisp_Hash_Table *, Lisp_Object));
+  unsigned (* hashfn) (struct Lisp_Hash_Table *, Lisp_Object);
 };
 
 
@@ -1772,7 +1779,7 @@
   Lisp_Object fnname DEFUN_ARGS_ ## maxargs ;				\
   DECL_ALIGN (struct Lisp_Subr, sname) =				\
     { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)),	\
-      fnname, minargs, maxargs, lname, intspec, 0};			\
+      (Lisp_Object(*)(void)) fnname, minargs, maxargs, lname, intspec, 0}; \
   Lisp_Object fnname
 
 /* Note that the weird token-substitution semantics of ANSI C makes
@@ -1802,7 +1809,7 @@
 
 /* defsubr (Sname);
    is how we define the symbol for function `name' at start-up time.  */
-extern void defsubr P_ ((struct Lisp_Subr *));
+extern void defsubr (struct Lisp_Subr *);
 
 #define MANY -2
 #define UNEVALLED -1
@@ -1868,7 +1875,7 @@
    WHERE being a buffer or frame means we saw a buffer-local or frame-local
    value.  Other values of WHERE mean an internal error.  */
 
-typedef Lisp_Object (*specbinding_func) P_ ((Lisp_Object));
+typedef Lisp_Object (*specbinding_func) (Lisp_Object);
 
 struct specbinding
   {
@@ -1968,7 +1975,7 @@
    and (in particular) cannot call arbitrary Lisp code.  */
 
 #ifdef SYNC_INPUT
-extern void process_pending_signals P_ ((void));
+extern void process_pending_signals (void);
 extern int pending_signals;
 #define ELSE_PENDING_SIGNALS				\
   else if (pending_signals)				\
@@ -2241,7 +2248,7 @@
 
 /* Call staticpro (&var) to protect static variable `var'.  */
 
-void staticpro P_ ((Lisp_Object *));
+void staticpro (Lisp_Object *);
 
 /* Declare a Lisp-callable function.  The MAXARGS parameter has the same
    meaning as in the DEFUN macro, and is used to construct a prototype.  */
@@ -2284,7 +2291,7 @@
 
 extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
 
-extern void circular_list_error P_ ((Lisp_Object)) NO_RETURN;
+extern void circular_list_error (Lisp_Object) NO_RETURN;
 EXFUN (Finteractive_form, 1);
 EXFUN (Fbyteorder, 0);
 
@@ -2327,12 +2334,12 @@
 EXFUN (Fsymbol_function, 1);
 EXFUN (Fsymbol_plist, 1);
 EXFUN (Fsymbol_name, 1);
-extern Lisp_Object indirect_function P_ ((Lisp_Object));
+extern Lisp_Object indirect_function (Lisp_Object);
 EXFUN (Findirect_function, 2);
 EXFUN (Ffset, 2);
 EXFUN (Fsetplist, 2);
 EXFUN (Fsymbol_value, 1);
-extern Lisp_Object find_symbol_value P_ ((Lisp_Object));
+extern Lisp_Object find_symbol_value (Lisp_Object);
 EXFUN (Fset, 2);
 EXFUN (Fdefault_value, 1);
 EXFUN (Fset_default, 2);
@@ -2372,25 +2379,25 @@
 EXFUN (Fmake_variable_buffer_local, 1);
 
 extern struct Lisp_Symbol *indirect_variable (struct Lisp_Symbol *);
-extern Lisp_Object long_to_cons P_ ((unsigned long));
-extern unsigned long cons_to_long P_ ((Lisp_Object));
-extern void args_out_of_range P_ ((Lisp_Object, Lisp_Object)) NO_RETURN;
-extern void args_out_of_range_3 P_ ((Lisp_Object, Lisp_Object,
-				     Lisp_Object)) NO_RETURN;
-extern Lisp_Object wrong_type_argument P_ ((Lisp_Object, Lisp_Object)) NO_RETURN;
+extern Lisp_Object long_to_cons (unsigned long);
+extern unsigned long cons_to_long (Lisp_Object);
+extern void args_out_of_range (Lisp_Object, Lisp_Object) NO_RETURN;
+extern void args_out_of_range_3 (Lisp_Object, Lisp_Object,
+                                 Lisp_Object) NO_RETURN;
+extern Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object) NO_RETURN;
 extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *);
 extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, int);
-extern void syms_of_data P_ ((void));
-extern void init_data P_ ((void));
-extern void swap_in_global_binding P_ ((struct Lisp_Symbol *));
+extern void syms_of_data (void);
+extern void init_data (void);
+extern void swap_in_global_binding (struct Lisp_Symbol *);
 
 /* Defined in cmds.c */
 EXFUN (Fend_of_line, 1);
 EXFUN (Fforward_char, 1);
 EXFUN (Fforward_line, 1);
-extern int internal_self_insert P_ ((int, int));
-extern void syms_of_cmds P_ ((void));
-extern void keys_of_cmds P_ ((void));
+extern int internal_self_insert (int, int);
+extern void syms_of_cmds (void);
+extern void keys_of_cmds (void);
 
 /* Defined in coding.c */
 EXFUN (Fcoding_system_p, 1);
@@ -2404,34 +2411,34 @@
 EXFUN (Fupdate_coding_systems_internal, 0);
 EXFUN (Fencode_coding_string, 4);
 EXFUN (Fdecode_coding_string, 4);
-extern Lisp_Object detect_coding_system P_ ((const unsigned char *, EMACS_INT,
-					     EMACS_INT, int, int, Lisp_Object));
-extern void init_coding P_ ((void));
-extern void init_coding_once P_ ((void));
-extern void syms_of_coding P_ ((void));
+extern Lisp_Object detect_coding_system (const unsigned char *, EMACS_INT,
+                                         EMACS_INT, int, int, Lisp_Object);
+extern void init_coding (void);
+extern void init_coding_once (void);
+extern void syms_of_coding (void);
 
 /* Defined in character.c */
-extern void init_character_once P_ ((void));
-extern void syms_of_character P_ ((void));
+extern void init_character_once (void);
+extern void syms_of_character (void);
 EXFUN (Funibyte_char_to_multibyte, 1);
 
 /* Defined in charset.c */
 EXFUN (Fchar_bytes, 1);
 EXFUN (Fchar_width, 1);
 EXFUN (Fstring, MANY);
-extern EMACS_INT chars_in_text P_ ((const unsigned char *, EMACS_INT));
-extern EMACS_INT multibyte_chars_in_text P_ ((const unsigned char *, EMACS_INT));
-extern int multibyte_char_to_unibyte P_ ((int, Lisp_Object));
-extern int multibyte_char_to_unibyte_safe P_ ((int));
+extern EMACS_INT chars_in_text (const unsigned char *, EMACS_INT);
+extern EMACS_INT multibyte_chars_in_text (const unsigned char *, EMACS_INT);
+extern int multibyte_char_to_unibyte (int, Lisp_Object);
+extern int multibyte_char_to_unibyte_safe (int);
 extern Lisp_Object Qcharset;
-extern void init_charset P_ ((void));
-extern void init_charset_once P_ ((void));
-extern void syms_of_charset P_ ((void));
+extern void init_charset (void);
+extern void init_charset_once (void);
+extern void syms_of_charset (void);
 /* Structure forward declarations.  */
 struct charset;
 
 /* Defined in composite.c */
-extern void syms_of_composite P_ ((void));
+extern void syms_of_composite (void);
 
 /* Defined in syntax.c */
 EXFUN (Fforward_word, 1);
@@ -2440,28 +2447,28 @@
 EXFUN (Fsyntax_table_p, 1);
 EXFUN (Fsyntax_table, 0);
 EXFUN (Fset_syntax_table, 1);
-extern void init_syntax_once P_ ((void));
-extern void syms_of_syntax P_ ((void));
+extern void init_syntax_once (void);
+extern void syms_of_syntax (void);
 
 /* Defined in fns.c */
 extern int use_dialog_box;
-extern int next_almost_prime P_ ((int));
-extern Lisp_Object larger_vector P_ ((Lisp_Object, int, Lisp_Object));
-extern void sweep_weak_hash_tables P_ ((void));
+extern int next_almost_prime (int);
+extern Lisp_Object larger_vector (Lisp_Object, int, Lisp_Object);
+extern void sweep_weak_hash_tables (void);
 extern Lisp_Object Qstring_lessp;
 extern Lisp_Object Vfeatures;
 extern Lisp_Object QCtest, QCweakness, Qequal, Qeq;
-unsigned sxhash P_ ((Lisp_Object, int));
-Lisp_Object make_hash_table P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
-				 Lisp_Object, Lisp_Object, Lisp_Object,
-				 Lisp_Object));
-Lisp_Object copy_hash_table P_ ((struct Lisp_Hash_Table *));
-int hash_lookup P_ ((struct Lisp_Hash_Table *, Lisp_Object, unsigned *));
-int hash_put P_ ((struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object,
-		  unsigned));
-void hash_clear P_ ((struct Lisp_Hash_Table *));
-void init_weak_hash_tables P_ ((void));
-extern void init_fns P_ ((void));
+unsigned sxhash (Lisp_Object, int);
+Lisp_Object make_hash_table (Lisp_Object, Lisp_Object, Lisp_Object,
+                             Lisp_Object, Lisp_Object, Lisp_Object,
+                             Lisp_Object);
+Lisp_Object copy_hash_table (struct Lisp_Hash_Table *);
+int hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, unsigned *);
+int hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object,
+              unsigned);
+void hash_clear (struct Lisp_Hash_Table *);
+void init_weak_hash_tables (void);
+extern void init_fns (void);
 EXFUN (Fsxhash, 1);
 EXFUN (Fmake_hash_table, MANY);
 EXFUN (Fmakehash, 1);
@@ -2495,7 +2502,7 @@
 EXFUN (Fstring_to_multibyte, 1);
 EXFUN (Fstring_to_unibyte, 1);
 EXFUN (Fsubstring, 3);
-extern Lisp_Object substring_both P_ ((Lisp_Object, int, int, int, int));
+extern Lisp_Object substring_both (Lisp_Object, int, int, int, int);
 EXFUN (Fnth, 2);
 EXFUN (Fnthcdr, 2);
 EXFUN (Fmemq, 2);
@@ -2517,20 +2524,20 @@
 EXFUN (Fmapcar, 2);
 EXFUN (Fmapconcat, 3);
 EXFUN (Fy_or_n_p, 1);
-extern Lisp_Object do_yes_or_no_p P_ ((Lisp_Object));
+extern Lisp_Object do_yes_or_no_p (Lisp_Object);
 EXFUN (Frequire, 3);
 EXFUN (Fprovide, 2);
-extern Lisp_Object concat2 P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object concat3 P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-extern Lisp_Object nconc2 P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object assq_no_quit P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object assoc_no_quit P_ ((Lisp_Object, Lisp_Object));
-extern void clear_string_char_byte_cache P_ ((void));
-extern EMACS_INT string_char_to_byte P_ ((Lisp_Object, EMACS_INT));
-extern EMACS_INT string_byte_to_char P_ ((Lisp_Object, EMACS_INT));
-extern Lisp_Object string_make_multibyte P_ ((Lisp_Object));
-extern Lisp_Object string_to_multibyte P_ ((Lisp_Object));
-extern Lisp_Object string_make_unibyte P_ ((Lisp_Object));
+extern Lisp_Object concat2 (Lisp_Object, Lisp_Object);
+extern Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object);
+extern Lisp_Object nconc2 (Lisp_Object, Lisp_Object);
+extern Lisp_Object assq_no_quit (Lisp_Object, Lisp_Object);
+extern Lisp_Object assoc_no_quit (Lisp_Object, Lisp_Object);
+extern void clear_string_char_byte_cache (void);
+extern EMACS_INT string_char_to_byte (Lisp_Object, EMACS_INT);
+extern EMACS_INT string_byte_to_char (Lisp_Object, EMACS_INT);
+extern Lisp_Object string_make_multibyte (Lisp_Object);
+extern Lisp_Object string_to_multibyte (Lisp_Object);
+extern Lisp_Object string_make_unibyte (Lisp_Object);
 EXFUN (Fcopy_alist, 1);
 EXFUN (Fplist_get, 2);
 EXFUN (Fplist_put, 3);
@@ -2539,24 +2546,24 @@
 EXFUN (Fstring_equal, 2);
 EXFUN (Fcompare_strings, 7);
 EXFUN (Fstring_lessp, 2);
-extern void syms_of_fns P_ ((void));
+extern void syms_of_fns (void);
 
 /* Defined in floatfns.c */
-extern double extract_float P_ ((Lisp_Object));
+extern double extract_float (Lisp_Object);
 EXFUN (Ffloat, 1);
 EXFUN (Ftruncate, 2);
-extern void init_floatfns P_ ((void));
-extern void syms_of_floatfns P_ ((void));
+extern void init_floatfns (void);
+extern void syms_of_floatfns (void);
 
 /* Defined in fringe.c */
-extern void syms_of_fringe P_ ((void));
-extern void init_fringe P_ ((void));
-extern void init_fringe_once P_ ((void));
+extern void syms_of_fringe (void);
+extern void init_fringe (void);
+extern void init_fringe_once (void);
 
 /* Defined in image.c */
 EXFUN (Finit_image_library, 2);
-extern void syms_of_image P_ ((void));
-extern void init_image P_ ((void));
+extern void syms_of_image (void);
+extern void init_image (void);
 
 /* Defined in insdel.c */
 extern Lisp_Object Qinhibit_modification_hooks;
@@ -2618,10 +2625,9 @@
 EXFUN (Fredraw_display, 0);
 EXFUN (Fsleep_for, 2);
 EXFUN (Fredisplay, 1);
-extern Lisp_Object sit_for P_ ((Lisp_Object, int, int));
-extern void init_display P_ ((void));
-extern void syms_of_display P_ ((void));
-extern void safe_bcopy P_ ((const char *, char *, int));
+extern Lisp_Object sit_for (Lisp_Object, int, int);
+extern void init_display (void);
+extern void syms_of_display (void);
 
 /* Defined in xdisp.c */
 extern Lisp_Object Qinhibit_point_motion_hooks;
@@ -2632,58 +2638,58 @@
 extern Lisp_Object Vmessage_log_max;
 extern int message_enable_multibyte;
 extern Lisp_Object echo_area_buffer[2];
-extern void check_message_stack P_ ((void));
-extern void setup_echo_area_for_printing P_ ((int));
-extern int push_message P_ ((void));
-extern Lisp_Object pop_message_unwind P_ ((Lisp_Object));
-extern Lisp_Object restore_message_unwind P_ ((Lisp_Object));
-extern void pop_message P_ ((void));
-extern void restore_message P_ ((void));
-extern Lisp_Object current_message P_ ((void));
-extern void set_message P_ ((const char *s, Lisp_Object, int, int));
-extern void clear_message P_ ((int, int));
-extern void message P_ ((/* char *, ... */));
-extern void message_nolog P_ ((/* char *, ... */));
-extern void message1 P_ ((char *));
-extern void message1_nolog P_ ((char *));
-extern void message2 P_ ((const char *, int, int));
-extern void message2_nolog P_ ((const char *, int, int));
-extern void message3 P_ ((Lisp_Object, int, int));
-extern void message3_nolog P_ ((Lisp_Object, int, int));
-extern void message_dolog P_ ((const char *, int, int, int));
-extern void message_with_string P_ ((char *, Lisp_Object, int));
-extern void message_log_maybe_newline P_ ((void));
-extern void update_echo_area P_ ((void));
-extern void truncate_echo_area P_ ((int));
-extern void redisplay P_ ((void));
+extern void check_message_stack (void);
+extern void setup_echo_area_for_printing (int);
+extern int push_message (void);
+extern Lisp_Object pop_message_unwind (Lisp_Object);
+extern Lisp_Object restore_message_unwind (Lisp_Object);
+extern void pop_message (void);
+extern void restore_message (void);
+extern Lisp_Object current_message (void);
+extern void set_message (const char *s, Lisp_Object, int, int);
+extern void clear_message (int, int);
+extern void message (/* char *, ... */);
+extern void message_nolog (/* char *, ... */);
+extern void message1 (char *);
+extern void message1_nolog (char *);
+extern void message2 (const char *, int, int);
+extern void message2_nolog (const char *, int, int);
+extern void message3 (Lisp_Object, int, int);
+extern void message3_nolog (Lisp_Object, int, int);
+extern void message_dolog (const char *, int, int, int);
+extern void message_with_string (char *, Lisp_Object, int);
+extern void message_log_maybe_newline (void);
+extern void update_echo_area (void);
+extern void truncate_echo_area (int);
+extern void redisplay (void);
 extern int check_point_in_composition
-	P_ ((struct buffer *, int, struct buffer *, int));
-extern void redisplay_preserve_echo_area P_ ((int));
-extern void prepare_menu_bars P_ ((void));
-
-void set_frame_cursor_types P_ ((struct frame *, Lisp_Object));
-extern void syms_of_xdisp P_ ((void));
-extern void init_xdisp P_ ((void));
-extern Lisp_Object safe_eval P_ ((Lisp_Object));
-extern int pos_visible_p P_ ((struct window *, int, int *,
-			      int *, int *, int *, int *, int *));
+        (struct buffer *, int, struct buffer *, int);
+extern void redisplay_preserve_echo_area (int);
+extern void prepare_menu_bars (void);
+
+void set_frame_cursor_types (struct frame *, Lisp_Object);
+extern void syms_of_xdisp (void);
+extern void init_xdisp (void);
+extern Lisp_Object safe_eval (Lisp_Object);
+extern int pos_visible_p (struct window *, int, int *,
+                          int *, int *, int *, int *, int *);
 
 /* Defined in xsettings.c */
-extern void syms_of_xsettings P_ ((void));
+extern void syms_of_xsettings (void);
 
 /* Defined in vm-limit.c.  */
-extern void memory_warnings P_ ((POINTER_TYPE *, void (*warnfun) ()));
+extern void memory_warnings (POINTER_TYPE *, void (*warnfun) (char*));
 
 /* Defined in alloc.c */
-extern void check_pure_size P_ ((void));
-extern void allocate_string_data P_ ((struct Lisp_String *, int, int));
-extern void reset_malloc_hooks P_ ((void));
-extern void uninterrupt_malloc P_ ((void));
-extern void malloc_warning P_ ((char *));
-extern void memory_full P_ ((void)) NO_RETURN;
-extern void buffer_memory_full P_ ((void)) NO_RETURN;
-extern int survives_gc_p P_ ((Lisp_Object));
-extern void mark_object P_ ((Lisp_Object));
+extern void check_pure_size (void);
+extern void allocate_string_data (struct Lisp_String *, int, int);
+extern void reset_malloc_hooks (void);
+extern void uninterrupt_malloc (void);
+extern void malloc_warning (char *);
+extern void memory_full (void) NO_RETURN;
+extern void buffer_memory_full (void) NO_RETURN;
+extern int survives_gc_p (Lisp_Object);
+extern void mark_object (Lisp_Object);
 extern Lisp_Object Vpurify_flag;
 extern Lisp_Object Vmemory_full;
 EXFUN (Fcons, 2);
@@ -2694,55 +2700,55 @@
 EXFUN (list5, 5);
 EXFUN (Flist, MANY);
 EXFUN (Fmake_list, 2);
-extern Lisp_Object allocate_misc P_ ((void));
+extern Lisp_Object allocate_misc (void);
 EXFUN (Fmake_vector, 2);
 EXFUN (Fvector, MANY);
 EXFUN (Fmake_symbol, 1);
 EXFUN (Fmake_marker, 0);
 EXFUN (Fmake_string, 2);
-extern Lisp_Object build_string P_ ((const char *));
-extern Lisp_Object make_string P_ ((const char *, int));
-extern Lisp_Object make_unibyte_string P_ ((const char *, int));
-extern Lisp_Object make_multibyte_string P_ ((const char *, int, int));
-extern Lisp_Object make_event_array P_ ((int, Lisp_Object *));
-extern Lisp_Object make_uninit_string P_ ((int));
-extern Lisp_Object make_uninit_multibyte_string P_ ((int, int));
-extern Lisp_Object make_string_from_bytes P_ ((const char *, int, int));
-extern Lisp_Object make_specified_string P_ ((const char *, int, int, int));
+extern Lisp_Object build_string (const char *);
+extern Lisp_Object make_string (const char *, int);
+extern Lisp_Object make_unibyte_string (const char *, int);
+extern Lisp_Object make_multibyte_string (const char *, int, int);
+extern Lisp_Object make_event_array (int, Lisp_Object *);
+extern Lisp_Object make_uninit_string (int);
+extern Lisp_Object make_uninit_multibyte_string (int, int);
+extern Lisp_Object make_string_from_bytes (const char *, int, int);
+extern Lisp_Object make_specified_string (const char *, int, int, int);
 EXFUN (Fpurecopy, 1);
-extern Lisp_Object make_pure_string P_ ((const char *, int, int, int));
+extern Lisp_Object make_pure_string (const char *, int, int, int);
 extern Lisp_Object make_pure_c_string (const char *data);
-extern Lisp_Object pure_cons P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object make_pure_vector P_ ((EMACS_INT));
+extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
+extern Lisp_Object make_pure_vector (EMACS_INT);
 EXFUN (Fgarbage_collect, 0);
 EXFUN (Fmake_byte_code, MANY);
 EXFUN (Fmake_bool_vector, 2);
 extern Lisp_Object Qchar_table_extra_slots;
-extern struct Lisp_Vector *allocate_vector P_ ((EMACS_INT));
-extern struct Lisp_Vector *allocate_pseudovector P_ ((int memlen, int lisplen, EMACS_INT tag));
+extern struct Lisp_Vector *allocate_vector (EMACS_INT);
+extern struct Lisp_Vector *allocate_pseudovector (int memlen, int lisplen, EMACS_INT tag);
 #define ALLOCATE_PSEUDOVECTOR(typ,field,tag)				\
   ((typ*)								\
    allocate_pseudovector						\
        (VECSIZE (typ), PSEUDOVECSIZE (typ, field), tag))
-extern struct Lisp_Hash_Table *allocate_hash_table P_ ((void));
-extern struct window *allocate_window P_ ((void));
-extern struct frame *allocate_frame P_ ((void));
-extern struct Lisp_Process *allocate_process P_ ((void));
-extern struct terminal *allocate_terminal P_ ((void));
+extern struct Lisp_Hash_Table *allocate_hash_table (void);
+extern struct window *allocate_window (void);
+extern struct frame *allocate_frame (void);
+extern struct Lisp_Process *allocate_process (void);
+extern struct terminal *allocate_terminal (void);
 extern int gc_in_progress;
 extern int abort_on_gc;
-extern Lisp_Object make_float P_ ((double));
-extern void display_malloc_warning P_ ((void));
-extern int inhibit_garbage_collection P_ ((void));
-extern Lisp_Object make_save_value P_ ((void *, int));
-extern void free_misc P_ ((Lisp_Object));
-extern void free_marker P_ ((Lisp_Object));
-extern void free_cons P_ ((struct Lisp_Cons *));
-extern void init_alloc_once P_ ((void));
-extern void init_alloc P_ ((void));
-extern void syms_of_alloc P_ ((void));
-extern struct buffer * allocate_buffer P_ ((void));
-extern int valid_lisp_object_p P_ ((Lisp_Object));
+extern Lisp_Object make_float (double);
+extern void display_malloc_warning (void);
+extern int inhibit_garbage_collection (void);
+extern Lisp_Object make_save_value (void *, int);
+extern void free_misc (Lisp_Object);
+extern void free_marker (Lisp_Object);
+extern void free_cons (struct Lisp_Cons *);
+extern void init_alloc_once (void);
+extern void init_alloc (void);
+extern void syms_of_alloc (void);
+extern struct buffer * allocate_buffer (void);
+extern int valid_lisp_object_p (Lisp_Object);
 
 /* Defined in chartab.c */
 EXFUN (Fmake_char_table, 2);
@@ -2755,23 +2761,23 @@
 EXFUN (Fset_char_table_default, 3);
 EXFUN (Foptimize_char_table, 2);
 EXFUN (Fmap_char_table, 2);
-extern Lisp_Object copy_char_table P_ ((Lisp_Object));
-extern Lisp_Object sub_char_table_ref P_ ((Lisp_Object, int));
-extern Lisp_Object char_table_ref P_ ((Lisp_Object, int));
-extern Lisp_Object char_table_ref_and_range P_ ((Lisp_Object, int,
-						 int *, int *));
-extern Lisp_Object char_table_set P_ ((Lisp_Object, int, Lisp_Object));
-extern Lisp_Object char_table_set_range P_ ((Lisp_Object, int, int,
-					     Lisp_Object));
-extern int char_table_translate P_ ((Lisp_Object, int));
-extern void map_char_table P_ ((void (*) (Lisp_Object, Lisp_Object,
-					  Lisp_Object),
-				Lisp_Object, Lisp_Object, Lisp_Object));
-extern void syms_of_chartab P_ ((void));
+extern Lisp_Object copy_char_table (Lisp_Object);
+extern Lisp_Object sub_char_table_ref (Lisp_Object, int);
+extern Lisp_Object char_table_ref (Lisp_Object, int);
+extern Lisp_Object char_table_ref_and_range (Lisp_Object, int,
+                                             int *, int *);
+extern Lisp_Object char_table_set (Lisp_Object, int, Lisp_Object);
+extern Lisp_Object char_table_set_range (Lisp_Object, int, int,
+                                         Lisp_Object);
+extern int char_table_translate (Lisp_Object, int);
+extern void map_char_table (void (*) (Lisp_Object, Lisp_Object,
+                            Lisp_Object),
+                            Lisp_Object, Lisp_Object, Lisp_Object);
+extern void syms_of_chartab (void);
 
 /* Defined in print.c */
 extern Lisp_Object Vprin1_to_string_buffer;
-extern void debug_print P_ ((Lisp_Object));
+extern void debug_print (Lisp_Object);
 EXFUN (Fprin1, 2);
 EXFUN (Fprin1_to_string, 2);
 EXFUN (Fprinc, 2);
@@ -2780,19 +2786,19 @@
 EXFUN (Ferror_message_string, 1);
 extern Lisp_Object Vstandard_output, Qstandard_output;
 extern Lisp_Object Qexternal_debugging_output;
-extern void temp_output_buffer_setup P_ ((const char *));
+extern void temp_output_buffer_setup (const char *);
 extern int print_level, print_escape_newlines;
 extern Lisp_Object Qprint_escape_newlines;
-extern void write_string P_ ((char *, int));
-extern void write_string_1 P_ ((char *, int, Lisp_Object));
-extern void print_error_message P_ ((Lisp_Object, Lisp_Object, char *, Lisp_Object));
+extern void write_string (char *, int);
+extern void write_string_1 (char *, int, Lisp_Object);
+extern void print_error_message (Lisp_Object, Lisp_Object, char *, Lisp_Object);
 extern Lisp_Object internal_with_output_to_temp_buffer
-	P_ ((const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object));
-extern void float_to_string P_ ((unsigned char *, double));
-extern void syms_of_print P_ ((void));
+        (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object);
+extern void float_to_string (unsigned char *, double);
+extern void syms_of_print (void);
 
 /* Defined in doprnt.c */
-extern int doprnt P_ ((char *, int, char *, char *, int, char **));
+extern int doprnt (char *, int, char *, char *, int, char **);
 
 /* Defined in lread.c */
 extern Lisp_Object Qvariable_documentation, Qstandard_input;
@@ -2806,29 +2812,29 @@
 EXFUN (Fget_file_char, 0);
 EXFUN (Fread_char, 3);
 EXFUN (Fread_event, 3);
-extern Lisp_Object read_filtered_event P_ ((int, int, int, int, Lisp_Object));
+extern Lisp_Object read_filtered_event (int, int, int, int, Lisp_Object);
 EXFUN (Feval_region, 4);
-extern Lisp_Object check_obarray P_ ((Lisp_Object));
-extern Lisp_Object intern P_ ((const char *));
+extern Lisp_Object check_obarray (Lisp_Object);
+extern Lisp_Object intern (const char *);
 extern Lisp_Object intern_c_string (const char *);
-extern Lisp_Object make_symbol P_ ((char *));
-extern Lisp_Object oblookup P_ ((Lisp_Object, const char *, int, int));
+extern Lisp_Object make_symbol (char *);
+extern Lisp_Object oblookup (Lisp_Object, const char *, int, int);
 #define LOADHIST_ATTACH(x) \
   do {									\
     if (initialized) Vcurrent_load_list = Fcons (x, Vcurrent_load_list); \
   } while (0)
 extern Lisp_Object Vcurrent_load_list;
 extern Lisp_Object Vload_history, Vload_suffixes, Vload_file_rep_suffixes;
-extern int openp P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
-		      Lisp_Object *, Lisp_Object));
-extern int isfloat_string P_ ((char *, int));
-extern void map_obarray P_ ((Lisp_Object, void (*) (Lisp_Object, Lisp_Object),
-			     Lisp_Object));
-extern void dir_warning P_ ((char *, Lisp_Object));
-extern void close_load_descs P_ ((void));
-extern void init_obarray P_ ((void));
-extern void init_lread P_ ((void));
-extern void syms_of_lread P_ ((void));
+extern int openp (Lisp_Object, Lisp_Object, Lisp_Object,
+                  Lisp_Object *, Lisp_Object);
+extern int isfloat_string (char *, int);
+extern void map_obarray (Lisp_Object, void (*) (Lisp_Object, Lisp_Object),
+                         Lisp_Object);
+extern void dir_warning (char *, Lisp_Object);
+extern void close_load_descs (void);
+extern void init_obarray (void);
+extern void init_lread (void);
+extern void syms_of_lread (void);
 
 /* Defined in eval.c */
 extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro;
@@ -2837,7 +2843,7 @@
 extern Lisp_Object Vdebug_on_error;
 extern Lisp_Object Vsignaling_function;
 extern int handling_signal;
-extern int interactive_p P_ ((int));
+extern int interactive_p (int);
 
 /* To run a normal hook, use the appropriate function from the list below.
    The calling convention:
@@ -2851,8 +2857,8 @@
 EXFUN (Frun_hook_with_args, MANY);
 EXFUN (Frun_hook_with_args_until_success, MANY);
 EXFUN (Frun_hook_with_args_until_failure, MANY);
-extern Lisp_Object run_hook_list_with_args P_ ((Lisp_Object, int, Lisp_Object *));
-extern void run_hook_with_args_2 P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
+extern Lisp_Object run_hook_list_with_args (Lisp_Object, int, Lisp_Object *);
+extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object);
 EXFUN (Fand, UNEVALLED);
 EXFUN (For, UNEVALLED);
 EXFUN (Fif, UNEVALLED);
@@ -2872,48 +2878,48 @@
 EXFUN (Funwind_protect, UNEVALLED);
 EXFUN (Fcondition_case, UNEVALLED);
 EXFUN (Fsignal, 2);
-extern void xsignal P_ ((Lisp_Object, Lisp_Object)) NO_RETURN;
-extern void xsignal0 P_ ((Lisp_Object)) NO_RETURN;
-extern void xsignal1 P_ ((Lisp_Object, Lisp_Object)) NO_RETURN;
-extern void xsignal2 P_ ((Lisp_Object, Lisp_Object, Lisp_Object)) NO_RETURN;
-extern void xsignal3 P_ ((Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)) NO_RETURN;
-extern void signal_error P_ ((char *, Lisp_Object)) NO_RETURN;
+extern void xsignal (Lisp_Object, Lisp_Object) NO_RETURN;
+extern void xsignal0 (Lisp_Object) NO_RETURN;
+extern void xsignal1 (Lisp_Object, Lisp_Object) NO_RETURN;
+extern void xsignal2 (Lisp_Object, Lisp_Object, Lisp_Object) NO_RETURN;
+extern void xsignal3 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) NO_RETURN;
+extern void signal_error (char *, Lisp_Object) NO_RETURN;
 EXFUN (Fautoload, 5);
 EXFUN (Fcommandp, 2);
 EXFUN (Feval, 1);
 EXFUN (Fapply, MANY);
 EXFUN (Ffuncall, MANY);
 EXFUN (Fbacktrace, 0);
-extern Lisp_Object apply1 P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object call0 P_ ((Lisp_Object));
-extern Lisp_Object call1 P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object call2 P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-extern Lisp_Object call3 P_ ((Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object));
-extern Lisp_Object call4 P_ ((Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object));
-extern Lisp_Object call5 P_ ((Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object));
-extern Lisp_Object call6 P_ ((Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object));
-extern Lisp_Object call7 P_ ((Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object));
+extern Lisp_Object apply1 (Lisp_Object, Lisp_Object);
+extern Lisp_Object call0 (Lisp_Object);
+extern Lisp_Object call1 (Lisp_Object, Lisp_Object);
+extern Lisp_Object call2 (Lisp_Object, Lisp_Object, Lisp_Object);
+extern Lisp_Object call3 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
+extern Lisp_Object call4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
+extern Lisp_Object call5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
+extern Lisp_Object call6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
+extern Lisp_Object call7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
 EXFUN (Fdo_auto_save, 2);
-extern Lisp_Object apply_lambda P_ ((Lisp_Object, Lisp_Object, int));
-extern Lisp_Object internal_catch P_ ((Lisp_Object, Lisp_Object (*) (Lisp_Object), Lisp_Object));
-extern Lisp_Object internal_lisp_condition_case P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-extern Lisp_Object internal_condition_case P_ ((Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object)));
-extern Lisp_Object internal_condition_case_1 P_ ((Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)));
-extern Lisp_Object internal_condition_case_2 P_ ((Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)));
-extern Lisp_Object internal_condition_case_n P_ ((Lisp_Object (*) (int, Lisp_Object *), int, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object)));
-extern void specbind P_ ((Lisp_Object, Lisp_Object));
-extern void record_unwind_protect P_ ((Lisp_Object (*) (Lisp_Object), Lisp_Object));
-extern Lisp_Object unbind_to P_ ((int, Lisp_Object));
-extern void error P_ ((/* char *, ... */)) NO_RETURN;
-extern void do_autoload P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object un_autoload P_ ((Lisp_Object));
+extern Lisp_Object apply_lambda (Lisp_Object, Lisp_Object, int);
+extern Lisp_Object internal_catch (Lisp_Object, Lisp_Object (*) (Lisp_Object), Lisp_Object);
+extern Lisp_Object internal_lisp_condition_case (Lisp_Object, Lisp_Object, Lisp_Object);
+extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object));
+extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
+extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
+extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (int, Lisp_Object *), int, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object));
+extern void specbind (Lisp_Object, Lisp_Object);
+extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object);
+extern Lisp_Object unbind_to (int, Lisp_Object);
+extern void error (/* char *, ... */) NO_RETURN;
+extern void do_autoload (Lisp_Object, Lisp_Object);
+extern Lisp_Object un_autoload (Lisp_Object);
 EXFUN (Ffetch_bytecode, 1);
-extern void init_eval_once P_ ((void));
-extern Lisp_Object safe_call P_ ((int, Lisp_Object *));
-extern Lisp_Object safe_call1 P_ ((Lisp_Object, Lisp_Object));
+extern void init_eval_once (void);
+extern Lisp_Object safe_call (int, Lisp_Object *);
+extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object);
 extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object);
-extern void init_eval P_ ((void));
-extern void syms_of_eval P_ ((void));
+extern void init_eval (void);
+extern void syms_of_eval (void);
 
 /* Defined in editfns.c */
 EXFUN (Fpropertize, MANY);
@@ -2936,20 +2942,20 @@
 EXFUN (Finsert_before_markers, MANY);
 EXFUN (Finsert_buffer_substring, 3);
 EXFUN (Finsert_char, 3);
-extern void insert1 P_ ((Lisp_Object));
+extern void insert1 (Lisp_Object);
 EXFUN (Feolp, 0);
 EXFUN (Feobp, 0);
 EXFUN (Fbolp, 0);
 EXFUN (Fbobp, 0);
 EXFUN (Fformat, MANY);
 EXFUN (Fmessage, MANY);
-extern Lisp_Object format2 P_ ((char *, Lisp_Object, Lisp_Object));
+extern Lisp_Object format2 (char *, Lisp_Object, Lisp_Object);
 EXFUN (Fbuffer_substring, 2);
 EXFUN (Fbuffer_string, 0);
-extern Lisp_Object save_excursion_save P_ ((void));
-extern Lisp_Object save_restriction_save P_ ((void));
-extern Lisp_Object save_excursion_restore P_ ((Lisp_Object));
-extern Lisp_Object save_restriction_restore P_ ((Lisp_Object));
+extern Lisp_Object save_excursion_save (void);
+extern Lisp_Object save_restriction_save (void);
+extern Lisp_Object save_excursion_restore (Lisp_Object);
+extern Lisp_Object save_restriction_restore (Lisp_Object);
 EXFUN (Fchar_to_string, 1);
 EXFUN (Fdelete_region, 2);
 EXFUN (Fnarrow_to_region, 2);
@@ -2957,11 +2963,11 @@
 EXFUN (Fuser_login_name, 1);
 EXFUN (Fsystem_name, 0);
 EXFUN (Fcurrent_time, 0);
-extern int clip_to_bounds P_ ((int, int, int));
-extern Lisp_Object make_buffer_string P_ ((int, int, int));
-extern Lisp_Object make_buffer_string_both P_ ((int, int, int, int, int));
-extern void init_editfns P_ ((void));
-extern void syms_of_editfns P_ ((void));
+extern int clip_to_bounds (int, int, int);
+extern Lisp_Object make_buffer_string (int, int, int);
+extern Lisp_Object make_buffer_string_both (int, int, int, int, int);
+extern void init_editfns (void);
+extern void syms_of_editfns (void);
 extern Lisp_Object Vinhibit_field_text_motion;
 EXFUN (Fconstrain_to_field, 5);
 EXFUN (Ffield_string, 1);
@@ -2969,21 +2975,21 @@
 EXFUN (Ffield_beginning, 3);
 EXFUN (Ffield_end, 3);
 EXFUN (Ffield_string_no_properties, 1);
-extern void set_time_zone_rule P_ ((char *));
+extern void set_time_zone_rule (char *);
 
 /* Defined in buffer.c */
-extern int mouse_face_overlay_overlaps P_ ((Lisp_Object));
-extern void nsberror P_ ((Lisp_Object)) NO_RETURN;
+extern int mouse_face_overlay_overlaps (Lisp_Object);
+extern void nsberror (Lisp_Object) NO_RETURN;
 EXFUN (Fset_buffer_multibyte, 1);
 EXFUN (Foverlay_start, 1);
 EXFUN (Foverlay_end, 1);
 EXFUN (Foverlay_buffer, 1);
-extern void adjust_overlays_for_insert P_ ((EMACS_INT, EMACS_INT));
-extern void adjust_overlays_for_delete P_ ((EMACS_INT, EMACS_INT));
-extern void fix_start_end_in_overlays P_ ((int, int));
-extern void report_overlay_modification P_ ((Lisp_Object, Lisp_Object, int,
-					     Lisp_Object, Lisp_Object, Lisp_Object));
-extern int overlay_touches_p P_ ((int));
+extern void adjust_overlays_for_insert (EMACS_INT, EMACS_INT);
+extern void adjust_overlays_for_delete (EMACS_INT, EMACS_INT);
+extern void fix_start_end_in_overlays (int, int);
+extern void report_overlay_modification (Lisp_Object, Lisp_Object, int,
+                                         Lisp_Object, Lisp_Object, Lisp_Object);
+extern int overlay_touches_p (int);
 extern Lisp_Object Vbuffer_alist, Vinhibit_read_only;
 EXFUN (Fbuffer_list, 1);
 EXFUN (Fget_buffer, 1);
@@ -3005,14 +3011,14 @@
 EXFUN (Ferase_buffer, 0);
 extern Lisp_Object Qoverlayp;
 extern Lisp_Object Qevaporate;
-extern Lisp_Object get_truename_buffer P_ ((Lisp_Object));
+extern Lisp_Object get_truename_buffer (Lisp_Object);
 extern struct buffer *all_buffers;
 EXFUN (Fprevious_overlay_change, 1);
 EXFUN (Fbuffer_file_name, 1);
-extern void init_buffer_once P_ ((void));
-extern void init_buffer P_ ((void));
-extern void syms_of_buffer P_ ((void));
-extern void keys_of_buffer P_ ((void));
+extern void init_buffer_once (void);
+extern void init_buffer (void);
+extern void syms_of_buffer (void);
+extern void keys_of_buffer (void);
 
 /* Defined in marker.c */
 
@@ -3020,18 +3026,18 @@
 EXFUN (Fmarker_buffer, 1);
 EXFUN (Fcopy_marker, 2);
 EXFUN (Fset_marker, 3);
-extern int marker_position P_ ((Lisp_Object));
-extern int marker_byte_position P_ ((Lisp_Object));
-extern void clear_charpos_cache P_ ((struct buffer *));
-extern int charpos_to_bytepos P_ ((int));
-extern int buf_charpos_to_bytepos P_ ((struct buffer *, int));
-extern int buf_bytepos_to_charpos P_ ((struct buffer *, int));
-extern void unchain_marker P_ ((struct Lisp_Marker *marker));
-extern Lisp_Object set_marker_restricted P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-extern Lisp_Object set_marker_both P_ ((Lisp_Object, Lisp_Object, int, int));
-extern Lisp_Object set_marker_restricted_both P_ ((Lisp_Object, Lisp_Object,
-						   int, int));
-extern void syms_of_marker P_ ((void));
+extern int marker_position (Lisp_Object);
+extern int marker_byte_position (Lisp_Object);
+extern void clear_charpos_cache (struct buffer *);
+extern int charpos_to_bytepos (int);
+extern int buf_charpos_to_bytepos (struct buffer *, int);
+extern int buf_bytepos_to_charpos (struct buffer *, int);
+extern void unchain_marker (struct Lisp_Marker *marker);
+extern Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object);
+extern Lisp_Object set_marker_both (Lisp_Object, Lisp_Object, int, int);
+extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object,
+                                               int, int);
+extern void syms_of_marker (void);
 
 /* Defined in fileio.c */
 
@@ -3048,7 +3054,7 @@
 EXFUN (Ffile_name_absolute_p, 1);
 EXFUN (Fdirectory_file_name, 1);
 EXFUN (Ffile_name_directory, 1);
-extern Lisp_Object expand_and_dir_to_file P_ ((Lisp_Object, Lisp_Object));
+extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
 EXFUN (Ffile_accessible_directory_p, 1);
 EXFUN (Funhandled_file_name_directory, 1);
 EXFUN (Ffile_directory_p, 1);
@@ -3056,47 +3062,47 @@
 EXFUN (Ffile_readable_p, 1);
 EXFUN (Ffile_executable_p, 1);
 EXFUN (Fread_file_name, 6);
-extern Lisp_Object close_file_unwind P_ ((Lisp_Object));
-extern Lisp_Object restore_point_unwind P_ ((Lisp_Object));
-extern void report_file_error P_ ((const char *, Lisp_Object)) NO_RETURN;
-extern int internal_delete_file P_ ((Lisp_Object));
-extern void syms_of_fileio P_ ((void));
-extern Lisp_Object make_temp_name P_ ((Lisp_Object, int));
+extern Lisp_Object close_file_unwind (Lisp_Object);
+extern Lisp_Object restore_point_unwind (Lisp_Object);
+extern void report_file_error (const char *, Lisp_Object) NO_RETURN;
+extern int internal_delete_file (Lisp_Object);
+extern void syms_of_fileio (void);
+extern Lisp_Object make_temp_name (Lisp_Object, int);
 EXFUN (Fmake_symbolic_link, 3);
 extern Lisp_Object Qdelete_file;
 
 /* Defined in abbrev.c */
 
-extern void syms_of_abbrev P_ ((void));
+extern void syms_of_abbrev (void);
 
 /* Defined in search.c */
-extern void shrink_regexp_cache P_ ((void));
+extern void shrink_regexp_cache (void);
 EXFUN (Fstring_match, 3);
-extern void restore_search_regs P_ ((void));
+extern void restore_search_regs (void);
 EXFUN (Fmatch_data, 3);
 EXFUN (Fset_match_data, 2);
 EXFUN (Fmatch_beginning, 1);
 EXFUN (Fmatch_end, 1);
-extern void record_unwind_save_match_data P_ ((void));
+extern void record_unwind_save_match_data (void);
 EXFUN (Flooking_at, 1);
-extern int fast_string_match P_ ((Lisp_Object, Lisp_Object));
-extern int fast_c_string_match_ignore_case P_ ((Lisp_Object, const char *));
-extern int fast_string_match_ignore_case P_ ((Lisp_Object, Lisp_Object));
-extern EMACS_INT fast_looking_at P_ ((Lisp_Object, EMACS_INT, EMACS_INT,
-				      EMACS_INT, EMACS_INT, Lisp_Object));
-extern int scan_buffer P_ ((int, EMACS_INT, EMACS_INT, int, int *, int));
-extern int scan_newline P_ ((EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT,
-			     int, int));
-extern int find_next_newline P_ ((EMACS_INT, int));
-extern int find_next_newline_no_quit P_ ((EMACS_INT, int));
-extern int find_before_next_newline P_ ((EMACS_INT, EMACS_INT, int));
-extern void syms_of_search P_ ((void));
-extern void clear_regexp_cache P_ ((void));
+extern int fast_string_match (Lisp_Object, Lisp_Object);
+extern int fast_c_string_match_ignore_case (Lisp_Object, const char *);
+extern int fast_string_match_ignore_case (Lisp_Object, Lisp_Object);
+extern EMACS_INT fast_looking_at (Lisp_Object, EMACS_INT, EMACS_INT,
+                                  EMACS_INT, EMACS_INT, Lisp_Object);
+extern int scan_buffer (int, EMACS_INT, EMACS_INT, int, int *, int);
+extern int scan_newline (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT,
+                         int, int);
+extern int find_next_newline (EMACS_INT, int);
+extern int find_next_newline_no_quit (EMACS_INT, int);
+extern int find_before_next_newline (EMACS_INT, EMACS_INT, int);
+extern void syms_of_search (void);
+extern void clear_regexp_cache (void);
 
 /* Defined in minibuf.c */
 
 extern Lisp_Object last_minibuf_string;
-extern void choose_minibuf_frame P_ ((void));
+extern void choose_minibuf_frame (void);
 EXFUN (Fcompleting_read, 8);
 EXFUN (Fread_from_minibuffer, 7);
 EXFUN (Fread_variable, 2);
@@ -3106,10 +3112,10 @@
 EXFUN (Fread_string, 5);
 EXFUN (Fread_no_blanks_input, 3);
 EXFUN (Fassoc_string, 3);
-extern Lisp_Object get_minibuffer P_ ((int));
-extern void temp_echo_area_glyphs P_ ((Lisp_Object));
-extern void init_minibuf_once P_ ((void));
-extern void syms_of_minibuf P_ ((void));
+extern Lisp_Object get_minibuffer (int);
+extern void temp_echo_area_glyphs (Lisp_Object);
+extern void init_minibuf_once (void);
+extern void syms_of_minibuf (void);
 
 /* Defined in callint.c */
 
@@ -3118,7 +3124,7 @@
 extern Lisp_Object Qcall_interactively, Qmouse_leave_buffer_hook;
 EXFUN (Fcall_interactively, 3);
 EXFUN (Fprefix_numeric_value, 1);
-extern void syms_of_callint P_ ((void));
+extern void syms_of_callint (void);
 
 /* Defined in casefiddle.c */
 
@@ -3128,22 +3134,22 @@
 EXFUN (Fupcase_region, 2);
 EXFUN (Fupcase_initials, 1);
 EXFUN (Fupcase_initials_region, 2);
-extern void syms_of_casefiddle P_ ((void));
-extern void keys_of_casefiddle P_ ((void));
+extern void syms_of_casefiddle (void);
+extern void keys_of_casefiddle (void);
 
 /* Defined in casetab.c */
 
 EXFUN (Fset_case_table, 1);
 EXFUN (Fset_standard_case_table, 1);
-extern void init_casetab_once P_ ((void));
-extern void syms_of_casetab P_ ((void));
+extern void init_casetab_once (void);
+extern void syms_of_casetab (void);
 
 /* Defined in keyboard.c */
 
 extern int echoing;
 extern Lisp_Object echo_message_buffer;
 extern struct kboard *echo_kboard;
-extern void cancel_echoing P_ ((void));
+extern void cancel_echoing (void);
 extern Lisp_Object Qdisabled, QCfilter;
 extern Lisp_Object Vtty_erase_char, Vhelp_form, Vtop_level;
 extern Lisp_Object Vthrow_on_input;
@@ -3153,10 +3159,10 @@
 EXFUN (Ftop_level, 0);
 EXFUN (Fcommand_execute, 4);
 EXFUN (Finput_pending_p, 0);
-extern Lisp_Object menu_bar_items P_ ((Lisp_Object));
-extern Lisp_Object tool_bar_items P_ ((Lisp_Object, int *));
+extern Lisp_Object menu_bar_items (Lisp_Object);
+extern Lisp_Object tool_bar_items (Lisp_Object, int *);
 extern Lisp_Object Qvertical_scroll_bar;
-extern void discard_mouse_events P_ ((void));
+extern void discard_mouse_events (void);
 EXFUN (Fevent_convert_list, 1);
 EXFUN (Fread_key_sequence, 5);
 EXFUN (Fset_input_interrupt_mode, 1);
@@ -3165,18 +3171,18 @@
 EXFUN (Fset_quit_char, 1);
 EXFUN (Fset_input_mode, 4);
 extern Lisp_Object pending_funcalls;
-extern int detect_input_pending P_ ((void));
-extern int detect_input_pending_ignore_squeezables P_ ((void));
-extern int detect_input_pending_run_timers P_ ((int));
-extern void safe_run_hooks P_ ((Lisp_Object));
-extern void cmd_error_internal P_ ((Lisp_Object, char *));
-extern Lisp_Object command_loop_1 P_ ((void));
-extern Lisp_Object recursive_edit_1 P_ ((void));
-extern void record_auto_save P_ ((void));
-extern void init_keyboard P_ ((void));
-extern void syms_of_keyboard P_ ((void));
-extern void keys_of_keyboard P_ ((void));
-extern char *push_key_description P_ ((unsigned int, char *, int));
+extern int detect_input_pending (void);
+extern int detect_input_pending_ignore_squeezables (void);
+extern int detect_input_pending_run_timers (int);
+extern void safe_run_hooks (Lisp_Object);
+extern void cmd_error_internal (Lisp_Object, char *);
+extern Lisp_Object command_loop_1 (void);
+extern Lisp_Object recursive_edit_1 (void);
+extern void record_auto_save (void);
+extern void init_keyboard (void);
+extern void syms_of_keyboard (void);
+extern void keys_of_keyboard (void);
+extern char *push_key_description (unsigned int, char *, int);
 
 
 /* Defined in indent.c */
@@ -3184,10 +3190,10 @@
 EXFUN (Findent_to, 2);
 EXFUN (Fcurrent_column, 0);
 EXFUN (Fmove_to_column, 2);
-extern double current_column P_ ((void));
-extern void invalidate_current_column P_ ((void));
-extern int indented_beyond_p P_ ((int, int, double));
-extern void syms_of_indent P_ ((void));
+extern double current_column (void);
+extern void invalidate_current_column (void);
+extern int indented_beyond_p (int, int, double);
+extern void syms_of_indent (void);
 
 /* Defined in frame.c */
 #ifdef HAVE_WINDOW_SYSTEM
@@ -3195,11 +3201,11 @@
 extern Lisp_Object Vx_resource_class;
 #endif /* HAVE_WINDOW_SYSTEM */
 extern Lisp_Object Qvisible;
-extern void store_frame_param P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void store_in_alist P_ ((Lisp_Object *, Lisp_Object, Lisp_Object));
-extern Lisp_Object do_switch_frame P_ ((Lisp_Object, int, int, Lisp_Object));
-extern Lisp_Object get_frame_param P_ ((struct frame *, Lisp_Object));
-extern Lisp_Object frame_buffer_predicate P_ ((Lisp_Object));
+extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
+extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
+extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);
+extern Lisp_Object get_frame_param (struct frame *, Lisp_Object);
+extern Lisp_Object frame_buffer_predicate (Lisp_Object);
 EXFUN (Fframep, 1);
 EXFUN (Fselect_frame, 2);
 EXFUN (Fselected_frame, 0);
@@ -3226,30 +3232,30 @@
 EXFUN (Fraise_frame, 1);
 EXFUN (Fredirect_frame_focus, 2);
 EXFUN (Fset_frame_selected_window, 3);
-extern Lisp_Object frame_buffer_list P_ ((Lisp_Object));
-extern void frames_discard_buffer P_ ((Lisp_Object));
-extern void set_frame_buffer_list P_ ((Lisp_Object, Lisp_Object));
-extern void frames_bury_buffer P_ ((Lisp_Object));
-extern void syms_of_frame P_ ((void));
+extern Lisp_Object frame_buffer_list (Lisp_Object);
+extern void frames_discard_buffer (Lisp_Object);
+extern void set_frame_buffer_list (Lisp_Object, Lisp_Object);
+extern void frames_bury_buffer (Lisp_Object);
+extern void syms_of_frame (void);
 
 /* Defined in emacs.c */
-extern Lisp_Object decode_env_path P_ ((char *, char *));
+extern Lisp_Object decode_env_path (char *, char *);
 extern Lisp_Object Vinvocation_name, Vinvocation_directory;
 extern Lisp_Object Vbefore_init_time, Vafter_init_time;
 extern Lisp_Object Vinstallation_directory;
 extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
 EXFUN (Fkill_emacs, 1);
 #if HAVE_SETLOCALE
-void fixup_locale P_ ((void));
-void synchronize_system_messages_locale P_ ((void));
-void synchronize_system_time_locale P_ ((void));
+void fixup_locale (void);
+void synchronize_system_messages_locale (void);
+void synchronize_system_time_locale (void);
 #else
 #define setlocale(category, locale)
 #define fixup_locale()
 #define synchronize_system_messages_locale()
 #define synchronize_system_time_locale()
 #endif
-void shut_down_emacs P_ ((int, int, Lisp_Object));
+void shut_down_emacs (int, int, Lisp_Object);
 /* Nonzero means don't do interactive redisplay and don't change tty modes.  */
 extern int noninteractive;
 
@@ -3275,68 +3281,68 @@
 EXFUN (Fprocess_send_eof, 1);
 EXFUN (Fwaiting_for_user_input_p, 0);
 extern Lisp_Object Qprocessp;
-extern void kill_buffer_processes P_ ((Lisp_Object));
-extern int wait_reading_process_output P_ ((int, int, int, int,
-					    Lisp_Object,
-					    struct Lisp_Process *,
-					    int));
-extern void add_keyboard_wait_descriptor P_ ((int));
-extern void delete_keyboard_wait_descriptor P_ ((int));
-extern void add_gpm_wait_descriptor P_ ((int));
-extern void delete_gpm_wait_descriptor P_ ((int));
-extern void close_process_descs P_ ((void));
-extern void init_process P_ ((void));
-extern void syms_of_process P_ ((void));
-extern void setup_process_coding_systems P_ ((Lisp_Object));
+extern void kill_buffer_processes (Lisp_Object);
+extern int wait_reading_process_output (int, int, int, int,
+                                        Lisp_Object,
+                                        struct Lisp_Process *,
+                                        int);
+extern void add_keyboard_wait_descriptor (int);
+extern void delete_keyboard_wait_descriptor (int);
+extern void add_gpm_wait_descriptor (int);
+extern void delete_gpm_wait_descriptor (int);
+extern void close_process_descs (void);
+extern void init_process (void);
+extern void syms_of_process (void);
+extern void setup_process_coding_systems (Lisp_Object);
 
 /* Defined in callproc.c */
 extern Lisp_Object Vexec_path, Vexec_suffixes,
                    Vexec_directory, Vdata_directory;
 extern Lisp_Object Vdoc_directory;
 EXFUN (Fcall_process, MANY);
-extern int child_setup P_ ((int, int, int, char **, int, Lisp_Object));
-extern void init_callproc_1 P_ ((void));
-extern void init_callproc P_ ((void));
-extern void set_initial_environment P_ ((void));
-extern void syms_of_callproc P_ ((void));
+extern int child_setup (int, int, int, char **, int, Lisp_Object);
+extern void init_callproc_1 (void);
+extern void init_callproc (void);
+extern void set_initial_environment (void);
+extern void syms_of_callproc (void);
 
 /* Defined in doc.c */
 extern Lisp_Object Vdoc_file_name;
 EXFUN (Fsubstitute_command_keys, 1);
 EXFUN (Fdocumentation, 2);
 EXFUN (Fdocumentation_property, 3);
-extern Lisp_Object read_doc_string P_ ((Lisp_Object));
-extern Lisp_Object get_doc_string P_ ((Lisp_Object, int, int));
-extern void syms_of_doc P_ ((void));
-extern int read_bytecode_char P_ ((int));
+extern Lisp_Object read_doc_string (Lisp_Object);
+extern Lisp_Object get_doc_string (Lisp_Object, int, int);
+extern void syms_of_doc (void);
+extern int read_bytecode_char (int);
 
 /* Defined in bytecode.c */
 extern Lisp_Object Qbytecode;
 EXFUN (Fbyte_code, 3);
-extern void syms_of_bytecode P_ ((void));
+extern void syms_of_bytecode (void);
 extern struct byte_stack *byte_stack_list;
-extern void mark_byte_stack P_ ((void));
-extern void unmark_byte_stack P_ ((void));
+extern void mark_byte_stack (void);
+extern void unmark_byte_stack (void);
 
 /* Defined in macros.c */
 extern Lisp_Object Qexecute_kbd_macro;
 EXFUN (Fexecute_kbd_macro, 3);
 EXFUN (Fcancel_kbd_macro_events, 0);
-extern void init_macros P_ ((void));
-extern void syms_of_macros P_ ((void));
+extern void init_macros (void);
+extern void syms_of_macros (void);
 
 /* Defined in undo.c */
 extern Lisp_Object Qinhibit_read_only;
 EXFUN (Fundo_boundary, 0);
-extern void truncate_undo_list P_ ((struct buffer *));
-extern void record_marker_adjustment P_ ((Lisp_Object, int));
-extern void record_insert P_ ((int, int));
-extern void record_delete P_ ((int, Lisp_Object));
-extern void record_first_change P_ ((void));
-extern void record_change P_ ((int, int));
-extern void record_property_change P_ ((int, int, Lisp_Object, Lisp_Object,
-					Lisp_Object));
-extern void syms_of_undo P_ ((void));
+extern void truncate_undo_list (struct buffer *);
+extern void record_marker_adjustment (Lisp_Object, int);
+extern void record_insert (int, int);
+extern void record_delete (int, Lisp_Object);
+extern void record_first_change (void);
+extern void record_change (int, int);
+extern void record_property_change (int, int, Lisp_Object, Lisp_Object,
+                                    Lisp_Object);
+extern void syms_of_undo (void);
 extern Lisp_Object Vundo_outer_limit;
 
 /* Defined in textprop.c */
@@ -3350,19 +3356,19 @@
 EXFUN (Fget_text_property, 3);
 EXFUN (Fprevious_char_property_change, 2);
 EXFUN (Fnext_char_property_change, 2);
-extern void report_interval_modification P_ ((Lisp_Object, Lisp_Object));
-extern Lisp_Object next_single_char_property_change P_ ((Lisp_Object,
-							 Lisp_Object,
-							 Lisp_Object,
-							 Lisp_Object));
+extern void report_interval_modification (Lisp_Object, Lisp_Object);
+extern Lisp_Object next_single_char_property_change (Lisp_Object,
+                                                     Lisp_Object,
+                                                     Lisp_Object,
+                                                     Lisp_Object);
 
 /* Defined in menu.c */
-extern void syms_of_menu P_ ((void));
+extern void syms_of_menu (void);
 
 /* Defined in xmenu.c */
 EXFUN (Fx_popup_menu, 2);
 EXFUN (Fx_popup_dialog, 3);
-extern void syms_of_xmenu P_ ((void));
+extern void syms_of_xmenu (void);
 
 /* Defined in termchar.h */
 struct tty_display_info;
@@ -3372,73 +3378,85 @@
 
 /* Defined in sysdep.c */
 #ifndef HAVE_GET_CURRENT_DIR_NAME
-extern char *get_current_dir_name P_ ((void));
+extern char *get_current_dir_name (void);
 #endif
-extern void stuff_char P_ ((char c));
-extern void init_sigio P_ ((int));
-extern void sys_subshell P_ ((void));
-extern void sys_suspend P_ ((void));
-extern void discard_tty_input P_ ((void));
-extern void init_sys_modes P_ ((struct tty_display_info *));
-extern void reset_sys_modes P_ ((struct tty_display_info *));
-extern void init_all_sys_modes P_ ((void));
-extern void reset_all_sys_modes P_ ((void));
-extern void wait_for_termination P_ ((int));
-extern void flush_pending_output P_ ((int));
-extern void child_setup_tty P_ ((int));
-extern void setup_pty P_ ((int));
-extern int set_window_size P_ ((int, int, int));
-extern void create_process P_ ((Lisp_Object, char **, Lisp_Object));
-extern int emacs_open P_ ((const char *, int, int));
-extern int emacs_close P_ ((int));
-extern int emacs_read P_ ((int, char *, unsigned int));
-extern int emacs_write P_ ((int, const char *, unsigned int));
+extern void stuff_char (char c);
+extern void init_sigio (int);
+extern void sys_subshell (void);
+extern void sys_suspend (void);
+extern void discard_tty_input (void);
+extern void init_sys_modes (struct tty_display_info *);
+extern void reset_sys_modes (struct tty_display_info *);
+extern void init_all_sys_modes (void);
+extern void reset_all_sys_modes (void);
+extern void wait_for_termination (int);
+extern void flush_pending_output (int);
+extern void child_setup_tty (int);
+extern void setup_pty (int);
+extern int set_window_size (int, int, int);
+extern void create_process (Lisp_Object, char **, Lisp_Object);
+extern int emacs_open (const char *, int, int);
+extern int emacs_close (int);
+extern int emacs_read (int, char *, unsigned int);
+extern int emacs_write (int, const char *, unsigned int);
+#ifndef HAVE_MEMSET
+extern void *memset P_ ((void *, int, size_t));
+#endif
+#ifndef HAVE_MEMCPY
+extern void *memcpy P_ ((void *, void *, size_t));
+#endif
+#ifndef HAVE_MEMMOVE
+extern void *memmove P_ ((void *, void *, size_t));
+#endif
+#ifndef HAVE_MEMCMP
+extern int memcmp P_ ((void *, void *, size_t));
+#endif
 
 /* Defined in filelock.c */
 EXFUN (Funlock_buffer, 0);
 EXFUN (Ffile_locked_p, 1);
-extern void unlock_all_files P_ ((void));
-extern void lock_file P_ ((Lisp_Object));
-extern void unlock_file P_ ((Lisp_Object));
-extern void unlock_buffer P_ ((struct buffer *));
-extern void syms_of_filelock P_ ((void));
-extern void init_filelock P_ ((void));
+extern void unlock_all_files (void);
+extern void lock_file (Lisp_Object);
+extern void unlock_file (Lisp_Object);
+extern void unlock_buffer (struct buffer *);
+extern void syms_of_filelock (void);
+extern void init_filelock (void);
 
 /* Defined in sound.c */
-extern void syms_of_sound P_ ((void));
-extern void init_sound P_ ((void));
+extern void syms_of_sound (void);
+extern void init_sound (void);
 
 /* Defined in category.c */
-extern void init_category_once P_ ((void));
-extern Lisp_Object char_category_set P_ ((int));
-extern void syms_of_category P_ ((void));
+extern void init_category_once (void);
+extern Lisp_Object char_category_set (int);
+extern void syms_of_category (void);
 
 /* Defined in ccl.c */
-extern void syms_of_ccl P_ ((void));
+extern void syms_of_ccl (void);
 
 /* Defined in dired.c */
 EXFUN (Ffile_attributes, 2);
-extern void syms_of_dired P_ ((void));
-extern Lisp_Object directory_files_internal P_ ((Lisp_Object, Lisp_Object,
-						 Lisp_Object, Lisp_Object,
-						 int, Lisp_Object));
+extern void syms_of_dired (void);
+extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object,
+                                             Lisp_Object, Lisp_Object,
+                                             int, Lisp_Object);
 
 /* Defined in term.c */
-extern void syms_of_term P_ ((void));
-extern void fatal P_ ((const char *msgid, ...)) NO_RETURN;
+extern void syms_of_term (void);
+extern void fatal (const char *msgid, ...) NO_RETURN;
 
 /* Defined in terminal.c */
 EXFUN (Fframe_terminal, 1);
 EXFUN (Fdelete_terminal, 2);
-extern void syms_of_terminal P_ ((void));
+extern void syms_of_terminal (void);
 
 /* Defined in font.c */
-extern void syms_of_font P_ ((void));
-extern void init_font P_ ((void));
+extern void syms_of_font (void);
+extern void init_font (void);
 
 #ifdef HAVE_WINDOW_SYSTEM
 /* Defined in fontset.c */
-extern void syms_of_fontset P_ ((void));
+extern void syms_of_fontset (void);
 EXFUN (Fset_fontset_font, 5);
 EXFUN (Fnew_fontset, 2);
 
@@ -3451,28 +3469,33 @@
 /* Defined in xfaces.c */
 EXFUN (Fclear_face_cache, 1);
 EXFUN (Fx_load_color_file, 1);
-extern void syms_of_xfaces P_ ((void));
+extern void syms_of_xfaces (void);
 
 #ifndef HAVE_GETLOADAVG
 /* Defined in getloadavg.c */
-extern int getloadavg P_ ((double *, int));
+extern int getloadavg (double *, int);
 #endif
 
 #ifdef HAVE_X_WINDOWS
 /* Defined in xfns.c */
-extern void syms_of_xfns P_ ((void));
+extern void syms_of_xfns (void);
 
 /* Defined in xsmfns.c */
-extern void syms_of_xsmfns P_ ((void));
+extern void syms_of_xsmfns (void);
 
 /* Defined in xselect.c */
 EXFUN (Fx_send_client_event, 6);
-extern void syms_of_xselect P_ ((void));
+extern void syms_of_xselect (void);
 
 /* Defined in xterm.c */
-extern void syms_of_xterm P_ ((void));
+extern void syms_of_xterm (void);
 #endif /* HAVE_X_WINDOWS */
 
+#ifdef HAVE_WINDOW_SYSTEM
+/* Defined in xterm.c, nsterm.m, w32term.c */
+extern char *x_get_keysym_name (int);
+#endif /* HAVE_WINDOW_SYSTEM */
+
 #ifdef MSDOS
 /* Defined in msdos.c */
 EXFUN (Fmsdos_downcase_filename, 1);
@@ -3480,14 +3503,14 @@
 
 #ifdef HAVE_MENUS
 /* Defined in (x|w32)fns.c, nsfns.m...  */
-extern int have_menus_p P_ ((void));
+extern int have_menus_p (void);
 #endif
 
 #ifdef HAVE_DBUS
 /* Defined in dbusbind.c */
-int xd_pending_messages P_ ((void));
-void xd_read_queued_messages P_ ((void));
-void syms_of_dbusbind P_ ((void));
+int xd_pending_messages (void);
+void xd_read_queued_messages (void);
+void syms_of_dbusbind (void);
 #endif
 
 /* Nonzero means Emacs has already been initialized.
@@ -3496,16 +3519,16 @@
 
 extern int immediate_quit;	    /* Nonzero means ^G can quit instantly */
 
-extern POINTER_TYPE *xmalloc P_ ((size_t));
-extern POINTER_TYPE *xrealloc P_ ((POINTER_TYPE *, size_t));
-extern void xfree P_ ((POINTER_TYPE *));
-
-extern char *xstrdup P_ ((const char *));
-
-extern char *egetenv P_ ((char *));
+extern POINTER_TYPE *xmalloc (size_t);
+extern POINTER_TYPE *xrealloc (POINTER_TYPE *, size_t);
+extern void xfree (POINTER_TYPE *);
+
+extern char *xstrdup (const char *);
+
+extern char *egetenv (char *);
 
 /* Set up the name of the machine we're running on.  */
-extern void init_system_name P_ ((void));
+extern void init_system_name (void);
 
 /* Some systems (e.g., NT) use a different path separator than Unix,
    in addition to a device separator.  Set the path separator
--- a/src/lread.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/lread.c	Thu Jul 08 17:09:35 2010 +0900
@@ -219,18 +219,18 @@
 
 static Lisp_Object Vbytecomp_version_regexp;
 
-static int read_emacs_mule_char P_ ((int, int (*) (int, Lisp_Object),
-				     Lisp_Object));
-
-static void readevalloop P_ ((Lisp_Object, FILE*, Lisp_Object,
-			      Lisp_Object (*) (), int,
-			      Lisp_Object, Lisp_Object,
-			      Lisp_Object, Lisp_Object));
-static Lisp_Object load_unwind P_ ((Lisp_Object));
-static Lisp_Object load_descriptor_unwind P_ ((Lisp_Object));
-
-static void invalid_syntax P_ ((const char *, int)) NO_RETURN;
-static void end_of_file_error P_ (()) NO_RETURN;
+static int read_emacs_mule_char (int, int (*) (int, Lisp_Object),
+                                 Lisp_Object);
+
+static void readevalloop (Lisp_Object, FILE*, Lisp_Object,
+                          Lisp_Object (*) (Lisp_Object), int,
+                          Lisp_Object, Lisp_Object,
+                          Lisp_Object, Lisp_Object);
+static Lisp_Object load_unwind (Lisp_Object);
+static Lisp_Object load_descriptor_unwind (Lisp_Object);
+
+static void invalid_syntax (const char *, int) NO_RETURN;
+static void end_of_file_error (void) NO_RETURN;
 
 
 /* Functions that read one byte from the current source READCHARFUN
@@ -239,9 +239,9 @@
    is 0 or positive, it unreads C, and the return value is not
    interesting.  */
 
-static int readbyte_for_lambda P_ ((int, Lisp_Object));
-static int readbyte_from_file P_ ((int, Lisp_Object));
-static int readbyte_from_string P_ ((int, Lisp_Object));
+static int readbyte_for_lambda (int, Lisp_Object);
+static int readbyte_from_file (int, Lisp_Object);
+static int readbyte_from_string (int, Lisp_Object);
 
 /* Handle unreading and rereading of characters.
    Write READCHAR to read a character,
@@ -262,13 +262,11 @@
 static int unread_char;
 
 static int
-readchar (readcharfun, multibyte)
-     Lisp_Object readcharfun;
-     int *multibyte;
+readchar (Lisp_Object readcharfun, int *multibyte)
 {
   Lisp_Object tem;
   register int c;
-  int (*readbyte) P_ ((int, Lisp_Object));
+  int (*readbyte) (int, Lisp_Object);
   unsigned char buf[MAX_MULTIBYTE_LENGTH];
   int i, len;
   int emacs_mule_encoding = 0;
@@ -435,9 +433,7 @@
    If the stream is a user function, call it with the char as argument.  */
 
 static void
-unreadchar (readcharfun, c)
-     Lisp_Object readcharfun;
-     int c;
+unreadchar (Lisp_Object readcharfun, int c)
 {
   readchar_count--;
   if (c == -1)
@@ -501,18 +497,14 @@
 }
 
 static int
-readbyte_for_lambda (c, readcharfun)
-     int c;
-     Lisp_Object readcharfun;
+readbyte_for_lambda (int c, Lisp_Object readcharfun)
 {
   return read_bytecode_char (c >= 0);
 }
 
 
 static int
-readbyte_from_file (c, readcharfun)
-     int c;
-     Lisp_Object readcharfun;
+readbyte_from_file (int c, Lisp_Object readcharfun)
 {
   if (c >= 0)
     {
@@ -543,9 +535,7 @@
 }
 
 static int
-readbyte_from_string (c, readcharfun)
-     int c;
-     Lisp_Object readcharfun;
+readbyte_from_string (int c, Lisp_Object readcharfun)
 {
   Lisp_Object string = XCAR (readcharfun);
 
@@ -573,10 +563,7 @@
 extern char emacs_mule_bytes[256];
 
 static int
-read_emacs_mule_char (c, readbyte, readcharfun)
-     int c;
-     int (*readbyte) P_ ((int, Lisp_Object));
-     Lisp_Object readcharfun;
+read_emacs_mule_char (int c, int (*readbyte) (int, Lisp_Object), Lisp_Object readcharfun)
 {
   /* Emacs-mule coding uses at most 4-byte for one character.  */
   unsigned char buf[4];
@@ -635,19 +622,19 @@
 }
 
 
-static Lisp_Object read_internal_start P_ ((Lisp_Object, Lisp_Object,
-					    Lisp_Object));
-static Lisp_Object read0 P_ ((Lisp_Object));
-static Lisp_Object read1 P_ ((Lisp_Object, int *, int));
-
-static Lisp_Object read_list P_ ((int, Lisp_Object));
-static Lisp_Object read_vector P_ ((Lisp_Object, int));
-
-static Lisp_Object substitute_object_recurse P_ ((Lisp_Object, Lisp_Object,
-						  Lisp_Object));
-static void substitute_object_in_subtree P_ ((Lisp_Object,
-					      Lisp_Object));
-static void substitute_in_interval P_ ((INTERVAL, Lisp_Object));
+static Lisp_Object read_internal_start (Lisp_Object, Lisp_Object,
+                                        Lisp_Object);
+static Lisp_Object read0 (Lisp_Object);
+static Lisp_Object read1 (Lisp_Object, int *, int);
+
+static Lisp_Object read_list (int, Lisp_Object);
+static Lisp_Object read_vector (Lisp_Object, int);
+
+static Lisp_Object substitute_object_recurse (Lisp_Object, Lisp_Object,
+                                              Lisp_Object);
+static void substitute_object_in_subtree (Lisp_Object,
+                                          Lisp_Object);
+static void substitute_in_interval (INTERVAL, Lisp_Object);
 
 
 /* Get a character from the tty.  */
@@ -871,8 +858,7 @@
    because of an incompatible change in the byte compiler.  */
 
 static int
-safe_to_load_p (fd)
-     int fd;
+safe_to_load_p (int fd)
 {
   char buf[512];
   int nbytes, i;
@@ -909,8 +895,7 @@
    after loading a file successfully.  */
 
 static Lisp_Object
-record_load_unwind (old)
-     Lisp_Object old;
+record_load_unwind (Lisp_Object old)
 {
   return Vloads_in_progress = old;
 }
@@ -918,15 +903,13 @@
 /* This handler function is used via internal_condition_case_1.  */
 
 static Lisp_Object
-load_error_handler (data)
-     Lisp_Object data;
+load_error_handler (Lisp_Object data)
 {
   return Qnil;
 }
 
 static Lisp_Object
-load_warn_old_style_backquotes (file)
-     Lisp_Object file;
+load_warn_old_style_backquotes (Lisp_Object file)
 {
   if (!NILP (Vold_style_backquotes))
     {
@@ -1142,8 +1125,7 @@
   specbind (Qold_style_backquotes, Qnil);
   record_unwind_protect (load_warn_old_style_backquotes, file);
 
-  if (!bcmp (SDATA (found) + SBYTES (found) - 4,
-	     ".elc", 4)
+  if (!memcmp (SDATA (found) + SBYTES (found) - 4, ".elc", 4)
       || (fd >= 0 && (version = safe_to_load_p (fd)) > 0))
     /* Load .elc files directly, but not when they are
        remote and have no handler!  */
@@ -1299,8 +1281,8 @@
 }
 
 static Lisp_Object
-load_unwind (arg)  /* used as unwind-protect function in load */
-     Lisp_Object arg;
+load_unwind (Lisp_Object arg)  /* used as unwind-protect function in load */
+                     
 {
   FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer;
   if (stream != NULL)
@@ -1313,8 +1295,7 @@
 }
 
 static Lisp_Object
-load_descriptor_unwind (oldlist)
-     Lisp_Object oldlist;
+load_descriptor_unwind (Lisp_Object oldlist)
 {
   load_descriptor_list = oldlist;
   return Qnil;
@@ -1324,7 +1305,7 @@
    This is used when starting a subprocess.  */
 
 void
-close_load_descs ()
+close_load_descs (void)
 {
 #ifndef WINDOWSNT
   Lisp_Object tail;
@@ -1334,8 +1315,7 @@
 }
 
 static int
-complete_filename_p (pathname)
-     Lisp_Object pathname;
+complete_filename_p (Lisp_Object pathname)
 {
   register const unsigned char *s = SDATA (pathname);
   return (IS_DIRECTORY_SEP (s[0])
@@ -1383,11 +1363,7 @@
    but store the found remote file name in *STOREPTR.  */
 
 int
-openp (path, str, suffixes, storeptr, predicate)
-     Lisp_Object path, str;
-     Lisp_Object suffixes;
-     Lisp_Object *storeptr;
-     Lisp_Object predicate;
+openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *storeptr, Lisp_Object predicate)
 {
   register int fd;
   int fn_size = 100;
@@ -1539,9 +1515,7 @@
    ENTIRE is 1 if loading that entire file, 0 if evaluating part of it.  */
 
 static void
-build_load_history (filename, entire)
-     Lisp_Object filename;
-     int entire;
+build_load_history (Lisp_Object filename, int entire)
 {
   register Lisp_Object tail, prev, newelt;
   register Lisp_Object tem, tem2;
@@ -1601,16 +1575,15 @@
 }
 
 Lisp_Object
-unreadpure (junk) /* Used as unwind-protect function in readevalloop */
-     Lisp_Object junk;
+unreadpure (Lisp_Object junk) /* Used as unwind-protect function in readevalloop */
+                      
 {
   read_pure = 0;
   return Qnil;
 }
 
 static Lisp_Object
-readevalloop_1 (old)
-     Lisp_Object old;
+readevalloop_1 (Lisp_Object old)
 {
   load_convert_to_unibyte = ! NILP (old);
   return Qnil;
@@ -1620,7 +1593,7 @@
    information.  */
 
 static void
-end_of_file_error ()
+end_of_file_error (void)
 {
   if (STRINGP (Vload_file_name))
     xsignal1 (Qend_of_file, Vload_file_name);
@@ -1636,15 +1609,13 @@
    If the input is not from a buffer, they must be nil.  */
 
 static void
-readevalloop (readcharfun, stream, sourcename, evalfun,
-	      printflag, unibyte, readfun, start, end)
-     Lisp_Object readcharfun;
-     FILE *stream;
-     Lisp_Object sourcename;
-     Lisp_Object (*evalfun) ();
-     int printflag;
-     Lisp_Object unibyte, readfun;
-     Lisp_Object start, end;
+readevalloop (Lisp_Object readcharfun,
+	      FILE *stream,
+	      Lisp_Object sourcename,
+	      Lisp_Object (*evalfun) (Lisp_Object),
+	      int printflag,
+	      Lisp_Object unibyte, Lisp_Object readfun,
+	      Lisp_Object start, Lisp_Object end)
 {
   register int c;
   register Lisp_Object val;
@@ -1924,10 +1895,8 @@
 /* Function to set up the global context we need in toplevel read
    calls. */
 static Lisp_Object
-read_internal_start (stream, start, end)
-     Lisp_Object stream;
-     Lisp_Object start; /* Only used when stream is a string. */
-     Lisp_Object end; /* Only used when stream is a string. */
+read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end)
+/* start, end only used when stream is a string. */
 {
   Lisp_Object retval;
 
@@ -1985,9 +1954,7 @@
    S is error string of length N (if > 0)  */
 
 static void
-invalid_syntax (s, n)
-     const char *s;
-     int n;
+invalid_syntax (const char *s, int n)
 {
   if (!n)
     n = strlen (s);
@@ -1999,8 +1966,7 @@
    are not allowed. */
 
 static Lisp_Object
-read0 (readcharfun)
-     Lisp_Object readcharfun;
+read0 (Lisp_Object readcharfun)
 {
   register Lisp_Object val;
   int c;
@@ -2020,9 +1986,7 @@
    If the escape sequence forces unibyte, return eight-bit char.  */
 
 static int
-read_escape (readcharfun, stringp)
-     Lisp_Object readcharfun;
-     int stringp;
+read_escape (Lisp_Object readcharfun, int stringp)
 {
   register int c = READCHAR;
   /* \u allows up to four hex digits, \U up to eight.  Default to the
@@ -2236,9 +2200,7 @@
    range.  */
 
 static Lisp_Object
-read_integer (readcharfun, radix)
-     Lisp_Object readcharfun;
-     int radix;
+read_integer (Lisp_Object readcharfun, int radix)
 {
   int ndigits = 0, invalid_p, c, sign = 0;
   /* We use a floating point number because  */
@@ -2303,10 +2265,7 @@
    FIRST_IN_LIST is nonzero if this is the first element of a list.  */
 
 static Lisp_Object
-read1 (readcharfun, pch, first_in_list)
-     register Lisp_Object readcharfun;
-     int *pch;
-     int first_in_list;
+read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
 {
   register int c;
   int uninterned_symbol = 0;
@@ -2470,8 +2429,7 @@
 		invalid_syntax ("#&...", 5);
 
 	      val = Fmake_bool_vector (length, Qnil);
-	      bcopy (SDATA (tmp), XBOOL_VECTOR (val)->data,
-		     size_in_chars);
+	      memcpy (XBOOL_VECTOR (val)->data, SDATA (tmp), size_in_chars);
 	      /* Clear the extraneous bits in the last byte.  */
 	      if (XINT (length) != size_in_chars * BOOL_VECTOR_BITS_PER_CHAR)
 		XBOOL_VECTOR (val)->data[size_in_chars - 1]
@@ -2683,32 +2641,35 @@
       }
 
     case '`':
-      /* Transition from old-style to new-style:
-	 If we see "(`" it used to mean old-style, which usually works
-	 fine because ` should almost never appear in such a position
-	 for new-style.  But occasionally we need "(`" to mean new
-	 style, so we try to distinguish the two by the fact that we
-	 can either write "( `foo" or "(` foo", where the first
-	 intends to use new-style whereas the second intends to use
-	 old-style.  For Emacs-25, we should completely remove this
-	 first_in_list exception (old-style can still be obtained via
-	 "(\`" anyway).  */
-      if (first_in_list && (c = READCHAR, UNREAD (c), c == ' '))
-	{
-	  Vold_style_backquotes = Qt;
-	  goto default_label;
-	}
-      else
-	{
-	  Lisp_Object value;
-
-	  new_backquote_flag++;
-	  value = read0 (readcharfun);
-	  new_backquote_flag--;
-
-	  return Fcons (Qbackquote, Fcons (value, Qnil));
-	}
-
+      {
+	int next_char = READCHAR;
+	UNREAD (next_char);
+	/* Transition from old-style to new-style:
+	   If we see "(`" it used to mean old-style, which usually works
+	   fine because ` should almost never appear in such a position
+	   for new-style.  But occasionally we need "(`" to mean new
+	   style, so we try to distinguish the two by the fact that we
+	   can either write "( `foo" or "(` foo", where the first
+	   intends to use new-style whereas the second intends to use
+	   old-style.  For Emacs-25, we should completely remove this
+	   first_in_list exception (old-style can still be obtained via
+	   "(\`" anyway).  */
+	if (first_in_list && next_char == ' ')
+	  {
+	    Vold_style_backquotes = Qt;
+	    goto default_label;
+	  }
+	else
+	  {
+	    Lisp_Object value;
+
+	    new_backquote_flag++;
+	    value = read0 (readcharfun);
+	    new_backquote_flag--;
+
+	    return Fcons (Qbackquote, Fcons (value, Qnil));
+	  }
+      }
     case ',':
       if (new_backquote_flag)
 	{
@@ -3110,9 +3071,7 @@
 static Lisp_Object seen_list;
 
 static void
-substitute_object_in_subtree (object, placeholder)
-     Lisp_Object object;
-     Lisp_Object placeholder;
+substitute_object_in_subtree (Lisp_Object object, Lisp_Object placeholder)
 {
   Lisp_Object check_object;
 
@@ -3147,10 +3106,7 @@
   } while (0)
 
 static Lisp_Object
-substitute_object_recurse (object, placeholder, subtree)
-     Lisp_Object object;
-     Lisp_Object placeholder;
-     Lisp_Object subtree;
+substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Object subtree)
 {
   /* If we find the placeholder, return the target object. */
   if (EQ (placeholder, subtree))
@@ -3225,9 +3181,7 @@
 
 /*  Helper function for substitute_object_recurse.  */
 static void
-substitute_in_interval (interval, arg)
-     INTERVAL    interval;
-     Lisp_Object arg;
+substitute_in_interval (INTERVAL interval, Lisp_Object arg)
 {
   Lisp_Object object      = Fcar (arg);
   Lisp_Object placeholder = Fcdr (arg);
@@ -3243,9 +3197,7 @@
 #define EXP_INT 16
 
 int
-isfloat_string (cp, ignore_trailing)
-     register char *cp;
-     int ignore_trailing;
+isfloat_string (register char *cp, int ignore_trailing)
 {
   register int state;
 
@@ -3310,9 +3262,7 @@
 
 
 static Lisp_Object
-read_vector (readcharfun, bytecodeflag)
-     Lisp_Object readcharfun;
-     int bytecodeflag;
+read_vector (Lisp_Object readcharfun, int bytecodeflag)
 {
   register int i;
   register int size;
@@ -3395,9 +3345,7 @@
     and make structure pure.  */
 
 static Lisp_Object
-read_list (flag, readcharfun)
-     int flag;
-     register Lisp_Object readcharfun;
+read_list (int flag, register Lisp_Object readcharfun)
 {
   /* -1 means check next element for defun,
      0 means don't check,
@@ -3585,14 +3533,13 @@
 
 int oblookup_last_bucket_number;
 
-static int hash_string ();
+static int hash_string (const unsigned char *ptr, int len);
 
 /* Get an error if OBARRAY is not an obarray.
    If it is one, return it.  */
 
 Lisp_Object
-check_obarray (obarray)
-     Lisp_Object obarray;
+check_obarray (Lisp_Object obarray)
 {
   if (!VECTORP (obarray) || XVECTOR (obarray)->size == 0)
     {
@@ -3607,8 +3554,7 @@
    interned in the current obarray.  */
 
 Lisp_Object
-intern (str)
-     const char *str;
+intern (const char *str)
 {
   Lisp_Object tem;
   int len = strlen (str);
@@ -3649,8 +3595,7 @@
 /* Create an uninterned symbol with name STR.  */
 
 Lisp_Object
-make_symbol (str)
-     char *str;
+make_symbol (char *str)
 {
   int len = strlen (str);
 
@@ -3812,10 +3757,7 @@
    Also store the bucket number in oblookup_last_bucket_number.  */
 
 Lisp_Object
-oblookup (obarray, ptr, size, size_byte)
-     Lisp_Object obarray;
-     register const char *ptr;
-     int size, size_byte;
+oblookup (Lisp_Object obarray, register const char *ptr, int size, int size_byte)
 {
   int hash;
   int obsize;
@@ -3842,7 +3784,7 @@
       {
 	if (SBYTES (SYMBOL_NAME (tail)) == size_byte
 	    && SCHARS (SYMBOL_NAME (tail)) == size
-	    && !bcmp (SDATA (SYMBOL_NAME (tail)), ptr, size_byte))
+	    && !memcmp (SDATA (SYMBOL_NAME (tail)), ptr, size_byte))
 	  return tail;
 	else if (XSYMBOL (tail)->next == 0)
 	  break;
@@ -3852,9 +3794,7 @@
 }
 
 static int
-hash_string (ptr, len)
-     const unsigned char *ptr;
-     int len;
+hash_string (const unsigned char *ptr, int len)
 {
   register const unsigned char *p = ptr;
   register const unsigned char *end = p + len;
@@ -3871,10 +3811,7 @@
 }
 
 void
-map_obarray (obarray, fn, arg)
-     Lisp_Object obarray;
-     void (*fn) P_ ((Lisp_Object, Lisp_Object));
-     Lisp_Object arg;
+map_obarray (Lisp_Object obarray, void (*fn) (Lisp_Object, Lisp_Object), Lisp_Object arg)
 {
   register int i;
   register Lisp_Object tail;
@@ -3894,8 +3831,7 @@
 }
 
 void
-mapatoms_1 (sym, function)
-     Lisp_Object sym, function;
+mapatoms_1 (Lisp_Object sym, Lisp_Object function)
 {
   call1 (function, sym);
 }
@@ -3916,7 +3852,7 @@
 #define OBARRAY_SIZE 1511
 
 void
-init_obarray ()
+init_obarray (void)
 {
   Lisp_Object oblength;
 
@@ -3957,8 +3893,7 @@
 }
 
 void
-defsubr (sname)
-     struct Lisp_Subr *sname;
+defsubr (struct Lisp_Subr *sname)
 {
   Lisp_Object sym;
   sym = intern_c_string (sname->symbol_name);
@@ -4053,7 +3988,7 @@
 static Lisp_Object dump_path;
 
 void
-init_lread ()
+init_lread (void)
 {
   char *normal;
   int turn_off_warning = 0;
@@ -4246,9 +4181,7 @@
    does not exist.  Print it on stderr and put it in *Messages*.  */
 
 void
-dir_warning (format, dirname)
-     char *format;
-     Lisp_Object dirname;
+dir_warning (char *format, Lisp_Object dirname)
 {
   char *buffer
     = (char *) alloca (SCHARS (dirname) + strlen (format) + 5);
@@ -4261,7 +4194,7 @@
 }
 
 void
-syms_of_lread ()
+syms_of_lread (void)
 {
   defsubr (&Sread);
   defsubr (&Sread_from_string);
--- a/src/m/alpha.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/m/alpha.h	Thu Jul 08 17:09:35 2010 +0900
@@ -53,14 +53,9 @@
 #define DATA_START    0x140000000
 #endif
 
-#if (defined (__NetBSD__) || defined (__OpenBSD__))
-#define HAVE_TEXT_START
-#endif
-
 #else  /* not __ELF__ */
 
 /* Describe layout of the address space in an executing process.  */
-#define TEXT_START    0x120000000
 #define DATA_START    0x140000000
 
 #endif /* __ELF__ */
--- a/src/m/ia64.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/m/ia64.h	Thu Jul 08 17:09:35 2010 +0900
@@ -58,7 +58,5 @@
 #endif /* not _MALLOC_INTERNAL */
 #endif /* REL_ALLOC */
 
-#define HAVE_TEXT_START
-
 /* arch-tag: 9b8e9fb2-2e49-4c22-b68f-11a488e77c66
    (do not change this comment) */
--- a/src/m/ibmrs6000.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/m/ibmrs6000.h	Thu Jul 08 17:09:35 2010 +0900
@@ -22,7 +22,6 @@
 /* The data segment in this machine always starts at address 0x20000000.
    An address of data cannot be stored correctly in a Lisp object;
    we always lose the high bits.  We must tell XPNTR to add them back.  */
-#define TEXT_START 0x10000000
 #define DATA_START 0x20000000
 #define WORDS_BIG_ENDIAN
 #define DATA_SEG_BITS 0x20000000
--- a/src/m/intel386.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/m/intel386.h	Thu Jul 08 17:09:35 2010 +0900
@@ -23,10 +23,6 @@
    is the most significant byte.  */
 #undef WORDS_BIG_ENDIAN
 
-#ifdef USG
-#define TEXT_START 0
-#endif /* USG */
-
 #ifdef WINDOWSNT
 #define VIRT_ADDR_VARIES
 #define DATA_START 	get_data_start ()
--- a/src/m/iris4d.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/m/iris4d.h	Thu Jul 08 17:09:35 2010 +0900
@@ -30,8 +30,6 @@
    This flag only matters if you use USE_LISP_UNION_TYPE.  */
 #define EXPLICIT_SIGN_EXTEND
 
-#define TEXT_START 0x400000
-
 /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
    were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for
    the value field of a LISP_OBJECT).  */
--- a/src/m/m68k.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/m/m68k.h	Thu Jul 08 17:09:35 2010 +0900
@@ -41,7 +41,6 @@
 #endif
 
 #define NO_REMAP
-#define TEXT_START 0
 #endif
 
 /* arch-tag: 4eadd161-b4e8-4b82-82a1-e4ce7f42969d
--- a/src/m/macppc.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/m/macppc.h	Thu Jul 08 17:09:35 2010 +0900
@@ -28,10 +28,6 @@
 /* Convert that into an integer that is 100 for a load average of 1.0  */
 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
 
-#if (defined (__NetBSD__) || defined (__OpenBSD__)) && defined (__ELF__)
-#define HAVE_TEXT_START
-#endif
-
 #ifdef _ARCH_PPC64
 #ifndef _LP64
 #define _LP64
--- a/src/m/mips.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/m/mips.h	Thu Jul 08 17:09:35 2010 +0900
@@ -31,8 +31,5 @@
    This flag only matters if you use USE_LISP_UNION_TYPE.  */
 #define EXPLICIT_SIGN_EXTEND
 
-/* Describe layout of the address space in an executing process.  */
-#define TEXT_START      0x00400000
-
 /* arch-tag: 8fd020ee-78a7-4d87-96ce-6129f52f7bee
    (do not change this comment) */
--- a/src/macros.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/macros.c	Thu Jul 08 17:09:35 2010 +0900
@@ -53,7 +53,7 @@
 
 extern Lisp_Object real_this_command;
 
-Lisp_Object Fexecute_kbd_macro ();
+Lisp_Object Fexecute_kbd_macro (Lisp_Object macro, Lisp_Object count, Lisp_Object loopfunc);
 
 DEFUN ("start-kbd-macro", Fstart_kbd_macro, Sstart_kbd_macro, 1, 2, "P",
        doc: /* Record subsequent keyboard input, defining a keyboard macro.
@@ -140,7 +140,7 @@
 /* Finish defining the current keyboard macro.  */
 
 void
-end_kbd_macro ()
+end_kbd_macro (void)
 {
   current_kboard->defining_kbd_macro = Qnil;
   update_mode_lines++;
@@ -194,8 +194,7 @@
 /* Store character c into kbd macro being defined */
 
 void
-store_kbd_macro_char (c)
-     Lisp_Object c;
+store_kbd_macro_char (Lisp_Object c)
 {
   struct kboard *kb = current_kboard;
 
@@ -223,7 +222,7 @@
  really belong to it.  This is done in between editor commands.  */
 
 void
-finalize_kbd_macro_chars ()
+finalize_kbd_macro_chars (void)
 {
   current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr;
 }
@@ -286,8 +285,7 @@
    Called when the unwind-protect in Fexecute_kbd_macro gets invoked.  */
 
 static Lisp_Object
-pop_kbd_macro (info)
-     Lisp_Object info;
+pop_kbd_macro (Lisp_Object info)
 {
   Lisp_Object tem;
   Vexecuting_kbd_macro = XCAR (info);
@@ -367,14 +365,14 @@
 }
 
 void
-init_macros ()
+init_macros (void)
 {
   Vexecuting_kbd_macro = Qnil;
   executing_kbd_macro = Qnil;
 }
 
 void
-syms_of_macros ()
+syms_of_macros (void)
 {
   Qexecute_kbd_macro = intern_c_string ("execute-kbd-macro");
   staticpro (&Qexecute_kbd_macro);
--- a/src/macros.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/macros.h	Thu Jul 08 17:09:35 2010 +0900
@@ -41,16 +41,16 @@
 
 /* Finish defining the current keyboard macro.  */
 
-extern void end_kbd_macro P_ ((void));
+extern void end_kbd_macro (void);
 
 /* Declare that all chars stored so far in the kbd macro being defined
  really belong to it.  This is done in between editor commands.  */
 
-extern void finalize_kbd_macro_chars P_ ((void));
+extern void finalize_kbd_macro_chars (void);
 
 /* Store a character into kbd macro being defined */
 
-extern void store_kbd_macro_char P_ ((Lisp_Object));
+extern void store_kbd_macro_char (Lisp_Object);
 
 /* arch-tag: 8edb7088-682f-4d1f-a4d9-0fbb7284234e
    (do not change this comment) */
--- a/src/marker.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/marker.c	Thu Jul 08 17:09:35 2010 +0900
@@ -32,15 +32,14 @@
 static struct buffer *cached_buffer;
 static int cached_modiff;
 
-static void byte_char_debug_check P_ ((struct buffer *, int, int));
+static void byte_char_debug_check (struct buffer *, int, int);
 
 /* Nonzero means enable debugging checks on byte/char correspondences.  */
 
 static int byte_debug_flag;
 
 void
-clear_charpos_cache (b)
-     struct buffer *b;
+clear_charpos_cache (struct buffer *b)
 {
   if (cached_buffer == b)
     cached_buffer = 0;
@@ -100,9 +99,7 @@
 }
 
 static void
-byte_char_debug_check (b, charpos, bytepos)
-     struct buffer *b;
-     int charpos, bytepos;
+byte_char_debug_check (struct buffer *b, int charpos, int bytepos)
 {
   int nchars = 0;
 
@@ -122,16 +119,13 @@
 }
 
 int
-charpos_to_bytepos (charpos)
-     int charpos;
+charpos_to_bytepos (int charpos)
 {
   return buf_charpos_to_bytepos (current_buffer, charpos);
 }
 
 int
-buf_charpos_to_bytepos (b, charpos)
-     struct buffer *b;
-     int charpos;
+buf_charpos_to_bytepos (struct buffer *b, int charpos)
 {
   struct Lisp_Marker *tail;
   int best_above, best_above_byte;
@@ -254,8 +248,7 @@
    in the simplest, most reliable way.  */
 
 int
-verify_bytepos (charpos)
-     int charpos;
+verify_bytepos (int charpos)
 {
   int below = 1;
   int below_byte = 1;
@@ -315,16 +308,13 @@
 }
 
 int
-bytepos_to_charpos (bytepos)
-     int bytepos;
+bytepos_to_charpos (int bytepos)
 {
   return buf_bytepos_to_charpos (current_buffer, bytepos);
 }
 
 int
-buf_bytepos_to_charpos (b, bytepos)
-     struct buffer *b;
-     int bytepos;
+buf_bytepos_to_charpos (struct buffer *b, int bytepos)
 {
   struct Lisp_Marker *tail;
   int best_above, best_above_byte;
@@ -556,8 +546,7 @@
    be outside the visible part.  */
 
 Lisp_Object
-set_marker_restricted (marker, pos, buffer)
-     Lisp_Object marker, pos, buffer;
+set_marker_restricted (Lisp_Object marker, Lisp_Object pos, Lisp_Object buffer)
 {
   register int charno, bytepos;
   register struct buffer *b;
@@ -632,9 +621,7 @@
    character position and the corresponding byte position.  */
 
 Lisp_Object
-set_marker_both (marker, buffer, charpos, bytepos)
-     Lisp_Object marker, buffer;
-     int charpos, bytepos;
+set_marker_both (Lisp_Object marker, Lisp_Object buffer, int charpos, int bytepos)
 {
   register struct buffer *b;
   register struct Lisp_Marker *m;
@@ -682,9 +669,7 @@
    be outside the visible part.  */
 
 Lisp_Object
-set_marker_restricted_both (marker, buffer, charpos, bytepos)
-     Lisp_Object marker, buffer;
-     int charpos, bytepos;
+set_marker_restricted_both (Lisp_Object marker, Lisp_Object buffer, int charpos, int bytepos)
 {
   register struct buffer *b;
   register struct Lisp_Marker *m;
@@ -745,8 +730,7 @@
    including those in chain fields of markers.  */
 
 void
-unchain_marker (marker)
-     register struct Lisp_Marker *marker;
+unchain_marker (register struct Lisp_Marker *marker)
 {
   register struct Lisp_Marker *tail, *prev, *next;
   register struct buffer *b;
@@ -796,8 +780,7 @@
 /* Return the char position of marker MARKER, as a C integer.  */
 
 int
-marker_position (marker)
-     Lisp_Object marker;
+marker_position (Lisp_Object marker)
 {
   register struct Lisp_Marker *m = XMARKER (marker);
   register struct buffer *buf = m->buffer;
@@ -811,8 +794,7 @@
 /* Return the byte position of marker MARKER, as a C integer.  */
 
 int
-marker_byte_position (marker)
-     Lisp_Object marker;
+marker_byte_position (Lisp_Object marker)
 {
   register struct Lisp_Marker *m = XMARKER (marker);
   register struct buffer *buf = m->buffer;
@@ -898,8 +880,7 @@
 /* For debugging -- count the markers in buffer BUF.  */
 
 int
-count_markers (buf)
-     struct buffer *buf;
+count_markers (struct buffer *buf)
 {
   int total = 0;
   struct Lisp_Marker *tail;
@@ -911,7 +892,7 @@
 }
 
 void
-syms_of_marker ()
+syms_of_marker (void)
 {
   defsubr (&Smarker_position);
   defsubr (&Smarker_buffer);
--- a/src/md5.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/md5.c	Thu Jul 08 17:09:35 2010 +0900
@@ -71,8 +71,7 @@
 /* Initialize structure containing state of computation.
    (RFC 1321, 3.3: Step 3)  */
 void
-md5_init_ctx (ctx)
-     struct md5_ctx *ctx;
+md5_init_ctx (struct md5_ctx *ctx)
 {
   ctx->A = 0x67452301;
   ctx->B = 0xefcdab89;
@@ -89,9 +88,7 @@
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
 void *
-md5_read_ctx (ctx, resbuf)
-     const struct md5_ctx *ctx;
-     void *resbuf;
+md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
 {
   ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
   ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
@@ -107,9 +104,7 @@
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
 void *
-md5_finish_ctx (ctx, resbuf)
-     struct md5_ctx *ctx;
-     void *resbuf;
+md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
 {
   /* Take yet unprocessed bytes into account.  */
   md5_uint32 bytes = ctx->buflen;
@@ -138,9 +133,7 @@
    resulting message digest number will be written into the 16 bytes
    beginning at RESBLOCK.  */
 int
-md5_stream (stream, resblock)
-     FILE *stream;
-     void *resblock;
+md5_stream (FILE *stream, void *resblock)
 {
   /* Important: BLOCKSIZE must be a multiple of 64.  */
 #define BLOCKSIZE 4096
@@ -195,10 +188,7 @@
    output yields to the wanted ASCII representation of the message
    digest.  */
 void *
-md5_buffer (buffer, len, resblock)
-     const char *buffer;
-     size_t len;
-     void *resblock;
+md5_buffer (const char *buffer, size_t len, void *resblock)
 {
   struct md5_ctx ctx;
 
@@ -214,10 +204,7 @@
 
 
 void
-md5_process_bytes (buffer, len, ctx)
-     const void *buffer;
-     size_t len;
-     struct md5_ctx *ctx;
+md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
 {
   /* const void aligned_buffer = buffer; */
 
@@ -287,10 +274,7 @@
    It is assumed that LEN % 64 == 0.  */
 
 void
-md5_process_block (buffer, len, ctx)
-     const void *buffer;
-     size_t len;
-     struct md5_ctx *ctx;
+md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
 {
   md5_uint32 correct_words[16];
   const md5_uint32 *words = buffer;
--- a/src/md5.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/md5.h	Thu Jul 08 17:09:35 2010 +0900
@@ -97,21 +97,21 @@
 
 /* Initialize structure containing state of computation.
    (RFC 1321, 3.3: Step 3)  */
-extern void md5_init_ctx __P ((struct md5_ctx *ctx));
+extern void md5_init_ctx (struct md5_ctx *ctx);
 
 /* Starting with the result of former calls of this function (or the
    initialization function update the context for the next LEN bytes
    starting at BUFFER.
    It is necessary that LEN is a multiple of 64!!! */
-extern void md5_process_block __P ((const void *buffer, size_t len,
-				      struct md5_ctx *ctx));
+extern void md5_process_block (const void *buffer, size_t len,
+                               struct md5_ctx *ctx);
 
 /* Starting with the result of former calls of this function (or the
    initialization function update the context for the next LEN bytes
    starting at BUFFER.
    It is NOT required that LEN is a multiple of 64.  */
-extern void md5_process_bytes __P ((const void *buffer, size_t len,
-				      struct md5_ctx *ctx));
+extern void md5_process_bytes (const void *buffer, size_t len,
+                               struct md5_ctx *ctx);
 
 /* Process the remaining bytes in the buffer and put result from CTX
    in first 16 bytes following RESBUF.  The result is always in little
@@ -120,7 +120,7 @@
 
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
-extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
+extern void *md5_finish_ctx (struct md5_ctx *ctx, void *resbuf);
 
 
 /* Put result from CTX in first 16 bytes following RESBUF.  The result is
@@ -129,20 +129,20 @@
 
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
-extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
+extern void *md5_read_ctx (const struct md5_ctx *ctx, void *resbuf);
 
 
 /* Compute MD5 message digest for bytes read from STREAM.  The
    resulting message digest number will be written into the 16 bytes
    beginning at RESBLOCK.  */
-extern int md5_stream __P ((FILE *stream, void *resblock));
+extern int md5_stream (FILE *stream, void *resblock);
 
 /* Compute MD5 message digest for LEN bytes beginning at BUFFER.  The
    result is always in little endian byte order, so that a byte-wise
    output yields to the wanted ASCII representation of the message
    digest.  */
-extern void *md5_buffer __P ((const char *buffer, size_t len,
-				void *resblock));
+extern void *md5_buffer (const char *buffer, size_t len,
+                         void *resblock);
 
 #endif /* md5.h */
 
--- a/src/mem-limits.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/mem-limits.h	Thu Jul 08 17:09:35 2010 +0900
@@ -25,17 +25,6 @@
 /* Some systems need this before <sys/resource.h>.  */
 #include <sys/types.h>
 
-#ifdef _LIBC
-
-#include <sys/resource.h>
-#define BSD4_2			/* Tell code below to use getrlimit.  */
-
-/* Old Linux startup code won't define __data_start.  */
-extern int etext, __data_start; weak_extern (__data_start)
-#define start_of_data()	(&__data_start ?: &etext)
-
-#else /* not _LIBC */
-
 #ifdef HAVE_SYS_RESOURCE_H
 # include <sys/time.h>
 # include <sys/resource.h>
@@ -49,20 +38,11 @@
 #define BSD4_2
 #endif
 
-#ifndef BSD4_2
-#ifndef USG
-#ifndef MSDOS
-#ifndef WINDOWSNT
-#include <sys/vlimit.h>
-#endif /* not WINDOWSNT */
-#endif /* not MSDOS */
-#endif /* not USG */
-#else /* if BSD4_2 */
+#ifdef BSD4_2
 #include <sys/time.h>
 #include <sys/resource.h>
 #endif /* BSD4_2 */
 
-#ifdef emacs
 /* The important properties of this type are that 1) it's a pointer, and
    2) arithmetic on it should work as if the size of the object pointed
    to has a size of 1.  */
@@ -75,7 +55,7 @@
 #endif
 #define NULL ((POINTER) 0)
 
-extern POINTER start_of_data ();
+extern POINTER start_of_data (void);
 #if defined USE_LSB_TAG
 #define EXCEEDS_LISP_PTR(ptr) 0
 #elif defined DATA_SEG_BITS
@@ -85,26 +65,5 @@
 #define EXCEEDS_LISP_PTR(ptr) ((EMACS_UINT) (ptr) >> VALBITS)
 #endif
 
-#ifdef DATA_START
-#define start_of_data() ((char *)DATA_START)
-#endif
-
-#ifdef BSD_SYSTEM
-#ifndef DATA_SEG_BITS
-#ifndef DATA_START
-extern char etext;
-#define start_of_data() &etext
-#endif
-#endif
-#endif
-
-#else  /* not emacs */
-extern char etext;
-#define start_of_data() &etext
-#endif /* not emacs */
-
-#endif /* not _LIBC */
-
-
 /* arch-tag: fe39244e-e54f-4208-b7aa-02556f7841c5
    (do not change this comment) */
--- a/src/menu.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/menu.c	Thu Jul 08 17:09:35 2010 +0900
@@ -87,7 +87,7 @@
 static int menu_items_submenu_depth;
 
 void
-init_menu_items ()
+init_menu_items (void)
 {
   if (!NILP (menu_items_inuse))
     error ("Trying to use a menu from within a menu-entry");
@@ -107,13 +107,12 @@
 /* Call at the end of generating the data in menu_items.  */
 
 void
-finish_menu_items ()
+finish_menu_items (void)
 {
 }
 
 Lisp_Object
-unuse_menu_items (dummy)
-     Lisp_Object dummy;
+unuse_menu_items (Lisp_Object dummy)
 {
   return menu_items_inuse = Qnil;
 }
@@ -122,7 +121,7 @@
    in menu_items.  */
 
 void
-discard_menu_items ()
+discard_menu_items (void)
 {
   /* Free the structure if it is especially large.
      Otherwise, hold on to it, to save time.  */
@@ -145,8 +144,7 @@
    mechanism.  */
 
 static Lisp_Object
-restore_menu_items (saved)
-     Lisp_Object saved;
+restore_menu_items (Lisp_Object saved)
 {
   menu_items = XCAR (saved);
   menu_items_inuse = (! NILP (menu_items) ? Qt : Qnil);
@@ -164,7 +162,7 @@
    It will be restored when the specpdl is unwound.  */
 
 void
-save_menu_items ()
+save_menu_items (void)
 {
   Lisp_Object saved = list4 (!NILP (menu_items_inuse) ? menu_items : Qnil,
 			     make_number (menu_items_used),
@@ -179,7 +177,7 @@
 /* Make the menu_items vector twice as large.  */
 
 static void
-grow_menu_items ()
+grow_menu_items (void)
 {
   menu_items_allocated *= 2;
   menu_items = larger_vector (menu_items, menu_items_allocated, Qnil);
@@ -188,7 +186,7 @@
 /* Begin a submenu.  */
 
 static void
-push_submenu_start ()
+push_submenu_start (void)
 {
   if (menu_items_used + 1 > menu_items_allocated)
     grow_menu_items ();
@@ -200,7 +198,7 @@
 /* End a submenu.  */
 
 static void
-push_submenu_end ()
+push_submenu_end (void)
 {
   if (menu_items_used + 1 > menu_items_allocated)
     grow_menu_items ();
@@ -212,7 +210,7 @@
 /* Indicate boundary between left and right.  */
 
 static void
-push_left_right_boundary ()
+push_left_right_boundary (void)
 {
   if (menu_items_used + 1 > menu_items_allocated)
     grow_menu_items ();
@@ -224,8 +222,7 @@
    NAME is the pane name.  PREFIX_VEC is a prefix key for this pane.  */
 
 static void
-push_menu_pane (name, prefix_vec)
-     Lisp_Object name, prefix_vec;
+push_menu_pane (Lisp_Object name, Lisp_Object prefix_vec)
 {
   if (menu_items_used + MENU_ITEMS_PANE_LENGTH > menu_items_allocated)
     grow_menu_items ();
@@ -246,8 +243,7 @@
    item, one of nil, `toggle' or `radio'. */
 
 static void
-push_menu_item (name, enable, key, def, equiv, type, selected, help)
-     Lisp_Object name, enable, key, def, equiv, type, selected, help;
+push_menu_item (Lisp_Object name, Lisp_Object enable, Lisp_Object key, Lisp_Object def, Lisp_Object equiv, Lisp_Object type, Lisp_Object selected, Lisp_Object help)
 {
   if (menu_items_used + MENU_ITEMS_ITEM_LENGTH > menu_items_allocated)
     grow_menu_items ();
@@ -272,8 +268,8 @@
      int notbuttons;
   };
 
-static void single_menu_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
-				  void *));
+static void single_menu_item (Lisp_Object, Lisp_Object, Lisp_Object,
+                              void *);
 
 /* This is a recursive subroutine of keymap_panes.
    It handles one keymap, KEYMAP.
@@ -332,9 +328,7 @@
    If we encounter submenus deeper than SKP->MAXDEPTH levels, ignore them.  */
 
 static void
-single_menu_item (key, item, dummy, skp_v)
-     Lisp_Object key, item, dummy;
-     void *skp_v;
+single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *skp_v)
 {
   Lisp_Object map, item_string, enabled;
   struct gcpro gcpro1, gcpro2;
@@ -456,9 +450,7 @@
    and generate menu panes for them in menu_items.  */
 
 static void
-keymap_panes (keymaps, nmaps)
-     Lisp_Object *keymaps;
-     int nmaps;
+keymap_panes (Lisp_Object *keymaps, int nmaps)
 {
   int mapno;
 
@@ -477,8 +469,7 @@
 
 /* Push the items in a single pane defined by the alist PANE.  */
 static void
-list_of_items (pane)
-     Lisp_Object pane;
+list_of_items (Lisp_Object pane)
 {
   Lisp_Object tail, item, item1;
 
@@ -505,8 +496,7 @@
    alist-of-alists MENU.
    This handles old-fashioned calls to x-popup-menu.  */
 void
-list_of_panes (menu)
-     Lisp_Object menu;
+list_of_panes (Lisp_Object menu)
 {
   Lisp_Object tail;
 
@@ -531,8 +521,7 @@
    whose event type is ITEM_KEY (with string ITEM_NAME)
    and whose contents come from the list of keymaps MAPS.  */
 int
-parse_single_submenu (item_key, item_name, maps)
-     Lisp_Object item_key, item_name, maps;
+parse_single_submenu (Lisp_Object item_key, Lisp_Object item_name, Lisp_Object maps)
 {
   Lisp_Object length;
   int len;
@@ -583,7 +572,7 @@
 /* Allocate a widget_value, blocking input.  */
 
 widget_value *
-xmalloc_widget_value ()
+xmalloc_widget_value (void)
 {
   widget_value *value;
 
@@ -600,8 +589,7 @@
    must be left alone.  */
 
 void
-free_menubar_widget_value_tree (wv)
-     widget_value *wv;
+free_menubar_widget_value_tree (widget_value *wv)
 {
   if (! wv) return;
 
@@ -627,8 +615,7 @@
    in menu_items starting at index START, up to index END.  */
 
 widget_value *
-digest_single_submenu (start, end, top_level_items)
-     int start, end, top_level_items;
+digest_single_submenu (int start, int end, int top_level_items)
 {
   widget_value *wv, *prev_wv, *save_wv, *first_wv;
   int i;
@@ -856,8 +843,7 @@
    tree is constructed, and small strings are relocated.  So we must wait
    until no GC can happen before storing pointers into lisp values.  */
 void
-update_submenu_strings (first_wv)
-     widget_value *first_wv;
+update_submenu_strings (widget_value *first_wv)
 {
   widget_value *wv;
 
@@ -891,11 +877,7 @@
    VECTOR is an array of menu events for the whole menu.  */
 
 void
-find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data)
-     FRAME_PTR f;
-     int menu_bar_items_used;
-     Lisp_Object vector;
-     void *client_data;
+find_and_call_menu_selection (FRAME_PTR f, int menu_bar_items_used, Lisp_Object vector, void *client_data)
 {
   Lisp_Object prefix, entry;
   Lisp_Object *subprefix_stack;
@@ -1164,12 +1146,12 @@
 	Lisp_Object bar_window;
 	enum scroll_bar_part part;
 	unsigned long time;
-	void (*mouse_position_hook) P_ ((struct frame **, int,
-					 Lisp_Object *,
-					 enum scroll_bar_part *,
-					 Lisp_Object *,
-					 Lisp_Object *,
-					 unsigned long *)) =
+        void (*mouse_position_hook) (struct frame **, int,
+                                     Lisp_Object *,
+                                     enum scroll_bar_part *,
+                                     Lisp_Object *,
+                                     Lisp_Object *,
+                                     unsigned long *) =
 	  FRAME_TERMINAL (new_f)->mouse_position_hook;
 
 	if (mouse_position_hook)
@@ -1368,7 +1350,7 @@
 }
 
 void
-syms_of_menu ()
+syms_of_menu (void)
 {
   staticpro (&menu_items);
   menu_items = Qnil;
--- a/src/menu.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/menu.h	Thu Jul 08 17:09:35 2010 +0900
@@ -21,17 +21,17 @@
 
 extern Lisp_Object Vmenu_updating_frame;
 
-extern void init_menu_items P_ ((void));
-extern void finish_menu_items P_ ((void));
-extern void discard_menu_items P_ ((void));
-extern void save_menu_items P_ ((void));
-extern int parse_single_submenu P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-extern void list_of_panes P_ ((Lisp_Object));
+extern void init_menu_items (void);
+extern void finish_menu_items (void);
+extern void discard_menu_items (void);
+extern void save_menu_items (void);
+extern int parse_single_submenu (Lisp_Object, Lisp_Object, Lisp_Object);
+extern void list_of_panes (Lisp_Object);
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI)
-extern void free_menubar_widget_value_tree P_ ((widget_value *));
-extern void update_submenu_strings P_ ((widget_value *));
-extern void find_and_call_menu_selection P_ ((FRAME_PTR, int,
-					      Lisp_Object, void *));
+extern void free_menubar_widget_value_tree (widget_value *);
+extern void update_submenu_strings (widget_value *);
+extern void find_and_call_menu_selection (FRAME_PTR, int,
+                                          Lisp_Object, void *);
 #endif
 
 #ifdef HAVE_X_WINDOWS
--- a/src/minibuf.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/minibuf.c	Thu Jul 08 17:09:35 2010 +0900
@@ -154,7 +154,7 @@
    or when a minibuffer exits.  */
 
 void
-choose_minibuf_frame ()
+choose_minibuf_frame (void)
 {
   if (FRAMEP (selected_frame)
       && FRAME_LIVE_P (XFRAME (selected_frame))
@@ -193,8 +193,7 @@
 }
 
 Lisp_Object
-choose_minibuf_frame_1 (ignore)
-     Lisp_Object ignore;
+choose_minibuf_frame_1 (Lisp_Object ignore)
 {
   choose_minibuf_frame ();
   return Qnil;
@@ -220,27 +219,26 @@
 
 /* Actual minibuffer invocation. */
 
-static Lisp_Object read_minibuf_unwind P_ ((Lisp_Object));
-static Lisp_Object run_exit_minibuf_hook P_ ((Lisp_Object));
-static Lisp_Object read_minibuf P_ ((Lisp_Object, Lisp_Object,
-				     Lisp_Object, Lisp_Object,
-				     int, Lisp_Object,
-				     Lisp_Object, Lisp_Object,
-				     int, int));
-static Lisp_Object read_minibuf_noninteractive P_ ((Lisp_Object, Lisp_Object,
-						    Lisp_Object, Lisp_Object,
-						    int, Lisp_Object,
-						    Lisp_Object, Lisp_Object,
-						    int, int));
-static Lisp_Object string_to_object P_ ((Lisp_Object, Lisp_Object));
+static Lisp_Object read_minibuf_unwind (Lisp_Object);
+static Lisp_Object run_exit_minibuf_hook (Lisp_Object);
+static Lisp_Object read_minibuf (Lisp_Object, Lisp_Object,
+                                 Lisp_Object, Lisp_Object,
+                                 int, Lisp_Object,
+                                 Lisp_Object, Lisp_Object,
+                                 int, int);
+static Lisp_Object read_minibuf_noninteractive (Lisp_Object, Lisp_Object,
+                                                Lisp_Object, Lisp_Object,
+                                                int, Lisp_Object,
+                                                Lisp_Object, Lisp_Object,
+                                                int, int);
+static Lisp_Object string_to_object (Lisp_Object, Lisp_Object);
 
 
 /* Read a Lisp object from VAL and return it.  If VAL is an empty
    string, and DEFALT is a string, read from DEFALT instead of VAL.  */
 
 static Lisp_Object
-string_to_object (val, defalt)
-     Lisp_Object val, defalt;
+string_to_object (Lisp_Object val, Lisp_Object defalt)
 {
   struct gcpro gcpro1, gcpro2;
   Lisp_Object expr_and_pos;
@@ -839,12 +837,11 @@
  used for nonrecursive minibuffer invocations */
 
 Lisp_Object
-get_minibuffer (depth)
-     int depth;
+get_minibuffer (int depth)
 {
   Lisp_Object tail, num, buf;
   char name[24];
-  extern Lisp_Object nconc2 ();
+  extern Lisp_Object nconc2 (Lisp_Object, Lisp_Object);
 
   XSETFASTINT (num, depth);
   tail = Fnthcdr (num, Vminibuffer_list);
@@ -884,8 +881,7 @@
 }
 
 static Lisp_Object
-run_exit_minibuf_hook (data)
-     Lisp_Object data;
+run_exit_minibuf_hook (Lisp_Object data)
 {
   if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound)
       && !NILP (Vrun_hooks))
@@ -898,8 +894,7 @@
    not, and it restores the current window, buffer, etc. */
 
 static Lisp_Object
-read_minibuf_unwind (data)
-     Lisp_Object data;
+read_minibuf_unwind (Lisp_Object data)
 {
   Lisp_Object old_deactivate_mark;
   Lisp_Object window;
@@ -1249,8 +1244,7 @@
 }
 
 static Lisp_Object
-minibuf_conform_representation (string, basis)
-     Lisp_Object string, basis;
+minibuf_conform_representation (Lisp_Object string, Lisp_Object basis)
 {
   if (STRING_MULTIBYTE (string) == STRING_MULTIBYTE (basis))
     return string;
@@ -1843,7 +1837,7 @@
   RETURN_UNGCPRO (unbind_to (count, val));
 }
 
-Lisp_Object Fassoc_string ();
+Lisp_Object Fassoc_string (register Lisp_Object key, Lisp_Object list, Lisp_Object case_fold);
 
 /* Test whether TXT is an exact completion.  */
 DEFUN ("test-completion", Ftest_completion, Stest_completion, 2, 3, 0,
@@ -2061,14 +2055,14 @@
 
 
 void
-init_minibuf_once ()
+init_minibuf_once (void)
 {
   Vminibuffer_list = Qnil;
   staticpro (&Vminibuffer_list);
 }
 
 void
-syms_of_minibuf ()
+syms_of_minibuf (void)
 {
   minibuf_level = 0;
   minibuf_prompt = Qnil;
--- a/src/mktime.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/mktime.c	Thu Jul 08 17:09:35 2010 +0900
@@ -57,14 +57,6 @@
 # define mktime my_mktime
 #endif /* DEBUG */
 
-#ifndef __P
-# if defined __GNUC__ || (defined __STDC__ && __STDC__)
-#  define __P(args) args
-# else
-#  define __P(args) ()
-# endif  /* GCC.  */
-#endif  /* Not __P.  */
-
 #ifndef CHAR_BIT
 # define CHAR_BIT 8
 #endif
--- a/src/msdos.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/msdos.c	Thu Jul 08 17:09:35 2010 +0900
@@ -35,7 +35,7 @@
 #include <sys/time.h>
 #include <dos.h>
 #include <errno.h>
-#include <string.h>	 /* for bzero and string functions */
+#include <string.h>	 /* for memset and string functions */
 #include <sys/stat.h>    /* for _fixpath */
 #include <unistd.h>	 /* for chdir, dup, dup2, etc. */
 #include <dir.h>	 /* for getdisk */
@@ -102,7 +102,7 @@
 #endif /* not SYSTEM_MALLOC */
 
 static unsigned long
-event_timestamp ()
+event_timestamp (void)
 {
   struct time t;
   unsigned long s;
@@ -138,7 +138,7 @@
 static int mouse_button_count;
 
 void
-mouse_on ()
+mouse_on (void)
 {
   union REGS regs;
 
@@ -155,7 +155,7 @@
 }
 
 void
-mouse_off ()
+mouse_off (void)
 {
   union REGS regs;
 
@@ -222,8 +222,7 @@
 }
 
 void
-mouse_moveto (x, y)
-     int x, y;
+mouse_moveto (int x, int y)
 {
   union REGS regs;
   struct tty_display_info *tty = CURTTY ();
@@ -237,8 +236,7 @@
 }
 
 static int
-mouse_pressed (b, xp, yp)
-     int b, *xp, *yp;
+mouse_pressed (int b, int *xp, int *yp)
 {
   union REGS regs;
 
@@ -253,8 +251,7 @@
 }
 
 static int
-mouse_released (b, xp, yp)
-     int b, *xp, *yp;
+mouse_released (int b, int *xp, int *yp)
 {
   union REGS regs;
 
@@ -269,8 +266,7 @@
 }
 
 static int
-mouse_button_depressed (b, xp, yp)
-     int b, *xp, *yp;
+mouse_button_depressed (int b, int *xp, int *yp)
 {
   union REGS regs;
 
@@ -288,12 +284,9 @@
 }
 
 void
-mouse_get_pos (f, insist, bar_window, part, x, y, time)
-     FRAME_PTR *f;
-     int insist;
-     Lisp_Object *bar_window, *x, *y;
-     enum scroll_bar_part *part;
-     unsigned long *time;
+mouse_get_pos (FRAME_PTR *f, int insist, Lisp_Object *bar_window,
+	       enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y,
+	       unsigned long *time)
 {
   int ix, iy;
   Lisp_Object frame, tail;
@@ -311,7 +304,7 @@
 }
 
 static void
-mouse_check_moved ()
+mouse_check_moved (void)
 {
   int x, y;
 
@@ -338,7 +331,7 @@
 }
 
 void
-mouse_init ()
+mouse_init (void)
 {
   union REGS regs;
   struct tty_display_info *tty = CURTTY ();
@@ -440,10 +433,7 @@
 }
 
 static void
-dos_direct_output (y, x, buf, len)
-     int x, y;
-     char *buf;
-     int len;
+dos_direct_output (int y, int x, char *buf, int len)
 {
   int t0 = 2 * (x + y * screen_size_X);
   int t = t0 + (int) ScreenPrimary;
@@ -510,8 +500,7 @@
    ROWS x COLS frame.  */
 
 void
-dos_set_window_size (rows, cols)
-     int *rows, *cols;
+dos_set_window_size (int *rows, int *cols)
 {
   char video_name[30];
   union REGS regs;
@@ -620,7 +609,7 @@
    the mouse cursor may need to be refreshed.  */
 
 static void
-mouse_off_maybe ()
+mouse_off_maybe (void)
 {
   int x, y;
 
@@ -1864,10 +1853,7 @@
 
 /* Insert and delete glyphs.  */
 static void
-IT_insert_glyphs (f, start, len)
-     struct frame *f;
-     register struct glyph *start;
-     register int len;
+IT_insert_glyphs (struct frame *f, struct glyph *start, int len)
 {
   int shift_by_width = screen_size_X - (new_pos_X + len);
 
@@ -1880,18 +1866,14 @@
 }
 
 static void
-IT_delete_glyphs (f, n)
-     struct frame *f;
-     register int n;
+IT_delete_glyphs (struct frame *f, int n)
 {
   abort ();
 }
 
 /* set-window-configuration on window.c needs this.  */
 void
-x_set_menu_bar_lines (f, value, oldval)
-     struct frame *f;
-     Lisp_Object value, oldval;
+x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   set_menu_bar_lines (f, value, oldval);
 }
@@ -2080,9 +2062,7 @@
 }
 
 void
-IT_set_frame_parameters (f, alist)
-     struct frame *f;
-     Lisp_Object alist;
+IT_set_frame_parameters (struct frame *f, Lisp_Object alist)
 {
   Lisp_Object tail;
   int i, j, length = XINT (Flength (alist));
@@ -2092,33 +2072,27 @@
     = (Lisp_Object *) alloca (length * sizeof (Lisp_Object));
   /* Do we have to reverse the foreground and background colors?  */
   int reverse = EQ (Fcdr (Fassq (Qreverse, f->param_alist)), Qt);
-  int need_to_reverse, was_reverse = reverse;
   int redraw = 0, fg_set = 0, bg_set = 0;
   unsigned long orig_fg, orig_bg;
   Lisp_Object frame_bg, frame_fg;
-  extern Lisp_Object Qdefault, QCforeground, QCbackground;
   struct tty_display_info *tty = FRAME_TTY (f);
+  extern Lisp_Object Qmenu_bar_lines;
+  extern Lisp_Object Vmenu_bar_mode;
+  int menu_bar_lines_defined =
+    !NILP (Fassq (Qmenu_bar_lines, Vdefault_frame_alist));
 
   /* If we are creating a new frame, begin with the original screen colors
      used for the initial frame.  */
-  if (EQ (alist, Vdefault_frame_alist)
+  if (!f->default_face_done_p
       && initial_screen_colors[0] != -1 && initial_screen_colors[1] != -1)
     {
       FRAME_FOREGROUND_PIXEL (f) = initial_screen_colors[0];
       FRAME_BACKGROUND_PIXEL (f) = initial_screen_colors[1];
       init_frame_faces (f);
+      f->default_face_done_p = 1;
     }
-  orig_fg = FRAME_FOREGROUND_PIXEL (f);
-  orig_bg = FRAME_BACKGROUND_PIXEL (f);
-  frame_fg = Fcdr (Fassq (Qforeground_color, f->param_alist));
-  frame_bg = Fcdr (Fassq (Qbackground_color, f->param_alist));
-  /* frame_fg and frame_bg could be nil if, for example,
-     f->param_alist is nil, e.g. if we are called from
-     Fmake_terminal_frame.  */
-  if (NILP (frame_fg))
-    frame_fg = build_string (unspecified_fg);
-  if (NILP (frame_bg))
-    frame_bg = build_string (unspecified_bg);
+  orig_fg = reverse ? FRAME_BACKGROUND_PIXEL (f) : FRAME_FOREGROUND_PIXEL (f);
+  orig_bg = reverse ? FRAME_FOREGROUND_PIXEL (f) : FRAME_BACKGROUND_PIXEL (f);
 
   /* Extract parm names and values into those vectors.  */
   i = 0;
@@ -2144,60 +2118,79 @@
 
       if (EQ (prop, Qreverse))
 	reverse = EQ (val, Qt);
+      else if (!menu_bar_lines_defined && EQ (prop, Qmenu_bar_lines))
+	menu_bar_lines_defined = 1;
     }
 
-  need_to_reverse = reverse && !was_reverse;
-  if (tty->termscript && need_to_reverse)
+  if (tty->termscript && reverse)
     fprintf (tty->termscript, "<INVERSE-VIDEO>\n");
 
   /* Now process the alist elements in reverse of specified order.  */
   for (i--; i >= 0; i--)
     {
-      Lisp_Object prop, val, frame;
+      Lisp_Object prop, val;
 
       prop = parms[i];
       val  = values[i];
 
       if (EQ (prop, Qforeground_color))
 	{
-	  unsigned long new_color = load_color (f, NULL, val, need_to_reverse
+	  unsigned long new_color = load_color (f, NULL, val, reverse
 						? LFACE_BACKGROUND_INDEX
 						: LFACE_FOREGROUND_INDEX);
 	  if (new_color !=  FACE_TTY_DEFAULT_COLOR
 	      && new_color != FACE_TTY_DEFAULT_FG_COLOR
 	      && new_color != FACE_TTY_DEFAULT_BG_COLOR)
 	    {
-	      FRAME_FOREGROUND_PIXEL (f) = new_color;
-	      /* Make sure the foreground of the default face for this
-		 frame is changed as well.  */
-	      XSETFRAME (frame, f);
-	      Finternal_set_lisp_face_attribute (Qdefault, QCforeground,
-						 val, frame);
-	      fg_set = 1;
+	      if (!reverse)
+		{
+		  FRAME_FOREGROUND_PIXEL (f) = new_color;
+		  /* Make sure the foreground of the default face for
+		     this frame is changed as well.  */
+		  update_face_from_frame_parameter (f, Qforeground_color, val);
+		  fg_set = 1;
+		  if (tty->termscript)
+		    fprintf (tty->termscript, "<FGCOLOR %lu>\n", new_color);
+		}
+	      else
+		{
+		  FRAME_BACKGROUND_PIXEL (f) = new_color;
+		  update_face_from_frame_parameter (f, Qbackground_color, val);
+		  bg_set = 1;
+		  if (tty->termscript)
+		    fprintf (tty->termscript, "<BGCOLOR %lu>\n", new_color);
+		}
 	      redraw = 1;
-	      if (tty->termscript)
-		fprintf (tty->termscript, "<FGCOLOR %lu>\n", new_color);
 	    }
 	}
       else if (EQ (prop, Qbackground_color))
 	{
-	  unsigned long new_color = load_color (f, NULL, val, need_to_reverse
+	  unsigned long new_color = load_color (f, NULL, val, reverse
 						? LFACE_FOREGROUND_INDEX
 						: LFACE_BACKGROUND_INDEX);
 	  if (new_color != FACE_TTY_DEFAULT_COLOR
 	      && new_color != FACE_TTY_DEFAULT_FG_COLOR
 	      && new_color != FACE_TTY_DEFAULT_BG_COLOR)
 	    {
-	      FRAME_BACKGROUND_PIXEL (f) = new_color;
-	      /* Make sure the background of the default face for this
-		 frame is changed as well.  */
-	      XSETFRAME (frame, f);
-	      Finternal_set_lisp_face_attribute (Qdefault, QCbackground,
-						 val, frame);
-	      bg_set = 1;
+	      if (!reverse)
+		{
+		  FRAME_BACKGROUND_PIXEL (f) = new_color;
+		  /* Make sure the background of the default face for
+		     this frame is changed as well.  */
+		  bg_set = 1;
+		  update_face_from_frame_parameter (f, Qbackground_color, val);
+		  if (tty->termscript)
+		    fprintf (tty->termscript, "<BGCOLOR %lu>\n", new_color);
+		}
+	      else
+		{
+		  FRAME_FOREGROUND_PIXEL (f) = new_color;
+		  fg_set = 1;
+		  update_face_from_frame_parameter (f, Qforeground_color, val);
+		  if (tty->termscript)
+		    fprintf (tty->termscript, "<FGCOLOR %lu>\n", new_color);
+		}
 	      redraw = 1;
-	      if (tty->termscript)
-		fprintf (tty->termscript, "<BGCOLOR %lu>\n", new_color);
 	    }
 	}
       else if (EQ (prop, Qtitle))
@@ -2226,26 +2219,36 @@
       store_frame_param (f, prop, val);
     }
 
+  /* If menu-bar-lines is neither in the frame parameters nor in
+     default-frame-alist, set it according to menu-bar-mode.  */
+  if (!menu_bar_lines_defined)
+    {
+      store_frame_param (f, Qmenu_bar_lines,
+			 NILP (Vmenu_bar_mode)
+			 ? make_number (0) : make_number (1));
+      if (tty->termscript)
+	fprintf (tty->termscript, "<MENU BAR LINES DEFAULTED: %d\n",
+		 !NILP (Vmenu_bar_mode));
+    }
+
   /* If they specified "reverse", but not the colors, we need to swap
      the current frame colors.  */
-  if (need_to_reverse)
+  if (reverse)
     {
       Lisp_Object frame;
 
       if (!fg_set)
 	{
-	  XSETFRAME (frame, f);
-	  Finternal_set_lisp_face_attribute (Qdefault, QCforeground,
-					     tty_color_name (f, orig_bg),
-					     frame);
+	  FRAME_FOREGROUND_PIXEL (f) = orig_bg;
+	  update_face_from_frame_parameter (f, Qforeground_color,
+					    tty_color_name (f, orig_bg));
 	  redraw = 1;
 	}
       if (!bg_set)
 	{
-	  XSETFRAME (frame, f);
-	  Finternal_set_lisp_face_attribute (Qdefault, QCbackground,
-					     tty_color_name (f, orig_fg),
-					     frame);
+	  FRAME_BACKGROUND_PIXEL (f) = orig_fg;
+	  update_face_from_frame_parameter (f, Qbackground_color,
+					    tty_color_name (f, orig_fg));
 	  redraw = 1;
 	}
     }
@@ -2266,7 +2269,7 @@
 /* Do we need the internal terminal?  */
 
 void
-internal_terminal_init ()
+internal_terminal_init (void)
 {
   static int init_needed = 1;
   char *term = getenv ("TERM"), *colors;
@@ -2402,10 +2405,8 @@
   term->read_socket_hook = &tty_read_avail_input; /* from keyboard.c */
 }
 
-dos_get_saved_screen (screen, rows, cols)
-     char **screen;
-     int *rows;
-     int *cols;
+int
+dos_get_saved_screen (char **screen, int *rows, int *cols)
 {
 #ifndef HAVE_X_WINDOWS
   *screen = startup_screen_buffer;
@@ -2564,9 +2565,7 @@
 static int international_keyboard;
 
 int
-dos_set_keyboard (code, always)
-     int code;
-     int always;
+dos_set_keyboard (int code, int always)
 {
   int i;
   _go32_dpmi_registers regs;
@@ -2833,8 +2832,7 @@
 #define HYPER_P		0x8000	/* pseudo */
 
 static int
-dos_get_modifiers (keymask)
-     int *keymask;
+dos_get_modifiers (int *keymask)
 {
   union REGS regs;
   int mask, modifiers = 0;
@@ -2916,7 +2914,7 @@
 #define NUM_RECENT_DOSKEYS (100)
 int recent_doskeys_index;	/* Index for storing next element into recent_doskeys */
 int total_doskeys;		/* Total number of elements stored into recent_doskeys */
-Lisp_Object recent_doskeys; /* A vector, holding the last 100 keystrokes */
+Lisp_Object recent_doskeys;	/* A vector, holding the last 100 keystrokes */
 
 DEFUN ("recent-doskeys", Frecent_doskeys, Srecent_doskeys, 0, 0, 0,
        doc: /* Return vector of last 100 keyboard input values seen in dos_rawgetc.
@@ -2931,19 +2929,17 @@
   else
     {
       val = Fvector (NUM_RECENT_DOSKEYS, keys);
-      bcopy (keys + recent_doskeys_index,
-	     XVECTOR (val)->contents,
-	     (NUM_RECENT_DOSKEYS - recent_doskeys_index) * sizeof (Lisp_Object));
-      bcopy (keys,
-	     XVECTOR (val)->contents + NUM_RECENT_DOSKEYS - recent_doskeys_index,
-	     recent_doskeys_index * sizeof (Lisp_Object));
+      memcpy (XVECTOR (val)->contents, keys + recent_doskeys_index,
+	      (NUM_RECENT_DOSKEYS - recent_doskeys_index) * sizeof (Lisp_Object));
+      memcpy (XVECTOR (val)->contents + NUM_RECENT_DOSKEYS - recent_doskeys_index,
+	      keys, recent_doskeys_index * sizeof (Lisp_Object));
       return val;
     }
 }
 
 /* Get a char from keyboard.  Function keys are put into the event queue.  */
 static int
-dos_rawgetc ()
+dos_rawgetc (void)
 {
   struct input_event event;
   union REGS regs;
@@ -3294,8 +3290,8 @@
 static int prev_get_char = -1;
 
 /* Return 1 if a key is ready to be read without suspending execution.  */
-
-dos_keysns ()
+int
+dos_keysns (void)
 {
   if (prev_get_char != -1)
     return 1;
@@ -3304,8 +3300,8 @@
 }
 
 /* Read a key.  Return -1 if no key is ready.  */
-
-dos_keyread ()
+int
+dos_keyread (void)
 {
   if (prev_get_char != -1)
     {
@@ -3334,7 +3330,7 @@
 static int menu_help_paneno, menu_help_itemno;
 
 static XMenu *
-IT_menu_create ()
+IT_menu_create (void)
 {
   XMenu *menu;
 
@@ -3503,7 +3499,7 @@
 /* Report availability of menus.  */
 
 int
-have_menus_p () {  return 1; }
+have_menus_p (void) {  return 1; }
 
 /* Create a brand new menu structure.  */
 
@@ -3861,8 +3857,7 @@
 /* Destructively turn backslashes into slashes.  */
 
 void
-dostounix_filename (p)
-     register char *p;
+dostounix_filename (char *p)
 {
   msdos_downcase_filename (p);
 
@@ -3877,8 +3872,7 @@
 /* Destructively turn slashes into backslashes.  */
 
 void
-unixtodos_filename (p)
-     register char *p;
+unixtodos_filename (char *p)
 {
   if (p[1] == ':' && *p >= 'A' && *p <= 'Z')
     {
@@ -3897,9 +3891,7 @@
 /* Get the default directory for a given drive.  0=def, 1=A, 2=B, ...  */
 
 int
-getdefdir (drive, dst)
-     int drive;
-     char *dst;
+getdefdir (int drive, char *dst)
 {
   char in_path[4], *p = in_path, e = errno;
 
@@ -3938,9 +3930,7 @@
 /* Remove all CR's that are followed by a LF.  */
 
 int
-crlf_to_lf (n, buf)
-     register int n;
-     register unsigned char *buf;
+crlf_to_lf (int n, unsigned char *buf)
 {
   unsigned char *np = buf, *startp = buf, *endp = buf + n;
 
@@ -3972,8 +3962,7 @@
 /* Convert alphabetic characters in a filename to lower-case.  */
 
 void
-msdos_downcase_filename (p)
-     register unsigned char *p;
+msdos_downcase_filename (unsigned char *p)
 {
   /* Always lower-case drive letters a-z, even if the filesystem
      preserves case in filenames.
@@ -4017,8 +4006,7 @@
 static char emacsroot[MAXPATHLEN];
 
 char *
-rootrelativepath (rel)
-     char *rel;
+rootrelativepath (char *rel)
 {
   static char result[MAXPATHLEN + 10];
 
@@ -4033,10 +4021,7 @@
    break if one or more of these are missing.  */
 
 void
-init_environment (argc, argv, skip_args)
-     int argc;
-     char **argv;
-     int skip_args;
+init_environment (int argc, char **argv, int skip_args)
 {
   char *s, *t, *root;
   int len, i;
@@ -4270,7 +4255,7 @@
 /*  Restore status of standard input and Ctrl-C checking.  */
 
 int
-dos_ttcooked ()
+dos_ttcooked (void)
 {
   union REGS inregs, outregs;
 
@@ -4296,11 +4281,8 @@
    file TEMPOUT and stderr to TEMPERR.  */
 
 int
-run_msdos_command (argv, working_dir, tempin, tempout, temperr, envv)
-     unsigned char **argv;
-     const char *working_dir;
-     int tempin, tempout, temperr;
-     char **envv;
+run_msdos_command (unsigned char **argv, const char *working_dir,
+		   int tempin, int tempout, int temperr, char **envv)
 {
   char *saveargv1, *saveargv2, *lowcase_argv0, *pa, *pl;
   char oldwd[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS.  */
@@ -4441,8 +4423,7 @@
 }
 
 void
-croak (badfunc)
-     char *badfunc;
+croak (char *badfunc)
 {
   fprintf (stderr, "%s not yet implemented\r\n", badfunc);
   reset_all_sys_modes ();
@@ -4452,8 +4433,8 @@
 /*
  * A few unimplemented functions that we silently ignore.
  */
-setpgrp () {return 0; }
-setpriority (x,y,z) int x,y,z; { return 0; }
+int setpgrp (void) {return 0; }
+int setpriority (int x, int y, int z) { return 0; }
 
 #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
 
@@ -4478,17 +4459,13 @@
 /* A signal handler which just records that a signal occurred
    (it will be raised later, if and when the signal is unblocked).  */
 static void
-sig_suspender (signo)
-     int signo;
+sig_suspender (int signo)
 {
   sigaddset (&msdos_pending_signals, signo);
 }
 
 int
-sigprocmask (how, new_set, old_set)
-     int how;
-     const sigset_t *new_set;
-     sigset_t *old_set;
+sigprocmask (int how, const sigset_t *new_set, sigset_t *old_set)
 {
   int signo;
   sigset_t new_mask;
@@ -4590,10 +4567,8 @@
 /* We don't have to call timer_check here
    because wait_reading_process_output takes care of that.  */
 int
-sys_select (nfds, rfds, wfds, efds, timeout)
-     int nfds;
-     SELECT_TYPE *rfds, *wfds, *efds;
-     EMACS_TIME *timeout;
+sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
+	    EMACS_TIME *timeout)
 {
   int check_input;
   struct time t;
@@ -4663,11 +4638,10 @@
 
 #ifdef chdir
 #undef chdir
-extern int chdir ();
+extern int chdir (const char *);
 
 int
-sys_chdir (path)
-     const char* path;
+sys_chdir (const char *path)
 {
   int len = strlen (path);
   char *tmp = (char *)path;
@@ -4696,7 +4670,7 @@
 extern void tzset (void);
 
 void
-init_gettimeofday ()
+init_gettimeofday (void)
 {
   time_t ltm, gtm;
   struct tm *lstm;
@@ -4714,9 +4688,7 @@
 #ifdef abort
 #undef abort
 void
-dos_abort (file, line)
-     char *file;
-     int  line;
+dos_abort (char *file, int line)
 {
   char buffer1[200], buffer2[400];
   int i, j;
@@ -4732,7 +4704,7 @@
 }
 #else
 void
-abort ()
+abort (void)
 {
   dos_ttcooked ();
   ScreenSetCursor (10, 0);
@@ -4757,7 +4729,8 @@
 static int delete_exited_processes;
 #endif
 
-syms_of_msdos ()
+void
+syms_of_msdos (void)
 {
   recent_doskeys = Fmake_vector (make_number (NUM_RECENT_DOSKEYS), Qnil);
   staticpro (&recent_doskeys);
--- a/src/msdos.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/msdos.h	Thu Jul 08 17:09:35 2010 +0900
@@ -23,7 +23,7 @@
 #include <dpmi.h>
 
 int dos_ttraw (struct tty_display_info *);
-int dos_ttcooked ();
+int dos_ttcooked (void);
 int dos_get_saved_screen (char **, int *, int *);
 int dos_set_keyboard (int, int);
 void dos_set_window_size (int *, int *);
@@ -32,15 +32,13 @@
 void unixtodos_filename (char *);
 void dostounix_filename (char *);
 char *rootrelativepath (char *);
-void init_environment ();
-void internal_terminal_init ();
-void ctrl_break_func (_go32_dpmi_registers *);
-void install_ctrl_break_check ();
+void init_environment (int, char **, int);
+void internal_terminal_init (void);
 
 extern int have_mouse;
-void mouse_init ();
-void mouse_on ();
-void mouse_off ();
+void mouse_init (void);
+void mouse_on (void);
+void mouse_off (void);
 void mouse_moveto (int, int);
 
 #ifndef HAVE_X_WINDOWS
@@ -70,13 +68,12 @@
 
 /* Defined in xfns.c; emulated on msdos.c */
 
-extern void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern int x_pixel_width P_ ((struct frame *));
-extern int x_pixel_height P_ ((struct frame *));
+extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
+extern int x_pixel_width (struct frame *);
+extern int x_pixel_height (struct frame *);
 
 #define XFreeGC (void)
 #define x_destroy_bitmap(p1,p2)
-#define load_pixmap(p1,p2,p3,p4) (0)
 #define XGetGeometry(p1,p2,p3,p4,p5,p6,p7,p8,p9)
 #define DisplayWidth(p1,p2) (SELECTED_FRAME()->text_cols)
 #define DisplayHeight(p1,p2) (SELECTED_FRAME()->text_lines)
--- a/src/nsfns.m	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/nsfns.m	Thu Jul 08 17:09:35 2010 +0900
@@ -1159,7 +1159,7 @@
 
   f->output_method = output_ns;
   f->output_data.ns = (struct ns_output *)xmalloc (sizeof *(f->output_data.ns));
-  bzero (f->output_data.ns, sizeof (*(f->output_data.ns)));
+  memset (f->output_data.ns, 0, sizeof (*(f->output_data.ns)));
 
   FRAME_FONTSET (f) = -1;
 
@@ -2412,22 +2412,27 @@
 
   /* Start with user-specified or mouse position.  */
   left = Fcdr (Fassq (Qleft, parms));
-  if (INTEGERP (left))
-    pt.x = XINT (left);
-  else
-    pt.x = last_mouse_motion_position.x;
   top = Fcdr (Fassq (Qtop, parms));
-  if (INTEGERP (top))
-    pt.y = XINT (top);
+
+  if (!INTEGERP (left) || !INTEGERP (top))
+    {
+      pt = last_mouse_motion_position;
+      /* Convert to screen coordinates */
+      pt = [view convertPoint: pt toView: nil];
+      pt = [[view window] convertBaseToScreen: pt];
+    }
   else
-    pt.y = last_mouse_motion_position.y;
-
-  /* Convert to screen coordinates */
-  pt = [view convertPoint: pt toView: nil];
-  pt = [[view window] convertBaseToScreen: pt];
-
+    {
+      /* Absolute coordinates.  */
+      pt.x = XINT (left);
+      pt.y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - XINT (top)
+        - height;
+    }
+  
   /* Ensure in bounds.  (Note, screen origin = lower left.) */
-  if (pt.x + XINT (dx) <= 0)
+  if (INTEGERP (left))
+    *root_x = pt.x;
+  else if (pt.x + XINT (dx) <= 0)
     *root_x = 0; /* Can happen for negative dx */
   else if (pt.x + XINT (dx) + width
 	   <= x_display_pixel_width (FRAME_NS_DISPLAY_INFO (f)))
@@ -2440,7 +2445,9 @@
     /* Put it left justified on the screen -- it ought to fit that way.  */
     *root_x = 0;
 
-  if (pt.y - XINT (dy) - height >= 0)
+  if (INTEGERP (top))
+    *root_y = pt.y;
+  else if (pt.y - XINT (dy) - height >= 0)
     /* It fits below the pointer.  */
     *root_y = pt.y - height - XINT (dy);
   else if (pt.y + XINT (dy) + height
--- a/src/nsfont.m	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/nsfont.m	Thu Jul 08 17:09:35 2010 +0900
@@ -776,8 +776,8 @@
     xmalloc (0x100 * sizeof (struct font_metrics *));
   if (!font_info->glyphs || !font_info->metrics)
     return Qnil;
-  bzero (font_info->glyphs, 0x100 * sizeof (unsigned short *));
-  bzero (font_info->metrics, 0x100 * sizeof (struct font_metrics *));
+  memset (font_info->glyphs, 0, 0x100 * sizeof (unsigned short *));
+  memset (font_info->metrics, 0, 0x100 * sizeof (struct font_metrics *));
 
   BLOCK_INPUT;
 
@@ -816,8 +816,8 @@
     [font_info->nsfont retain];
 
     /* set up ns_font (defined in nsgui.h) */
-    font_info->name = (char *)xmalloc (strlen (fontName) + 1);
-    bcopy (fontName, font_info->name, strlen (fontName) + 1);
+    font_info->name = (char *)xmalloc (strlen (fontName)+1);
+    strcpy (font_info->name, fontName);
     font_info->bold = [fontMgr traitsOfFont: nsfont] & NSBoldFontMask;
     font_info->ital =
       synthItal || ([fontMgr traitsOfFont: nsfont] & NSItalicFontMask);
@@ -972,7 +972,7 @@
   int totalWidth = 0;
   int i;
 
-  bzero (metrics, sizeof (struct font_metrics));
+  memset (metrics, 0, sizeof (struct font_metrics));
 
   for (i =0; i<nglyphs; i++)
     {
@@ -1395,7 +1395,7 @@
  sfont = [font_info->nsfont screenFont];
 
   font_info->metrics[block] = xmalloc (0x100 * sizeof (struct font_metrics));
-  bzero (font_info->metrics[block], 0x100 * sizeof (struct font_metrics));
+  memset (font_info->metrics[block], 0, 0x100 * sizeof (struct font_metrics));
   if (!(font_info->metrics[block]))
     abort ();
 
--- a/src/nsimage.m	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/nsimage.m	Thu Jul 08 17:09:35 2010 +0900
@@ -315,9 +315,9 @@
 
   [self addRepresentation: bmRep];
 
-  bzero (planes[0], w*h);
-  bzero (planes[1], w*h);
-  bzero (planes[2], w*h);
+  memset (planes[0], 0, w*h);
+  memset (planes[1], 0, w*h);
+  memset (planes[2], 0, w*h);
   [self setXBMColor: [NSColor blackColor]];
   return self;
 }
@@ -379,7 +379,7 @@
 
   [bmRep getBitmapDataPlanes: pixmapData];
   for (i =0; i<4; i++)
-    bzero (pixmapData[i], width*height);
+    memset (pixmapData[i], 0, width*height);
   [self addRepresentation: bmRep];
   return self;
 }
--- a/src/nsmenu.m	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/nsmenu.m	Thu Jul 08 17:09:35 2010 +0900
@@ -219,8 +219,8 @@
 
       /* Save the frame's previous menu bar contents data */
       if (previous_menu_items_used)
-	bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items,
-	       previous_menu_items_used * sizeof (Lisp_Object));
+	memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
+		previous_menu_items_used * sizeof (Lisp_Object));
 
       /* parse stage 1: extract from lisp */
       save_menu_items ();
@@ -999,7 +999,10 @@
     Under NS we just hide the toolbar until it might be needed again.
    -------------------------------------------------------------------------- */
 {
+  BLOCK_INPUT;
   [[FRAME_NS_VIEW (f) toolbar] setVisible: NO];
+  FRAME_TOOLBAR_HEIGHT (f) = 0;
+  UNBLOCK_INPUT;
 }
 
 void
@@ -1009,8 +1012,11 @@
    -------------------------------------------------------------------------- */
 {
   int i;
-  EmacsToolbar *toolbar = [FRAME_NS_VIEW (f) toolbar];
+  EmacsView *view = FRAME_NS_VIEW (f);
+  NSWindow *window = [view window];
+  EmacsToolbar *toolbar = [view toolbar];
 
+  BLOCK_INPUT;
   [toolbar clearActive];
 
   /* update EmacsToolbar as in GtkUtils, build items list */
@@ -1094,6 +1100,10 @@
       [newDict release];
     }
 
+  FRAME_TOOLBAR_HEIGHT (f) =
+    NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0, 0)])
+    - FRAME_NS_TITLEBAR_HEIGHT (f);
+  UNBLOCK_INPUT;
 }
 
 
--- a/src/nsterm.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/nsterm.h	Thu Jul 08 17:09:35 2010 +0900
@@ -606,7 +606,7 @@
 #define NS_FACE_FOREGROUND(f) ((f)->foreground)
 #define NS_FACE_BACKGROUND(f) ((f)->background)
 #define FRAME_NS_TITLEBAR_HEIGHT(f) ((f)->output_data.ns->titlebar_height)
-#define FRAME_NS_TOOLBAR_HEIGHT(f) ((f)->output_data.ns->toolbar_height)
+#define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.ns->toolbar_height)
 
 #define FONT_WIDTH(f)	((f)->max_width)
 #define FONT_HEIGHT(f)	((f)->height)
@@ -760,8 +760,8 @@
 extern void ns_put_pixel (void *img, int x, int y, unsigned long argb);
 extern void ns_set_alpha (void *img, int x, int y, unsigned char a);
 
-extern int x_display_pixel_height P_ ((struct ns_display_info *));
-extern int x_display_pixel_width P_ ((struct ns_display_info *));
+extern int x_display_pixel_height (struct ns_display_info *);
+extern int x_display_pixel_width (struct ns_display_info *);
 
 /* This in nsterm.m */
 extern unsigned long ns_get_rgb_color (struct frame *f,
--- a/src/nsterm.m	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/nsterm.m	Thu Jul 08 17:09:35 2010 +0900
@@ -1138,15 +1138,15 @@
     /* NOTE: previously this would generate wrong result if toolbar not
              yet displayed and fixing toolbar_height=32 helped, but
              now (200903) seems no longer needed */
-    FRAME_NS_TOOLBAR_HEIGHT (f) =
+    FRAME_TOOLBAR_HEIGHT (f) =
       NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0, 0)])
         - FRAME_NS_TITLEBAR_HEIGHT (f);
   else
-    FRAME_NS_TOOLBAR_HEIGHT (f) = 0;
+    FRAME_TOOLBAR_HEIGHT (f) = 0;
 
   wr.size.width = pixelwidth + f->border_width;
   wr.size.height = pixelheight + FRAME_NS_TITLEBAR_HEIGHT (f) 
-                  + FRAME_NS_TOOLBAR_HEIGHT (f);
+                  + FRAME_TOOLBAR_HEIGHT (f);
 
   /* constrain to screen if we can */
   if (screen)
@@ -2163,11 +2163,11 @@
     {
       EmacsImage **newBimgs
 	= xmalloc (max_used_fringe_bitmap * sizeof (EmacsImage *));
-      bzero (newBimgs, max_used_fringe_bitmap * sizeof (EmacsImage *));
+      memset (newBimgs, 0, max_used_fringe_bitmap * sizeof (EmacsImage *));
 
       if (nBimgs)
         {
-          bcopy (bimgs, newBimgs, nBimgs * sizeof (EmacsImage *));
+          memcpy (newBimgs, bimgs, nBimgs * sizeof (EmacsImage *));
           xfree (bimgs);
         }
 
@@ -3707,7 +3707,7 @@
                                              name: nil object: nil]; */
 
   dpyinfo = (struct ns_display_info *)xmalloc (sizeof (struct ns_display_info));
-  bzero (dpyinfo, sizeof (struct ns_display_info));
+  memset (dpyinfo, 0, sizeof (struct ns_display_info));
 
   ns_initialize_display_info (dpyinfo);
   terminal = ns_create_terminal (dpyinfo);
@@ -4894,16 +4894,16 @@
   rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (emacsframe, frameSize.height
 #ifdef NS_IMPL_GNUSTEP
       - FRAME_NS_TITLEBAR_HEIGHT (emacsframe) + 3
-        - FRAME_NS_TOOLBAR_HEIGHT (emacsframe));
+        - FRAME_TOOLBAR_HEIGHT (emacsframe));
 #else
       - FRAME_NS_TITLEBAR_HEIGHT (emacsframe)
-        - FRAME_NS_TOOLBAR_HEIGHT (emacsframe));
+        - FRAME_TOOLBAR_HEIGHT (emacsframe));
 #endif
   if (rows < MINHEIGHT)
     rows = MINHEIGHT;
   frameSize.height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (emacsframe, rows)
                        + FRAME_NS_TITLEBAR_HEIGHT (emacsframe)
-                       + FRAME_NS_TOOLBAR_HEIGHT (emacsframe);
+                       + FRAME_TOOLBAR_HEIGHT (emacsframe);
 #ifdef NS_IMPL_COCOA
   {
     /* this sets window title to have size in it; the wm does this under GS */
@@ -5114,7 +5114,7 @@
   [toggleButton setTarget: self];
   [toggleButton setAction: @selector (toggleToolbar: )];
 #endif
-  FRAME_NS_TOOLBAR_HEIGHT (f) = 0;
+  FRAME_TOOLBAR_HEIGHT (f) = 0;
 
   tem = f->icon_name;
   if (!NILP (tem))
--- a/src/prefix-args.c	Thu Jul 08 16:56:21 2010 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/* prefix-args.c - echo each argument, prefixed by a string.
-   Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-                 2008, 2009, 2010  Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* Jim Blandy <jimb@occs.cs.oberlin.edu> - September 1992
-
-   When using GCC 2 as the linker in the build process, options
-   intended for the linker need to be prefixed with the "-Xlinker"
-   option.  If an option takes an argument, we need to use -Xlinker
-   twice - once for the option and once for its argument.  For
-   example, to run the linker with the options "-Bstatic" "-e"
-   "_start", you'd need to pass the following options to GCC:
-
-   -Xlinker -Bstatic -Xlinker -e -Xlinker _start.
-
-   The Emacs makefile used to use a Bourne Shell `for' loop to prefix
-   each linker option with "-Xlinker", but 1) the for loop was hairier
-   than one might hope because it had to work when there were no
-   arguments to pass to the linker - the shell barfs on a loop like
-   this:
-
-       for arg in ; do echo -Xlinker "$arg"; done
-
-   and 2) the whole compilation command containing this loop seems to
-   exit with a non-zero status and halt the build under Ultrix.
-
-   If I can't write a completely portable program to do this in C,
-   I'm quitting and taking up gardening.  */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if STDC_HEADERS
-# include <stdlib.h>		/* for proper declaration of `exit' */
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main (argc, argv)
-     int argc;
-     char **argv;
-{
-  char *progname;
-  char *prefix;
-
-  progname = argv[0];
-  argc--, argv++;
-
-  if (argc < 1)
-    {
-      fprintf (stderr, "Usage: %s PREFIX ARGS...\n\
-Echo each ARG preceded by PREFIX and a space.\n", progname);
-      exit (2);
-    }
-
-  prefix = argv[0];
-  argc--, argv++;
-
-  for (; argc > 0; argc--, argv++)
-    printf ("%s %s%c", prefix, argv[0], (argc > 1) ? ' ' : '\n');
-
-  exit (0);
-}
-
-/* arch-tag: 08136d70-e5c0-49c7-bcd8-b4850233977a
-   (do not change this comment) */
--- a/src/print.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/print.c	Thu Jul 08 17:09:35 2010 +0900
@@ -168,7 +168,7 @@
 
 extern int minibuffer_auto_raise;
 
-void print_interval ();
+void print_interval (INTERVAL interval, Lisp_Object printcharfun);
 
 /* GDB resets this to zero on W32 to disable OutputDebugString calls.  */
 int print_output_debug_flag = 1;
@@ -287,10 +287,9 @@
    when there is a recursive call to print.  */
 
 static Lisp_Object
-print_unwind (saved_text)
-     Lisp_Object saved_text;
+print_unwind (Lisp_Object saved_text)
 {
-  bcopy (SDATA (saved_text), print_buffer, SCHARS (saved_text));
+  memcpy (print_buffer, SDATA (saved_text), SCHARS (saved_text));
   return Qnil;
 }
 
@@ -301,9 +300,7 @@
    argument.  */
 
 static void
-printchar (ch, fun)
-     unsigned int ch;
-     Lisp_Object fun;
+printchar (unsigned int ch, Lisp_Object fun)
 {
   if (!NILP (fun) && !EQ (fun, Qt))
     call1 (fun, make_number (ch));
@@ -319,7 +316,7 @@
 	  if (print_buffer_pos_byte + len >= print_buffer_size)
 	    print_buffer = (char *) xrealloc (print_buffer,
 					      print_buffer_size *= 2);
-	  bcopy (str, print_buffer + print_buffer_pos_byte, len);
+	  memcpy (print_buffer + print_buffer_pos_byte, str, len);
 	  print_buffer_pos += 1;
 	  print_buffer_pos_byte += len;
 	}
@@ -353,11 +350,8 @@
    to data in a Lisp string.  Otherwise that is not safe.  */
 
 static void
-strout (ptr, size, size_byte, printcharfun, multibyte)
-     char *ptr;
-     int size, size_byte;
-     Lisp_Object printcharfun;
-     int multibyte;
+strout (const char *ptr, int size, int size_byte, Lisp_Object printcharfun,
+	int multibyte)
 {
   if (size < 0)
     size_byte = size = strlen (ptr);
@@ -370,7 +364,7 @@
 	  print_buffer = (char *) xrealloc (print_buffer,
 					    print_buffer_size);
 	}
-      bcopy (ptr, print_buffer + print_buffer_pos_byte, size_byte);
+      memcpy (print_buffer + print_buffer_pos_byte, ptr, size_byte);
       print_buffer_pos += size;
       print_buffer_pos_byte += size_byte;
     }
@@ -440,9 +434,7 @@
    because printing one char can relocate.  */
 
 static void
-print_string (string, printcharfun)
-     Lisp_Object string;
-     Lisp_Object printcharfun;
+print_string (Lisp_Object string, Lisp_Object printcharfun)
 {
   if (EQ (printcharfun, Qt) || NILP (printcharfun))
     {
@@ -469,7 +461,7 @@
 	  if (chars < bytes)
 	    {
 	      newstr = make_uninit_multibyte_string (chars, bytes);
-	      bcopy (SDATA (string), SDATA (newstr), chars);
+	      memcpy (SDATA (newstr), SDATA (string), chars);
 	      str_to_multibyte (SDATA (newstr), bytes, chars);
 	      string = newstr;
 	    }
@@ -488,7 +480,7 @@
 	  USE_SAFE_ALLOCA;
 
 	  SAFE_ALLOCA (buffer, char *, nbytes);
-	  bcopy (SDATA (string), buffer, nbytes);
+	  memcpy (buffer, SDATA (string), nbytes);
 
 	  strout (buffer, chars, SBYTES (string),
 		  printcharfun, STRING_MULTIBYTE (string));
@@ -549,9 +541,7 @@
    Do not use this on the contents of a Lisp string.  */
 
 void
-write_string (data, size)
-     char *data;
-     int size;
+write_string (char *data, int size)
 {
   PRINTDECLARE;
   Lisp_Object printcharfun;
@@ -568,10 +558,7 @@
    Do not use this on the contents of a Lisp string.  */
 
 void
-write_string_1 (data, size, printcharfun)
-     char *data;
-     int size;
-     Lisp_Object printcharfun;
+write_string_1 (char *data, int size, Lisp_Object printcharfun)
 {
   PRINTDECLARE;
 
@@ -582,8 +569,7 @@
 
 
 void
-temp_output_buffer_setup (bufname)
-    const char *bufname;
+temp_output_buffer_setup (const char *bufname)
 {
   int count = SPECPDL_INDEX ();
   register struct buffer *old = current_buffer;
@@ -616,10 +602,7 @@
 }
 
 Lisp_Object
-internal_with_output_to_temp_buffer (bufname, function, args)
-     const char *bufname;
-     Lisp_Object (*function) P_ ((Lisp_Object));
-     Lisp_Object args;
+internal_with_output_to_temp_buffer (const char *bufname, Lisp_Object (*function) (Lisp_Object), Lisp_Object args)
 {
   int count = SPECPDL_INDEX ();
   Lisp_Object buf, val;
@@ -695,10 +678,10 @@
 }
 
 
-static void print ();
-static void print_preprocess ();
-static void print_preprocess_string ();
-static void print_object ();
+static void print (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag);
+static void print_preprocess (Lisp_Object obj);
+static void print_preprocess_string (INTERVAL interval, Lisp_Object arg);
+static void print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag);
 
 DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0,
        doc: /* Output a newline to stream PRINTCHARFUN.
@@ -919,8 +902,7 @@
    print_output_debug_flag from being optimized away.  */
 
 void
-debug_output_compilation_hack (x)
-     int x;
+debug_output_compilation_hack (int x)
 {
   print_output_debug_flag = x;
 }
@@ -974,16 +956,14 @@
 /* This is the interface for debugging printing.  */
 
 void
-debug_print (arg)
-     Lisp_Object arg;
+debug_print (Lisp_Object arg)
 {
   Fprin1 (arg, Qexternal_debugging_output);
   fprintf (stderr, "\r\n");
 }
 
 void
-safe_debug_print (arg)
-     Lisp_Object arg;
+safe_debug_print (Lisp_Object arg)
 {
   int valid = valid_lisp_object_p (arg);
 
@@ -1037,10 +1017,7 @@
    CALLER is the Lisp function inside which the error was signaled.  */
 
 void
-print_error_message (data, stream, context, caller)
-     Lisp_Object data, stream;
-     char *context;
-     Lisp_Object caller;
+print_error_message (Lisp_Object data, Lisp_Object stream, char *context, Lisp_Object caller)
 {
   Lisp_Object errname, errmsg, file_error, tail;
   struct gcpro gcpro1;
@@ -1055,7 +1032,7 @@
     {
       Lisp_Object cname = SYMBOL_NAME (caller);
       char *name = alloca (SBYTES (cname));
-      bcopy (SDATA (cname), name, SBYTES (cname));
+      memcpy (name, SDATA (cname), SBYTES (cname));
       message_dolog (name, SBYTES (cname), 0, 0);
       message_dolog (": ", 2, 0, 0);
     }
@@ -1125,9 +1102,7 @@
  */
 
 void
-float_to_string (buf, data)
-     unsigned char *buf;
-     double data;
+float_to_string (unsigned char *buf, double data)
 {
   unsigned char *cp;
   int width;
@@ -1250,10 +1225,7 @@
 
 
 static void
-print (obj, printcharfun, escapeflag)
-     Lisp_Object obj;
-     register Lisp_Object printcharfun;
-     int escapeflag;
+print (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag)
 {
   new_backquote_output = 0;
 
@@ -1312,8 +1284,7 @@
    The status fields of Vprint_number_table mean whether each object appears
    more than once in OBJ: Qnil at the first time, and Qt after that .  */
 static void
-print_preprocess (obj)
-     Lisp_Object obj;
+print_preprocess (Lisp_Object obj)
 {
   int i;
   EMACS_INT size;
@@ -1433,9 +1404,7 @@
 }
 
 static void
-print_preprocess_string (interval, arg)
-     INTERVAL interval;
-     Lisp_Object arg;
+print_preprocess_string (INTERVAL interval, Lisp_Object arg)
 {
   print_preprocess (interval->plist);
 }
@@ -1445,7 +1414,7 @@
 Lisp_Object Vprint_charset_text_property;
 extern Lisp_Object Qdefault;
 
-static void print_check_string_charset_prop ();
+static void print_check_string_charset_prop (INTERVAL interval, Lisp_Object string);
 
 #define PRINT_STRING_NON_CHARSET_FOUND 1
 #define PRINT_STRING_UNSAFE_CHARSET_FOUND 2
@@ -1454,9 +1423,7 @@
 static int print_check_string_result;
 
 static void
-print_check_string_charset_prop (interval, string)
-     INTERVAL interval;
-     Lisp_Object string;
+print_check_string_charset_prop (INTERVAL interval, Lisp_Object string)
 {
   Lisp_Object val;
 
@@ -1503,8 +1470,7 @@
 static Lisp_Object print_prune_charset_plist;
 
 static Lisp_Object
-print_prune_string_charset (string)
-     Lisp_Object string;
+print_prune_string_charset (Lisp_Object string)
 {
   print_check_string_result = 0;
   traverse_intervals (STRING_INTERVALS (string), 0,
@@ -1528,10 +1494,7 @@
 }
 
 static void
-print_object (obj, printcharfun, escapeflag)
-     Lisp_Object obj;
-     register Lisp_Object printcharfun;
-     int escapeflag;
+print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag)
 {
   char buf[40];
 
@@ -2307,9 +2270,7 @@
    This is part of printing a string that has text properties.  */
 
 void
-print_interval (interval, printcharfun)
-     INTERVAL interval;
-     Lisp_Object printcharfun;
+print_interval (INTERVAL interval, Lisp_Object printcharfun)
 {
   if (NILP (interval->plist))
     return;
@@ -2324,7 +2285,7 @@
 
 
 void
-syms_of_print ()
+syms_of_print (void)
 {
   Qtemp_buffer_setup_hook = intern_c_string ("temp-buffer-setup-hook");
   staticpro (&Qtemp_buffer_setup_hook);
--- a/src/process.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/process.c	Thu Jul 08 17:09:35 2010 +0900
@@ -182,7 +182,7 @@
 
 #include "syswait.h"
 
-extern char *get_operating_system_release ();
+extern char *get_operating_system_release (void);
 
 /* Serial processes require termios or Windows.  */
 #if defined (HAVE_TERMIOS) || defined (WINDOWSNT)
@@ -285,11 +285,11 @@
 
 #include "sysselect.h"
 
-static int keyboard_bit_set P_ ((SELECT_TYPE *));
-static void deactivate_process P_ ((Lisp_Object));
-static void status_notify P_ ((struct Lisp_Process *));
-static int read_process_output P_ ((Lisp_Object, int));
-static void create_pty P_ ((Lisp_Object));
+static int keyboard_bit_set (SELECT_TYPE *);
+static void deactivate_process (Lisp_Object);
+static void status_notify (struct Lisp_Process *);
+static int read_process_output (Lisp_Object, int);
+static void create_pty (Lisp_Object);
 
 /* If we support a window system, turn on the code to poll periodically
    to detect C-g.  It isn't actually used when doing interrupt input.  */
@@ -297,8 +297,8 @@
 #define POLL_FOR_INPUT
 #endif
 
-static Lisp_Object get_process ();
-static void exec_sentinel ();
+static Lisp_Object get_process (register Lisp_Object name);
+static void exec_sentinel (Lisp_Object proc, Lisp_Object reason);
 
 extern int timers_run;
 
@@ -306,6 +306,10 @@
 
 static SELECT_TYPE input_wait_mask;
 
+/* Non-zero if keyboard input is on hold, zero otherwise.  */
+
+static int kbd_is_on_hold;
+
 /* Mask that excludes keyboard input descriptor(s).  */
 
 static SELECT_TYPE non_keyboard_wait_mask;
@@ -399,8 +403,7 @@
 static Lisp_Object status_convert (int);
 
 static void
-update_status (p)
-     struct Lisp_Process *p;
+update_status (struct Lisp_Process *p)
 {
   eassert (p->raw_status_new);
   p->status = status_convert (p->raw_status);
@@ -429,11 +432,7 @@
    and store them individually through the three pointers.  */
 
 static void
-decode_status (l, symbol, code, coredump)
-     Lisp_Object l;
-     Lisp_Object *symbol;
-     int *code;
-     int *coredump;
+decode_status (Lisp_Object l, Lisp_Object *symbol, int *code, int *coredump)
 {
   Lisp_Object tem;
 
@@ -456,8 +455,7 @@
 /* Return a string describing a process status list.  */
 
 static Lisp_Object
-status_message (p)
-     struct Lisp_Process *p;
+status_message (struct Lisp_Process *p)
 {
   Lisp_Object status = p->status;
   Lisp_Object symbol;
@@ -519,7 +517,7 @@
    is left in the variable pty_name.  */
 
 static int
-allocate_pty ()
+allocate_pty (void)
 {
   register int c, i;
   int fd;
@@ -593,8 +591,7 @@
 #endif /* HAVE_PTYS */
 
 static Lisp_Object
-make_process (name)
-     Lisp_Object name;
+make_process (Lisp_Object name)
 {
   register Lisp_Object val, tem, name1;
   register struct Lisp_Process *p;
@@ -638,8 +635,7 @@
 }
 
 static void
-remove_process (proc)
-     register Lisp_Object proc;
+remove_process (register Lisp_Object proc)
 {
   register Lisp_Object pair;
 
@@ -652,8 +648,7 @@
 /* Setup coding systems of PROCESS.  */
 
 void
-setup_process_coding_systems (process)
-     Lisp_Object process;
+setup_process_coding_systems (Lisp_Object process)
 {
   struct Lisp_Process *p = XPROCESS (process);
   int inch = p->infd;
@@ -729,8 +724,7 @@
    current buffer.  */
 
 static Lisp_Object
-get_process (name)
-     register Lisp_Object name;
+get_process (register Lisp_Object name)
 {
   register Lisp_Object proc, obj;
   if (STRINGP (name))
@@ -1161,7 +1155,7 @@
 }
 
 #ifdef DATAGRAM_SOCKETS
-Lisp_Object Fprocess_datagram_address ();
+Lisp_Object Fprocess_datagram_address (Lisp_Object process);
 #endif
 
 DEFUN ("process-contact", Fprocess_contact, Sprocess_contact,
@@ -1327,8 +1321,7 @@
 #endif
 
 static Lisp_Object
-list_processes_1 (query_only)
-     Lisp_Object query_only;
+list_processes_1 (Lisp_Object query_only)
 {
   register Lisp_Object tail, tem;
   Lisp_Object proc, minspace, tem1;
@@ -1579,7 +1572,7 @@
 
 /* Starting asynchronous inferior processes.  */
 
-static Lisp_Object start_process_unwind ();
+static Lisp_Object start_process_unwind (Lisp_Object proc);
 
 DEFUN ("start-process", Fstart_process, Sstart_process, 3, MANY, 0,
        doc: /* Start a program in a subprocess.  Return the process object for it.
@@ -1814,8 +1807,7 @@
    an error and the process wasn't started successfully, so we should
    remove it from the process list.  */
 static Lisp_Object
-start_process_unwind (proc)
-     Lisp_Object proc;
+start_process_unwind (Lisp_Object proc)
 {
   if (!PROCESSP (proc))
     abort ();
@@ -1828,8 +1820,7 @@
 }
 
 static void
-create_process_1 (timer)
-     struct atimer *timer;
+create_process_1 (struct atimer *timer)
 {
   /* Nothing to do.  */
 }
@@ -1855,10 +1846,7 @@
 #endif
 
 void
-create_process (process, new_argv, current_dir)
-     Lisp_Object process;
-     char **new_argv;
-     Lisp_Object current_dir;
+create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
 {
   int inchannel, outchannel;
   pid_t pid;
@@ -2245,8 +2233,7 @@
 }
 
 void
-create_pty (process)
-     Lisp_Object process;
+create_pty (Lisp_Object process)
 {
   int inchannel, outchannel;
 
@@ -2333,9 +2320,7 @@
    The address family of sa is not included in the result.  */
 
 static Lisp_Object
-conv_sockaddr_to_lisp (sa, len)
-     struct sockaddr *sa;
-     int len;
+conv_sockaddr_to_lisp (struct sockaddr *sa, int len)
 {
   Lisp_Object address;
   int i;
@@ -2404,9 +2389,7 @@
 /* Get family and required size for sockaddr structure to hold ADDRESS.  */
 
 static int
-get_lisp_to_sockaddr_size (address, familyp)
-     Lisp_Object address;
-     int *familyp;
+get_lisp_to_sockaddr_size (Lisp_Object address, int *familyp)
 {
   register struct Lisp_Vector *p;
 
@@ -2451,17 +2434,13 @@
    we return after zeroing *SA.  */
 
 static void
-conv_lisp_to_sockaddr (family, address, sa, len)
-     int family;
-     Lisp_Object address;
-     struct sockaddr *sa;
-     int len;
+conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int len)
 {
   register struct Lisp_Vector *p;
   register unsigned char *cp = NULL;
   register int i;
 
-  bzero (sa, len);
+  memset (sa, 0, len);
 
   if (VECTORP (address))
     {
@@ -2612,9 +2591,7 @@
 */
 
 static int
-set_socket_option (s, opt, val)
-     int s;
-     Lisp_Object opt, val;
+set_socket_option (int s, Lisp_Object opt, Lisp_Object val)
 {
   char *name;
   const struct socket_options *sopt;
@@ -2658,12 +2635,12 @@
 	/* This is broken, at least in the Linux 2.4 kernel.
 	   To unbind, the arg must be a zero integer, not the empty string.
 	   This should work on all systems.   KFS. 2003-09-23.  */
-	bzero (devname, sizeof devname);
+	memset (devname, 0, sizeof devname);
 	if (STRINGP (val))
 	  {
 	    char *arg = (char *) SDATA (val);
 	    int len = min (strlen (arg), IFNAMSIZ);
-	    bcopy (arg, devname, len);
+	    memcpy (devname, arg, len);
 	  }
 	else if (!NILP (val))
 	  error ("Bad option value for %s", name);
@@ -3030,7 +3007,7 @@
   p->inherit_coding_system_flag
     = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system);
 
-  Fserial_process_configure(nargs, args);
+  Fserial_process_configure (nargs, args);
 
   specpdl_ptr = specpdl + specpdl_count;
 
@@ -3372,7 +3349,7 @@
 	  host = Qnil;
 	}
       CHECK_STRING (service);
-      bzero (&address_un, sizeof address_un);
+      memset (&address_un, 0, sizeof address_un);
       address_un.sun_family = AF_LOCAL;
       strncpy (address_un.sun_path, SDATA (service), sizeof address_un.sun_path);
       ai.ai_addr = (struct sockaddr *) &address_un;
@@ -3428,7 +3405,7 @@
       ret = getaddrinfo (SDATA (host), portstring, &hints, &res);
       if (ret)
 #ifdef HAVE_GAI_STRERROR
-	error ("%s/%s %s", SDATA (host), portstring, gai_strerror(ret));
+	error ("%s/%s %s", SDATA (host), portstring, gai_strerror (ret));
 #else
 	error ("%s/%s getaddrinfo error %d", SDATA (host), portstring, ret);
 #endif
@@ -3456,7 +3433,7 @@
       port = svc_info->s_port;
     }
 
-  bzero (&address_in, sizeof address_in);
+  memset (&address_in, 0, sizeof address_in);
   address_in.sin_family = family;
   address_in.sin_addr.s_addr = INADDR_ANY;
   address_in.sin_port = port;
@@ -3480,8 +3457,8 @@
 
       if (host_info_ptr)
 	{
-	  bcopy (host_info_ptr->h_addr, (char *) &address_in.sin_addr,
-		 host_info_ptr->h_length);
+	  memcpy (&address_in.sin_addr, host_info_ptr->h_addr,
+		  host_info_ptr->h_length);
 	  family = host_info_ptr->h_addrtype;
 	  address_in.sin_family = family;
 	}
@@ -3493,8 +3470,8 @@
 	  if (numeric_addr == -1)
 	    error ("Unknown host \"%s\"", SDATA (host));
 
-	  bcopy ((char *)&numeric_addr, (char *) &address_in.sin_addr,
-		 sizeof (address_in.sin_addr));
+	  memcpy (&address_in.sin_addr, &numeric_addr,
+		  sizeof (address_in.sin_addr));
 	}
 
     }
@@ -3678,7 +3655,7 @@
 	  if (is_server)
 	    {
 	      Lisp_Object remote;
-	      bzero (datagram_address[s].sa, lres->ai_addrlen);
+	      memset (datagram_address[s].sa, 0, lres->ai_addrlen);
 	      if (remote = Fplist_get (contact, QCremote), !NILP (remote))
 		{
 		  int rfamily, rlen;
@@ -3689,7 +3666,7 @@
 		}
 	    }
 	  else
-	    bcopy (lres->ai_addr, datagram_address[s].sa, lres->ai_addrlen);
+	    memcpy (datagram_address[s].sa, lres->ai_addr, lres->ai_addrlen);
 	}
 #endif
       contact = Fplist_put (contact, QCaddress,
@@ -3701,7 +3678,7 @@
 	  int len1 = sizeof (sa1);
 	  if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0)
 	    contact = Fplist_put (contact, QClocal,
-				  conv_sockaddr_to_lisp (&sa1, len1));
+				  conv_sockaddr_to_lisp ((struct sockaddr *)&sa1, len1));
 	}
 #endif
     }
@@ -3927,7 +3904,7 @@
 
  again:
   ifaces += 25;
-  buf_size = ifaces * sizeof(ifreqs[0]);
+  buf_size = ifaces * sizeof (ifreqs[0]);
   ifreqs = (struct ifreq *)xrealloc(ifreqs, buf_size);
   if (!ifreqs)
     {
@@ -3956,7 +3933,7 @@
       char namebuf[sizeof (ifq->ifr_name) + 1];
       if (ifq->ifr_addr.sa_family != AF_INET)
 	continue;
-      bcopy (ifq->ifr_name, namebuf, sizeof (ifq->ifr_name));
+      memcpy (namebuf, ifq->ifr_name, sizeof (ifq->ifr_name));
       namebuf[sizeof (ifq->ifr_name)] = 0;
       res = Fcons (Fcons (build_string (namebuf),
 			  conv_sockaddr_to_lisp (&ifq->ifr_addr,
@@ -4059,7 +4036,7 @@
 
   CHECK_STRING (ifname);
 
-  bzero (rq.ifr_name, sizeof rq.ifr_name);
+  memset (rq.ifr_name, 0, sizeof rq.ifr_name);
   strncpy (rq.ifr_name, SDATA (ifname), sizeof (rq.ifr_name));
 
   s = socket (AF_INET, SOCK_STREAM, 0);
@@ -4154,8 +4131,7 @@
 /* Turn off input and output for process PROC.  */
 
 void
-deactivate_process (proc)
-     Lisp_Object proc;
+deactivate_process (Lisp_Object proc)
 {
   register int inchannel, outchannel;
   register struct Lisp_Process *p = XPROCESS (proc);
@@ -4220,7 +4196,7 @@
    to get rid of irrelevant descriptors.  */
 
 void
-close_process_descs ()
+close_process_descs (void)
 {
 #ifndef WINDOWSNT
   int i;
@@ -4313,9 +4289,7 @@
 static int connect_counter = 0;
 
 static void
-server_accept_connection (server, channel)
-     Lisp_Object server;
-     int channel;
+server_accept_connection (Lisp_Object server, int channel)
 {
   Lisp_Object proc, caller, name, buffer;
   Lisp_Object contact, host, service;
@@ -4392,7 +4366,7 @@
 	int i;
 	args[0] = build_string ("%x:%x:%x:%x:%x:%x:%x:%x");
 	for (i = 0; i < 8; i++)
-	  args[i+1] = make_number (ntohs(ip6[i]));
+	  args[i+1] = make_number (ntohs (ip6[i]));
 	host = Fformat (9, args);
 	service = make_number (ntohs (saddr.in.sin_port));
 
@@ -4531,8 +4505,7 @@
 static int waiting_for_user_input_p;
 
 static Lisp_Object
-wait_reading_process_output_unwind (data)
-     Lisp_Object data;
+wait_reading_process_output_unwind (Lisp_Object data)
 {
   waiting_for_user_input_p = XINT (data);
   return Qnil;
@@ -4540,7 +4513,7 @@
 
 /* This is here so breakpoints can be put on it.  */
 static void
-wait_reading_process_output_1 ()
+wait_reading_process_output_1 (void)
 {
 }
 
@@ -4553,10 +4526,7 @@
 
 #ifndef select
 static INLINE int
-select_wrapper (n, rfd, wfd, xfd, tmo)
-  int n;
-  SELECT_TYPE *rfd, *wfd, *xfd;
-  EMACS_TIME *tmo;
+select_wrapper (int n, fd_set *rfd, fd_set *wfd, fd_set *xfd, struct timeval *tmo)
 {
   return select (n, rfd, wfd, xfd, tmo);
 }
@@ -4765,7 +4735,10 @@
 	  SELECT_TYPE Ctemp;
 #endif
 
-	  Atemp = input_wait_mask;
+          if (kbd_on_hold_p ())
+            FD_ZERO (&Atemp);
+          else
+            Atemp = input_wait_mask;
 	  IF_NON_BLOCKING_CONNECT (Ctemp = connect_wait_mask);
 
 	  EMACS_SET_SECS_USECS (timeout, 0, 0);
@@ -5198,23 +5171,23 @@
 	      /* getsockopt(,,SO_ERROR,,) is said to hang on some systems.
 		 So only use it on systems where it is known to work.  */
 	      {
-		int xlen = sizeof(xerrno);
-		if (getsockopt(channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen))
+		int xlen = sizeof (xerrno);
+		if (getsockopt (channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen))
 		  xerrno = errno;
 	      }
 #else
 	      {
 		struct sockaddr pname;
-		int pnamelen = sizeof(pname);
+		int pnamelen = sizeof (pname);
 
 		/* If connection failed, getpeername will fail.  */
 		xerrno = 0;
-		if (getpeername(channel, &pname, &pnamelen) < 0)
+		if (getpeername (channel, &pname, &pnamelen) < 0)
 		  {
 		    /* Obtain connect failure code through error slippage.  */
 		    char dummy;
 		    xerrno = errno;
-		    if (errno == ENOTCONN && read(channel, &dummy, 1) < 0)
+		    if (errno == ENOTCONN && read (channel, &dummy, 1) < 0)
 		      xerrno = errno;
 		  }
 	      }
@@ -5261,15 +5234,13 @@
 /* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS.  */
 
 static Lisp_Object
-read_process_output_call (fun_and_args)
-     Lisp_Object fun_and_args;
+read_process_output_call (Lisp_Object fun_and_args)
 {
   return apply1 (XCAR (fun_and_args), XCDR (fun_and_args));
 }
 
 static Lisp_Object
-read_process_output_error_handler (error)
-     Lisp_Object error;
+read_process_output_error_handler (Lisp_Object error)
 {
   cmd_error_internal (error, "error in process filter: ");
   Vinhibit_quit = Qt;
@@ -5290,9 +5261,7 @@
    for decoding.  */
 
 static int
-read_process_output (proc, channel)
-     Lisp_Object proc;
-     register int channel;
+read_process_output (Lisp_Object proc, register int channel)
 {
   register int nbytes;
   char *chars;
@@ -5308,7 +5277,7 @@
   chars = (char *) alloca (carryover + readmax);
   if (carryover)
     /* See the comment above.  */
-    bcopy (SDATA (p->decoding_buf), chars, carryover);
+    memcpy (chars, SDATA (p->decoding_buf), carryover);
 
 #ifdef DATAGRAM_SOCKETS
   /* We have a working select, so proc_buffered_char is always -1.  */
@@ -5452,8 +5421,8 @@
 	{
 	  if (SCHARS (p->decoding_buf) < coding->carryover_bytes)
 	    p->decoding_buf = make_uninit_string (coding->carryover_bytes);
-	  bcopy (coding->carryover, SDATA (p->decoding_buf),
-		 coding->carryover_bytes);
+	  memcpy (SDATA (p->decoding_buf), coding->carryover,
+		  coding->carryover_bytes);
 	  p->decoding_carryover = coding->carryover_bytes;
 	}
       if (SBYTES (text) > 0)
@@ -5544,8 +5513,8 @@
 	{
 	  if (SCHARS (p->decoding_buf) < coding->carryover_bytes)
 	    p->decoding_buf = make_uninit_string (coding->carryover_bytes);
-	  bcopy (coding->carryover, SDATA (p->decoding_buf),
-		 coding->carryover_bytes);
+	  memcpy (SDATA (p->decoding_buf), coding->carryover,
+		  coding->carryover_bytes);
 	  p->decoding_carryover = coding->carryover_bytes;
 	}
       /* Adjust the multibyteness of TEXT to that of the buffer.  */
@@ -5618,7 +5587,7 @@
 Lisp_Object process_sent_to;
 
 SIGTYPE
-send_process_trap ()
+send_process_trap (int ignore)
 {
   SIGNAL_THREAD_CHECK (SIGPIPE);
   sigunblock (sigmask (SIGPIPE));
@@ -5636,18 +5605,15 @@
    This function can evaluate Lisp code and can garbage collect.  */
 
 static void
-send_process (proc, buf, len, object)
-     volatile Lisp_Object proc;
-     unsigned char *volatile buf;
-     volatile int len;
-     volatile Lisp_Object object;
+send_process (volatile Lisp_Object proc, unsigned char *volatile buf,
+	      volatile int len, volatile Lisp_Object object)
 {
   /* Use volatile to protect variables from being clobbered by longjmp.  */
   struct Lisp_Process *p = XPROCESS (proc);
   int rv;
   struct coding_system *coding;
   struct gcpro gcpro1;
-  SIGTYPE (*volatile old_sigpipe) ();
+  SIGTYPE (*volatile old_sigpipe) (int);
 
   GCPRO1 (object);
 
@@ -5760,7 +5726,7 @@
 	  while (this > 0)
 	    {
 	      int outfd = p->outfd;
-	      old_sigpipe = (SIGTYPE (*) ()) signal (SIGPIPE, send_process_trap);
+	      old_sigpipe = (SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap);
 #ifdef DATAGRAM_SOCKETS
 	      if (DATAGRAM_CHAN_P (outfd))
 		{
@@ -5927,8 +5893,7 @@
 /* Return the foreground process group for the tty/pty that
    the process P uses.  */
 static int
-emacs_get_tty_pgrp (p)
-     struct Lisp_Process *p;
+emacs_get_tty_pgrp (struct Lisp_Process *p)
 {
   int gid = -1;
 
@@ -5997,11 +5962,8 @@
    their uid, for which killpg would return an EPERM error.  */
 
 static void
-process_send_signal (process, signo, current_group, nomsg)
-     Lisp_Object process;
-     int signo;
-     Lisp_Object current_group;
-     int nomsg;
+process_send_signal (Lisp_Object process, int signo, Lisp_Object current_group,
+		     int nomsg)
 {
   Lisp_Object proc;
   register struct Lisp_Process *p;
@@ -6381,7 +6343,7 @@
       CHECK_SYMBOL (sigcode);
       name = SDATA (SYMBOL_NAME (sigcode));
 
-      if (!strncmp(name, "SIG", 3) || !strncmp(name, "sig", 3))
+      if (!strncmp (name, "SIG", 3) || !strncmp (name, "sig", 3))
 	name += 3;
 
       if (0)
@@ -6555,11 +6517,11 @@
       if (!proc_encode_coding_system[new_outfd])
 	proc_encode_coding_system[new_outfd]
 	  = (struct coding_system *) xmalloc (sizeof (struct coding_system));
-      bcopy (proc_encode_coding_system[old_outfd],
-	     proc_encode_coding_system[new_outfd],
-	     sizeof (struct coding_system));
-      bzero (proc_encode_coding_system[old_outfd],
-	     sizeof (struct coding_system));
+      memcpy (proc_encode_coding_system[new_outfd],
+	      proc_encode_coding_system[old_outfd],
+	      sizeof (struct coding_system));
+      memset (proc_encode_coding_system[old_outfd], 0,
+	      sizeof (struct coding_system));
 
       XPROCESS (proc)->outfd = new_outfd;
     }
@@ -6570,8 +6532,7 @@
    If `buffer' is nil, kill all processes  */
 
 void
-kill_buffer_processes (buffer)
-     Lisp_Object buffer;
+kill_buffer_processes (Lisp_Object buffer)
 {
   Lisp_Object tail, proc;
 
@@ -6616,8 +6577,7 @@
 
 #ifdef SIGCHLD
 SIGTYPE
-sigchld_handler (signo)
-     int signo;
+sigchld_handler (int signo)
 {
   int old_errno = errno;
   Lisp_Object proc;
@@ -6758,16 +6718,14 @@
 
 
 static Lisp_Object
-exec_sentinel_unwind (data)
-     Lisp_Object data;
+exec_sentinel_unwind (Lisp_Object data)
 {
   XPROCESS (XCAR (data))->sentinel = XCDR (data);
   return Qnil;
 }
 
 static Lisp_Object
-exec_sentinel_error_handler (error)
-     Lisp_Object error;
+exec_sentinel_error_handler (Lisp_Object error)
 {
   cmd_error_internal (error, "error in process sentinel: ");
   Vinhibit_quit = Qt;
@@ -6777,8 +6735,7 @@
 }
 
 static void
-exec_sentinel (proc, reason)
-     Lisp_Object proc, reason;
+exec_sentinel (Lisp_Object proc, Lisp_Object reason)
 {
   Lisp_Object sentinel, obuffer, odeactivate, okeymap;
   register struct Lisp_Process *p = XPROCESS (proc);
@@ -6863,8 +6820,7 @@
    but can be done at other times.  */
 
 static void
-status_notify (deleting_process)
-     struct Lisp_Process *deleting_process;
+status_notify (struct Lisp_Process *deleting_process)
 {
   register Lisp_Object proc, buffer;
   Lisp_Object tail, msg;
@@ -7061,11 +7017,34 @@
 
 
 
+/* Stop reading input from keyboard sources.  */
+
+void
+hold_keyboard_input (void)
+{
+  kbd_is_on_hold = 1;
+}
+
+/* Resume reading input from keyboard sources.  */
+
+void
+unhold_keyboard_input (void)
+{
+  kbd_is_on_hold = 0;
+}
+
+/* Return non-zero if keyboard input is on hold, zero otherwise.  */
+
+int
+kbd_on_hold_p (void)
+{
+  return kbd_is_on_hold;
+}
+
 /* Add DESC to the set of keyboard input descriptors.  */
 
 void
-add_keyboard_wait_descriptor (desc)
-     int desc;
+add_keyboard_wait_descriptor (int desc)
 {
   FD_SET (desc, &input_wait_mask);
   FD_SET (desc, &non_process_wait_mask);
@@ -7076,8 +7055,7 @@
 static int add_gpm_wait_descriptor_called_flag;
 
 void
-add_gpm_wait_descriptor (desc)
-     int desc;
+add_gpm_wait_descriptor (int desc)
 {
   if (! add_gpm_wait_descriptor_called_flag)
     FD_CLR (0, &input_wait_mask);
@@ -7091,8 +7069,7 @@
 /* From now on, do not expect DESC to give keyboard input.  */
 
 void
-delete_keyboard_wait_descriptor (desc)
-     int desc;
+delete_keyboard_wait_descriptor (int desc)
 {
   int fd;
   int lim = max_keyboard_desc;
@@ -7109,8 +7086,7 @@
 }
 
 void
-delete_gpm_wait_descriptor (desc)
-     int desc;
+delete_gpm_wait_descriptor (int desc)
 {
   int fd;
   int lim = max_gpm_desc;
@@ -7130,8 +7106,7 @@
    that corresponds to one of the keyboard input descriptors.  */
 
 static int
-keyboard_bit_set (mask)
-     SELECT_TYPE *mask;
+keyboard_bit_set (fd_set *mask)
 {
   int fd;
 
@@ -7215,7 +7190,7 @@
 }
 
 void
-init_process ()
+init_process (void)
 {
   register int i;
 
@@ -7259,10 +7234,10 @@
       chan_process[i] = Qnil;
       proc_buffered_char[i] = -1;
     }
-  bzero (proc_decode_coding_system, sizeof proc_decode_coding_system);
-  bzero (proc_encode_coding_system, sizeof proc_encode_coding_system);
+  memset (proc_decode_coding_system, 0, sizeof proc_decode_coding_system);
+  memset (proc_encode_coding_system, 0, sizeof proc_encode_coding_system);
 #ifdef DATAGRAM_SOCKETS
-  bzero (datagram_address, sizeof datagram_address);
+  memset (datagram_address, 0, sizeof datagram_address);
 #endif
 
 #ifdef HAVE_SOCKETS
@@ -7308,7 +7283,7 @@
      processes.  As such, we only change the default value.  */
  if (initialized)
   {
-    char *release = get_operating_system_release();
+    char *release = get_operating_system_release ();
     if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION
 				    && release[1] == '.')) {
       Vprocess_connection_type = Qnil;
@@ -7318,7 +7293,7 @@
 }
 
 void
-syms_of_process ()
+syms_of_process (void)
 {
   Qprocessp = intern_c_string ("processp");
   staticpro (&Qprocessp);
@@ -7957,6 +7932,7 @@
 void
 init_process ()
 {
+  kbd_is_on_hold = 0;
 }
 
 void
--- a/src/process.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/process.h	Thu Jul 08 17:09:35 2010 +0900
@@ -170,5 +170,9 @@
 extern Lisp_Object list_system_processes (void);
 extern Lisp_Object system_process_attributes (Lisp_Object);
 
+extern void hold_keyboard_input (void);
+extern void unhold_keyboard_input (void);
+extern int kbd_on_hold_p (void);
+
 /* arch-tag: dffedfc4-d7bc-4b58-a26f-c16155449c72
    (do not change this comment) */
--- a/src/puresize.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/puresize.h	Thu Jul 08 17:09:35 2010 +0900
@@ -72,7 +72,7 @@
   { if (PURE_P (obj))	  \
       pure_write_error (); }
 
-extern void pure_write_error P_ ((void)) NO_RETURN;
+extern void pure_write_error (void) NO_RETURN;
 
 /* Define PURE_P.  */
 
--- a/src/ralloc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/ralloc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -37,14 +37,9 @@
 typedef POINTER_TYPE *POINTER;
 typedef size_t SIZE;
 
-/* Declared in dispnew.c, this version doesn't screw up if regions
-   overlap.  */
-
-extern void safe_bcopy ();
-
 #ifdef DOUG_LEA_MALLOC
 #define M_TOP_PAD           -2
-extern int mallopt ();
+extern int mallopt (int, int);
 #else /* not DOUG_LEA_MALLOC */
 #ifndef SYSTEM_MALLOC
 extern size_t __malloc_extra_blocks;
@@ -61,9 +56,6 @@
 #include <unistd.h>
 #include <malloc.h>
 
-#define safe_bcopy(x, y, z) memmove (y, x, z)
-#define bzero(x, len) memset (x, 0, len)
-
 #endif	/* not emacs */
 
 
@@ -81,7 +73,7 @@
 
 static int r_alloc_initialized = 0;
 
-static void r_alloc_init ();
+static void r_alloc_init (void);
 
 
 /* Declarations for working with the malloc, ralloc, and system breaks.  */
@@ -210,8 +202,7 @@
 /* Find the heap that ADDRESS falls within.  */
 
 static heap_ptr
-find_heap (address)
-    POINTER address;
+find_heap (POINTER address)
 {
   heap_ptr heap;
 
@@ -243,9 +234,7 @@
    allocate the memory.  */
 
 static POINTER
-obtain (address, size)
-    POINTER address;
-    SIZE size;
+obtain (POINTER address, SIZE size)
 {
   heap_ptr heap;
   SIZE already_available;
@@ -326,7 +315,7 @@
    it can also eliminate the last heap entirely.  */
 
 static void
-relinquish ()
+relinquish (void)
 {
   register heap_ptr h;
   long excess = 0;
@@ -385,7 +374,7 @@
    above where malloc gets space.  */
 
 long
-r_alloc_size_in_use ()
+r_alloc_size_in_use (void)
 {
   return (char *) break_value - (char *) virtual_break_value;
 }
@@ -396,8 +385,7 @@
    to that block.  */
 
 static bloc_ptr
-find_bloc (ptr)
-     POINTER *ptr;
+find_bloc (POINTER *ptr)
 {
   register bloc_ptr p = first_bloc;
 
@@ -422,8 +410,7 @@
    memory for the new block.  */
 
 static bloc_ptr
-get_bloc (size)
-     SIZE size;
+get_bloc (SIZE size)
 {
   register bloc_ptr new_bloc;
   register heap_ptr heap;
@@ -478,10 +465,7 @@
    Do not touch the contents of blocs or break_value.  */
 
 static int
-relocate_blocs (bloc, heap, address)
-    bloc_ptr bloc;
-    heap_ptr heap;
-    POINTER address;
+relocate_blocs (bloc_ptr bloc, heap_ptr heap, POINTER address)
 {
   register bloc_ptr b = bloc;
 
@@ -541,8 +525,7 @@
    before that of BEFORE.  */
 
 static void
-reorder_bloc (bloc, before)
-     bloc_ptr bloc, before;
+reorder_bloc (bloc_ptr bloc, bloc_ptr before)
 {
   bloc_ptr prev, next;
 
@@ -570,9 +553,7 @@
    with heap HEAP and bloc BLOC.  */
 
 static void
-update_heap_bloc_correspondence (bloc, heap)
-     bloc_ptr bloc;
-     heap_ptr heap;
+update_heap_bloc_correspondence (bloc_ptr bloc, heap_ptr heap)
 {
   register bloc_ptr b;
 
@@ -634,9 +615,7 @@
    that come after BLOC in memory.  */
 
 static int
-resize_bloc (bloc, size)
-    bloc_ptr bloc;
-    SIZE size;
+resize_bloc (bloc_ptr bloc, SIZE size)
 {
   register bloc_ptr b;
   heap_ptr heap;
@@ -689,7 +668,7 @@
             }
 	  else
 	    {
-	      safe_bcopy (b->data, b->new_data, b->size);
+	      memmove (b->new_data, b->data, b->size);
 	      *b->variable = b->data = b->new_data;
             }
 	}
@@ -700,8 +679,8 @@
 	}
       else
 	{
-	  safe_bcopy (bloc->data, bloc->new_data, old_size);
-	  bzero ((char *) bloc->new_data + old_size, size - old_size);
+	  memmove (bloc->new_data, bloc->data, old_size);
+	  memset (bloc->new_data + old_size, 0, size - old_size);
 	  *bloc->variable = bloc->data = bloc->new_data;
 	}
     }
@@ -716,7 +695,7 @@
             }
 	  else
 	    {
-	      safe_bcopy (b->data, b->new_data, b->size);
+	      memmove (b->new_data, b->data, b->size);
 	      *b->variable = b->data = b->new_data;
 	    }
 	}
@@ -733,8 +712,7 @@
    This may return space to the system.  */
 
 static void
-free_bloc (bloc)
-     bloc_ptr bloc;
+free_bloc (bloc_ptr bloc)
 {
   heap_ptr heap = bloc->heap;
 
@@ -800,8 +778,7 @@
    GNU malloc package.  */
 
 POINTER
-r_alloc_sbrk (size)
-     long size;
+r_alloc_sbrk (long int size)
 {
   register bloc_ptr b;
   POINTER address;
@@ -871,7 +848,7 @@
 	     header.  */
 	  for (b = last_bloc; b != NIL_BLOC; b = b->prev)
 	    {
-	      safe_bcopy (b->data, b->new_data, b->size);
+	      memmove (b->new_data, b->data, b->size);
 	      *b->variable = b->data = b->new_data;
 	    }
 
@@ -898,7 +875,7 @@
 	    last_heap = first_heap;
 	}
 
-      bzero (address, size);
+      memset (address, 0, size);
     }
   else /* size < 0 */
     {
@@ -917,7 +894,7 @@
 
 	  for (b = first_bloc; b != NIL_BLOC; b = b->next)
 	    {
-	      safe_bcopy (b->data, b->new_data, b->size);
+	      memmove (b->new_data, b->data, b->size);
 	      *b->variable = b->data = b->new_data;
 	    }
 	}
@@ -952,9 +929,7 @@
    return zero.  */
 
 POINTER
-r_alloc (ptr, size)
-     POINTER *ptr;
-     SIZE size;
+r_alloc (POINTER *ptr, SIZE size)
 {
   register bloc_ptr new_bloc;
 
@@ -977,8 +952,7 @@
    Store 0 in *PTR to show there's no block allocated.  */
 
 void
-r_alloc_free (ptr)
-     register POINTER *ptr;
+r_alloc_free (register POINTER *ptr)
 {
   register bloc_ptr dead_bloc;
 
@@ -1012,9 +986,7 @@
    return zero.  */
 
 POINTER
-r_re_alloc (ptr, size)
-     POINTER *ptr;
-     SIZE size;
+r_re_alloc (POINTER *ptr, SIZE size)
 {
   register bloc_ptr bloc;
 
@@ -1075,8 +1047,7 @@
    malloc must return a null pointer.  */
 
 void
-r_alloc_freeze (size)
-     long size;
+r_alloc_freeze (long int size)
 {
   if (! r_alloc_initialized)
     r_alloc_init ();
@@ -1093,7 +1064,7 @@
 }
 
 void
-r_alloc_thaw ()
+r_alloc_thaw (void)
 {
 
   if (! r_alloc_initialized)
@@ -1103,7 +1074,7 @@
     abort ();
 
   /* This frees all unused blocs.  It is not too inefficient, as the resize
-     and bcopy is done only once.  Afterwards, all unreferenced blocs are
+     and memcpy is done only once.  Afterwards, all unreferenced blocs are
      already shrunk to zero size.  */
   if (!r_alloc_freeze_level)
     {
@@ -1122,7 +1093,7 @@
 /* Reinitialize the morecore hook variables after restarting a dumped
    Emacs.  This is needed when using Doug Lea's malloc from GNU libc.  */
 void
-r_alloc_reinit ()
+r_alloc_reinit (void)
 {
   /* Only do this if the hook has been reset, so that we don't get an
      infinite loop, in case Emacs was linked statically.  */
@@ -1235,8 +1206,7 @@
    is checked to ensure that memory corruption does not occur due to
    misuse.  */
 void
-r_alloc_reset_variable (old, new)
-     POINTER *old, *new;
+r_alloc_reset_variable (POINTER *old, POINTER *new)
 {
   bloc_ptr bloc = first_bloc;
 
@@ -1266,7 +1236,7 @@
 /* Initialize various things for memory allocation.  */
 
 static void
-r_alloc_init ()
+r_alloc_init (void)
 {
   if (r_alloc_initialized)
     return;
@@ -1314,8 +1284,8 @@
      even though it is after the sbrk value.  */
   /* Doubly true, with the additional call that explicitly adds the
      rest of that page to the address space.  */
-  bzero (first_heap->start,
-	 (char *) first_heap->end - (char *) first_heap->start);
+  memset (first_heap->start, 0,
+	  (char *) first_heap->end - (char *) first_heap->start);
   virtual_break_value = break_value = first_heap->bloc_start = first_heap->end;
 #endif
 
--- a/src/regex.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/regex.c	Thu Jul 08 17:09:35 2010 +0900
@@ -248,37 +248,16 @@
 # endif
 # define realloc xrealloc
 
-/* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.
-   If nothing else has been done, use the method below.  */
-# ifdef INHIBIT_STRING_HEADER
-#  if !(defined HAVE_BZERO && defined HAVE_BCOPY)
-#   if !defined bzero && !defined bcopy
-#    undef INHIBIT_STRING_HEADER
-#   endif
+/* This is the normal way of making sure we have memcpy, memcmp and memset.  */
+# if defined HAVE_STRING_H || defined STDC_HEADERS || defined _LIBC
+#  include <string.h>
+# else
+#  include <strings.h>
+#  ifndef memcmp
+#   define memcmp(s1, s2, n)	bcmp (s1, s2, n)
 #  endif
-# endif
-
-/* This is the normal way of making sure we have memcpy, memcmp and bzero.
-   This is used in most programs--a few other programs avoid this
-   by defining INHIBIT_STRING_HEADER.  */
-# ifndef INHIBIT_STRING_HEADER
-#  if defined HAVE_STRING_H || defined STDC_HEADERS || defined _LIBC
-#   include <string.h>
-#   ifndef bzero
-#    ifndef _LIBC
-#     define bzero(s, n)	(memset (s, '\0', n), (s))
-#    else
-#     define bzero(s, n)	__bzero (s, n)
-#    endif
-#   endif
-#  else
-#   include <strings.h>
-#   ifndef memcmp
-#    define memcmp(s1, s2, n)	bcmp (s1, s2, n)
-#   endif
-#   ifndef memcpy
-#    define memcpy(d, s, n)	(bcopy (s, d, n), (d))
-#   endif
+#  ifndef memcpy
+#   define memcpy(d, s, n)	(bcopy (s, d, n), (d))
 #  endif
 # endif
 
@@ -464,7 +443,7 @@
    if (done)
      return;
 
-   bzero (re_syntax_table, sizeof re_syntax_table);
+   memset (re_syntax_table, 0, sizeof re_syntax_table);
 
    for (c = 0; c < CHAR_SET_SIZE; ++c)
      if (ISALNUM (c))
@@ -1321,8 +1300,7 @@
    defined in regex.h.  We return the old syntax.  */
 
 reg_syntax_t
-re_set_syntax (syntax)
-     reg_syntax_t syntax;
+re_set_syntax (reg_syntax_t syntax)
 {
   reg_syntax_t ret = re_syntax_options;
 
@@ -1335,8 +1313,7 @@
 static re_char *whitespace_regexp;
 
 void
-re_set_whitespace_regexp (regexp)
-     const char *regexp;
+re_set_whitespace_regexp (const char *regexp)
 {
   whitespace_regexp = (re_char *) regexp;
 }
@@ -2149,8 +2126,7 @@
 
 /* Map a string to the char class it names (if any).  */
 re_wctype_t
-re_wctype (str)
-     re_char *str;
+re_wctype (const re_char *str)
 {
   const char *string = str;
   if      (STREQ (string, "alnum"))	return RECC_ALNUM;
@@ -2175,9 +2151,7 @@
 
 /* True if CH is in the char class CC.  */
 boolean
-re_iswctype (ch, cc)
-     int ch;
-     re_wctype_t cc;
+re_iswctype (int ch, re_wctype_t cc)
 {
   switch (cc)
     {
@@ -2207,8 +2181,7 @@
 /* Return a bit-pattern to use in the range-table bits to match multibyte
    chars of class CC.  */
 static int
-re_wctype_to_bit (cc)
-     re_wctype_t cc;
+re_wctype_to_bit (re_wctype_t cc)
 {
   switch (cc)
     {
@@ -2232,8 +2205,7 @@
 /* Actually extend the space in WORK_AREA.  */
 
 static void
-extend_range_table_work_area (work_area)
-     struct range_table_work_area *work_area;
+extend_range_table_work_area (struct range_table_work_area *work_area)
 {
   work_area->allocated += 16 * sizeof (int);
   if (work_area->table)
@@ -2557,11 +2529,7 @@
   } while (0)
 
 static reg_errcode_t
-regex_compile (pattern, size, syntax, bufp)
-     re_char *pattern;
-     size_t size;
-     reg_syntax_t syntax;
-     struct re_pattern_buffer *bufp;
+regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct re_pattern_buffer *bufp)
 {
   /* We fetch characters from PATTERN here.  */
   register re_wchar_t c, c1;
@@ -2959,7 +2927,7 @@
 	    BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
 
 	    /* Clear the whole map.  */
-	    bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH);
+	    memset (b, 0, (1 << BYTEWIDTH) / BYTEWIDTH);
 
 	    /* charset_not matches newline according to a syntax bit.  */
 	    if ((re_opcode_t) b[-2] == charset_not
@@ -3875,10 +3843,7 @@
 /* Store OP at LOC followed by two-byte integer parameter ARG.  */
 
 static void
-store_op1 (op, loc, arg)
-    re_opcode_t op;
-    unsigned char *loc;
-    int arg;
+store_op1 (re_opcode_t op, unsigned char *loc, int arg)
 {
   *loc = (unsigned char) op;
   STORE_NUMBER (loc + 1, arg);
@@ -3888,10 +3853,7 @@
 /* Like `store_op1', but for two two-byte parameters ARG1 and ARG2.  */
 
 static void
-store_op2 (op, loc, arg1, arg2)
-    re_opcode_t op;
-    unsigned char *loc;
-    int arg1, arg2;
+store_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2)
 {
   *loc = (unsigned char) op;
   STORE_NUMBER (loc + 1, arg1);
@@ -3903,11 +3865,7 @@
    for OP followed by two-byte integer parameter ARG.  */
 
 static void
-insert_op1 (op, loc, arg, end)
-    re_opcode_t op;
-    unsigned char *loc;
-    int arg;
-    unsigned char *end;
+insert_op1 (re_opcode_t op, unsigned char *loc, int arg, unsigned char *end)
 {
   register unsigned char *pfrom = end;
   register unsigned char *pto = end + 3;
@@ -3922,11 +3880,7 @@
 /* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2.  */
 
 static void
-insert_op2 (op, loc, arg1, arg2, end)
-    re_opcode_t op;
-    unsigned char *loc;
-    int arg1, arg2;
-    unsigned char *end;
+insert_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2, unsigned char *end)
 {
   register unsigned char *pfrom = end;
   register unsigned char *pto = end + 5;
@@ -3943,9 +3897,7 @@
    least one character before the ^.  */
 
 static boolean
-at_begline_loc_p (pattern, p, syntax)
-    re_char *pattern, *p;
-    reg_syntax_t syntax;
+at_begline_loc_p (const re_char *pattern, const re_char *p, reg_syntax_t syntax)
 {
   re_char *prev = p - 2;
   boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
@@ -3967,9 +3919,7 @@
    at least one character after the $, i.e., `P < PEND'.  */
 
 static boolean
-at_endline_loc_p (p, pend, syntax)
-    re_char *p, *pend;
-    reg_syntax_t syntax;
+at_endline_loc_p (const re_char *p, const re_char *pend, reg_syntax_t syntax)
 {
   re_char *next = p;
   boolean next_backslash = *next == '\\';
@@ -3989,9 +3939,7 @@
    false if it's not.  */
 
 static boolean
-group_in_compile_stack (compile_stack, regnum)
-    compile_stack_type compile_stack;
-    regnum_t regnum;
+group_in_compile_stack (compile_stack_type compile_stack, regnum_t regnum)
 {
   int this_element;
 
@@ -4015,10 +3963,7 @@
    Return -1 if fastmap was not updated accurately.  */
 
 static int
-analyse_first (p, pend, fastmap, multibyte)
-     re_char *p, *pend;
-     char *fastmap;
-     const int multibyte;
+analyse_first (const re_char *p, const re_char *pend, char *fastmap, const int multibyte)
 {
   int j, k;
   boolean not;
@@ -4330,15 +4275,14 @@
    Returns 0 if we succeed, -2 if an internal error.   */
 
 int
-re_compile_fastmap (bufp)
-     struct re_pattern_buffer *bufp;
+re_compile_fastmap (struct re_pattern_buffer *bufp)
 {
   char *fastmap = bufp->fastmap;
   int analysis;
 
   assert (fastmap && bufp->buffer);
 
-  bzero (fastmap, 1 << BYTEWIDTH);  /* Assume nothing's valid.  */
+  memset (fastmap, 0, 1 << BYTEWIDTH);  /* Assume nothing's valid.  */
   bufp->fastmap_accurate = 1;	    /* It will be when we're done.  */
 
   analysis = analyse_first (bufp->buffer, bufp->buffer + bufp->used,
@@ -4361,11 +4305,7 @@
    freeing the old data.  */
 
 void
-re_set_registers (bufp, regs, num_regs, starts, ends)
-    struct re_pattern_buffer *bufp;
-    struct re_registers *regs;
-    unsigned num_regs;
-    regoff_t *starts, *ends;
+re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs, unsigned int num_regs, regoff_t *starts, regoff_t *ends)
 {
   if (num_regs)
     {
@@ -4389,11 +4329,7 @@
    doesn't let you say where to stop matching. */
 
 int
-re_search (bufp, string, size, startpos, range, regs)
-     struct re_pattern_buffer *bufp;
-     const char *string;
-     int size, startpos, range;
-     struct re_registers *regs;
+re_search (struct re_pattern_buffer *bufp, const char *string, int size, int startpos, int range, struct re_registers *regs)
 {
   return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
 		      regs, size);
@@ -4434,14 +4370,7 @@
    stack overflow).  */
 
 int
-re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
-     struct re_pattern_buffer *bufp;
-     const char *str1, *str2;
-     int size1, size2;
-     int startpos;
-     int range;
-     struct re_registers *regs;
-     int stop;
+re_search_2 (struct re_pattern_buffer *bufp, const char *str1, int size1, const char *str2, int size2, int startpos, int range, struct re_registers *regs, int stop)
 {
   int val;
   re_char *string1 = (re_char*) str1;
@@ -4775,8 +4704,7 @@
 /* If the operation is a match against one or more chars,
    return a pointer to the next operation, else return NULL.  */
 static re_char *
-skip_one_char (p)
-     re_char *p;
+skip_one_char (const re_char *p)
 {
   switch (SWITCH_ENUM_CAST (*p++))
     {
@@ -4818,8 +4746,7 @@
 
 /* Jump over non-matching operations.  */
 static re_char *
-skip_noops (p, pend)
-     re_char *p, *pend;
+skip_noops (const re_char *p, const re_char *pend)
 {
   int mcnt;
   while (p < pend)
@@ -4846,9 +4773,7 @@
 
 /* Non-zero if "p1 matches something" implies "p2 fails".  */
 static int
-mutually_exclusive_p (bufp, p1, p2)
-     struct re_pattern_buffer *bufp;
-     re_char *p1, *p2;
+mutually_exclusive_p (struct re_pattern_buffer *bufp, const re_char *p1, const re_char *p2)
 {
   re_opcode_t op2;
   const boolean multibyte = RE_MULTIBYTE_P (bufp);
@@ -5086,13 +5011,7 @@
    matched substring.  */
 
 int
-re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
-     struct re_pattern_buffer *bufp;
-     const char *string1, *string2;
-     int size1, size2;
-     int pos;
-     struct re_registers *regs;
-     int stop;
+re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int pos, struct re_registers *regs, int stop)
 {
   int result;
 
@@ -5114,13 +5033,7 @@
 /* This is a separate function so that we can force an alloca cleanup
    afterwards.  */
 static int
-re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
-     struct re_pattern_buffer *bufp;
-     re_char *string1, *string2;
-     int size1, size2;
-     int pos;
-     struct re_registers *regs;
-     int stop;
+re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int size1, const re_char *string2, int size2, int pos, struct re_registers *regs, int stop)
 {
   /* General temporaries.  */
   int mcnt;
@@ -6451,11 +6364,8 @@
    bytes; nonzero otherwise.  */
 
 static int
-bcmp_translate (s1, s2, len, translate, target_multibyte)
-     re_char *s1, *s2;
-     register int len;
-     RE_TRANSLATE_TYPE translate;
-     const int target_multibyte;
+bcmp_translate (const re_char *s1, const re_char *s2, register int len,
+		RE_TRANSLATE_TYPE translate, const int target_multibyte)
 {
   register re_char *p1 = s1, *p2 = s2;
   re_char *p1_end = s1 + len;
@@ -6496,10 +6406,7 @@
    We call regex_compile to do the actual compilation.  */
 
 const char *
-re_compile_pattern (pattern, length, bufp)
-     const char *pattern;
-     size_t length;
-     struct re_pattern_buffer *bufp;
+re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *bufp)
 {
   reg_errcode_t ret;
 
--- a/src/region-cache.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/region-cache.c	Thu Jul 08 17:09:35 2010 +0900
@@ -122,13 +122,13 @@
    preserve that information, instead of throwing it away.  */
 #define PRESERVE_THRESHOLD (500)
 
-static void revalidate_region_cache ();
+static void revalidate_region_cache (struct buffer *buf, struct region_cache *c);
 
 
 /* Interface: Allocating, initializing, and disposing of region caches.  */
 
 struct region_cache *
-new_region_cache ()
+new_region_cache (void)
 {
   struct region_cache *c
     = (struct region_cache *) xmalloc (sizeof (struct region_cache));
@@ -156,8 +156,7 @@
 }
 
 void
-free_region_cache (c)
-     struct region_cache *c;
+free_region_cache (struct region_cache *c)
 {
   xfree (c->boundaries);
   xfree (c);
@@ -174,9 +173,7 @@
    entries.  It would be nice if it took advantage of locality of
    reference, too, by searching entries near the last entry found.  */
 static int
-find_cache_boundary (c, pos)
-     struct region_cache *c;
-     int pos;
+find_cache_boundary (struct region_cache *c, int pos)
 {
   int low = 0, high = c->cache_len;
 
@@ -210,10 +207,7 @@
 /* Move the gap of cache C to index POS, and make sure it has space
    for at least MIN_SIZE boundaries.  */
 static void
-move_cache_gap (c, pos, min_size)
-     struct region_cache *c;
-     int pos;
-     int min_size;
+move_cache_gap (struct region_cache *c, int pos, int min_size)
 {
   /* Copy these out of the cache and into registers.  */
   int gap_start = c->gap_start;
@@ -298,10 +292,7 @@
 /* Insert a new boundary in cache C; it will have cache index INDEX,
    and have the specified POS and VALUE.  */
 static void
-insert_cache_boundary (c, index, pos, value)
-     struct region_cache *c;
-     int index;
-     int pos, value;
+insert_cache_boundary (struct region_cache *c, int index, int pos, int value)
 {
   /* index must be a valid cache index.  */
   if (index < 0 || index > c->cache_len)
@@ -337,9 +328,7 @@
 /* Delete the i'th entry from cache C if START <= i < END.  */
 
 static void
-delete_cache_boundaries (c, start, end)
-     struct region_cache *c;
-     int start, end;
+delete_cache_boundaries (struct region_cache *c, int start, int end)
 {
   int len = end - start;
 
@@ -391,10 +380,7 @@
 
 /* Set the value in cache C for the region START..END to VALUE.  */
 static void
-set_cache_region (c, start, end, value)
-     struct region_cache *c;
-     int start, end;
-     int value;
+set_cache_region (struct region_cache *c, int start, int end, int value)
 {
   if (start > end)
     abort ();
@@ -495,10 +481,7 @@
    buffer positions in the presence of insertions and deletions; the
    args to pass are the same before and after such an operation.)  */
 void
-invalidate_region_cache (buf, c, head, tail)
-     struct buffer *buf;
-     struct region_cache *c;
-     int head, tail;
+invalidate_region_cache (struct buffer *buf, struct region_cache *c, int head, int tail)
 {
   /* Let chead = c->beg_unchanged, and
          ctail = c->end_unchanged.
@@ -576,9 +559,7 @@
    the cache, and causes cache gap motion.  */
 
 static void
-revalidate_region_cache (buf, c)
-     struct buffer *buf;
-     struct region_cache *c;
+revalidate_region_cache (struct buffer *buf, struct region_cache *c)
 {
   /* The boundaries now in the cache are expressed relative to the
      buffer_beg and buffer_end values stored in the cache.  Now,
@@ -706,10 +687,7 @@
    buffer positions) is "known," for the purposes of CACHE (e.g. "has
    no newlines", in the case of the line cache).  */
 void
-know_region_cache (buf, c, start, end)
-     struct buffer *buf;
-     struct region_cache *c;
-     int start, end;
+know_region_cache (struct buffer *buf, struct region_cache *c, int start, int end)
 {
   revalidate_region_cache (buf, c);
 
@@ -723,11 +701,7 @@
    the purposes of CACHE.  If NEXT is non-zero, set *NEXT to the nearest
    position after POS where the knownness changes.  */
 int
-region_cache_forward (buf, c, pos, next)
-     struct buffer *buf;
-     struct region_cache *c;
-     int pos;
-     int *next;
+region_cache_forward (struct buffer *buf, struct region_cache *c, int pos, int *next)
 {
   revalidate_region_cache (buf, c);
 
@@ -762,11 +736,7 @@
 /* Return true if the text immediately before POS in BUF is known, for
    the purposes of CACHE.  If NEXT is non-zero, set *NEXT to the nearest
    position before POS where the knownness changes.  */
-int region_cache_backward (buf, c, pos, next)
-     struct buffer *buf;
-     struct region_cache *c;
-     int pos;
-     int *next;
+int region_cache_backward (struct buffer *buf, struct region_cache *c, int pos, int *next)
 {
   revalidate_region_cache (buf, c);
 
@@ -804,8 +774,7 @@
 /* Debugging: pretty-print a cache to the standard error output.  */
 
 void
-pp_cache (c)
-     struct region_cache *c;
+pp_cache (struct region_cache *c)
 {
   int i;
   int beg_u = c->buffer_beg + c->beg_unchanged;
--- a/src/region-cache.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/region-cache.h	Thu Jul 08 17:09:35 2010 +0900
@@ -61,17 +61,17 @@
 
 
 /* Allocate, initialize and return a new, empty region cache.  */
-struct region_cache *new_region_cache P_ ((void));
+struct region_cache *new_region_cache (void);
 
 /* Free a region cache.  */
-void free_region_cache P_ ((struct region_cache *));
+void free_region_cache (struct region_cache *);
 
 /* Assert that the region of BUF between START and END (absolute
    buffer positions) is "known," for the purposes of CACHE (e.g. "has
    no newlines", in the case of the line cache).  */
-extern void know_region_cache P_ ((struct buffer *BUF,
-                                   struct region_cache *CACHE,
-                                   int START, int END));
+extern void know_region_cache (struct buffer *BUF,
+                               struct region_cache *CACHE,
+                               int START, int END);
 
 /* Indicate that a section of BUF has changed, to invalidate CACHE.
    HEAD is the number of chars unchanged at the beginning of the buffer.
@@ -81,9 +81,9 @@
    (This way of specifying regions makes more sense than absolute
    buffer positions in the presence of insertions and deletions; the
    args to pass are the same before and after such an operation.)  */
-extern void invalidate_region_cache P_ ((struct buffer *BUF,
-					 struct region_cache *CACHE,
-					 int HEAD, int TAIL));
+extern void invalidate_region_cache (struct buffer *BUF,
+                                     struct region_cache *CACHE,
+                                     int HEAD, int TAIL);
 
 /* The scanning functions.
 
@@ -97,18 +97,18 @@
 /* Return true if the text immediately after POS in BUF is known, for
    the purposes of CACHE.  If NEXT is non-zero, set *NEXT to the nearest
    position after POS where the knownness changes.  */
-extern int region_cache_forward P_ ((struct buffer *BUF,
-                                     struct region_cache *CACHE,
-                                     int POS,
-                                     int *NEXT));
+extern int region_cache_forward (struct buffer *BUF,
+                                 struct region_cache *CACHE,
+                                 int POS,
+                                 int *NEXT);
 
 /* Return true if the text immediately before POS in BUF is known, for
    the purposes of CACHE.  If NEXT is non-zero, set *NEXT to the nearest
    position before POS where the knownness changes.  */
-extern int region_cache_backward P_ ((struct buffer *BUF,
-                                      struct region_cache *CACHE,
-                                      int POS,
-                                      int *NEXT));
+extern int region_cache_backward (struct buffer *BUF,
+                                  struct region_cache *CACHE,
+                                  int POS,
+                                  int *NEXT);
 
 /* arch-tag: 70f79125-ef22-4f58-9aec-a48ca2791435
    (do not change this comment) */
--- a/src/s/darwin.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/s/darwin.h	Thu Jul 08 17:09:35 2010 +0900
@@ -117,9 +117,6 @@
 /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets.  */
 #define HAVE_SOCKETS
 
-/* start_of_text isn't actually used, so make it compile without error.  */
-#define TEXT_START (0)
-
 /* Definitions for how to compile & link.  */
 #ifdef HAVE_NS
 #define SYSTEM_PURESIZE_EXTRA 200000
--- a/src/s/hpux10-20.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/s/hpux10-20.h	Thu Jul 08 17:09:35 2010 +0900
@@ -131,7 +131,6 @@
 #define DATA_SEG_BITS 0x40000000
 
 #define DATA_START    0x40000000
-#define TEXT_START    0x00000000
 
 /* Data type of load average, as read out of kmem.  */
 #define LOAD_AVE_TYPE double
--- a/src/s/ms-w32.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/s/ms-w32.h	Thu Jul 08 17:09:35 2010 +0900
@@ -63,15 +63,6 @@
    for received packets, so datagrams are broken too.  */
 #define BROKEN_DATAGRAM_SOCKETS 1
 
-#define bzero(b, l) memset(b, 0, l)
-#define bcopy(s, d, l) memmove(d, s, l)
-#define bcmp(a, b, l) memcmp(a, b, l)
-
-/* bcopy (aka memmove aka memcpy at least on x86) under MSVC is quite safe.  */
-#define GAP_USE_BCOPY 1
-#define BCOPY_UPWARD_SAFE 1
-#define BCOPY_DOWNWARD_SAFE 1
-
 /* If your system uses COFF (Common Object File Format) then define the
    preprocessor symbol "COFF".  */
 #define COFF 1
@@ -153,8 +144,10 @@
 #define HAVE_RANDOM 1
 #undef  HAVE_SYSINFO
 #undef  HAVE_LRAND48
-#define HAVE_BCOPY 1
-#define HAVE_BCMP 1
+#define HAVE_MEMCMP 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMSET 1
 #define HAVE_LOGB 1
 #define HAVE_FREXP 1
 #define HAVE_FMOD 1
--- a/src/s/msdos.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/s/msdos.h	Thu Jul 08 17:09:35 2010 +0900
@@ -75,7 +75,6 @@
 #define _longjmp longjmp
 
 #define DATA_START  (&etext + 1)
-#define TEXT_START  &start
 
 #define _NAIVE_DOS_REGS
 
@@ -104,10 +103,6 @@
 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
 
-/* bcopy under djgpp is quite safe.  */
-#define GAP_USE_BCOPY
-#define BCOPY_UPWARD_SAFE 1
-#define BCOPY_DOWNWARD_SAFE 1
 
 /* Mode line description of a buffer's type.  */
 #define MODE_LINE_BINARY_TEXT(buf) (NILP(buf->buffer_file_type) ? "T" : "B")
--- a/src/scroll.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/scroll.c	Thu Jul 08 17:09:35 2010 +0900
@@ -58,14 +58,14 @@
     unsigned char writecount;
   };
 
-static void do_direct_scrolling P_ ((struct frame *,
-                                     struct glyph_matrix *,
-				     struct matrix_elt *,
-				     int, int));
-static void do_scrolling P_ ((struct frame *,
-                              struct glyph_matrix *,
-			      struct matrix_elt *,
-			      int, int));
+static void do_direct_scrolling (struct frame *,
+                                 struct glyph_matrix *,
+                                 struct matrix_elt *,
+                                 int, int);
+static void do_scrolling (struct frame *,
+                          struct glyph_matrix *,
+                          struct matrix_elt *,
+                          int, int);
 
 
 /* Determine, in matrix[i,j], the cost of updating the first j old
@@ -86,17 +86,12 @@
    new contents appears.  */
 
 static void
-calculate_scrolling (frame, matrix, window_size, lines_below,
-		     draw_cost, old_hash, new_hash,
-		     free_at_end)
-     FRAME_PTR frame;
-     /* matrix is of size window_size + 1 on each side.  */
-     struct matrix_elt *matrix;
-     int window_size, lines_below;
-     int *draw_cost;
-     int *old_hash;
-     int *new_hash;
-     int free_at_end;
+calculate_scrolling (FRAME_PTR frame,
+		     /* matrix is of size window_size + 1 on each side.  */
+		     struct matrix_elt *matrix,
+		     int window_size, int lines_below,
+		     int *draw_cost, int *old_hash, int *new_hash,
+		     int free_at_end)
 {
   register int i, j;
   int frame_lines = FRAME_LINES (frame);
@@ -244,12 +239,7 @@
    of lines.  */
 
 static void
-do_scrolling (frame, current_matrix, matrix, window_size, unchanged_at_top)
-     struct frame *frame;
-     struct glyph_matrix *current_matrix;
-     struct matrix_elt *matrix;
-     int window_size;
-     int unchanged_at_top;
+do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct matrix_elt *matrix, int window_size, int unchanged_at_top)
 {
   struct matrix_elt *p;
   int i, j, k;
@@ -268,7 +258,7 @@
   int *copy_from = (int *) alloca (window_size * sizeof (int));
 
   /* Zero means line is empty.  */
-  bzero (retained_p, window_size * sizeof (char));
+  memset (retained_p, 0, window_size * sizeof (char));
   for (k = 0; k < window_size; ++k)
     copy_from[k] = -1;
 
@@ -429,18 +419,13 @@
    is the equivalent of draw_cost for the old line contents */
 
 static void
-calculate_direct_scrolling (frame, matrix, window_size, lines_below,
-			    draw_cost, old_draw_cost, old_hash, new_hash,
-			    free_at_end)
-     FRAME_PTR frame;
-     /* matrix is of size window_size + 1 on each side.  */
-     struct matrix_elt *matrix;
-     int window_size, lines_below;
-     int *draw_cost;
-     int *old_draw_cost;
-     int *old_hash;
-     int *new_hash;
-     int free_at_end;
+calculate_direct_scrolling (FRAME_PTR frame,
+			    /* matrix is of size window_size + 1 on each side.  */
+			    struct matrix_elt *matrix,
+			    int window_size, int lines_below,
+			    int *draw_cost, int *old_draw_cost,
+			    int *old_hash, int *new_hash,
+			    int free_at_end)
 {
   register int i, j;
   int frame_lines = FRAME_LINES (frame);
@@ -692,7 +677,7 @@
      old matrix.  Lines not retained are empty.  */
   char *retained_p = (char *) alloca (window_size * sizeof (char));
 
-  bzero (retained_p, window_size * sizeof (char));
+  memset (retained_p, 0, window_size * sizeof (char));
 
   /* Perform some sanity checks when GLYPH_DEBUG is on.  */
   CHECK_MATRIX (current_matrix);
@@ -854,9 +839,7 @@
    such a line will have little weight.  */
 
 int
-scrolling_max_lines_saved (start, end, oldhash, newhash, cost)
-     int start, end;
-     int *oldhash, *newhash, *cost;
+scrolling_max_lines_saved (int start, int end, int *oldhash, int *newhash, int *cost)
 {
   struct { int hash; int count; } lines[01000];
   register int i, h;
@@ -872,7 +855,7 @@
   avg_length /= end - start;
   threshold = avg_length / 4;
 
-  bzero (lines, sizeof lines);
+  memset (lines, 0, sizeof lines);
 
   /* Put new lines' hash codes in hash table.  Ignore lines shorter
      than the threshold.  Thus, if the lines that are in common are
@@ -909,9 +892,7 @@
    to scroll_frame_lines to perform this scrolling.  */
 
 int
-scroll_cost (frame, from, to, amount)
-     FRAME_PTR frame;
-     int from, to, amount;
+scroll_cost (FRAME_PTR frame, int from, int to, int amount)
 {
   /* Compute how many lines, at bottom of frame,
      will not be involved in actual motion.  */
@@ -948,11 +929,7 @@
    overhead and multiply factor values */
 
 static void
-line_ins_del (frame, ov1, pf1, ovn, pfn, ov, mf)
-     FRAME_PTR frame;
-     int ov1, ovn;
-     int pf1, pfn;
-     register int *ov, *mf;
+line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, register int *ov, register int *mf)
 {
   register int i;
   register int frame_lines = FRAME_LINES (frame);
@@ -969,15 +946,11 @@
 }
 
 static void
-ins_del_costs (frame,
-	       one_line_string, multi_string,
-	       setup_string, cleanup_string,
-	       costvec, ncostvec, coefficient)
-     FRAME_PTR frame;
-     char *one_line_string, *multi_string;
-     char *setup_string, *cleanup_string;
-     int *costvec, *ncostvec;
-     int coefficient;
+ins_del_costs (FRAME_PTR frame,
+	       char *one_line_string, char *multi_string,
+	       char *setup_string, char *cleanup_string,
+	       int *costvec, int *ncostvec,
+	       int coefficient)
 {
   if (multi_string)
     line_ins_del (frame,
--- a/src/search.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/search.c	Thu Jul 08 17:09:35 2010 +0900
@@ -98,22 +98,22 @@
    only.  */
 Lisp_Object Vinhibit_changing_match_data;
 
-static void set_search_regs P_ ((EMACS_INT, EMACS_INT));
-static void save_search_regs P_ ((void));
-static EMACS_INT simple_search P_ ((int, unsigned char *, int, int,
-				    Lisp_Object, EMACS_INT, EMACS_INT,
-				    EMACS_INT, EMACS_INT));
-static EMACS_INT boyer_moore P_ ((int, unsigned char *, int, int,
-				  Lisp_Object, Lisp_Object,
-				  EMACS_INT, EMACS_INT,
-				  EMACS_INT, EMACS_INT, int));
-static EMACS_INT search_buffer P_ ((Lisp_Object, EMACS_INT, EMACS_INT,
-				    EMACS_INT, EMACS_INT, int, int,
-				    Lisp_Object, Lisp_Object, int));
-static void matcher_overflow () NO_RETURN;
+static void set_search_regs (EMACS_INT, EMACS_INT);
+static void save_search_regs (void);
+static EMACS_INT simple_search (int, unsigned char *, int, int,
+                                Lisp_Object, EMACS_INT, EMACS_INT,
+                                EMACS_INT, EMACS_INT);
+static EMACS_INT boyer_moore (int, unsigned char *, int, int,
+                              Lisp_Object, Lisp_Object,
+                              EMACS_INT, EMACS_INT,
+                              EMACS_INT, EMACS_INT, int);
+static EMACS_INT search_buffer (Lisp_Object, EMACS_INT, EMACS_INT,
+                                EMACS_INT, EMACS_INT, int, int,
+                                Lisp_Object, Lisp_Object, int);
+static void matcher_overflow (void) NO_RETURN;
 
 static void
-matcher_overflow ()
+matcher_overflow (void)
 {
   error ("Stack overflow in regexp matcher");
 }
@@ -132,12 +132,7 @@
    The behavior also depends on Vsearch_spaces_regexp.  */
 
 static void
-compile_pattern_1 (cp, pattern, translate, regp, posix)
-     struct regexp_cache *cp;
-     Lisp_Object pattern;
-     Lisp_Object translate;
-     struct re_registers *regp;
-     int posix;
+compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object translate, struct re_registers *regp, int posix)
 {
   char *val;
   reg_syntax_t old;
@@ -187,7 +182,7 @@
    This is called from garbage collection.  */
 
 void
-shrink_regexp_cache ()
+shrink_regexp_cache (void)
 {
   struct regexp_cache *cp;
 
@@ -205,7 +200,7 @@
    automagically manages the memory in each re_pattern_buffer struct,
    based on its `allocated' and `buffer' values.  */
 void
-clear_regexp_cache ()
+clear_regexp_cache (void)
 {
   int i;
 
@@ -229,11 +224,7 @@
    for this pattern.  0 means backtrack only enough to get a valid match.  */
 
 struct re_pattern_buffer *
-compile_pattern (pattern, regp, translate, posix, multibyte)
-     Lisp_Object pattern;
-     struct re_registers *regp;
-     Lisp_Object translate;
-     int posix, multibyte;
+compile_pattern (Lisp_Object pattern, struct re_registers *regp, Lisp_Object translate, int posix, int multibyte)
 {
   struct regexp_cache *cp, **cpp;
 
@@ -290,9 +281,7 @@
 
 
 static Lisp_Object
-looking_at_1 (string, posix)
-     Lisp_Object string;
-     int posix;
+looking_at_1 (Lisp_Object string, int posix)
 {
   Lisp_Object val;
   unsigned char *p1, *p2;
@@ -392,9 +381,7 @@
 }
 
 static Lisp_Object
-string_match_1 (regexp, string, start, posix)
-     Lisp_Object regexp, string, start;
-     int posix;
+string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int posix)
 {
   int val;
   struct re_pattern_buffer *bufp;
@@ -499,8 +486,7 @@
    This does not clobber the match data.  */
 
 int
-fast_string_match (regexp, string)
-     Lisp_Object regexp, string;
+fast_string_match (Lisp_Object regexp, Lisp_Object string)
 {
   int val;
   struct re_pattern_buffer *bufp;
@@ -525,9 +511,7 @@
 extern Lisp_Object Vascii_downcase_table;
 
 int
-fast_c_string_match_ignore_case (regexp, string)
-     Lisp_Object regexp;
-     const char *string;
+fast_c_string_match_ignore_case (Lisp_Object regexp, const char *string)
 {
   int val;
   struct re_pattern_buffer *bufp;
@@ -547,8 +531,7 @@
 /* Like fast_string_match but ignore case.  */
 
 int
-fast_string_match_ignore_case (regexp, string)
-     Lisp_Object regexp, string;
+fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string)
 {
   int val;
   struct re_pattern_buffer *bufp;
@@ -572,10 +555,7 @@
    data.  */
 
 EMACS_INT
-fast_looking_at (regexp, pos, pos_byte, limit, limit_byte, string)
-     Lisp_Object regexp;
-     EMACS_INT pos, pos_byte, limit, limit_byte;
-     Lisp_Object string;
+fast_looking_at (Lisp_Object regexp, EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT limit, EMACS_INT limit_byte, Lisp_Object string)
 {
   int multibyte;
   struct re_pattern_buffer *buf;
@@ -640,8 +620,7 @@
    This is our cheezy way of associating an action with the change of
    state of a buffer-local variable.  */
 static void
-newline_cache_on_off (buf)
-     struct buffer *buf;
+newline_cache_on_off (struct buffer *buf)
 {
   if (NILP (buf->cache_long_line_scans))
     {
@@ -682,12 +661,7 @@
    except when inside redisplay.  */
 
 int
-scan_buffer (target, start, end, count, shortage, allow_quit)
-     register int target;
-     EMACS_INT start, end;
-     int count;
-     int *shortage;
-     int allow_quit;
+scan_buffer (register int target, EMACS_INT start, EMACS_INT end, int count, int *shortage, int allow_quit)
 {
   struct region_cache *newline_cache;
   int direction;
@@ -879,11 +853,7 @@
    except in special cases.  */
 
 int
-scan_newline (start, start_byte, limit, limit_byte, count, allow_quit)
-     EMACS_INT start, start_byte;
-     EMACS_INT limit, limit_byte;
-     register int count;
-     int allow_quit;
+scan_newline (EMACS_INT start, EMACS_INT start_byte, EMACS_INT limit, EMACS_INT limit_byte, register int count, int allow_quit)
 {
   int direction = ((count > 0) ? 1 : -1);
 
@@ -977,9 +947,7 @@
 }
 
 int
-find_next_newline_no_quit (from, cnt)
-     EMACS_INT from;
-     int cnt;
+find_next_newline_no_quit (EMACS_INT from, int cnt)
 {
   return scan_buffer ('\n', from, 0, cnt, (int *) 0, 0);
 }
@@ -989,9 +957,7 @@
    find_next_newline (...)-1, because you might hit TO.  */
 
 int
-find_before_next_newline (from, to, cnt)
-     EMACS_INT from, to;
-     int cnt;
+find_before_next_newline (EMACS_INT from, EMACS_INT to, int cnt)
 {
   int shortage;
   int pos = scan_buffer ('\n', from, to, cnt, &shortage, 1);
@@ -1005,11 +971,7 @@
 /* Subroutines of Lisp buffer search functions. */
 
 static Lisp_Object
-search_command (string, bound, noerror, count, direction, RE, posix)
-     Lisp_Object string, bound, noerror, count;
-     int direction;
-     int RE;
-     int posix;
+search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count, int direction, int RE, int posix)
 {
   register int np;
   int lim, lim_byte;
@@ -1086,8 +1048,7 @@
 /* Return 1 if REGEXP it matches just one constant string.  */
 
 static int
-trivial_regexp_p (regexp)
-     Lisp_Object regexp;
+trivial_regexp_p (Lisp_Object regexp)
 {
   int len = SBYTES (regexp);
   unsigned char *s = SDATA (regexp);
@@ -1443,7 +1404,7 @@
 		}
 
 	      /* Store this character into the translated pattern.  */
-	      bcopy (str, pat, charlen);
+	      memcpy (pat, str, charlen);
 	      pat += charlen;
 	      base_pat += in_charlen;
 	      len_byte -= in_charlen;
@@ -1504,13 +1465,7 @@
    boyer_moore cannot work.  */
 
 static EMACS_INT
-simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte)
-     int n;
-     unsigned char *pat;
-     int len, len_byte;
-     Lisp_Object trt;
-     EMACS_INT pos, pos_byte;
-     EMACS_INT lim, lim_byte;
+simple_search (int n, unsigned char *pat, int len, int len_byte, Lisp_Object trt, EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT lim, EMACS_INT lim_byte)
 {
   int multibyte = ! NILP (current_buffer->enable_multibyte_characters);
   int forward = n > 0;
@@ -2127,8 +2082,7 @@
    Also clear out the match data for registers 1 and up.  */
 
 static void
-set_search_regs (beg_byte, nbytes)
-     EMACS_INT beg_byte, nbytes;
+set_search_regs (EMACS_INT beg_byte, EMACS_INT nbytes)
 {
   int i;
 
@@ -2162,9 +2116,7 @@
    need not match a word boundary unless it ends in whitespace.  */
 
 static Lisp_Object
-wordify (string, lax)
-     Lisp_Object string;
-     int lax;
+wordify (Lisp_Object string, int lax)
 {
   register unsigned char *p, *o;
   register int i, i_byte, len, punct_count = 0, word_count = 0;
@@ -2226,8 +2178,7 @@
 
       if (SYNTAX (c) == Sword)
 	{
-	  bcopy (SDATA (string) + i_byte_orig, o,
-		 i_byte - i_byte_orig);
+	  memcpy (o, SDATA (string) + i_byte_orig, i_byte - i_byte_orig);
 	  o += i_byte - i_byte_orig;
 	}
       else if (i > 0 && SYNTAX (prev_c) == Sword && --word_count)
@@ -2822,7 +2773,7 @@
 	  /* Now add to the end of SUBSTED.  */
 	  if (add_stuff)
 	    {
-	      bcopy (add_stuff, substed + substed_len, add_len);
+	      memcpy (substed + substed_len, add_stuff, add_len);
 	      substed_len += add_len;
 	    }
 	}
@@ -2886,9 +2837,7 @@
 }
 
 static Lisp_Object
-match_limit (num, beginningp)
-     Lisp_Object num;
-     int beginningp;
+match_limit (Lisp_Object num, int beginningp)
 {
   register int n;
 
@@ -3171,7 +3120,7 @@
 /* Called from Flooking_at, Fstring_match, search_buffer, Fstore_match_data
    if asynchronous code (filter or sentinel) is running. */
 static void
-save_search_regs ()
+save_search_regs (void)
 {
   if (!search_regs_saved)
     {
@@ -3190,7 +3139,7 @@
 
 /* Called upon exit from filters and sentinels. */
 void
-restore_search_regs ()
+restore_search_regs (void)
 {
   if (search_regs_saved)
     {
@@ -3209,8 +3158,7 @@
 }
 
 static Lisp_Object
-unwind_set_match_data (list)
-     Lisp_Object list;
+unwind_set_match_data (Lisp_Object list)
 {
   /* It is NOT ALWAYS safe to free (evaporate) the markers immediately.  */
   return Fset_match_data (list, Qt);
@@ -3218,7 +3166,7 @@
 
 /* Called to unwind protect the match data.  */
 void
-record_unwind_save_match_data ()
+record_unwind_save_match_data (void)
 {
   record_unwind_protect (unwind_set_match_data,
 			 Fmatch_data (Qnil, Qnil, Qnil));
@@ -3262,7 +3210,7 @@
 }
 
 void
-syms_of_search ()
+syms_of_search (void)
 {
   register int i;
 
--- a/src/sound.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/sound.c	Thu Jul 08 17:09:35 2010 +0900
@@ -115,10 +115,10 @@
   SOUND_ATTR_SENTINEL
 };
 
-static void alsa_sound_perror P_ ((char *, int)) NO_RETURN;
-static void sound_perror P_ ((char *)) NO_RETURN;
-static void sound_warning P_ ((char *));
-static int parse_sound P_ ((Lisp_Object, Lisp_Object *));
+static void alsa_sound_perror (char *, int) NO_RETURN;
+static void sound_perror (char *) NO_RETURN;
+static void sound_warning (char *);
+static int parse_sound (Lisp_Object, Lisp_Object *);
 
 /* END: Common Definitions */
 
@@ -225,25 +225,25 @@
   int channels;
 
   /* Open device SD.  */
-  void (* open) P_ ((struct sound_device *sd));
+  void (* open) (struct sound_device *sd);
 
   /* Close device SD.  */
-  void (* close) P_ ((struct sound_device *sd));
+  void (* close) (struct sound_device *sd);
 
   /* Configure SD accoring to device-dependent parameters.  */
-  void (* configure) P_ ((struct sound_device *device));
+  void (* configure) (struct sound_device *device);
 
   /* Choose a device-dependent format for outputting sound S.  */
-  void (* choose_format) P_ ((struct sound_device *sd,
-			      struct sound *s));
+  void (* choose_format) (struct sound_device *sd,
+                          struct sound *s);
 
   /* Return a preferred data size in bytes to be sent to write (below)
      each time.  2048 is used if this is NULL.  */
-  int (* period_size) P_ ((struct sound_device *sd));
+  int (* period_size) (struct sound_device *sd);
 
   /* Write NYBTES bytes from BUFFER to device SD.  */
-  void (* write) P_ ((struct sound_device *sd, const char *buffer,
-		      int nbytes));
+  void (* write) (struct sound_device *sd, const char *buffer,
+                  int nbytes);
 
   /* A place for devices to store additional data.  */
   void *data;
@@ -279,7 +279,7 @@
   Lisp_Object data;
 
   /* Play sound file S on device SD.  */
-  void (* play) P_ ((struct sound *s, struct sound_device *sd));
+  void (* play) (struct sound *s, struct sound_device *sd);
 };
 
 /* These are set during `play-sound-internal' so that sound_cleanup has
@@ -290,30 +290,30 @@
 
 /* Function prototypes.  */
 
-static void vox_open P_ ((struct sound_device *));
-static void vox_configure P_ ((struct sound_device *));
-static void vox_close P_ ((struct sound_device *sd));
-static void vox_choose_format P_ ((struct sound_device *, struct sound *));
-static int vox_init P_ ((struct sound_device *));
-static void vox_write P_ ((struct sound_device *, const char *, int));
-static void find_sound_type P_ ((struct sound *));
-static u_int32_t le2hl P_ ((u_int32_t));
-static u_int16_t le2hs P_ ((u_int16_t));
-static u_int32_t be2hl P_ ((u_int32_t));
-static int wav_init P_ ((struct sound *));
-static void wav_play P_ ((struct sound *, struct sound_device *));
-static int au_init P_ ((struct sound *));
-static void au_play P_ ((struct sound *, struct sound_device *));
+static void vox_open (struct sound_device *);
+static void vox_configure (struct sound_device *);
+static void vox_close (struct sound_device *sd);
+static void vox_choose_format (struct sound_device *, struct sound *);
+static int vox_init (struct sound_device *);
+static void vox_write (struct sound_device *, const char *, int);
+static void find_sound_type (struct sound *);
+static u_int32_t le2hl (u_int32_t);
+static u_int16_t le2hs (u_int16_t);
+static u_int32_t be2hl (u_int32_t);
+static int wav_init (struct sound *);
+static void wav_play (struct sound *, struct sound_device *);
+static int au_init (struct sound *);
+static void au_play (struct sound *, struct sound_device *);
 
 #if 0 /* Currently not used.  */
-static u_int16_t be2hs P_ ((u_int16_t));
+static u_int16_t be2hs (u_int16_t);
 #endif
 
 /* END: Non Windows Definitions */
 #else /* WINDOWSNT */
 
 /* BEGIN: Windows Specific Definitions */
-static int do_play_sound P_ ((const char *, unsigned long));
+static int do_play_sound (const char *, unsigned long);
 /*
   END: Windows Specific Definitions */
 #endif /* WINDOWSNT */
@@ -328,8 +328,7 @@
 /* Like perror, but signals an error.  */
 
 static void
-sound_perror (msg)
-     char *msg;
+sound_perror (char *msg)
 {
   int saved_errno = errno;
 
@@ -347,8 +346,7 @@
 /* Display a warning message.  */
 
 static void
-sound_warning (msg)
-     char *msg;
+sound_warning (char *msg)
 {
   message (msg);
 }
@@ -381,9 +379,7 @@
    range [0, 1].  */
 
 static int
-parse_sound (sound, attrs)
-     Lisp_Object sound;
-     Lisp_Object *attrs;
+parse_sound (Lisp_Object sound, Lisp_Object *attrs)
 {
   /* SOUND must be a list starting with the symbol `sound'.  */
   if (!CONSP (sound) || !EQ (XCAR (sound), Qsound))
@@ -452,8 +448,7 @@
    S is the sound file structure to fill in.  */
 
 static void
-find_sound_type (s)
-     struct sound *s;
+find_sound_type (struct sound *s)
 {
   if (!wav_init (s) && !au_init (s))
     error ("Unknown sound format");
@@ -463,8 +458,7 @@
 /* Function installed by play-sound-internal with record_unwind_protect.  */
 
 static Lisp_Object
-sound_cleanup (arg)
-     Lisp_Object arg;
+sound_cleanup (Lisp_Object arg)
 {
   if (current_sound_device->close)
     current_sound_device->close (current_sound_device);
@@ -484,8 +478,7 @@
    to host byte-order.  */
 
 static u_int32_t
-le2hl (value)
-     u_int32_t value;
+le2hl (u_int32_t value)
 {
 #ifdef WORDS_BIG_ENDIAN
   unsigned char *p = (unsigned char *) &value;
@@ -499,8 +492,7 @@
    to host byte-order.  */
 
 static u_int16_t
-le2hs (value)
-     u_int16_t value;
+le2hs (u_int16_t value)
 {
 #ifdef WORDS_BIG_ENDIAN
   unsigned char *p = (unsigned char *) &value;
@@ -514,8 +506,7 @@
    to host byte-order.  */
 
 static u_int32_t
-be2hl (value)
-     u_int32_t value;
+be2hl (u_int32_t value)
 {
 #ifndef WORDS_BIG_ENDIAN
   unsigned char *p = (unsigned char *) &value;
@@ -554,13 +545,12 @@
    Value is non-zero if the file is a WAV file.  */
 
 static int
-wav_init (s)
-     struct sound *s;
+wav_init (struct sound *s)
 {
   struct wav_header *header = (struct wav_header *) s->header;
 
   if (s->header_size < sizeof *header
-      || bcmp (s->header, "RIFF", 4) != 0)
+      || memcmp (s->header, "RIFF", 4) != 0)
     return 0;
 
   /* WAV files are in little-endian order.  Convert the header
@@ -590,9 +580,7 @@
 /* Play RIFF-WAVE audio file S on sound device SD.  */
 
 static void
-wav_play (s, sd)
-     struct sound *s;
-     struct sound_device *sd;
+wav_play (struct sound *s, struct sound_device *sd)
 {
   struct wav_header *header = (struct wav_header *) s->header;
 
@@ -665,13 +653,12 @@
    Value is non-zero if the file is an AU file.  */
 
 static int
-au_init (s)
-     struct sound *s;
+au_init (struct sound *s)
 {
   struct au_header *header = (struct au_header *) s->header;
 
   if (s->header_size < sizeof *header
-      || bcmp (s->header, ".snd", 4) != 0)
+      || memcmp (s->header, ".snd", 4) != 0)
     return 0;
 
   header->magic_number = be2hl (header->magic_number);
@@ -692,9 +679,7 @@
 /* Play Sun audio file S on sound device SD.  */
 
 static void
-au_play (s, sd)
-     struct sound *s;
-     struct sound_device *sd;
+au_play (struct sound *s, struct sound_device *sd)
 {
   struct au_header *header = (struct au_header *) s->header;
 
@@ -740,8 +725,7 @@
    otherwise use a default device name.  */
 
 static void
-vox_open (sd)
-     struct sound_device *sd;
+vox_open (struct sound_device *sd)
 {
   char *file;
 
@@ -760,8 +744,7 @@
 /* Configure device SD from parameters in it.  */
 
 static void
-vox_configure (sd)
-     struct sound_device *sd;
+vox_configure (struct sound_device *sd)
 {
   int val;
 
@@ -814,8 +797,7 @@
 /* Close device SD if it is open.  */
 
 static void
-vox_close (sd)
-     struct sound_device *sd;
+vox_close (struct sound_device *sd)
 {
   if (sd->fd >= 0)
     {
@@ -845,9 +827,7 @@
 /* Choose device-dependent format for device SD from sound file S.  */
 
 static void
-vox_choose_format (sd, s)
-     struct sound_device *sd;
-     struct sound *s;
+vox_choose_format (struct sound_device *sd, struct sound *s)
 {
   if (s->type == RIFF)
     {
@@ -890,8 +870,7 @@
    structure.  */
 
 static int
-vox_init (sd)
-     struct sound_device *sd;
+vox_init (struct sound_device *sd)
 {
   char *file;
   int fd;
@@ -921,10 +900,7 @@
 /* Write NBYTES bytes from BUFFER to device SD.  */
 
 static void
-vox_write (sd, buffer, nbytes)
-     struct sound_device *sd;
-     const char *buffer;
-     int nbytes;
+vox_write (struct sound_device *sd, const char *buffer, int nbytes)
 {
   int nwritten = emacs_write (sd->fd, buffer, nbytes);
   if (nwritten < 0)
@@ -939,9 +915,7 @@
 /* This driver is available on GNU/Linux. */
 
 static void
-alsa_sound_perror (msg, err)
-     char *msg;
-     int err;
+alsa_sound_perror (char *msg, int err)
 {
   error ("%s: %s", msg, snd_strerror (err));
 }
@@ -958,8 +932,7 @@
    otherwise use a default device name.  */
 
 static void
-alsa_open (sd)
-     struct sound_device *sd;
+alsa_open (struct sound_device *sd)
 {
   char *file;
   struct alsa_params *p;
@@ -986,8 +959,7 @@
 }
 
 static int
-alsa_period_size (sd)
-       struct sound_device *sd;
+alsa_period_size (struct sound_device *sd)
 {
   struct alsa_params *p = (struct alsa_params *) sd->data;
   int fact = snd_pcm_format_size (sd->format, 1) * sd->channels;
@@ -995,8 +967,7 @@
 }
 
 static void
-alsa_configure (sd)
-     struct sound_device *sd;
+alsa_configure (struct sound_device *sd)
 {
   int val, err, dir;
   unsigned uval;
@@ -1115,8 +1086,7 @@
 /* Close device SD if it is open.  */
 
 static void
-alsa_close (sd)
-     struct sound_device *sd;
+alsa_close (struct sound_device *sd)
 {
   struct alsa_params *p = (struct alsa_params *) sd->data;
   if (p)
@@ -1137,9 +1107,7 @@
 /* Choose device-dependent format for device SD from sound file S.  */
 
 static void
-alsa_choose_format (sd, s)
-     struct sound_device *sd;
-     struct sound *s;
+alsa_choose_format (struct sound_device *sd, struct sound *s)
 {
   struct alsa_params *p = (struct alsa_params *) sd->data;
   if (s->type == RIFF)
@@ -1194,10 +1162,7 @@
 /* Write NBYTES bytes from BUFFER to device SD.  */
 
 static void
-alsa_write (sd, buffer, nbytes)
-     struct sound_device *sd;
-     const char *buffer;
-     int nbytes;
+alsa_write (struct sound_device *sd, const char *buffer, int nbytes)
 {
   struct alsa_params *p = (struct alsa_params *) sd->data;
 
@@ -1244,12 +1209,7 @@
 }
 
 static void
-snd_error_quiet (file, line, function, err, fmt)
-     const char *file;
-     int line;
-     const char *function;
-     int err;
-     const char *fmt;
+snd_error_quiet (const char *file, int line, const char *function, int err, const char *fmt)
 {
 }
 
@@ -1257,8 +1217,7 @@
    structure.  */
 
 static int
-alsa_init (sd)
-     struct sound_device *sd;
+alsa_init (struct sound_device *sd)
 {
   char *file;
   snd_pcm_t *handle;
@@ -1421,9 +1380,9 @@
   file = Qnil;
   GCPRO2 (sound, file);
   current_sound_device = (struct sound_device *) xmalloc (sizeof (struct sound_device));
-  bzero (current_sound_device, sizeof (struct sound_device));
+  memset (current_sound_device, 0, sizeof (struct sound_device));
   current_sound = (struct sound *) xmalloc (sizeof (struct sound));
-  bzero (current_sound, sizeof (struct sound));
+  memset (current_sound, 0, sizeof (struct sound));
   record_unwind_protect (sound_cleanup, Qnil);
   current_sound->header = (char *) alloca (MAX_SOUND_HEADER_BYTES);
 
@@ -1446,7 +1405,8 @@
     {
       current_sound->data = attrs[SOUND_DATA];
       current_sound->header_size = min (MAX_SOUND_HEADER_BYTES, SBYTES (current_sound->data));
-      bcopy (SDATA (current_sound->data), current_sound->header, current_sound->header_size);
+      memcpy (current_sound->header, SDATA (current_sound->data),
+	      current_sound->header_size);
     }
 
   /* Find out the type of sound.  Give up if we can't tell.  */
@@ -1524,7 +1484,7 @@
  ***********************************************************************/
 
 void
-syms_of_sound ()
+syms_of_sound (void)
 {
   QCdevice = intern_c_string(":device");
   staticpro (&QCdevice);
@@ -1540,7 +1500,7 @@
 
 
 void
-init_sound ()
+init_sound (void)
 {
 }
 
--- a/src/strftime.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/strftime.c	Thu Jul 08 17:09:35 2010 +0900
@@ -131,14 +131,6 @@
 # endif
 #endif
 
-#ifndef __P
-# if defined __GNUC__ || (defined __STDC__ && __STDC__) || defined (PROTOTYPES)
-#  define __P(args) args
-# else
-#  define __P(args) ()
-# endif  /* GCC.  */
-#endif  /* Not __P.  */
-
 #ifndef PTR
 # ifdef __STDC__
 #  define PTR void *
@@ -187,7 +179,7 @@
    Similarly for localtime_r.  */
 
 # if ! HAVE_TM_GMTOFF
-static struct tm *my_strftime_gmtime_r __P ((const time_t *, struct tm *));
+static struct tm *my_strftime_gmtime_r (const time_t *, struct tm *);
 static struct tm *
 my_strftime_gmtime_r (t, tp)
      const time_t *t;
@@ -200,7 +192,7 @@
   return tp;
 }
 
-static struct tm *my_strftime_localtime_r __P ((const time_t *, struct tm *));
+static struct tm *my_strftime_localtime_r (const time_t *, struct tm *);
 static struct tm *
 my_strftime_localtime_r (t, tp)
      const time_t *t;
@@ -371,8 +363,8 @@
    more reliable way to accept other sets of digits.  */
 #define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9)
 
-static CHAR_T *memcpy_lowcase __P ((CHAR_T *dest, const CHAR_T *src,
-				    size_t len LOCALE_PARAM_PROTO));
+static CHAR_T *memcpy_lowcase (CHAR_T *dest, const CHAR_T *src,
+                               size_t len LOCALE_PARAM_PROTO);
 
 static CHAR_T *
 memcpy_lowcase (dest, src, len LOCALE_PARAM)
@@ -386,8 +378,8 @@
   return dest;
 }
 
-static CHAR_T *memcpy_uppcase __P ((CHAR_T *dest, const CHAR_T *src,
-				    size_t len LOCALE_PARAM_PROTO));
+static CHAR_T *memcpy_uppcase (CHAR_T *dest, const CHAR_T *src,
+                               size_t len LOCALE_PARAM_PROTO);
 
 static CHAR_T *
 memcpy_uppcase (dest, src, len LOCALE_PARAM)
@@ -406,7 +398,7 @@
 /* Yield the difference between *A and *B,
    measured in seconds, ignoring leap seconds.  */
 # define tm_diff ftime_tm_diff
-static int tm_diff __P ((const struct tm *, const struct tm *));
+static int tm_diff (const struct tm *, const struct tm *);
 static int
 tm_diff (a, b)
      const struct tm *a;
@@ -440,7 +432,7 @@
 #define ISO_WEEK_START_WDAY 1 /* Monday */
 #define ISO_WEEK1_WDAY 4 /* Thursday */
 #define YDAY_MINIMUM (-366)
-static int iso_week_days __P ((int, int));
+static int iso_week_days (int, int);
 #ifdef __GNUC__
 __inline__
 #endif
@@ -499,8 +491,8 @@
 #if !defined _LIBC && !defined(WINDOWSNT) && HAVE_TZNAME && HAVE_TZSET
   /* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
      Work around this bug by copying *tp before it might be munged.  */
-  size_t _strftime_copytm __P ((char *, size_t, const char *,
-			        const struct tm * extra_args_spec_iso));
+  size_t _strftime_copytm (char *, size_t, const char *,
+                           const struct tm * extra_args_spec_iso);
   size_t
   my_strftime (s, maxsize, format, tp extra_args)
       CHAR_T *s;
--- a/src/syntax.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/syntax.c	Thu Jul 08 17:09:35 2010 +0900
@@ -98,18 +98,18 @@
 static int find_start_modiff;
 
 
-static Lisp_Object skip_chars P_ ((int, Lisp_Object, Lisp_Object, int));
-static Lisp_Object skip_syntaxes P_ ((int, Lisp_Object, Lisp_Object));
-static Lisp_Object scan_lists P_ ((EMACS_INT, EMACS_INT, EMACS_INT, int));
-static void scan_sexps_forward P_ ((struct lisp_parse_state *,
-				    EMACS_INT, EMACS_INT, EMACS_INT, int,
-				    int, Lisp_Object, int));
-static int in_classes P_ ((int, Lisp_Object));
+static Lisp_Object skip_chars (int, Lisp_Object, Lisp_Object, int);
+static Lisp_Object skip_syntaxes (int, Lisp_Object, Lisp_Object);
+static Lisp_Object scan_lists (EMACS_INT, EMACS_INT, EMACS_INT, int);
+static void scan_sexps_forward (struct lisp_parse_state *,
+                                EMACS_INT, EMACS_INT, EMACS_INT, int,
+                                int, Lisp_Object, int);
+static int in_classes (int, Lisp_Object);
 
 
 struct gl_state_s gl_state;		/* Global state of syntax parser.  */
 
-INTERVAL interval_of ();
+INTERVAL interval_of (int, Lisp_Object);
 #define INTERVALS_AT_ONCE 10		/* 1 + max-number of intervals
 					   to scan to property-change.  */
 
@@ -127,9 +127,7 @@
    start/end of OBJECT.  */
 
 void
-update_syntax_table (charpos, count, init, object)
-     int charpos, count, init;
-     Lisp_Object object;
+update_syntax_table (int charpos, int count, int init, Lisp_Object object)
 {
   Lisp_Object tmp_table;
   int cnt = 0, invalidate = 1;
@@ -318,8 +316,7 @@
    We assume that BYTEPOS is not at the end of the buffer.  */
 
 INLINE EMACS_INT
-inc_bytepos (bytepos)
-     EMACS_INT bytepos;
+inc_bytepos (EMACS_INT bytepos)
 {
   if (NILP (current_buffer->enable_multibyte_characters))
     return bytepos + 1;
@@ -332,8 +329,7 @@
    We assume that BYTEPOS is not at the start of the buffer.  */
 
 INLINE EMACS_INT
-dec_bytepos (bytepos)
-     EMACS_INT bytepos;
+dec_bytepos (EMACS_INT bytepos)
 {
   if (NILP (current_buffer->enable_multibyte_characters))
     return bytepos - 1;
@@ -357,8 +353,7 @@
    update the global data.  */
 
 static EMACS_INT
-find_defun_start (pos, pos_byte)
-     EMACS_INT pos, pos_byte;
+find_defun_start (EMACS_INT pos, EMACS_INT pos_byte)
 {
   EMACS_INT opoint = PT, opoint_byte = PT_BYTE;
 
@@ -422,8 +417,7 @@
 /* Return the SYNTAX_COMEND_FIRST of the character before POS, POS_BYTE.  */
 
 static int
-prev_char_comend_first (pos, pos_byte)
-     int pos, pos_byte;
+prev_char_comend_first (int pos, int pos_byte)
 {
   int c, val;
 
@@ -465,10 +459,7 @@
    the returned value (or at FROM, if the search was not successful).  */
 
 static int
-back_comment (from, from_byte, stop, comnested, comstyle, charpos_ptr, bytepos_ptr)
-     EMACS_INT from, from_byte, stop;
-     int comnested, comstyle;
-     EMACS_INT *charpos_ptr, *bytepos_ptr;
+back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested, int comstyle, EMACS_INT *charpos_ptr, EMACS_INT *bytepos_ptr)
 {
   /* Look back, counting the parity of string-quotes,
      and recording the comment-starters seen.
@@ -740,8 +731,7 @@
 }
 
 static void
-check_syntax_table (obj)
-     Lisp_Object obj;
+check_syntax_table (Lisp_Object obj)
 {
   CHECK_TYPE (CHAR_TABLE_P (obj) && EQ (XCHAR_TABLE (obj)->purpose, Qsyntax_table),
 	      Qsyntax_table_p, obj);
@@ -1185,8 +1175,7 @@
    COUNT negative means scan backward and stop at word beginning.  */
 
 int
-scan_words (from, count)
-     register int from, count;
+scan_words (register int from, register int count)
 {
   register int beg = BEGV;
   register int end = ZV;
@@ -1342,7 +1331,7 @@
   return val == orig_val ? Qt : Qnil;
 }
 
-Lisp_Object skip_chars ();
+Lisp_Object skip_chars (int, Lisp_Object, Lisp_Object, int);
 
 DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0,
        doc: /* Move point forward, stopping before a char not in STRING, or at pos LIM.
@@ -1395,10 +1384,7 @@
 }
 
 static Lisp_Object
-skip_chars (forwardp, string, lim, handle_iso_classes)
-     int forwardp;
-     Lisp_Object string, lim;
-     int handle_iso_classes;
+skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_classes)
 {
   register unsigned int c;
   unsigned char fastmap[0400];
@@ -1436,7 +1422,7 @@
 	       && (XINT (lim) - PT != CHAR_TO_BYTE (XINT (lim)) - PT_BYTE));
   string_multibyte = SBYTES (string) > SCHARS (string);
 
-  bzero (fastmap, sizeof fastmap);
+  memset (fastmap, 0, sizeof fastmap);
 
   str = SDATA (string);
   size_byte = SBYTES (string);
@@ -1485,7 +1471,7 @@
 		  || *class_end != ':' || class_end[1] != ']')
 		goto not_a_class_name;
 
-	      bcopy (class_beg, class_name, class_end - class_beg);
+	      memcpy (class_name, class_beg, class_end - class_beg);
 	      class_name[class_end - class_beg] = 0;
 
 	      cc = re_wctype (class_name);
@@ -1546,8 +1532,8 @@
 	  unsigned char fastmap2[0400];
 	  int range_start_byte, range_start_char;
 
-	  bcopy (fastmap2 + 0200, fastmap + 0200, 0200);
-	  bzero (fastmap + 0200, 0200);
+	  memcpy (fastmap + 0200, fastmap2 + 0200, 0200);
+	  memset (fastmap + 0200, 0, 0200);
 	  /* We are sure that this loop stops.  */
 	  for (i = 0200; ! fastmap2[i]; i++);
 	  c = BYTE8_TO_CHAR (i);
@@ -1607,7 +1593,7 @@
 		  || *class_end != ':' || class_end[1] != ']')
 		goto not_a_class_name_multibyte;
 
-	      bcopy (class_beg, class_name, class_end - class_beg);
+	      memcpy (class_name, class_beg, class_end - class_beg);
 	      class_name[class_end - class_beg] = 0;
 
 	      cc = re_wctype (class_name);
@@ -1692,7 +1678,7 @@
 
       if (! multibyte && n_char_ranges > 0)
 	{
-	  bzero (fastmap + 0200, 0200);
+	  memset (fastmap + 0200, 0, 0200);
 	  for (i = 0; i < n_char_ranges; i += 2)
 	    {
 	      int c1 = char_ranges[i];
@@ -1892,9 +1878,7 @@
 
 
 static Lisp_Object
-skip_syntaxes (forwardp, string, lim)
-     int forwardp;
-     Lisp_Object string, lim;
+skip_syntaxes (int forwardp, Lisp_Object string, Lisp_Object lim)
 {
   register unsigned int c;
   unsigned char fastmap[0400];
@@ -1923,7 +1907,7 @@
   multibyte = (!NILP (current_buffer->enable_multibyte_characters)
 	       && (XINT (lim) - PT != CHAR_TO_BYTE (XINT (lim)) - PT_BYTE));
 
-  bzero (fastmap, sizeof fastmap);
+  memset (fastmap, 0, sizeof fastmap);
 
   if (SBYTES (string) > SCHARS (string))
     /* As this is very rare case (syntax spec is ASCII only), don't
@@ -2067,9 +2051,7 @@
    integer which is its type according to re_wctype.  */
 
 static int
-in_classes (c, iso_classes)
-     int c;
-     Lisp_Object iso_classes;
+in_classes (int c, Lisp_Object iso_classes)
 {
   int fits_class = 0;
 
@@ -2111,12 +2093,10 @@
    remains valid for forward search starting at the returned position. */
 
 static int
-forw_comment (from, from_byte, stop, nesting, style, prev_syntax,
-	      charpos_ptr, bytepos_ptr, incomment_ptr)
-     EMACS_INT from, from_byte, stop;
-     int nesting, style, prev_syntax;
-     EMACS_INT *charpos_ptr, *bytepos_ptr;
-     int *incomment_ptr;
+forw_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop,
+	      int nesting, int style, int prev_syntax,
+	      EMACS_INT *charpos_ptr, EMACS_INT *bytepos_ptr,
+	      int *incomment_ptr)
 {
   register int c, c1;
   register enum syntaxcode code;
@@ -2422,10 +2402,7 @@
    ? SYNTAX (c) : Ssymbol)
 
 static Lisp_Object
-scan_lists (from, count, depth, sexpflag)
-     register EMACS_INT from;
-     EMACS_INT count, depth;
-     int sexpflag;
+scan_lists (register EMACS_INT from, EMACS_INT count, EMACS_INT depth, int sexpflag)
 {
   Lisp_Object val;
   register EMACS_INT stop = count > 0 ? ZV : BEGV;
@@ -3324,7 +3301,7 @@
 }
 
 void
-init_syntax_once ()
+init_syntax_once (void)
 {
   register int i, c;
   Lisp_Object temp;
@@ -3414,7 +3391,7 @@
 }
 
 void
-syms_of_syntax ()
+syms_of_syntax (void)
 {
   Qsyntax_table_p = intern_c_string ("syntax-table-p");
   staticpro (&Qsyntax_table_p);
--- a/src/syntax.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/syntax.h	Thu Jul 08 17:09:35 2010 +0900
@@ -19,7 +19,7 @@
 
 
 extern Lisp_Object Qsyntax_table_p;
-extern void update_syntax_table P_ ((int, int, int, Lisp_Object));
+extern void update_syntax_table (int, int, int, Lisp_Object);
 
 /* The standard syntax table is stored where it will automatically
    be used in all new buffers.  */
@@ -346,9 +346,9 @@
 
 extern struct gl_state_s gl_state;
 extern int parse_sexp_lookup_properties;
-extern INTERVAL interval_of P_ ((int, Lisp_Object));
+extern INTERVAL interval_of (int, Lisp_Object);
 
-extern int scan_words P_ ((int, int));
+extern int scan_words (int, int);
 
 /* arch-tag: 28833cca-cd73-4741-8c85-a3111166a0e0
    (do not change this comment) */
--- a/src/sysdep.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/sysdep.c	Thu Jul 08 17:09:35 2010 +0900
@@ -18,10 +18,7 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
 #include <ctype.h>
 #include <signal.h>
 #include <stdio.h>
@@ -79,9 +76,6 @@
 #include "dosfns.h"
 #include "msdos.h"
 #include <sys/param.h>
-
-extern int etext;
-extern unsigned start __asm__ ("start");
 #endif
 
 #include <sys/file.h>
@@ -169,7 +163,7 @@
 
 int emacs_ospeed;
 
-void croak P_ ((char *)) NO_RETURN;
+void croak (char *) NO_RETURN;
 
 /* Temporary used by `sigblock' when defined in terms of signprocmask.  */
 
@@ -182,7 +176,7 @@
    Any other returned value must be freed with free. This is used
    only when get_current_dir_name is not defined on the system.  */
 char*
-get_current_dir_name ()
+get_current_dir_name (void)
 {
   char *buf;
   char *pwd;
@@ -254,7 +248,7 @@
 /* Discard pending input on all input descriptors.  */
 
 void
-discard_tty_input ()
+discard_tty_input (void)
 {
 #ifndef WINDOWSNT
   struct emacs_tty buf;
@@ -353,8 +347,7 @@
 
 /*ARGSUSED*/
 void
-set_exclusive_use (fd)
-     int fd;
+set_exclusive_use (int fd)
 {
 #ifdef FIOCLEX
   ioctl (fd, FIOCLEX, 0);
@@ -364,7 +357,8 @@
 
 #ifndef subprocesses
 
-wait_without_blocking ()
+void
+wait_without_blocking (void)
 {
   croak ("wait_without_blocking");
   synch_process_alive = 0;
@@ -376,15 +370,14 @@
 			 (at least for bsd).  */
 
 SIGTYPE
-wait_for_termination_signal ()
+wait_for_termination_signal (void)
 {}
 
 /* Wait for subprocess with process id `pid' to terminate and
    make sure it will get eliminated (not remain forever as a zombie) */
 
 void
-wait_for_termination (pid)
-     int pid;
+wait_for_termination (int pid)
 {
   while (1)
     {
@@ -438,8 +431,7 @@
  */
 
 void
-flush_pending_output (channel)
-     int channel;
+flush_pending_output (int channel)
 {
 #ifdef HAVE_TERMIOS
   /* If we try this, we get hit with SIGTTIN, because
@@ -465,8 +457,7 @@
     in Emacs.  No padding needed for insertion into an Emacs buffer.  */
 
 void
-child_setup_tty (out)
-     int out;
+child_setup_tty (int out)
 {
 #ifndef DOS_NT
   struct emacs_tty s;
@@ -561,16 +552,16 @@
 struct save_signal
 {
   int code;
-  SIGTYPE (*handler) P_ ((int));
+  SIGTYPE (*handler) (int);
 };
 
-static void save_signal_handlers P_ ((struct save_signal *));
-static void restore_signal_handlers P_ ((struct save_signal *));
+static void save_signal_handlers (struct save_signal *);
+static void restore_signal_handlers (struct save_signal *);
 
 /* Suspend the Emacs process; give terminal to its superior.  */
 
 void
-sys_suspend ()
+sys_suspend (void)
 {
 #if defined (SIGTSTP) && !defined (MSDOS)
 
@@ -591,7 +582,7 @@
 /* Fork a subshell.  */
 
 void
-sys_subshell ()
+sys_subshell (void)
 {
 #ifdef DOS_NT	/* Demacs 1.1.2 91/10/20 Manabu Higashida */
   int st;
@@ -626,7 +617,7 @@
   dir = expand_and_dir_to_file (Funhandled_file_name_directory (dir), Qnil);
   str = (unsigned char *) alloca (SCHARS (dir) + 2);
   len = SCHARS (dir);
-  bcopy (SDATA (dir), str, len);
+  memcpy (str, SDATA (dir), len);
   if (str[len - 1] != '/') str[len++] = '/';
   str[len] = 0;
  xyzzy:
@@ -719,20 +710,18 @@
 }
 
 static void
-save_signal_handlers (saved_handlers)
-     struct save_signal *saved_handlers;
+save_signal_handlers (struct save_signal *saved_handlers)
 {
   while (saved_handlers->code)
     {
       saved_handlers->handler
-	= (SIGTYPE (*) P_ ((int))) signal (saved_handlers->code, SIG_IGN);
+        = (SIGTYPE (*) (int)) signal (saved_handlers->code, SIG_IGN);
       saved_handlers++;
     }
 }
 
 static void
-restore_signal_handlers (saved_handlers)
-     struct save_signal *saved_handlers;
+restore_signal_handlers (struct save_signal *saved_handlers)
 {
   while (saved_handlers->code)
     {
@@ -769,8 +758,7 @@
 int old_fcntl_flags[MAXDESC];
 
 void
-init_sigio (fd)
-     int fd;
+init_sigio (int fd)
 {
 #ifdef FASYNC
   old_fcntl_flags[fd] = fcntl (fd, F_GETFL, 0) & ~FASYNC;
@@ -780,8 +768,7 @@
 }
 
 void
-reset_sigio (fd)
-     int fd;
+reset_sigio (int fd)
 {
 #ifdef FASYNC
   fcntl (fd, F_SETFL, old_fcntl_flags[fd]);
@@ -793,7 +780,7 @@
 /* XXX Yeah, but you need it for SIGIO, don't you? */
 
 void
-request_sigio ()
+request_sigio (void)
 {
   if (noninteractive)
     return;
@@ -808,7 +795,7 @@
 
 void
 unrequest_sigio (void)
-{ 
+{
   if (noninteractive)
     return;
 
@@ -828,7 +815,7 @@
 #ifndef MSDOS
 
 void
-request_sigio ()
+request_sigio (void)
 {
   if (noninteractive || read_socket_hook)
     return;
@@ -837,7 +824,7 @@
 }
 
 void
-unrequest_sigio ()
+unrequest_sigio (void)
 {
   if (noninteractive || read_socket_hook)
     return;
@@ -857,14 +844,12 @@
    Return zero if all's well, or -1 if we ran into an error we
    couldn't deal with.  */
 int
-emacs_get_tty (fd, settings)
-     int fd;
-     struct emacs_tty *settings;
+emacs_get_tty (int fd, struct emacs_tty *settings)
 {
   /* Retrieve the primary parameters - baud rate, character size, etcetera.  */
 #ifdef HAVE_TCATTR
   /* We have those nifty POSIX tcmumbleattr functions.  */
-  bzero (&settings->main, sizeof (settings->main));
+  memset (&settings->main, 0, sizeof (settings->main));
   if (tcgetattr (fd, &settings->main) < 0)
     return -1;
 
@@ -906,10 +891,7 @@
    Return 0 if all went well, and -1 if anything failed.  */
 
 int
-emacs_set_tty (fd, settings, flushp)
-     int fd;
-     struct emacs_tty *settings;
-     int flushp;
+emacs_set_tty (int fd, struct emacs_tty *settings, int flushp)
 {
   /* Set the primary parameters - baud rate, character size, etcetera.  */
 #ifdef HAVE_TCATTR
@@ -934,7 +916,7 @@
       {
 	struct termios new;
 
-	bzero (&new, sizeof (new));
+	memset (&new, 0, sizeof (new));
 	/* Get the current settings, and see if they're what we asked for.  */
 	tcgetattr (fd, &new);
 	/* We cannot use memcmp on the whole structure here because under
@@ -1021,8 +1003,7 @@
 /* Initialize the terminal mode on the given tty device. */
 
 void
-init_sys_modes (tty_out)
-     struct tty_display_info *tty_out;
+init_sys_modes (struct tty_display_info *tty_out)
 {
   struct emacs_tty tty;
 
@@ -1033,10 +1014,10 @@
 
   if (!tty_out->output)
     return;                     /* The tty is suspended. */
-  
+
   if (! tty_out->old_tty)
     tty_out->old_tty = (struct emacs_tty *) xmalloc (sizeof (struct emacs_tty));
-      
+
   EMACS_GET_TTY (fileno (tty_out->input), tty_out->old_tty);
 
   tty = *tty_out->old_tty;
@@ -1094,7 +1075,7 @@
          means that the interrupt and quit feature must be
          disabled on secondary ttys, or we would not even see the
          keypress.
-         
+
          Note that even though emacsclient could have special code
          to pass SIGINT to Emacs, we should _not_ enable
          interrupt/quit keys for emacsclient frames.  This means
@@ -1112,7 +1093,7 @@
   tty.main.c_cc[VSWTCH] = CDISABLE;	/* Turn off shell layering use
 					   of C-z */
 #endif /* VSWTCH */
-  
+
 #if defined (__mips__) || defined (HAVE_TCATTR)
 #ifdef VSUSP
   tty.main.c_cc[VSUSP] = CDISABLE;	/* Turn off mips handling of C-z.  */
@@ -1203,9 +1184,9 @@
       tty.tchars.t_startc = '\021';
       tty.tchars.t_stopc = '\023';
     }
-  
+
   tty.lmode = LDECCTQ | LLITOUT | LPASS8 | LNOFLSH | tty_out->old_tty.lmode;
-  
+
 #endif /* HAVE_TCHARS */
 #endif /* not HAVE_TERMIO */
 
@@ -1365,8 +1346,7 @@
    to HEIGHT and WIDTH.  This is used mainly with ptys.  */
 
 int
-set_window_size (fd, height, width)
-     int fd, height, width;
+set_window_size (int fd, int height, int width)
 {
 #ifdef TIOCSWINSZ
 
@@ -1414,8 +1394,7 @@
    bottom of the frame, turn off interrupt-driven I/O, etc.  */
 
 void
-reset_sys_modes (tty_out)
-     struct tty_display_info *tty_out;
+reset_sys_modes (struct tty_display_info *tty_out)
 {
   if (noninteractive)
     {
@@ -1427,11 +1406,11 @@
 
   if (!tty_out->output)
     return;                     /* The tty is suspended. */
-  
+
   /* Go to and clear the last line of the terminal. */
 
   cmgoto (tty_out, FrameRows (tty_out) - 1, 0);
-  
+
   /* Code adapted from tty_clear_end_of_line. */
   if (tty_out->TS_clr_line)
     {
@@ -1441,16 +1420,16 @@
     {			/* have to do it the hard way */
       int i;
       tty_turn_off_insert (tty_out);
-      
+
       for (i = curX (tty_out); i < FrameCols (tty_out) - 1; i++)
         {
           fputc (' ', tty_out->output);
         }
     }
-  
+
   cmgoto (tty_out, FrameRows (tty_out) - 1, 0);
   fflush (tty_out->output);
-  
+
   if (tty_out->terminal->reset_terminal_modes_hook)
     tty_out->terminal->reset_terminal_modes_hook (tty_out->terminal);
 
@@ -1490,8 +1469,7 @@
 /* Set up the proper status flags for use of a pty.  */
 
 void
-setup_pty (fd)
-     int fd;
+setup_pty (int fd)
 {
   /* I'm told that TOICREMOTE does not mean control chars
      "can't be sent" but rather that they don't have
@@ -1527,83 +1505,6 @@
 }
 #endif /* HAVE_PTYS */
 
-#if !defined(CANNOT_DUMP) || !defined(SYSTEM_MALLOC)
-/* Some systems that cannot dump also cannot implement these.  */
-
-/*
- *	Return the address of the start of the text segment prior to
- *	doing an unexec.  After unexec the return value is undefined.
- *	See crt0.c for further explanation and _start.
- *
- */
-
-#if !(defined (__NetBSD__) && defined (__ELF__))
-#ifndef HAVE_TEXT_START
-char *
-start_of_text ()
-{
-#ifdef TEXT_START
-  return ((char *) TEXT_START);
-#else
-  extern int _start ();
-  return ((char *) _start);
-#endif /* TEXT_START */
-}
-#endif /* not HAVE_TEXT_START */
-#endif
-
-/*
- *	Return the address of the start of the data segment prior to
- *	doing an unexec.  After unexec the return value is undefined.
- *	See crt0.c for further information and definition of data_start.
- *
- *	Apparently, on BSD systems this is etext at startup.  On
- *	USG systems (swapping) this is highly mmu dependent and
- *	is also dependent on whether or not the program is running
- *	with shared text.  Generally there is a (possibly large)
- *	gap between end of text and start of data with shared text.
- *
- *	On Uniplus+ systems with shared text, data starts at a
- *	fixed address.  Each port (from a given oem) is generally
- *	different, and the specific value of the start of data can
- *	be obtained via the UniPlus+ specific "uvar" system call,
- *	however the method outlined in crt0.c seems to be more portable.
- *
- *	Probably what will have to happen when a USG unexec is available,
- *	at least on UniPlus, is temacs will have to be made unshared so
- *	that text and data are contiguous.  Then once loadup is complete,
- *	unexec will produce a shared executable where the data can be
- *	at the normal shared text boundary and the startofdata variable
- *	will be patched by unexec to the correct value.
- *
- */
-
-#ifndef start_of_data
-char *
-start_of_data ()
-{
-#ifdef DATA_START
-  return ((char *) DATA_START);
-#else
-#ifdef ORDINARY_LINK
-  /*
-   * This is a hack.  Since we're not linking crt0.c or pre_crt0.c,
-   * data_start isn't defined.  We take the address of environ, which
-   * is known to live at or near the start of the system crt0.c, and
-   * we don't sweat the handful of bytes that might lose.
-   */
-  extern char **environ;
-
-  return ((char *) &environ);
-#else
-  extern int data_start;
-  return ((char *) &data_start);
-#endif /* ORDINARY_LINK */
-#endif /* DATA_START */
-}
-#endif /* start_of_data */
-#endif /* NEED_STARTS (not CANNOT_DUMP or not SYSTEM_MALLOC) */
-
 /* init_system_name sets up the string for the Lisp function
    system-name to return. */
 
@@ -1621,7 +1522,7 @@
 #endif /* TRY_AGAIN */
 
 void
-init_system_name ()
+init_system_name (void)
 {
 #ifndef HAVE_GETHOSTNAME
   struct utsname uts;
@@ -1662,7 +1563,7 @@
         struct addrinfo hints;
         int ret;
 
-        memset (&hints, 0, sizeof(hints));
+        memset (&hints, 0, sizeof (hints));
         hints.ai_socktype = SOCK_STREAM;
         hints.ai_flags = AI_CANONNAME;
 
@@ -1774,8 +1675,8 @@
 
 int read_alarm_should_throw;
 
-SIGTYPE
-select_alarm ()
+void
+select_alarm (int ignore)
 {
   select_alarmed = 1;
   signal (SIGALRM, SIG_IGN);
@@ -1787,13 +1688,12 @@
 #ifndef WINDOWSNT
 /* Only rfds are checked.  */
 int
-sys_select (nfds, rfds, wfds, efds, timeout)
-     int nfds;
-     SELECT_TYPE *rfds, *wfds, *efds;
-     EMACS_TIME *timeout;
+sys_select (int nfds,
+	    SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
+	    EMACS_TIME *timeout)
 {
   /* XXX This needs to be updated for multi-tty support.  Is there
-     anybody who needs to emulate select these days?  */ 
+     anybody who needs to emulate select these days?  */
  int ravail = 0;
   SELECT_TYPE orfds;
   int timeoutval;
@@ -1924,12 +1824,11 @@
    waiting for at least one character.  */
 
 void
-read_input_waiting ()
+read_input_waiting (void)
 {
   /* XXX This needs to be updated for multi-tty support.  Is there
      anybody who needs to emulate select these days?  */
   int nread, i;
-  extern int quit_char;
 
   if (read_socket_hook)
     {
@@ -2077,7 +1976,7 @@
 #endif
 
 void
-init_signals ()
+init_signals (void)
 {
   sigemptyset (&empty_mask);
   sigfillset (&full_mask);
@@ -2283,8 +2182,7 @@
 #endif /* !RAND_BITS */
 
 void
-seed_random (arg)
-     long arg;
+seed_random (long int arg)
 {
 #ifdef HAVE_RANDOM
   srandom ((unsigned int)arg);
@@ -2302,7 +2200,7 @@
  * This suffices even for a 64-bit architecture with a 15-bit rand.
  */
 long
-get_random ()
+get_random (void)
 {
   long val = random ();
 #if VALBITS > RAND_BITS
@@ -2337,9 +2235,7 @@
 #endif /* ! HAVE_STRERROR */
 
 int
-emacs_open (path, oflag, mode)
-     const char *path;
-     int oflag, mode;
+emacs_open (const char *path, int oflag, int mode)
 {
   register int rtnval;
 
@@ -2350,8 +2246,7 @@
 }
 
 int
-emacs_close (fd)
-     int fd;
+emacs_close (int fd)
 {
   int did_retry = 0;
   register int rtnval;
@@ -2370,10 +2265,7 @@
 }
 
 int
-emacs_read (fildes, buf, nbyte)
-     int fildes;
-     char *buf;
-     unsigned int nbyte;
+emacs_read (int fildes, char *buf, unsigned int nbyte)
 {
   register int rtnval;
 
@@ -2384,10 +2276,7 @@
 }
 
 int
-emacs_write (fildes, buf, nbyte)
-     int fildes;
-     const char *buf;
-     unsigned int nbyte;
+emacs_write (int fildes, const char *buf, unsigned int nbyte)
 {
   register int rtnval, bytes_written;
 
@@ -2448,11 +2337,10 @@
 #ifndef HAVE_GETWD
 
 char *
-getwd (pathname)
-     char *pathname;
+getwd (char *pathname)
 {
   char *npath, *spath;
-  extern char *getcwd ();
+  extern char *getcwd (char *, size_t);
 
   BLOCK_INPUT;			/* getcwd uses malloc */
   spath = npath = getcwd ((char *) 0, MAXPATHLEN);
@@ -2481,9 +2369,8 @@
 
 #ifndef HAVE_RENAME
 
-rename (from, to)
-     const char *from;
-     const char *to;
+int
+rename (const char *from, const char *to)
 {
   if (access (from, 0) == 0)
     {
@@ -2503,7 +2390,8 @@
 /* HPUX curses library references perror, but as far as we know
    it won't be called.  Anyway this definition will do for now.  */
 
-perror ()
+void
+perror (void)
 {
 }
 #endif /* HPUX and not HAVE_PERROR */
@@ -2516,9 +2404,8 @@
  *	until we are, then close the unsuccessful ones.
  */
 
-dup2 (oldd, newd)
-     int oldd;
-     int newd;
+int
+dup2 (int oldd, int newd)
 {
   register int fd, ret;
 
@@ -2552,11 +2439,9 @@
 
 /* ARGSUSED */
 int
-gettimeofday (tp, tzp)
-     struct timeval *tp;
-     struct timezone *tzp;
+gettimeofday (struct timeval *tp, struct timezone *tzp)
 {
-  extern long time ();
+  extern long time (long);
 
   tp->tv_sec = time ((long *)0);
   tp->tv_usec = 0;
@@ -2574,8 +2459,7 @@
  */
 
 void
-croak (badfunc)
-     char *badfunc;
+croak (char *badfunc)
 {
   printf ("%s not yet implemented\r\n", badfunc);
   reset_all_sys_modes ();
@@ -2607,9 +2491,7 @@
 
 
 int
-set_file_times (filename, atime, mtime)
-     const char *filename;
-     EMACS_TIME atime, mtime;
+set_file_times (const char *filename, EMACS_TIME atime, EMACS_TIME mtime)
 {
 #ifdef HAVE_UTIMES
   struct timeval tv[2];
@@ -2646,9 +2528,7 @@
  * Make a directory.
  */
 int
-mkdir (dpath, dmode)
-     char *dpath;
-     int dmode;
+mkdir (char *dpath, int dmode)
 {
   int cpid, status, fd;
   struct stat statbuf;
@@ -2706,8 +2586,7 @@
 
 #ifndef HAVE_RMDIR
 int
-rmdir (dpath)
-     char *dpath;
+rmdir (char *dpath)
 {
   int cpid, status, fd;
   struct stat statbuf;
@@ -2752,10 +2631,62 @@
 #endif /* !HAVE_RMDIR */
 
 
+#ifndef HAVE_MEMSET
+void *
+memset (void *b, int n, size_t length)
+{
+  unsigned char *p = b;
+  while (length-- > 0)
+    *p++ = n;
+  return b;
+}
+#endif /* !HAVE_MEMSET */
+
+#ifndef HAVE_MEMCPY
+void *
+memcpy (void *b1, void *b2, size_t length)
+{
+  unsigned char *p1 = b1, *p2 = b2;
+  while (length-- > 0)
+    *p1++ = *p2++;
+  return b1;
+}
+#endif /* !HAVE_MEMCPY */
+
+#ifndef HAVE_MEMMOVE
+void *
+memmove (void *b1, void *b2, size_t length)
+{
+  unsigned char *p1 = b1, *p2 = b2;
+  if (p1 < p2 || p1 >= p2 + length)
+    while (length-- > 0)
+      *p1++ = *p2++;
+  else
+    {
+      p1 += length;
+      p2 += length;
+      while (length-- > 0)
+	*--p1 = *--p2;
+    }
+  return b1;
+}
+#endif /* !HAVE_MEMCPY */
+
+#ifndef HAVE_MEMCMP
+int
+memcmp (void *b1, void *b2, size_t length)
+{
+  unsigned char *p1 = b1, *p2 = b2;
+  while (length-- > 0)
+    if (*p1++ != *p2++)
+      return p1[-1] < p2[-1] ? -1 : 1;
+  return 0;
+}
+#endif /* !HAVE_MEMCMP */
+
 #ifndef HAVE_STRSIGNAL
 char *
-strsignal (code)
-     int code;
+strsignal (int code)
 {
   char *signame = 0;
 
@@ -2771,7 +2702,8 @@
 
 #ifdef HAVE_TERMIOS
 /* For make-serial-process  */
-int serial_open (char *port)
+int
+serial_open (char *port)
 {
   int fd = -1;
 
@@ -2804,7 +2736,8 @@
 #if !defined (HAVE_CFMAKERAW)
 /* Workaround for targets which are missing cfmakeraw.  */
 /* Pasted from man page.  */
-static void cfmakeraw (struct termios *termios_p)
+static void
+cfmakeraw (struct termios *termios_p)
 {
     termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
     termios_p->c_oflag &= ~OPOST;
@@ -2816,7 +2749,8 @@
 
 #if !defined (HAVE_CFSETSPEED)
 /* Workaround for targets which are missing cfsetspeed.  */
-static int cfsetspeed (struct termios *termios_p, speed_t vitesse)
+static int
+cfsetspeed (struct termios *termios_p, speed_t vitesse)
 {
   return (cfsetispeed (termios_p, vitesse)
 	  + cfsetospeed (termios_p, vitesse));
@@ -2826,7 +2760,7 @@
 /* For serial-process-configure  */
 void
 serial_configure (struct Lisp_Process *p,
-		      Lisp_Object contact)
+		  Lisp_Object contact)
 {
   Lisp_Object childp2 = Qnil;
   Lisp_Object tem = Qnil;
@@ -2869,7 +2803,7 @@
   CHECK_NUMBER (tem);
   if (XINT (tem) != 7 && XINT (tem) != 8)
     error (":bytesize must be nil (8), 7, or 8");
-  summary[0] = XINT(tem) + '0';
+  summary[0] = XINT (tem) + '0';
 #if defined (CSIZE) && defined (CS7) && defined (CS8)
   attr.c_cflag &= ~CSIZE;
   attr.c_cflag |= ((XINT (tem) == 7) ? CS7 : CS8);
@@ -2993,7 +2927,7 @@
 /* Process enumeration and access via /proc.  */
 
 Lisp_Object
-list_system_processes ()
+list_system_processes (void)
 {
   Lisp_Object procdir, match, proclist, next;
   struct gcpro gcpro1, gcpro2;
@@ -3027,7 +2961,7 @@
 #elif !defined (WINDOWSNT) && !defined (MSDOS)
 
 Lisp_Object
-list_system_processes ()
+list_system_processes (void)
 {
   return Qnil;
 }
@@ -3226,7 +3160,7 @@
   procfn_end = fn + strlen (fn);
   strcpy (procfn_end, "/stat");
   fd = emacs_open (fn, O_RDONLY, 0);
-  if (fd >= 0 && (nread = emacs_read (fd, procbuf, sizeof(procbuf) - 1)) > 0)
+  if (fd >= 0 && (nread = emacs_read (fd, procbuf, sizeof (procbuf) - 1)) > 0)
     {
       procbuf[nread] = '\0';
       p = procbuf;
@@ -3487,7 +3421,7 @@
   strcpy (procfn_end, "/psinfo");
   fd = emacs_open (fn, O_RDONLY, 0);
   if (fd >= 0
-      && (nread = read (fd, (char*)&pinfo, sizeof(struct psinfo)) > 0))
+      && (nread = read (fd, (char*)&pinfo, sizeof (struct psinfo)) > 0))
     {
           attrs = Fcons (Fcons (Qppid, make_fixnum_or_float (pinfo.pr_ppid)), attrs);
 	  attrs = Fcons (Fcons (Qpgrp, make_fixnum_or_float (pinfo.pr_pgid)), attrs);
--- a/src/syssignal.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/syssignal.h	Thu Jul 08 17:09:35 2010 +0900
@@ -17,7 +17,7 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-extern void init_signals P_ ((void));
+extern void init_signals (void);
 
 #if defined (HAVE_GTK_AND_PTHREAD) || defined (HAVE_NS)
 #include <pthread.h>
@@ -76,12 +76,12 @@
 
 /* Whether this is what all systems want or not, this is what
    appears to be assumed in the source, for example data.c:arith_error.  */
-typedef RETSIGTYPE (*signal_handler_t) (/*int*/);
+typedef RETSIGTYPE (*signal_handler_t) (int);
 
-signal_handler_t sys_signal P_ ((int signal_number, signal_handler_t action));
-sigset_t sys_sigblock   P_ ((sigset_t new_mask));
-sigset_t sys_sigunblock P_ ((sigset_t new_mask));
-sigset_t sys_sigsetmask P_ ((sigset_t new_mask));
+signal_handler_t sys_signal (int signal_number, signal_handler_t action);
+sigset_t sys_sigblock   (sigset_t new_mask);
+sigset_t sys_sigunblock (sigset_t new_mask);
+sigset_t sys_sigsetmask (sigset_t new_mask);
 
 #define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG)
 
@@ -113,9 +113,6 @@
 #endif
 #if defined (SIGIO) && defined (BROKEN_SIGIO)
 # undef SIGIO
-# if defined (__Lynx__)
-# undef SIGPOLL /* Defined as SIGIO on LynxOS */
-# endif
 #endif
 #if defined (SIGPOLL) && defined (BROKEN_SIGPOLL)
 #undef SIGPOLL
--- a/src/systime.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/systime.h	Thu Jul 08 17:09:35 2010 +0900
@@ -136,17 +136,17 @@
 #define EMACS_SET_SECS_USECS(time, secs, usecs) 		\
   (EMACS_SET_SECS (time, secs), EMACS_SET_USECS (time, usecs))
 
-extern int set_file_times __P ((const char *, EMACS_TIME, EMACS_TIME));
+extern int set_file_times (const char *, EMACS_TIME, EMACS_TIME);
 
 /* defined in keyboard.c */
-extern void set_waiting_for_input __P ((EMACS_TIME *));
+extern void set_waiting_for_input (EMACS_TIME *);
 
 /* When lisp.h is not included Lisp_Object is not defined (this can
    happen when this files is used outside the src directory).
    Use GCPRO1 to determine if lisp.h was included.  */
 #ifdef GCPRO1
 /* defined in dired.c */
-extern Lisp_Object make_time __P ((time_t));
+extern Lisp_Object make_time (time_t);
 #endif
 
 /* Compare times T1 and T2.  Value is 0 if T1 and T2 are the same.
--- a/src/term.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/term.c	Thu Jul 08 17:09:35 2010 +0900
@@ -66,10 +66,10 @@
 /* For now, don't try to include termcap.h.  On some systems,
    configure finds a non-standard termcap.h that the main build
    won't find.  */
-extern void tputs P_ ((const char *, int, int (*)(int)));
-extern int tgetent P_ ((char *, const char *));
-extern int tgetflag P_ ((char *id));
-extern int tgetnum P_ ((char *id));
+extern void tputs (const char *, int, int (*)(int));
+extern int tgetent (char *, const char *);
+extern int tgetflag (char *id);
+extern int tgetnum (char *id);
 
 #include "cm.h"
 #ifdef HAVE_X_WINDOWS
@@ -91,16 +91,16 @@
 #define DEV_TTY  "/dev/tty"
 #endif
 
-static void tty_set_scroll_region P_ ((struct frame *f, int start, int stop));
-static void turn_on_face P_ ((struct frame *, int face_id));
-static void turn_off_face P_ ((struct frame *, int face_id));
-static void tty_show_cursor P_ ((struct tty_display_info *));
-static void tty_hide_cursor P_ ((struct tty_display_info *));
-static void tty_background_highlight P_ ((struct tty_display_info *tty));
-static void clear_tty_hooks P_ ((struct terminal *terminal));
-static void set_tty_hooks P_ ((struct terminal *terminal));
-static void dissociate_if_controlling_tty P_ ((int fd));
-static void delete_tty P_ ((struct terminal *));
+static void tty_set_scroll_region (struct frame *f, int start, int stop);
+static void turn_on_face (struct frame *, int face_id);
+static void turn_off_face (struct frame *, int face_id);
+static void tty_show_cursor (struct tty_display_info *);
+static void tty_hide_cursor (struct tty_display_info *);
+static void tty_background_highlight (struct tty_display_info *tty);
+static void clear_tty_hooks (struct terminal *terminal);
+static void set_tty_hooks (struct terminal *terminal);
+static void dissociate_if_controlling_tty (int fd);
+static void delete_tty (struct terminal *);
 
 #define OUTPUT(tty, a)                                          \
   emacs_tputs ((tty), a,                                        \
@@ -181,13 +181,13 @@
 
 char *tparam ();
 
-extern char *tgetstr ();
+extern char *tgetstr (char *, char **);
 
 
 #ifdef HAVE_GPM
 #include <sys/fcntl.h>
 
-static void term_clear_mouse_face ();
+static void term_clear_mouse_face (void);
 static void term_mouse_highlight (struct frame *f, int x, int y);
 
 /* The device for which we have enabled gpm support (or NULL).  */
@@ -558,10 +558,7 @@
    sequence, and return a pointer to that byte sequence.  */
 
 unsigned char *
-encode_terminal_code (src, src_len, coding)
-     struct glyph *src;
-     int src_len;
-     struct coding_system *coding;
+encode_terminal_code (struct glyph *src, int src_len, struct coding_system *coding)
 {
   struct glyph *src_end = src + src_len;
   unsigned char *buf;
@@ -723,7 +720,7 @@
 						  encode_terminal_src_size);
 		  buf = encode_terminal_src + nbytes;
 		}
-	      bcopy (SDATA (string), buf, SBYTES (string));
+	      memcpy (buf, SDATA (string), SBYTES (string));
 	      buf += SBYTES (string);
 	      nchars += SCHARS (string);
 	    }
@@ -836,10 +833,8 @@
 #ifdef HAVE_GPM			/* Only used by GPM code.  */
 
 static void
-tty_write_glyphs_with_face (f, string, len, face_id)
-     register struct frame *f;
-     register struct glyph *string;
-     register int len, face_id;
+tty_write_glyphs_with_face (register struct frame *f, register struct glyph *string,
+			    register int len, register int face_id)
 {
   unsigned char *conversion_buffer;
   struct coding_system *coding;
@@ -1230,8 +1225,8 @@
           = (int *) xmalloc (sizeof (int)
                              + 2 * max_frame_cols * sizeof (int));
 
-      bzero (char_ins_del_vector, (sizeof (int)
-                                   + 2 * max_frame_cols * sizeof (int)));
+      memset (char_ins_del_vector, 0,
+	      (sizeof (int) + 2 * max_frame_cols * sizeof (int)));
 
 
       if (f && (!tty->TS_ins_line && !tty->TS_del_line))
@@ -1366,16 +1361,14 @@
 
 static char **term_get_fkeys_address;
 static KBOARD *term_get_fkeys_kboard;
-static Lisp_Object term_get_fkeys_1 ();
+static Lisp_Object term_get_fkeys_1 (void);
 
 /* Find the escape codes sent by the function keys for Vinput_decode_map.
    This function scans the termcap function key sequence entries, and
    adds entries to Vinput_decode_map for each function key it finds.  */
 
 static void
-term_get_fkeys (address, kboard)
-     char **address;
-     KBOARD *kboard;
+term_get_fkeys (char **address, KBOARD *kboard)
 {
   /* We run the body of the function (term_get_fkeys_1) and ignore all Lisp
      errors during the call.  The only errors should be from Fdefine_key
@@ -1385,14 +1378,14 @@
      function key specification, rather than giving the user an error and
      refusing to run at all on such a terminal.  */
 
-  extern Lisp_Object Fidentity ();
+  extern Lisp_Object Fidentity (Lisp_Object);
   term_get_fkeys_address = address;
   term_get_fkeys_kboard = kboard;
   internal_condition_case (term_get_fkeys_1, Qerror, Fidentity);
 }
 
 static Lisp_Object
-term_get_fkeys_1 ()
+term_get_fkeys_1 (void)
 {
   int i;
 
@@ -1517,10 +1510,10 @@
 #define produce_composite_glyph produce_composite_glyph_term
 #endif
 
-static void append_glyph P_ ((struct it *));
-static void produce_stretch_glyph P_ ((struct it *));
-static void append_composite_glyph P_ ((struct it *));
-static void produce_composite_glyph P_ ((struct it *));
+static void append_glyph (struct it *);
+static void produce_stretch_glyph (struct it *);
+static void append_composite_glyph (struct it *);
+static void produce_composite_glyph (struct it *);
 
 /* Append glyphs to IT's glyph_row.  Called from produce_glyphs for
    terminal frames if IT->glyph_row != NULL.  IT->char_to_display is
@@ -1529,8 +1522,7 @@
    IT->pixel_width > 1.  */
 
 static void
-append_glyph (it)
-     struct it *it;
+append_glyph (struct it *it)
 {
   struct glyph *glyph, *end;
   int i;
@@ -1609,8 +1601,7 @@
    instead they use the macro PRODUCE_GLYPHS.  */
 
 void
-produce_glyphs (it)
-     struct it *it;
+produce_glyphs (struct it *it)
 {
   /* If a hook is installed, let it do the work.  */
 
@@ -1728,8 +1719,7 @@
    to reach HPOS, a value in canonical character units.  */
 
 static void
-produce_stretch_glyph (it)
-     struct it *it;
+produce_stretch_glyph (struct it *it)
 {
   /* (space :width WIDTH ...)  */
   Lisp_Object prop, plist;
@@ -1798,8 +1788,7 @@
    face.  */
 
 static void
-append_composite_glyph (it)
-     struct it *it;
+append_composite_glyph (struct it *it)
 {
   struct glyph *glyph;
 
@@ -1863,8 +1852,7 @@
    correctly.  */
 
 static void
-produce_composite_glyph (it)
-     struct it *it;
+produce_composite_glyph (struct it *it)
 {
   int c;
 
@@ -1894,9 +1882,7 @@
    face_id, c, len of IT are left untouched.  */
 
 void
-produce_special_glyphs (it, what)
-     struct it *it;
-     enum display_element_type what;
+produce_special_glyphs (struct it *it, enum display_element_type what)
 {
   struct it temp_it;
   Lisp_Object gc;
@@ -1907,7 +1893,7 @@
   temp_it.what = IT_CHARACTER;
   temp_it.len = 1;
   temp_it.object = make_number (0);
-  bzero (&temp_it.current, sizeof temp_it.current);
+  memset (&temp_it.current, 0, sizeof temp_it.current);
 
   if (what == IT_CONTINUATION)
     {
@@ -1970,9 +1956,7 @@
    FACE_ID is a realized face ID number, in the face cache.  */
 
 static void
-turn_on_face (f, face_id)
-     struct frame *f;
-     int face_id;
+turn_on_face (struct frame *f, int face_id)
 {
   struct face *face = FACE_FROM_ID (f, face_id);
   long fg = face->foreground;
@@ -2069,9 +2053,7 @@
 /* Turn off appearances of face FACE_ID on tty frame F.  */
 
 static void
-turn_off_face (f, face_id)
-     struct frame *f;
-     int face_id;
+turn_off_face (struct frame *f, int face_id)
 {
   struct face *face = FACE_FROM_ID (f, face_id);
   struct tty_display_info *tty = FRAME_TTY (f);
@@ -2124,10 +2106,8 @@
    colors FG and BG.  */
 
 int
-tty_capable_p (tty, caps, fg, bg)
-     struct tty_display_info *tty;
-     unsigned caps;
-     unsigned long fg, bg;
+tty_capable_p (struct tty_display_info *tty, unsigned int caps,
+	       unsigned long fg, unsigned long bg)
 {
 #define TTY_CAPABLE_P_TRY(tty, cap, TS, NC_bit)				\
   if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit)))	\
@@ -2267,9 +2247,7 @@
 }
 
 void
-set_tty_color_mode (tty, f)
-     struct tty_display_info *tty;
-     struct frame *f;
+set_tty_color_mode (struct tty_display_info *tty, struct frame *f)
 {
   Lisp_Object tem, val;
   Lisp_Object color_mode;
@@ -2333,8 +2311,7 @@
    Returns NULL if the named terminal device is not opened.  */
 
 struct terminal *
-get_named_tty (name)
-     char *name;
+get_named_tty (char *name)
 {
   struct terminal *t;
 
@@ -2664,7 +2641,7 @@
 }
 
 static void
-term_clear_mouse_face ()
+term_clear_mouse_face (void)
 {
   if (!NILP (mouse_face_window))
     term_show_mouse_face (DRAW_NORMAL_TEXT);
@@ -3252,7 +3229,7 @@
     abort ();
 
   t = xmalloc (sizeof (struct tty_output));
-  bzero (t, sizeof (struct tty_output));
+  memset (t, 0, sizeof (struct tty_output));
 
   t->display_info = FRAME_TERMINAL (f)->display_info.tty;
 
@@ -3459,7 +3436,7 @@
 #else
   tty = (struct tty_display_info *) xmalloc (sizeof (struct tty_display_info));
 #endif
-  bzero (tty, sizeof (struct tty_display_info));
+  memset (tty, 0, sizeof (struct tty_display_info));
   tty->next = tty_list;
   tty_list = tty;
 
@@ -4051,7 +4028,7 @@
   xfree (tty->termcap_strings_buffer);
   xfree (tty->termcap_term_buffer);
 
-  bzero (tty, sizeof (struct tty_display_info));
+  memset (tty, 0, sizeof (struct tty_display_info));
   xfree (tty);
 }
 
@@ -4072,7 +4049,7 @@
 
 
 void
-syms_of_term ()
+syms_of_term (void)
 {
   DEFVAR_BOOL ("system-uses-terminfo", &system_uses_terminfo,
     doc: /* Non-nil means the system uses terminfo rather than termcap.
--- a/src/termcap.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/termcap.c	Thu Jul 08 17:09:35 2010 +0900
@@ -18,12 +18,7 @@
 Boston, MA 02110-1301, USA.  */
 
 /* Emacs config.h may rename various library functions such as malloc.  */
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-#ifdef emacs
-
 #include <setjmp.h>
 #include <lisp.h>		/* xmalloc is here */
 /* Get the O_* definitions for open et al.  */
@@ -35,31 +30,6 @@
 #include <unistd.h>
 #endif
 
-#else /* not emacs */
-
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <string.h>
-#else
-char *getenv ();
-char *malloc ();
-char *realloc ();
-#endif
-
-/* Do this after the include, in case string.h prototypes bcopy.  */
-#if (defined(HAVE_STRING_H) || defined(STDC_HEADERS)) && !defined(bcopy)
-#define bcopy(s, d, n) memcpy ((d), (s), (n))
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#endif /* not emacs */
-
 #ifndef NULL
 #define NULL (char *) 0
 #endif
@@ -89,37 +59,6 @@
 #define TERMCAP_FILE "/etc/termcap"
 #endif
 
-#ifndef emacs
-static void
-memory_out ()
-{
-  write (2, "virtual memory exhausted\n", 25);
-  exit (1);
-}
-
-static char *
-xmalloc (size)
-     unsigned size;
-{
-  register char *tem = malloc (size);
-
-  if (!tem)
-    memory_out ();
-  return tem;
-}
-
-static char *
-xrealloc (ptr, size)
-     char *ptr;
-     unsigned size;
-{
-  register char *tem = realloc (ptr, size);
-
-  if (!tem)
-    memory_out ();
-  return tem;
-}
-#endif /* not emacs */
 
 /* Looking up capabilities in the entry already found.  */
 
@@ -127,15 +66,14 @@
    for tgetnum, tgetflag and tgetstr to find.  */
 static char *term_entry;
 
-static char *tgetst1 ();
+static char *tgetst1 (char *ptr, char **area);
 
 /* Search entry BP for capability CAP.
    Return a pointer to the capability (in BP) if found,
    0 if not found.  */
 
 static char *
-find_capability (bp, cap)
-     register char *bp, *cap;
+find_capability (register char *bp, register char *cap)
 {
   for (; *bp; bp++)
     if (bp[0] == ':'
@@ -146,8 +84,7 @@
 }
 
 int
-tgetnum (cap)
-     char *cap;
+tgetnum (char *cap)
 {
   register char *ptr = find_capability (term_entry, cap);
   if (!ptr || ptr[-1] != '#')
@@ -156,8 +93,7 @@
 }
 
 int
-tgetflag (cap)
-     char *cap;
+tgetflag (char *cap)
 {
   register char *ptr = find_capability (term_entry, cap);
   return ptr && ptr[-1] == ':';
@@ -169,9 +105,7 @@
    If AREA is null, space is allocated with `malloc'.  */
 
 char *
-tgetstr (cap, area)
-     char *cap;
-     char **area;
+tgetstr (char *cap, char **area)
 {
   register char *ptr = find_capability (term_entry, cap);
   if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~'))
@@ -209,9 +143,7 @@
    or NULL if PTR is NULL.  */
 
 static char *
-tgetst1 (ptr, area)
-     char *ptr;
-     char **area;
+tgetst1 (char *ptr, char **area)
 {
   register char *p, *r;
   register int c;
@@ -322,7 +254,7 @@
 
 	cut[last_p_param].len = r - cut[last_p_param].beg;
 	for (i = 0, wp = ret; i <= last_p_param; wp += cut[i++].len)
-	  bcopy (cut[i].beg, wp, cut[i].len);
+	  memcpy (wp, cut[i].beg, cut[i].len);
 	r = wp;
       }
   }
@@ -357,10 +289,7 @@
 #endif /* not emacs */
 
 void
-tputs (str, nlines, outfun)
-     register char *str;
-     int nlines;
-     register int (*outfun) ();
+tputs (register char *str, int nlines, register int (*outfun) (/* ??? */))
 {
   register int padcount = 0;
   register int speed;
@@ -432,10 +361,10 @@
 
 /* Forward declarations of static functions.  */
 
-static int scan_file ();
-static char *gobble_line ();
-static int compare_contin ();
-static int name_match ();
+static int scan_file (char *str, int fd, register struct termcap_buffer *bufp);
+static char *gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end);
+static int compare_contin (register char *str1, register char *str2);
+static int name_match (char *line, char *name);
 
 #ifdef MSDOS /* MW, May 1993 */
 static int
@@ -460,8 +389,7 @@
    in it, and some other value otherwise.  */
 
 int
-tgetent (bp, name)
-     char *bp, *name;
+tgetent (char *bp, char *name)
 {
   register char *termcap_name;
   register int fd;
@@ -625,10 +553,7 @@
    or 0 if no entry is found in the file.  */
 
 static int
-scan_file (str, fd, bufp)
-     char *str;
-     int fd;
-     register struct termcap_buffer *bufp;
+scan_file (char *str, int fd, register struct termcap_buffer *bufp)
 {
   register char *end;
 
@@ -665,8 +590,7 @@
    by termcap entry LINE.  */
 
 static int
-name_match (line, name)
-     char *line, *name;
+name_match (char *line, char *name)
 {
   register char *tem;
 
@@ -681,8 +605,7 @@
 }
 
 static int
-compare_contin (str1, str2)
-     register char *str1, *str2;
+compare_contin (register char *str1, register char *str2)
 {
   register int c1, c2;
   while (1)
@@ -722,10 +645,7 @@
    thing as one line.  The caller decides when a line is continued.  */
 
 static char *
-gobble_line (fd, bufp, append_end)
-     int fd;
-     register struct termcap_buffer *bufp;
-     char *append_end;
+gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end)
 {
   register char *end;
   register int nread;
@@ -758,7 +678,7 @@
       else
 	{
 	  append_end -= bufp->ptr - buf;
-	  bcopy (bufp->ptr, buf, bufp->full -= bufp->ptr - buf);
+	  memcpy (buf, bufp->ptr, bufp->full -= bufp->ptr - buf);
 	  bufp->ptr = buf;
 	}
       if (!(nread = read (fd, buf + bufp->full, bufp->size - bufp->full)))
--- a/src/termhooks.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/termhooks.h	Thu Jul 08 17:09:35 2010 +0900
@@ -39,7 +39,7 @@
 /* If the value of the frame parameter changed, whis hook is called.
    For example, if going from fullscreen to not fullscreen this hook
    may do something OS dependent, like extended window manager hints on X11.  */
-extern void (*fullscreen_hook) P_ ((struct frame *f));
+extern void (*fullscreen_hook) (struct frame *f);
 
 
 /* Input queue declarations and hooks.  */
@@ -255,7 +255,7 @@
   Lisp_Object arg;
 };
 
-#define EVENT_INIT(event) bzero (&(event), sizeof (struct input_event))
+#define EVENT_INIT(event) memset (&(event), 0, sizeof (struct input_event))
 
 /* Bits in the modifiers member of the input_event structure.
    Note that reorder_modifiers assumes that the bits are in canonical
@@ -415,28 +415,28 @@
 
   /* Text display hooks.  */
 
-  void (*cursor_to_hook) P_ ((struct frame *f, int vpos, int hpos));
-  void (*raw_cursor_to_hook) P_ ((struct frame *, int, int));
+  void (*cursor_to_hook) (struct frame *f, int vpos, int hpos);
+  void (*raw_cursor_to_hook) (struct frame *, int, int);
 
-  void (*clear_to_end_hook) P_ ((struct frame *));
-  void (*clear_frame_hook) P_ ((struct frame *));
-  void (*clear_end_of_line_hook) P_ ((struct frame *, int));
+  void (*clear_to_end_hook) (struct frame *);
+  void (*clear_frame_hook) (struct frame *);
+  void (*clear_end_of_line_hook) (struct frame *, int);
 
-  void (*ins_del_lines_hook) P_ ((struct frame *f, int, int));
+  void (*ins_del_lines_hook) (struct frame *f, int, int);
 
-  void (*insert_glyphs_hook) P_ ((struct frame *f, struct glyph *s, int n));
-  void (*write_glyphs_hook) P_ ((struct frame *f, struct glyph *s, int n));
-  void (*delete_glyphs_hook) P_ ((struct frame *, int));
+  void (*insert_glyphs_hook) (struct frame *f, struct glyph *s, int n);
+  void (*write_glyphs_hook) (struct frame *f, struct glyph *s, int n);
+  void (*delete_glyphs_hook) (struct frame *, int);
 
-  void (*ring_bell_hook) P_ ((struct frame *f));
-  void (*toggle_invisible_pointer_hook) P_ ((struct frame *f, int invisible));
+  void (*ring_bell_hook) (struct frame *f);
+  void (*toggle_invisible_pointer_hook) (struct frame *f, int invisible);
 
-  void (*reset_terminal_modes_hook) P_ ((struct terminal *));
-  void (*set_terminal_modes_hook) P_ ((struct terminal *));
+  void (*reset_terminal_modes_hook) (struct terminal *);
+  void (*set_terminal_modes_hook) (struct terminal *);
 
-  void (*update_begin_hook) P_ ((struct frame *));
-  void (*update_end_hook) P_ ((struct frame *));
-  void (*set_terminal_window_hook) P_ ((struct frame *, int));
+  void (*update_begin_hook) (struct frame *);
+  void (*update_end_hook) (struct frame *);
+  void (*set_terminal_window_hook) (struct frame *, int);
 
   /* Multi-frame and mouse support hooks.  */
 
@@ -458,12 +458,12 @@
 
      This should clear mouse_moved until the next motion
      event arrives.  */
-  void (*mouse_position_hook) P_ ((struct frame **f, int,
-                                   Lisp_Object *bar_window,
-                                   enum scroll_bar_part *part,
-                                   Lisp_Object *x,
-                                   Lisp_Object *y,
-                                   unsigned long *time));
+  void (*mouse_position_hook) (struct frame **f, int,
+                               Lisp_Object *bar_window,
+                               enum scroll_bar_part *part,
+                               Lisp_Object *x,
+                               Lisp_Object *y,
+                               unsigned long *time);
 
   /* The window system handling code should set this if the mouse has
      moved since the last call to the mouse_position_hook.  Calling that
@@ -473,7 +473,7 @@
   /* When a frame's focus redirection is changed, this hook tells the
      window system code to re-decide where to put the highlight.  Under
      X, this means that Emacs lies about where the focus is.  */
-  void (*frame_rehighlight_hook) P_ ((struct frame *));
+  void (*frame_rehighlight_hook) (struct frame *);
 
   /* If we're displaying frames using a window system that can stack
      frames on top of each other, this hook allows you to bring a frame
@@ -485,12 +485,12 @@
      If RAISE is non-zero, F is brought to the front, before all other
      windows.  If RAISE is zero, F is sent to the back, behind all other
      windows.  */
-  void (*frame_raise_lower_hook) P_ ((struct frame *f, int raise));
+  void (*frame_raise_lower_hook) (struct frame *f, int raise);
 
   /* If the value of the frame parameter changed, whis hook is called.
      For example, if going from fullscreen to not fullscreen this hook
      may do something OS dependent, like extended window manager hints on X11.  */
-  void (*fullscreen_hook) P_ ((struct frame *f));
+  void (*fullscreen_hook) (struct frame *f);
 
   
   /* Scroll bar hooks.  */
@@ -520,9 +520,9 @@
      indicate that we are displaying PORTION characters out of a total
      of WHOLE characters, starting at POSITION.  If WINDOW doesn't yet
      have a scroll bar, create one for it.  */
-  void (*set_vertical_scroll_bar_hook) P_ ((struct window *window,
-                                            int portion, int whole,
-                                            int position));
+  void (*set_vertical_scroll_bar_hook) (struct window *window,
+                                        int portion, int whole,
+                                        int position);
 
 
   /* The following three hooks are used when we're doing a thorough
@@ -545,11 +545,11 @@
      If non-zero, this hook should be safe to apply to any frame,
      whether or not it can support scroll bars, and whether or not it is
      currently displaying them.  */
-  void (*condemn_scroll_bars_hook) P_ ((struct frame *frame));
+  void (*condemn_scroll_bars_hook) (struct frame *frame);
 
   /* Unmark WINDOW's scroll bar for deletion in this judgement cycle.
      Note that it's okay to redeem a scroll bar that is not condemned.  */
-  void (*redeem_scroll_bar_hook) P_ ((struct window *window));
+  void (*redeem_scroll_bar_hook) (struct window *window);
 
   /* Remove all scroll bars on FRAME that haven't been saved since the
      last call to `*condemn_scroll_bars_hook'.
@@ -562,7 +562,7 @@
      If non-zero, this hook should be safe to apply to any frame,
      whether or not it can support scroll bars, and whether or not it is
      currently displaying them.  */
-  void (*judge_scroll_bars_hook) P_ ((struct frame *FRAME));
+  void (*judge_scroll_bars_hook) (struct frame *FRAME);
 
 
   /* Called to read input events.
@@ -584,17 +584,17 @@
      Therefore, in most cases EXPECTED should be simply ignored.
 
      XXX This documentation needs to be updated.  */
-  int (*read_socket_hook) P_ ((struct terminal *terminal,
-                               int expected,
-                               struct input_event *hold_quit));
+  int (*read_socket_hook) (struct terminal *terminal,
+                           int expected,
+                           struct input_event *hold_quit);
 
   /* Called when a frame's display becomes entirely up to date.  */
-  void (*frame_up_to_date_hook) P_ ((struct frame *));
+  void (*frame_up_to_date_hook) (struct frame *);
 
 
   /* Called to delete the device-specific portions of a frame that is
      on this terminal device. */
-  void (*delete_frame_hook) P_ ((struct frame *));
+  void (*delete_frame_hook) (struct frame *);
 
   /* Called after the last frame on this terminal is deleted, or when
      the display device was closed (hangup).
@@ -606,7 +606,7 @@
      on the terminal.  delete_frame ensures that there are no live
      frames on the terminal when it calls this hook, so infinite
      recursion is prevented.  */
-  void (*delete_terminal_hook) P_ ((struct terminal *));
+  void (*delete_terminal_hook) (struct terminal *);
 };
 
 
@@ -647,10 +647,10 @@
 /* Return true if the terminal device is not suspended. */
 #define TERMINAL_ACTIVE_P(d) (((d)->type != output_termcap && (d)->type !=output_msdos_raw) || (d)->display_info.tty->input)
 
-extern Lisp_Object get_terminal_param P_ ((struct terminal *, Lisp_Object));
-extern struct terminal *get_terminal P_ ((Lisp_Object terminal, int));
-extern struct terminal *create_terminal P_ ((void));
-extern void delete_terminal P_ ((struct terminal *));
+extern Lisp_Object get_terminal_param (struct terminal *, Lisp_Object);
+extern struct terminal *get_terminal (Lisp_Object terminal, int);
+extern struct terminal *create_terminal (void);
+extern void delete_terminal (struct terminal *);
 
 /* The initial terminal device, created by initial_term_init. */
 extern struct terminal *initial_terminal;
--- a/src/terminal.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/terminal.c	Thu Jul 08 17:09:35 2010 +0900
@@ -40,7 +40,7 @@
 /* Function to use to ring the bell.  */
 Lisp_Object Vring_bell_function;
 
-static void delete_initial_terminal P_ ((struct terminal *));
+static void delete_initial_terminal (struct terminal *);
 
 
 
@@ -435,9 +435,7 @@
 
 /* Return the value of terminal parameter PARAM in terminal T.  */
 Lisp_Object
-get_terminal_param (t, param)
-     struct terminal *t;
-     Lisp_Object param;
+get_terminal_param (struct terminal *t, Lisp_Object param)
 {
   Lisp_Object tem = Fassq (param, t->param_alist);
   if (EQ (tem, Qnil))
@@ -449,10 +447,7 @@
    Return the previous value.  */
 
 Lisp_Object
-store_terminal_param (t, parameter, value)
-     struct terminal *t;
-     Lisp_Object parameter;
-     Lisp_Object value;
+store_terminal_param (struct terminal *t, Lisp_Object parameter, Lisp_Object value)
 {
   Lisp_Object old_alist_elt = Fassq (parameter, t->param_alist);
   if (EQ (old_alist_elt, Qnil))
@@ -552,7 +547,7 @@
 }
 
 void
-syms_of_terminal ()
+syms_of_terminal (void)
 {
 
   DEFVAR_LISP ("ring-bell-function", &Vring_bell_function,
--- a/src/terminfo.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/terminfo.c	Thu Jul 08 17:09:35 2010 +0900
@@ -35,13 +35,10 @@
 */
 
 char *
-tparam (string, outstring, len, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
-     char *string;
-     char *outstring;
-     int len, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9;
+tparam (char *string, char *outstring, int len, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
 {
   char *temp;
-  extern char *tparm();
+  extern char *tparm(/* ??? */);
 
   temp = tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
   if (outstring == 0)
--- a/src/textprop.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/textprop.c	Thu Jul 08 17:09:35 2010 +0900
@@ -78,15 +78,14 @@
 Lisp_Object interval_insert_behind_hooks;
 Lisp_Object interval_insert_in_front_hooks;
 
-static void text_read_only P_ ((Lisp_Object)) NO_RETURN;
+static void text_read_only (Lisp_Object) NO_RETURN;
 
 
 /* Signal a `text-read-only' error.  This function makes it easier
    to capture that error in GDB by putting a breakpoint on it.  */
 
 static void
-text_read_only (propval)
-     Lisp_Object propval;
+text_read_only (Lisp_Object propval)
 {
   if (STRINGP (propval))
     xsignal1 (Qtext_read_only, propval);
@@ -123,9 +122,7 @@
 #define hard 1
 
 INTERVAL
-validate_interval_range (object, begin, end, force)
-     Lisp_Object object, *begin, *end;
-     int force;
+validate_interval_range (Lisp_Object object, Lisp_Object *begin, Lisp_Object *end, int force)
 {
   register INTERVAL i;
   int searchpos;
@@ -191,8 +188,7 @@
    is even numbered and thus suitable as a plist.  */
 
 static Lisp_Object
-validate_plist (list)
-     Lisp_Object list;
+validate_plist (Lisp_Object list)
 {
   if (NILP (list))
     return Qnil;
@@ -218,9 +214,7 @@
    with the same values, of list PLIST.  */
 
 static int
-interval_has_all_properties (plist, i)
-     Lisp_Object plist;
-     INTERVAL i;
+interval_has_all_properties (Lisp_Object plist, INTERVAL i)
 {
   register Lisp_Object tail1, tail2, sym1;
   register int found;
@@ -256,9 +250,7 @@
    properties of PLIST, regardless of their values.  */
 
 static INLINE int
-interval_has_some_properties (plist, i)
-     Lisp_Object plist;
-     INTERVAL i;
+interval_has_some_properties (Lisp_Object plist, INTERVAL i)
 {
   register Lisp_Object tail1, tail2, sym;
 
@@ -280,9 +272,7 @@
    property names in LIST, regardless of their values.  */
 
 static INLINE int
-interval_has_some_properties_list (list, i)
-     Lisp_Object list;
-     INTERVAL i;
+interval_has_some_properties_list (Lisp_Object list, INTERVAL i)
 {
   register Lisp_Object tail1, tail2, sym;
 
@@ -305,8 +295,7 @@
 /* Return the value of PROP in property-list PLIST, or Qunbound if it
    has none.  */
 static Lisp_Object
-property_value (plist, prop)
-     Lisp_Object plist, prop;
+property_value (Lisp_Object plist, Lisp_Object prop)
 {
   Lisp_Object value;
 
@@ -324,9 +313,7 @@
    OBJECT is the string or buffer that INTERVAL belongs to.  */
 
 static void
-set_properties (properties, interval, object)
-     Lisp_Object properties, object;
-     INTERVAL interval;
+set_properties (Lisp_Object properties, INTERVAL interval, Lisp_Object object)
 {
   Lisp_Object sym, value;
 
@@ -372,10 +359,7 @@
    are actually added to I's plist) */
 
 static int
-add_properties (plist, i, object)
-     Lisp_Object plist;
-     INTERVAL i;
-     Lisp_Object object;
+add_properties (Lisp_Object plist, INTERVAL i, Lisp_Object object)
 {
   Lisp_Object tail1, tail2, sym1, val1;
   register int changed = 0;
@@ -451,10 +435,7 @@
    OBJECT is the string or buffer containing I.  */
 
 static int
-remove_properties (plist, list, i, object)
-     Lisp_Object plist, list;
-     INTERVAL i;
-     Lisp_Object object;
+remove_properties (Lisp_Object plist, Lisp_Object list, INTERVAL i, Lisp_Object object)
 {
   register Lisp_Object tail1, tail2, sym, current_plist;
   register int changed = 0;
@@ -535,9 +516,7 @@
    POSITION is BEG-based.  */
 
 INTERVAL
-interval_of (position, object)
-     int position;
-     Lisp_Object object;
+interval_of (int position, Lisp_Object object)
 {
   register INTERVAL i;
   int beg, end;
@@ -623,10 +602,7 @@
    window-specific overlays are considered only if they are associated
    with OBJECT. */
 Lisp_Object
-get_char_property_and_overlay (position, prop, object, overlay)
-     Lisp_Object position, object;
-     register Lisp_Object prop;
-     Lisp_Object *overlay;
+get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop, Lisp_Object object, Lisp_Object *overlay)
 {
   struct window *w = 0;
 
@@ -1020,8 +996,7 @@
 /* Return 1 if there's a change in some property between BEG and END.  */
 
 int
-property_change_between_p (beg, end)
-     int beg, end;
+property_change_between_p (int beg, int end)
 {
   register INTERVAL i, next;
   Lisp_Object object, pos;
@@ -1353,8 +1328,7 @@
    otherwise.  */
 
 Lisp_Object
-set_text_properties (start, end, properties, object, coherent_change_p)
-     Lisp_Object start, end, properties, object, coherent_change_p;
+set_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object object, Lisp_Object coherent_change_p)
 {
   register INTERVAL i;
   Lisp_Object ostart, oend;
@@ -1418,9 +1392,7 @@
    START and END can be in any order.  */
 
 void
-set_text_properties_1 (start, end, properties, buffer, i)
-     Lisp_Object start, end, properties, buffer;
-     INTERVAL i;
+set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object buffer, INTERVAL i)
 {
   register INTERVAL prev_changed = NULL_INTERVAL;
   register int s, len;
@@ -1777,8 +1749,7 @@
    BUFFER can be either a buffer or nil (meaning current buffer).  */
 
 int
-text_property_stickiness (prop, pos, buffer)
-     Lisp_Object prop, pos, buffer;
+text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer)
 {
   Lisp_Object prev_pos, front_sticky;
   int is_rear_sticky = 1, is_front_sticky = 0; /* defaults */
@@ -1851,8 +1822,7 @@
 /* Note this can GC when DEST is a buffer.  */
 
 Lisp_Object
-copy_text_properties (start, end, src, pos, dest, prop)
-       Lisp_Object start, end, src, pos, dest, prop;
+copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src, Lisp_Object pos, Lisp_Object dest, Lisp_Object prop)
 {
   INTERVAL i;
   Lisp_Object res;
@@ -1944,8 +1914,7 @@
    doesn't contain text properties between START and END.  */
 
 Lisp_Object
-text_property_list (object, start, end, prop)
-     Lisp_Object object, start, end, prop;
+text_property_list (Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object prop)
 {
   struct interval *i;
   Lisp_Object result;
@@ -2002,8 +1971,7 @@
    non-zero if OBJECT was modified.  */
 
 int
-add_text_properties_from_list (object, list, delta)
-     Lisp_Object object, list, delta;
+add_text_properties_from_list (Lisp_Object object, Lisp_Object list, Lisp_Object delta)
 {
   struct gcpro gcpro1, gcpro2;
   int modified_p = 0;
@@ -2036,8 +2004,7 @@
    end-points to NEW_END.  */
 
 Lisp_Object
-extend_property_ranges (list, new_end)
-     Lisp_Object list, new_end;
+extend_property_ranges (Lisp_Object list, Lisp_Object new_end)
 {
   Lisp_Object prev = Qnil, head = list;
   int max = XINT (new_end);
@@ -2072,8 +2039,7 @@
 /* Call the modification hook functions in LIST, each with START and END.  */
 
 static void
-call_mod_hooks (list, start, end)
-     Lisp_Object list, start, end;
+call_mod_hooks (Lisp_Object list, Lisp_Object start, Lisp_Object end)
 {
   struct gcpro gcpro1;
   GCPRO1 (list);
@@ -2094,9 +2060,7 @@
    those hooks in order, with START and END - 1 as arguments.  */
 
 void
-verify_interval_modification (buf, start, end)
-     struct buffer *buf;
-     int start, end;
+verify_interval_modification (struct buffer *buf, int start, int end)
 {
   register INTERVAL intervals = BUF_INTERVALS (buf);
   register INTERVAL i;
@@ -2274,8 +2238,7 @@
    so it can indicate the range of inserted text.  */
 
 void
-report_interval_modification (start, end)
-     Lisp_Object start, end;
+report_interval_modification (Lisp_Object start, Lisp_Object end)
 {
   if (! NILP (interval_insert_behind_hooks))
     call_mod_hooks (interval_insert_behind_hooks, start, end);
@@ -2286,7 +2249,7 @@
 }
 
 void
-syms_of_textprop ()
+syms_of_textprop (void)
 {
   DEFVAR_LISP ("default-text-properties", &Vdefault_text_properties,
 	       doc: /* Property-list used as default values.
--- a/src/tparam.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/tparam.c	Thu Jul 08 17:09:35 2010 +0900
@@ -18,66 +18,14 @@
 Boston, MA 02110-1301, USA.  */
 
 /* Emacs config.h may rename various library functions such as malloc.  */
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-#ifdef emacs
 #include <setjmp.h>
 #include "lisp.h"		/* for xmalloc */
-#else
-
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <string.h>
-#else
-char *malloc ();
-char *realloc ();
-#endif
-
-/* Do this after the include, in case string.h prototypes bcopy.  */
-#if (defined(HAVE_STRING_H) || defined(STDC_HEADERS)) && !defined(bcopy)
-#define bcopy(s, d, n) memcpy ((d), (s), (n))
-#endif
-
-#endif /* not emacs */
 
 #ifndef NULL
 #define NULL (char *) 0
 #endif
 
-#ifndef emacs
-static void
-memory_out ()
-{
-  write (2, "virtual memory exhausted\n", 25);
-  exit (1);
-}
-
-static char *
-xmalloc (size)
-     unsigned size;
-{
-  register char *tem = malloc (size);
-
-  if (!tem)
-    memory_out ();
-  return tem;
-}
-
-static char *
-xrealloc (ptr, size)
-     char *ptr;
-     unsigned size;
-{
-  register char *tem = realloc (ptr, size);
-
-  if (!tem)
-    memory_out ();
-  return tem;
-}
-#endif /* not emacs */
-
 /* Assuming STRING is the value of a termcap string entry
    containing `%' constructs to expand parameters,
    merge in parameter values and store result in block OUTSTRING points to.
@@ -90,15 +38,11 @@
 
    The fourth and following args to tparam serve as the parameter values.  */
 
-static char *tparam1 ();
+static char *tparam1 (char *string, char *outstring, int len, char *up, char *left, register int *argp);
 
 /* VARARGS 2 */
 char *
-tparam (string, outstring, len, arg0, arg1, arg2, arg3)
-     char *string;
-     char *outstring;
-     int len;
-     int arg0, arg1, arg2, arg3;
+tparam (char *string, char *outstring, int len, int arg0, int arg1, int arg2, int arg3)
 {
   int arg[4];
 
@@ -115,9 +59,7 @@
 static char tgoto_buf[50];
 
 char *
-tgoto (cm, hpos, vpos)
-     char *cm;
-     int hpos, vpos;
+tgoto (char *cm, int hpos, int vpos)
 {
   int args[2];
   if (!cm)
@@ -128,12 +70,7 @@
 }
 
 static char *
-tparam1 (string, outstring, len, up, left, argp)
-     char *string;
-     char *outstring;
-     int len;
-     char *up, *left;
-     register int *argp;
+tparam1 (char *string, char *outstring, int len, char *up, char *left, register int *argp)
 {
   register int c;
   register char *p = string;
@@ -162,7 +99,7 @@
 	    {
 	      outlen = len + 40;
 	      new = (char *) xmalloc (outlen);
-	      bcopy (outstring, new, offset);
+	      memcpy (new, outstring, offset);
 	    }
 	  else
 	    {
--- a/src/undo.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/undo.c	Thu Jul 08 17:09:35 2010 +0900
@@ -67,8 +67,7 @@
    undo record that will be added just after this command terminates.  */
 
 static void
-record_point (pt)
-     int pt;
+record_point (int pt)
 {
   int at_boundary;
 
@@ -130,8 +129,7 @@
    because we don't need to record the contents.)  */
 
 void
-record_insert (beg, length)
-     int beg, length;
+record_insert (int beg, int length)
 {
   Lisp_Object lbeg, lend;
 
@@ -166,9 +164,7 @@
    of the characters in STRING, at location BEG.  */
 
 void
-record_delete (beg, string)
-     int beg;
-     Lisp_Object string;
+record_delete (int beg, Lisp_Object string)
 {
   Lisp_Object sbeg;
 
@@ -196,9 +192,7 @@
    won't be inverted automatically by undoing the buffer modification.  */
 
 void
-record_marker_adjustment (marker, adjustment)
-     Lisp_Object marker;
-     int adjustment;
+record_marker_adjustment (Lisp_Object marker, int adjustment)
 {
   if (EQ (current_buffer->undo_list, Qt))
     return;
@@ -221,8 +215,7 @@
    The replacement must not change the number of characters.  */
 
 void
-record_change (beg, length)
-     int beg, length;
+record_change (int beg, int length)
 {
   record_delete (beg, make_buffer_string (beg, beg + length, 1));
   record_insert (beg, length);
@@ -233,7 +226,7 @@
    we can tell whether it is obsolete because the file was saved again.  */
 
 void
-record_first_change ()
+record_first_change (void)
 {
   Lisp_Object high, low;
   struct buffer *base_buffer = current_buffer;
@@ -257,9 +250,7 @@
    for LENGTH characters starting at position BEG in BUFFER.  */
 
 void
-record_property_change (beg, length, prop, value, buffer)
-     int beg, length;
-     Lisp_Object prop, value, buffer;
+record_property_change (int beg, int length, Lisp_Object prop, Lisp_Object value, Lisp_Object buffer)
 {
   Lisp_Object lbeg, lend, entry;
   struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer);
@@ -328,8 +319,7 @@
    In some cases this works by calling undo-outer-limit-function.  */
 
 void
-truncate_undo_list (b)
-     struct buffer *b;
+truncate_undo_list (struct buffer *b)
 {
   Lisp_Object list;
   Lisp_Object prev, next, last_boundary;
@@ -665,7 +655,7 @@
 }
 
 void
-syms_of_undo ()
+syms_of_undo (void)
 {
   Qinhibit_read_only = intern_c_string ("inhibit-read-only");
   staticpro (&Qinhibit_read_only);
--- a/src/unexaix.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/unexaix.c	Thu Jul 08 17:09:35 2010 +0900
@@ -71,7 +71,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
-extern char *start_of_text (void);		/* Start of text */
+char *start_of_text (void);		        /* Start of text */
 extern char *start_of_data (void);		/* Start of initialized data */
 
 extern int _data;
@@ -669,5 +669,18 @@
   return 0;
 }
 
+/*
+ *	Return the address of the start of the text segment prior to
+ *	doing an unexec.  After unexec the return value is undefined.
+ *	See crt0.c for further explanation and _start.
+ *
+ */
+
+char *
+start_of_text (void)
+{
+  return ((char *) 0x10000000);
+}
+
 /* arch-tag: 0783857a-7c2d-456f-a426-58b722d69fd0
    (do not change this comment) */
--- a/src/unexalpha.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/unexalpha.c	Thu Jul 08 17:09:35 2010 +0900
@@ -28,9 +28,7 @@
 #include <sys/mman.h>
 #include <stdio.h>
 #include <errno.h>
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 #if !defined (__NetBSD__) && !defined (__OpenBSD__)
 #include <filehdr.h>
 #include <aouthdr.h>
@@ -79,12 +77,14 @@
 #define	_RDATA		".rdata"
 #define	_SDATA		".sdata"
 #define	_SBSS		".sbss"
+#define TEXT_START     0x120000000
 #endif /* __NetBSD__ || __OpenBSD__ */
 
-static void fatal_unexec __P ((char *, char *));
-static void mark_x __P ((char *));
 
-static void update_dynamic_symbols __P ((char *, char *, int, struct aouthdr));
+static void fatal_unexec (char *, char *);
+static void mark_x (char *);
+
+static void update_dynamic_symbols (char *, char *, int, struct aouthdr);
 
 #define READ(_fd, _buffer, _size, _error_message, _error_arg) \
 	errno = EEOF; \
@@ -260,7 +260,7 @@
 
   Brk = brk;
 
-  bcopy (data_section, &old_data_scnhdr, sizeof (old_data_scnhdr));
+  memcpy (&old_data_scnhdr, data_section, sizeof (old_data_scnhdr));
 
   nhdr.aout.dsize = brk - DATA_START;
   nhdr.aout.bsize = 0;
@@ -328,7 +328,7 @@
 #ifdef _GOT
   if (got_section != NULL)
     {
-      bcopy (got_section, buffer, sizeof (struct scnhdr));
+      memcpy (buffer, got_section, sizeof (struct scnhdr));
 
       got_section->s_vaddr = vaddr;
       got_section->s_paddr = vaddr;
@@ -376,7 +376,7 @@
    * Construct new symbol table header
    */
 
-  bcopy (oldptr + nhdr.fhdr.f_symptr, buffer, cbHDRR);
+  memcpy (buffer, oldptr + nhdr.fhdr.f_symptr, cbHDRR);
 
 #define symhdr ((pHDRR)buffer)
   newsyms = nhdr.aout.tsize + nhdr.aout.dsize;
--- a/src/unexec.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/unexec.c	Thu Jul 08 17:09:35 2010 +0900
@@ -472,7 +472,7 @@
   int pagesize = getpagesize ();
   char zeros[1 << 13];
 
-  bzero (zeros, sizeof (zeros));
+  memset (zeros, 0, sizeof (zeros));
 
   for (i = 0; ptr < end;)
     {
@@ -687,6 +687,21 @@
   return 0;
 }
 
+extern unsigned start __asm__ ("start");
+
+/*
+ *	Return the address of the start of the text segment prior to
+ *	doing an unexec.  After unexec the return value is undefined.
+ *	See crt0.c for further explanation and _start.
+ *
+ */
+
+char *
+start_of_text (void)
+{
+  return ((char *) &start);
+}
+
 /* ****************************************************************
  * unexec
  *
--- a/src/unexelf.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/unexelf.c	Thu Jul 08 17:09:35 2010 +0900
@@ -594,8 +594,7 @@
 /* Round X up to a multiple of Y.  */
 
 static ElfW(Addr)
-round_up (x, y)
-     ElfW(Addr) x, y;
+round_up (ElfW(Addr) x, ElfW(Addr) y)
 {
   int rem = x % y;
   if (rem == 0)
@@ -611,13 +610,8 @@
    if NOERROR is 0; we return -1 if NOERROR is nonzero.  */
 
 static int
-find_section (name, section_names, file_name, old_file_h, old_section_h, noerror)
-     char *name;
-     char *section_names;
-     char *file_name;
-     ElfW(Ehdr) *old_file_h;
-     ElfW(Shdr) *old_section_h;
-     int noerror;
+find_section (char *name, char *section_names, char *file_name,
+	      ElfW(Ehdr) *old_file_h, ElfW(Shdr) *old_section_h, int noerror)
 {
   int idx;
 
@@ -652,9 +646,8 @@
  *
  */
 void
-unexec (new_name, old_name, data_start, bss_start, entry_address)
-     char *new_name, *old_name;
-     unsigned data_start, bss_start, entry_address;
+unexec (char *new_name, char *old_name, unsigned int data_start,
+	unsigned int bss_start, unsigned int entry_address)
 {
   int new_file, old_file, new_file_size;
 
--- a/src/unexmacosx.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/unexmacosx.c	Thu Jul 08 17:09:35 2010 +0900
@@ -218,7 +218,7 @@
   char buf[UNEXEC_COPY_BUFSZ];
   ssize_t bytes;
 
-  bzero (buf, UNEXEC_COPY_BUFSZ);
+  memset (buf, 0, UNEXEC_COPY_BUFSZ);
   if (lseek (outfd, dest, SEEK_SET) != dest)
     return 0;
 
--- a/src/vm-limit.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/vm-limit.c	Thu Jul 08 17:09:35 2010 +0900
@@ -23,13 +23,6 @@
 #include "lisp.h"
 #endif
 
-#ifndef emacs
-#include <stddef.h>
-typedef size_t SIZE;
-typedef void *POINTER;
-#define EXCEEDS_LISP_PTR(x) 0
-#endif
-
 #include "mem-limits.h"
 
 #ifdef HAVE_GETRLIMIT
@@ -49,7 +42,7 @@
 
 /* Function to call to issue a warning;
    0 means don't issue them.  */
-static void (*warn_function) ();
+static void (*warn_function) (char *);
 
 /* Start of data space; can be changed by calling malloc_init.  */
 static POINTER data_space_start;
@@ -58,17 +51,9 @@
 static unsigned long lim_data;
 
 
-#ifdef NO_LIM_DATA
-static void
-get_lim_data ()
-{
-  lim_data = -1;
-}
-#else /* not NO_LIM_DATA */
-
 #if defined (HAVE_GETRLIMIT) && defined (RLIMIT_AS)
 static void
-get_lim_data ()
+get_lim_data (void)
 {
   struct rlimit rlimit;
 
@@ -181,12 +166,11 @@
 #endif /* not WINDOWSNT */
 #endif /* not USG */
 #endif /* not HAVE_GETRLIMIT */
-#endif /* not NO_LIM_DATA */
 
 /* Verify amount of memory available, complaining if we're near the end. */
 
 static void
-check_memory_limits ()
+check_memory_limits (void)
 {
 #ifdef REL_ALLOC
   extern POINTER (*real_morecore) ();
@@ -260,16 +244,54 @@
     (*warn_function) ("Warning: memory in use exceeds lisp pointer size");
 }
 
+#if !defined(CANNOT_DUMP) || !defined(SYSTEM_MALLOC)
+/* Some systems that cannot dump also cannot implement these.  */
+
+/*
+ *	Return the address of the start of the data segment prior to
+ *	doing an unexec.  After unexec the return value is undefined.
+ *	See crt0.c for further information and definition of data_start.
+ *
+ *	Apparently, on BSD systems this is etext at startup.  On
+ *	USG systems (swapping) this is highly mmu dependent and
+ *	is also dependent on whether or not the program is running
+ *	with shared text.  Generally there is a (possibly large)
+ *	gap between end of text and start of data with shared text.
+ *
+ */
+
+POINTER
+start_of_data (void)
+{
+#ifdef BSD_SYSTEM
+  extern char etext;
+  return (POINTER)(&etext);
+#elif defined DATA_START
+  return ((POINTER) DATA_START);
+#elif defined ORDINARY_LINK
+  /*
+   * This is a hack.  Since we're not linking crt0.c or pre_crt0.c,
+   * data_start isn't defined.  We take the address of environ, which
+   * is known to live at or near the start of the system crt0.c, and
+   * we don't sweat the handful of bytes that might lose.
+   */
+  extern char **environ;
+  return ((POINTER) &environ);
+#else
+  extern int data_start;
+  return ((POINTER) &data_start);
+#endif
+}
+#endif /* (not CANNOT_DUMP or not SYSTEM_MALLOC) */
+
 /* Enable memory usage warnings.
    START says where the end of pure storage is.
    WARNFUN specifies the function to call to issue a warning.  */
 
 void
-memory_warnings (start, warnfun)
-     POINTER start;
-     void (*warnfun) ();
+memory_warnings (POINTER start, void (*warnfun) (char *))
 {
-  extern void (* __after_morecore_hook) ();     /* From gmalloc.c */
+  extern void (* __after_morecore_hook) (void);     /* From gmalloc.c */
 
   if (start)
     data_space_start = start;
--- a/src/w16select.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w16select.c	Thu Jul 08 17:09:35 2010 +0900
@@ -109,7 +109,7 @@
 
 /* Return the WinOldAp support version, or 0x1700 if not supported.  */
 unsigned
-identify_winoldap_version ()
+identify_winoldap_version (void)
 {
   __dpmi_regs regs;
 
@@ -124,7 +124,7 @@
 
 /* Open the clipboard, return non-zero if successfull.  */
 unsigned
-open_clipboard ()
+open_clipboard (void)
 {
   __dpmi_regs regs;
 
@@ -147,7 +147,7 @@
 
 /* Empty clipboard, return non-zero if successfull.  */
 unsigned
-empty_clipboard ()
+empty_clipboard (void)
 {
   __dpmi_regs regs;
 
@@ -162,8 +162,7 @@
 /* Ensure we have a buffer in low memory with enough memory for data
    of size WANT_SIZE.  Return the linear address of the buffer.  */
 static unsigned long
-alloc_xfer_buf (want_size)
-     unsigned want_size;
+alloc_xfer_buf (unsigned want_size)
 {
   __dpmi_regs regs;
 
@@ -200,7 +199,7 @@
    The clipboard buffer tends to be large in size, because for small
    clipboard data sizes we use the DJGPP transfer buffer.  */
 static void
-free_xfer_buf ()
+free_xfer_buf (void)
 {
   /* If the size is 0, we used DJGPP transfer buffer, so don't free.  */
   if (clipboard_xfer_buf_info.size)
@@ -218,11 +217,7 @@
 
 /* Copy data into the clipboard, return zero if successfull.  */
 unsigned
-set_clipboard_data (Format, Data, Size, Raw)
-     unsigned Format;
-     void *Data;
-     unsigned Size;
-     int Raw;
+set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
 {
   __dpmi_regs regs;
   unsigned truelen;
@@ -321,8 +316,7 @@
 
 /* Return the size of the clipboard data of format FORMAT.  */
 unsigned
-get_clipboard_data_size (Format)
-     unsigned Format;
+get_clipboard_data_size (unsigned Format)
 {
   __dpmi_regs regs;
 
@@ -342,11 +336,7 @@
    Warning: this doesn't check whether DATA has enough space to hold
    SIZE bytes.  */
 unsigned
-get_clipboard_data (Format, Data, Size, Raw)
-     unsigned Format;
-     void *Data;
-     unsigned Size;
-     int Raw;
+get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
 {
   __dpmi_regs regs;
   unsigned long xbuf_addr;
@@ -425,7 +415,7 @@
 
 /* Close clipboard, return non-zero if successfull.  */
 unsigned
-close_clipboard ()
+close_clipboard (void)
 {
   __dpmi_regs regs;
 
@@ -439,8 +429,7 @@
 
 /* Compact clipboard data so that at least SIZE bytes is available.  */
 unsigned
-clipboard_compact (Size)
-     unsigned Size;
+clipboard_compact (unsigned Size)
 {
   __dpmi_regs regs;
 
@@ -705,7 +694,7 @@
 }
 
 void
-syms_of_win16select ()
+syms_of_win16select (void)
 {
   defsubr (&Sw16_set_clipboard_data);
   defsubr (&Sw16_get_clipboard_data);
--- a/src/w32.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32.c	Thu Jul 08 17:09:35 2010 +0900
@@ -148,7 +148,7 @@
 typedef HRESULT (WINAPI * ShGetFolderPath_fn)
   (IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *);
 
-void globals_of_w32 ();
+void globals_of_w32 (void);
 static DWORD get_rid (PSID);
 
 extern Lisp_Object Vw32_downcase_file_names;
@@ -308,15 +308,15 @@
 
   /* ** A utility function ** */
 static BOOL
-is_windows_9x ()
+is_windows_9x (void)
 {
   static BOOL s_b_ret=0;
   OSVERSIONINFO os_ver;
   if (g_b_init_is_windows_9x == 0)
     {
       g_b_init_is_windows_9x = 1;
-      ZeroMemory(&os_ver, sizeof(OSVERSIONINFO));
-      os_ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+      ZeroMemory (&os_ver, sizeof (OSVERSIONINFO));
+      os_ver.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
       if (GetVersionEx (&os_ver))
         {
           s_b_ret = (os_ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
@@ -329,12 +329,12 @@
    Returns a list of three integers if the times are provided by the OS
    (NT derivatives), otherwise it returns the result of current-time. */
 Lisp_Object
-w32_get_internal_run_time ()
+w32_get_internal_run_time (void)
 {
   if (get_process_times_fn)
     {
       FILETIME create, exit, kernel, user;
-      HANDLE proc = GetCurrentProcess();
+      HANDLE proc = GetCurrentProcess ();
       if ((*get_process_times_fn) (proc, &create, &exit, &kernel, &user))
         {
           LARGE_INTEGER user_int, kernel_int, total;
@@ -753,7 +753,7 @@
     lpSystemInfo->dwNumberOfProcessors = -1;
 }
 
-BOOL WINAPI get_system_times(
+BOOL WINAPI get_system_times (
     LPFILETIME lpIdleTime,
     LPFILETIME lpKernelTime,
     LPFILETIME lpUserTime)
@@ -1035,13 +1035,13 @@
 };
 
 unsigned
-getuid ()
+getuid (void)
 {
   return dflt_passwd.pw_uid;
 }
 
 unsigned
-geteuid ()
+geteuid (void)
 {
   /* I could imagine arguing for checking to see whether the user is
      in the Administrators group and returning a UID of 0 for that
@@ -1050,13 +1050,13 @@
 }
 
 unsigned
-getgid ()
+getgid (void)
 {
   return dflt_passwd.pw_gid;
 }
 
 unsigned
-getegid ()
+getegid (void)
 {
   return getgid ();
 }
@@ -1091,7 +1091,7 @@
 }
 
 void
-init_user_info ()
+init_user_info (void)
 {
   /* Find the user's real name by opening the process token and
      looking up the name associated with the user-sid in that token.
@@ -1207,7 +1207,7 @@
 }
 
 int
-random ()
+random (void)
 {
   /* rand () on NT gives us 15 random bits...hack together 30 bits.  */
   return ((rand () << 15) | rand ());
@@ -1225,9 +1225,7 @@
    case path name components to lower case.  */
 
 static void
-normalize_filename (fp, path_sep)
-     register char *fp;
-     char path_sep;
+normalize_filename (register char *fp, char path_sep)
 {
   char sep;
   char *elem;
@@ -1283,16 +1281,14 @@
 
 /* Destructively turn backslashes into slashes.  */
 void
-dostounix_filename (p)
-     register char *p;
+dostounix_filename (register char *p)
 {
   normalize_filename (p, '/');
 }
 
 /* Destructively turn slashes into backslashes.  */
 void
-unixtodos_filename (p)
-     register char *p;
+unixtodos_filename (register char *p)
 {
   normalize_filename (p, '\\');
 }
@@ -1301,9 +1297,7 @@
    (From msdos.c...probably should figure out a way to share it,
    although this code isn't going to ever change.)  */
 int
-crlf_to_lf (n, buf)
-     register int n;
-     register unsigned char *buf;
+crlf_to_lf (register int n, register unsigned char *buf)
 {
   unsigned char *np = buf;
   unsigned char *startp = buf;
@@ -1520,9 +1514,7 @@
 #define REG_ROOT "SOFTWARE\\GNU\\Emacs"
 
 LPBYTE
-w32_get_resource (key, lpdwtype)
-    char *key;
-    LPDWORD lpdwtype;
+w32_get_resource (char *key, LPDWORD lpdwtype)
 {
   LPBYTE lpvalue;
   HKEY hrootkey = NULL;
@@ -1642,7 +1634,7 @@
       {"LANG", NULL},
     };
 
-#define N_ENV_VARS sizeof(dflt_envvars)/sizeof(dflt_envvars[0])
+#define N_ENV_VARS sizeof (dflt_envvars)/sizeof (dflt_envvars[0])
 
     /* We need to copy dflt_envvars[] and work on the copy because we
        don't want the dumped Emacs to inherit the values of
@@ -1715,7 +1707,7 @@
 	  for (p = modname; *p; p++)
 	    if (*p == '\\') *p = '/';
 
-	  _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname);
+	  _snprintf (buf, sizeof (buf)-1, "emacs_dir=%s", modname);
 	  _putenv (strdup (buf));
 	}
       /* Handle running emacs from the build directory: src/oo-spd/i386/  */
@@ -1739,7 +1731,7 @@
 		  for (p = modname; *p; p++)
 		    if (*p == '\\') *p = '/';
 
-		  _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname);
+		  _snprintf (buf, sizeof (buf)-1, "emacs_dir=%s", modname);
 		  _putenv (strdup (buf));
 		}
 	    }
@@ -1767,12 +1759,12 @@
 		char buf1[SET_ENV_BUF_SIZE], buf2[SET_ENV_BUF_SIZE];
 
 		if (dwType == REG_EXPAND_SZ)
-		  ExpandEnvironmentStrings ((LPSTR) lpval, buf1, sizeof(buf1));
+		  ExpandEnvironmentStrings ((LPSTR) lpval, buf1, sizeof (buf1));
 		else if (dwType == REG_SZ)
 		  strcpy (buf1, lpval);
 		if (dwType == REG_EXPAND_SZ || dwType == REG_SZ)
 		  {
-		    _snprintf (buf2, sizeof(buf2)-1, "%s=%s", env_vars[i].name,
+		    _snprintf (buf2, sizeof (buf2)-1, "%s=%s", env_vars[i].name,
 			       buf1);
 		    _putenv (strdup (buf2));
 		  }
@@ -2115,7 +2107,7 @@
      involve network access, and so is extremely quick).  */
 
   /* Map drive letter to UNC if remote. */
-  if ( isalpha( root_dir[0] ) && !fixed[ DRIVE_INDEX( root_dir[0] ) ] )
+  if (isalpha (root_dir[0]) && !fixed[DRIVE_INDEX (root_dir[0])])
     {
       char remote_name[ 256 ];
       char drive[3] = { root_dir[0], ':' };
@@ -2514,8 +2506,8 @@
   nr.lpComment = NULL;
   nr.lpProvider = NULL;
 
-  result = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
-			RESOURCEUSAGE_CONNECTABLE, &nr, &henum);
+  result = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
+			 RESOURCEUSAGE_CONNECTABLE, &nr, &henum);
 
   if (result == NO_ERROR)
     return henum;
@@ -2691,7 +2683,7 @@
 }
 
 FILE *
-sys_fopen(const char * path, const char * mode)
+sys_fopen (const char * path, const char * mode)
 {
   int fd;
   int oflag;
@@ -2778,7 +2770,7 @@
 
 	  data.wid.dwStreamId = BACKUP_LINK;
 	  data.wid.dwStreamAttributes = 0;
-	  data.wid.Size.LowPart = wlen * sizeof(WCHAR);
+	  data.wid.Size.LowPart = wlen * sizeof (WCHAR);
 	  data.wid.Size.HighPart = 0;
 	  data.wid.dwStreamNameSize = 0;
 
@@ -2980,7 +2972,7 @@
   } while (0)
 
 static void
-initialize_utc_base ()
+initialize_utc_base (void)
 {
   /* Determine the delta between 1-Jan-1601 and 1-Jan-1970. */
   SYSTEMTIME st;
@@ -3191,7 +3183,7 @@
   char name[UNLEN+1];
   DWORD name_len = sizeof (name);
   char domain[1024];
-  DWORD domain_len = sizeof(domain);
+  DWORD domain_len = sizeof (domain);
   char *mp = NULL;
   int use_dflt = 0;
   int result;
@@ -3666,7 +3658,7 @@
 
 /* Helper wrapper functions.  */
 
-HANDLE WINAPI create_toolhelp32_snapshot(
+HANDLE WINAPI create_toolhelp32_snapshot (
     DWORD Flags,
     DWORD Ignored)
 {
@@ -3686,7 +3678,7 @@
   return (s_pfn_Create_Toolhelp32_Snapshot (Flags, Ignored));
 }
 
-BOOL WINAPI process32_first(
+BOOL WINAPI process32_first (
     HANDLE hSnapshot,
     LPPROCESSENTRY32 lppe)
 {
@@ -3706,7 +3698,7 @@
   return (s_pfn_Process32_First (hSnapshot, lppe));
 }
 
-BOOL WINAPI process32_next(
+BOOL WINAPI process32_next (
     HANDLE hSnapshot,
     LPPROCESSENTRY32 lppe)
 {
@@ -3904,7 +3896,7 @@
 }
 
 Lisp_Object
-list_system_processes ()
+list_system_processes (void)
 {
   struct gcpro gcpro1;
   Lisp_Object proclist = Qnil;
@@ -3995,8 +3987,7 @@
 }
 
 static Lisp_Object
-ltime (time_sec, time_usec)
-     long time_sec, time_usec;
+ltime (long time_sec, long time_usec)
 {
   return list3 (make_number ((time_sec >> 16) & 0xffff),
 		make_number (time_sec & 0xffff),
@@ -4006,18 +3997,17 @@
 #define U64_TO_LISP_TIME(time) ltime ((time) / 1000000L, (time) % 1000000L)
 
 static int
-process_times (h_proc, ctime, etime, stime, utime, ttime, pcpu)
-     HANDLE h_proc;
-     Lisp_Object *ctime, *etime, *stime, *utime, *ttime;
-     double *pcpu;
+process_times (HANDLE h_proc, Lisp_Object *ctime, Lisp_Object *etime,
+	       Lisp_Object *stime, Lisp_Object *utime, Lisp_Object *ttime,
+	       double *pcpu)
 {
   FILETIME ft_creation, ft_exit, ft_kernel, ft_user, ft_current;
   ULONGLONG tem1, tem2, tem3, tem;
 
   if (!h_proc
       || !get_process_times_fn
-      || !(*get_process_times_fn)(h_proc, &ft_creation, &ft_exit,
-				  &ft_kernel, &ft_user))
+      || !(*get_process_times_fn) (h_proc, &ft_creation, &ft_exit,
+				   &ft_kernel, &ft_user))
     return 0;
 
   GetSystemTimeAsFileTime (&ft_current);
@@ -4059,8 +4049,7 @@
 }
 
 Lisp_Object
-system_process_attributes (pid)
-     Lisp_Object pid;
+system_process_attributes (Lisp_Object pid)
 {
   struct gcpro gcpro1, gcpro2, gcpro3;
   Lisp_Object attrs = Qnil;
@@ -4459,34 +4448,34 @@
       if ((pfn_##fn = (void *) GetProcAddress (winsock_lib, #fn)) == NULL) \
         goto fail;
 
-      LOAD_PROC( WSAStartup );
-      LOAD_PROC( WSASetLastError );
-      LOAD_PROC( WSAGetLastError );
-      LOAD_PROC( WSAEventSelect );
-      LOAD_PROC( WSACreateEvent );
-      LOAD_PROC( WSACloseEvent );
-      LOAD_PROC( socket );
-      LOAD_PROC( bind );
-      LOAD_PROC( connect );
-      LOAD_PROC( ioctlsocket );
-      LOAD_PROC( recv );
-      LOAD_PROC( send );
-      LOAD_PROC( closesocket );
-      LOAD_PROC( shutdown );
-      LOAD_PROC( htons );
-      LOAD_PROC( ntohs );
-      LOAD_PROC( inet_addr );
-      LOAD_PROC( gethostname );
-      LOAD_PROC( gethostbyname );
-      LOAD_PROC( getservbyname );
-      LOAD_PROC( getpeername );
-      LOAD_PROC( WSACleanup );
-      LOAD_PROC( setsockopt );
-      LOAD_PROC( listen );
-      LOAD_PROC( getsockname );
-      LOAD_PROC( accept );
-      LOAD_PROC( recvfrom );
-      LOAD_PROC( sendto );
+      LOAD_PROC (WSAStartup);
+      LOAD_PROC (WSASetLastError);
+      LOAD_PROC (WSAGetLastError);
+      LOAD_PROC (WSAEventSelect);
+      LOAD_PROC (WSACreateEvent);
+      LOAD_PROC (WSACloseEvent);
+      LOAD_PROC (socket);
+      LOAD_PROC (bind);
+      LOAD_PROC (connect);
+      LOAD_PROC (ioctlsocket);
+      LOAD_PROC (recv);
+      LOAD_PROC (send);
+      LOAD_PROC (closesocket);
+      LOAD_PROC (shutdown);
+      LOAD_PROC (htons);
+      LOAD_PROC (ntohs);
+      LOAD_PROC (inet_addr);
+      LOAD_PROC (gethostname);
+      LOAD_PROC (gethostbyname);
+      LOAD_PROC (getservbyname);
+      LOAD_PROC (getpeername);
+      LOAD_PROC (WSACleanup);
+      LOAD_PROC (setsockopt);
+      LOAD_PROC (listen);
+      LOAD_PROC (getsockname);
+      LOAD_PROC (accept);
+      LOAD_PROC (recvfrom);
+      LOAD_PROC (sendto);
 #undef LOAD_PROC
 
       /* specify version 1.1 of winsock */
@@ -4526,7 +4515,7 @@
    normal system codes where they overlap (non-overlapping definitions
    are already in <sys/socket.h> */
 static void
-set_errno ()
+set_errno (void)
 {
   if (winsock_lib == NULL)
     h_errno = EINVAL;
@@ -4548,7 +4537,7 @@
 }
 
 static void
-check_errno ()
+check_errno (void)
 {
   if (h_errno == 0 && winsock_lib != NULL)
     pfn_WSASetLastError (0);
@@ -4631,7 +4620,7 @@
 };
 
 char *
-sys_strerror(int error_no)
+sys_strerror (int error_no)
 {
   int i;
   static char unknown_msg[40];
@@ -4643,7 +4632,7 @@
     if (_wsa_errlist[i].errnum == error_no)
       return _wsa_errlist[i].msg;
 
-  sprintf(unknown_msg, "Unidentified error: %d", error_no);
+  sprintf (unknown_msg, "Unidentified error: %d", error_no);
   return unknown_msg;
 }
 
@@ -4662,7 +4651,7 @@
 int socket_to_fd (SOCKET s);
 
 int
-sys_socket(int af, int type, int protocol)
+sys_socket (int af, int type, int protocol)
 {
   SOCKET s;
 
@@ -4865,7 +4854,7 @@
 }
 
 struct hostent *
-sys_gethostbyname(const char * name)
+sys_gethostbyname (const char * name)
 {
   struct hostent * host;
 
@@ -4883,7 +4872,7 @@
 }
 
 struct servent *
-sys_getservbyname(const char * name, const char * proto)
+sys_getservbyname (const char * name, const char * proto)
 {
   struct servent * serv;
 
@@ -5038,7 +5027,7 @@
 
 int
 sys_recvfrom (int s, char * buf, int len, int flags,
-	  struct sockaddr * from, int * fromlen)
+	      struct sockaddr * from, int * fromlen)
 {
   if (winsock_lib == NULL)
     {
@@ -5536,8 +5525,8 @@
 		  int res = pfn_recv (SOCK_HANDLE (fd), buffer, count, 0);
 		  if (res == SOCKET_ERROR)
 		    {
-		      DebPrint(("sys_read.recv failed with error %d on socket %ld\n",
-				pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
+		      DebPrint (("sys_read.recv failed with error %d on socket %ld\n",
+				 pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
 		      set_errno ();
 		      return -1;
 		    }
@@ -5693,8 +5682,8 @@
 
       if (nchars == SOCKET_ERROR)
         {
-	  DebPrint(("sys_write.send failed with error %d on socket %ld\n",
-		    pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
+	  DebPrint (("sys_write.send failed with error %d on socket %ld\n",
+		     pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
 	  set_errno ();
 	}
     }
@@ -5733,7 +5722,7 @@
 }
 
 static void
-check_windows_init_file ()
+check_windows_init_file (void)
 {
   extern int noninteractive, inhibit_window_system;
 
@@ -5789,7 +5778,7 @@
 }
 
 void
-term_ntproc ()
+term_ntproc (void)
 {
 #ifdef HAVE_SOCKETS
   /* shutdown the socket interface if necessary */
@@ -5800,7 +5789,7 @@
 }
 
 void
-init_ntproc ()
+init_ntproc (void)
 {
 #ifdef HAVE_SOCKETS
   /* Initialise the socket interface now if available and requested by
@@ -5908,7 +5897,8 @@
         shutdown_handler ensures that buffers' autosave files are
 	up to date when the user logs off, or the system shuts down.
 */
-BOOL WINAPI shutdown_handler(DWORD type)
+BOOL WINAPI
+shutdown_handler (DWORD type)
 {
   /* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them.  */
   if (type == CTRL_CLOSE_EVENT        /* User closes console window.  */
@@ -5929,7 +5919,7 @@
 	initialized is non zero (see the function main in emacs.c).
 */
 void
-globals_of_w32 ()
+globals_of_w32 (void)
 {
   HMODULE kernel32 = GetModuleHandle ("kernel32.dll");
 
@@ -5967,14 +5957,15 @@
      console apps. This actually applies to Emacs in both console and
      GUI modes, since we had to fool windows into thinking emacs is a
      console application to get console mode to work.  */
-  SetConsoleCtrlHandler(shutdown_handler, TRUE);
+  SetConsoleCtrlHandler (shutdown_handler, TRUE);
 
   /* "None" is the default group name on standalone workstations.  */
   strcpy (dflt_group_name, "None");
 }
 
 /* For make-serial-process  */
-int serial_open (char *port)
+int
+serial_open (char *port)
 {
   HANDLE hnd;
   child_process *cp;
@@ -6014,7 +6005,7 @@
 /* For serial-process-configure  */
 void
 serial_configure (struct Lisp_Process *p,
-		      Lisp_Object contact)
+		  Lisp_Object contact)
 {
   Lisp_Object childp2 = Qnil;
   Lisp_Object tem = Qnil;
--- a/src/w32console.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32console.c	Thu Jul 08 17:09:35 2010 +0900
@@ -42,13 +42,13 @@
 #include "w32inevt.h"
 
 /* from window.c */
-extern Lisp_Object Frecenter ();
+extern Lisp_Object Frecenter (Lisp_Object);
 
 /* from keyboard.c */
-extern int detect_input_pending ();
+extern int detect_input_pending (void);
 
 /* from sysdep.c */
-extern int read_input_pending ();
+extern int read_input_pending (void);
 
 static void w32con_move_cursor (struct frame *f, int row, int col);
 static void w32con_clear_to_end (struct frame *f);
@@ -68,7 +68,7 @@
 static COORD	cursor_coords;
 static HANDLE	prev_screen, cur_screen;
 static WORD	char_attr_normal;
-static DWORD   prev_console_mode;
+static DWORD	prev_console_mode;
 
 #ifndef USE_SEPARATE_SCREEN
 static CONSOLE_CURSOR_INFO prev_console_cursor;
@@ -268,7 +268,8 @@
 
 /* If start is zero insert blanks instead of a string at start ?. */
 static void
-w32con_insert_glyphs (struct frame *f, register struct glyph *start, register int len)
+w32con_insert_glyphs (struct frame *f, register struct glyph *start,
+		      register int len)
 {
   scroll_line (f, len, RIGHT);
 
@@ -286,8 +287,8 @@
     }
 }
 
-extern unsigned char *encode_terminal_code P_ ((struct glyph *, int, 
-						struct coding_system *));
+extern unsigned char *encode_terminal_code (struct glyph *, int,
+                                            struct coding_system *);
 
 static void
 w32con_write_glyphs (struct frame *f, register struct glyph *string,
@@ -438,7 +439,7 @@
   FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r);
   /* Now that the screen is clear, put the cursor at the top.  */
   SetConsoleCursorPosition (cur_screen, dest);
-  
+
 #ifdef USE_SEPARATE_SCREEN
   SetConsoleActiveScreenBuffer (prev_screen);
 #else
@@ -492,7 +493,7 @@
  ***********************************************************************/
 
 void
-sys_tputs (char *str, int nlines, int (*outfun)())
+sys_tputs (char *str, int nlines, int (*outfun) (int))
 {
 }
 
@@ -511,13 +512,13 @@
 int cost = 0;
 
 int
-evalcost (char c)
+evalcost (int c)
 {
   return c;
 }
 
 int
-cmputc (char c)
+cmputc (int c)
 {
   return c;
 }
@@ -551,9 +552,7 @@
 /* Turn appearances of face FACE_ID on tty frame F on.  */
 
 static WORD
-w32_face_attributes (f, face_id)
-     struct frame *f;
-     int face_id;
+w32_face_attributes (struct frame *f, int face_id)
 {
   WORD char_attr;
   struct face *face = FACE_FROM_ID (f, face_id);
@@ -609,8 +608,6 @@
     return Qunspecified;	/* meaning the default */
 }
 
-typedef int (*term_hook) ();
-
 void
 initialize_w32_display (struct terminal *term)
 {
@@ -618,19 +615,19 @@
 
   term->rif = 0; /* No window based redisplay on the console.  */
   term->cursor_to_hook		= w32con_move_cursor;
-  term->raw_cursor_to_hook		= w32con_move_cursor;
-  term->clear_to_end_hook		= w32con_clear_to_end;
-  term->clear_frame_hook		= w32con_clear_frame;
+  term->raw_cursor_to_hook	= w32con_move_cursor;
+  term->clear_to_end_hook	= w32con_clear_to_end;
+  term->clear_frame_hook	= w32con_clear_frame;
   term->clear_end_of_line_hook	= w32con_clear_end_of_line;
-  term->ins_del_lines_hook		= w32con_ins_del_lines;
-  term->insert_glyphs_hook		= w32con_insert_glyphs;
-  term->write_glyphs_hook		= w32con_write_glyphs;
-  term->delete_glyphs_hook		= w32con_delete_glyphs;
+  term->ins_del_lines_hook	= w32con_ins_del_lines;
+  term->insert_glyphs_hook	= w32con_insert_glyphs;
+  term->write_glyphs_hook	= w32con_write_glyphs;
+  term->delete_glyphs_hook	= w32con_delete_glyphs;
   term->ring_bell_hook		= w32_sys_ring_bell;
-  term->reset_terminal_modes_hook	= w32con_reset_terminal_modes;
+  term->reset_terminal_modes_hook = w32con_reset_terminal_modes;
   term->set_terminal_modes_hook	= w32con_set_terminal_modes;
-  term->set_terminal_window_hook	= w32con_set_terminal_window;
-  term->update_begin_hook		= w32con_update_begin;
+  term->set_terminal_window_hook = w32con_set_terminal_window;
+  term->update_begin_hook	= w32con_update_begin;
   term->update_end_hook		= w32con_update_end;
 
   term->read_socket_hook = w32_console_read_socket;
@@ -674,8 +671,8 @@
 
   /* Respect setting of LINES and COLUMNS environment variables.  */
   {
-    char * lines = getenv("LINES");
-    char * columns = getenv("COLUMNS");
+    char * lines = getenv ("LINES");
+    char * columns = getenv ("COLUMNS");
 
     if (lines != NULL && columns != NULL)
       {
@@ -775,7 +772,7 @@
 }
 
 void
-syms_of_ntterm ()
+syms_of_ntterm (void)
 {
   DEFVAR_BOOL ("w32-use-full-screen-buffer",
                &w32_use_full_screen_buffer,
--- a/src/w32fns.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32fns.c	Thu Jul 08 17:09:35 2010 +0900
@@ -69,15 +69,15 @@
 #define FOF_NO_CONNECTED_ELEMENTS 0x2000
 #endif
 
-void syms_of_w32fns ();
-void globals_of_w32fns ();
-
-extern void free_frame_menubar ();
-extern double atof ();
-extern int w32_console_toggle_lock_key P_ ((int, Lisp_Object));
-extern void w32_menu_display_help P_ ((HWND, HMENU, UINT, UINT));
-extern void w32_free_menu_strings P_ ((HWND));
-extern const char *map_w32_filename P_ ((const char *, const char **));
+void syms_of_w32fns (void);
+void globals_of_w32fns (void);
+
+extern void free_frame_menubar (struct frame *);
+extern double atof (const char *);
+extern int w32_console_toggle_lock_key (int, Lisp_Object);
+extern void w32_menu_display_help (HWND, HMENU, UINT, UINT);
+extern void w32_free_menu_strings (HWND);
+extern const char *map_w32_filename (const char *, const char **);
 
 extern int quit_char;
 
@@ -316,18 +316,18 @@
 static int menubar_in_use = 0;
 
 /* From w32uniscribe.c  */
-extern void syms_of_w32uniscribe ();
+extern void syms_of_w32uniscribe (void);
 extern int uniscribe_available;
 
 /* Function prototypes for hourglass support.  */
-static void w32_show_hourglass P_ ((struct frame *));
-static void w32_hide_hourglass P_ ((void));
+static void w32_show_hourglass (struct frame *);
+static void w32_hide_hourglass (void);
 
 
 
 /* Error if we are not connected to MS-Windows.  */
 void
-check_w32 ()
+check_w32 (void)
 {
   if (! w32_in_use)
     error ("MS-Windows not in use or not initialized");
@@ -337,7 +337,7 @@
    You should not call this unless HAVE_MENUS is defined.  */
 
 int
-have_menus_p ()
+have_menus_p (void)
 {
   return w32_in_use;
 }
@@ -346,8 +346,7 @@
    and checking validity for W32.  */
 
 FRAME_PTR
-check_x_frame (frame)
-     Lisp_Object frame;
+check_x_frame (Lisp_Object frame)
 {
   FRAME_PTR f;
 
@@ -365,8 +364,7 @@
    the first display on the list.  */
 
 struct w32_display_info *
-check_x_display_info (frame)
-     Lisp_Object frame;
+check_x_display_info (Lisp_Object frame)
 {
   if (NILP (frame))
     {
@@ -397,9 +395,7 @@
 /* This function can be called during GC, so use GC_xxx type test macros.  */
 
 struct frame *
-x_window_to_frame (dpyinfo, wdesc)
-     struct w32_display_info *dpyinfo;
-     HWND wdesc;
+x_window_to_frame (struct w32_display_info *dpyinfo, HWND wdesc)
 {
   Lisp_Object tail, frame;
   struct frame *f;
@@ -420,26 +416,26 @@
 }
 
 
-static Lisp_Object unwind_create_frame P_ ((Lisp_Object));
-static Lisp_Object unwind_create_tip_frame P_ ((Lisp_Object));
-static void my_create_window P_ ((struct frame *));
-static void my_create_tip_window P_ ((struct frame *));
+static Lisp_Object unwind_create_frame (Lisp_Object);
+static Lisp_Object unwind_create_tip_frame (Lisp_Object);
+static void my_create_window (struct frame *);
+static void my_create_tip_window (struct frame *);
 
 /* TODO: Native Input Method support; see x_create_im.  */
-void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_mouse_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_cursor_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_border_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_explicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_title P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
-static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object,
-				  Lisp_Object));
+void x_set_foreground_color (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_background_color (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_mouse_color (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_cursor_color (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_border_color (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_cursor_type (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_icon_type (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_icon_name (struct frame *, Lisp_Object, Lisp_Object);
+void x_explicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_title (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
+static void x_edge_detection (struct frame *, struct image *, Lisp_Object,
+                              Lisp_Object);
 
 
 
@@ -449,9 +445,7 @@
    not Emacs's own window.  */
 
 void
-x_real_positions (f, xptr, yptr)
-     FRAME_PTR f;
-     int *xptr, *yptr;
+x_real_positions (FRAME_PTR f, int *xptr, int *yptr)
 {
   POINT pt;
   RECT rect;
@@ -790,8 +784,7 @@
 }
 
 static Lisp_Object
-w32_to_x_color (rgb)
-     Lisp_Object rgb;
+w32_to_x_color (Lisp_Object rgb)
 {
   Lisp_Object color;
 
@@ -810,8 +803,7 @@
 }
 
 static Lisp_Object
-w32_color_map_lookup (colorname)
-     char *colorname;
+w32_color_map_lookup (char *colorname)
 {
   Lisp_Object tail, ret = Qnil;
 
@@ -843,8 +835,7 @@
 
 
 static void
-add_system_logical_colors_to_map (system_colors)
-     Lisp_Object *system_colors;
+add_system_logical_colors_to_map (Lisp_Object *system_colors)
 {
   HKEY colors_key;
 
@@ -892,8 +883,7 @@
 
 
 static Lisp_Object
-x_to_w32_color (colorname)
-     char * colorname;
+x_to_w32_color (char * colorname)
 {
   register Lisp_Object ret = Qnil;
 
@@ -1204,9 +1194,7 @@
 /* Gamma-correct COLOR on frame F.  */
 
 void
-gamma_correct (f, color)
-     struct frame *f;
-     COLORREF *color;
+gamma_correct (struct frame *f, COLORREF *color)
 {
   if (f->gamma)
     {
@@ -1223,11 +1211,7 @@
    If ALLOC is nonzero, allocate a new colormap cell.  */
 
 int
-w32_defined_color (f, color, color_def, alloc)
-     FRAME_PTR f;
-     char *color;
-     XColor *color_def;
-     int alloc;
+w32_defined_color (FRAME_PTR f, char *color, XColor *color_def, int alloc)
 {
   register Lisp_Object tem;
   COLORREF w32_color_ref;
@@ -1299,10 +1283,7 @@
    ARG says.  */
 
 int
-x_decode_color (f, arg, def)
-     FRAME_PTR f;
-     Lisp_Object arg;
-     int def;
+x_decode_color (FRAME_PTR f, Lisp_Object arg, int def)
 {
   XColor cdef;
 
@@ -1336,9 +1317,7 @@
    in the standard place; do not attempt to change the window.  */
 
 void
-x_set_foreground_color (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   struct w32_output *x = f->output_data.w32;
   PIX_TYPE fg, old_fg;
@@ -1359,9 +1338,7 @@
 }
 
 void
-x_set_background_color (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   FRAME_BACKGROUND_PIXEL (f)
     = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f));
@@ -1379,9 +1356,7 @@
 }
 
 void
-x_set_mouse_color (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   Cursor cursor, nontext_cursor, mode_cursor, hand_cursor;
   int count;
@@ -1528,9 +1503,7 @@
 }
 
 void
-x_set_cursor_color (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   unsigned long fore_pixel, pixel;
 
@@ -1577,9 +1550,7 @@
    F has a window.  */
 
 void
-x_set_border_pixel (f, pix)
-     struct frame *f;
-     int pix;
+x_set_border_pixel (struct frame *f, int pix)
 {
 
   f->output_data.w32->border_pixel = pix;
@@ -1598,9 +1569,7 @@
    F has a window; it must be redone when the window is created.  */
 
 void
-x_set_border_color (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   int pix;
 
@@ -1612,9 +1581,7 @@
 
 
 void
-x_set_cursor_type (f, arg, oldval)
-     FRAME_PTR f;
-     Lisp_Object arg, oldval;
+x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
 {
   set_frame_cursor_types (f, arg);
 
@@ -1623,9 +1590,7 @@
 }
 
 void
-x_set_icon_type (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   int result;
 
@@ -1652,9 +1617,7 @@
 }
 
 void
-x_set_icon_name (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   if (STRINGP (arg))
     {
@@ -1702,9 +1665,7 @@
 
 
 void
-x_set_menu_bar_lines (f, value, oldval)
-     struct frame *f;
-     Lisp_Object value, oldval;
+x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   int nlines;
   int olines = FRAME_MENU_BAR_LINES (f);
@@ -1747,9 +1708,7 @@
    The frame's height doesn't change.  */
 
 void
-x_set_tool_bar_lines (f, value, oldval)
-     struct frame *f;
-     Lisp_Object value, oldval;
+x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   int delta, nlines, root_height;
   Lisp_Object root_window;
@@ -1829,10 +1788,7 @@
        F->explicit_name is set, ignore the new name; otherwise, set it.  */
 
 void
-x_set_name (f, name, explicit)
-     struct frame *f;
-     Lisp_Object name;
-     int explicit;
+x_set_name (struct frame *f, Lisp_Object name, int explicit)
 {
   /* Make sure that requests from lisp code override requests from
      Emacs redisplay code.  */
@@ -1887,9 +1843,7 @@
    specified a name for the frame; the name will override any set by the
    redisplay code.  */
 void
-x_explicitly_set_name (f, arg, oldval)
-     FRAME_PTR f;
-     Lisp_Object arg, oldval;
+x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
 {
   x_set_name (f, arg, 1);
 }
@@ -1898,9 +1852,7 @@
    name; names set this way will never override names set by the user's
    lisp code.  */
 void
-x_implicitly_set_name (f, arg, oldval)
-     FRAME_PTR f;
-     Lisp_Object arg, oldval;
+x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
 {
   x_set_name (f, arg, 0);
 }
@@ -1909,9 +1861,7 @@
    If NAME is nil, use the frame name as the title.  */
 
 void
-x_set_title (f, name, old_name)
-     struct frame *f;
-     Lisp_Object name, old_name;
+x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
 {
   /* Don't change the title if it's already NAME.  */
   if (EQ (name, f->title))
@@ -1936,8 +1886,8 @@
 }
 
 
-void x_set_scroll_bar_default_width (f)
-     struct frame *f;
+void
+x_set_scroll_bar_default_width (struct frame *f)
 {
   int wid = FRAME_COLUMN_WIDTH (f);
 
@@ -1965,11 +1915,10 @@
   return cursor;
 }
 
-extern LRESULT CALLBACK w32_wnd_proc ();
+extern LRESULT CALLBACK w32_wnd_proc (HWND, UINT, WPARAM, LPARAM);
 
 static BOOL
-w32_init_class (hinst)
-     HINSTANCE hinst;
+w32_init_class (HINSTANCE hinst)
 {
   WNDCLASS wc;
 
@@ -1988,9 +1937,7 @@
 }
 
 static HWND
-w32_createscrollbar (f, bar)
-     struct frame *f;
-     struct scroll_bar * bar;
+w32_createscrollbar (struct frame *f, struct scroll_bar * bar)
 {
   return (CreateWindow ("SCROLLBAR", "", SBS_VERT | WS_CHILD | WS_VISIBLE,
 			/* Position and size of scroll bar.  */
@@ -2005,8 +1952,7 @@
 }
 
 static void
-w32_createwindow (f)
-     struct frame *f;
+w32_createwindow (struct frame *f)
 {
   HWND hwnd;
   RECT rect;
@@ -2076,12 +2022,7 @@
 }
 
 static void
-my_post_msg (wmsg, hwnd, msg, wParam, lParam)
-     W32Msg * wmsg;
-     HWND hwnd;
-     UINT msg;
-     WPARAM wParam;
-     LPARAM lParam;
+my_post_msg (W32Msg * wmsg, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
   wmsg->msg.hwnd = hwnd;
   wmsg->msg.message = msg;
@@ -2175,7 +2116,7 @@
    it regains focus, be conservative and clear all modifiers since
    we cannot reconstruct the left and right modifier state.  */
 static void
-reset_modifiers ()
+reset_modifiers (void)
 {
   SHORT ctrl, alt;
 
@@ -2222,7 +2163,7 @@
    modifier keys, we know that, if no modifiers are set, then neither
    the left or right modifier should be set.  */
 static void
-sync_modifiers ()
+sync_modifiers (void)
 {
   if (!modifiers_recorded)
     return;
@@ -2308,7 +2249,7 @@
 }
 
 static unsigned int
-w32_get_modifiers ()
+w32_get_modifiers (void)
 {
   return ((modifier_set (VK_SHIFT)   ? shift_modifier : 0) |
 	  (modifier_set (VK_CONTROL) ? ctrl_modifier  : 0) |
@@ -2325,7 +2266,7 @@
    and window input.  */
 
 static int
-construct_console_modifiers ()
+construct_console_modifiers (void)
 {
   int mods;
 
@@ -2397,8 +2338,7 @@
    combinations like Alt-Tab which are used by the system.  */
 
 static void
-register_hot_keys (hwnd)
-     HWND hwnd;
+register_hot_keys (HWND hwnd)
 {
   Lisp_Object keylist;
 
@@ -2417,8 +2357,7 @@
 }
 
 static void
-unregister_hot_keys (hwnd)
-     HWND hwnd;
+unregister_hot_keys (HWND hwnd)
 {
   Lisp_Object keylist;
 
@@ -2624,7 +2563,7 @@
 }
 
 static void
-cancel_all_deferred_msgs ()
+cancel_all_deferred_msgs (void)
 {
   deferred_msg * item;
 
@@ -2669,7 +2608,7 @@
 }
 
 static void
-signal_user_input ()
+signal_user_input (void)
 {
   /* Interrupt any lisp that wants to be interrupted by input.  */
   if (!NILP (Vthrow_on_input))
@@ -2687,13 +2626,9 @@
 
 
 static void
-post_character_message (hwnd, msg, wParam, lParam, modifiers)
-     HWND hwnd;
-     UINT msg;
-     WPARAM wParam;
-     LPARAM lParam;
-     DWORD  modifiers;
-
+post_character_message (HWND hwnd, UINT msg,
+			WPARAM wParam, LPARAM lParam,
+			DWORD modifiers)
 {
   W32Msg wmsg;
 
@@ -2753,11 +2688,7 @@
 /* Main window procedure */
 
 LRESULT CALLBACK
-w32_wnd_proc (hwnd, msg, wParam, lParam)
-     HWND hwnd;
-     UINT msg;
-     WPARAM wParam;
-     LPARAM lParam;
+w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
   struct frame *f;
   struct w32_display_info *dpyinfo = &one_w32_display_info;
@@ -2815,7 +2746,7 @@
       {
   	PAINTSTRUCT paintStruct;
         RECT update_rect;
-	bzero (&update_rect, sizeof (update_rect));
+	memset (&update_rect, 0, sizeof (update_rect));
 
 	f = x_window_to_frame (dpyinfo, hwnd);
 	if (f == 0)
@@ -3163,7 +3094,7 @@
           wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam);
           /* Get buffer size.  */
           size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0);
-          buffer = alloca(size);
+          buffer = alloca (size);
           size = get_composition_string_fn (context, GCS_RESULTSTR,
                                             buffer, size);
 	  release_ime_context_fn (hwnd, context);
@@ -4007,8 +3938,7 @@
 }
 
 static void
-my_create_window (f)
-     struct frame * f;
+my_create_window (struct frame * f)
 {
   MSG msg;
 
@@ -4023,8 +3953,7 @@
    messages for the tooltip.  Creating tooltips indirectly also creates
    deadlocks when tooltips are created for menu items.  */
 static void
-my_create_tip_window (f)
-     struct frame *f;
+my_create_tip_window (struct frame *f)
 {
   RECT rect;
 
@@ -4067,10 +3996,7 @@
 /* Create and set up the w32 window for frame F.  */
 
 static void
-w32_window (f, window_prompting, minibuffer_only)
-     struct frame *f;
-     long window_prompting;
-     int minibuffer_only;
+w32_window (struct frame *f, long window_prompting, int minibuffer_only)
 {
   BLOCK_INPUT;
 
@@ -4118,9 +4044,7 @@
    well.  */
 
 static void
-x_icon (f, parms)
-     struct frame *f;
-     Lisp_Object parms;
+x_icon (struct frame *f, Lisp_Object parms)
 {
   Lisp_Object icon_x, icon_y;
   struct w32_display_info *dpyinfo = &one_w32_display_info;
@@ -4159,8 +4083,7 @@
 
 
 static void
-x_make_gc (f)
-     struct frame *f;
+x_make_gc (struct frame *f)
 {
   XGCValues gc_values;
 
@@ -4193,8 +4116,7 @@
    constructed.  */
 
 static Lisp_Object
-unwind_create_frame (frame)
-     Lisp_Object frame;
+unwind_create_frame (Lisp_Object frame)
 {
   struct frame *f = XFRAME (frame);
 
@@ -4219,9 +4141,7 @@
 }
 
 static void
-x_default_font_parameter (f, parms)
-     struct frame *f;
-     Lisp_Object parms;
+x_default_font_parameter (struct frame *f, Lisp_Object parms)
 {
   struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
   Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
@@ -4355,7 +4275,7 @@
   f->output_method = output_w32;
   f->output_data.w32 =
     (struct w32_output *) xmalloc (sizeof (struct w32_output));
-  bzero (f->output_data.w32, sizeof (struct w32_output));
+  memset (f->output_data.w32, 0, sizeof (struct w32_output));
   FRAME_FONTSET (f) = -1;
 
   f->icon_name
@@ -4587,8 +4507,7 @@
    display info directly because we're called from frame.c, which doesn't
    know about that structure.  */
 Lisp_Object
-x_get_focus_frame (frame)
-     struct frame *frame;
+x_get_focus_frame (struct frame *frame)
 {
   struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (frame);
   Lisp_Object xfocus;
@@ -4899,36 +4818,31 @@
 }
 
 int
-x_pixel_width (f)
-     register struct frame *f;
+x_pixel_width (register struct frame *f)
 {
   return FRAME_PIXEL_WIDTH (f);
 }
 
 int
-x_pixel_height (f)
-     register struct frame *f;
+x_pixel_height (register struct frame *f)
 {
   return FRAME_PIXEL_HEIGHT (f);
 }
 
 int
-x_char_width (f)
-     register struct frame *f;
+x_char_width (register struct frame *f)
 {
   return FRAME_COLUMN_WIDTH (f);
 }
 
 int
-x_char_height (f)
-     register struct frame *f;
+x_char_height (register struct frame *f)
 {
   return FRAME_LINE_HEIGHT (f);
 }
 
 int
-x_screen_planes (f)
-     register struct frame *f;
+x_screen_planes (register struct frame *f)
 {
   return FRAME_W32_DISPLAY_INFO (f)->n_planes;
 }
@@ -4937,8 +4851,7 @@
    Open a new connection if necessary.  */
 
 struct w32_display_info *
-x_display_info_for_name (name)
-     Lisp_Object name;
+x_display_info_for_name (Lisp_Object name)
 {
   Lisp_Object names;
   struct w32_display_info *dpyinfo;
@@ -5253,7 +5166,7 @@
    	    xdisp.c could be used. */
 
 int
-hourglass_started ()
+hourglass_started (void)
 {
   return hourglass_shown_p || hourglass_timer;
 }
@@ -5261,7 +5174,7 @@
 /* Cancel a currently active hourglass timer, and start a new one.  */
 
 void
-start_hourglass ()
+start_hourglass (void)
 {
   DWORD delay;
   int secs, msecs = 0;
@@ -5297,7 +5210,7 @@
    cursor if shown.  */
 
 void
-cancel_hourglass ()
+cancel_hourglass (void)
 {
   if (hourglass_timer)
     {
@@ -5316,8 +5229,7 @@
    to indicate that an hourglass cursor is shown.  */
 
 static void
-w32_show_hourglass (f)
-     struct frame *f;
+w32_show_hourglass (struct frame *f)
 {
   if (!hourglass_shown_p)
     {
@@ -5332,7 +5244,7 @@
 /* Hide the hourglass cursor on all frames, if it is currently shown.  */
 
 static void
-w32_hide_hourglass ()
+w32_hide_hourglass (void)
 {
   if (hourglass_shown_p)
     {
@@ -5360,10 +5272,10 @@
 				Tool tips
  ***********************************************************************/
 
-static Lisp_Object x_create_tip_frame P_ ((struct w32_display_info *,
-					   Lisp_Object, Lisp_Object));
-static void compute_tip_xy P_ ((struct frame *, Lisp_Object, Lisp_Object,
-				Lisp_Object, int, int, int *, int *));
+static Lisp_Object x_create_tip_frame (struct w32_display_info *,
+                                       Lisp_Object, Lisp_Object);
+static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object,
+                            Lisp_Object, int, int, int *, int *);
 
 /* The frame of a currently visible tooltip.  */
 
@@ -5386,8 +5298,7 @@
 
 
 static Lisp_Object
-unwind_create_tip_frame (frame)
-     Lisp_Object frame;
+unwind_create_tip_frame (Lisp_Object frame)
 {
   Lisp_Object deleted;
 
@@ -5412,9 +5323,8 @@
    when this happens.  */
 
 static Lisp_Object
-x_create_tip_frame (dpyinfo, parms, text)
-     struct w32_display_info *dpyinfo;
-     Lisp_Object parms, text;
+x_create_tip_frame (struct w32_display_info *dpyinfo,
+		    Lisp_Object parms, Lisp_Object text)
 {
   struct frame *f;
   Lisp_Object frame, tem;
@@ -5478,7 +5388,7 @@
   f->output_method = output_w32;
   f->output_data.w32 =
     (struct w32_output *) xmalloc (sizeof (struct w32_output));
-  bzero (f->output_data.w32, sizeof (struct w32_output));
+  memset (f->output_data.w32, 0, sizeof (struct w32_output));
 
   FRAME_FONTSET (f)  = -1;
   f->icon_name = Qnil;
@@ -5654,11 +5564,9 @@
    the display in *ROOT_X, and *ROOT_Y.  */
 
 static void
-compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
-     struct frame *f;
-     Lisp_Object parms, dx, dy;
-     int width, height;
-     int *root_x, *root_y;
+compute_tip_xy (struct frame *f,
+		Lisp_Object parms, Lisp_Object dx, Lisp_Object dy,
+		int width, int height, int *root_x, int *root_y)
 {
   Lisp_Object left, top;
   int min_x, min_y, max_x, max_y;
@@ -6037,11 +5945,7 @@
    allows us to work around the fact that the standard Open File
    dialog does not support directories.  */
 UINT CALLBACK
-file_dialog_callback (hwnd, msg, wParam, lParam)
-     HWND hwnd;
-     UINT msg;
-     WPARAM wParam;
-     LPARAM lParam;
+file_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
   if (msg == WM_NOTIFY)
     {
@@ -6142,7 +6046,7 @@
     specbind (Qinhibit_redisplay, Qt);
     BLOCK_INPUT;
 
-    bzero (&new_file_details, sizeof (new_file_details));
+    memset (&new_file_details, 0, sizeof (new_file_details));
     /* Apparently NT4 crashes if you give it an unexpected size.
        I'm not sure about Windows 9x, so play it safe.  */
     if (w32_major_version > 4 && w32_major_version < 95)
@@ -6253,10 +6157,10 @@
     /* On Windows, write permission is required to delete/move files.  */
     _chmod (path, 0666);
 
-    bzero (tmp_path, sizeof (tmp_path));
+    memset (tmp_path, 0, sizeof (tmp_path));
     strcpy (tmp_path, path);
 
-    bzero (&file_op, sizeof (file_op));
+    memset (&file_op, 0, sizeof (file_op));
     file_op.hwnd = HWND_DESKTOP;
     file_op.wFunc = FO_DELETE;
     file_op.pFrom = tmp_path;
@@ -6395,8 +6299,7 @@
 /* Convert a one-element vector style key sequence to a hot key
    definition.  */
 static Lisp_Object
-w32_parse_hot_key (key)
-     Lisp_Object key;
+w32_parse_hot_key (Lisp_Object key)
 {
   /* Copied from Fdefine_key and store_in_keymap.  */
   register Lisp_Object c;
@@ -6625,7 +6528,7 @@
 
 This is a direct interface to the Windows API FindWindow function.  */)
   (class, name)
-Lisp_Object class, name;
+     Lisp_Object class, name;
 {
   HWND hnd;
 
@@ -6963,7 +6866,7 @@
 };
 
 void
-syms_of_w32fns ()
+syms_of_w32fns (void)
 {
   globals_of_w32fns ();
   /* This is zero if not using MS-Windows.  */
@@ -7320,7 +7223,7 @@
 	is non zero.
  */
 void
-globals_of_w32fns ()
+globals_of_w32fns (void)
 {
   HMODULE user32_lib = GetModuleHandle ("user32.dll");
   /*
@@ -7363,7 +7266,7 @@
 #undef abort
 
 void
-w32_abort ()
+w32_abort (void)
 {
   int button;
   button = MessageBox (NULL,
@@ -7391,7 +7294,7 @@
 
 /* For convenience when debugging.  */
 int
-w32_last_error ()
+w32_last_error (void)
 {
   return GetLastError ();
 }
--- a/src/w32font.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32font.c	Thu Jul 08 17:09:35 2010 +0900
@@ -106,28 +106,28 @@
 /* Font spacing symbols - defined in font.c.  */
 extern Lisp_Object Qc, Qp, Qm;
 
-static void fill_in_logfont P_ ((FRAME_PTR, LOGFONT *, Lisp_Object));
+static void fill_in_logfont (FRAME_PTR, LOGFONT *, Lisp_Object);
 
-static BYTE w32_antialias_type P_ ((Lisp_Object));
-static Lisp_Object lispy_antialias_type P_ ((BYTE));
+static BYTE w32_antialias_type (Lisp_Object);
+static Lisp_Object lispy_antialias_type (BYTE);
 
-static Lisp_Object font_supported_scripts P_ ((FONTSIGNATURE *));
-static int w32font_full_name P_ ((LOGFONT *, Lisp_Object, int, char *, int));
-static void compute_metrics P_ ((HDC, struct w32font_info *, unsigned int,
-				 struct w32_metric_cache *));
+static Lisp_Object font_supported_scripts (FONTSIGNATURE *);
+static int w32font_full_name (LOGFONT *, Lisp_Object, int, char *, int);
+static void compute_metrics (HDC, struct w32font_info *, unsigned int,
+                             struct w32_metric_cache *);
 
-static Lisp_Object w32_registry P_ ((LONG, DWORD));
+static Lisp_Object w32_registry (LONG, DWORD);
 
 /* EnumFontFamiliesEx callbacks.  */
-static int CALLBACK add_font_entity_to_list P_ ((ENUMLOGFONTEX *,
+static int CALLBACK add_font_entity_to_list (ENUMLOGFONTEX *,
+                                             NEWTEXTMETRICEX *,
+                                             DWORD, LPARAM);
+static int CALLBACK add_one_font_entity_to_list (ENUMLOGFONTEX *,
                                                  NEWTEXTMETRICEX *,
-                                                 DWORD, LPARAM));
-static int CALLBACK add_one_font_entity_to_list P_ ((ENUMLOGFONTEX *,
-                                                     NEWTEXTMETRICEX *,
-                                                     DWORD, LPARAM));
-static int CALLBACK add_font_name_to_list P_ ((ENUMLOGFONTEX *,
-                                               NEWTEXTMETRICEX *,
-                                               DWORD, LPARAM));
+                                                 DWORD, LPARAM);
+static int CALLBACK add_font_name_to_list (ENUMLOGFONTEX *,
+                                           NEWTEXTMETRICEX *,
+                                           DWORD, LPARAM);
 
 /* struct passed in as LPARAM arg to EnumFontFamiliesEx, for keeping track
    of what we really want.  */
@@ -149,12 +149,11 @@
 
 /* Handles the problem that EnumFontFamiliesEx will not return all
    style variations if the font name is not specified.  */
-static void list_all_matching_fonts P_ ((struct font_callback_data *));
+static void list_all_matching_fonts (struct font_callback_data *);
 
 
 static int
-memq_no_quit (elt, list)
-     Lisp_Object elt, list;
+memq_no_quit (Lisp_Object elt, Lisp_Object list)
 {
   while (CONSP (list) && ! EQ (XCAR (list), elt))
     list = XCDR (list);
@@ -162,8 +161,7 @@
 }
 
 Lisp_Object
-intern_font_name (string)
-     char * string;
+intern_font_name (char * string)
 {
   Lisp_Object obarray, tem, str;
   int len;
@@ -185,8 +183,7 @@
    Return a cache of font-entities on FRAME.  The cache must be a
    cons whose cdr part is the actual cache area.  */
 Lisp_Object
-w32font_get_cache (f)
-     FRAME_PTR f;
+w32font_get_cache (FRAME_PTR f)
 {
   struct w32_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 
@@ -198,8 +195,7 @@
    is a vector of font-entities.  This is the sole API that
    allocates font-entities.  */
 static Lisp_Object
-w32font_list (frame, font_spec)
-     Lisp_Object frame, font_spec;
+w32font_list (Lisp_Object frame, Lisp_Object font_spec)
 {
   Lisp_Object fonts = w32font_list_internal (frame, font_spec, 0);
   FONT_ADD_LOG ("w32font-list", font_spec, fonts);
@@ -211,8 +207,7 @@
    FRAME.  The closeness is detemined by the font backend, thus
    `face-font-selection-order' is ignored here.  */
 static Lisp_Object
-w32font_match (frame, font_spec)
-     Lisp_Object frame, font_spec;
+w32font_match (Lisp_Object frame, Lisp_Object font_spec)
 {
   Lisp_Object entity = w32font_match_internal (frame, font_spec, 0);
   FONT_ADD_LOG ("w32font-match", font_spec, entity);
@@ -223,15 +218,14 @@
    List available families.  The value is a list of family names
    (symbols).  */
 static Lisp_Object
-w32font_list_family (frame)
-     Lisp_Object frame;
+w32font_list_family (Lisp_Object frame)
 {
   Lisp_Object list = Qnil;
   LOGFONT font_match_pattern;
   HDC dc;
   FRAME_PTR f = XFRAME (frame);
 
-  bzero (&font_match_pattern, sizeof (font_match_pattern));
+  memset (&font_match_pattern, 0, sizeof (font_match_pattern));
   font_match_pattern.lfCharSet = DEFAULT_CHARSET;
 
   dc = get_frame_dc (f);
@@ -248,10 +242,7 @@
    Open a font specified by FONT_ENTITY on frame F.
    If the font is scalable, open it with PIXEL_SIZE.  */
 static Lisp_Object
-w32font_open (f, font_entity, pixel_size)
-     FRAME_PTR f;
-     Lisp_Object font_entity;
-     int pixel_size;
+w32font_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size)
 {
   Lisp_Object font_object
     = font_make_object (VECSIZE (struct w32font_info),
@@ -275,9 +266,7 @@
 /* w32 implementation of close for font_backend.
    Close FONT on frame F.  */
 void
-w32font_close (f, font)
-     FRAME_PTR f;
-     struct font *font;
+w32font_close (FRAME_PTR f, struct font *font)
 {
   int i;
   struct w32font_info *w32_font = (struct w32font_info *) font;
@@ -303,9 +292,7 @@
    return 1.  If not, return 0.  If a font must be opened to check
    it, return -1.  */
 int
-w32font_has_char (entity, c)
-     Lisp_Object entity;
-     int c;
+w32font_has_char (Lisp_Object entity, int c)
 {
   /* We can't be certain about which characters a font will support until
      we open it.  Checking the scripts that the font supports turns out
@@ -354,9 +341,7 @@
    which characters are not supported by the font.
   */
 static unsigned
-w32font_encode_char (font, c)
-     struct font *font;
-     int c;
+w32font_encode_char (struct font *font, int c)
 {
   struct w32font_info * w32_font = (struct w32font_info *)font;
 
@@ -373,11 +358,8 @@
    CODE (length NGLYPHS).  Apparently metrics can be NULL, in this
    case just return the overall width.  */
 int
-w32font_text_extents (font, code, nglyphs, metrics)
-     struct font *font;
-     unsigned *code;
-     int nglyphs;
-     struct font_metrics *metrics;
+w32font_text_extents (struct font *font, unsigned *code,
+		      int nglyphs, struct font_metrics *metrics)
 {
   int i;
   HFONT old_font = NULL;
@@ -391,7 +373,7 @@
 
   if (metrics)
     {
-      bzero (metrics, sizeof (struct font_metrics));
+      memset (metrics, 0, sizeof (struct font_metrics));
       metrics->ascent = font->ascent;
       metrics->descent = font->descent;
 
@@ -412,9 +394,9 @@
 		  = xrealloc (w32_font->cached_metrics,
 			      (block + 1)
 			      * sizeof (struct w32_metric_cache *));
-	      bzero (w32_font->cached_metrics + w32_font->n_cache_blocks,
-		     ((block + 1 - w32_font->n_cache_blocks)
-		      * sizeof (struct w32_metric_cache *)));
+	      memset (w32_font->cached_metrics + w32_font->n_cache_blocks, 0,
+		      ((block + 1 - w32_font->n_cache_blocks)
+		       * sizeof (struct w32_metric_cache *)));
 	      w32_font->n_cache_blocks = block + 1;
 	    }
 
@@ -422,8 +404,8 @@
 	    {
 	      w32_font->cached_metrics[block]
 		= xmalloc (CACHE_BLOCKSIZE * sizeof (struct w32_metric_cache));
-	      bzero (w32_font->cached_metrics[block],
-		     CACHE_BLOCKSIZE * sizeof (struct w32_metric_cache));
+	      memset (w32_font->cached_metrics[block], 0,
+		      CACHE_BLOCKSIZE * sizeof (struct w32_metric_cache));
 	    }
 
 	  char_metric = w32_font->cached_metrics[block] + pos_in_block;
@@ -552,9 +534,8 @@
 */
 
 int
-w32font_draw (s, from, to, x, y, with_background)
-     struct glyph_string *s;
-     int from, to, x, y, with_background;
+w32font_draw (struct glyph_string *s, int from, int to,
+	      int x, int y, int with_background)
 {
   UINT options;
   HRGN orig_clip = NULL;
@@ -568,7 +549,7 @@
 
       /* Save clip region for later restoration.  */
       orig_clip = CreateRectRgn (0, 0, 0, 0);
-      if (!GetClipRgn(s->hdc, orig_clip))
+      if (!GetClipRgn (s->hdc, orig_clip))
 	{
 	  DeleteObject (orig_clip);
 	  orig_clip = NULL;
@@ -715,9 +696,7 @@
    Additional parameter opentype_only restricts the returned fonts to
    opentype fonts, which can be used with the Uniscribe backend.  */
 Lisp_Object
-w32font_list_internal (frame, font_spec, opentype_only)
-     Lisp_Object frame, font_spec;
-     int opentype_only;
+w32font_list_internal (Lisp_Object frame, Lisp_Object font_spec, int opentype_only)
 {
   struct font_callback_data match_data;
   HDC dc;
@@ -727,7 +706,7 @@
   match_data.list = Qnil;
   match_data.frame = frame;
 
-  bzero (&match_data.pattern, sizeof (LOGFONT));
+  memset (&match_data.pattern, 0, sizeof (LOGFONT));
   fill_in_logfont (f, &match_data.pattern, font_spec);
 
   /* If the charset is unrecognized, then we won't find a font, so don't
@@ -770,9 +749,7 @@
    Additional parameter opentype_only restricts the returned fonts to
    opentype fonts, which can be used with the Uniscribe backend.  */
 Lisp_Object
-w32font_match_internal (frame, font_spec, opentype_only)
-     Lisp_Object frame, font_spec;
-     int opentype_only;
+w32font_match_internal (Lisp_Object frame, Lisp_Object font_spec, int opentype_only)
 {
   struct font_callback_data match_data;
   HDC dc;
@@ -782,7 +759,7 @@
   match_data.frame = frame;
   match_data.list = Qnil;
 
-  bzero (&match_data.pattern, sizeof (LOGFONT));
+  memset (&match_data.pattern, 0, sizeof (LOGFONT));
   fill_in_logfont (f, &match_data.pattern, font_spec);
 
   match_data.opentype_only = opentype_only;
@@ -800,11 +777,8 @@
 }
 
 int
-w32font_open_internal (f, font_entity, pixel_size, font_object)
-     FRAME_PTR f;
-     Lisp_Object font_entity;
-     int pixel_size;
-     Lisp_Object font_object;
+w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity,
+		       int pixel_size, Lisp_Object font_object)
 {
   int len, size, i;
   LOGFONT logfont;
@@ -821,7 +795,7 @@
   if (!font)
     return 0;
 
-  bzero (&logfont, sizeof (logfont));
+  memset (&logfont, 0, sizeof (logfont));
   fill_in_logfont (f, &logfont, font_entity);
 
   /* Prefer truetype fonts, to avoid known problems with type1 fonts, and
@@ -850,8 +824,8 @@
     {
       metrics = (OUTLINETEXTMETRICW *) alloca (len);
       if (GetOutlineTextMetricsW (dc, len, metrics))
-        bcopy (&metrics->otmTextMetrics, &w32_font->metrics,
-               sizeof (TEXTMETRICW));
+        memcpy (&w32_font->metrics, &metrics->otmTextMetrics,
+		sizeof (TEXTMETRICW));
       else
         metrics = NULL;
     }
@@ -951,11 +925,9 @@
 /* Callback function for EnumFontFamiliesEx.
  * Adds the name of a font to a Lisp list (passed in as the lParam arg).  */
 static int CALLBACK
-add_font_name_to_list (logical_font, physical_font, font_type, list_object)
-     ENUMLOGFONTEX *logical_font;
-     NEWTEXTMETRICEX *physical_font;
-     DWORD font_type;
-     LPARAM list_object;
+add_font_name_to_list (ENUMLOGFONTEX *logical_font,
+		       NEWTEXTMETRICEX *physical_font,
+		       DWORD font_type, LPARAM list_object)
 {
   Lisp_Object* list = (Lisp_Object *) list_object;
   Lisp_Object family;
@@ -971,19 +943,17 @@
   return 1;
 }
 
-static int w32_decode_weight P_ ((int));
-static int w32_encode_weight P_ ((int));
+static int w32_decode_weight (int);
+static int w32_encode_weight (int);
 
 /* Convert an enumerated Windows font to an Emacs font entity.  */
 static Lisp_Object
-w32_enumfont_pattern_entity (frame, logical_font, physical_font,
-                             font_type, requested_font, backend)
-     Lisp_Object frame;
-     ENUMLOGFONTEX *logical_font;
-     NEWTEXTMETRICEX *physical_font;
-     DWORD font_type;
-     LOGFONT *requested_font;
-     Lisp_Object backend;
+w32_enumfont_pattern_entity (Lisp_Object frame,
+			     ENUMLOGFONTEX *logical_font,
+			     NEWTEXTMETRICEX *physical_font,
+			     DWORD font_type,
+			     LOGFONT *requested_font,
+			     Lisp_Object backend)
 {
   Lisp_Object entity, tem;
   LOGFONT *lf = (LOGFONT*) logical_font;
@@ -1107,8 +1077,7 @@
 }
 
 static int
-logfonts_match (font, pattern)
-     LOGFONT *font, *pattern;
+logfonts_match (LOGFONT *font, LOGFONT *pattern)
 {
   /* Only check height for raster fonts.  */
   if (pattern->lfHeight && font->lfOutPrecision == OUT_STRING_PRECIS
@@ -1132,12 +1101,9 @@
 #define CSB_CHINESE ((1 << 18) | (1 << 20))
 
 static int
-font_matches_spec (type, font, spec, backend, logfont)
-     DWORD type;
-     NEWTEXTMETRICEX *font;
-     Lisp_Object spec;
-     Lisp_Object backend;
-     LOGFONT *logfont;
+font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
+		   Lisp_Object spec, Lisp_Object backend,
+		   LOGFONT *logfont)
 {
   Lisp_Object extra, val;
 
@@ -1322,9 +1288,7 @@
 }
 
 static int
-w32font_coverage_ok (coverage, charset)
-     FONTSIGNATURE * coverage;
-     BYTE charset;
+w32font_coverage_ok (FONTSIGNATURE * coverage, BYTE charset)
 {
   DWORD subrange1 = coverage->fsUsb[1];
 
@@ -1350,9 +1314,7 @@
 
 
 static int
-check_face_name (font, full_name)
-     LOGFONT *font;
-     char *full_name;
+check_face_name (LOGFONT *font, char *full_name)
 {
   char full_iname[LF_FULLFACESIZE+1];
 
@@ -1397,11 +1359,9 @@
  * and the list to which the fonts are added are passed in via the
  * lparam argument, in the form of a font_callback_data struct. */
 static int CALLBACK
-add_font_entity_to_list (logical_font, physical_font, font_type, lParam)
-     ENUMLOGFONTEX *logical_font;
-     NEWTEXTMETRICEX *physical_font;
-     DWORD font_type;
-     LPARAM lParam;
+add_font_entity_to_list (ENUMLOGFONTEX *logical_font,
+			 NEWTEXTMETRICEX *physical_font,
+			 DWORD font_type, LPARAM lParam)
 {
   struct font_callback_data *match_data
     = (struct font_callback_data *) lParam;
@@ -1510,11 +1470,9 @@
 /* Callback function for EnumFontFamiliesEx.
  * Terminates the search once we have a match. */
 static int CALLBACK
-add_one_font_entity_to_list (logical_font, physical_font, font_type, lParam)
-     ENUMLOGFONTEX *logical_font;
-     NEWTEXTMETRICEX *physical_font;
-     DWORD font_type;
-     LPARAM lParam;
+add_one_font_entity_to_list (ENUMLOGFONTEX *logical_font,
+			     NEWTEXTMETRICEX *physical_font,
+			     DWORD font_type, LPARAM lParam)
 {
   struct font_callback_data *match_data
     = (struct font_callback_data *) lParam;
@@ -1526,8 +1484,7 @@
 
 /* Old function to convert from x to w32 charset, from w32fns.c.  */
 static LONG
-x_to_w32_charset (lpcs)
-    char * lpcs;
+x_to_w32_charset (char * lpcs)
 {
   Lisp_Object this_entry, w32_charset;
   char *charset;
@@ -1609,8 +1566,7 @@
 
 /* Convert a Lisp font registry (symbol) to a windows charset.  */
 static LONG
-registry_to_w32_charset (charset)
-     Lisp_Object charset;
+registry_to_w32_charset (Lisp_Object charset)
 {
   if (EQ (charset, Qiso10646_1) || EQ (charset, Qunicode_bmp)
       || EQ (charset, Qunicode_sip))
@@ -1625,9 +1581,7 @@
 
 /* Old function to convert from w32 to x charset, from w32fns.c.  */
 static char *
-w32_to_x_charset (fncharset, matching)
-    int fncharset;
-    char *matching;
+w32_to_x_charset (int fncharset, char *matching)
 {
   static char buf[32];
   Lisp_Object charset_type;
@@ -1821,9 +1775,7 @@
 }
 
 static Lisp_Object
-w32_registry (w32_charset, font_type)
-     LONG w32_charset;
-     DWORD font_type;
+w32_registry (LONG w32_charset, DWORD font_type)
 {
   char *charset;
 
@@ -1833,12 +1785,11 @@
     return font_type == TRUETYPE_FONTTYPE ? Qiso10646_1 : Qunknown;
 
   charset = w32_to_x_charset (w32_charset, NULL);
-  return font_intern_prop (charset, strlen(charset), 1);
+  return font_intern_prop (charset, strlen (charset), 1);
 }
 
 static int
-w32_decode_weight (fnweight)
-     int fnweight;
+w32_decode_weight (int fnweight)
 {
   if (fnweight >= FW_HEAVY)      return 210;
   if (fnweight >= FW_EXTRABOLD)  return 205;
@@ -1852,8 +1803,7 @@
 }
 
 static int
-w32_encode_weight (n)
-     int n;
+w32_encode_weight (int n)
 {
   if (n >= 210) return FW_HEAVY;
   if (n >= 205) return FW_EXTRABOLD;
@@ -1869,8 +1819,7 @@
 /* Convert a Windows font weight into one of the weights supported
    by fontconfig (see font.c:font_parse_fcname).  */
 static Lisp_Object
-w32_to_fc_weight (n)
-     int n;
+w32_to_fc_weight (int n)
 {
   if (n >= FW_EXTRABOLD) return intern ("black");
   if (n >= FW_BOLD) return intern ("bold");
@@ -1881,10 +1830,7 @@
 
 /* Fill in all the available details of LOGFONT from FONT_SPEC.  */
 static void
-fill_in_logfont (f, logfont, font_spec)
-     FRAME_PTR f;
-     LOGFONT *logfont;
-     Lisp_Object font_spec;
+fill_in_logfont (FRAME_PTR f, LOGFONT *logfont, Lisp_Object font_spec)
 {
   Lisp_Object tmp, extra;
   int dpi = FRAME_W32_DISPLAY_INFO (f)->resy;
@@ -2029,8 +1975,7 @@
 }
 
 static void
-list_all_matching_fonts (match_data)
-     struct font_callback_data *match_data;
+list_all_matching_fonts (struct font_callback_data *match_data)
 {
   HDC dc;
   Lisp_Object families = w32font_list_family (match_data->frame);
@@ -2066,8 +2011,7 @@
 }
 
 static Lisp_Object
-lispy_antialias_type (type)
-     BYTE type;
+lispy_antialias_type (BYTE type)
 {
   Lisp_Object lispy;
 
@@ -2094,8 +2038,7 @@
 
 /* Convert antialiasing symbols to lfQuality  */
 static BYTE
-w32_antialias_type (type)
-     Lisp_Object type;
+w32_antialias_type (Lisp_Object type)
 {
   if (EQ (type, Qnone))
     return NONANTIALIASED_QUALITY;
@@ -2241,12 +2184,8 @@
    The full name is in fcname format, with weight, slant and antialiasing
    specified if they are not "normal".  */
 static int
-w32font_full_name (font, font_obj, pixel_size, name, nbytes)
-  LOGFONT * font;
-  Lisp_Object font_obj;
-  int pixel_size;
-  char *name;
-  int nbytes;
+w32font_full_name (LOGFONT * font, Lisp_Object font_obj,
+		   int pixel_size, char *name, int nbytes)
 {
   int len, height, outline;
   char *p;
@@ -2317,11 +2256,8 @@
    is written.  If the buffer is not large enough to contain the name,
    the function returns -1, otherwise it returns the number of bytes
    written to FCNAME.  */
-static int logfont_to_fcname(font, pointsize, fcname, size)
-     LOGFONT* font;
-     int pointsize;
-     char *fcname;
-     int size;
+static int
+logfont_to_fcname (LOGFONT* font, int pointsize, char *fcname, int size)
 {
   int len, height;
   char *p = fcname;
@@ -2360,11 +2296,8 @@
 }
 
 static void
-compute_metrics (dc, w32_font, code, metrics)
-     HDC dc;
-     struct w32font_info *w32_font;
-     unsigned int code;
-     struct w32_metric_cache *metrics;
+compute_metrics (HDC dc, struct w32font_info *w32_font, unsigned int code,
+		 struct w32_metric_cache *metrics)
 {
   GLYPHMETRICS gm;
   MAT2 transform;
@@ -2373,7 +2306,7 @@
   if (w32_font->glyph_idx)
     options |= GGO_GLYPH_INDEX;
 
-  bzero (&transform, sizeof (transform));
+  memset (&transform, 0, sizeof (transform));
   transform.eM11.value = 1;
   transform.eM22.value = 1;
 
@@ -2407,8 +2340,8 @@
   HANDLE oldobj;
   char buf[100];
 
-  bzero (&cf, sizeof (cf));
-  bzero (&lf, sizeof (lf));
+  memset (&cf, 0, sizeof (cf));
+  memset (&lf, 0, sizeof (lf));
 
   cf.lStructSize = sizeof (cf);
   cf.hwndOwner = FRAME_W32_WINDOW (f);
@@ -2482,7 +2415,7 @@
 /* Initialize state that does not change between invocations. This is only
    called when Emacs is dumped.  */
 void
-syms_of_w32font ()
+syms_of_w32font (void)
 {
   DEFSYM (Qgdi, "gdi");
   DEFSYM (Quniscribe, "uniscribe");
--- a/src/w32font.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32font.h	Thu Jul 08 17:09:35 2010 +0900
@@ -62,26 +62,26 @@
 
 #define CACHE_BLOCKSIZE 128
 
-Lisp_Object w32font_get_cache P_ ((FRAME_PTR fe));
-Lisp_Object w32font_list_internal P_ ((Lisp_Object frame,
-                                       Lisp_Object font_spec,
-                                       int opentype_only));
-Lisp_Object w32font_match_internal P_ ((Lisp_Object frame,
-                                        Lisp_Object font_spec,
-                                        int opentype_only));
-int w32font_open_internal P_ ((FRAME_PTR f, Lisp_Object font_entity,
-                               int pixel_size, Lisp_Object font_object));
-void w32font_close P_ ((FRAME_PTR f, struct font *font));
-int w32font_has_char P_ ((Lisp_Object entity, int c));
-int w32font_text_extents P_ ((struct font *font, unsigned *code, int nglyphs,
-                              struct font_metrics *metrics));
-int w32font_draw P_ ((struct glyph_string *s, int from, int to,
-                      int x, int y, int with_background));
+Lisp_Object w32font_get_cache (FRAME_PTR fe);
+Lisp_Object w32font_list_internal (Lisp_Object frame,
+                                   Lisp_Object font_spec,
+                                   int opentype_only);
+Lisp_Object w32font_match_internal (Lisp_Object frame,
+                                    Lisp_Object font_spec,
+                                    int opentype_only);
+int w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity,
+                           int pixel_size, Lisp_Object font_object);
+void w32font_close (FRAME_PTR f, struct font *font);
+int w32font_has_char (Lisp_Object entity, int c);
+int w32font_text_extents (struct font *font, unsigned *code, int nglyphs,
+                          struct font_metrics *metrics);
+int w32font_draw (struct glyph_string *s, int from, int to,
+                  int x, int y, int with_background);
 
 
-int uniscribe_check_otf P_ ((LOGFONT *font, Lisp_Object otf_spec));
+int uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec);
 
-Lisp_Object intern_font_name P_ ((char *));
+Lisp_Object intern_font_name (char *);
 
 #endif
 
--- a/src/w32heap.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32heap.c	Thu Jul 08 17:09:35 2010 +0900
@@ -222,7 +222,7 @@
    was allocated by something else; GNU malloc detects when there is a
    jump in the sbrk values, and starts a new heap block.  */
 void
-init_heap ()
+init_heap (void)
 {
   PIMAGE_DOS_HEADER dos_header;
   PIMAGE_NT_HEADERS nt_header;
--- a/src/w32inevt.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32inevt.c	Thu Jul 08 17:09:35 2010 +0900
@@ -582,8 +582,8 @@
   *part = 0;
   SELECTED_FRAME ()->mouse_moved = 0;
 
-  XSETINT(*x, movement_pos.X);
-  XSETINT(*y, movement_pos.Y);
+  XSETINT (*x, movement_pos.X);
+  XSETINT (*y, movement_pos.Y);
   *time = movement_time;
 
   UNBLOCK_INPUT;
@@ -684,7 +684,7 @@
 }
 
 static void
-maybe_generate_resize_event ()
+maybe_generate_resize_event (void)
 {
   CONSOLE_SCREEN_BUFFER_INFO info;
   FRAME_PTR f = get_frame ();
--- a/src/w32menu.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32menu.c	Thu Jul 08 17:09:35 2010 +0900
@@ -59,8 +59,8 @@
 
 HMENU current_popup_menu;
 
-void syms_of_w32menu ();
-void globals_of_w32menu ();
+void syms_of_w32menu (void);
+void globals_of_w32menu (void);
 
 typedef BOOL (WINAPI * GetMenuItemInfoA_Proc) (
     IN HMENU,
@@ -90,16 +90,16 @@
 
 extern Lisp_Object Qmenu_bar_update_hook;
 
-void set_frame_menubar P_ ((FRAME_PTR, int, int));
+void set_frame_menubar (FRAME_PTR, int, int);
 
 #ifdef HAVE_DIALOGS
-static Lisp_Object w32_dialog_show P_ ((FRAME_PTR, int, Lisp_Object, char**));
+static Lisp_Object w32_dialog_show (FRAME_PTR, int, Lisp_Object, char**);
 #else
-static int is_simple_dialog P_ ((Lisp_Object));
-static Lisp_Object simple_dialog_show P_ ((FRAME_PTR, Lisp_Object, Lisp_Object));
+static int is_simple_dialog (Lisp_Object);
+static Lisp_Object simple_dialog_show (FRAME_PTR, Lisp_Object, Lisp_Object);
 #endif
 
-void w32_free_menu_strings P_((HWND));
+void w32_free_menu_strings (HWND);
 
 
 /* This is set nonzero after the user activates the menu bar, and set
@@ -116,8 +116,7 @@
    ID, or 0 if none.  */
 
 static struct frame *
-menubar_id_to_frame (id)
-     HMENU id;
+menubar_id_to_frame (HMENU id)
 {
   Lisp_Object tail, frame;
   FRAME_PTR f;
@@ -276,8 +275,7 @@
    This way we can safely execute Lisp code.  */
 
 void
-x_activate_menubar (f)
-     FRAME_PTR f;
+x_activate_menubar (FRAME_PTR f)
 {
   set_frame_menubar (f, 0, 1);
 
@@ -386,10 +384,7 @@
    it is set the first time this is called, from initialize_frame_menubar.  */
 
 void
-set_frame_menubar (f, first_time, deep_p)
-     FRAME_PTR f;
-     int first_time;
-     int deep_p;
+set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
 {
   HMENU menubar_widget = f->output_data.w32->menubar_widget;
   Lisp_Object items;
@@ -455,8 +450,8 @@
 
       /* Save the frame's previous menu bar contents data.  */
       if (previous_menu_items_used)
-	bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items,
-	       previous_menu_items_used * sizeof (Lisp_Object));
+	memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
+		previous_menu_items_used * sizeof (Lisp_Object));
 
       /* Fill in menu_items with the current menu bar contents.
 	 This can evaluate Lisp code.  */
@@ -648,8 +643,7 @@
    is visible.  */
 
 void
-initialize_frame_menubar (f)
-     FRAME_PTR f;
+initialize_frame_menubar (FRAME_PTR f)
 {
   /* This function is called before the first chance to redisplay
      the frame.  It has to be, so the frame will have the right size.  */
@@ -661,8 +655,7 @@
    This is used when deleting a frame, and when turning off the menu bar.  */
 
 void
-free_frame_menubar (f)
-     FRAME_PTR f;
+free_frame_menubar (FRAME_PTR f)
 {
   BLOCK_INPUT;
 
@@ -1020,11 +1013,9 @@
   "button6", "button7", "button8", "button9", "button10" };
 
 static Lisp_Object
-w32_dialog_show (f, keymaps, title, header, error)
-     FRAME_PTR f;
-     int keymaps;
-     Lisp_Object title, header;
-     char **error;
+w32_dialog_show (FRAME_PTR f, int keymaps,
+		 Lisp_Object title, Lisp_Object header,
+		 char **error)
 {
   int i, nb_buttons=0;
   char dialog_name[6];
@@ -1127,7 +1118,7 @@
     /*  Frame title: 'Q' = Question, 'I' = Information.
         Can also have 'E' = Error if, one day, we want
         a popup for errors. */
-    if (NILP(header))
+    if (NILP (header))
       dialog_name[0] = 'Q';
     else
       dialog_name[0] = 'I';
@@ -1213,8 +1204,8 @@
    anywhere in Emacs that uses the other specific dialog choices that
    MessageBox provides.  */
 
-static int is_simple_dialog (contents)
-  Lisp_Object contents;
+static int
+is_simple_dialog (Lisp_Object contents)
 {
   Lisp_Object options = XCDR (contents);
   Lisp_Object name, yes, no, other;
@@ -1249,9 +1240,8 @@
   return !(CONSP (options));
 }
 
-static Lisp_Object simple_dialog_show (f, contents, header)
-     FRAME_PTR f;
-     Lisp_Object contents, header;
+static Lisp_Object
+simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header)
 {
   int answer;
   UINT type;
@@ -1315,8 +1305,7 @@
 
 /* Is this item a separator? */
 static int
-name_is_separator (name)
-     char *name;
+name_is_separator (char *name)
 {
   char *start = name;
 
@@ -1533,7 +1522,7 @@
       if (set_menu_item_info)
 	{
 	  MENUITEMINFO info;
-	  bzero (&info, sizeof (info));
+	  memset (&info, 0, sizeof (info));
 	  info.cbSize = sizeof (info);
 	  info.fMask = MIIM_DATA;
 
@@ -1616,7 +1605,7 @@
 	{
 	  MENUITEMINFO info;
 
-	  bzero (&info, sizeof (info));
+	  memset (&info, 0, sizeof (info));
 	  info.cbSize = sizeof (info);
 	  info.fMask = MIIM_DATA;
 	  get_menu_item_info (menu, item, FALSE, &info);
@@ -1647,14 +1636,13 @@
 
 /* Free memory used by owner-drawn strings.  */
 static void
-w32_free_submenu_strings (menu)
-     HMENU menu;
+w32_free_submenu_strings (HMENU menu)
 {
   int i, num = GetMenuItemCount (menu);
   for (i = 0; i < num; i++)
     {
       MENUITEMINFO info;
-      bzero (&info, sizeof (info));
+      memset (&info, 0, sizeof (info));
       info.cbSize = sizeof (info);
       info.fMask = MIIM_DATA | MIIM_TYPE | MIIM_SUBMENU;
 
@@ -1676,8 +1664,7 @@
 }
 
 void
-w32_free_menu_strings (hwnd)
-     HWND hwnd;
+w32_free_menu_strings (HWND hwnd)
 {
   HMENU menu = current_popup_menu;
 
@@ -1712,7 +1699,8 @@
 #endif /* HAVE_MENUS */
 }
 
-void syms_of_w32menu ()
+void
+syms_of_w32menu (void)
 {
   globals_of_w32menu ();
 
@@ -1734,7 +1722,8 @@
 	variable initialized is 0 and directly from main when initialized
 	is non zero.
  */
-void globals_of_w32menu ()
+void
+globals_of_w32menu (void)
 {
 	/* See if Get/SetMenuItemInfo functions are available.  */
   HMODULE user32 = GetModuleHandle ("user32.dll");
--- a/src/w32proc.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32proc.c	Thu Jul 08 17:09:35 2010 +0900
@@ -46,7 +46,7 @@
 #include <windows.h>
 #ifdef __GNUC__
 /* This definition is missing from mingw32 headers. */
-extern BOOL WINAPI IsValidLocale(LCID, DWORD);
+extern BOOL WINAPI IsValidLocale (LCID, DWORD);
 #endif
 
 #ifdef HAVE_LANGINFO_CODESET
@@ -117,7 +117,8 @@
 Lisp_Object Qhigh, Qlow;
 
 #ifdef EMACSDEBUG
-void _DebPrint (const char *fmt, ...)
+void
+_DebPrint (const char *fmt, ...)
 {
   char buf[1024];
   va_list args;
@@ -129,7 +130,7 @@
 }
 #endif
 
-typedef void (_CALLBACK_ *signal_handler)(int);
+typedef void (_CALLBACK_ *signal_handler) (int);
 
 /* Signal handlers...SIG_DFL == 0 so this is initialized correctly.  */
 static signal_handler sig_handlers[NSIG];
@@ -175,7 +176,7 @@
   cp = &child_procs[child_proc_count++];
 
  Initialise:
-  memset (cp, 0, sizeof(*cp));
+  memset (cp, 0, sizeof (*cp));
   cp->fd = -1;
   cp->pid = -1;
   cp->procinfo.hProcess = NULL;
@@ -398,7 +399,7 @@
   return TRUE;
 
  EH_Fail:
-  DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError()););
+  DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError ()););
   return FALSE;
 }
 
@@ -608,7 +609,10 @@
 #endif
 
 void
-w32_executable_type (char * filename, int * is_dos_app, int * is_cygnus_app, int * is_gui_app)
+w32_executable_type (char * filename,
+		     int * is_dos_app,
+		     int * is_cygnus_app,
+		     int * is_gui_app)
 {
   file_data executable;
   char * p;
@@ -1875,7 +1879,8 @@
 
 #ifdef HAVE_LANGINFO_CODESET
 /* Emulation of nl_langinfo.  Used in fns.c:Flocale_info.  */
-char *nl_langinfo (nl_item item)
+char *
+nl_langinfo (nl_item item)
 {
   /* Conversion of Posix item numbers to their Windows equivalents.  */
   static const LCTYPE w32item[] = {
@@ -2003,13 +2008,14 @@
   return make_number (GetThreadLocale ());
 }
 
-DWORD int_from_hex (char * s)
+DWORD
+int_from_hex (char * s)
 {
   DWORD val = 0;
   static char hex[] = "0123456789abcdefABCDEF";
   char * p;
 
-  while (*s && (p = strchr(hex, *s)) != NULL)
+  while (*s && (p = strchr (hex, *s)) != NULL)
     {
       unsigned digit = p - hex;
       if (digit > 15)
@@ -2024,7 +2030,8 @@
    function isn't given a context pointer.  */
 Lisp_Object Vw32_valid_locale_ids;
 
-BOOL CALLBACK enum_locale_fn (LPTSTR localeNum)
+BOOL CALLBACK
+enum_locale_fn (LPTSTR localeNum)
 {
   DWORD id = int_from_hex (localeNum);
   Vw32_valid_locale_ids = Fcons (make_number (id), Vw32_valid_locale_ids);
@@ -2089,7 +2096,8 @@
    function isn't given a context pointer.  */
 Lisp_Object Vw32_valid_codepages;
 
-BOOL CALLBACK enum_codepage_fn (LPTSTR codepageNum)
+BOOL CALLBACK
+enum_codepage_fn (LPTSTR codepageNum)
 {
   DWORD id = atoi (codepageNum);
   Vw32_valid_codepages = Fcons (make_number (id), Vw32_valid_codepages);
@@ -2265,7 +2273,8 @@
 }
 
 
-syms_of_ntproc ()
+void
+syms_of_ntproc (void)
 {
   DEFSYM (Qhigh, "high");
   DEFSYM (Qlow, "low");
--- a/src/w32reg.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32reg.c	Thu Jul 08 17:09:35 2010 +0900
@@ -58,9 +58,7 @@
 */
 
 static char *
-w32_get_rdb_resource (rdb, resource)
-     char *rdb;
-     char *resource;
+w32_get_rdb_resource (char *rdb, char *resource)
 {
   char *value = rdb;
   int len = strlen (resource);
@@ -78,9 +76,7 @@
 }
 
 static LPBYTE
-w32_get_string_resource (name, class, dwexptype)
-     char *name, *class;
-     DWORD dwexptype;
+w32_get_string_resource (char *name, char *class, DWORD dwexptype)
 {
   LPBYTE lpvalue = NULL;
   HKEY hrootkey = NULL;
@@ -147,9 +143,7 @@
    database RDB. */
 
 char *
-x_get_string_resource (rdb, name, class)
-     XrmDatabase rdb;
-     char *name, *class;
+x_get_string_resource (XrmDatabase rdb, char *name, char *class)
 {
   if (rdb)
     {
--- a/src/w32select.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32select.c	Thu Jul 08 17:09:35 2010 +0900
@@ -30,7 +30,7 @@
  * (CF_UNICODETEXT), when a well-known console codepage is given, they
  * apply to the console version of the clipboard data (CF_OEMTEXT),
  * else they apply to the normal 8-bit text clipboard (CF_TEXT).
- * 
+ *
  * When pasting (getting data from the OS), the clipboard format that
  * matches the {next-}selection-coding-system is retrieved.  If
  * Unicode is requested, but not available, 8-bit text (CF_TEXT) is
@@ -45,13 +45,13 @@
  *
  * Scenarios to use the facilities for customizing the selection
  * coding system are:
- * 
+ *
  *   ;; Generally use KOI8-R instead of the russian MS codepage for
  *   ;; the 8-bit clipboard.
  *   (set-selection-coding-system 'koi8-r-dos)
- * 
+ *
  * Or
- * 
+ *
  *   ;; Create a special clipboard copy function that uses codepage
  *   ;; 1253 (Greek) to copy Greek text to a specific non-Unicode
  *   ;; application.
@@ -71,7 +71,7 @@
  * types should be supported is also moved to Lisp, functionality
  * could be expanded to CF_HTML, CF_RTF and maybe other types.
  */
- 
+
 #include <config.h>
 #include <setjmp.h>
 #include "lisp.h"
@@ -89,8 +89,8 @@
 static HGLOBAL convert_to_handle_as_coded (Lisp_Object coding_system);
 static Lisp_Object render (Lisp_Object oformat);
 static Lisp_Object render_locale (void);
-static Lisp_Object render_all (void);
-static void run_protected (Lisp_Object (*code) (), Lisp_Object arg);
+static Lisp_Object render_all (Lisp_Object ignore);
+static void run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg);
 static Lisp_Object lisp_error_handler (Lisp_Object error);
 static LRESULT CALLBACK owner_callback (HWND win, UINT msg,
 					WPARAM wp, LPARAM lp);
@@ -220,11 +220,11 @@
   unsigned char *dst = NULL;
   struct coding_system coding;
 
-  ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n",	
+  ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n",
 		    SDATA (SYMBOL_NAME (coding_system))));
 
   setup_windows_coding_system (coding_system, &coding);
-  coding.dst_bytes = SBYTES(current_text) * 2;
+  coding.dst_bytes = SBYTES (current_text) * 2;
   coding.destination = (unsigned char *) xmalloc (coding.dst_bytes);
   encode_coding_object (&coding, current_text, 0, 0,
 			SCHARS (current_text), SBYTES (current_text), Qnil);
@@ -290,7 +290,7 @@
 
   if (SetClipboardData (format, htext) == NULL)
     {
-      GlobalFree(htext);
+      GlobalFree (htext);
       return Qnil;
     }
 
@@ -314,7 +314,7 @@
 
   if ((lcid_ptr = (LCID *) GlobalLock (hlocale)) == NULL)
     {
-      GlobalFree(hlocale);
+      GlobalFree (hlocale);
       return Qnil;
     }
 
@@ -323,7 +323,7 @@
 
   if (SetClipboardData (CF_LOCALE, hlocale) == NULL)
     {
-      GlobalFree(hlocale);
+      GlobalFree (hlocale);
       return Qnil;
     }
 
@@ -334,7 +334,7 @@
    data survives us.  This code will do that.  */
 
 static Lisp_Object
-render_all (void)
+render_all (Lisp_Object ignore)
 {
   ONTRACE (fprintf (stderr, "render_all\n"));
 
@@ -380,7 +380,7 @@
        automatic conversions anywhere else, so to get consistent
        results, we probably don't want to rely on it here either.  */
 
-  render_locale();
+  render_locale ();
 
   if (current_clipboard_type == CF_UNICODETEXT)
     render (make_number (CF_TEXT));
@@ -392,7 +392,7 @@
 }
 
 static void
-run_protected (Lisp_Object (*code) (), Lisp_Object arg)
+run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg)
 {
   /* FIXME: This works but it doesn't feel right.  Too much fiddling
      with global variables and calling strange looking functions.  Is
@@ -514,7 +514,7 @@
       && EQ (cfg_coding_system, dos_coding_system))
     return;
   cfg_coding_system = dos_coding_system;
-  
+
   /* Set some sensible fallbacks */
   cfg_codepage = ANSICP;
   cfg_lcid = LOCALE_NEUTRAL;
@@ -583,7 +583,7 @@
       cfg_clipboard_type = CF_TEXT;
       return FALSE; /* Stop enumeration */
     }
-  
+
   /* Is the wanted codepage the OEM codepage for this locale? */
   codepage = cp_from_locale (lcid, CF_OEMTEXT);
   if (codepage == cfg_codepage)
@@ -704,7 +704,7 @@
   current_lcid = cfg_lcid;
   current_num_nls = 0;
   current_requires_encoding = 0;
-  
+
   BLOCK_INPUT;
 
   /* Check for non-ASCII characters.  While we are at it, count the
@@ -744,7 +744,7 @@
   /* If we have something non-ASCII we may want to set a locale.  We
      do that directly (non-delayed), as it's just a small bit.  */
   if (ok)
-    ok = !NILP(render_locale());
+    ok = !NILP (render_locale ());
 
   if (ok)
     {
@@ -753,7 +753,7 @@
 	  /* If for some reason we don't have a clipboard_owner, we
 	     just set the text format as chosen by the configuration
 	     and than forget about the whole thing.  */
-	  ok = !NILP(render (make_number (current_clipboard_type)));
+	  ok = !NILP (render (make_number (current_clipboard_type)));
 	  current_text = Qnil;
 	  current_coding_system = Qnil;
 	}
@@ -884,7 +884,7 @@
 	struct coding_system coding;
 	Lisp_Object coding_system = Qnil;
 	Lisp_Object dos_coding_system;
-	
+
 	/* `next-selection-coding-system' should override everything,
 	   even when the locale passed by the system disagrees.  The
 	   only exception is when `next-selection-coding-system'
@@ -1065,7 +1065,7 @@
    dumped version. */
 
 void
-syms_of_w32select ()
+syms_of_w32select (void)
 {
   defsubr (&Sw32_set_clipboard_data);
   defsubr (&Sw32_get_clipboard_data);
@@ -1076,7 +1076,7 @@
 When sending or receiving text via cut_buffer, selection, and
 clipboard, the text is encoded or decoded by this coding system.
 The default value is the current system default encoding on 9x/Me and
-`utf-16le-dos' (Unicode) on NT/W2K/XP. */);  
+`utf-16le-dos' (Unicode) on NT/W2K/XP. */);
   /* The actual value is set dynamically in the dumped Emacs, see
      below. */
   Vselection_coding_system = Qnil;
@@ -1104,7 +1104,7 @@
    un-dumped version. */
 
 void
-globals_of_w32select ()
+globals_of_w32select (void)
 {
   DEFAULT_LCID = GetUserDefaultLCID ();
   /* Drop the sort order from the LCID, so we can compare this with
--- a/src/w32term.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32term.c	Thu Jul 08 17:09:35 2010 +0900
@@ -96,7 +96,7 @@
 
 extern unsigned int msh_mousewheel;
 
-extern void free_frame_menubar ();
+extern void free_frame_menubar (struct frame *);
 
 extern int w32_codepage_for_font (char *fontname);
 extern Cursor w32_load_cursor (LPCTSTR name);
@@ -234,43 +234,43 @@
 /* Keyboard code page - may be changed by language-change events.  */
 static int keyboard_codepage;
 
-static void x_update_window_end P_ ((struct window *, int, int));
-static void w32_handle_tool_bar_click P_ ((struct frame *,
-                                          struct input_event *));
-static void w32_define_cursor P_ ((Window, Cursor));
-
-void x_lower_frame P_ ((struct frame *));
-void x_scroll_bar_clear P_ ((struct frame *));
-void x_wm_set_size_hint P_ ((struct frame *, long, int));
-void x_raise_frame P_ ((struct frame *));
-void x_set_window_size P_ ((struct frame *, int, int, int));
-void x_wm_set_window_state P_ ((struct frame *, int));
-void x_wm_set_icon_pixmap P_ ((struct frame *, int));
-static void w32_initialize P_ ((void));
-static void x_update_end P_ ((struct frame *));
-static void w32_frame_up_to_date P_ ((struct frame *));
-static void w32_set_terminal_modes P_ ((struct terminal *));
-static void w32_reset_terminal_modes P_ ((struct terminal *));
-static void x_clear_frame P_ ((struct frame *));
-static void frame_highlight P_ ((struct frame *));
-static void frame_unhighlight P_ ((struct frame *));
-static void x_new_focus_frame P_ ((struct w32_display_info *,
-				   struct frame *));
-static void x_focus_changed P_ ((int, int, struct w32_display_info *,
-				  struct frame *, struct input_event *));
-static void w32_detect_focus_change P_ ((struct w32_display_info *,
-                                       W32Msg *, struct input_event *));
-static void w32_frame_rehighlight P_ ((struct frame *));
-static void x_frame_rehighlight P_ ((struct w32_display_info *));
-static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
-static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int,
-				   enum text_cursor_kinds));
-static void w32_clip_to_row P_ ((struct window *, struct glyph_row *, int, HDC));
-static BOOL my_show_window P_ ((struct frame *, HWND, int));
-static void my_set_window_pos P_ ((HWND, HWND, int, int, int, int, UINT));
-static void my_set_focus P_ ((struct frame *, HWND));
-static void my_set_foreground_window P_ ((HWND));
-static void my_destroy_window P_ ((struct frame *, HWND));
+static void x_update_window_end (struct window *, int, int);
+static void w32_handle_tool_bar_click (struct frame *,
+                                       struct input_event *);
+static void w32_define_cursor (Window, Cursor);
+
+void x_lower_frame (struct frame *);
+void x_scroll_bar_clear (struct frame *);
+void x_wm_set_size_hint (struct frame *, long, int);
+void x_raise_frame (struct frame *);
+void x_set_window_size (struct frame *, int, int, int);
+void x_wm_set_window_state (struct frame *, int);
+void x_wm_set_icon_pixmap (struct frame *, int);
+static void w32_initialize (void);
+static void x_update_end (struct frame *);
+static void w32_frame_up_to_date (struct frame *);
+static void w32_set_terminal_modes (struct terminal *);
+static void w32_reset_terminal_modes (struct terminal *);
+static void x_clear_frame (struct frame *);
+static void frame_highlight (struct frame *);
+static void frame_unhighlight (struct frame *);
+static void x_new_focus_frame (struct w32_display_info *,
+                               struct frame *);
+static void x_focus_changed (int, int, struct w32_display_info *,
+                             struct frame *, struct input_event *);
+static void w32_detect_focus_change (struct w32_display_info *,
+                                     W32Msg *, struct input_event *);
+static void w32_frame_rehighlight (struct frame *);
+static void x_frame_rehighlight (struct w32_display_info *);
+static void x_draw_hollow_cursor (struct window *, struct glyph_row *);
+static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
+                               enum text_cursor_kinds);
+static void w32_clip_to_row (struct window *, struct glyph_row *, int, HDC);
+static BOOL my_show_window (struct frame *, HWND, int);
+static void my_set_window_pos (HWND, HWND, int, int, int, int, UINT);
+static void my_set_focus (struct frame *, HWND);
+static void my_set_foreground_window (HWND);
+static void my_destroy_window (struct frame *, HWND);
 
 static Lisp_Object Qvendor_specific_keysyms;
 
@@ -294,9 +294,7 @@
 
 int event_record_index;
 
-record_event (locus, type)
-     char *locus;
-     int type;
+record_event (char *locus, int type)
 {
   if (event_record_index == sizeof (event_record) / sizeof (struct record))
     event_record_index = 0;
@@ -310,7 +308,7 @@
 
 
 void
-XChangeGC (void * ignore, XGCValues* gc, unsigned long mask,
+XChangeGC (void *ignore, XGCValues *gc, unsigned long mask,
 	   XGCValues *xgcv)
 {
   if (mask & GCForeground)
@@ -321,11 +319,11 @@
     gc->font = xgcv->font;
 }
 
-XGCValues *XCreateGC (void * ignore, Window window, unsigned long mask,
-                      XGCValues *xgcv)
+XGCValues *
+XCreateGC (void *ignore, Window window, unsigned long mask, XGCValues *xgcv)
 {
   XGCValues *gc = (XGCValues *) xmalloc (sizeof (XGCValues));
-  bzero (gc, sizeof (XGCValues));
+  memset (gc, 0, sizeof (XGCValues));
 
   XChangeGC (ignore, gc, mask, xgcv);
 
@@ -333,8 +331,8 @@
 }
 
 void
-XGetGCValues (void* ignore, XGCValues *gc,
-                   unsigned long mask, XGCValues *xgcv)
+XGetGCValues (void *ignore, XGCValues *gc,
+	      unsigned long mask, XGCValues *xgcv)
 {
   XChangeGC (ignore, xgcv, mask, gc);
 }
@@ -376,11 +374,7 @@
 
 /* Draw a filled rectangle at the specified position. */
 void
-w32_fill_rect (f, hdc, pix, lprect)
-     FRAME_PTR f;
-     HDC hdc;
-     COLORREF pix;
-     RECT * lprect;
+w32_fill_rect (FRAME_PTR f, HDC hdc, COLORREF pix, RECT *lprect)
 {
   HBRUSH hb;
 
@@ -390,8 +384,7 @@
 }
 
 void
-w32_clear_window (f)
-     FRAME_PTR f;
+w32_clear_window (FRAME_PTR f)
 {
   RECT rect;
   HDC hdc = get_frame_dc (f);
@@ -411,8 +404,7 @@
 #define OPAQUE_FRAME 255
 
 void
-x_set_frame_alpha (f)
-     struct frame *f;
+x_set_frame_alpha (struct frame *f)
 {
   struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
   double alpha = 1.0;
@@ -458,8 +450,7 @@
 }
 
 int
-x_display_pixel_height (dpyinfo)
-     struct w32_display_info *dpyinfo;
+x_display_pixel_height (struct w32_display_info *dpyinfo)
 {
   HDC dc = GetDC (NULL);
   int pixels = GetDeviceCaps (dc, VERTRES);
@@ -468,8 +459,7 @@
 }
 
 int
-x_display_pixel_width (dpyinfo)
-     struct w32_display_info *dpyinfo;
+x_display_pixel_width (struct w32_display_info *dpyinfo)
 {
   HDC dc = GetDC (NULL);
   int pixels = GetDeviceCaps (dc, HORZRES);
@@ -488,8 +478,7 @@
    each window being updated.  */
 
 static void
-x_update_begin (f)
-     struct frame *f;
+x_update_begin (struct frame *f)
 {
   struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f);
 
@@ -511,8 +500,7 @@
    position of W.  */
 
 static void
-x_update_window_begin (w)
-     struct window *w;
+x_update_window_begin (struct window *w)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f);
@@ -571,9 +559,7 @@
 /* Draw a vertical window border from (x,y0) to (x,y1)  */
 
 static void
-w32_draw_vertical_window_border (w, x, y0, y1)
-     struct window *w;
-     int x, y0, y1;
+w32_draw_vertical_window_border (struct window *w, int x, int y0, int y1)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   RECT r;
@@ -610,9 +596,8 @@
    here. */
 
 static void
-x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
-     struct window *w;
-     int cursor_on_p, mouse_face_overwritten_p;
+x_update_window_end (struct window *w, int cursor_on_p,
+		     int mouse_face_overwritten_p)
 {
   struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (XFRAME (w->frame));
 
@@ -656,8 +641,7 @@
    update_end.  */
 
 static void
-x_update_end (f)
-     struct frame *f;
+x_update_end (struct frame *f)
 {
   if (! FRAME_W32_P (f))
     return;
@@ -672,8 +656,7 @@
    updated_window is not available here.  */
 
 static void
-w32_frame_up_to_date (f)
-     struct frame *f;
+w32_frame_up_to_date (struct frame *f)
 {
   if (FRAME_W32_P (f))
     {
@@ -702,8 +685,7 @@
    between bitmaps to be drawn between current row and DESIRED_ROW.  */
 
 static void
-x_after_update_window_line (desired_row)
-     struct glyph_row *desired_row;
+x_after_update_window_line (struct glyph_row *desired_row)
 {
   struct window *w = updated_window;
   struct frame *f;
@@ -749,10 +731,8 @@
    drawn.  */
 
 static void
-w32_draw_fringe_bitmap (w, row, p)
-     struct window *w;
-     struct glyph_row *row;
-     struct draw_fringe_bitmap_params *p;
+w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
+			struct draw_fringe_bitmap_params *p)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   HDC hdc;
@@ -890,10 +870,7 @@
 }
 
 static void
-w32_define_fringe_bitmap (which, bits, h, wd)
-     int which;
-     unsigned short *bits;
-     int h, wd;
+w32_define_fringe_bitmap (int which, unsigned short *bits, int h, int wd)
 {
   if (which >= max_fringe_bmp)
     {
@@ -908,8 +885,7 @@
 }
 
 static void
-w32_destroy_fringe_bitmap (which)
-     int which;
+w32_destroy_fringe_bitmap (int which)
 {
   if (which >= max_fringe_bmp)
     return;
@@ -947,40 +923,39 @@
 
 /* Function prototypes of this page.  */
 
-static void x_set_glyph_string_clipping P_ ((struct glyph_string *));
-static void x_set_glyph_string_gc P_ ((struct glyph_string *));
-static void x_draw_glyph_string_background P_ ((struct glyph_string *,
-						int));
-static void x_draw_glyph_string_foreground P_ ((struct glyph_string *));
-static void x_draw_composite_glyph_string_foreground P_ ((struct glyph_string *));
-static void x_draw_glyph_string_box P_ ((struct glyph_string *));
-static void x_draw_glyph_string  P_ ((struct glyph_string *));
-static void x_set_cursor_gc P_ ((struct glyph_string *));
-static void x_set_mode_line_face_gc P_ ((struct glyph_string *));
-static void x_set_mouse_face_gc P_ ((struct glyph_string *));
+static void x_set_glyph_string_clipping (struct glyph_string *);
+static void x_set_glyph_string_gc (struct glyph_string *);
+static void x_draw_glyph_string_background (struct glyph_string *,
+                                            int);
+static void x_draw_glyph_string_foreground (struct glyph_string *);
+static void x_draw_composite_glyph_string_foreground (struct glyph_string *);
+static void x_draw_glyph_string_box (struct glyph_string *);
+static void x_draw_glyph_string  (struct glyph_string *);
+static void x_set_cursor_gc (struct glyph_string *);
+static void x_set_mode_line_face_gc (struct glyph_string *);
+static void x_set_mouse_face_gc (struct glyph_string *);
 static int w32_alloc_lighter_color (struct frame *, COLORREF *, double, int);
-static void w32_setup_relief_color P_ ((struct frame *, struct relief *,
-                                        double, int, COLORREF));
-static void x_setup_relief_colors P_ ((struct glyph_string *));
-static void x_draw_image_glyph_string P_ ((struct glyph_string *));
-static void x_draw_image_relief P_ ((struct glyph_string *));
-static void x_draw_image_foreground P_ ((struct glyph_string *));
-static void w32_draw_image_foreground_1 P_ ((struct glyph_string *, HBITMAP));
-static void x_clear_glyph_string_rect P_ ((struct glyph_string *, int,
-					   int, int, int));
-static void w32_draw_relief_rect P_ ((struct frame *, int, int, int, int,
-				      int, int, int, int, int, int,
-				      RECT *));
-static void w32_draw_box_rect P_ ((struct glyph_string *, int, int, int, int,
-				 int, int, int, RECT *));
+static void w32_setup_relief_color (struct frame *, struct relief *,
+                                    double, int, COLORREF);
+static void x_setup_relief_colors (struct glyph_string *);
+static void x_draw_image_glyph_string (struct glyph_string *);
+static void x_draw_image_relief (struct glyph_string *);
+static void x_draw_image_foreground (struct glyph_string *);
+static void w32_draw_image_foreground_1 (struct glyph_string *, HBITMAP);
+static void x_clear_glyph_string_rect (struct glyph_string *, int,
+                                       int, int, int);
+static void w32_draw_relief_rect (struct frame *, int, int, int, int,
+                                  int, int, int, int, int, int,
+                                  RECT *);
+static void w32_draw_box_rect (struct glyph_string *, int, int, int, int,
+                               int, int, int, RECT *);
 
 
 /* Set S->gc to a suitable GC for drawing glyph string S in cursor
    face.  */
 
 static void
-x_set_cursor_gc (s)
-     struct glyph_string *s;
+x_set_cursor_gc (struct glyph_string *s)
 {
   if (s->font == FRAME_FONT (s->f)
       && s->face->background == FRAME_BACKGROUND_PIXEL (s->f)
@@ -1031,8 +1006,7 @@
 /* Set up S->gc of glyph string S for drawing text in mouse face.  */
 
 static void
-x_set_mouse_face_gc (s)
-     struct glyph_string *s;
+x_set_mouse_face_gc (struct glyph_string *s)
 {
   int face_id;
   struct face *face;
@@ -1085,8 +1059,7 @@
    matrix was built, so there isn't much to do, here.  */
 
 static INLINE void
-x_set_mode_line_face_gc (s)
-     struct glyph_string *s;
+x_set_mode_line_face_gc (struct glyph_string *s)
 {
   s->gc = s->face->gc;
 }
@@ -1097,8 +1070,7 @@
    pattern.  */
 
 static INLINE void
-x_set_glyph_string_gc (s)
-     struct glyph_string *s;
+x_set_glyph_string_gc (struct glyph_string *s)
 {
   PREPARE_FACE_FOR_DISPLAY (s->f, s->face);
 
@@ -1143,8 +1115,7 @@
    line or menu if we don't have X toolkit support.  */
 
 static INLINE void
-x_set_glyph_string_clipping (s)
-     struct glyph_string *s;
+x_set_glyph_string_clipping (struct glyph_string *s)
 {
   RECT *r = s->clip;
   int n = get_glyph_string_clip_rects (s, r, 2);
@@ -1172,8 +1143,8 @@
    the area of SRC.  */
 
 static void
-x_set_glyph_string_clipping_exactly (src, dst)
-     struct glyph_string *src, *dst;
+x_set_glyph_string_clipping_exactly (struct glyph_string *src,
+				     struct glyph_string *dst)
 {
   RECT r;
 
@@ -1190,8 +1161,7 @@
    Compute left and right overhang of glyph string S.  */
 
 static void
-w32_compute_glyph_string_overhangs (s)
-     struct glyph_string *s;
+w32_compute_glyph_string_overhangs (struct glyph_string *s)
 {
   if (s->cmp == NULL
       && s->first_glyph->type == CHAR_GLYPH
@@ -1219,9 +1189,8 @@
 /* Fill rectangle X, Y, W, H with background color of glyph string S.  */
 
 static INLINE void
-x_clear_glyph_string_rect (s, x, y, w, h)
-     struct glyph_string *s;
-     int x, y, w, h;
+x_clear_glyph_string_rect (struct glyph_string *s,
+			   int x, int y, int w, int h)
 {
   int real_x = x;
   int real_y = y;
@@ -1251,9 +1220,7 @@
    contains the first component of a composition.  */
 
 static void
-x_draw_glyph_string_background (s, force_p)
-     struct glyph_string *s;
-     int force_p;
+x_draw_glyph_string_background (struct glyph_string *s, int force_p)
 {
   /* Nothing to do if background has already been drawn or if it
      shouldn't be drawn in the first place.  */
@@ -1292,8 +1259,7 @@
 /* Draw the foreground of glyph string S.  */
 
 static void
-x_draw_glyph_string_foreground (s)
-     struct glyph_string *s;
+x_draw_glyph_string_foreground (struct glyph_string *s)
 {
   int i, x;
 
@@ -1350,8 +1316,7 @@
 /* Draw the foreground of composite glyph string S.  */
 
 static void
-x_draw_composite_glyph_string_foreground (s)
-     struct glyph_string *s;
+x_draw_composite_glyph_string_foreground (struct glyph_string *s)
 {
   int i, j, x;
   struct font *font = s->font;
@@ -1464,11 +1429,8 @@
    Value is non-zero if successful.  */
 
 static int
-w32_alloc_lighter_color (f, color, factor, delta)
-     struct frame *f;
-     COLORREF *color;
-     double factor;
-     int delta;
+w32_alloc_lighter_color (struct frame *f, COLORREF *color,
+			 double factor, int delta)
 {
   COLORREF new;
   long bright;
@@ -1527,10 +1489,7 @@
    colors in COLORS.  On W32, we no longer try to map colors to
    a palette.  */
 void
-x_query_colors (f, colors, ncolors)
-     struct frame *f;
-     XColor *colors;
-     int ncolors;
+x_query_colors (struct frame *f, XColor *colors, int ncolors)
 {
   int i;
 
@@ -1545,9 +1504,7 @@
 }
 
 void
-x_query_color (f, color)
-     struct frame *f;
-     XColor *color;
+x_query_color (struct frame *f, XColor *color)
 {
   x_query_colors (f, color, 1);
 }
@@ -1561,12 +1518,8 @@
    be allocated, use DEFAULT_PIXEL, instead.  */
 
 static void
-w32_setup_relief_color (f, relief, factor, delta, default_pixel)
-     struct frame *f;
-     struct relief *relief;
-     double factor;
-     int delta;
-     COLORREF default_pixel;
+w32_setup_relief_color (struct frame *f, struct relief *relief, double factor,
+			int delta, COLORREF default_pixel)
 {
   XGCValues xgcv;
   struct w32_output *di = f->output_data.w32;
@@ -1602,8 +1555,7 @@
 /* Set up colors for the relief lines around glyph string S.  */
 
 static void
-x_setup_relief_colors (s)
-     struct glyph_string *s;
+x_setup_relief_colors (struct glyph_string *s)
 {
   struct w32_output *di = s->f->output_data.w32;
   COLORREF color;
@@ -1638,12 +1590,10 @@
    when drawing.  */
 
 static void
-w32_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width,
-                      raised_p, top_p, bot_p, left_p, right_p, clip_rect)
-     struct frame *f;
-     int left_x, top_y, right_x, bottom_y, width;
-     int top_p, bot_p, left_p, right_p, raised_p;
-     RECT *clip_rect;
+w32_draw_relief_rect (struct frame *f,
+		      int left_x, int top_y, int right_x, int bottom_y, int width,
+		      int raised_p, int top_p, int bot_p, int left_p, int right_p,
+		      RECT *clip_rect)
 {
   int i;
   XGCValues gc;
@@ -1703,11 +1653,9 @@
    rectangle to use when drawing.  */
 
 static void
-w32_draw_box_rect (s, left_x, top_y, right_x, bottom_y, width,
-                   left_p, right_p, clip_rect)
-     struct glyph_string *s;
-     int left_x, top_y, right_x, bottom_y, width, left_p, right_p;
-     RECT *clip_rect;
+w32_draw_box_rect (struct glyph_string *s,
+		   int left_x, int top_y, int right_x, int bottom_y, int width,
+                   int left_p, int right_p, RECT *clip_rect)
 {
   w32_set_clip_rectangle (s->hdc, clip_rect);
 
@@ -1740,8 +1688,7 @@
 /* Draw a box around glyph string S.  */
 
 static void
-x_draw_glyph_string_box (s)
-     struct glyph_string *s;
+x_draw_glyph_string_box (struct glyph_string *s)
 {
   int width, left_x, right_x, top_y, bottom_y, last_x, raised_p;
   int left_p, right_p;
@@ -1792,8 +1739,7 @@
 /* Draw foreground of image glyph string S.  */
 
 static void
-x_draw_image_foreground (s)
-     struct glyph_string *s;
+x_draw_image_foreground (struct glyph_string *s)
 {
   int x = s->x;
   int y = s->ybase - image_ascent (s->img, s->face, &s->slice);
@@ -1883,8 +1829,7 @@
 /* Draw a relief around the image glyph string S.  */
 
 static void
-x_draw_image_relief (s)
-     struct glyph_string *s;
+x_draw_image_relief (struct glyph_string *s)
 {
   int x0, y0, x1, y1, thick, raised_p;
   RECT r;
@@ -1936,9 +1881,7 @@
 /* Draw the foreground of image glyph string S to PIXMAP.  */
 
 static void
-w32_draw_image_foreground_1 (s, pixmap)
-     struct glyph_string *s;
-     HBITMAP pixmap;
+w32_draw_image_foreground_1 (struct glyph_string *s, HBITMAP pixmap)
 {
   HDC hdc = CreateCompatibleDC (s->hdc);
   HGDIOBJ orig_hdc_obj = SelectObject (hdc, pixmap);
@@ -2025,9 +1968,7 @@
    give the rectangle to draw.  */
 
 static void
-x_draw_glyph_string_bg_rect (s, x, y, w, h)
-     struct glyph_string *s;
-     int x, y, w, h;
+x_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h)
 {
 #if 0 /* TODO: stipple */
   if (s->stippled_p)
@@ -2058,8 +1999,7 @@
  */
 
 static void
-x_draw_image_glyph_string (s)
-     struct glyph_string *s;
+x_draw_image_glyph_string (struct glyph_string *s)
 {
   int x, y;
   int box_line_hwidth = eabs (s->face->box_line_width);
@@ -2172,8 +2112,7 @@
 /* Draw stretch glyph string S.  */
 
 static void
-x_draw_stretch_glyph_string (s)
-     struct glyph_string *s;
+x_draw_stretch_glyph_string (struct glyph_string *s)
 {
   xassert (s->first_glyph->type == STRETCH_GLYPH);
 
@@ -2255,8 +2194,7 @@
 /* Draw glyph string S.  */
 
 static void
-x_draw_glyph_string (s)
-     struct glyph_string *s;
+x_draw_glyph_string (struct glyph_string *s)
 {
   int relief_drawn_p = 0;
 
@@ -2421,7 +2359,7 @@
 
       /* Draw strike-through.  */
       if (s->face->strike_through_p
-          && !FONT_TEXTMETRIC(s->font).tmStruckOut)
+          && !FONT_TEXTMETRIC (s->font).tmStruckOut)
         {
           unsigned long h = 1;
           unsigned long dy = (s->height - h) / 2;
@@ -2502,9 +2440,8 @@
 /* Shift display to make room for inserted glyphs.   */
 
 void
-w32_shift_glyphs_for_insert (f, x, y, width, height, shift_by)
-     struct frame *f;
-     int x, y, width, height, shift_by;
+w32_shift_glyphs_for_insert (struct frame *f, int x, int y,
+			     int width, int height, int shift_by)
 {
   HDC hdc;
 
@@ -2520,9 +2457,7 @@
    for X frames.  */
 
 static void
-x_delete_glyphs (f, n)
-     struct frame *f;
-     register int n;
+x_delete_glyphs (struct frame *f, register int n)
 {
   if (! FRAME_W32_P (f))
     return;
@@ -2592,8 +2527,7 @@
    that is bounded by calls to x_update_begin and x_update_end.  */
 
 static void
-w32_set_terminal_window (n)
-     register int n;
+w32_set_terminal_window (struct frame *f, int n)
 {
   /* This function intentionally left blank.  */
 }
@@ -2607,9 +2541,7 @@
    lines or deleting -N lines at vertical position VPOS.  */
 
 static void
-x_ins_del_lines (f, vpos, n)
-     struct frame *f;
-     int vpos, n;
+x_ins_del_lines (struct frame *f, int vpos, int n)
 {
   if (! FRAME_W32_P (f))
     return;
@@ -2621,9 +2553,7 @@
 /* Scroll part of the display as described by RUN.  */
 
 static void
-x_scroll_run (w, run)
-     struct window *w;
-     struct run *run;
+x_scroll_run (struct window *w, struct run *run)
 {
   struct frame *f = XFRAME (w->frame);
   int x, y, width, height, from_y, to_y, bottom_y;
@@ -2705,16 +2635,14 @@
  ***********************************************************************/
 
 static void
-frame_highlight (f)
-     struct frame *f;
+frame_highlight (struct frame *f)
 {
   x_update_cursor (f, 1);
   x_set_frame_alpha (f);
 }
 
 static void
-frame_unhighlight (f)
-     struct frame *f;
+frame_unhighlight (struct frame *f)
 {
   x_update_cursor (f, 1);
   x_set_frame_alpha (f);
@@ -2727,9 +2655,7 @@
    Lisp code can tell when the switch took place by examining the events.  */
 
 static void
-x_new_focus_frame (dpyinfo, frame)
-     struct w32_display_info *dpyinfo;
-     struct frame *frame;
+x_new_focus_frame (struct w32_display_info *dpyinfo, struct frame *frame)
 {
   struct frame *old_focus = dpyinfo->w32_focus_frame;
 
@@ -2757,12 +2683,8 @@
    a FOCUS_IN_EVENT into *BUFP.  */
 
 static void
-x_focus_changed (type, state, dpyinfo, frame, bufp)
-     int type;
-     int state;
-     struct w32_display_info *dpyinfo;
-     struct frame *frame;
-     struct input_event *bufp;
+x_focus_changed (int type, int state, struct w32_display_info *dpyinfo,
+		 struct frame *frame, struct input_event *bufp)
 {
   if (type == WM_SETFOCUS)
     {
@@ -2807,10 +2729,8 @@
    Returns FOCUS_IN_EVENT event in *BUFP. */
 
 static void
-w32_detect_focus_change (dpyinfo, event, bufp)
-     struct w32_display_info *dpyinfo;
-     W32Msg *event;
-     struct input_event *bufp;
+w32_detect_focus_change (struct w32_display_info *dpyinfo, W32Msg *event,
+			 struct input_event *bufp)
 {
   struct frame *frame;
 
@@ -2829,8 +2749,7 @@
 /* Handle an event saying the mouse has moved out of an Emacs frame.  */
 
 void
-x_mouse_leave (dpyinfo)
-     struct w32_display_info *dpyinfo;
+x_mouse_leave (struct w32_display_info *dpyinfo)
 {
   x_new_focus_frame (dpyinfo, dpyinfo->w32_focus_event_frame);
 }
@@ -2844,8 +2763,7 @@
    the appropriate X display info.  */
 
 static void
-w32_frame_rehighlight (frame)
-     struct frame *frame;
+w32_frame_rehighlight (struct frame *frame)
 {
   if (! FRAME_W32_P (frame))
     return;
@@ -2853,8 +2771,7 @@
 }
 
 static void
-x_frame_rehighlight (dpyinfo)
-     struct w32_display_info *dpyinfo;
+x_frame_rehighlight (struct w32_display_info *dpyinfo)
 {
   struct frame *old_highlight = dpyinfo->x_highlight_frame;
 
@@ -2887,8 +2804,7 @@
 /* Convert a keysym to its name.  */
 
 char *
-x_get_keysym_name (keysym)
-    int keysym;
+x_get_keysym_name (int keysym)
 {
   /* Make static so we can always return it */
   static char value[100];
@@ -2900,7 +2816,8 @@
   return value;
 }
 
-static int codepage_for_locale(LCID locale)
+static int
+codepage_for_locale (LCID locale)
 {
   char cp[20];
 
@@ -2917,11 +2834,7 @@
    the state in PUP. XBUTTON provides extra information for extended mouse
    button messages. Returns FALSE if unable to parse the message.  */
 BOOL
-parse_button (message, xbutton, pbutton, pup)
-     int message;
-     int xbutton;
-     int * pbutton;
-     int * pup;
+parse_button (int message, int xbutton, int * pbutton, int * pup)
 {
   int button = 0;
   int up = 0;
@@ -2989,10 +2902,7 @@
    the mouse.  */
 
 static Lisp_Object
-construct_mouse_click (result, msg, f)
-     struct input_event *result;
-     W32Msg *msg;
-     struct frame *f;
+construct_mouse_click (struct input_event *result, W32Msg *msg, struct frame *f)
 {
   int button;
   int up;
@@ -3018,10 +2928,7 @@
 }
 
 static Lisp_Object
-construct_mouse_wheel (result, msg, f)
-     struct input_event *result;
-     W32Msg *msg;
-     struct frame *f;
+construct_mouse_wheel (struct input_event *result, W32Msg *msg, struct frame *f)
 {
   POINT p;
   int delta;
@@ -3054,10 +2961,7 @@
 }
 
 static Lisp_Object
-construct_drag_n_drop (result, msg, f)
-     struct input_event *result;
-     W32Msg *msg;
-     struct frame *f;
+construct_drag_n_drop (struct input_event *result, W32Msg *msg, struct frame *f)
 {
   Lisp_Object files;
   Lisp_Object frame;
@@ -3118,9 +3022,7 @@
 static Lisp_Object last_mouse_motion_frame;
 
 static int
-note_mouse_movement (frame, msg)
-     FRAME_PTR frame;
-     MSG *msg;
+note_mouse_movement (FRAME_PTR frame, MSG *msg)
 {
   int mouse_x = LOWORD (msg->lParam);
   int mouse_y = HIWORD (msg->lParam);
@@ -3168,12 +3070,15 @@
 			      Mouse Face
  ************************************************************************/
 
-static struct scroll_bar *x_window_to_scroll_bar ();
-static void x_scroll_bar_report_motion ();
-static void x_check_fullscreen P_ ((struct frame *));
+static struct scroll_bar *x_window_to_scroll_bar (Window);
+static void x_scroll_bar_report_motion (FRAME_PTR *, Lisp_Object *,
+					enum scroll_bar_part *,
+					Lisp_Object *, Lisp_Object *,
+					unsigned long *);
+static void x_check_fullscreen (struct frame *);
 
 static void
-redo_mouse_highlight ()
+redo_mouse_highlight (void)
 {
   if (!NILP (last_mouse_motion_frame)
       && FRAME_LIVE_P (XFRAME (last_mouse_motion_frame)))
@@ -3183,9 +3088,7 @@
 }
 
 static void
-w32_define_cursor (window, cursor)
-     Window window;
-     Cursor cursor;
+w32_define_cursor (Window window, Cursor cursor)
 {
   PostMessage (window, WM_EMACS_SETCURSOR, (WPARAM) cursor, 0);
 }
@@ -3210,13 +3113,9 @@
    movement.  */
 
 static void
-w32_mouse_position (fp, insist, bar_window, part, x, y, time)
-     FRAME_PTR *fp;
-     int insist;
-     Lisp_Object *bar_window;
-     enum scroll_bar_part *part;
-     Lisp_Object *x, *y;
-     unsigned long *time;
+w32_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window,
+		    enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y,
+		    unsigned long *time)
 {
   FRAME_PTR f1;
 
@@ -3307,9 +3206,7 @@
    or ButtonRelase.  */
 
 static void
-w32_handle_tool_bar_click (f, button_event)
-     struct frame *f;
-     struct input_event *button_event;
+w32_handle_tool_bar_click (struct frame *f, struct input_event *button_event)
 {
   int x = XFASTINT (button_event->x);
   int y = XFASTINT (button_event->y);
@@ -3334,8 +3231,7 @@
    bits.  */
 
 static struct scroll_bar *
-x_window_to_scroll_bar (window_id)
-     Window window_id;
+x_window_to_scroll_bar (Window window_id)
 {
   Lisp_Object tail;
 
@@ -3371,9 +3267,8 @@
    displaying PORTION out of a whole WHOLE, and our position POSITION.  */
 
 static void
-w32_set_scroll_bar_thumb (bar, portion, position, whole)
-     struct scroll_bar *bar;
-     int portion, position, whole;
+w32_set_scroll_bar_thumb (struct scroll_bar *bar,
+			  int portion, int position, int whole)
 {
   Window w = SCROLL_BAR_W32_WINDOW (bar);
   /* We use the whole scroll-bar height in the calculations below, to
@@ -3399,7 +3294,7 @@
       BLOCK_INPUT;
       si.cbSize = sizeof (si);
       si.fMask = SIF_POS | SIF_PAGE;
-      GetScrollInfo(w, SB_CTL, &si);
+      GetScrollInfo (w, SB_CTL, &si);
       near_bottom_p = si.nPos + si.nPage >= range;
       UNBLOCK_INPUT;
       if (!near_bottom_p)
@@ -3448,9 +3343,7 @@
  ************************************************************************/
 
 static HWND
-my_create_scrollbar (f, bar)
-     struct frame * f;
-     struct scroll_bar * bar;
+my_create_scrollbar (struct frame * f, struct scroll_bar * bar)
 {
   return (HWND) SendMessage (FRAME_W32_WINDOW (f),
 			     WM_EMACS_CREATESCROLLBAR, (WPARAM) f,
@@ -3489,26 +3382,21 @@
 }
 
 static void
-my_set_focus (f, hwnd)
-     struct frame * f;
-     HWND hwnd;
+my_set_focus (struct frame * f, HWND hwnd)
 {
   SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SETFOCUS,
 	       (WPARAM) hwnd, 0);
 }
 
 static void
-my_set_foreground_window (hwnd)
-     HWND hwnd;
+my_set_foreground_window (HWND hwnd)
 {
   SendMessage (hwnd, WM_EMACS_SETFOREGROUND, (WPARAM) hwnd, 0);
 }
 
 
 static void
-my_destroy_window (f, hwnd)
-     struct frame * f;
-     HWND hwnd;
+my_destroy_window (struct frame * f, HWND hwnd)
 {
   SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_DESTROYWINDOW,
 	       (WPARAM) hwnd, 0);
@@ -3520,9 +3408,7 @@
    scroll bar. */
 
 static struct scroll_bar *
-x_scroll_bar_create (w, top, left, width, height)
-     struct window *w;
-     int top, left, width, height;
+x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   HWND hwnd;
@@ -3575,8 +3461,7 @@
    nil. */
 
 static void
-x_scroll_bar_remove (bar)
-     struct scroll_bar *bar;
+x_scroll_bar_remove (struct scroll_bar *bar)
 {
   FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
 
@@ -3596,9 +3481,8 @@
    characters, starting at POSITION.  If WINDOW has no scroll bar,
    create one.  */
 static void
-w32_set_vertical_scroll_bar (w, portion, whole, position)
-     struct window *w;
-     int portion, whole, position;
+w32_set_vertical_scroll_bar (struct window *w,
+			     int portion, int whole, int position)
 {
   struct frame *f = XFRAME (w->frame);
   struct scroll_bar *bar;
@@ -3741,8 +3625,7 @@
    `*redeem_scroll_bar_hook' is applied to its window before the judgment.  */
 
 static void
-w32_condemn_scroll_bars (frame)
-     FRAME_PTR frame;
+w32_condemn_scroll_bars (FRAME_PTR frame)
 {
   /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS.  */
   while (! NILP (FRAME_SCROLL_BARS (frame)))
@@ -3763,8 +3646,7 @@
    Note that WINDOW isn't necessarily condemned at all.  */
 
 static void
-w32_redeem_scroll_bar (window)
-     struct window *window;
+w32_redeem_scroll_bar (struct window *window)
 {
   struct scroll_bar *bar;
   struct frame *f;
@@ -3809,8 +3691,7 @@
    last call to `*condemn_scroll_bars_hook'.  */
 
 static void
-w32_judge_scroll_bars (f)
-     FRAME_PTR f;
+w32_judge_scroll_bars (FRAME_PTR f)
 {
   Lisp_Object bar, next;
 
@@ -3841,10 +3722,8 @@
    mark bits.  */
 
 static int
-w32_scroll_bar_handle_click (bar, msg, emacs_event)
-     struct scroll_bar *bar;
-     W32Msg *msg;
-     struct input_event *emacs_event;
+w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg,
+			     struct input_event *emacs_event)
 {
   if (! WINDOWP (bar->window))
     abort ();
@@ -3950,12 +3829,10 @@
    on the scroll bar.  */
 
 static void
-x_scroll_bar_report_motion (fp, bar_window, part, x, y, time)
-     FRAME_PTR *fp;
-     Lisp_Object *bar_window;
-     enum scroll_bar_part *part;
-     Lisp_Object *x, *y;
-     unsigned long *time;
+x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window,
+			    enum scroll_bar_part *part,
+			    Lisp_Object *x, Lisp_Object *y,
+			    unsigned long *time)
 {
   struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar);
   Window w = SCROLL_BAR_W32_WINDOW (bar);
@@ -4011,8 +3888,7 @@
    redraw them.  */
 
 void
-x_scroll_bar_clear (f)
-     FRAME_PTR f;
+x_scroll_bar_clear (FRAME_PTR f)
 {
   Lisp_Object bar;
 
@@ -4071,10 +3947,8 @@
 */
 
 int
-w32_read_socket (sd, expected, hold_quit)
-     register int sd;
-     int expected;
-     struct input_event *hold_quit;
+w32_read_socket (struct terminal *terminal, int expected,
+		 struct input_event *hold_quit)
 {
   int count = 0;
   int check_visibility = 0;
@@ -4295,7 +4169,7 @@
 		temp_index = 0;
 	      temp_buffer[temp_index++] = msg.msg.wParam;
 	      inev.kind = MULTIMEDIA_KEY_EVENT;
-	      inev.code = GET_APPCOMMAND_LPARAM(msg.msg.lParam);
+	      inev.code = GET_APPCOMMAND_LPARAM (msg.msg.lParam);
 	      inev.modifiers = msg.dwModifiers;
 	      XSETFRAME (inev.frame_or_window, f);
 	      inev.timestamp = msg.msg.time;
@@ -4343,7 +4217,7 @@
 		     selected now and last mouse movement event was
 		     not in it.  Minibuffer window will be selected
 		     only when it is active.  */
-		  if (WINDOWP(window)
+		  if (WINDOWP (window)
 		      && !EQ (window, last_window)
 		      && !EQ (window, selected_window)
 		      /* For click-to-focus window managers
@@ -4903,11 +4777,7 @@
    mode lines must be clipped to the whole window.  */
 
 static void
-w32_clip_to_row (w, row, area, hdc)
-     struct window *w;
-     struct glyph_row *row;
-     int area;
-     HDC hdc;
+w32_clip_to_row (struct window *w, struct glyph_row *row, int area, HDC hdc)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   RECT clip_rect;
@@ -4928,9 +4798,7 @@
 /* Draw a hollow box cursor on window W in glyph row ROW.  */
 
 static void
-x_draw_hollow_cursor (w, row)
-     struct window *w;
-     struct glyph_row *row;
+x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   HDC hdc;
@@ -4970,11 +4838,8 @@
    --gerd.  */
 
 static void
-x_draw_bar_cursor (w, row, width, kind)
-     struct window *w;
-     struct glyph_row *row;
-     int width;
-     enum text_cursor_kinds kind;
+x_draw_bar_cursor (struct window *w, struct glyph_row *row,
+		   int width, enum text_cursor_kinds kind)
 {
   struct frame *f = XFRAME (w->frame);
   struct glyph *cursor_glyph;
@@ -5053,9 +4918,7 @@
 /* RIF: Define cursor CURSOR on frame F.  */
 
 static void
-w32_define_frame_cursor (f, cursor)
-     struct frame *f;
-     Cursor cursor;
+w32_define_frame_cursor (struct frame *f, Cursor cursor)
 {
   w32_define_cursor (FRAME_W32_WINDOW (f), cursor);
 }
@@ -5064,9 +4927,7 @@
 /* RIF: Clear area on frame F.  */
 
 static void
-w32_clear_frame_area (f, x, y, width, height)
-     struct frame *f;
-     int x, y, width, height;
+w32_clear_frame_area (struct frame *f, int x, int y, int width, int height)
 {
   HDC hdc;
 
@@ -5078,12 +4939,9 @@
 /* RIF: Draw or clear cursor on window W.  */
 
 static void
-w32_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, active_p)
-     struct window *w;
-     struct glyph_row *glyph_row;
-     int x, y;
-     int cursor_type, cursor_width;
-     int on_p, active_p;
+w32_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
+			int x, int y, int cursor_type, int cursor_width,
+			int on_p, int active_p)
 {
   if (on_p)
     {
@@ -5178,9 +5036,7 @@
 /* Icons.  */
 
 int
-x_bitmap_icon (f, icon)
-     struct frame *f;
-     Lisp_Object icon;
+x_bitmap_icon (struct frame *f, Lisp_Object icon)
 {
   HANDLE main_icon;
   HANDLE small_icon = NULL;
@@ -5269,10 +5125,7 @@
 /* Changing the font of the frame.  */
 
 Lisp_Object
-x_new_font (f, font_object, fontset)
-     struct frame *f;
-     Lisp_Object font_object;
-     int fontset;
+x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
 {
   struct font *font = XFONT_OBJECT (font_object);
 
@@ -5340,8 +5193,7 @@
    from its current recorded position values and gravity.  */
 
 void
-x_calc_absolute_position (f)
-     struct frame *f;
+x_calc_absolute_position (struct frame *f)
 {
   int flags = f->size_hint_flags;
 
@@ -5401,10 +5253,8 @@
    which means, do adjust for borders but don't change the gravity.  */
 
 void
-x_set_offset (f, xoff, yoff, change_gravity)
-     struct frame *f;
-     register int xoff, yoff;
-     int change_gravity;
+x_set_offset (struct frame *f, register int xoff, register int yoff,
+	      int change_gravity)
 {
   int modified_top, modified_left;
 
@@ -5439,8 +5289,7 @@
 /* Check if we need to resize the frame due to a fullscreen request.
    If so needed, resize the frame. */
 static void
-x_check_fullscreen (f)
-     struct frame *f;
+x_check_fullscreen (struct frame *f)
 {
   if (f->want_fullscreen & FULLSCREEN_BOTH)
     {
@@ -5470,10 +5319,7 @@
    Otherwise we leave the window gravity unchanged.  */
 
 void
-x_set_window_size (f, change_gravity, cols, rows)
-     struct frame *f;
-     int change_gravity;
-     int cols, rows;
+x_set_window_size (struct frame *f, int change_gravity, int cols, int rows)
 {
   int pixelwidth, pixelheight;
 
@@ -5498,8 +5344,8 @@
     rect.right = pixelwidth;
     rect.bottom = pixelheight;
 
-    AdjustWindowRect(&rect, f->output_data.w32->dwStyle,
-		     FRAME_EXTERNAL_MENU_BAR (f));
+    AdjustWindowRect (&rect, f->output_data.w32->dwStyle,
+		      FRAME_EXTERNAL_MENU_BAR (f));
 
     my_set_window_pos (FRAME_W32_WINDOW (f),
 		       NULL,
@@ -5565,9 +5411,7 @@
 void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
 
 void
-x_set_mouse_position (f, x, y)
-     struct frame *f;
-     int x, y;
+x_set_mouse_position (struct frame *f, int x, int y)
 {
   int pix_x, pix_y;
 
@@ -5584,9 +5428,7 @@
 }
 
 void
-x_set_mouse_pixel_position (f, pix_x, pix_y)
-     struct frame *f;
-     int pix_x, pix_y;
+x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
 {
   RECT rect;
   POINT pt;
@@ -5607,8 +5449,7 @@
 /* focus shifting, raising and lowering.  */
 
 void
-x_focus_on_frame (f)
-     struct frame *f;
+x_focus_on_frame (struct frame *f)
 {
   struct w32_display_info *dpyinfo = &one_w32_display_info;
 
@@ -5625,15 +5466,13 @@
 }
 
 void
-x_unfocus_frame (f)
-     struct frame *f;
+x_unfocus_frame (struct frame *f)
 {
 }
 
 /* Raise frame F.  */
 void
-x_raise_frame (f)
-     struct frame *f;
+x_raise_frame (struct frame *f)
 {
   BLOCK_INPUT;
 
@@ -5692,8 +5531,7 @@
 
 /* Lower frame F.  */
 void
-x_lower_frame (f)
-     struct frame *f;
+x_lower_frame (struct frame *f)
 {
   BLOCK_INPUT;
   my_set_window_pos (FRAME_W32_WINDOW (f),
@@ -5704,9 +5542,7 @@
 }
 
 static void
-w32_frame_raise_lower (f, raise_flag)
-     FRAME_PTR f;
-     int raise_flag;
+w32_frame_raise_lower (FRAME_PTR f, int raise_flag)
 {
   if (! FRAME_W32_P (f))
     return;
@@ -5727,8 +5563,7 @@
    finishes with it.  */
 
 void
-x_make_frame_visible (f)
-     struct frame *f;
+x_make_frame_visible (struct frame *f)
 {
   Lisp_Object type;
 
@@ -5752,8 +5587,8 @@
 
 	  /* Adjust vertical window position in order to avoid being
 	     covered by a task bar placed at the bottom of the desktop. */
-	  SystemParametersInfo(SPI_GETWORKAREA, 0, &workarea_rect, 0);
-	  GetWindowRect(FRAME_W32_WINDOW(f), &window_rect);
+	  SystemParametersInfo (SPI_GETWORKAREA, 0, &workarea_rect, 0);
+	  GetWindowRect (FRAME_W32_WINDOW(f), &window_rect);
 	  if (window_rect.bottom > workarea_rect.bottom
 	      && window_rect.top > workarea_rect.top)
 	    f->top_pos = max (window_rect.top
@@ -5820,8 +5655,8 @@
 
 /* Make the frame visible (mapped and not iconified).  */
 
-x_make_frame_invisible (f)
-     struct frame *f;
+void
+x_make_frame_invisible (struct frame *f)
 {
   /* Don't keep the highlight on an invisible frame.  */
   if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f)
@@ -5847,8 +5682,7 @@
 /* Change window state from mapped to iconified. */
 
 void
-x_iconify_frame (f)
-     struct frame *f;
+x_iconify_frame (struct frame *f)
 {
   Lisp_Object type;
 
@@ -5934,8 +5768,7 @@
 
 /* Destroy the window of frame F.  */
 void
-x_destroy_window (f)
-     struct frame *f;
+x_destroy_window (struct frame *f)
 {
   struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
 
@@ -5952,10 +5785,7 @@
    If USER_POSITION is nonzero, we set the USPosition
    flag (this is useful when FLAGS is 0).  */
 void
-x_wm_set_size_hint (f, flags, user_position)
-     struct frame *f;
-     long flags;
-     int user_position;
+x_wm_set_size_hint (struct frame *f, long flags, int user_position)
 {
   Window window = FRAME_W32_WINDOW (f);
 
@@ -5971,9 +5801,7 @@
 
 /* Window manager things */
 void
-x_wm_set_icon_position (f, icon_x, icon_y)
-     struct frame *f;
-     int icon_x, icon_y;
+x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
 {
 #if 0
   Window window = FRAME_W32_WINDOW (f);
@@ -5994,12 +5822,11 @@
 static int w32_initialized = 0;
 
 void
-w32_initialize_display_info (display_name)
-     Lisp_Object display_name;
+w32_initialize_display_info (Lisp_Object display_name)
 {
   struct w32_display_info *dpyinfo = &one_w32_display_info;
 
-  bzero (dpyinfo, sizeof (*dpyinfo));
+  memset (dpyinfo, 0, sizeof (*dpyinfo));
 
   /* Put it on w32_display_name_list.  */
   w32_display_name_list = Fcons (Fcons (display_name, Qnil),
@@ -6048,8 +5875,7 @@
    but any whitespace following value is not removed.  */
 
 static char *
-w32_make_rdb (xrm_option)
-     char *xrm_option;
+w32_make_rdb (char *xrm_option)
 {
   char *buffer = xmalloc (strlen (xrm_option) + 2);
   char *current = buffer;
@@ -6208,10 +6034,7 @@
 }
 
 struct w32_display_info *
-w32_term_init (display_name, xrm_option, resource_name)
-     Lisp_Object display_name;
-     char *xrm_option;
-     char *resource_name;
+w32_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 {
   struct w32_display_info *dpyinfo;
   struct terminal *terminal;
@@ -6286,8 +6109,7 @@
 
 /* Get rid of display DPYINFO, assuming all frames are already gone.  */
 void
-x_delete_display (dpyinfo)
-     struct w32_display_info *dpyinfo;
+x_delete_display (struct w32_display_info *dpyinfo)
 {
   /* Discard this display from w32_display_name_list and w32_display_list.
      We can't use Fdelq because that can quit.  */
@@ -6323,7 +6145,7 @@
     }
     dpyinfo->color_list = NULL;
     if (dpyinfo->palette)
-      DeleteObject(dpyinfo->palette);
+      DeleteObject (dpyinfo->palette);
   }
   xfree (dpyinfo->w32_id_name);
 
@@ -6335,7 +6157,7 @@
 DWORD WINAPI w32_msg_worker (void * arg);
 
 static void
-w32_initialize ()
+w32_initialize (void)
 {
   HANDLE shell;
   HRESULT (WINAPI * set_user_model) (wchar_t * id);
@@ -6438,7 +6260,7 @@
 }
 
 void
-syms_of_w32term ()
+syms_of_w32term (void)
 {
   staticpro (&w32_display_name_list);
   w32_display_name_list = Qnil;
--- a/src/w32term.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32term.h	Thu Jul 08 17:09:35 2010 +0900
@@ -228,14 +228,14 @@
 
 struct w32_display_info *x_display_info_for_name ();
 
-Lisp_Object display_x_get_resource P_ ((struct w32_display_info *,
-					Lisp_Object, Lisp_Object,
-					Lisp_Object, Lisp_Object));
+Lisp_Object display_x_get_resource (struct w32_display_info *,
+                                    Lisp_Object, Lisp_Object,
+                                    Lisp_Object, Lisp_Object);
 
 extern struct w32_display_info *w32_term_init ();
 
-extern int x_display_pixel_height P_ ((struct w32_display_info *));
-extern int x_display_pixel_width P_ ((struct w32_display_info *));
+extern int x_display_pixel_height (struct w32_display_info *);
+extern int x_display_pixel_width (struct w32_display_info *);
 
 
 #define PIX_TYPE COLORREF
--- a/src/w32uniscribe.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32uniscribe.c	Thu Jul 08 17:09:35 2010 +0900
@@ -57,15 +57,14 @@
 extern struct font_driver uniscribe_font_driver;
 
 /* EnumFontFamiliesEx callback.  */
-static int CALLBACK add_opentype_font_name_to_list P_ ((ENUMLOGFONTEX *,
-                                                        NEWTEXTMETRICEX *,
-                                                        DWORD, LPARAM));
+static int CALLBACK add_opentype_font_name_to_list (ENUMLOGFONTEX *,
+                                                    NEWTEXTMETRICEX *,
+                                                    DWORD, LPARAM);
 /* Used by uniscribe_otf_capability.  */
 static Lisp_Object otf_features (HDC context, char *table);
 
 static int
-memq_no_quit (elt, list)
-     Lisp_Object elt, list;
+memq_no_quit (Lisp_Object elt, Lisp_Object list)
 {
   while (CONSP (list) && ! EQ (XCAR (list), elt))
     list = XCDR (list);
@@ -75,8 +74,7 @@
 
 /* Font backend interface implementation.  */
 static Lisp_Object
-uniscribe_list (frame, font_spec)
-     Lisp_Object frame, font_spec;
+uniscribe_list (Lisp_Object frame, Lisp_Object font_spec)
 {
   Lisp_Object fonts = w32font_list_internal (frame, font_spec, 1);
   FONT_ADD_LOG ("uniscribe-list", font_spec, fonts);
@@ -84,8 +82,7 @@
 }
 
 static Lisp_Object
-uniscribe_match (frame, font_spec)
-     Lisp_Object frame, font_spec;
+uniscribe_match (Lisp_Object frame, Lisp_Object font_spec)
 {
   Lisp_Object entity = w32font_match_internal (frame, font_spec, 1);
   FONT_ADD_LOG ("uniscribe-match", font_spec, entity);
@@ -93,15 +90,14 @@
 }
 
 static Lisp_Object
-uniscribe_list_family (frame)
-     Lisp_Object frame;
+uniscribe_list_family (Lisp_Object frame)
 {
   Lisp_Object list = Qnil;
   LOGFONT font_match_pattern;
   HDC dc;
   FRAME_PTR f = XFRAME (frame);
 
-  bzero (&font_match_pattern, sizeof (font_match_pattern));
+  memset (&font_match_pattern, 0, sizeof (font_match_pattern));
   /* Limit enumerated fonts to outline fonts to save time.  */
   font_match_pattern.lfOutPrecision = OUT_OUTLINE_PRECIS;
 
@@ -116,10 +112,7 @@
 }
 
 static Lisp_Object
-uniscribe_open (f, font_entity, pixel_size)
-     FRAME_PTR f;
-     Lisp_Object font_entity;
-     int pixel_size;
+uniscribe_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size)
 {
   Lisp_Object font_object
     = font_make_object (VECSIZE (struct uniscribe_font_info),
@@ -148,9 +141,7 @@
 }
 
 static void
-uniscribe_close (f, font)
-     FRAME_PTR f;
-     struct font *font;
+uniscribe_close (FRAME_PTR f, struct font *font)
 {
   struct uniscribe_font_info *uniscribe_font
     = (struct uniscribe_font_info *) font;
@@ -164,8 +155,7 @@
 /* Return a list describing which scripts/languages FONT supports by
    which GSUB/GPOS features of OpenType tables.  */
 static Lisp_Object
-uniscribe_otf_capability (font)
-     struct font *font;
+uniscribe_otf_capability (struct font *font)
 {
   HDC context;
   HFONT old_font;
@@ -175,7 +165,7 @@
 
   f = XFRAME (selected_frame);
   context = get_frame_dc (f);
-  old_font = SelectObject (context, FONT_HANDLE(font));
+  old_font = SelectObject (context, FONT_HANDLE (font));
 
   features = otf_features (context, "GSUB");
   XSETCAR (capability, features);
@@ -202,8 +192,7 @@
    than the length of LGSTRING, nil should be return.  In that case,
    this function is called again with the larger LGSTRING.  */
 static Lisp_Object
-uniscribe_shape (lgstring)
-     Lisp_Object lgstring;
+uniscribe_shape (Lisp_Object lgstring)
 {
   struct font * font;
   struct uniscribe_font_info * uniscribe_font;
@@ -287,7 +276,7 @@
 	     passed in.  */
 	  f = XFRAME (selected_frame);
 	  context = get_frame_dc (f);
-	  old_font = SelectObject (context, FONT_HANDLE(font));
+	  old_font = SelectObject (context, FONT_HANDLE (font));
 
 	  result = ScriptShape (context, &(uniscribe_font->cache),
 				chars + items[i].iCharPos, nchars_in_run,
@@ -322,7 +311,7 @@
 	      /* Cache not complete...  */
 	      f = XFRAME (selected_frame);
 	      context = get_frame_dc (f);
-	      old_font = SelectObject (context, FONT_HANDLE(font));
+	      old_font = SelectObject (context, FONT_HANDLE (font));
 
 	      result = ScriptPlace (context, &(uniscribe_font->cache),
 				    glyphs, nglyphs, attributes, &(items[i].a),
@@ -397,7 +386,7 @@
 		      /* Cache incomplete... */
 		      f = XFRAME (selected_frame);
 		      context = get_frame_dc (f);
-		      old_font = SelectObject (context, FONT_HANDLE(font));
+		      old_font = SelectObject (context, FONT_HANDLE (font));
 		      result = ScriptGetGlyphABCWidth (context,
 						       &(uniscribe_font->cache),
 						       glyphs[j], &char_metric);
@@ -451,9 +440,7 @@
    Return a glyph code of FONT for characer C (Unicode code point).
    If FONT doesn't have such a glyph, return FONT_INVALID_CODE.  */
 static unsigned
-uniscribe_encode_char (font, c)
-     struct font *font;
-     int c;
+uniscribe_encode_char (struct font *font, int c)
 {
   HDC context = NULL;
   struct frame *f = NULL;
@@ -509,7 +496,7 @@
                  the frame.  */
               f = XFRAME (selected_frame);
               context = get_frame_dc (f);
-              old_font = SelectObject (context, FONT_HANDLE(font));
+              old_font = SelectObject (context, FONT_HANDLE (font));
               result = ScriptShape (context, &(uniscribe_font->cache),
                                     ch, len, 2, &(items[0].a),
                                     glyphs, clusters, attrs, &nglyphs);
@@ -574,12 +561,9 @@
    Adds the name of opentype fonts to a Lisp list (passed in as the
    lParam arg). */
 static int CALLBACK
-add_opentype_font_name_to_list (logical_font, physical_font, font_type,
-                                list_object)
-     ENUMLOGFONTEX *logical_font;
-     NEWTEXTMETRICEX *physical_font;
-     DWORD font_type;
-     LPARAM list_object;
+add_opentype_font_name_to_list (ENUMLOGFONTEX *logical_font,
+				NEWTEXTMETRICEX *physical_font,
+				DWORD font_type, LPARAM list_object)
 {
   Lisp_Object* list = (Lisp_Object *) list_object;
   Lisp_Object family;
@@ -650,9 +634,8 @@
 /* Check if font supports the otf script/language/features specified.
    OTF_SPEC is in the format
      (script lang [(gsub_feature ...)|nil] [(gpos_feature ...)]?) */
-int uniscribe_check_otf (font, otf_spec)
-     LOGFONT *font;
-     Lisp_Object otf_spec;
+int
+uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec)
 {
   Lisp_Object script, lang, rest;
   Lisp_Object features[2];
@@ -947,7 +930,7 @@
     NULL, /* get_outline */
     NULL, /* free_outline */
     NULL, /* anchor_point */
-    uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works.  */ 
+    uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works.  */
     NULL, /* otf_drive - use shape instead.  */
     NULL, /* start_for_frame */
     NULL, /* end_for_frame */
@@ -957,7 +940,7 @@
 /* Note that this should be called at every startup, not just when dumping,
    as it needs to test for the existence of the Uniscribe library.  */
 void
-syms_of_w32uniscribe ()
+syms_of_w32uniscribe (void)
 {
   HMODULE uniscribe;
 
--- a/src/w32xfns.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/w32xfns.c	Thu Jul 08 17:09:35 2010 +0900
@@ -39,7 +39,7 @@
 HANDLE interrupt_handle = NULL;
 
 void
-init_crit ()
+init_crit (void)
 {
   InitializeCriticalSection (&critsect);
 
@@ -57,7 +57,7 @@
 }
 
 void
-delete_crit ()
+delete_crit (void)
 {
   DeleteCriticalSection (&critsect);
 
@@ -74,7 +74,7 @@
 }
 
 void
-signal_quit ()
+signal_quit (void)
 {
   /* Make sure this event never remains signaled; if the main thread
      isn't in a blocking call, then this should do nothing.  */
@@ -161,9 +161,7 @@
 int nQueue = 0;
 
 BOOL
-get_next_msg (lpmsg, bWait)
-     W32Msg * lpmsg;
-     BOOL bWait;
+get_next_msg (W32Msg * lpmsg, BOOL bWait)
 {
   BOOL bRet = FALSE;
 
@@ -180,7 +178,7 @@
 
   if (nQueue)
     {
-      bcopy (&(lpHead->w32msg), lpmsg, sizeof (W32Msg));
+      memcpy (lpmsg, &lpHead->w32msg, sizeof (W32Msg));
 
       {
 	int_msg * lpCur = lpHead;
@@ -216,7 +214,7 @@
                   if (!UnionRect (&(lpmsg->rect), &(lpmsg->rect),
                                   &(lpCur->w32msg.rect)))
                     {
-                      SetRectEmpty(&(lpmsg->rect));
+                      SetRectEmpty (&(lpmsg->rect));
                     }
 
                   myfree (lpCur);
@@ -245,15 +243,14 @@
 }
 
 BOOL
-post_msg (lpmsg)
-     W32Msg * lpmsg;
+post_msg (W32Msg * lpmsg)
 {
   int_msg * lpNew = (int_msg *) myalloc (sizeof (int_msg));
 
   if (!lpNew)
     return (FALSE);
 
-  bcopy (lpmsg, &(lpNew->w32msg), sizeof (W32Msg));
+  memcpy (&lpNew->w32msg, lpmsg, sizeof (W32Msg));
   lpNew->lpNext = NULL;
 
   enter_crit ();
@@ -283,7 +280,7 @@
   if (!lpNew)
     return (FALSE);
 
-  bcopy (lpmsg, &(lpNew->w32msg), sizeof (W32Msg));
+  memcpy (&lpNew->w32msg, lpmsg, sizeof (W32Msg));
 
   enter_crit ();
 
@@ -298,7 +295,7 @@
 
 /* Process all messages in the current thread's queue.  */
 void
-drain_message_queue ()
+drain_message_queue (void)
 {
   MSG msg;
   while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
@@ -322,9 +319,7 @@
  */
 
 static int
-read_integer (string, NextString)
-     register char *string;
-     char **NextString;
+read_integer (register char *string, char **NextString)
 {
   register int Result = 0;
   int Sign = 1;
@@ -348,10 +343,9 @@
 }
 
 int
-XParseGeometry (string, x, y, width, height)
-     char *string;
-     int *x, *y;
-     unsigned int *width, *height;    /* RETURN */
+XParseGeometry (char *string,
+		int *x, int *y,
+		unsigned int *width, unsigned int *height)
 {
   int mask = NoValue;
   register char *strind;
@@ -446,8 +440,7 @@
 
 /* x_sync is a no-op on W32.  */
 void
-x_sync (f)
-     void *f;
+x_sync (void *f)
 {
 }
 
--- a/src/widget.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/widget.h	Thu Jul 08 17:09:35 2010 +0900
@@ -94,8 +94,8 @@
 extern struct _DisplayContext* display_context;
 
 /* Special entrypoints */
-void EmacsFrameSetCharSize P_ ((Widget, int, int));
-void widget_store_internal_border P_ ((Widget widget));
+void EmacsFrameSetCharSize (Widget, int, int);
+void widget_store_internal_border (Widget widget);
 
 #endif /* _EmacsFrame_h */
 
--- a/src/window.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/window.c	Thu Jul 08 17:09:35 2010 +0900
@@ -59,32 +59,32 @@
 
 extern Lisp_Object Qleft_margin, Qright_margin;
 
-static int displayed_window_lines P_ ((struct window *));
-static struct window *decode_window P_ ((Lisp_Object));
-static int count_windows P_ ((struct window *));
-static int get_leaf_windows P_ ((struct window *, struct window **, int));
-static void window_scroll P_ ((Lisp_Object, int, int, int));
-static void window_scroll_pixel_based P_ ((Lisp_Object, int, int, int));
-static void window_scroll_line_based P_ ((Lisp_Object, int, int, int));
-static int window_min_size_1 P_ ((struct window *, int, int));
-static int window_min_size_2 P_ ((struct window *, int, int));
-static int window_min_size P_ ((struct window *, int, int, int, int *));
-static void size_window P_ ((Lisp_Object, int, int, int, int, int));
-static int freeze_window_start P_ ((struct window *, void *));
-static int window_fixed_size_p P_ ((struct window *, int, int));
-static void enlarge_window P_ ((Lisp_Object, int, int));
-static Lisp_Object window_list P_ ((void));
-static int add_window_to_list P_ ((struct window *, void *));
-static int candidate_window_p P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
-				   Lisp_Object));
-static Lisp_Object next_window P_ ((Lisp_Object, Lisp_Object,
-				    Lisp_Object, int));
-static void decode_next_window_args P_ ((Lisp_Object *, Lisp_Object *,
-					 Lisp_Object *));
-static int foreach_window_1 P_ ((struct window *,
-				 int (* fn) (struct window *, void *),
-				 void *));
-static Lisp_Object window_list_1 P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
+static int displayed_window_lines (struct window *);
+static struct window *decode_window (Lisp_Object);
+static int count_windows (struct window *);
+static int get_leaf_windows (struct window *, struct window **, int);
+static void window_scroll (Lisp_Object, int, int, int);
+static void window_scroll_pixel_based (Lisp_Object, int, int, int);
+static void window_scroll_line_based (Lisp_Object, int, int, int);
+static int window_min_size_1 (struct window *, int, int);
+static int window_min_size_2 (struct window *, int, int);
+static int window_min_size (struct window *, int, int, int, int *);
+static void size_window (Lisp_Object, int, int, int, int, int);
+static int freeze_window_start (struct window *, void *);
+static int window_fixed_size_p (struct window *, int, int);
+static void enlarge_window (Lisp_Object, int, int);
+static Lisp_Object window_list (void);
+static int add_window_to_list (struct window *, void *);
+static int candidate_window_p (Lisp_Object, Lisp_Object, Lisp_Object,
+                               Lisp_Object);
+static Lisp_Object next_window (Lisp_Object, Lisp_Object,
+                                Lisp_Object, int);
+static void decode_next_window_args (Lisp_Object *, Lisp_Object *,
+                                     Lisp_Object *);
+static int foreach_window_1 (struct window *,
+                             int (* fn) (struct window *, void *),
+                             void *);
+static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object);
 
 /* This is the window in which the terminal's cursor should
    be left when nothing is being done with it.  This must
@@ -220,7 +220,7 @@
 }
 
 Lisp_Object
-make_window ()
+make_window (void)
 {
   Lisp_Object val;
   register struct window *p;
@@ -243,9 +243,9 @@
   p->dedicated = Qnil;
   p->window_parameters = Qnil;
   p->pseudo_window_p = 0;
-  bzero (&p->cursor, sizeof (p->cursor));
-  bzero (&p->last_cursor, sizeof (p->last_cursor));
-  bzero (&p->phys_cursor, sizeof (p->phys_cursor));
+  memset (&p->cursor, 0, sizeof (p->cursor));
+  memset (&p->last_cursor, 0, sizeof (p->last_cursor));
+  memset (&p->phys_cursor, 0, sizeof (p->phys_cursor));
   p->desired_matrix = p->current_matrix = 0;
   p->nrows_scale_factor = p->ncols_scale_factor = 1;
   p->phys_cursor_type = -1;
@@ -483,8 +483,7 @@
 
 
 static struct window *
-decode_window (window)
-     register Lisp_Object window;
+decode_window (register Lisp_Object window)
 {
   if (NILP (window))
     return XWINDOW (selected_window);
@@ -494,8 +493,7 @@
 }
 
 static struct window *
-decode_any_window (window)
-     register Lisp_Object window;
+decode_any_window (register Lisp_Object window)
 {
   if (NILP (window))
     return XWINDOW (selected_window);
@@ -652,6 +650,48 @@
 		Qnil))));
 }
 
+static void
+calc_absolute_offset(struct window *w, int *add_x, int *add_y)
+{
+  struct frame *f = XFRAME (w->frame);
+  *add_y = f->top_pos;
+#ifdef FRAME_MENUBAR_HEIGHT
+  *add_y += FRAME_MENUBAR_HEIGHT (f);
+#endif
+#ifdef FRAME_TOOLBAR_HEIGHT
+  *add_y += FRAME_TOOLBAR_HEIGHT (f);
+#endif
+#ifdef FRAME_NS_TITLEBAR_HEIGHT
+  *add_y += FRAME_NS_TITLEBAR_HEIGHT (f);
+#endif
+  *add_x = f->left_pos;
+}
+
+DEFUN ("window-absolute-pixel-edges", Fwindow_absolute_pixel_edges,
+       Swindow_absolute_pixel_edges, 0, 1, 0,
+       doc: /* Return a list of the edge pixel coordinates of WINDOW.
+The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at
+the top left corner of the display.
+
+RIGHT is one more than the rightmost x position occupied by WINDOW.
+BOTTOM is one more than the bottommost y position occupied by WINDOW.
+The pixel edges include the space used by WINDOW's scroll bar, display
+margins, fringes, header line, and/or mode line.  For the pixel edges
+of just the text area, use `window-inside-absolute-pixel-edges'.  */)
+     (window)
+     Lisp_Object window;
+{
+  register struct window *w = decode_any_window (window);
+  int add_x, add_y;
+  calc_absolute_offset (w, &add_x, &add_y);
+
+  return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x),
+         Fcons (make_number (WINDOW_TOP_EDGE_Y (w) + add_y),
+	 Fcons (make_number (WINDOW_RIGHT_EDGE_X (w) + add_x),
+	 Fcons (make_number (WINDOW_BOTTOM_EDGE_Y (w) + add_y),
+		Qnil))));
+}
+
 DEFUN ("window-inside-edges", Fwindow_inside_edges, Swindow_inside_edges, 0, 1, 0,
        doc: /* Return a list of the edge coordinates of WINDOW.
 The list has the form (LEFT TOP RIGHT BOTTOM).
@@ -705,6 +745,36 @@
 			     - WINDOW_MODE_LINE_HEIGHT (w)));
 }
 
+DEFUN ("window-inside-absolute-pixel-edges",
+       Fwindow_inside_absolute_pixel_edges,
+       Swindow_inside_absolute_pixel_edges, 0, 1, 0,
+       doc: /* Return a list of the edge pixel coordinates of WINDOW.
+The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at
+the top left corner of the display.
+
+RIGHT is one more than the rightmost x position of WINDOW's text area.
+BOTTOM is one more than the bottommost y position of WINDOW's text area.
+The inside edges do not include the space used by WINDOW's scroll bar,
+display margins, fringes, header line, and/or mode line.  */)
+     (window)
+     Lisp_Object window;
+{
+  register struct window *w = decode_any_window (window);
+  int add_x, add_y;
+  calc_absolute_offset (w, &add_x, &add_y);
+
+  return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w)
+			     + WINDOW_LEFT_MARGIN_WIDTH (w)
+			     + WINDOW_LEFT_FRINGE_WIDTH (w) + add_x),
+		make_number (WINDOW_TOP_EDGE_Y (w)
+			     + WINDOW_HEADER_LINE_HEIGHT (w) + add_y),
+		make_number (WINDOW_BOX_RIGHT_EDGE_X (w)
+			     - WINDOW_RIGHT_MARGIN_WIDTH (w)
+			     - WINDOW_RIGHT_FRINGE_WIDTH (w) + add_x),
+		make_number (WINDOW_BOTTOM_EDGE_Y (w)
+			     - WINDOW_MODE_LINE_HEIGHT (w) + add_y));
+}
+
 /* Test if the character at column *X, row *Y is within window W.
    If it is not, return ON_NOTHING;
    if it is in the window's text area,
@@ -727,9 +797,7 @@
    X and Y are frame relative pixel coordinates.  */
 
 static enum window_part
-coordinates_in_window (w, x, y)
-     register struct window *w;
-     register int *x, *y;
+coordinates_in_window (register struct window *w, register int *x, register int *y)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   int left_x, right_x, top_y, bottom_y;
@@ -1012,9 +1080,7 @@
 };
 
 static int
-check_window_containing (w, user_data)
-     struct window *w;
-     void *user_data;
+check_window_containing (struct window *w, void *user_data)
 {
   struct check_window_data *cw = (struct check_window_data *) user_data;
   enum window_part found;
@@ -1052,12 +1118,7 @@
    case.  */
 
 Lisp_Object
-window_from_coordinates (f, x, y, part, wx, wy, tool_bar_p)
-     struct frame *f;
-     int x, y;
-     enum window_part *part;
-     int *wx, *wy;
-     int tool_bar_p;
+window_from_coordinates (struct frame *f, int x, int y, enum window_part *part, int *wx, int *wy, int tool_bar_p)
 {
   Lisp_Object window;
   struct check_window_data cw;
@@ -1397,8 +1458,7 @@
    return 0.  */
 
 struct Lisp_Char_Table *
-window_display_table (w)
-     struct window *w;
+window_display_table (struct window *w)
 {
   struct Lisp_Char_Table *dp = NULL;
 
@@ -1432,8 +1492,7 @@
 /* Record info on buffer window w is displaying
    when it is about to cease to display that buffer.  */
 static void
-unshow_buffer (w)
-     register struct window *w;
+unshow_buffer (register struct window *w)
 {
   Lisp_Object buf;
   struct buffer *b;
@@ -1481,8 +1540,7 @@
 
 /* Put replacement into the window structure in place of old. */
 static void
-replace_window (old, replacement)
-     Lisp_Object old, replacement;
+replace_window (Lisp_Object old, Lisp_Object replacement)
 {
   register Lisp_Object tem;
   register struct window *o = XWINDOW (old), *p = XWINDOW (replacement);
@@ -1499,9 +1557,9 @@
   p->total_lines = o->total_lines;
   p->desired_matrix = p->current_matrix = 0;
   p->vscroll = 0;
-  bzero (&p->cursor, sizeof (p->cursor));
-  bzero (&p->last_cursor, sizeof (p->last_cursor));
-  bzero (&p->phys_cursor, sizeof (p->phys_cursor));
+  memset (&p->cursor, 0, sizeof (p->cursor));
+  memset (&p->last_cursor, 0, sizeof (p->last_cursor));
+  memset (&p->phys_cursor, 0, sizeof (p->phys_cursor));
   p->phys_cursor_type = -1;
   p->phys_cursor_width = -1;
   p->must_be_updated_p = 0;
@@ -1556,8 +1614,7 @@
 }
 
 void
-delete_window (window)
-     register Lisp_Object window;
+delete_window (register Lisp_Object window)
 {
   register Lisp_Object tem, parent, sib;
   register struct window *p;
@@ -1771,9 +1828,7 @@
    function window_list.  */
 
 static int
-add_window_to_list (w, user_data)
-     struct window *w;
-     void *user_data;
+add_window_to_list (struct window *w, void *user_data)
 {
   Lisp_Object *list = (Lisp_Object *) user_data;
   Lisp_Object window;
@@ -1788,7 +1843,7 @@
    list, cache it in Vwindow_list, and return that.  */
 
 static Lisp_Object
-window_list ()
+window_list (void)
 {
   if (!CONSP (Vwindow_list))
     {
@@ -1829,8 +1884,7 @@
 		a frame means consider windows on that frame, only.  */
 
 static int
-candidate_window_p (window, owindow, minibuf, all_frames)
-     Lisp_Object window, owindow, minibuf, all_frames;
+candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf, Lisp_Object all_frames)
 {
   struct window *w = XWINDOW (window);
   struct frame *f = XFRAME (w->frame);
@@ -1895,8 +1949,7 @@
    ALL_FRAMES.  */
 
 static void
-decode_next_window_args (window, minibuf, all_frames)
-     Lisp_Object *window, *minibuf, *all_frames;
+decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object *all_frames)
 {
   if (NILP (*window))
     *window = selected_window;
@@ -1942,9 +1995,7 @@
    ALL_FRAMES.  */
 
 static Lisp_Object
-next_window (window, minibuf, all_frames, next_p)
-     Lisp_Object window, minibuf, all_frames;
-     int next_p;
+next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, int next_p)
 {
   decode_next_window_args (&window, &minibuf, &all_frames);
 
@@ -2128,8 +2179,7 @@
    for `next-window'.  */
 
 static Lisp_Object
-window_list_1 (window, minibuf, all_frames)
-     Lisp_Object window, minibuf, all_frames;
+window_list_1 (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames)
 {
   Lisp_Object tail, list, rest;
 
@@ -2177,10 +2227,7 @@
 };
 
 static Lisp_Object
-window_loop (type, obj, mini, frames)
-     enum window_loop type;
-     Lisp_Object obj, frames;
-     int mini;
+window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frames)
 {
   Lisp_Object window, windows, best_window, frame_arg;
   struct frame *f;
@@ -2407,7 +2454,7 @@
 /* Used for debugging.  Abort if any window has a dead buffer.  */
 
 void
-check_all_windows ()
+check_all_windows (void)
 {
   window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt);
 }
@@ -2618,8 +2665,7 @@
    of all frames, even those on other keyboards.  */
 
 void
-replace_buffer_in_all_windows (buffer)
-     Lisp_Object buffer;
+replace_buffer_in_all_windows (Lisp_Object buffer)
 {
   Lisp_Object tail, frame;
 
@@ -2648,9 +2694,7 @@
    minimum allowable size.  */
 
 void
-check_frame_size (frame, rows, cols)
-     FRAME_PTR frame;
-     int *rows, *cols;
+check_frame_size (FRAME_PTR frame, int *rows, int *cols)
 {
   /* For height, we have to see:
      how many windows the frame has at minimum (one or two),
@@ -2676,9 +2720,7 @@
    either.  */
 
 static int
-window_fixed_size_p (w, width_p, check_siblings_p)
-     struct window *w;
-     int width_p, check_siblings_p;
+window_fixed_size_p (struct window *w, int width_p, int check_siblings_p)
 {
   int fixed_p;
   struct window *c;
@@ -2778,9 +2820,7 @@
    minibuffer window, always return 1.  */
 
 static int
-window_min_size_2 (w, width_p, safe_p)
-     struct window *w;
-     int width_p, safe_p;
+window_min_size_2 (struct window *w, int width_p, int safe_p)
 {
   /* We should consider buffer-local values of window_min_height and
      window_min_width here.  */
@@ -2814,9 +2854,7 @@
    sizes of W's children.  */
 
 static int
-window_min_size_1 (w, width_p, safe_p)
-     struct window *w;
-     int width_p, safe_p;
+window_min_size_1 (struct window *w, int width_p, int safe_p)
 {
   struct window *c;
   int size;
@@ -2891,9 +2929,7 @@
    to 1 if W is fixed-size unless FIXED is null.  */
 
 static int
-window_min_size (w, width_p, safe_p, ignore_fixed_p, fixed)
-     struct window *w;
-     int width_p, safe_p, ignore_fixed_p, *fixed;
+window_min_size (struct window *w, int width_p, int safe_p, int ignore_fixed_p, int *fixed)
 {
   int size, fixed_p;
 
@@ -2919,8 +2955,7 @@
    is still too narrow.  */
 
 static int
-adjust_window_margins (w)
-     struct window *w;
+adjust_window_margins (struct window *w)
 {
   int box_cols = (WINDOW_TOTAL_COLS (w)
 		  - WINDOW_FRINGE_COLS (w)
@@ -2974,11 +3009,8 @@
    a specific window, it will attempt to strictly resize that window
    proportionally, even at the expense of deleting smaller windows.  */
 static int *
-shrink_windows (total, size, nchildren, shrinkable, resize_fixed_p,
-		forward, width_p, safe_p)
-     int total, size, nchildren, shrinkable;
-     int resize_fixed_p, width_p, safe_p;
-     Lisp_Object forward;
+shrink_windows (int total, int size, int nchildren, int shrinkable,
+		int resize_fixed_p, Lisp_Object forward, int width_p, int safe_p)
 {
   int available_resize = 0;
   int *new_sizes, *min_sizes;
@@ -3118,10 +3150,7 @@
    This should give better behavior when resizing frames.  */
 
 static void
-size_window (window, size, width_p, nodelete_p, first_only, last_only)
-     Lisp_Object window;
-     int size, width_p, nodelete_p;
-     int first_only, last_only;
+size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int first_only, int last_only)
 {
   struct window *w = XWINDOW (window);
   struct window *c;
@@ -3312,10 +3341,7 @@
    displayed correctly.  */
 
 void
-set_window_height (window, height, nodelete)
-     Lisp_Object window;
-     int height;
-     int nodelete;
+set_window_height (Lisp_Object window, int height, int nodelete)
 {
   size_window (window, height, 0, nodelete, 0, 0);
 }
@@ -3329,10 +3355,7 @@
    displayed correctly.  */
 
 void
-set_window_width (window, width, nodelete)
-     Lisp_Object window;
-     int width;
-     int nodelete;
+set_window_width (Lisp_Object window, int width, int nodelete)
 {
   size_window (window, width, 1, nodelete, 0, 0);
 }
@@ -3340,9 +3363,7 @@
 /* Change window heights in windows rooted in WINDOW by N lines.  */
 
 void
-change_window_heights (window, n)
-     Lisp_Object window;
-     int n;
+change_window_heights (Lisp_Object window, int n)
 {
   struct window *w = XWINDOW (window);
 
@@ -3438,9 +3459,7 @@
    reset from the buffer's local settings.  */
 
 void
-set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
-     Lisp_Object window, buffer;
-     int run_hooks_p, keep_margins_p;
+set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int keep_margins_p)
 {
   struct window *w = XWINDOW (window);
   struct buffer *b = XBUFFER (buffer);
@@ -3462,7 +3481,7 @@
 
   XSETFASTINT (w->window_end_pos, 0);
   XSETFASTINT (w->window_end_vpos, 0);
-  bzero (&w->last_cursor, sizeof w->last_cursor);
+  memset (&w->last_cursor, 0, sizeof w->last_cursor);
   w->window_end_valid = Qnil;
   if (!(keep_margins_p && samebuf))
     { /* If we're not actually changing the buffer, don't reset hscroll and
@@ -3671,24 +3690,21 @@
 }
 
 static Lisp_Object
-select_window_norecord (window)
-     Lisp_Object window;
+select_window_norecord (Lisp_Object window)
 {
   return WINDOW_LIVE_P (window)
     ? Fselect_window (window, Qt) : selected_window;
 }
 
 static Lisp_Object
-select_frame_norecord (frame)
-     Lisp_Object frame;
+select_frame_norecord (Lisp_Object frame)
 {
   return FRAME_LIVE_P (XFRAME (frame))
     ? Fselect_frame (frame, Qt) : selected_frame;
 }
 
 Lisp_Object
-display_buffer (buffer, not_this_window_p, override_frame)
-     Lisp_Object buffer, not_this_window_p, override_frame;
+display_buffer (Lisp_Object buffer, Lisp_Object not_this_window_p, Lisp_Object override_frame)
 {
   return call3 (Qdisplay_buffer, buffer, not_this_window_p, override_frame);
 }
@@ -3739,8 +3755,7 @@
 
 
 void
-temp_output_buffer_show (buf)
-     register Lisp_Object buf;
+temp_output_buffer_show (register Lisp_Object buf)
 {
   register struct buffer *old = current_buffer;
   register Lisp_Object window;
@@ -3800,8 +3815,7 @@
 }
 
 static void
-make_dummy_parent (window)
-     Lisp_Object window;
+make_dummy_parent (Lisp_Object window)
 {
   Lisp_Object new;
   register struct window *o, *p;
@@ -3934,7 +3948,7 @@
   p->parent = o->parent;
   p->buffer = Qt;
   p->window_end_valid = Qnil;
-  bzero (&p->last_cursor, sizeof p->last_cursor);
+  memset (&p->last_cursor, 0, sizeof p->last_cursor);
 
   /* Duplicate special geometry settings.  */
 
@@ -4015,16 +4029,14 @@
 }
 
 int
-window_height (window)
-     Lisp_Object window;
+window_height (Lisp_Object window)
 {
   register struct window *p = XWINDOW (window);
   return WINDOW_TOTAL_LINES (p);
 }
 
 int
-window_width (window)
-     Lisp_Object window;
+window_width (Lisp_Object window)
 {
   register struct window *p = XWINDOW (window);
   return WINDOW_TOTAL_COLS (p);
@@ -4046,17 +4058,15 @@
    deleted.  */
 
 static void
-enlarge_window (window, delta, horiz_flag)
-     Lisp_Object window;
-     int delta, horiz_flag;
+enlarge_window (Lisp_Object window, int delta, int horiz_flag)
 {
   Lisp_Object parent, next, prev;
   struct window *p;
   Lisp_Object *sizep;
   int maximum;
-  int (*sizefun) P_ ((Lisp_Object))
+  int (*sizefun) (Lisp_Object)
     = horiz_flag ? window_width : window_height;
-  void (*setsizefun) P_ ((Lisp_Object, int, int))
+  void (*setsizefun) (Lisp_Object, int, int)
     = (horiz_flag ? set_window_width : set_window_height);
 
   /* Give up if this window cannot be resized.  */
@@ -4324,9 +4334,7 @@
    are not deleted; instead, we signal an error.  */
 
 static void
-adjust_window_trailing_edge (window, delta, horiz_flag)
-     Lisp_Object window;
-     int delta, horiz_flag;
+adjust_window_trailing_edge (Lisp_Object window, int delta, int horiz_flag)
 {
   Lisp_Object parent, child;
   struct window *p;
@@ -4482,7 +4490,7 @@
 			Resizing Mini-Windows
  ***********************************************************************/
 
-static void shrink_window_lowest_first P_ ((struct window *, int));
+static void shrink_window_lowest_first (struct window *, int);
 
 enum save_restore_action
 {
@@ -4491,16 +4499,14 @@
     RESTORE_ORIG_SIZES
 };
 
-static int save_restore_orig_size P_ ((struct window *,
-                                       enum save_restore_action));
+static int save_restore_orig_size (struct window *,
+                                   enum save_restore_action);
 
 /* Shrink windows rooted in window W to HEIGHT.  Take the space needed
    from lowest windows first.  */
 
 static void
-shrink_window_lowest_first (w, height)
-     struct window *w;
-     int height;
+shrink_window_lowest_first (struct window *w, int height)
 {
   struct window *c;
   Lisp_Object child;
@@ -4582,9 +4588,7 @@
    stored in orig_top_line and orig_total_lines for all windows.  */
 
 static int
-save_restore_orig_size (w, action)
-     struct window *w;
-     enum save_restore_action action;
+save_restore_orig_size (struct window *w, enum save_restore_action action)
 {
   int success_p = 1;
 
@@ -4639,9 +4643,7 @@
    without deleting other windows.  */
 
 void
-grow_mini_window (w, delta)
-     struct window *w;
-     int delta;
+grow_mini_window (struct window *w, int delta)
 {
   struct frame *f = XFRAME (w->frame);
   struct window *root;
@@ -4690,8 +4692,7 @@
    line.  */
 
 void
-shrink_mini_window (w)
-     struct window *w;
+shrink_mini_window (struct window *w)
 {
   struct frame *f = XFRAME (w->frame);
   struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f));
@@ -4721,8 +4722,7 @@
    the frame are cleared.  */
 
 void
-mark_window_cursors_off (w)
-     struct window *w;
+mark_window_cursors_off (struct window *w)
 {
   while (w)
     {
@@ -4741,8 +4741,7 @@
 /* Return number of lines of text (not counting mode lines) in W.  */
 
 int
-window_internal_height (w)
-     struct window *w;
+window_internal_height (struct window *w)
 {
   int ht = XFASTINT (w->total_lines);
 
@@ -4769,8 +4768,7 @@
    separating W from the sibling to its right.  */
 
 int
-window_box_text_cols (w)
-     struct window *w;
+window_box_text_cols (struct window *w)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   int width = XINT (w->total_cols);
@@ -4807,11 +4805,7 @@
    respectively.  */
 
 static void
-window_scroll (window, n, whole, noerror)
-     Lisp_Object window;
-     int n;
-     int whole;
-     int noerror;
+window_scroll (Lisp_Object window, int n, int whole, int noerror)
 {
   immediate_quit = 1;
 
@@ -4831,11 +4825,7 @@
    descriptions.  */
 
 static void
-window_scroll_pixel_based (window, n, whole, noerror)
-     Lisp_Object window;
-     int n;
-     int whole;
-     int noerror;
+window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror)
 {
   struct it it;
   struct window *w = XWINDOW (window);
@@ -5181,11 +5171,7 @@
    See the comment of window_scroll for parameter descriptions.  */
 
 static void
-window_scroll_line_based (window, n, whole, noerror)
-     Lisp_Object window;
-     int n;
-     int whole;
-     int noerror;
+window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror)
 {
   register struct window *w = XWINDOW (window);
   register int opoint = PT, opoint_byte = PT_BYTE;
@@ -5343,9 +5329,7 @@
    up.  This is the guts of Fscroll_up and Fscroll_down.  */
 
 static void
-scroll_command (n, direction)
-     Lisp_Object n;
-     int direction;
+scroll_command (Lisp_Object n, int direction)
 {
   int count = SPECPDL_INDEX ();
 
@@ -5572,8 +5556,7 @@
    as opposed to its height.  */
 
 static int
-displayed_window_lines (w)
-     struct window *w;
+displayed_window_lines (struct window *w)
 {
   struct it it;
   struct text_pos start;
@@ -6318,8 +6301,7 @@
    by setting their buffers to nil.  */
 
 void
-delete_all_subwindows (w)
-     register struct window *w;
+delete_all_subwindows (register struct window *w)
 {
   if (!NILP (w->next))
     delete_all_subwindows (XWINDOW (w->next));
@@ -6345,8 +6327,7 @@
 }
 
 static int
-count_windows (window)
-     register struct window *window;
+count_windows (register struct window *window)
 {
   register int count = 1;
   if (!NILP (window->next))
@@ -6363,10 +6344,7 @@
    Value is last index + 1.  */
 
 static int
-get_leaf_windows (w, flat, i)
-     struct window *w;
-     struct window **flat;
-     int i;
+get_leaf_windows (struct window *w, struct window **flat, int i)
 {
   while (w)
     {
@@ -6389,8 +6367,7 @@
    can be returned.  */
 
 struct glyph *
-get_phys_cursor_glyph (w)
-     struct window *w;
+get_phys_cursor_glyph (struct window *w)
 {
   struct glyph_row *row;
   struct glyph *glyph;
@@ -6409,10 +6386,7 @@
 
 
 static int
-save_window_save (window, vector, i)
-     Lisp_Object window;
-     struct Lisp_Vector *vector;
-     int i;
+save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
 {
   register struct saved_window *p;
   register struct window *w;
@@ -6570,8 +6544,7 @@
  ***********************************************************************/
 
 static Lisp_Object
-window_tree (w)
-     struct window *w;
+window_tree (struct window *w)
 {
   Lisp_Object tail = Qnil;
   Lisp_Object result = Qnil;
@@ -6938,10 +6911,7 @@
    additional argument USER_DATA.  Stops when FN returns 0.  */
 
 void
-foreach_window (f, fn, user_data)
-     struct frame *f;
-     int (* fn) P_ ((struct window *, void *));
-     void *user_data;
+foreach_window (struct frame *f, int (*fn) (struct window *, void *), void *user_data)
 {
   /* delete_frame may set FRAME_ROOT_WINDOW (f) to Qnil.  */
   if (WINDOWP (FRAME_ROOT_WINDOW (f)))
@@ -6955,10 +6925,7 @@
    Stop when FN returns 0.  Value is 0 if stopped by FN.  */
 
 static int
-foreach_window_1 (w, fn, user_data)
-     struct window *w;
-     int (* fn) P_ ((struct window *, void *));
-     void *user_data;
+foreach_window_1 (struct window *w, int (*fn) (struct window *, void *), void *user_data)
 {
   int cont;
 
@@ -6983,9 +6950,7 @@
    the window start.  */
 
 static int
-freeze_window_start (w, freeze_p)
-     struct window *w;
-     void *freeze_p;
+freeze_window_start (struct window *w, void *freeze_p)
 {
   if (MINI_WINDOW_P (w)
       || (WINDOWP (selected_window) /* Can be nil in corner cases.  */
@@ -7005,9 +6970,7 @@
    means freeze the window start.  */
 
 void
-freeze_window_starts (f, freeze_p)
-     struct frame *f;
-     int freeze_p;
+freeze_window_starts (struct frame *f, int freeze_p)
 {
   foreach_window (f, freeze_window_start, (void *) (freeze_p ? f : 0));
 }
@@ -7021,9 +6984,7 @@
    describe the same state of affairs.  This is used by Fequal.  */
 
 int
-compare_window_configurations (c1, c2, ignore_positions)
-     Lisp_Object c1, c2;
-     int ignore_positions;
+compare_window_configurations (Lisp_Object c1, Lisp_Object c2, int ignore_positions)
 {
   register struct save_window_data *d1, *d2;
   struct Lisp_Vector *sw1, *sw2;
@@ -7149,7 +7110,7 @@
 }
 
 void
-init_window_once ()
+init_window_once (void)
 {
   struct frame *f = make_initial_frame ();
   XSETFRAME (selected_frame, f);
@@ -7162,13 +7123,13 @@
 }
 
 void
-init_window ()
+init_window (void)
 {
   Vwindow_list = Qnil;
 }
 
 void
-syms_of_window ()
+syms_of_window (void)
 {
   Qscroll_up = intern_c_string ("scroll-up");
   staticpro (&Qscroll_up);
@@ -7312,8 +7273,10 @@
   defsubr (&Sset_window_redisplay_end_trigger);
   defsubr (&Swindow_edges);
   defsubr (&Swindow_pixel_edges);
+  defsubr (&Swindow_absolute_pixel_edges);
   defsubr (&Swindow_inside_edges);
   defsubr (&Swindow_inside_pixel_edges);
+  defsubr (&Swindow_inside_absolute_pixel_edges);
   defsubr (&Scoordinates_in_window_p);
   defsubr (&Swindow_at);
   defsubr (&Swindow_point);
@@ -7375,7 +7338,7 @@
 }
 
 void
-keys_of_window ()
+keys_of_window (void)
 {
   initial_define_key (control_x_map, '1', "delete-other-windows");
   initial_define_key (control_x_map, '2', "split-window");
--- a/src/window.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/window.h	Thu Jul 08 17:09:35 2010 +0900
@@ -785,25 +785,25 @@
 EXFUN (Fset_window_margins, 3);
 EXFUN (Fwindow_live_p, 1);
 EXFUN (Fset_window_point, 2);
-extern Lisp_Object make_window P_ ((void));
-extern void delete_window P_ ((Lisp_Object));
-extern Lisp_Object window_from_coordinates P_ ((struct frame *, int, int,
-						enum window_part *,
-						int *, int*, int));
+extern Lisp_Object make_window (void);
+extern void delete_window (Lisp_Object);
+extern Lisp_Object window_from_coordinates (struct frame *, int, int,
+                                            enum window_part *,
+                                            int *, int*, int);
 EXFUN (Fwindow_dedicated_p, 1);
-extern int window_height P_ ((Lisp_Object));
-extern int window_width P_ ((Lisp_Object));
+extern int window_height (Lisp_Object);
+extern int window_width (Lisp_Object);
 EXFUN (Fwindow_full_width_p, 1);
-extern void set_window_height P_ ((Lisp_Object, int, int));
-extern void set_window_width P_ ((Lisp_Object, int, int));
-extern void change_window_heights P_ ((Lisp_Object, int));
-extern void delete_all_subwindows P_ ((struct window *));
-extern void freeze_window_starts P_ ((struct frame *, int));
-extern void foreach_window P_ ((struct frame *,
-				int (* fn) (struct window *, void *),
-				void *));
-extern void grow_mini_window P_ ((struct window *, int));
-extern void shrink_mini_window P_ ((struct window *));
+extern void set_window_height (Lisp_Object, int, int);
+extern void set_window_width (Lisp_Object, int, int);
+extern void change_window_heights (Lisp_Object, int);
+extern void delete_all_subwindows (struct window *);
+extern void freeze_window_starts (struct frame *, int);
+extern void foreach_window (struct frame *,
+                            int (* fn) (struct window *, void *),
+                            void *);
+extern void grow_mini_window (struct window *, int);
+extern void shrink_mini_window (struct window *);
 
 void run_window_configuration_change_hook (struct frame *f);
 
@@ -811,8 +811,8 @@
    means it's allowed to run hooks.  See make_frame for a case where
    it's not allowed.  */
 
-void set_window_buffer P_ ((Lisp_Object window, Lisp_Object buffer,
-			    int run_hooks_p, int keep_margins_p));
+void set_window_buffer (Lisp_Object window, Lisp_Object buffer,
+                        int run_hooks_p, int keep_margins_p);
 
 /* Prompt to display in front of the minibuffer contents.  */
 
@@ -862,13 +862,13 @@
 /* If *ROWS or *COLS are too small a size for FRAME, set them to the
    minimum allowable size.  */
 
-extern void check_frame_size P_ ((struct frame *frame, int *rows, int *cols));
+extern void check_frame_size (struct frame *frame, int *rows, int *cols);
 
 /* Return a pointer to the glyph W's physical cursor is on.  Value is
    null if W's current matrix is invalid, so that no meaningfull glyph
    can be returned.  */
 
-struct glyph *get_phys_cursor_glyph P_ ((struct window *w));
+struct glyph *get_phys_cursor_glyph (struct window *w);
 
 /* Value is non-zero if WINDOW is a live window.  */
 
@@ -891,24 +891,24 @@
 EXFUN (Fsplit_window, 3);
 EXFUN (Fset_window_configuration, 1);
 EXFUN (Fcurrent_window_configuration, 1);
-extern int compare_window_configurations P_ ((Lisp_Object, Lisp_Object, int));
+extern int compare_window_configurations (Lisp_Object, Lisp_Object, int);
 EXFUN (Fcoordinates_in_window_p, 2);
 EXFUN (Fwindow_at, 3);
 EXFUN (Fpos_visible_in_window_p, 3);
-extern void mark_window_cursors_off P_ ((struct window *));
-extern int window_internal_height P_ ((struct window *));
-extern int window_internal_width P_ ((struct window *));
+extern void mark_window_cursors_off (struct window *);
+extern int window_internal_height (struct window *);
+extern int window_internal_width (struct window *);
 EXFUN (Frecenter, 1);
 EXFUN (Fscroll_other_window, 1);
 EXFUN (Fset_window_start, 3);
-extern void temp_output_buffer_show P_ ((Lisp_Object));
-extern void replace_buffer_in_all_windows P_ ((Lisp_Object));
-extern void init_window_once P_ ((void));
-extern void init_window P_ ((void));
-extern void syms_of_window P_ ((void));
-extern void keys_of_window P_ ((void));
+extern void temp_output_buffer_show (Lisp_Object);
+extern void replace_buffer_in_all_windows (Lisp_Object);
+extern void init_window_once (void);
+extern void init_window (void);
+extern void syms_of_window (void);
+extern void keys_of_window (void);
 
-extern int window_box_text_cols P_ ((struct window *w));
+extern int window_box_text_cols (struct window *w);
 
 #endif /* not WINDOW_H_INCLUDED */
 
--- a/src/xdisp.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xdisp.c	Thu Jul 08 17:09:35 2010 +0900
@@ -270,7 +270,7 @@
 
 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
     || defined(HAVE_NS) || defined (USE_GTK)
-extern void set_frame_menubar P_ ((struct frame *f, int, int));
+extern void set_frame_menubar (struct frame *f, int, int);
 extern int pending_menu_activation;
 #endif
 
@@ -831,15 +831,15 @@
 
   /* A handler function called to set up iterator IT from the property
      at IT's current position.  Value is used to steer handle_stop.  */
-  enum prop_handled (*handler) P_ ((struct it *it));
+  enum prop_handled (*handler) (struct it *it);
 };
 
-static enum prop_handled handle_face_prop P_ ((struct it *));
-static enum prop_handled handle_invisible_prop P_ ((struct it *));
-static enum prop_handled handle_display_prop P_ ((struct it *));
-static enum prop_handled handle_composition_prop P_ ((struct it *));
-static enum prop_handled handle_overlay_change P_ ((struct it *));
-static enum prop_handled handle_fontified_prop P_ ((struct it *));
+static enum prop_handled handle_face_prop (struct it *);
+static enum prop_handled handle_invisible_prop (struct it *);
+static enum prop_handled handle_display_prop (struct it *);
+static enum prop_handled handle_composition_prop (struct it *);
+static enum prop_handled handle_overlay_change (struct it *);
+static enum prop_handled handle_fontified_prop (struct it *);
 
 /* Properties handled by iterators.  */
 
@@ -949,149 +949,149 @@
 
 /* Function prototypes.  */
 
-static void setup_for_ellipsis P_ ((struct it *, int));
-static void mark_window_display_accurate_1 P_ ((struct window *, int));
-static int single_display_spec_string_p P_ ((Lisp_Object, Lisp_Object));
-static int display_prop_string_p P_ ((Lisp_Object, Lisp_Object));
-static int cursor_row_p P_ ((struct window *, struct glyph_row *));
-static int redisplay_mode_lines P_ ((Lisp_Object, int));
-static char *decode_mode_spec_coding P_ ((Lisp_Object, char *, int));
-
-static Lisp_Object get_it_property P_ ((struct it *it, Lisp_Object prop));
-
-static void handle_line_prefix P_ ((struct it *));
-
-static void pint2str P_ ((char *, int, int));
-static void pint2hrstr P_ ((char *, int, int));
-static struct text_pos run_window_scroll_functions P_ ((Lisp_Object,
-							struct text_pos));
-static void reconsider_clip_changes P_ ((struct window *, struct buffer *));
-static int text_outside_line_unchanged_p P_ ((struct window *, int, int));
-static void store_mode_line_noprop_char P_ ((char));
-static int store_mode_line_noprop P_ ((const unsigned char *, int, int));
-static void x_consider_frame_title P_ ((Lisp_Object));
-static void handle_stop P_ ((struct it *));
-static void handle_stop_backwards P_ ((struct it *, EMACS_INT));
-static int tool_bar_lines_needed P_ ((struct frame *, int *));
-static int single_display_spec_intangible_p P_ ((Lisp_Object));
-static void ensure_echo_area_buffers P_ ((void));
-static Lisp_Object unwind_with_echo_area_buffer P_ ((Lisp_Object));
-static Lisp_Object with_echo_area_buffer_unwind_data P_ ((struct window *));
-static int with_echo_area_buffer P_ ((struct window *, int,
-				      int (*) (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT),
-				      EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
-static void clear_garbaged_frames P_ ((void));
-static int current_message_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
-static int truncate_message_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
-static int set_message_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
-static int display_echo_area P_ ((struct window *));
-static int display_echo_area_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
-static int resize_mini_window_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
-static Lisp_Object unwind_redisplay P_ ((Lisp_Object));
-static int string_char_and_length P_ ((const unsigned char *, int *));
-static struct text_pos display_prop_end P_ ((struct it *, Lisp_Object,
-					     struct text_pos));
-static int compute_window_start_on_continuation_line P_ ((struct window *));
-static Lisp_Object safe_eval_handler P_ ((Lisp_Object));
-static void insert_left_trunc_glyphs P_ ((struct it *));
-static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *,
-							  Lisp_Object));
-static void extend_face_to_end_of_line P_ ((struct it *));
-static int append_space_for_newline P_ ((struct it *, int));
-static int cursor_row_fully_visible_p P_ ((struct window *, int, int));
-static int try_scrolling P_ ((Lisp_Object, int, EMACS_INT, EMACS_INT, int, int));
-static int try_cursor_movement P_ ((Lisp_Object, struct text_pos, int *));
-static int trailing_whitespace_p P_ ((int));
-static int message_log_check_duplicate P_ ((int, int, int, int));
-static void push_it P_ ((struct it *));
-static void pop_it P_ ((struct it *));
-static void sync_frame_with_window_matrix_rows P_ ((struct window *));
-static void select_frame_for_redisplay P_ ((Lisp_Object));
-static void redisplay_internal P_ ((int));
-static int echo_area_display P_ ((int));
-static void redisplay_windows P_ ((Lisp_Object));
-static void redisplay_window P_ ((Lisp_Object, int));
-static Lisp_Object redisplay_window_error ();
-static Lisp_Object redisplay_window_0 P_ ((Lisp_Object));
-static Lisp_Object redisplay_window_1 P_ ((Lisp_Object));
-static int update_menu_bar P_ ((struct frame *, int, int));
-static int try_window_reusing_current_matrix P_ ((struct window *));
-static int try_window_id P_ ((struct window *));
-static int display_line P_ ((struct it *));
-static int display_mode_lines P_ ((struct window *));
-static int display_mode_line P_ ((struct window *, enum face_id, Lisp_Object));
-static int display_mode_element P_ ((struct it *, int, int, int, Lisp_Object, Lisp_Object, int));
-static int store_mode_line_string P_ ((char *, Lisp_Object, int, int, int, Lisp_Object));
-static char *decode_mode_spec P_ ((struct window *, int, int, int,
-				   Lisp_Object *));
-static void display_menu_bar P_ ((struct window *));
-static int display_count_lines P_ ((int, int, int, int, int *));
-static int display_string P_ ((unsigned char *, Lisp_Object, Lisp_Object,
-			       EMACS_INT, EMACS_INT, struct it *, int, int, int, int));
-static void compute_line_metrics P_ ((struct it *));
-static void run_redisplay_end_trigger_hook P_ ((struct it *));
-static int get_overlay_strings P_ ((struct it *, int));
-static int get_overlay_strings_1 P_ ((struct it *, int, int));
-static void next_overlay_string P_ ((struct it *));
-static void reseat P_ ((struct it *, struct text_pos, int));
-static void reseat_1 P_ ((struct it *, struct text_pos, int));
-static void back_to_previous_visible_line_start P_ ((struct it *));
-void reseat_at_previous_visible_line_start P_ ((struct it *));
-static void reseat_at_next_visible_line_start P_ ((struct it *, int));
-static int next_element_from_ellipsis P_ ((struct it *));
-static int next_element_from_display_vector P_ ((struct it *));
-static int next_element_from_string P_ ((struct it *));
-static int next_element_from_c_string P_ ((struct it *));
-static int next_element_from_buffer P_ ((struct it *));
-static int next_element_from_composition P_ ((struct it *));
-static int next_element_from_image P_ ((struct it *));
-static int next_element_from_stretch P_ ((struct it *));
-static void load_overlay_strings P_ ((struct it *, int));
-static int init_from_display_pos P_ ((struct it *, struct window *,
-				      struct display_pos *));
-static void reseat_to_string P_ ((struct it *, unsigned char *,
-				  Lisp_Object, int, int, int, int));
+static void setup_for_ellipsis (struct it *, int);
+static void mark_window_display_accurate_1 (struct window *, int);
+static int single_display_spec_string_p (Lisp_Object, Lisp_Object);
+static int display_prop_string_p (Lisp_Object, Lisp_Object);
+static int cursor_row_p (struct window *, struct glyph_row *);
+static int redisplay_mode_lines (Lisp_Object, int);
+static char *decode_mode_spec_coding (Lisp_Object, char *, int);
+
+static Lisp_Object get_it_property (struct it *it, Lisp_Object prop);
+
+static void handle_line_prefix (struct it *);
+
+static void pint2str (char *, int, int);
+static void pint2hrstr (char *, int, int);
+static struct text_pos run_window_scroll_functions (Lisp_Object,
+                                                    struct text_pos);
+static void reconsider_clip_changes (struct window *, struct buffer *);
+static int text_outside_line_unchanged_p (struct window *, int, int);
+static void store_mode_line_noprop_char (char);
+static int store_mode_line_noprop (const unsigned char *, int, int);
+static void x_consider_frame_title (Lisp_Object);
+static void handle_stop (struct it *);
+static void handle_stop_backwards (struct it *, EMACS_INT);
+static int tool_bar_lines_needed (struct frame *, int *);
+static int single_display_spec_intangible_p (Lisp_Object);
+static void ensure_echo_area_buffers (void);
+static Lisp_Object unwind_with_echo_area_buffer (Lisp_Object);
+static Lisp_Object with_echo_area_buffer_unwind_data (struct window *);
+static int with_echo_area_buffer (struct window *, int,
+                                  int (*) (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT),
+                                  EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
+static void clear_garbaged_frames (void);
+static int current_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
+static int truncate_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
+static int set_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
+static int display_echo_area (struct window *);
+static int display_echo_area_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
+static int resize_mini_window_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
+static Lisp_Object unwind_redisplay (Lisp_Object);
+static int string_char_and_length (const unsigned char *, int *);
+static struct text_pos display_prop_end (struct it *, Lisp_Object,
+                                         struct text_pos);
+static int compute_window_start_on_continuation_line (struct window *);
+static Lisp_Object safe_eval_handler (Lisp_Object);
+static void insert_left_trunc_glyphs (struct it *);
+static struct glyph_row *get_overlay_arrow_glyph_row (struct window *,
+                                                      Lisp_Object);
+static void extend_face_to_end_of_line (struct it *);
+static int append_space_for_newline (struct it *, int);
+static int cursor_row_fully_visible_p (struct window *, int, int);
+static int try_scrolling (Lisp_Object, int, EMACS_INT, EMACS_INT, int, int);
+static int try_cursor_movement (Lisp_Object, struct text_pos, int *);
+static int trailing_whitespace_p (int);
+static int message_log_check_duplicate (int, int, int, int);
+static void push_it (struct it *);
+static void pop_it (struct it *);
+static void sync_frame_with_window_matrix_rows (struct window *);
+static void select_frame_for_redisplay (Lisp_Object);
+static void redisplay_internal (int);
+static int echo_area_display (int);
+static void redisplay_windows (Lisp_Object);
+static void redisplay_window (Lisp_Object, int);
+static Lisp_Object redisplay_window_error (Lisp_Object);
+static Lisp_Object redisplay_window_0 (Lisp_Object);
+static Lisp_Object redisplay_window_1 (Lisp_Object);
+static int update_menu_bar (struct frame *, int, int);
+static int try_window_reusing_current_matrix (struct window *);
+static int try_window_id (struct window *);
+static int display_line (struct it *);
+static int display_mode_lines (struct window *);
+static int display_mode_line (struct window *, enum face_id, Lisp_Object);
+static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_Object, int);
+static int store_mode_line_string (char *, Lisp_Object, int, int, int, Lisp_Object);
+static char *decode_mode_spec (struct window *, int, int, int,
+                               Lisp_Object *);
+static void display_menu_bar (struct window *);
+static int display_count_lines (int, int, int, int, int *);
+static int display_string (unsigned char *, Lisp_Object, Lisp_Object,
+                           EMACS_INT, EMACS_INT, struct it *, int, int, int, int);
+static void compute_line_metrics (struct it *);
+static void run_redisplay_end_trigger_hook (struct it *);
+static int get_overlay_strings (struct it *, int);
+static int get_overlay_strings_1 (struct it *, int, int);
+static void next_overlay_string (struct it *);
+static void reseat (struct it *, struct text_pos, int);
+static void reseat_1 (struct it *, struct text_pos, int);
+static void back_to_previous_visible_line_start (struct it *);
+void reseat_at_previous_visible_line_start (struct it *);
+static void reseat_at_next_visible_line_start (struct it *, int);
+static int next_element_from_ellipsis (struct it *);
+static int next_element_from_display_vector (struct it *);
+static int next_element_from_string (struct it *);
+static int next_element_from_c_string (struct it *);
+static int next_element_from_buffer (struct it *);
+static int next_element_from_composition (struct it *);
+static int next_element_from_image (struct it *);
+static int next_element_from_stretch (struct it *);
+static void load_overlay_strings (struct it *, int);
+static int init_from_display_pos (struct it *, struct window *,
+                                  struct display_pos *);
+static void reseat_to_string (struct it *, unsigned char *,
+                              Lisp_Object, int, int, int, int);
 static enum move_it_result
        move_it_in_display_line_to (struct it *, EMACS_INT, int,
 				   enum move_operation_enum);
-void move_it_vertically_backward P_ ((struct it *, int));
-static void init_to_row_start P_ ((struct it *, struct window *,
-				   struct glyph_row *));
-static int init_to_row_end P_ ((struct it *, struct window *,
-				struct glyph_row *));
-static void back_to_previous_line_start P_ ((struct it *));
-static int forward_to_next_line_start P_ ((struct it *, int *));
-static struct text_pos string_pos_nchars_ahead P_ ((struct text_pos,
-						    Lisp_Object, int));
-static struct text_pos string_pos P_ ((int, Lisp_Object));
-static struct text_pos c_string_pos P_ ((int, unsigned char *, int));
-static int number_of_chars P_ ((unsigned char *, int));
-static void compute_stop_pos P_ ((struct it *));
-static void compute_string_pos P_ ((struct text_pos *, struct text_pos,
-				    Lisp_Object));
-static int face_before_or_after_it_pos P_ ((struct it *, int));
-static EMACS_INT next_overlay_change P_ ((EMACS_INT));
-static int handle_single_display_spec P_ ((struct it *, Lisp_Object,
-					   Lisp_Object, Lisp_Object,
-					   struct text_pos *, int));
-static int underlying_face_id P_ ((struct it *));
-static int in_ellipses_for_invisible_text_p P_ ((struct display_pos *,
-						 struct window *));
+void move_it_vertically_backward (struct it *, int);
+static void init_to_row_start (struct it *, struct window *,
+                               struct glyph_row *);
+static int init_to_row_end (struct it *, struct window *,
+                            struct glyph_row *);
+static void back_to_previous_line_start (struct it *);
+static int forward_to_next_line_start (struct it *, int *);
+static struct text_pos string_pos_nchars_ahead (struct text_pos,
+                                                Lisp_Object, int);
+static struct text_pos string_pos (int, Lisp_Object);
+static struct text_pos c_string_pos (int, unsigned char *, int);
+static int number_of_chars (unsigned char *, int);
+static void compute_stop_pos (struct it *);
+static void compute_string_pos (struct text_pos *, struct text_pos,
+                                Lisp_Object);
+static int face_before_or_after_it_pos (struct it *, int);
+static EMACS_INT next_overlay_change (EMACS_INT);
+static int handle_single_display_spec (struct it *, Lisp_Object,
+                                       Lisp_Object, Lisp_Object,
+                                       struct text_pos *, int);
+static int underlying_face_id (struct it *);
+static int in_ellipses_for_invisible_text_p (struct display_pos *,
+                                             struct window *);
 
 #define face_before_it_pos(IT) face_before_or_after_it_pos ((IT), 1)
 #define face_after_it_pos(IT)  face_before_or_after_it_pos ((IT), 0)
 
 #ifdef HAVE_WINDOW_SYSTEM
 
-static void update_tool_bar P_ ((struct frame *, int));
-static void build_desired_tool_bar_string P_ ((struct frame *f));
-static int redisplay_tool_bar P_ ((struct frame *));
-static void display_tool_bar_line P_ ((struct it *, int));
-static void notice_overwritten_cursor P_ ((struct window *,
-					   enum glyph_row_area,
-					   int, int, int, int));
-static void append_stretch_glyph P_ ((struct it *, Lisp_Object,
-				      int, int, int));
+static void update_tool_bar (struct frame *, int);
+static void build_desired_tool_bar_string (struct frame *f);
+static int redisplay_tool_bar (struct frame *);
+static void display_tool_bar_line (struct it *, int);
+static void notice_overwritten_cursor (struct window *,
+                                       enum glyph_row_area,
+                                       int, int, int, int);
+static void append_stretch_glyph (struct it *, Lisp_Object,
+                                  int, int, int);
 
 
 
@@ -1109,8 +1109,7 @@
    This is the height of W minus the height of a mode line, if any.  */
 
 INLINE int
-window_text_bottom_y (w)
-     struct window *w;
+window_text_bottom_y (struct window *w)
 {
   int height = WINDOW_TOTAL_HEIGHT (w);
 
@@ -1124,9 +1123,7 @@
    the left and right of the window.  */
 
 INLINE int
-window_box_width (w, area)
-     struct window *w;
-     int area;
+window_box_width (struct window *w, int area)
 {
   int cols = XFASTINT (w->total_cols);
   int pixels = 0;
@@ -1165,8 +1162,7 @@
    including mode lines of W, if any.  */
 
 INLINE int
-window_box_height (w)
-     struct window *w;
+window_box_height (struct window *w)
 {
   struct frame *f = XFRAME (w->frame);
   int height = WINDOW_TOTAL_HEIGHT (w);
@@ -1213,9 +1209,7 @@
    whole window, to the right of the left fringe of W.  */
 
 INLINE int
-window_box_left_offset (w, area)
-     struct window *w;
-     int area;
+window_box_left_offset (struct window *w, int area)
 {
   int x;
 
@@ -1247,9 +1241,7 @@
    whole window, to the left of the right fringe of W.  */
 
 INLINE int
-window_box_right_offset (w, area)
-     struct window *w;
-     int area;
+window_box_right_offset (struct window *w, int area)
 {
   return window_box_left_offset (w, area) + window_box_width (w, area);
 }
@@ -1259,9 +1251,7 @@
    whole window, to the right of the left fringe of W.  */
 
 INLINE int
-window_box_left (w, area)
-     struct window *w;
-     int area;
+window_box_left (struct window *w, int area)
 {
   struct frame *f = XFRAME (w->frame);
   int x;
@@ -1281,9 +1271,7 @@
    whole window, to the left of the right fringe of W.  */
 
 INLINE int
-window_box_right (w, area)
-     struct window *w;
-     int area;
+window_box_right (struct window *w, int area)
 {
   return window_box_left (w, area) + window_box_width (w, area);
 }
@@ -1296,10 +1284,8 @@
    *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box.  */
 
 INLINE void
-window_box (w, area, box_x, box_y, box_width, box_height)
-     struct window *w;
-     int area;
-     int *box_x, *box_y, *box_width, *box_height;
+window_box (struct window *w, int area, int *box_x, int *box_y,
+	    int *box_width, int *box_height)
 {
   if (box_width)
     *box_width = window_box_width (w, area);
@@ -1347,8 +1333,7 @@
    This can modify IT's settings.  */
 
 int
-line_bottom_y (it)
-     struct it *it;
+line_bottom_y (struct it *it)
 {
   int line_height = it->max_ascent + it->max_descent;
   int line_top_y = it->current_y;
@@ -1390,9 +1375,8 @@
    Set *ROWH and *VPOS to row's visible height and VPOS (row number).  */
 
 int
-pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos)
-     struct window *w;
-     int charpos, *x, *y, *rtop, *rbot, *rowh, *vpos;
+pos_visible_p (struct window *w, int charpos, int *x, int *y,
+	       int *rtop, int *rbot, int *rowh, int *vpos)
 {
   struct it it;
   struct text_pos top;
@@ -1531,9 +1515,7 @@
    character.  */
 
 static INLINE int
-string_char_and_length (str, len)
-     const unsigned char *str;
-     int *len;
+string_char_and_length (const unsigned char *str, int *len)
 {
   int c;
 
@@ -1553,10 +1535,7 @@
    in STRING, return the position NCHARS ahead (NCHARS >= 0).  */
 
 static struct text_pos
-string_pos_nchars_ahead (pos, string, nchars)
-     struct text_pos pos;
-     Lisp_Object string;
-     int nchars;
+string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, int nchars)
 {
   xassert (STRINGP (string) && nchars >= 0);
 
@@ -1586,9 +1565,7 @@
    for character position CHARPOS in STRING.  */
 
 static INLINE struct text_pos
-string_pos (charpos, string)
-     int charpos;
-     Lisp_Object string;
+string_pos (int charpos, Lisp_Object string)
 {
   struct text_pos pos;
   xassert (STRINGP (string));
@@ -1603,10 +1580,7 @@
    means recognize multibyte characters.  */
 
 static struct text_pos
-c_string_pos (charpos, s, multibyte_p)
-     int charpos;
-     unsigned char *s;
-     int multibyte_p;
+c_string_pos (int charpos, unsigned char *s, int multibyte_p)
 {
   struct text_pos pos;
 
@@ -1638,9 +1612,7 @@
    non-zero means recognize multibyte characters.  */
 
 static int
-number_of_chars (s, multibyte_p)
-     unsigned char *s;
-     int multibyte_p;
+number_of_chars (unsigned char *s, int multibyte_p)
 {
   int nchars;
 
@@ -1667,9 +1639,7 @@
    NEWPOS->charpos must be >= POS.charpos.  */
 
 static void
-compute_string_pos (newpos, pos, string)
-     struct text_pos *newpos, pos;
-     Lisp_Object string;
+compute_string_pos (struct text_pos *newpos, struct text_pos pos, Lisp_Object string)
 {
   xassert (STRINGP (string));
   xassert (CHARPOS (*newpos) >= CHARPOS (pos));
@@ -1686,9 +1656,7 @@
    frame F.  FACE_ID specifies what line's height to estimate.  */
 
 int
-estimate_mode_line_height (f, face_id)
-     struct frame *f;
-     enum face_id face_id;
+estimate_mode_line_height (struct frame *f, enum face_id face_id)
 {
 #ifdef HAVE_WINDOW_SYSTEM
   if (FRAME_WINDOW_P (f))
@@ -1722,12 +1690,8 @@
    not force the value into range.  */
 
 void
-pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip)
-     FRAME_PTR f;
-     register int pix_x, pix_y;
-     int *x, *y;
-     NativeRectangle *bounds;
-     int noclip;
+pixel_to_glyph_coords (FRAME_PTR f, register int pix_x, register int pix_y,
+		       int *x, int *y, NativeRectangle *bounds, int noclip)
 {
 
 #ifdef HAVE_WINDOW_SYSTEM
@@ -1776,10 +1740,8 @@
    return 0.  */
 
 int
-glyph_to_pixel_coords (w, hpos, vpos, frame_x, frame_y)
-     struct window *w;
-     int hpos, vpos;
-     int *frame_x, *frame_y;
+glyph_to_pixel_coords (struct window *w, int hpos, int vpos,
+		       int *frame_x, int *frame_y)
 {
 #ifdef HAVE_WINDOW_SYSTEM
   if (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w))))
@@ -1839,10 +1801,8 @@
 
 static
 struct glyph *
-x_y_to_hpos_vpos (w, x, y, hpos, vpos, dx, dy, area)
-     struct window *w;
-     int x, y;
-     int *hpos, *vpos, *dx, *dy, *area;
+x_y_to_hpos_vpos (struct window *w, int x, int y, int *hpos, int *vpos,
+		  int *dx, int *dy, int *area)
 {
   struct glyph *glyph, *end;
   struct glyph_row *row = NULL;
@@ -1919,9 +1879,7 @@
    Takes pseudo-windows into account.  */
 
 void
-frame_to_window_pixel_xy (w, x, y)
-     struct window *w;
-     int *x, *y;
+frame_to_window_pixel_xy (struct window *w, int *x, int *y)
 {
   if (w->pseudo_window_p)
     {
@@ -1943,10 +1901,7 @@
    Return the number of stored rectangles.  */
 
 int
-get_glyph_string_clip_rects (s, rects, n)
-     struct glyph_string *s;
-     NativeRectangle *rects;
-     int n;
+get_glyph_string_clip_rects (struct glyph_string *s, NativeRectangle *rects, int n)
 {
   XRectangle r;
 
@@ -2140,9 +2095,7 @@
    Return in *NR the clipping rectangle for glyph string S.  */
 
 void
-get_glyph_string_clip_rect (s, nr)
-     struct glyph_string *s;
-     NativeRectangle *nr;
+get_glyph_string_clip_rect (struct glyph_string *s, NativeRectangle *nr)
 {
   get_glyph_string_clip_rects (s, nr, 1);
 }
@@ -2154,11 +2107,8 @@
 */
 
 void
-get_phys_cursor_geometry (w, row, glyph, xp, yp, heightp)
-     struct window *w;
-     struct glyph_row *row;
-     struct glyph *glyph;
-     int *xp, *yp, *heightp;
+get_phys_cursor_geometry (struct window *w, struct glyph_row *row,
+			  struct glyph *glyph, int *xp, int *yp, int *heightp)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   int x, y, wd, h, h0, y0;
@@ -2218,10 +2168,7 @@
  */
 
 void
-remember_mouse_glyph (f, gx, gy, rect)
-     struct frame *f;
-     int gx, gy;
-     NativeRectangle *rect;
+remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
 {
   Lisp_Object window;
   struct window *w;
@@ -2417,8 +2364,7 @@
 /* Error handler for safe_eval and safe_call.  */
 
 static Lisp_Object
-safe_eval_handler (arg)
-     Lisp_Object arg;
+safe_eval_handler (Lisp_Object arg)
 {
   add_to_log ("Error during redisplay: %s", arg, Qnil);
   return Qnil;
@@ -2433,9 +2379,7 @@
    redisplay during the evaluation.  */
 
 Lisp_Object
-safe_call (nargs, args)
-     int nargs;
-     Lisp_Object *args;
+safe_call (int nargs, Lisp_Object *args)
 {
   Lisp_Object val;
 
@@ -2465,8 +2409,7 @@
    Return the result, or nil if something went wrong.  */
 
 Lisp_Object
-safe_call1 (fn, arg)
-     Lisp_Object fn, arg;
+safe_call1 (Lisp_Object fn, Lisp_Object arg)
 {
   Lisp_Object args[2];
   args[0] = fn;
@@ -2595,12 +2538,9 @@
    the desired matrix of W.  */
 
 void
-init_iterator (it, w, charpos, bytepos, row, base_face_id)
-     struct it *it;
-     struct window *w;
-     EMACS_INT charpos, bytepos;
-     struct glyph_row *row;
-     enum face_id base_face_id;
+init_iterator (struct it *it, struct window *w,
+	       EMACS_INT charpos, EMACS_INT bytepos,
+	       struct glyph_row *row, enum face_id base_face_id)
 {
   int highlight_region_p;
   enum face_id remapped_base_face_id = base_face_id;
@@ -2636,7 +2576,7 @@
     }
 
   /* Clear IT.  */
-  bzero (it, sizeof *it);
+  memset (it, 0, sizeof *it);
   it->current.overlay_string_index = -1;
   it->current.dpvec_index = -1;
   it->base_face_id = remapped_base_face_id;
@@ -2896,10 +2836,7 @@
 /* Initialize IT for the display of window W with window start POS.  */
 
 void
-start_display (it, w, pos)
-     struct it *it;
-     struct window *w;
-     struct text_pos pos;
+start_display (struct it *it, struct window *w, struct text_pos pos)
 {
   struct glyph_row *row;
   int first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
@@ -2971,9 +2908,7 @@
    text.  W is the window we display, for text property lookup.  */
 
 static int
-in_ellipses_for_invisible_text_p (pos, w)
-     struct display_pos *pos;
-     struct window *w;
+in_ellipses_for_invisible_text_p (struct display_pos *pos, struct window *w)
 {
   Lisp_Object prop, window;
   int ellipses_p = 0;
@@ -3007,10 +2942,7 @@
    is zero if there are overlay strings with newlines at POS.  */
 
 static int
-init_from_display_pos (it, w, pos)
-     struct it *it;
-     struct window *w;
-     struct display_pos *pos;
+init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos)
 {
   EMACS_INT charpos = CHARPOS (pos->pos), bytepos = BYTEPOS (pos->pos);
   int i, overlay_strings_with_newlines = 0;
@@ -3118,10 +3050,7 @@
    starting at ROW->start.  */
 
 static void
-init_to_row_start (it, w, row)
-     struct it *it;
-     struct window *w;
-     struct glyph_row *row;
+init_to_row_start (struct it *it, struct window *w, struct glyph_row *row)
 {
   init_from_display_pos (it, w, &row->start);
   it->start = row->start;
@@ -3136,10 +3065,7 @@
    end position.  */
 
 static int
-init_to_row_end (it, w, row)
-     struct it *it;
-     struct window *w;
-     struct glyph_row *row;
+init_to_row_end (struct it *it, struct window *w, struct glyph_row *row)
 {
   int success = 0;
 
@@ -3167,8 +3093,7 @@
    to stop.  */
 
 static void
-handle_stop (it)
-     struct it *it;
+handle_stop (struct it *it)
 {
   enum prop_handled handled;
   int handle_overlay_change_p;
@@ -3261,8 +3186,7 @@
    information for IT's current position.  */
 
 static void
-compute_stop_pos (it)
-     struct it *it;
+compute_stop_pos (struct it *it)
 {
   register INTERVAL iv, next_iv;
   Lisp_Object object, limit, position;
@@ -3371,8 +3295,7 @@
    xmalloc.  */
 
 static EMACS_INT
-next_overlay_change (pos)
-     EMACS_INT pos;
+next_overlay_change (EMACS_INT pos)
 {
   int noverlays;
   EMACS_INT endpos;
@@ -3408,8 +3331,7 @@
    regions of text.  */
 
 static enum prop_handled
-handle_fontified_prop (it)
-     struct it *it;
+handle_fontified_prop (struct it *it)
 {
   Lisp_Object prop, pos;
   enum prop_handled handled = HANDLED_NORMALLY;
@@ -3496,8 +3418,7 @@
    Called from handle_stop.  */
 
 static enum prop_handled
-handle_face_prop (it)
-     struct it *it;
+handle_face_prop (struct it *it)
 {
   int new_face_id;
   EMACS_INT next_stop;
@@ -3635,8 +3556,7 @@
    Otherwise, use the iterator's base_face_id.  */
 
 static int
-underlying_face_id (it)
-     struct it *it;
+underlying_face_id (struct it *it)
 {
   int face_id = it->base_face_id, i;
 
@@ -3655,9 +3575,7 @@
    position.  Value is the id of the face.  */
 
 static int
-face_before_or_after_it_pos (it, before_p)
-     struct it *it;
-     int before_p;
+face_before_or_after_it_pos (struct it *it, int before_p)
 {
   int face_id, limit;
   EMACS_INT next_check_charpos;
@@ -3771,8 +3689,7 @@
    position.  Called from handle_stop.  */
 
 static enum prop_handled
-handle_invisible_prop (it)
-     struct it *it;
+handle_invisible_prop (struct it *it)
 {
   enum prop_handled handled = HANDLED_NORMALLY;
 
@@ -3985,9 +3902,7 @@
    Replaces LEN characters from buffer.  */
 
 static void
-setup_for_ellipsis (it, len)
-     struct it *it;
-     int len;
+setup_for_ellipsis (struct it *it, int len)
 {
   /* Use the display table definition for `...'.  Invalid glyphs
      will be handled by the method returning elements from dpvec.  */
@@ -4031,8 +3946,7 @@
    Otherwise we return HANDLED_NORMALLY.  */
 
 static enum prop_handled
-handle_display_prop (it)
-     struct it *it;
+handle_display_prop (struct it *it)
 {
   Lisp_Object prop, object, overlay;
   struct text_pos *position;
@@ -4129,10 +4043,7 @@
    at START_POS in OBJECT.  */
 
 static struct text_pos
-display_prop_end (it, object, start_pos)
-     struct it *it;
-     Lisp_Object object;
-     struct text_pos start_pos;
+display_prop_end (struct it *it, Lisp_Object object, struct text_pos start_pos)
 {
   Lisp_Object end;
   struct text_pos end_pos;
@@ -4539,8 +4450,7 @@
    treated as intangible.  */
 
 static int
-single_display_spec_intangible_p (prop)
-     Lisp_Object prop;
+single_display_spec_intangible_p (Lisp_Object prop)
 {
   /* Skip over `when FORM'.  */
   if (CONSP (prop) && EQ (XCAR (prop), Qwhen))
@@ -4582,8 +4492,7 @@
    treated as intangible.  */
 
 int
-display_prop_intangible_p (prop)
-     Lisp_Object prop;
+display_prop_intangible_p (Lisp_Object prop)
 {
   if (CONSP (prop)
       && CONSP (XCAR (prop))
@@ -4615,8 +4524,7 @@
 /* Return 1 if PROP is a display sub-property value containing STRING.  */
 
 static int
-single_display_spec_string_p (prop, string)
-     Lisp_Object prop, string;
+single_display_spec_string_p (Lisp_Object prop, Lisp_Object string)
 {
   if (EQ (string, prop))
     return 1;
@@ -4650,8 +4558,7 @@
 /* Return 1 if STRING appears in the `display' property PROP.  */
 
 static int
-display_prop_string_p (prop, string)
-     Lisp_Object prop, string;
+display_prop_string_p (Lisp_Object prop, Lisp_Object string)
 {
   if (CONSP (prop)
       && CONSP (XCAR (prop))
@@ -4692,11 +4599,8 @@
    called asynchronously from note_mouse_highlight.  */
 
 static EMACS_INT
-string_buffer_position_lim (w, string, from, to, back_p)
-     struct window *w;
-     Lisp_Object string;
-     EMACS_INT from, to;
-     int back_p;
+string_buffer_position_lim (struct window *w, Lisp_Object string,
+			    EMACS_INT from, EMACS_INT to, int back_p)
 {
   Lisp_Object limit, prop, pos;
   int found = 0;
@@ -4745,10 +4649,7 @@
    called asynchronously from note_mouse_highlight.  */
 
 EMACS_INT
-string_buffer_position (w, string, around_charpos)
-     struct window *w;
-     Lisp_Object string;
-     EMACS_INT around_charpos;
+string_buffer_position (struct window *w, Lisp_Object string, EMACS_INT around_charpos)
 {
   Lisp_Object limit, prop, pos;
   const int MAX_DISTANCE = 1000;
@@ -4772,8 +4673,7 @@
    position.  Called from handle_stop.  */
 
 static enum prop_handled
-handle_composition_prop (it)
-     struct it *it;
+handle_composition_prop (struct it *it)
 {
   Lisp_Object prop, string;
   EMACS_INT pos, pos_byte, start, end;
@@ -4846,8 +4746,7 @@
    Called from handle_stop.  */
 
 static enum prop_handled
-handle_overlay_change (it)
-     struct it *it;
+handle_overlay_change (struct it *it)
 {
   if (!STRINGP (it->string) && get_overlay_strings (it, 0))
     return HANDLED_RECOMPUTE_PROPS;
@@ -4864,8 +4763,7 @@
    Otherwise IT->string is set to nil.  */
 
 static void
-next_overlay_string (it)
-     struct it *it;
+next_overlay_string (struct it *it)
 {
   ++it->current.overlay_string_index;
   if (it->current.overlay_string_index == it->n_overlay_strings)
@@ -4933,8 +4831,7 @@
 
 
 static int
-compare_overlay_entries (e1, e2)
-     void *e1, *e2;
+compare_overlay_entries (const void *e1, const void *e2)
 {
   struct overlay_entry *entry1 = (struct overlay_entry *) e1;
   struct overlay_entry *entry2 = (struct overlay_entry *) e2;
@@ -4985,9 +4882,7 @@
    compare_overlay_entries.  */
 
 static void
-load_overlay_strings (it, charpos)
-     struct it *it;
-     int charpos;
+load_overlay_strings (struct it *it, int charpos)
 {
   extern Lisp_Object Qwindow, Qpriority;
   Lisp_Object overlay, window, str, invisible;
@@ -5017,7 +4912,7 @@
 	  entries =							\
             (struct overlay_entry *) alloca (new_size			\
 					     * sizeof *entries);	\
-	  bcopy (old, entries, size * sizeof *entries);			\
+	  memcpy (entries, old, size * sizeof *entries);		\
 	  size = new_size;						\
 	}								\
 									\
@@ -5138,10 +5033,7 @@
    least one overlay string was found.  */
 
 static int
-get_overlay_strings_1 (it, charpos, compute_stop_p)
-     struct it *it;
-     int charpos;
-     int compute_stop_p;
+get_overlay_strings_1 (struct it *it, int charpos, int compute_stop_p)
 {
   /* Get the first OVERLAY_STRING_CHUNK_SIZE overlay strings to
      process.  This fills IT->overlay_strings with strings, and sets
@@ -5192,9 +5084,7 @@
 }
 
 static int
-get_overlay_strings (it, charpos)
-     struct it *it;
-     int charpos;
+get_overlay_strings (struct it *it, int charpos)
 {
   it->string = Qnil;
   it->method = GET_FROM_BUFFER;
@@ -5219,8 +5109,7 @@
    processed.  */
 
 static void
-push_it (it)
-     struct it *it;
+push_it (struct it *it)
 {
   struct iterator_stack_entry *p;
 
@@ -5264,8 +5153,7 @@
 }
 
 static void
-iterate_out_of_display_property (it)
-     struct it *it;
+iterate_out_of_display_property (struct it *it)
 {
   /* Maybe initialize paragraph direction.  If we are at the beginning
      of a new paragraph, next_element_from_buffer may not have a
@@ -5298,8 +5186,7 @@
    elements from an overlay string, or from a buffer.  */
 
 static void
-pop_it (it)
-     struct it *it;
+pop_it (struct it *it)
 {
   struct iterator_stack_entry *p;
 
@@ -5378,8 +5265,7 @@
 /* Set IT's current position to the previous line start.  */
 
 static void
-back_to_previous_line_start (it)
-     struct it *it;
+back_to_previous_line_start (struct it *it)
 {
   IT_CHARPOS (*it) = find_next_newline_no_quit (IT_CHARPOS (*it) - 1, -1);
   IT_BYTEPOS (*it) = CHAR_TO_BYTE (IT_CHARPOS (*it));
@@ -5405,9 +5291,7 @@
    leads to wrong cursor motion.  */
 
 static int
-forward_to_next_line_start (it, skipped_p)
-     struct it *it;
-     int *skipped_p;
+forward_to_next_line_start (struct it *it, int *skipped_p)
 {
   int old_selective, newline_found_p, n;
   const int MAX_NEWLINE_DISTANCE = 500;
@@ -5488,8 +5372,7 @@
    IT->hpos.  */
 
 static void
-back_to_previous_visible_line_start (it)
-     struct it *it;
+back_to_previous_visible_line_start (struct it *it)
 {
   while (IT_CHARPOS (*it) > BEGV)
     {
@@ -5569,8 +5452,7 @@
    face information etc.  */
 
 void
-reseat_at_previous_visible_line_start (it)
-     struct it *it;
+reseat_at_previous_visible_line_start (struct it *it)
 {
   back_to_previous_visible_line_start (it);
   reseat (it, it->current.pos, 1);
@@ -5586,9 +5468,7 @@
    is invisible because of text properties.  */
 
 static void
-reseat_at_next_visible_line_start (it, on_newline_p)
-     struct it *it;
-     int on_newline_p;
+reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
 {
   int newline_found_p, skipped_p = 0;
 
@@ -5642,10 +5522,7 @@
    IT->check_charpos of a property.  */
 
 static void
-reseat (it, pos, force_p)
-     struct it *it;
-     struct text_pos pos;
-     int force_p;
+reseat (struct it *it, struct text_pos pos, int force_p)
 {
   int original_pos = IT_CHARPOS (*it);
 
@@ -5689,10 +5566,7 @@
    IT->stop_pos to POS, also.  */
 
 static void
-reseat_1 (it, pos, set_stop_p)
-     struct it *it;
-     struct text_pos pos;
-     int set_stop_p;
+reseat_1 (struct it *it, struct text_pos pos, int set_stop_p)
 {
   /* Don't call this function when scanning a C string.  */
   xassert (it->s == NULL);
@@ -5746,12 +5620,8 @@
    calling this function.  */
 
 static void
-reseat_to_string (it, s, string, charpos, precision, field_width, multibyte)
-     struct it *it;
-     unsigned char *s;
-     Lisp_Object string;
-     int charpos;
-     int precision, field_width, multibyte;
+reseat_to_string (struct it *it, unsigned char *s, Lisp_Object string,
+		  int charpos, int precision, int field_width, int multibyte)
 {
   /* No region in strings.  */
   it->region_beg_charpos = it->region_end_charpos = -1;
@@ -5760,7 +5630,7 @@
   it->stop_charpos = -1;
 
   /* Set iterator position and end position.  */
-  bzero (&it->current, sizeof it->current);
+  memset (&it->current, 0, sizeof it->current);
   it->current.overlay_string_index = -1;
   it->current.dpvec_index = -1;
   xassert (charpos >= 0);
@@ -5839,7 +5709,7 @@
 
 /* Map enum it_method value to corresponding next_element_from_* function.  */
 
-static int (* get_next_element[NUM_IT_METHODS]) P_ ((struct it *it)) =
+static int (* get_next_element[NUM_IT_METHODS]) (struct it *it) =
 {
   next_element_from_buffer,
   next_element_from_display_vector,
@@ -5873,8 +5743,7 @@
 static int last_escape_glyph_merged_face_id = 0;
 
 int
-get_next_display_element (it)
-     struct it *it;
+get_next_display_element (struct it *it)
 {
   /* Non-zero means that we found a display element.  Zero means that
      we hit the end of what we iterate over.  Performance note: the
@@ -6266,9 +6135,7 @@
    decrement position function which would not be easy to write.  */
 
 void
-set_iterator_to_next (it, reseat_p)
-     struct it *it;
-     int reseat_p;
+set_iterator_to_next (struct it *it, int reseat_p)
 {
   /* Reset flags indicating start and end of a sequence of characters
      with box.  Reset them at the start of this function because
@@ -6533,8 +6400,7 @@
    is restored into IT->face_id in set_iterator_to_next.  */
 
 static int
-next_element_from_display_vector (it)
-     struct it *it;
+next_element_from_display_vector (struct it *it)
 {
   Lisp_Object gc;
 
@@ -6583,8 +6449,7 @@
    overlay string.  */
 
 static int
-next_element_from_string (it)
-     struct it *it;
+next_element_from_string (struct it *it)
 {
   struct text_pos position;
 
@@ -6685,8 +6550,7 @@
    reached, including padding spaces.  */
 
 static int
-next_element_from_c_string (it)
-     struct it *it;
+next_element_from_c_string (struct it *it)
 {
   int success_p = 1;
 
@@ -6731,8 +6595,7 @@
    ellipsis if an ellipsis is to be displayed.  */
 
 static int
-next_element_from_ellipsis (it)
-     struct it *it;
+next_element_from_ellipsis (struct it *it)
 {
   if (it->selective_display_ellipsis_p)
     setup_for_ellipsis (it, it->len);
@@ -6759,8 +6622,7 @@
 
 
 static int
-next_element_from_image (it)
-     struct it *it;
+next_element_from_image (struct it *it)
 {
   it->what = IT_IMAGE;
   return 1;
@@ -6772,8 +6634,7 @@
    always 1.  */
 
 static int
-next_element_from_stretch (it)
-     struct it *it;
+next_element_from_stretch (struct it *it)
 {
   it->what = IT_STRETCH;
   return 1;
@@ -6788,9 +6649,7 @@
    position.  */
 
 static void
-handle_stop_backwards (it, charpos)
-     struct it *it;
-     EMACS_INT charpos;
+handle_stop_backwards (struct it *it, EMACS_INT charpos)
 {
   EMACS_INT where_we_are = IT_CHARPOS (*it);
   struct display_pos save_current = it->current;
@@ -6828,8 +6687,7 @@
    end.  */
 
 static int
-next_element_from_buffer (it)
-     struct it *it;
+next_element_from_buffer (struct it *it)
 {
   int success_p = 1;
 
@@ -7038,8 +6896,7 @@
 /* Run the redisplay end trigger hook for IT.  */
 
 static void
-run_redisplay_end_trigger_hook (it)
-     struct it *it;
+run_redisplay_end_trigger_hook (struct it *it)
 {
   Lisp_Object args[3];
 
@@ -7069,8 +6926,7 @@
    next_element_from_string when necessary.  */
 
 static int
-next_element_from_composition (it)
-     struct it *it;
+next_element_from_composition (struct it *it)
 {
   it->what = IT_COMPOSITION;
   it->len = it->cmp_it.nbytes;
@@ -7593,10 +7449,7 @@
    TO_CHARPOS.  */
 
 void
-move_it_to (it, to_charpos, to_x, to_y, to_vpos, op)
-     struct it *it;
-     int to_charpos, to_x, to_y, to_vpos;
-     int op;
+move_it_to (struct it *it, int to_charpos, int to_x, int to_y, int to_vpos, int op)
 {
   enum move_it_result skip, skip2 = MOVE_X_REACHED;
   int line_height, line_start_x = 0, reached = 0;
@@ -7847,9 +7700,7 @@
    set to the top of the line moved to.  */
 
 void
-move_it_vertically_backward (it, dy)
-     struct it *it;
-     int dy;
+move_it_vertically_backward (struct it *it, int dy)
 {
   int nlines, h;
   struct it it2, it3;
@@ -7968,9 +7819,7 @@
    end, IT will be on the start of a screen line.  */
 
 void
-move_it_vertically (it, dy)
-    struct it *it;
-    int dy;
+move_it_vertically (struct it *it, int dy)
 {
   if (dy <= 0)
     move_it_vertically_backward (it, -dy);
@@ -7994,8 +7843,7 @@
 /* Move iterator IT past the end of the text line it is in.  */
 
 void
-move_it_past_eol (it)
-     struct it *it;
+move_it_past_eol (struct it *it)
 {
   enum move_it_result rc;
 
@@ -8015,9 +7863,7 @@
    truncate-lines nil.  */
 
 void
-move_it_by_lines (it, dvpos, need_y_p)
-     struct it *it;
-     int dvpos, need_y_p;
+move_it_by_lines (struct it *it, int dvpos, int need_y_p)
 {
   struct position pos;
 
@@ -8111,8 +7957,7 @@
 /* Return 1 if IT points into the middle of a display vector.  */
 
 int
-in_display_vector_p (it)
-     struct it *it;
+in_display_vector_p (struct it *it)
 {
   return (it->method == GET_FROM_DISPLAY_VECTOR
 	  && it->current.dpvec_index > 0
@@ -8129,9 +7974,7 @@
    to *Messages*.  */
 
 void
-add_to_log (format, arg1, arg2)
-     char *format;
-     Lisp_Object arg1, arg2;
+add_to_log (char *format, Lisp_Object arg1, Lisp_Object arg2)
 {
   Lisp_Object args[3];
   Lisp_Object msg, fmt;
@@ -8156,7 +7999,7 @@
 
   len = SBYTES (msg) + 1;
   SAFE_ALLOCA (buffer, char *, len);
-  bcopy (SDATA (msg), buffer, len);
+  memcpy (buffer, SDATA (msg), len);
 
   message_dolog (buffer, len - 1, 1, 0);
   SAFE_FREE ();
@@ -8168,7 +8011,7 @@
 /* Output a newline in the *Messages* buffer if "needs" one.  */
 
 void
-message_log_maybe_newline ()
+message_log_maybe_newline (void)
 {
   if (message_log_need_newline)
     message_dolog ("", 0, 1, 0);
@@ -8185,9 +8028,7 @@
    so the buffer M must NOT point to a Lisp string.  */
 
 void
-message_dolog (m, nbytes, nlflag, multibyte)
-     const char *m;
-     int nbytes, nlflag, multibyte;
+message_dolog (const char *m, int nbytes, int nlflag, int multibyte)
 {
   if (!NILP (Vmemory_full))
     return;
@@ -8357,9 +8198,8 @@
    value N > 1 if we should also append " [N times]".  */
 
 static int
-message_log_check_duplicate (prev_bol, prev_bol_byte, this_bol, this_bol_byte)
-     int prev_bol, this_bol;
-     int prev_bol_byte, this_bol_byte;
+message_log_check_duplicate (int prev_bol, int prev_bol_byte,
+			     int this_bol, int this_bol_byte)
 {
   int i;
   int len = Z_BYTE - 1 - this_bol_byte;
@@ -8397,10 +8237,7 @@
    This may GC, so the buffer M must NOT point to a Lisp string.  */
 
 void
-message2 (m, nbytes, multibyte)
-     const char *m;
-     int nbytes;
-     int multibyte;
+message2 (const char *m, int nbytes, int multibyte)
 {
   /* First flush out any partial line written with print.  */
   message_log_maybe_newline ();
@@ -8413,9 +8250,7 @@
 /* The non-logging counterpart of message2.  */
 
 void
-message2_nolog (m, nbytes, multibyte)
-     const char *m;
-     int nbytes, multibyte;
+message2_nolog (const char *m, int nbytes, int multibyte)
 {
   struct frame *sf = SELECTED_FRAME ();
   message_enable_multibyte = multibyte;
@@ -8477,10 +8312,7 @@
    This function cancels echoing.  */
 
 void
-message3 (m, nbytes, multibyte)
-     Lisp_Object m;
-     int nbytes;
-     int multibyte;
+message3 (Lisp_Object m, int nbytes, int multibyte)
 {
   struct gcpro gcpro1;
 
@@ -8496,7 +8328,7 @@
       USE_SAFE_ALLOCA;
 
       SAFE_ALLOCA (buffer, char *, nbytes);
-      bcopy (SDATA (m), buffer, nbytes);
+      memcpy (buffer, SDATA (m), nbytes);
       message_dolog (buffer, nbytes, 1, multibyte);
       SAFE_FREE ();
     }
@@ -8512,9 +8344,7 @@
    and make this cancel echoing.  */
 
 void
-message3_nolog (m, nbytes, multibyte)
-     Lisp_Object m;
-     int nbytes, multibyte;
+message3_nolog (Lisp_Object m, int nbytes, int multibyte)
 {
   struct frame *sf = SELECTED_FRAME ();
   message_enable_multibyte = multibyte;
@@ -8582,8 +8412,7 @@
    that was alloca'd.  */
 
 void
-message1 (m)
-     char *m;
+message1 (char *m)
 {
   message2 (m, (m ? strlen (m) : 0), 0);
 }
@@ -8592,8 +8421,7 @@
 /* The non-logging counterpart of message1.  */
 
 void
-message1_nolog (m)
-     char *m;
+message1_nolog (char *m)
 {
   message2_nolog (m, (m ? strlen (m) : 0), 0);
 }
@@ -8602,10 +8430,7 @@
    which gets replaced with STRING.  */
 
 void
-message_with_string (m, string, log)
-     char *m;
-     Lisp_Object string;
-     int log;
+message_with_string (char *m, Lisp_Object string, int log)
 {
   CHECK_STRING (string);
 
@@ -8670,9 +8495,7 @@
 
 /* VARARGS 1 */
 void
-message (m, a1, a2, a3)
-     char *m;
-     EMACS_INT a1, a2, a3;
+message (char *m, EMACS_INT a1, EMACS_INT a2, EMACS_INT a3)
 {
   if (noninteractive)
     {
@@ -8733,9 +8556,7 @@
 /* The non-logging version of message.  */
 
 void
-message_nolog (m, a1, a2, a3)
-     char *m;
-     EMACS_INT a1, a2, a3;
+message_nolog (char *m, EMACS_INT a1, EMACS_INT a2, EMACS_INT a3)
 {
   Lisp_Object old_log_max;
   old_log_max = Vmessage_log_max;
@@ -8750,7 +8571,7 @@
    critical.  */
 
 void
-update_echo_area ()
+update_echo_area (void)
 {
   if (!NILP (echo_area_buffer[0]))
     {
@@ -8766,7 +8587,7 @@
    If they aren't, make new ones.  */
 
 static void
-ensure_echo_area_buffers ()
+ensure_echo_area_buffers (void)
 {
   int i;
 
@@ -8810,13 +8631,9 @@
    Value is what FN returns.  */
 
 static int
-with_echo_area_buffer (w, which, fn, a1, a2, a3, a4)
-     struct window *w;
-     int which;
-     int (*fn) P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
-     EMACS_INT a1;
-     Lisp_Object a2;
-     EMACS_INT a3, a4;
+with_echo_area_buffer (struct window *w, int which,
+		       int (*fn) (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT),
+		       EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
 {
   Lisp_Object buffer;
   int this_one, the_other, clear_buffer_p, rc;
@@ -8903,8 +8720,7 @@
    FN called in with_echo_area_buffer.  */
 
 static Lisp_Object
-with_echo_area_buffer_unwind_data (w)
-     struct window *w;
+with_echo_area_buffer_unwind_data (struct window *w)
 {
   int i = 0;
   Lisp_Object vector, tmp;
@@ -8944,8 +8760,7 @@
    with_echo_area_buffer_unwind_data.  */
 
 static Lisp_Object
-unwind_with_echo_area_buffer (vector)
-     Lisp_Object vector;
+unwind_with_echo_area_buffer (Lisp_Object vector)
 {
   set_buffer_internal_1 (XBUFFER (AREF (vector, 0)));
   Vdeactivate_mark = AREF (vector, 1);
@@ -8975,8 +8790,7 @@
    non-zero means we will print multibyte.  */
 
 void
-setup_echo_area_for_printing (multibyte_p)
-     int multibyte_p;
+setup_echo_area_for_printing (int multibyte_p)
 {
   /* If we can't find an echo area any more, exit.  */
   if (! FRAME_LIVE_P (XFRAME (selected_frame)))
@@ -9050,8 +8864,7 @@
    display the current message.  */
 
 static int
-display_echo_area (w)
-     struct window *w;
+display_echo_area (struct window *w)
 {
   int i, no_message_p, window_height_changed_p, count;
 
@@ -9089,10 +8902,7 @@
    Value is non-zero if height of W was changed.  */
 
 static int
-display_echo_area_1 (a1, a2, a3, a4)
-     EMACS_INT a1;
-     Lisp_Object a2;
-     EMACS_INT a3, a4;
+display_echo_area_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
 {
   struct window *w = (struct window *) a1;
   Lisp_Object window;
@@ -9121,7 +8931,7 @@
    is active, don't shrink it.  */
 
 void
-resize_echo_area_exactly ()
+resize_echo_area_exactly (void)
 {
   if (BUFFERP (echo_area_buffer[0])
       && WINDOWP (echo_area_window))
@@ -9154,10 +8964,7 @@
    resize_mini_window returns.  */
 
 static int
-resize_mini_window_1 (a1, exactly, a3, a4)
-     EMACS_INT a1;
-     Lisp_Object exactly;
-     EMACS_INT a3, a4;
+resize_mini_window_1 (EMACS_INT a1, Lisp_Object exactly, EMACS_INT a3, EMACS_INT a4)
 {
   return resize_mini_window ((struct window *) a1, !NILP (exactly));
 }
@@ -9175,9 +8982,7 @@
    Value is non-zero if the window height has been changed.  */
 
 int
-resize_mini_window (w, exact_p)
-     struct window *w;
-     int exact_p;
+resize_mini_window (struct window *w, int exact_p)
 {
   struct frame *f = XFRAME (w->frame);
   int window_height_changed_p = 0;
@@ -9318,7 +9123,7 @@
    current message.  */
 
 Lisp_Object
-current_message ()
+current_message (void)
 {
   Lisp_Object msg;
 
@@ -9337,10 +9142,7 @@
 
 
 static int
-current_message_1 (a1, a2, a3, a4)
-     EMACS_INT a1;
-     Lisp_Object a2;
-     EMACS_INT a3, a4;
+current_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
 {
   Lisp_Object *msg = (Lisp_Object *) a1;
 
@@ -9358,7 +9160,7 @@
    worth optimizing.  */
 
 int
-push_message ()
+push_message (void)
 {
   Lisp_Object msg;
   msg = current_message ();
@@ -9370,7 +9172,7 @@
 /* Restore message display from the top of Vmessage_stack.  */
 
 void
-restore_message ()
+restore_message (void)
 {
   Lisp_Object msg;
 
@@ -9386,8 +9188,7 @@
 /* Handler for record_unwind_protect calling pop_message.  */
 
 Lisp_Object
-pop_message_unwind (dummy)
-     Lisp_Object dummy;
+pop_message_unwind (Lisp_Object dummy)
 {
   pop_message ();
   return Qnil;
@@ -9396,7 +9197,7 @@
 /* Pop the top-most entry off Vmessage_stack.  */
 
 void
-pop_message ()
+pop_message (void)
 {
   xassert (CONSP (Vmessage_stack));
   Vmessage_stack = XCDR (Vmessage_stack);
@@ -9408,7 +9209,7 @@
    somewhere.  */
 
 void
-check_message_stack ()
+check_message_stack (void)
 {
   if (!NILP (Vmessage_stack))
     abort ();
@@ -9419,8 +9220,7 @@
    time we display it---but don't redisplay it now.  */
 
 void
-truncate_echo_area (nchars)
-     int nchars;
+truncate_echo_area (int nchars)
 {
   if (nchars == 0)
     echo_area_buffer[0] = Qnil;
@@ -9442,10 +9242,7 @@
    message to at most NCHARS characters.  */
 
 static int
-truncate_message_1 (nchars, a2, a3, a4)
-     EMACS_INT nchars;
-     Lisp_Object a2;
-     EMACS_INT a3, a4;
+truncate_message_1 (EMACS_INT nchars, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
 {
   if (BEG + nchars < Z)
     del_range (BEG + nchars, Z);
@@ -9470,10 +9267,7 @@
   */
 
 void
-set_message (s, string, nbytes, multibyte_p)
-     const char *s;
-     Lisp_Object string;
-     int nbytes, multibyte_p;
+set_message (const char *s, Lisp_Object string, int nbytes, int multibyte_p)
 {
   message_enable_multibyte
     = ((s && multibyte_p)
@@ -9492,10 +9286,7 @@
    current.  */
 
 static int
-set_message_1 (a1, a2, nbytes, multibyte_p)
-     EMACS_INT a1;
-     Lisp_Object a2;
-     EMACS_INT nbytes, multibyte_p;
+set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multibyte_p)
 {
   const char *s = (const char *) a1;
   Lisp_Object string = a2;
@@ -9574,8 +9365,7 @@
    last displayed.  */
 
 void
-clear_message (current_p, last_displayed_p)
-     int current_p, last_displayed_p;
+clear_message (int current_p, int last_displayed_p)
 {
   if (current_p)
     {
@@ -9599,7 +9389,7 @@
    and ensure a complete redisplay of all windows.  */
 
 static void
-clear_garbaged_frames ()
+clear_garbaged_frames (void)
 {
   if (frame_garbaged)
     {
@@ -9636,8 +9426,7 @@
    mini-windows height has been changed.  */
 
 static int
-echo_area_display (update_frame_p)
-     int update_frame_p;
+echo_area_display (int update_frame_p)
 {
   Lisp_Object mini_window;
   struct window *w;
@@ -9812,8 +9601,7 @@
 }
 
 static Lisp_Object
-unwind_format_mode_line (vector)
-     Lisp_Object vector;
+unwind_format_mode_line (Lisp_Object vector)
 {
   mode_line_target = XINT (AREF (vector, 0));
   mode_line_noprop_ptr = mode_line_noprop_buf + XINT (AREF (vector, 1));
@@ -9842,12 +9630,7 @@
    Re-allocate mode_line_noprop_buf if necessary.  */
 
 static void
-#ifdef PROTOTYPES
 store_mode_line_noprop_char (char c)
-#else
-store_mode_line_noprop_char (c)
-    char c;
-#endif
 {
   /* If output position has reached the end of the allocated buffer,
      double the buffer's size.  */
@@ -9873,9 +9656,7 @@
    frame title.  */
 
 static int
-store_mode_line_noprop (str, field_width, precision)
-     const unsigned char *str;
-     int field_width, precision;
+store_mode_line_noprop (const unsigned char *str, int field_width, int precision)
 {
   int n = 0;
   int dummy, nbytes;
@@ -9908,8 +9689,7 @@
    frame_title_format.  */
 
 static void
-x_consider_frame_title (frame)
-     Lisp_Object frame;
+x_consider_frame_title (Lisp_Object frame)
 {
   struct frame *f = XFRAME (frame);
 
@@ -9969,7 +9749,7 @@
 	 higher level than this.)  */
       if (! STRINGP (f->name)
 	  || SBYTES (f->name) != len
-	  || bcmp (title, SDATA (f->name), len) != 0)
+	  || memcmp (title, SDATA (f->name), len) != 0)
 	x_implicitly_set_name (f, make_string (title, len), Qnil);
     }
 }
@@ -9988,7 +9768,7 @@
    appropriate.  This can call eval.  */
 
 void
-prepare_menu_bars ()
+prepare_menu_bars (void)
 {
   int all_windows;
   struct gcpro gcpro1, gcpro2;
@@ -10107,10 +9887,7 @@
    updated value of this flag, to pass to the next call.  */
 
 static int
-update_menu_bar (f, save_match_data, hooks_run)
-     struct frame *f;
-     int save_match_data;
-     int hooks_run;
+update_menu_bar (struct frame *f, int save_match_data, int hooks_run)
 {
   Lisp_Object window;
   register struct window *w;
@@ -10235,8 +10012,7 @@
    positions are relative to updated_window.  */
 
 void
-set_output_cursor (cursor)
-    struct cursor_pos *cursor;
+set_output_cursor (struct cursor_pos *cursor)
 {
   output_cursor.hpos = cursor->hpos;
   output_cursor.vpos = cursor->vpos;
@@ -10257,8 +10033,7 @@
    selected_window and display the cursor at the given position.  */
 
 void
-x_cursor_to (vpos, hpos, y, x)
-     int vpos, hpos, y, x;
+x_cursor_to (int vpos, int hpos, int y, int x)
 {
   struct window *w;
 
@@ -10306,8 +10081,7 @@
 
 
 static Lisp_Object
-update_tool_bar_unwind (frame)
-     Lisp_Object frame;
+update_tool_bar_unwind (Lisp_Object frame)
 {
   selected_frame = frame;
   return Qnil;
@@ -10319,9 +10093,7 @@
    and restore it here.  */
 
 static void
-update_tool_bar (f, save_match_data)
-     struct frame *f;
-     int save_match_data;
+update_tool_bar (struct frame *f, int save_match_data)
 {
 #if defined (USE_GTK) || defined (HAVE_NS)
   int do_update = FRAME_EXTERNAL_TOOL_BAR (f);
@@ -10419,8 +10191,7 @@
    been set up previously by calling prepare_menu_bars.  */
 
 static void
-build_desired_tool_bar_string (f)
-     struct frame *f;
+build_desired_tool_bar_string (struct frame *f)
 {
   int i, size, size_needed;
   struct gcpro gcpro1, gcpro2, gcpro3;
@@ -10591,9 +10362,7 @@
 */
 
 static void
-display_tool_bar_line (it, height)
-     struct it *it;
-     int height;
+display_tool_bar_line (struct it *it, int height)
 {
   struct glyph_row *row = it->glyph_row;
   int max_x = it->last_visible_x;
@@ -10720,9 +10489,7 @@
    returned in *N_ROWS if non-NULL.  */
 
 static int
-tool_bar_lines_needed (f, n_rows)
-     struct frame *f;
-     int *n_rows;
+tool_bar_lines_needed (struct frame *f, int *n_rows)
 {
   struct window *w = XWINDOW (f->tool_bar_window);
   struct it it;
@@ -10790,8 +10557,7 @@
    height should be changed.  */
 
 static int
-redisplay_tool_bar (f)
-     struct frame *f;
+redisplay_tool_bar (struct frame *f)
 {
   struct window *w;
   struct it it;
@@ -10962,10 +10728,7 @@
    GLYPH doesn't display a tool-bar item.  */
 
 static int
-tool_bar_item_info (f, glyph, prop_idx)
-     struct frame *f;
-     struct glyph *glyph;
-     int *prop_idx;
+tool_bar_item_info (struct frame *f, struct glyph *glyph, int *prop_idx)
 {
   Lisp_Object prop;
   int success_p;
@@ -11005,11 +10768,8 @@
    1	otherwise.  */
 
 static int
-get_tool_bar_item (f, x, y, glyph, hpos, vpos, prop_idx)
-     struct frame *f;
-     int x, y;
-     struct glyph **glyph;
-     int *hpos, *vpos, *prop_idx;
+get_tool_bar_item (struct frame *f, int x, int y, struct glyph **glyph,
+		   int *hpos, int *vpos, int *prop_idx)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   struct window *w = XWINDOW (f->tool_bar_window);
@@ -11047,10 +10807,8 @@
    release.  */
 
 void
-handle_tool_bar_click (f, x, y, down_p, modifiers)
-     struct frame *f;
-     int x, y, down_p;
-     unsigned int modifiers;
+handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
+		       unsigned int modifiers)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   struct window *w = XWINDOW (f->tool_bar_window);
@@ -11108,9 +10866,7 @@
    note_mouse_highlight.  */
 
 static void
-note_tool_bar_highlight (f, x, y)
-     struct frame *f;
-     int x, y;
+note_tool_bar_highlight (struct frame *f, int x, int y)
 {
   Lisp_Object window = f->tool_bar_window;
   struct window *w = XWINDOW (window);
@@ -11204,8 +10960,8 @@
 			 Horizontal scrolling
  ************************************************************************/
 
-static int hscroll_window_tree P_ ((Lisp_Object));
-static int hscroll_windows P_ ((Lisp_Object));
+static int hscroll_window_tree (Lisp_Object);
+static int hscroll_windows (Lisp_Object);
 
 /* For all leaf windows in the window tree rooted at WINDOW, set their
    hscroll value so that PT is (i) visible in the window, and (ii) so
@@ -11214,8 +10970,7 @@
    changed.  */
 
 static int
-hscroll_window_tree (window)
-     Lisp_Object window;
+hscroll_window_tree (Lisp_Object window)
 {
   int hscrolled_p = 0;
   int hscroll_relative_p = FLOATP (Vhscroll_step);
@@ -11358,8 +11113,7 @@
    of WINDOW are cleared.  */
 
 static int
-hscroll_windows (window)
-     Lisp_Object window;
+hscroll_windows (Lisp_Object window)
 {
   int hscrolled_p = hscroll_window_tree (window);
   if (hscrolled_p)
@@ -11442,9 +11196,7 @@
    redisplay_internal for display optimization.  */
 
 static INLINE int
-text_outside_line_unchanged_p (w, start, end)
-     struct window *w;
-     int start, end;
+text_outside_line_unchanged_p (struct window *w, int start, int end)
 {
   int unchanged_p = 1;
 
@@ -11511,15 +11263,14 @@
    mini-buffer if that is in use.  */
 
 void
-redisplay ()
+redisplay (void)
 {
   redisplay_internal (0);
 }
 
 
 static Lisp_Object
-overlay_arrow_string_or_property (var)
-     Lisp_Object var;
+overlay_arrow_string_or_property (Lisp_Object var)
 {
   Lisp_Object val;
 
@@ -11531,7 +11282,7 @@
 
 /* Return 1 if there are any overlay-arrows in current_buffer.  */
 static int
-overlay_arrow_in_current_buffer_p ()
+overlay_arrow_in_current_buffer_p (void)
 {
   Lisp_Object vlist;
 
@@ -11557,7 +11308,7 @@
    has changed.  */
 
 static int
-overlay_arrows_changed_p ()
+overlay_arrows_changed_p (void)
 {
   Lisp_Object vlist;
 
@@ -11585,8 +11336,7 @@
 /* Mark overlay arrows to be updated on next redisplay.  */
 
 static void
-update_overlay_arrows (up_to_date)
-     int up_to_date;
+update_overlay_arrows (int up_to_date)
 {
   Lisp_Object vlist;
 
@@ -11622,9 +11372,7 @@
    Return nil if no overlay arrow.  */
 
 static Lisp_Object
-overlay_arrow_at_row (it, row)
-     struct it *it;
-     struct glyph_row *row;
+overlay_arrow_at_row (struct it *it, struct glyph_row *row)
 {
   Lisp_Object vlist;
 
@@ -11669,9 +11417,8 @@
    position.  BUF and PT are the current point buffer and position.  */
 
 int
-check_point_in_composition (prev_buf, prev_pt, buf, pt)
-     struct buffer *prev_buf, *buf;
-     int prev_pt, pt;
+check_point_in_composition (struct buffer *prev_buf, int prev_pt,
+			    struct buffer *buf, int pt)
 {
   EMACS_INT start, end;
   Lisp_Object prop;
@@ -11707,9 +11454,7 @@
    in window W.  */
 
 static INLINE void
-reconsider_clip_changes (w, b)
-     struct window *w;
-     struct buffer *b;
+reconsider_clip_changes (struct window *w, struct buffer *b)
 {
   if (b->clip_changed
 	   && !NILP (w->window_end_valid)
@@ -11748,8 +11493,7 @@
    directly.  */
 
 static void
-select_frame_for_redisplay (frame)
-     Lisp_Object frame;
+select_frame_for_redisplay (Lisp_Object frame)
 {
   Lisp_Object tail, tem;
   Lisp_Object old = selected_frame;
@@ -11790,8 +11534,7 @@
    causes some problems.  */
 
 static void
-redisplay_internal (preserve_echo_area)
-     int preserve_echo_area;
+redisplay_internal (int preserve_echo_area)
 {
   struct window *w = XWINDOW (selected_window);
   struct frame *f;
@@ -12524,8 +12267,7 @@
    called.  This is useful for debugging.  */
 
 void
-redisplay_preserve_echo_area (from_where)
-     int from_where;
+redisplay_preserve_echo_area (int from_where)
 {
   TRACE ((stderr, "redisplay_preserve_echo_area (%d)\n", from_where));
 
@@ -12554,8 +12296,7 @@
    failure during redisplay, for example).  */
 
 static Lisp_Object
-unwind_redisplay (val)
-     Lisp_Object val;
+unwind_redisplay (Lisp_Object val)
 {
   Lisp_Object old_redisplaying_p, old_frame;
 
@@ -12575,9 +12316,7 @@
    redisplay_internal is called.  */
 
 static void
-mark_window_display_accurate_1 (w, accurate_p)
-     struct window *w;
-     int accurate_p;
+mark_window_display_accurate_1 (struct window *w, int accurate_p)
 {
   if (BUFFERP (w->buffer))
     {
@@ -12628,9 +12367,7 @@
    be redisplayed the next time redisplay_internal is called.  */
 
 void
-mark_window_display_accurate (window, accurate_p)
-     Lisp_Object window;
-     int accurate_p;
+mark_window_display_accurate (Lisp_Object window, int accurate_p)
 {
   struct window *w;
 
@@ -12665,9 +12402,7 @@
    macro DISP_CHAR_VECTOR.  */
 
 Lisp_Object
-disp_char_vector (dp, c)
-     struct Lisp_Char_Table *dp;
-     int c;
+disp_char_vector (struct Lisp_Char_Table *dp, int c)
 {
   Lisp_Object val;
 
@@ -12698,8 +12433,7 @@
 /* Redisplay all leaf windows in the window tree rooted at WINDOW.  */
 
 static void
-redisplay_windows (window)
-     Lisp_Object window;
+redisplay_windows (Lisp_Object window)
 {
   while (!NILP (window))
     {
@@ -12724,15 +12458,14 @@
 }
 
 static Lisp_Object
-redisplay_window_error ()
+redisplay_window_error (Lisp_Object ignore)
 {
   displayed_buffer->display_error_modiff = BUF_MODIFF (displayed_buffer);
   return Qnil;
 }
 
 static Lisp_Object
-redisplay_window_0 (window)
-     Lisp_Object window;
+redisplay_window_0 (Lisp_Object window)
 {
   if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer))
     redisplay_window (window, 0);
@@ -12740,8 +12473,7 @@
 }
 
 static Lisp_Object
-redisplay_window_1 (window)
-     Lisp_Object window;
+redisplay_window_1 (Lisp_Object window)
 {
   if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer))
     redisplay_window (window, 1);
@@ -12769,11 +12501,9 @@
    Return 0 if cursor is not on this row, 1 otherwise.  */
 
 int
-set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
-     struct window *w;
-     struct glyph_row *row;
-     struct glyph_matrix *matrix;
-     int delta, delta_bytes, dy, dvpos;
+set_cursor_from_row (struct window *w, struct glyph_row *row,
+		     struct glyph_matrix *matrix, int delta, int delta_bytes,
+		     int dy, int dvpos)
 {
   struct glyph *glyph = row->glyphs[TEXT_AREA];
   struct glyph *end = glyph + row->used[TEXT_AREA];
@@ -13198,7 +12928,7 @@
 	 point.  */
       if (/* previous candidate is a glyph in TEXT_AREA of that row */
 	  w->cursor.hpos >= 0
-	  && w->cursor.hpos < MATRIX_ROW_USED(matrix, w->cursor.vpos)
+	  && w->cursor.hpos < MATRIX_ROW_USED (matrix, w->cursor.vpos)
 	  && BUFFERP (g1->object)
 	  && (g1->charpos == pt_old /* an exact match always wins */
 	      || (BUFFERP (glyph->object)
@@ -13259,9 +12989,7 @@
    We assume that the window's buffer is really current.  */
 
 static INLINE struct text_pos
-run_window_scroll_functions (window, startp)
-     Lisp_Object window;
-     struct text_pos startp;
+run_window_scroll_functions (Lisp_Object window, struct text_pos startp)
 {
   struct window *w = XWINDOW (window);
   SET_MARKER_FROM_TEXT_POS (w->start, startp);
@@ -13295,10 +13023,7 @@
    as if point had gone off the screen.  */
 
 static int
-cursor_row_fully_visible_p (w, force_p, current_matrix_p)
-     struct window *w;
-     int force_p;
-     int current_matrix_p;
+cursor_row_fully_visible_p (struct window *w, int force_p, int current_matrix_p)
 {
   struct glyph_matrix *matrix;
   struct glyph_row *row;
@@ -13617,8 +13342,7 @@
    screen line with the minimum distance from the old start W->start.  */
 
 static int
-compute_window_start_on_continuation_line (w)
-     struct window *w;
+compute_window_start_on_continuation_line (struct window *w)
 {
   struct text_pos pos, start_pos;
   int window_start_changed_p = 0;
@@ -13704,10 +13428,7 @@
 };
 
 static int
-try_cursor_movement (window, startp, scroll_step)
-     Lisp_Object window;
-     struct text_pos startp;
-     int *scroll_step;
+try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_step)
 {
   struct window *w = XWINDOW (window);
   struct frame *f = XFRAME (w->frame);
@@ -14011,8 +13732,7 @@
 }
 
 void
-set_vertical_scroll_bar (w)
-     struct window *w;
+set_vertical_scroll_bar (struct window *w)
 {
   int start, end, whole;
 
@@ -14057,9 +13777,7 @@
    retry.  */
 
 static void
-redisplay_window (window, just_this_one_p)
-     Lisp_Object window;
-     int just_this_one_p;
+redisplay_window (Lisp_Object window, int just_this_one_p)
 {
   struct window *w = XWINDOW (window);
   struct frame *f = XFRAME (w->frame);
@@ -14853,10 +14571,7 @@
    set in FLAGS.)  */
 
 int
-try_window (window, pos, flags)
-     Lisp_Object window;
-     struct text_pos pos;
-     int flags;
+try_window (Lisp_Object window, struct text_pos pos, int flags)
 {
   struct window *w = XWINDOW (window);
   struct it it;
@@ -14956,8 +14671,7 @@
    W->start is the new window start.  */
 
 static int
-try_window_reusing_current_matrix (w)
-     struct window *w;
+try_window_reusing_current_matrix (struct window *w)
 {
   struct frame *f = XFRAME (w->frame);
   struct glyph_row *row, *bottom_row;
@@ -15384,12 +15098,12 @@
    Window redisplay reusing current matrix when buffer has changed
  ************************************************************************/
 
-static struct glyph_row *find_last_unchanged_at_beg_row P_ ((struct window *));
-static struct glyph_row *find_first_unchanged_at_end_row P_ ((struct window *,
-							     int *, int *));
+static struct glyph_row *find_last_unchanged_at_beg_row (struct window *);
+static struct glyph_row *find_first_unchanged_at_end_row (struct window *,
+                                                          int *, int *);
 static struct glyph_row *
-find_last_row_displaying_text P_ ((struct glyph_matrix *, struct it *,
-				   struct glyph_row *));
+find_last_row_displaying_text (struct glyph_matrix *, struct it *,
+                               struct glyph_row *);
 
 
 /* Return the last row in MATRIX displaying text.  If row START is
@@ -15398,10 +15112,8 @@
    a pointer to the row found.  */
 
 static struct glyph_row *
-find_last_row_displaying_text (matrix, it, start)
-     struct glyph_matrix *matrix;
-     struct it *it;
-     struct glyph_row *start;
+find_last_row_displaying_text (struct glyph_matrix *matrix, struct it *it,
+			       struct glyph_row *start)
 {
   struct glyph_row *row, *row_found;
 
@@ -15434,8 +15146,7 @@
    when the current matrix was built.  */
 
 static struct glyph_row *
-find_last_unchanged_at_beg_row (w)
-     struct window *w;
+find_last_unchanged_at_beg_row (struct window *w)
 {
   int first_changed_pos = BEG + BEG_UNCHANGED;
   struct glyph_row *row;
@@ -15484,9 +15195,7 @@
    changes.  */
 
 static struct glyph_row *
-find_first_unchanged_at_end_row (w, delta, delta_bytes)
-     struct window *w;
-     int *delta, *delta_bytes;
+find_first_unchanged_at_end_row (struct window *w, int *delta, int *delta_bytes)
 {
   struct glyph_row *row;
   struct glyph_row *row_found = NULL;
@@ -15559,8 +15268,7 @@
    try_window_reusing_current_matrix.  */
 
 static void
-sync_frame_with_window_matrix_rows (w)
-     struct window *w;
+sync_frame_with_window_matrix_rows (struct window *w)
 {
   struct frame *f = XFRAME (w->frame);
   struct glyph_row *window_row, *window_row_end, *frame_row;
@@ -15604,11 +15312,8 @@
    containing CHARPOS or null.  */
 
 struct glyph_row *
-row_containing_pos (w, charpos, start, end, dy)
-     struct window *w;
-     int charpos;
-     struct glyph_row *start, *end;
-     int dy;
+row_containing_pos (struct window *w, int charpos, struct glyph_row *start,
+		    struct glyph_row *end, int dy)
 {
   struct glyph_row *row = start;
   struct glyph_row *best_row = NULL;
@@ -15710,8 +15415,7 @@
    7. Update W's window end information.  */
 
 static int
-try_window_id (w)
-     struct window *w;
+try_window_id (struct window *w)
 {
   struct frame *f = XFRAME (w->frame);
   struct glyph_matrix *current_matrix = w->current_matrix;
@@ -16447,9 +16151,9 @@
 
 #if GLYPH_DEBUG
 
-void dump_glyph_row P_ ((struct glyph_row *, int, int));
-void dump_glyph_matrix P_ ((struct glyph_matrix *, int));
-void dump_glyph P_ ((struct glyph_row *, struct glyph *, int));
+void dump_glyph_row (struct glyph_row *, int, int);
+void dump_glyph_matrix (struct glyph_matrix *, int);
+void dump_glyph (struct glyph_row *, struct glyph *, int);
 
 
 /* Dump the contents of glyph matrix MATRIX on stderr.
@@ -16778,9 +16482,7 @@
    Used for non-window-redisplay windows, and for windows w/o left fringe.  */
 
 static struct glyph_row *
-get_overlay_arrow_glyph_row (w, overlay_arrow_string)
-     struct window *w;
-     Lisp_Object overlay_arrow_string;
+get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   struct buffer *buffer = XBUFFER (w->buffer);
@@ -16842,8 +16544,7 @@
    produce_special_glyphs.  */
 
 static void
-insert_left_trunc_glyphs (it)
-     struct it *it;
+insert_left_trunc_glyphs (struct it *it)
 {
   struct it truncate_it;
   struct glyph *from, *end, *to, *toend;
@@ -16937,8 +16638,7 @@
    must not be zero.  */
 
 static void
-compute_line_metrics (it)
-     struct it *it;
+compute_line_metrics (struct it *it)
 {
   struct glyph_row *row = it->glyph_row;
   int area, i;
@@ -17033,9 +16733,7 @@
    end of the line if the row ends in italic text.  */
 
 static int
-append_space_for_newline (it, default_face_p)
-     struct it *it;
-     int default_face_p;
+append_space_for_newline (struct it *it, int default_face_p)
 {
   if (FRAME_WINDOW_P (it->f))
     {
@@ -17060,7 +16758,7 @@
 	  saved_pos = it->position;
 
 	  it->what = IT_CHARACTER;
-	  bzero (&it->position, sizeof it->position);
+	  memset (&it->position, 0, sizeof it->position);
 	  it->object = make_number (0);
 	  it->c = ' ';
 	  it->len = 1;
@@ -17099,8 +16797,7 @@
    left of the leftmost glyph.  */
 
 static void
-extend_face_to_end_of_line (it)
-     struct it *it;
+extend_face_to_end_of_line (struct it *it)
 {
   struct face *face;
   struct frame *f = it->f;
@@ -17181,7 +16878,7 @@
 		(((it->ascent + it->descent)
 		  * FONT_BASE (font)) / FONT_HEIGHT (font));
 	      saved_pos = it->position;
-	      bzero (&it->position, sizeof it->position);
+	      memset (&it->position, 0, sizeof it->position);
 	      saved_avoid_cursor = it->avoid_cursor_p;
 	      it->avoid_cursor_p = 1;
 	      saved_face_id = it->face_id;
@@ -17214,7 +16911,7 @@
       saved_pos = it->position;
 
       it->what = IT_CHARACTER;
-      bzero (&it->position, sizeof it->position);
+      memset (&it->position, 0, sizeof it->position);
       it->object = make_number (0);
       it->c = ' ';
       it->len = 1;
@@ -17246,8 +16943,7 @@
    trailing whitespace.  */
 
 static int
-trailing_whitespace_p (charpos)
-     int charpos;
+trailing_whitespace_p (int charpos)
 {
   int bytepos = CHAR_TO_BYTE (charpos);
   int c = 0;
@@ -17269,9 +16965,7 @@
 /* Highlight trailing whitespace, if any, in ROW.  */
 
 void
-highlight_trailing_whitespace (f, row)
-     struct frame *f;
-     struct glyph_row *row;
+highlight_trailing_whitespace (struct frame *f, struct glyph_row *row)
 {
   int used = row->used[TEXT_AREA];
 
@@ -17348,9 +17042,7 @@
    used to hold the cursor.  */
 
 static int
-cursor_row_p (w, row)
-     struct window *w;
-     struct glyph_row *row;
+cursor_row_p (struct window *w, struct glyph_row *row)
 {
   int cursor_row_p = 1;
 
@@ -17465,9 +17157,7 @@
 /* Return the character-property PROP at the current position in IT.  */
 
 static Lisp_Object
-get_it_property (it, prop)
-     struct it *it;
-     Lisp_Object prop;
+get_it_property (struct it *it, Lisp_Object prop)
 {
   Lisp_Object position;
 
@@ -17516,9 +17206,7 @@
    glyphs were produced by PRODUCE_GLYPHS, and the line needs to be
    continued.  */
 static void
-unproduce_glyphs (it, n)
-     struct it *it;
-     int n;
+unproduce_glyphs (struct it *it, int n)
 {
   struct glyph *glyph, *end;
 
@@ -17538,10 +17226,9 @@
 /* Find the positions in a bidi-reordered ROW to serve as ROW->minpos
    and ROW->maxpos.  */
 static void
-find_row_edges (it, row, min_pos, min_bpos, max_pos, max_bpos)
-     struct it *it;
-     struct glyph_row *row;
-     EMACS_INT min_pos, min_bpos, max_pos, max_bpos;
+find_row_edges (struct it *it, struct glyph_row *row,
+		EMACS_INT min_pos, EMACS_INT min_bpos,
+		EMACS_INT max_pos, EMACS_INT max_bpos)
 {
   /* FIXME: Revisit this when glyph ``spilling'' in continuation
      lines' rows is implemented for bidi-reordered rows.  */
@@ -17625,8 +17312,7 @@
    only.  */
 
 static int
-display_line (it)
-     struct it *it;
+display_line (struct it *it)
 {
   struct glyph_row *row = it->glyph_row;
   Lisp_Object overlay_arrow_string;
@@ -18379,8 +18065,7 @@
    for the menu bar.  */
 
 static void
-display_menu_bar (w)
-     struct window *w;
+display_menu_bar (struct window *w)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   struct it it;
@@ -18484,9 +18169,7 @@
    the number of windows whose mode lines were redisplayed.  */
 
 static int
-redisplay_mode_lines (window, force)
-     Lisp_Object window;
-     int force;
+redisplay_mode_lines (Lisp_Object window, int force)
 {
   int nwindows = 0;
 
@@ -18548,8 +18231,7 @@
    sum number of mode lines and header lines displayed.  */
 
 static int
-display_mode_lines (w)
-     struct window *w;
+display_mode_lines (struct window *w)
 {
   Lisp_Object old_selected_window, old_selected_frame;
   int n = 0;
@@ -18593,10 +18275,7 @@
    displayed.  */
 
 static int
-display_mode_line (w, face_id, format)
-     struct window *w;
-     enum face_id face_id;
-     Lisp_Object format;
+display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format)
 {
   struct it it;
   struct face *face;
@@ -18655,8 +18334,7 @@
    Return the updated list.  */
 
 static Lisp_Object
-move_elt_to_front (elt, list)
-     Lisp_Object elt, list;
+move_elt_to_front (Lisp_Object elt, Lisp_Object list)
 {
   register Lisp_Object tail, prev;
   register Lisp_Object tem;
@@ -18714,12 +18392,8 @@
    `store_mode_line_string', or `display_string'.  */
 
 static int
-display_mode_element (it, depth, field_width, precision, elt, props, risky)
-     struct it *it;
-     int depth;
-     int field_width, precision;
-     Lisp_Object elt, props;
-     int risky;
+display_mode_element (struct it *it, int depth, int field_width, int precision,
+		      Lisp_Object elt, Lisp_Object props, int risky)
 {
   int n = 0, field, prec;
   int literal = 0;
@@ -19181,13 +18855,8 @@
  */
 
 static int
-store_mode_line_string (string, lisp_string, copy_string, field_width, precision, props)
-     char *string;
-     Lisp_Object lisp_string;
-     int copy_string;
-     int field_width;
-     int precision;
-     Lisp_Object props;
+store_mode_line_string (char *string, Lisp_Object lisp_string, int copy_string,
+			int field_width, int precision, Lisp_Object props)
 {
   int len;
   int n = 0;
@@ -19374,10 +19043,7 @@
    the positive integer D to BUF using a minimal field width WIDTH.  */
 
 static void
-pint2str (buf, width, d)
-     register char *buf;
-     register int width;
-     register int d;
+pint2str (register char *buf, register int width, register int d)
 {
   register char *p = buf;
 
@@ -19421,10 +19087,7 @@
   };
 
 static void
-pint2hrstr (buf, width, d)
-     char *buf;
-     int width;
-     int d;
+pint2hrstr (char *buf, int width, int d)
 {
   /* We aim to represent the nonnegative integer D as
      QUOTIENT.TENTHS * 10 ^ (3 * EXPONENT). */
@@ -19525,10 +19188,7 @@
 static unsigned char invalid_eol_type[] = "(*invalid*)";
 
 static char *
-decode_mode_spec_coding (coding_system, buf, eol_flag)
-     Lisp_Object coding_system;
-     register char *buf;
-     int eol_flag;
+decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_flag)
 {
   Lisp_Object val;
   int multibyte = !NILP (current_buffer->enable_multibyte_characters);
@@ -19594,7 +19254,7 @@
 	  eol_str = invalid_eol_type;
 	  eol_str_len = sizeof (invalid_eol_type) - 1;
 	}
-      bcopy (eol_str, buf, eol_str_len);
+      memcpy (buf, eol_str, eol_str_len);
       buf += eol_str_len;
     }
 
@@ -19613,11 +19273,8 @@
 static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------";
 
 static char *
-decode_mode_spec (w, c, field_width, precision, string)
-     struct window *w;
-     register int c;
-     int field_width, precision;
-     Lisp_Object *string;
+decode_mode_spec (struct window *w, register int c, int field_width,
+		  int precision, Lisp_Object *string)
 {
   Lisp_Object obj;
   struct frame *f = XFRAME (WINDOW_FRAME (w));
@@ -20034,9 +19691,8 @@
    Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT.  */
 
 static int
-display_count_lines (start, start_byte, limit_byte, count, byte_pos_ptr)
-     int start, start_byte, limit_byte, count;
-     int *byte_pos_ptr;
+display_count_lines (int start, int start_byte, int limit_byte, int count,
+		     int *byte_pos_ptr)
 {
   register unsigned char *cursor;
   unsigned char *base;
@@ -20195,7 +19851,7 @@
      with index START.  */
   reseat_to_string (it, NILP (lisp_string) ? string : NULL, lisp_string, start,
 		    precision, field_width, multibyte);
-  if (string && STRINGP (lisp_string)) 
+  if (string && STRINGP (lisp_string))
     /* LISP_STRING is the one returned by decode_mode_spec.  We should
        ignore its text properties.  */
     it->stop_charpos = -1;
@@ -20369,9 +20025,7 @@
    and 1 if it's invisible and without an ellipsis.  */
 
 int
-invisible_p (propval, list)
-     register Lisp_Object propval;
-     Lisp_Object list;
+invisible_p (register Lisp_Object propval, Lisp_Object list)
 {
   register Lisp_Object tail, proptail;
 
@@ -20500,12 +20154,8 @@
       : - 1)
 
 int
-calc_pixel_width_or_height (res, it, prop, font, width_p, align_to)
-     double *res;
-     struct it *it;
-     Lisp_Object prop;
-     struct font *font;
-     int width_p, *align_to;
+calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
+			    struct font *font, int width_p, int *align_to)
 {
   double pixels;
 
@@ -20723,7 +20373,7 @@
    face-override for drawing S.  */
 
 #ifdef HAVE_NTGUI
-#define OPTIONAL_HDC(hdc)  hdc,
+#define OPTIONAL_HDC(hdc)  HDC hdc,
 #define DECLARE_HDC(hdc)   HDC hdc;
 #define ALLOCATE_HDC(hdc, f) hdc = get_frame_dc ((f))
 #define RELEASE_HDC(hdc, f)  release_frame_dc ((f), (hdc))
@@ -20737,17 +20387,12 @@
 #endif
 
 static void
-init_glyph_string (s, OPTIONAL_HDC (hdc) char2b, w, row, area, start, hl)
-     struct glyph_string *s;
-     DECLARE_HDC (hdc)
-     XChar2b *char2b;
-     struct window *w;
-     struct glyph_row *row;
-     enum glyph_row_area area;
-     int start;
-     enum draw_glyphs_face hl;
-{
-  bzero (s, sizeof *s);
+init_glyph_string (struct glyph_string *s,
+		   OPTIONAL_HDC (hdc)
+		   XChar2b *char2b, struct window *w, struct glyph_row *row,
+		   enum glyph_row_area area, int start, enum draw_glyphs_face hl)
+{
+  memset (s, 0, sizeof *s);
   s->w = w;
   s->f = XFRAME (w->frame);
 #ifdef HAVE_NTGUI
@@ -20770,9 +20415,8 @@
    with head *HEAD and tail *TAIL.  Set *HEAD and *TAIL to the result.  */
 
 static INLINE void
-append_glyph_string_lists (head, tail, h, t)
-     struct glyph_string **head, **tail;
-     struct glyph_string *h, *t;
+append_glyph_string_lists (struct glyph_string **head, struct glyph_string **tail,
+			   struct glyph_string *h, struct glyph_string *t)
 {
   if (h)
     {
@@ -20791,9 +20435,8 @@
    result.  */
 
 static INLINE void
-prepend_glyph_string_lists (head, tail, h, t)
-     struct glyph_string **head, **tail;
-     struct glyph_string *h, *t;
+prepend_glyph_string_lists (struct glyph_string **head, struct glyph_string **tail,
+			    struct glyph_string *h, struct glyph_string *t)
 {
   if (h)
     {
@@ -20811,9 +20454,8 @@
    Set *HEAD and *TAIL to the resulting list.  */
 
 static INLINE void
-append_glyph_string (head, tail, s)
-     struct glyph_string **head, **tail;
-     struct glyph_string *s;
+append_glyph_string (struct glyph_string **head, struct glyph_string **tail,
+		     struct glyph_string *s)
 {
   s->next = s->prev = NULL;
   append_glyph_string_lists (head, tail, s, s);
@@ -20828,11 +20470,8 @@
    DISPLAY_P is non-zero.  */
 
 static INLINE struct face *
-get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p, display_p)
-     struct frame *f;
-     int c, face_id;
-     XChar2b *char2b;
-     int multibyte_p, display_p;
+get_char_face_and_encoding (struct frame *f, int c, int face_id,
+			    XChar2b *char2b, int multibyte_p, int display_p)
 {
   struct face *face = FACE_FROM_ID (f, face_id);
 
@@ -20864,11 +20503,8 @@
    a pointer to a realized face that is ready for display.  */
 
 static INLINE struct face *
-get_glyph_face_and_encoding (f, glyph, char2b, two_byte_p)
-     struct frame *f;
-     struct glyph *glyph;
-     XChar2b *char2b;
-     int *two_byte_p;
+get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph,
+			     XChar2b *char2b, int *two_byte_p)
 {
   struct face *face;
 
@@ -20906,10 +20542,8 @@
    Value is the index of a component not in S.  */
 
 static int
-fill_composite_glyph_string (s, base_face, overlaps)
-     struct glyph_string *s;
-     struct face *base_face;
-     int overlaps;
+fill_composite_glyph_string (struct glyph_string *s, struct face *base_face,
+			     int overlaps)
 {
   int i;
   /* For all glyphs of this composition, starting at the offset
@@ -20972,10 +20606,8 @@
 }
 
 static int
-fill_gstring_glyph_string (s, face_id, start, end, overlaps)
-     struct glyph_string *s;
-     int face_id;
-     int start, end, overlaps;
+fill_gstring_glyph_string (struct glyph_string *s, int face_id,
+			   int start, int end, int overlaps)
 {
   struct glyph *glyph, *last;
   Lisp_Object lgstring;
@@ -21019,10 +20651,8 @@
    Value is the index of the first glyph not in S.  */
 
 static int
-fill_glyph_string (s, face_id, start, end, overlaps)
-     struct glyph_string *s;
-     int face_id;
-     int start, end, overlaps;
+fill_glyph_string (struct glyph_string *s, int face_id,
+		   int start, int end, int overlaps)
 {
   struct glyph *glyph, *last;
   int voffset;
@@ -21082,8 +20712,7 @@
 /* Fill glyph string S from image glyph S->first_glyph.  */
 
 static void
-fill_image_glyph_string (s)
-     struct glyph_string *s;
+fill_image_glyph_string (struct glyph_string *s)
 {
   xassert (s->first_glyph->type == IMAGE_GLYPH);
   s->img = IMAGE_FROM_ID (s->f, s->first_glyph->u.img_id);
@@ -21107,11 +20736,8 @@
    Value is the index of the first glyph not in S.  */
 
 static int
-fill_stretch_glyph_string (s, row, area, start, end)
-     struct glyph_string *s;
-     struct glyph_row *row;
-     enum glyph_row_area area;
-     int start, end;
+fill_stretch_glyph_string (struct glyph_string *s, struct glyph_row *row,
+			   enum glyph_row_area area, int start, int end)
 {
   struct glyph *glyph, *last;
   int voffset, face_id;
@@ -21145,10 +20771,7 @@
 }
 
 static struct font_metrics *
-get_per_char_metric (f, font, char2b)
-     struct frame *f;
-     struct font *font;
-     XChar2b *char2b;
+get_per_char_metric (struct frame *f, struct font *font, XChar2b *char2b)
 {
   static struct font_metrics metrics;
   unsigned code = (XCHAR2B_BYTE1 (char2b) << 8) | XCHAR2B_BYTE2 (char2b);
@@ -21165,10 +20788,7 @@
    assumed to be zero.  */
 
 void
-x_get_glyph_overhangs (glyph, f, left, right)
-     struct glyph *glyph;
-     struct frame *f;
-     int *left, *right;
+x_get_glyph_overhangs (struct glyph *glyph, struct frame *f, int *left, int *right)
 {
   *left = *right = 0;
 
@@ -21219,8 +20839,7 @@
    if no glyphs are overwritten.  */
 
 static int
-left_overwritten (s)
-     struct glyph_string *s;
+left_overwritten (struct glyph_string *s)
 {
   int k;
 
@@ -21247,8 +20866,7 @@
    glyph in front of S overwrites S.  */
 
 static int
-left_overwriting (s)
-     struct glyph_string *s;
+left_overwriting (struct glyph_string *s)
 {
   int i, k, x;
   struct glyph *glyphs = s->row->glyphs[s->area];
@@ -21274,8 +20892,7 @@
    no such glyph is found.  */
 
 static int
-right_overwritten (s)
-     struct glyph_string *s;
+right_overwritten (struct glyph_string *s)
 {
   int k = -1;
 
@@ -21301,8 +20918,7 @@
    if no such glyph is found.  */
 
 static int
-right_overwriting (s)
-     struct glyph_string *s;
+right_overwriting (struct glyph_string *s)
 {
   int i, k, x;
   int end = s->row->used[s->area];
@@ -21329,10 +20945,7 @@
    in the drawing area.  */
 
 static INLINE void
-set_glyph_string_background_width (s, start, last_x)
-     struct glyph_string *s;
-     int start;
-     int last_x;
+set_glyph_string_background_width (struct glyph_string *s, int start, int last_x)
 {
   /* If the face of this glyph string has to be drawn to the end of
      the drawing area, set S->extends_to_end_of_line_p.  */
@@ -21361,10 +20974,7 @@
    BACKWARD_P non-zero means process predecessors.  */
 
 static void
-compute_overhangs_and_x (s, x, backward_p)
-     struct glyph_string *s;
-     int x;
-     int backward_p;
+compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
 {
   if (backward_p)
     {
@@ -21620,14 +21230,9 @@
    Value is the x-position reached, relative to AREA of W.  */
 
 static int
-draw_glyphs (w, x, row, area, start, end, hl, overlaps)
-     struct window *w;
-     int x;
-     struct glyph_row *row;
-     enum glyph_row_area area;
-     EMACS_INT start, end;
-     enum draw_glyphs_face hl;
-     int overlaps;
+draw_glyphs (struct window *w, int x, struct glyph_row *row,
+	     enum glyph_row_area area, EMACS_INT start, EMACS_INT end,
+	     enum draw_glyphs_face hl, int overlaps)
 {
   struct glyph_string *head, *tail;
   struct glyph_string *s;
@@ -21875,8 +21480,7 @@
    Called from x_produce_glyphs when IT->glyph_row is non-null.  */
 
 static INLINE void
-append_glyph (it)
-     struct it *it;
+append_glyph (struct it *it)
 {
   struct glyph *glyph;
   enum glyph_row_area area = it->area;
@@ -21950,8 +21554,7 @@
    non-null.  */
 
 static INLINE void
-append_composite_glyph (it)
-     struct it *it;
+append_composite_glyph (struct it *it)
 {
   struct glyph *glyph;
   enum glyph_row_area area = it->area;
@@ -22020,8 +21623,7 @@
    IT->voffset.  */
 
 static INLINE void
-take_vertical_position_into_account (it)
-     struct it *it;
+take_vertical_position_into_account (struct it *it)
 {
   if (it->voffset)
     {
@@ -22042,8 +21644,7 @@
    an overview of struct display_iterator.  */
 
 static void
-produce_image_glyph (it)
-     struct it *it;
+produce_image_glyph (struct it *it)
 {
   struct image *img;
   struct face *face;
@@ -22203,11 +21804,8 @@
    stretch.  ASCENT is the ascent of the glyph (0 <= ASCENT <= HEIGHT).  */
 
 static void
-append_stretch_glyph (it, object, width, height, ascent)
-     struct it *it;
-     Lisp_Object object;
-     int width, height;
-     int ascent;
+append_stretch_glyph (struct it *it, Lisp_Object object,
+		      int width, int height, int ascent)
 {
   struct glyph *glyph;
   enum glyph_row_area area = it->area;
@@ -22298,8 +21896,7 @@
    ASCENT must be in the range 0 <= ASCENT <= 100.  */
 
 static void
-produce_stretch_glyph (it)
-     struct it *it;
+produce_stretch_glyph (struct it *it)
 {
   /* (space :width WIDTH :height HEIGHT ...)  */
   Lisp_Object prop, plist;
@@ -22425,11 +22022,8 @@
 
 
 static Lisp_Object
-calc_line_height_property (it, val, font, boff, override)
-     struct it *it;
-     Lisp_Object val;
-     struct font *font;
-     int boff, override;
+calc_line_height_property (struct it *it, Lisp_Object val, struct font *font,
+			   int boff, int override)
 {
   Lisp_Object face_name = Qnil;
   int ascent, descent, height;
@@ -22505,8 +22099,7 @@
    for an overview of struct it.  */
 
 void
-x_produce_glyphs (it)
-     struct it *it;
+x_produce_glyphs (struct it *it)
 {
   int extra_line_spacing = it->extra_line_spacing;
 
@@ -22711,7 +22304,7 @@
 	  it->pixel_width = 0;
 	  it->nglyphs = 0;
 
-	  height = get_it_property(it, Qline_height);
+	  height = get_it_property (it, Qline_height);
 	  /* Split (line-height total-height) list */
 	  if (CONSP (height)
 	      && CONSP (XCDR (height))
@@ -22720,7 +22313,7 @@
 	      total_height = XCAR (XCDR (height));
 	      height = XCAR (height);
 	    }
-	  height = calc_line_height_property(it, height, font, boff, 1);
+	  height = calc_line_height_property (it, height, font, boff, 1);
 
 	  if (it->override_ascent >= 0)
 	    {
@@ -22770,11 +22363,11 @@
 		it->ascent = XINT (height) - it->descent;
 
 	      if (!NILP (total_height))
-		spacing = calc_line_height_property(it, total_height, font, boff, 0);
-	      else
-		{
-		  spacing = get_it_property(it, Qline_spacing);
-		  spacing = calc_line_height_property(it, spacing, font, boff, 0);
+		spacing = calc_line_height_property (it, total_height, font, boff, 0);
+	      else
+		{
+		  spacing = get_it_property (it, Qline_spacing);
+		  spacing = calc_line_height_property (it, spacing, font, boff, 0);
 		}
 	      if (INTEGERP (spacing))
 		{
@@ -23292,9 +22885,7 @@
    row being updated.  */
 
 void
-x_write_glyphs (start, len)
-     struct glyph *start;
-     int len;
+x_write_glyphs (struct glyph *start, int len)
 {
   int x, hpos;
 
@@ -23329,9 +22920,7 @@
    Insert LEN glyphs from START at the nominal cursor position.  */
 
 void
-x_insert_glyphs (start, len)
-     struct glyph *start;
-     int len;
+x_insert_glyphs (struct glyph *start, int len)
 {
   struct frame *f;
   struct window *w;
@@ -23389,8 +22978,7 @@
    updated_window.  TO_X == -1 means clear to the end of this area.  */
 
 void
-x_clear_end_of_line (to_x)
-     int to_x;
+x_clear_end_of_line (int to_x)
 {
   struct frame *f;
   struct window *w = updated_window;
@@ -23466,9 +23054,7 @@
    of the bar cursor.  */
 
 static enum text_cursor_kinds
-get_specified_cursor_type (arg, width)
-     Lisp_Object arg;
-     int *width;
+get_specified_cursor_type (Lisp_Object arg, int *width)
 {
   enum text_cursor_kinds type;
 
@@ -23521,9 +23107,7 @@
 
 /* Set the default cursor types for specified frame.  */
 void
-set_frame_cursor_types (f, arg)
-     struct frame *f;
-     Lisp_Object arg;
+set_frame_cursor_types (struct frame *f, Lisp_Object arg)
 {
   int width;
   Lisp_Object tem;
@@ -23557,11 +23141,8 @@
    In all other cases, we want a hollow box cursor.  */
 
 static enum text_cursor_kinds
-get_window_cursor_type (w, glyph, width, active_cursor)
-     struct window *w;
-     struct glyph *glyph;
-     int *width;
-     int *active_cursor;
+get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
+			int *active_cursor)
 {
   struct frame *f = XFRAME (w->frame);
   struct buffer *b = XBUFFER (w->buffer);
@@ -23717,10 +23298,8 @@
    are window-relative.  */
 
 static void
-notice_overwritten_cursor (w, area, x0, x1, y0, y1)
-     struct window *w;
-     enum glyph_row_area area;
-     int x0, y0, x1, y1;
+notice_overwritten_cursor (struct window *w, enum glyph_row_area area,
+			   int x0, int x1, int y0, int y1)
 {
   int cx0, cx1, cy0, cy1;
   struct glyph_row *row;
@@ -23787,11 +23366,8 @@
    with respect to the overlapping part OVERLAPS.  */
 
 void
-x_fix_overlapping_area (w, row, area, overlaps)
-     struct window *w;
-     struct glyph_row *row;
-     enum glyph_row_area area;
-     int overlaps;
+x_fix_overlapping_area (struct window *w, struct glyph_row *row,
+			enum glyph_row_area area, int overlaps)
 {
   int i, x;
 
@@ -23832,10 +23408,8 @@
    comment of draw_glyphs for the meaning of HL.  */
 
 void
-draw_phys_cursor_glyph (w, row, hl)
-     struct window *w;
-     struct glyph_row *row;
-     enum draw_glyphs_face hl;
+draw_phys_cursor_glyph (struct window *w, struct glyph_row *row,
+			enum draw_glyphs_face hl)
 {
   /* If cursor hpos is out of bounds, don't draw garbage.  This can
      happen in mini-buffer windows when switching between echo area
@@ -23878,8 +23452,7 @@
    Erase the image of a cursor of window W from the screen.  */
 
 void
-erase_phys_cursor (w)
-     struct window *w;
+erase_phys_cursor (struct window *w)
 {
   struct frame *f = XFRAME (w->frame);
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
@@ -23995,9 +23568,8 @@
    where to put the cursor is specified by HPOS, VPOS, X and Y.  */
 
 void
-display_and_set_cursor (w, on, hpos, vpos, x, y)
-     struct window *w;
-     int on, hpos, vpos, x, y;
+display_and_set_cursor (struct window *w, int on,
+			int hpos, int vpos, int x, int y)
 {
   struct frame *f = XFRAME (w->frame);
   int new_cursor_type;
@@ -24080,9 +23652,7 @@
    of ON.  */
 
 void
-update_window_cursor (w, on)
-     struct window *w;
-     int on;
+update_window_cursor (struct window *w, int on)
 {
   /* Don't update cursor in windows whose frame is in the process
      of being deleted.  */
@@ -24100,9 +23670,7 @@
    in the window tree rooted at W.  */
 
 static void
-update_cursor_in_window_tree (w, on_p)
-     struct window *w;
-     int on_p;
+update_cursor_in_window_tree (struct window *w, int on_p)
 {
   while (w)
     {
@@ -24123,9 +23691,7 @@
    Don't change the cursor's position.  */
 
 void
-x_update_cursor (f, on_p)
-     struct frame *f;
-     int on_p;
+x_update_cursor (struct frame *f, int on_p)
 {
   update_cursor_in_window_tree (XWINDOW (f->root_window), on_p);
 }
@@ -24137,8 +23703,7 @@
    is about to be rewritten.  */
 
 void
-x_clear_cursor (w)
-     struct window *w;
+x_clear_cursor (struct window *w)
 {
   if (FRAME_VISIBLE_P (XFRAME (w->frame)) && w->phys_cursor_on_p)
     update_window_cursor (w, 0);
@@ -24149,9 +23714,7 @@
    Display the active region described by mouse_face_* according to DRAW.  */
 
 void
-show_mouse_face (dpyinfo, draw)
-     Display_Info *dpyinfo;
-     enum draw_glyphs_face draw;
+show_mouse_face (Display_Info *dpyinfo, enum draw_glyphs_face draw)
 {
   struct window *w = XWINDOW (dpyinfo->mouse_face_window);
   struct frame *f = XFRAME (WINDOW_FRAME (w));
@@ -24234,8 +23797,7 @@
    face was actually drawn unhighlighted.  */
 
 int
-clear_mouse_face (dpyinfo)
-     Display_Info *dpyinfo;
+clear_mouse_face (Display_Info *dpyinfo)
 {
   int cleared = 0;
 
@@ -24257,8 +23819,7 @@
    Non-zero if physical cursor of window W is within mouse face.  */
 
 int
-cursor_in_mouse_face_p (w)
-     struct window *w;
+cursor_in_mouse_face_p (struct window *w)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
   int in_mouse_face = 0;
@@ -24483,12 +24044,8 @@
    Value is non-zero if a glyph was found.  */
 
 static int
-fast_find_string_pos (w, pos, object, hpos, vpos, x, y, right_p)
-     struct window *w;
-     EMACS_INT pos;
-     Lisp_Object object;
-     int *hpos, *vpos, *x, *y;
-     int right_p;
+fast_find_string_pos (struct window *w, EMACS_INT pos, Lisp_Object object,
+		      int *hpos, int *vpos, int *x, int *y, int right_p)
 {
   int yb = window_text_bottom_y (w);
   struct glyph_row *r;
@@ -24552,9 +24109,7 @@
 /* See if position X, Y is within a hot-spot of an image.  */
 
 static int
-on_hot_spot_p (hot_spot, x, y)
-     Lisp_Object hot_spot;
-     int x, y;
+on_hot_spot_p (Lisp_Object hot_spot, int x, int y)
 {
   if (!CONSP (hot_spot))
     return 0;
@@ -24650,9 +24205,7 @@
 }
 
 Lisp_Object
-find_hot_spot (map, x, y)
-     Lisp_Object map;
-     int x, y;
+find_hot_spot (Lisp_Object map, int x, int y)
 {
   while (CONSP (map))
     {
@@ -24693,10 +24246,7 @@
 
 /* Display frame CURSOR, optionally using shape defined by POINTER.  */
 static void
-define_frame_cursor1 (f, cursor, pointer)
-     struct frame *f;
-     Cursor cursor;
-     Lisp_Object pointer;
+define_frame_cursor1 (struct frame *f, Cursor cursor, Lisp_Object pointer)
 {
   /* Do not change cursor shape while dragging mouse.  */
   if (!NILP (do_mouse_tracking))
@@ -24735,10 +24285,8 @@
    position relative to the start of the mode line.  */
 
 static void
-note_mode_line_or_margin_highlight (window, x, y, area)
-     Lisp_Object window;
-     int x, y;
-     enum window_part area;
+note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
+				    enum window_part area)
 {
   struct window *w = XWINDOW (window);
   struct frame *f = XFRAME (w->frame);
@@ -24978,9 +24526,7 @@
    X and Y can be negative or out of range.  */
 
 void
-note_mouse_highlight (f, x, y)
-     struct frame *f;
-     int x, y;
+note_mouse_highlight (struct frame *f, int x, int y)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   enum window_part part;
@@ -25446,8 +24992,7 @@
    functions to ensure the mouse-highlight is off.  */
 
 void
-x_clear_window_mouse_face (w)
-     struct window *w;
+x_clear_window_mouse_face (struct window *w)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
   Lisp_Object window;
@@ -25465,8 +25010,7 @@
    This is used when the size of F is changed.  */
 
 void
-cancel_mouse_face (f)
-     struct frame *f;
+cancel_mouse_face (struct frame *f)
 {
   Lisp_Object window;
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
@@ -25494,11 +25038,8 @@
    which intersects rectangle R.  R is in window-relative coordinates.  */
 
 static void
-expose_area (w, row, r, area)
-     struct window *w;
-     struct glyph_row *row;
-     XRectangle *r;
-     enum glyph_row_area area;
+expose_area (struct window *w, struct glyph_row *row, XRectangle *r,
+	     enum glyph_row_area area)
 {
   struct glyph *first = row->glyphs[area];
   struct glyph *end = row->glyphs[area] + row->used[area];
@@ -25552,10 +25093,7 @@
    non-zero if mouse-face was overwritten.  */
 
 static int
-expose_line (w, row, r)
-     struct window *w;
-     struct glyph_row *row;
-     XRectangle *r;
+expose_line (struct window *w, struct glyph_row *row, XRectangle *r)
 {
   xassert (row->enabled_p);
 
@@ -25587,11 +25125,10 @@
    LAST_OVERLAPPING_ROW is the last such row.  */
 
 static void
-expose_overlaps (w, first_overlapping_row, last_overlapping_row, r)
-     struct window *w;
-     struct glyph_row *first_overlapping_row;
-     struct glyph_row *last_overlapping_row;
-     XRectangle *r;
+expose_overlaps (struct window *w,
+		 struct glyph_row *first_overlapping_row,
+		 struct glyph_row *last_overlapping_row,
+		 XRectangle *r)
 {
   struct glyph_row *row;
 
@@ -25617,9 +25154,7 @@
 /* Return non-zero if W's cursor intersects rectangle R.  */
 
 static int
-phys_cursor_in_rect_p (w, r)
-     struct window *w;
-     XRectangle *r;
+phys_cursor_in_rect_p (struct window *w, XRectangle *r)
 {
   XRectangle cr, result;
   struct glyph *cursor_glyph;
@@ -25665,8 +25200,7 @@
    have vertical scroll bars.  */
 
 void
-x_draw_vertical_border (w)
-     struct window *w;
+x_draw_vertical_border (struct window *w)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
 
@@ -25716,9 +25250,7 @@
    mouse-face.  */
 
 static int
-expose_window (w, fr)
-     struct window *w;
-     XRectangle *fr;
+expose_window (struct window *w, XRectangle *fr)
 {
   struct frame *f = XFRAME (w->frame);
   XRectangle wr, r;
@@ -25851,9 +25383,7 @@
    non-zero if the exposure overwrites mouse-face.  */
 
 static int
-expose_window_tree (w, r)
-     struct window *w;
-     XRectangle *r;
+expose_window_tree (struct window *w, XRectangle *r)
 {
   struct frame *f = XFRAME (w->frame);
   int mouse_face_overwritten_p = 0;
@@ -25883,9 +25413,7 @@
    the entire frame.  */
 
 void
-expose_frame (f, x, y, w, h)
-     struct frame *f;
-     int x, y, w, h;
+expose_frame (struct frame *f, int x, int y, int w, int h)
 {
   XRectangle r;
   int mouse_face_overwritten_p = 0;
@@ -25973,8 +25501,7 @@
    empty.  */
 
 int
-x_intersect_rectangles (r1, r2, result)
-     XRectangle *r1, *r2, *result;
+x_intersect_rectangles (XRectangle *r1, XRectangle *r2, XRectangle *result)
 {
   XRectangle *left, *right;
   XRectangle *upper, *lower;
@@ -26029,7 +25556,7 @@
  ***********************************************************************/
 
 void
-syms_of_xdisp ()
+syms_of_xdisp (void)
 {
   Vwith_echo_area_save_vector = Qnil;
   staticpro (&Vwith_echo_area_save_vector);
@@ -26676,7 +26203,7 @@
 /* Initialize this module when Emacs starts.  */
 
 void
-init_xdisp ()
+init_xdisp (void)
 {
   Lisp_Object root_window;
   struct window *mini_w;
@@ -26733,14 +26260,14 @@
 
 /* Return non-zero if houglass timer has been started or hourglass is shown.  */
 int
-hourglass_started ()
+hourglass_started (void)
 {
   return hourglass_shown_p || hourglass_atimer != NULL;
 }
 
 /* Cancel a currently active hourglass timer, and start a new one.  */
 void
-start_hourglass ()
+start_hourglass (void)
 {
 #if defined (HAVE_WINDOW_SYSTEM)
   EMACS_TIME delay;
@@ -26772,7 +26299,7 @@
 /* Cancel the hourglass cursor timer if active, hide a busy cursor if
    shown.  */
 void
-cancel_hourglass ()
+cancel_hourglass (void)
 {
 #if defined (HAVE_WINDOW_SYSTEM)
   if (hourglass_atimer)
--- a/src/xfaces.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xfaces.c	Thu Jul 08 17:09:35 2010 +0900
@@ -510,56 +510,56 @@
 struct table_entry;
 struct named_merge_point;
 
-static void map_tty_color P_ ((struct frame *, struct face *,
-			       enum lface_attribute_index, int *));
-static Lisp_Object resolve_face_name P_ ((Lisp_Object, int));
-static int may_use_scalable_font_p P_ ((const char *));
-static void set_font_frame_param P_ ((Lisp_Object, Lisp_Object));
-static int get_lface_attributes P_ ((struct frame *, Lisp_Object, Lisp_Object *,
-				     int, struct named_merge_point *));
-static int load_pixmap P_ ((struct frame *, Lisp_Object, unsigned *, unsigned *));
-static struct frame *frame_or_selected_frame P_ ((Lisp_Object, int));
-static void load_face_colors P_ ((struct frame *, struct face *, Lisp_Object *));
-static void free_face_colors P_ ((struct frame *, struct face *));
-static int face_color_gray_p P_ ((struct frame *, char *));
-static struct face *realize_face P_ ((struct face_cache *, Lisp_Object *,
-				      int));
-static struct face *realize_non_ascii_face P_ ((struct frame *, Lisp_Object,
-						struct face *));
-static struct face *realize_x_face P_ ((struct face_cache *, Lisp_Object *));
-static struct face *realize_tty_face P_ ((struct face_cache *, Lisp_Object *));
-static int realize_basic_faces P_ ((struct frame *));
-static int realize_default_face P_ ((struct frame *));
-static void realize_named_face P_ ((struct frame *, Lisp_Object, int));
-static int lface_fully_specified_p P_ ((Lisp_Object *));
-static int lface_equal_p P_ ((Lisp_Object *, Lisp_Object *));
-static unsigned hash_string_case_insensitive P_ ((Lisp_Object));
-static unsigned lface_hash P_ ((Lisp_Object *));
-static int lface_same_font_attributes_p P_ ((Lisp_Object *, Lisp_Object *));
-static struct face_cache *make_face_cache P_ ((struct frame *));
-static void clear_face_gcs P_ ((struct face_cache *));
-static void free_face_cache P_ ((struct face_cache *));
-static int face_fontset P_ ((Lisp_Object *));
-static void merge_face_vectors P_ ((struct frame *, Lisp_Object *, Lisp_Object*,
-				    struct named_merge_point *));
-static int merge_face_ref P_ ((struct frame *, Lisp_Object, Lisp_Object *,
-			       int, struct named_merge_point *));
-static int set_lface_from_font P_ ((struct frame *, Lisp_Object, Lisp_Object,
-				    int));
-static Lisp_Object lface_from_face_name P_ ((struct frame *, Lisp_Object, int));
-static struct face *make_realized_face P_ ((Lisp_Object *));
-static void cache_face P_ ((struct face_cache *, struct face *, unsigned));
-static void uncache_face P_ ((struct face_cache *, struct face *));
+static void map_tty_color (struct frame *, struct face *,
+                           enum lface_attribute_index, int *);
+static Lisp_Object resolve_face_name (Lisp_Object, int);
+static int may_use_scalable_font_p (const char *);
+static void set_font_frame_param (Lisp_Object, Lisp_Object);
+static int get_lface_attributes (struct frame *, Lisp_Object, Lisp_Object *,
+                                 int, struct named_merge_point *);
+static int load_pixmap (struct frame *, Lisp_Object, unsigned *, unsigned *);
+static struct frame *frame_or_selected_frame (Lisp_Object, int);
+static void load_face_colors (struct frame *, struct face *, Lisp_Object *);
+static void free_face_colors (struct frame *, struct face *);
+static int face_color_gray_p (struct frame *, char *);
+static struct face *realize_face (struct face_cache *, Lisp_Object *,
+                                  int);
+static struct face *realize_non_ascii_face (struct frame *, Lisp_Object,
+                                            struct face *);
+static struct face *realize_x_face (struct face_cache *, Lisp_Object *);
+static struct face *realize_tty_face (struct face_cache *, Lisp_Object *);
+static int realize_basic_faces (struct frame *);
+static int realize_default_face (struct frame *);
+static void realize_named_face (struct frame *, Lisp_Object, int);
+static int lface_fully_specified_p (Lisp_Object *);
+static int lface_equal_p (Lisp_Object *, Lisp_Object *);
+static unsigned hash_string_case_insensitive (Lisp_Object);
+static unsigned lface_hash (Lisp_Object *);
+static int lface_same_font_attributes_p (Lisp_Object *, Lisp_Object *);
+static struct face_cache *make_face_cache (struct frame *);
+static void clear_face_gcs (struct face_cache *);
+static void free_face_cache (struct face_cache *);
+static int face_fontset (Lisp_Object *);
+static void merge_face_vectors (struct frame *, Lisp_Object *, Lisp_Object*,
+                                struct named_merge_point *);
+static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *,
+                           int, struct named_merge_point *);
+static int set_lface_from_font (struct frame *, Lisp_Object, Lisp_Object,
+                                int);
+static Lisp_Object lface_from_face_name (struct frame *, Lisp_Object, int);
+static struct face *make_realized_face (Lisp_Object *);
+static void cache_face (struct face_cache *, struct face *, unsigned);
+static void uncache_face (struct face_cache *, struct face *);
 
 #ifdef HAVE_WINDOW_SYSTEM
 
-static GC x_create_gc P_ ((struct frame *, unsigned long, XGCValues *));
-static void x_free_gc P_ ((struct frame *, GC));
+static GC x_create_gc (struct frame *, unsigned long, XGCValues *);
+static void x_free_gc (struct frame *, GC);
 
 #ifdef USE_X_TOOLKIT
-static void x_update_menu_appearance P_ ((struct frame *));
-
-extern void free_frame_menubar P_ ((struct frame *));
+static void x_update_menu_appearance (struct frame *);
+
+extern void free_frame_menubar (struct frame *);
 #endif /* USE_X_TOOLKIT */
 
 #endif /* HAVE_WINDOW_SYSTEM */
@@ -656,10 +656,7 @@
    is called.  */
 
 void
-x_free_colors (f, pixels, npixels)
-     struct frame *f;
-     unsigned long *pixels;
-     int npixels;
+x_free_colors (struct frame *f, long unsigned int *pixels, int npixels)
 {
   int class = FRAME_X_DISPLAY_INFO (f)->visual->class;
 
@@ -681,12 +678,7 @@
    is called.  */
 
 void
-x_free_dpy_colors (dpy, screen, cmap, pixels, npixels)
-     Display *dpy;
-     Screen *screen;
-     Colormap cmap;
-     unsigned long *pixels;
-     int npixels;
+x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, long unsigned int *pixels, int npixels)
 {
   struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
   int class = dpyinfo->visual->class;
@@ -707,10 +699,7 @@
    are given by XGCV and MASK.  */
 
 static INLINE GC
-x_create_gc (f, mask, xgcv)
-     struct frame *f;
-     unsigned long mask;
-     XGCValues *xgcv;
+x_create_gc (struct frame *f, long unsigned int mask, XGCValues *xgcv)
 {
   GC gc;
   BLOCK_INPUT;
@@ -724,9 +713,7 @@
 /* Free GC which was used on frame F.  */
 
 static INLINE void
-x_free_gc (f, gc)
-     struct frame *f;
-     GC gc;
+x_free_gc (struct frame *f, GC gc)
 {
   eassert (interrupt_input_blocked);
   IF_DEBUG (xassert (--ngcs >= 0));
@@ -777,7 +764,7 @@
 {
   GC gc = xmalloc (sizeof (*gc));
   if (gc)
-      bcopy(xgcv, gc, sizeof(XGCValues));
+    memcpy (gc, xgcv, sizeof (XGCValues));
   return gc;
 }
 
@@ -794,8 +781,7 @@
    are in ISO8859-1.  */
 
 int
-xstrcasecmp (s1, s2)
-     const unsigned char *s1, *s2;
+xstrcasecmp (const unsigned char *s1, const unsigned char *s2)
 {
   while (*s1 && *s2)
     {
@@ -819,9 +805,7 @@
    Lisp function definitions.  */
 
 static INLINE struct frame *
-frame_or_selected_frame (frame, nparam)
-     Lisp_Object frame;
-     int nparam;
+frame_or_selected_frame (Lisp_Object frame, int nparam)
 {
   if (NILP (frame))
     frame = selected_frame;
@@ -838,8 +822,7 @@
 /* Initialize face cache and basic faces for frame F.  */
 
 void
-init_frame_faces (f)
-     struct frame *f;
+init_frame_faces (struct frame *f)
 {
   /* Make a face cache, if F doesn't have one.  */
   if (FRAME_FACE_CACHE (f) == NULL)
@@ -877,8 +860,7 @@
 /* Free face cache of frame F.  Called from delete_frame.  */
 
 void
-free_frame_faces (f)
-     struct frame *f;
+free_frame_faces (struct frame *f)
 {
   struct face_cache *face_cache = FRAME_FACE_CACHE (f);
 
@@ -909,8 +891,7 @@
    of named faces. */
 
 void
-recompute_basic_faces (f)
-     struct frame *f;
+recompute_basic_faces (struct frame *f)
 {
   if (FRAME_FACE_CACHE (f))
     {
@@ -925,8 +906,7 @@
    try to free unused fonts, too.  */
 
 void
-clear_face_cache (clear_fonts_p)
-     int clear_fonts_p;
+clear_face_cache (int clear_fonts_p)
 {
 #ifdef HAVE_WINDOW_SYSTEM
   Lisp_Object tail, frame;
@@ -1045,10 +1025,7 @@
    if these pointers are not null.  */
 
 static int
-load_pixmap (f, name, w_ptr, h_ptr)
-     FRAME_PTR f;
-     Lisp_Object name;
-     unsigned int *w_ptr, *h_ptr;
+load_pixmap (FRAME_PTR f, Lisp_Object name, unsigned int *w_ptr, unsigned int *h_ptr)
 {
   int bitmap_id;
 
@@ -1117,9 +1094,7 @@
    Return 0 if there's a problem with RGB_LIST, otherwise return 1.  */
 
 static int
-parse_rgb_list (rgb_list, color)
-     Lisp_Object rgb_list;
-     XColor *color;
+parse_rgb_list (Lisp_Object rgb_list, XColor *color)
 {
 #define PARSE_RGB_LIST_FIELD(field)					\
   if (CONSP (rgb_list) && INTEGERP (XCAR (rgb_list)))			\
@@ -1144,10 +1119,7 @@
    returned in it.  */
 
 static int
-tty_lookup_color (f, color, tty_color, std_color)
-     struct frame *f;
-     Lisp_Object color;
-     XColor *tty_color, *std_color;
+tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color, XColor *std_color)
 {
   Lisp_Object frame, color_desc;
 
@@ -1207,11 +1179,7 @@
 /* A version of defined_color for non-X frames.  */
 
 int
-tty_defined_color (f, color_name, color_def, alloc)
-     struct frame *f;
-     char *color_name;
-     XColor *color_def;
-     int alloc;
+tty_defined_color (struct frame *f, char *color_name, XColor *color_def, int alloc)
 {
   int status = 1;
 
@@ -1246,11 +1214,7 @@
    This does the right thing for any type of frame.  */
 
 int
-defined_color (f, color_name, color_def, alloc)
-     struct frame *f;
-     char *color_name;
-     XColor *color_def;
-     int alloc;
+defined_color (struct frame *f, char *color_name, XColor *color_def, int alloc)
 {
   if (!FRAME_WINDOW_P (f))
     return tty_defined_color (f, color_name, color_def, alloc);
@@ -1275,9 +1239,7 @@
    Lisp string.  */
 
 Lisp_Object
-tty_color_name (f, idx)
-     struct frame *f;
-     int idx;
+tty_color_name (struct frame *f, int idx)
 {
   if (idx >= 0 && !NILP (Ffboundp (Qtty_color_by_index)))
     {
@@ -1312,9 +1274,7 @@
    The criterion implemented here is not a terribly sophisticated one.  */
 
 static int
-face_color_gray_p (f, color_name)
-     struct frame *f;
-     char *color_name;
+face_color_gray_p (struct frame *f, char *color_name)
 {
   XColor color;
   int gray_p;
@@ -1341,10 +1301,7 @@
    color.  */
 
 static int
-face_color_supported_p (f, color_name, background_p)
-     struct frame *f;
-     char *color_name;
-     int background_p;
+face_color_supported_p (struct frame *f, char *color_name, int background_p)
 {
   Lisp_Object frame;
   XColor not_used;
@@ -1419,11 +1376,7 @@
    these colors.  */
 
 unsigned long
-load_color (f, face, name, target_index)
-     struct frame *f;
-     struct face *face;
-     Lisp_Object name;
-     enum lface_attribute_index target_index;
+load_color (struct frame *f, struct face *face, Lisp_Object name, enum lface_attribute_index target_index)
 {
   XColor color;
 
@@ -1494,10 +1447,7 @@
    try to emulate gray colors with a stipple from Vface_default_stipple.  */
 
 static void
-load_face_colors (f, face, attrs)
-     struct frame *f;
-     struct face *face;
-     Lisp_Object *attrs;
+load_face_colors (struct frame *f, struct face *face, Lisp_Object *attrs)
 {
   Lisp_Object fg, bg;
 
@@ -1533,9 +1483,7 @@
 /* Free color PIXEL on frame F.  */
 
 void
-unload_color (f, pixel)
-     struct frame *f;
-     unsigned long pixel;
+unload_color (struct frame *f, long unsigned int pixel)
 {
 #ifdef HAVE_X_WINDOWS
   if (pixel != -1)
@@ -1551,9 +1499,7 @@
 /* Free colors allocated for FACE.  */
 
 static void
-free_face_colors (f, face)
-     struct frame *f;
-     struct face *face;
+free_face_colors (struct frame *f, struct face *face)
 {
 /* PENDING(NS): need to do something here? */
 #ifdef HAVE_X_WINDOWS
@@ -1693,8 +1639,7 @@
 static enum font_property_index font_props_for_sorting[FONT_SIZE_INDEX];
 
 static int
-compare_fonts_by_sort_order (v1, v2)
-     const void *v1, *v2;
+compare_fonts_by_sort_order (const void *v1, const void *v2)
 {
   Lisp_Object font1 = *(Lisp_Object *) v1;
   Lisp_Object font2 = *(Lisp_Object *) v2;
@@ -2150,9 +2095,7 @@
    Return default face in case of errors.  */
 
 static Lisp_Object
-resolve_face_name (face_name, signal_p)
-     Lisp_Object face_name;
-     int signal_p;
+resolve_face_name (Lisp_Object face_name, int signal_p)
 {
   Lisp_Object orig_face;
   Lisp_Object tortoise, hare;
@@ -2198,10 +2141,7 @@
    signal an error if FACE_NAME is not a valid face name.  If SIGNAL_P
    is zero, value is nil if FACE_NAME is not a valid face name.  */
 static INLINE Lisp_Object
-lface_from_face_name_no_resolve (f, face_name, signal_p)
-     struct frame *f;
-     Lisp_Object face_name;
-     int signal_p;
+lface_from_face_name_no_resolve (struct frame *f, Lisp_Object face_name, int signal_p)
 {
   Lisp_Object lface;
 
@@ -2229,10 +2169,7 @@
    If SIGNAL_P is zero, value is nil if FACE_NAME is not a valid face
    name.  */
 static INLINE Lisp_Object
-lface_from_face_name (f, face_name, signal_p)
-     struct frame *f;
-     Lisp_Object face_name;
-     int signal_p;
+lface_from_face_name (struct frame *f, Lisp_Object face_name, int signal_p)
 {
   face_name = resolve_face_name (face_name, signal_p);
   return lface_from_face_name_no_resolve (f, face_name, signal_p);
@@ -2246,19 +2183,15 @@
    Otherwise, value is zero if FACE_NAME is not a face.  */
 
 static INLINE int
-get_lface_attributes_no_remap (f, face_name, attrs, signal_p)
-     struct frame *f;
-     Lisp_Object face_name;
-     Lisp_Object *attrs;
-     int signal_p;
+get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name, Lisp_Object *attrs, int signal_p)
 {
   Lisp_Object lface;
 
   lface = lface_from_face_name_no_resolve (f, face_name, signal_p);
 
   if (! NILP (lface))
-    bcopy (XVECTOR (lface)->contents, attrs,
-	   LFACE_VECTOR_SIZE * sizeof *attrs);
+    memcpy (attrs, XVECTOR (lface)->contents,
+	    LFACE_VECTOR_SIZE * sizeof *attrs);
 
   return !NILP (lface);
 }
@@ -2271,12 +2204,7 @@
    Otherwise, value is zero if FACE_NAME is not a face.  */
 
 static INLINE int
-get_lface_attributes (f, face_name, attrs, signal_p, named_merge_points)
-     struct frame *f;
-     Lisp_Object face_name;
-     Lisp_Object *attrs;
-     int signal_p;
-     struct named_merge_point *named_merge_points;
+get_lface_attributes (struct frame *f, Lisp_Object face_name, Lisp_Object *attrs, int signal_p, struct named_merge_point *named_merge_points)
 {
   Lisp_Object face_remapping;
 
@@ -2312,8 +2240,7 @@
    specified, i.e. are non-nil.  */
 
 static int
-lface_fully_specified_p (attrs)
-     Lisp_Object *attrs;
+lface_fully_specified_p (Lisp_Object *attrs)
 {
   int i;
 
@@ -2333,10 +2260,7 @@
    of FORCE_P.  */
 
 static int
-set_lface_from_font (f, lface, font_object, force_p)
-     struct frame *f;
-     Lisp_Object lface, font_object;
-     int force_p;
+set_lface_from_font (struct frame *f, Lisp_Object lface, Lisp_Object font_object, int force_p)
 {
   Lisp_Object val;
   struct font *font = XFONT_OBJECT (font_object);
@@ -2397,8 +2321,7 @@
    unless both FROM and TO are relative.  */
 
 Lisp_Object
-merge_face_heights (from, to, invalid)
-     Lisp_Object from, to, invalid;
+merge_face_heights (Lisp_Object from, Lisp_Object to, Lisp_Object invalid)
 {
   Lisp_Object result = invalid;
 
@@ -2447,10 +2370,7 @@
    other places.  */
 
 static INLINE void
-merge_face_vectors (f, from, to, named_merge_points)
-     struct frame *f;
-     Lisp_Object *from, *to;
-     struct named_merge_point *named_merge_points;
+merge_face_vectors (struct frame *f, Lisp_Object *from, Lisp_Object *to, struct named_merge_point *named_merge_points)
 {
   int i;
 
@@ -2517,11 +2437,7 @@
    merging succeeded.  */
 
 static int
-merge_named_face (f, face_name, to, named_merge_points)
-     struct frame *f;
-     Lisp_Object face_name;
-     Lisp_Object *to;
-     struct named_merge_point *named_merge_points;
+merge_named_face (struct frame *f, Lisp_Object face_name, Lisp_Object *to, struct named_merge_point *named_merge_points)
 {
   struct named_merge_point named_merge_point;
 
@@ -2571,12 +2487,7 @@
    specifications.  */
 
 static int
-merge_face_ref (f, face_ref, to, err_msgs, named_merge_points)
-     struct frame *f;
-     Lisp_Object face_ref;
-     Lisp_Object *to;
-     int err_msgs;
-     struct named_merge_point *named_merge_points;
+merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, int err_msgs, struct named_merge_point *named_merge_points)
 {
   int ok = 1;			/* Succeed without an error? */
 
@@ -2950,8 +2861,8 @@
       copy = Finternal_make_lisp_face (to, new_frame);
     }
 
-  bcopy (XVECTOR (lface)->contents, XVECTOR (copy)->contents,
-	 LFACE_VECTOR_SIZE * sizeof (Lisp_Object));
+  memcpy (XVECTOR (copy)->contents, XVECTOR (lface)->contents,
+	  LFACE_VECTOR_SIZE * sizeof (Lisp_Object));
 
   /* Changing a named face means that all realized faces depending on
      that face are invalid.  Since we cannot tell which realized faces
@@ -3490,44 +3401,11 @@
 }
 
 
-#ifdef HAVE_WINDOW_SYSTEM
-
-/* Set the `font' frame parameter of FRAME determined from the
-   font-object set in `default' face attributes LFACE.  */
-
-static void
-set_font_frame_param (frame, lface)
-     Lisp_Object frame, lface;
-{
-  struct frame *f = XFRAME (frame);
-  Lisp_Object font;
-
-  if (FRAME_WINDOW_P (f)
-      /* Don't do anything if the font is `unspecified'.  This can
-	 happen during frame creation.  */
-      && (font = LFACE_FONT (lface),
-	  ! UNSPECIFIEDP (font)))
-    {
-      if (FONT_SPEC_P (font))
-	{
-	  font = font_load_for_lface (f, XVECTOR (lface)->contents, font);
-	  if (NILP (font))
-	    return;
-	  LFACE_FONT (lface) = font;
-	}
-      f->default_face_done_p = 0;
-      Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font), Qnil));
-    }
-}
-
-
 /* Update the corresponding face when frame parameter PARAM on frame F
    has been assigned the value NEW_VALUE.  */
 
 void
-update_face_from_frame_parameter (f, param, new_value)
-     struct frame *f;
-     Lisp_Object param, new_value;
+update_face_from_frame_parameter (struct frame *f, Lisp_Object param, Lisp_Object new_value)
 {
   Lisp_Object face = Qnil;
   Lisp_Object lface;
@@ -3562,6 +3440,7 @@
 				  ? new_value : Qunspecified);
       realize_basic_faces (f);
     }
+#ifdef HAVE_WINDOW_SYSTEM
   else if (EQ (param, Qborder_color))
     {
       face = Qborder;
@@ -3583,6 +3462,7 @@
       LFACE_BACKGROUND (lface) = (STRINGP (new_value)
 				  ? new_value : Qunspecified);
     }
+#endif
 
   /* Changing a named face means that all realized faces depending on
      that face are invalid.  Since we cannot tell which realized faces
@@ -3598,6 +3478,36 @@
 }
 
 
+#ifdef HAVE_WINDOW_SYSTEM
+
+/* Set the `font' frame parameter of FRAME determined from the
+   font-object set in `default' face attributes LFACE.  */
+
+static void
+set_font_frame_param (Lisp_Object frame, Lisp_Object lface)
+{
+  struct frame *f = XFRAME (frame);
+  Lisp_Object font;
+
+  if (FRAME_WINDOW_P (f)
+      /* Don't do anything if the font is `unspecified'.  This can
+	 happen during frame creation.  */
+      && (font = LFACE_FONT (lface),
+	  ! UNSPECIFIEDP (font)))
+    {
+      if (FONT_SPEC_P (font))
+	{
+	  font = font_load_for_lface (f, XVECTOR (lface)->contents, font);
+	  if (NILP (font))
+	    return;
+	  LFACE_FONT (lface) = font;
+	}
+      f->default_face_done_p = 0;
+      Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font), Qnil));
+    }
+}
+
+
 /* Get the value of X resource RESOURCE, class CLASS for the display
    of frame FRAME.  This is here because ordinary `x-get-resource'
    doesn't take a frame argument.  */
@@ -3625,9 +3535,7 @@
    error; if SIGNAL_P is zero, return 0.  */
 
 static Lisp_Object
-face_boolean_x_resource_value (value, signal_p)
-     Lisp_Object value;
-     int signal_p;
+face_boolean_x_resource_value (Lisp_Object value, int signal_p)
 {
   Lisp_Object result = make_number (0);
 
@@ -3778,7 +3686,7 @@
 	    {
 #if defined HAVE_X_I18N
 	      extern char *xic_create_fontsetname
-		P_ ((char *base_fontname, Bool motif));
+                (char *base_fontname, Bool motif);
 	      char *fontsetname = xic_create_fontsetname (SDATA (xlfd), motif);
 #else
 	      char *fontsetname = (char *) SDATA (xlfd);
@@ -3982,9 +3890,9 @@
 	{
 	  /* Ensure that the face vector is fully specified by merging
 	     the previously-cached vector.  */
-	  bcopy (oldface->lface, attrs, sizeof attrs);
+	  memcpy (attrs, oldface->lface, sizeof attrs);
 	  merge_face_vectors (f, lvec, attrs, 0);
-	  bcopy (attrs, lvec, sizeof attrs);
+	  memcpy (lvec, attrs, sizeof attrs);
 	  newface = realize_face (c, lvec, DEFAULT_FACE_ID);
 
 	  if ((! UNSPECIFIEDP (gvec[LFACE_FAMILY_INDEX])
@@ -4073,8 +3981,7 @@
    is called quite often.  */
 
 static INLINE int
-face_attr_equal_p (v1, v2)
-     Lisp_Object v1, v2;
+face_attr_equal_p (Lisp_Object v1, Lisp_Object v2)
 {
   /* Type can differ, e.g. when one attribute is unspecified, i.e. nil,
      and the other is specified.  */
@@ -4090,7 +3997,7 @@
       if (SBYTES (v1) != SBYTES (v2))
 	return 0;
 
-      return bcmp (SDATA (v1), SDATA (v2), SBYTES (v1)) == 0;
+      return memcmp (SDATA (v1), SDATA (v2), SBYTES (v1)) == 0;
 
     case_Lisp_Int:
     case Lisp_Symbol:
@@ -4107,8 +4014,7 @@
    is called quite often.  */
 
 static INLINE int
-lface_equal_p (v1, v2)
-     Lisp_Object *v1, *v2;
+lface_equal_p (Lisp_Object *v1, Lisp_Object *v2)
 {
   int i, equal_p = 1;
 
@@ -4196,8 +4102,7 @@
    below in computing a hash value for a Lisp face.  */
 
 static INLINE unsigned
-hash_string_case_insensitive (string)
-     Lisp_Object string;
+hash_string_case_insensitive (Lisp_Object string)
 {
   const unsigned char *s;
   unsigned hash = 0;
@@ -4211,8 +4116,7 @@
 /* Return a hash code for face attribute vector V.  */
 
 static INLINE unsigned
-lface_hash (v)
-     Lisp_Object *v;
+lface_hash (Lisp_Object *v)
 {
   return (hash_string_case_insensitive (v[LFACE_FAMILY_INDEX])
 	  ^ hash_string_case_insensitive (v[LFACE_FOUNDRY_INDEX])
@@ -4231,8 +4135,7 @@
    LFACE1 and LFACE2 must be fully-specified.  */
 
 static INLINE int
-lface_same_font_attributes_p (lface1, lface2)
-     Lisp_Object *lface1, *lface2;
+lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2)
 {
   xassert (lface_fully_specified_p (lface1)
 	   && lface_fully_specified_p (lface2));
@@ -4263,13 +4166,12 @@
    vector ATTR.  */
 
 static struct face *
-make_realized_face (attr)
-     Lisp_Object *attr;
+make_realized_face (Lisp_Object *attr)
 {
   struct face *face = (struct face *) xmalloc (sizeof *face);
-  bzero (face, sizeof *face);
+  memset (face, 0, sizeof *face);
   face->ascii_face = face;
-  bcopy (attr, face->lface, sizeof face->lface);
+  memcpy (face->lface, attr, sizeof face->lface);
   return face;
 }
 
@@ -4278,9 +4180,7 @@
    be null.  */
 
 void
-free_realized_face (f, face)
-     struct frame *f;
-     struct face *face;
+free_realized_face (struct frame *f, struct face *face)
 {
   if (face)
     {
@@ -4315,9 +4215,7 @@
    by clearing the face cache.  */
 
 void
-prepare_face_for_display (f, face)
-     struct frame *f;
-     struct face *face;
+prepare_face_for_display (struct frame *f, struct face *face)
 {
 #ifdef HAVE_WINDOW_SYSTEM
   xassert (FRAME_WINDOW_P (f));
@@ -4354,8 +4252,7 @@
 /* Returns the `distance' between the colors X and Y.  */
 
 static int
-color_distance (x, y)
-     XColor *x, *y;
+color_distance (XColor *x, XColor *y)
 {
   /* This formula is from a paper title `Colour metric' by Thiadmer Riemersma.
      Quoting from that paper:
@@ -4413,17 +4310,16 @@
 /* Return a new face cache for frame F.  */
 
 static struct face_cache *
-make_face_cache (f)
-     struct frame *f;
+make_face_cache (struct frame *f)
 {
   struct face_cache *c;
   int size;
 
   c = (struct face_cache *) xmalloc (sizeof *c);
-  bzero (c, sizeof *c);
+  memset (c, 0, sizeof *c);
   size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
   c->buckets = (struct face **) xmalloc (size);
-  bzero (c->buckets, size);
+  memset (c->buckets, 0, size);
   c->size = 50;
   c->faces_by_id = (struct face **) xmalloc (c->size * sizeof *c->faces_by_id);
   c->f = f;
@@ -4437,8 +4333,7 @@
    keeping too many graphics contexts that are no longer needed.  */
 
 static void
-clear_face_gcs (c)
-     struct face_cache *c;
+clear_face_gcs (struct face_cache *c)
 {
   if (c && FRAME_WINDOW_P (c->f))
     {
@@ -4468,8 +4363,7 @@
    event doesn't try to use faces we destroyed.  */
 
 static void
-free_realized_faces (c)
-     struct face_cache *c;
+free_realized_faces (struct face_cache *c)
 {
   if (c && c->used)
     {
@@ -4489,7 +4383,7 @@
 
       c->used = 0;
       size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
-      bzero (c->buckets, size);
+      memset (c->buckets, 0, size);
 
       /* Must do a thorough redisplay the next time.  Mark current
 	 matrices as invalid because they will reference faces freed
@@ -4509,9 +4403,7 @@
 /* Free all realized faces that are using FONTSET on frame F.  */
 
 void
-free_realized_faces_for_fontset (f, fontset)
-     struct frame *f;
-     int fontset;
+free_realized_faces_for_fontset (struct frame *f, int fontset)
 {
   struct face_cache *cache = FRAME_FACE_CACHE (f);
   struct face *face;
@@ -4552,8 +4444,7 @@
    because we can't tell which realized faces depend on that face.  */
 
 void
-free_all_realized_faces (frame)
-     Lisp_Object frame;
+free_all_realized_faces (Lisp_Object frame)
 {
   if (NILP (frame))
     {
@@ -4569,8 +4460,7 @@
 /* Free face cache C and faces in it, including their X resources.  */
 
 static void
-free_face_cache (c)
-     struct face_cache *c;
+free_face_cache (struct face_cache *c)
 {
   if (c)
     {
@@ -4590,10 +4480,7 @@
    that a requested face is not cached.  */
 
 static void
-cache_face (c, face, hash)
-     struct face_cache *c;
-     struct face *face;
-     unsigned hash;
+cache_face (struct face_cache *c, struct face *face, unsigned int hash)
 {
   int i = hash % FACE_CACHE_BUCKETS_SIZE;
 
@@ -4670,9 +4557,7 @@
 /* Remove face FACE from cache C.  */
 
 static void
-uncache_face (c, face)
-     struct face_cache *c;
-     struct face *face;
+uncache_face (struct face_cache *c, struct face *face)
 {
   int i = face->hash % FACE_CACHE_BUCKETS_SIZE;
 
@@ -4696,9 +4581,7 @@
    realize a new one.  */
 
 INLINE int
-lookup_face (f, attr)
-     struct frame *f;
-     Lisp_Object *attr;
+lookup_face (struct frame *f, Lisp_Object *attr)
 {
   struct face_cache *cache = FRAME_FACE_CACHE (f);
   unsigned hash;
@@ -4744,10 +4627,7 @@
    suitable face is found, realize a new one.  */
 
 int
-face_for_font (f, font_object, base_face)
-     struct frame *f;
-     Lisp_Object font_object;
-     struct face *base_face;
+face_for_font (struct frame *f, Lisp_Object font_object, struct face *base_face)
 {
   struct face_cache *cache = FRAME_FACE_CACHE (f);
   unsigned hash;
@@ -4782,10 +4662,7 @@
    face isn't realized and cannot be realized.  */
 
 int
-lookup_named_face (f, symbol, signal_p)
-     struct frame *f;
-     Lisp_Object symbol;
-     int signal_p;
+lookup_named_face (struct frame *f, Lisp_Object symbol, int signal_p)
 {
   Lisp_Object attrs[LFACE_VECTOR_SIZE];
   Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE];
@@ -4803,7 +4680,7 @@
   if (! get_lface_attributes (f, symbol, symbol_attrs, signal_p, 0))
     return -1;
 
-  bcopy (default_face->lface, attrs, sizeof attrs);
+  memcpy (attrs, default_face->lface, sizeof attrs);
   merge_face_vectors (f, symbol_attrs, attrs, 0);
 
   return lookup_face (f, attrs);
@@ -4817,9 +4694,7 @@
    rather than signal an error.   */
 
 int
-lookup_basic_face (f, face_id)
-     struct frame *f;
-     int face_id;
+lookup_basic_face (struct frame *f, int face_id)
 {
   Lisp_Object name, mapping;
   int remapped_face_id;
@@ -4866,9 +4741,7 @@
    LFACE_ID on frame F.  Value is -1 if LFACE_ID isn't valid.  */
 
 int
-ascii_face_of_lisp_face (f, lface_id)
-     struct frame *f;
-     int lface_id;
+ascii_face_of_lisp_face (struct frame *f, int lface_id)
 {
   int face_id;
 
@@ -4889,9 +4762,7 @@
    STEPS < 0 means larger.  Value is the id of the face.  */
 
 int
-smaller_face (f, face_id, steps)
-     struct frame *f;
-     int face_id, steps;
+smaller_face (struct frame *f, int face_id, int steps)
 {
 #ifdef HAVE_WINDOW_SYSTEM
   struct face *face;
@@ -4910,7 +4781,7 @@
   steps = eabs (steps);
 
   face = FACE_FROM_ID (f, face_id);
-  bcopy (face->lface, attrs, sizeof attrs);
+  memcpy (attrs, face->lface, sizeof attrs);
   pt = last_pt = XFASTINT (attrs[LFACE_HEIGHT_INDEX]);
   new_face_id = face_id;
   last_height = FONT_HEIGHT (face->font);
@@ -4950,10 +4821,7 @@
    FACE_ID on frame F, but has height HEIGHT.  */
 
 int
-face_with_height (f, face_id, height)
-     struct frame *f;
-     int face_id;
-     int height;
+face_with_height (struct frame *f, int face_id, int height)
 {
 #ifdef HAVE_WINDOW_SYSTEM
   struct face *face;
@@ -4964,7 +4832,7 @@
     return face_id;
 
   face = FACE_FROM_ID (f, face_id);
-  bcopy (face->lface, attrs, sizeof attrs);
+  memcpy (attrs, face->lface, sizeof attrs);
   attrs[LFACE_HEIGHT_INDEX] = make_number (height);
   font_clear_prop (attrs, FONT_SIZE_INDEX);
   face_id = lookup_face (f, attrs);
@@ -4982,11 +4850,7 @@
    default face.  FACE_ID is assumed to be already realized.  */
 
 int
-lookup_derived_face (f, symbol, face_id, signal_p)
-     struct frame *f;
-     Lisp_Object symbol;
-     int face_id;
-     int signal_p;
+lookup_derived_face (struct frame *f, Lisp_Object symbol, int face_id, int signal_p)
 {
   Lisp_Object attrs[LFACE_VECTOR_SIZE];
   Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE];
@@ -4998,7 +4862,7 @@
   if (!get_lface_attributes (f, symbol, symbol_attrs, signal_p, 0))
     return -1;
 
-  bcopy (default_face->lface, attrs, sizeof attrs);
+  memcpy (attrs, default_face->lface, sizeof attrs);
   merge_face_vectors (f, symbol_attrs, attrs, 0);
   return lookup_face (f, attrs);
 }
@@ -5043,10 +4907,7 @@
     \(2) `close in spirit' to what the attributes specify, if not exact.  */
 
 static int
-x_supports_face_attributes_p (f, attrs, def_face)
-     struct frame *f;
-     Lisp_Object *attrs;
-     struct face *def_face;
+x_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs, struct face *def_face)
 {
   Lisp_Object *def_attrs = def_face->lface;
 
@@ -5092,7 +4953,7 @@
       Lisp_Object merged_attrs[LFACE_VECTOR_SIZE];
       int i;
 
-      bcopy (def_attrs, merged_attrs, sizeof merged_attrs);
+      memcpy (merged_attrs, def_attrs, sizeof merged_attrs);
 
       merge_face_vectors (f, attrs, merged_attrs, 0);
 
@@ -5147,10 +5008,7 @@
    substitution of a `dim' face for italic.  */
 
 static int
-tty_supports_face_attributes_p (f, attrs, def_face)
-     struct frame *f;
-     Lisp_Object *attrs;
-     struct face *def_face;
+tty_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs, struct face *def_face)
 {
   int weight;
   Lisp_Object val, fg, bg;
@@ -5416,7 +5274,7 @@
   int indices[DIM (font_sort_order)];
 
   CHECK_LIST (order);
-  bzero (indices, sizeof indices);
+  memset (indices, 0, sizeof indices);
   i = 0;
 
   for (list = order;
@@ -5448,9 +5306,9 @@
     if (indices[i] == 0)
       signal_error ("Invalid font sort order", order);
 
-  if (bcmp (indices, font_sort_order, sizeof indices) != 0)
-    {
-      bcopy (indices, font_sort_order, sizeof font_sort_order);
+  if (memcmp (indices, font_sort_order, sizeof indices) != 0)
+    {
+      memcpy (font_sort_order, indices, sizeof font_sort_order);
       free_all_realized_faces (Qnil);
     }
 
@@ -5530,8 +5388,7 @@
    attribute of ATTRS doesn't name a fontset.  */
 
 static int
-face_fontset (attrs)
-     Lisp_Object *attrs;
+face_fontset (Lisp_Object *attrs)
 {
   Lisp_Object name;
 
@@ -5554,8 +5411,7 @@
    face.  */
 
 static int
-realize_basic_faces (f)
-     struct frame *f;
+realize_basic_faces (struct frame *f)
 {
   int success_p = 0;
   int count = SPECPDL_INDEX ();
@@ -5603,8 +5459,7 @@
    that are not explicitly specified are taken from frame parameters.  */
 
 static int
-realize_default_face (f)
-     struct frame *f;
+realize_default_face (struct frame *f)
 {
   struct face_cache *c = FRAME_FACE_CACHE (f);
   Lisp_Object lface;
@@ -5698,7 +5553,7 @@
   /* Realize the face; it must be fully-specified now.  */
   xassert (lface_fully_specified_p (XVECTOR (lface)->contents));
   check_lface (lface);
-  bcopy (XVECTOR (lface)->contents, attrs, sizeof attrs);
+  memcpy (attrs, XVECTOR (lface)->contents, sizeof attrs);
   face = realize_face (c, attrs, DEFAULT_FACE_ID);
 
 #ifdef HAVE_WINDOW_SYSTEM
@@ -5727,10 +5582,7 @@
    have.  The default face must have been realized already.  */
 
 static void
-realize_named_face (f, symbol, id)
-     struct frame *f;
-     Lisp_Object symbol;
-     int id;
+realize_named_face (struct frame *f, Lisp_Object symbol, int id)
 {
   struct face_cache *c = FRAME_FACE_CACHE (f);
   Lisp_Object lface = lface_from_face_name (f, symbol, 0);
@@ -5766,10 +5618,7 @@
    face.  Value is a pointer to the newly created realized face.  */
 
 static struct face *
-realize_face (cache, attrs, former_face_id)
-     struct face_cache *cache;
-     Lisp_Object *attrs;
-     int former_face_id;
+realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id)
 {
   struct face *face;
 
@@ -5810,10 +5659,7 @@
    no-font.  */
 
 static struct face *
-realize_non_ascii_face (f, font_object, base_face)
-     struct frame *f;
-     Lisp_Object font_object;
-     struct face *base_face;
+realize_non_ascii_face (struct frame *f, Lisp_Object font_object, struct face *base_face)
 {
   struct face_cache *cache = FRAME_FACE_CACHE (f);
   struct face *face;
@@ -5847,9 +5693,7 @@
    created realized face.  */
 
 static struct face *
-realize_x_face (cache, attrs)
-     struct face_cache *cache;
-     Lisp_Object *attrs;
+realize_x_face (struct face_cache *cache, Lisp_Object *attrs)
 {
   struct face *face = NULL;
 #ifdef HAVE_WINDOW_SYSTEM
@@ -6056,11 +5900,7 @@
    default foreground/background colors.  */
 
 static void
-map_tty_color (f, face, idx, defaulted)
-     struct frame *f;
-     struct face *face;
-     enum lface_attribute_index idx;
-     int *defaulted;
+map_tty_color (struct frame *f, struct face *face, enum lface_attribute_index idx, int *defaulted)
 {
   Lisp_Object frame, color, def;
   int foreground_p = idx == LFACE_FOREGROUND_INDEX;
@@ -6137,9 +5977,7 @@
    Value is a pointer to the newly created realized face.  */
 
 static struct face *
-realize_tty_face (cache, attrs)
-     struct face_cache *cache;
-     Lisp_Object *attrs;
+realize_tty_face (struct face_cache *cache, Lisp_Object *attrs)
 {
   struct face *face;
   int weight, slant;
@@ -6220,10 +6058,7 @@
    property PROP on frame F in current_buffer.  */
 
 int
-compute_char_face (f, ch, prop)
-     struct frame *f;
-     int ch;
-     Lisp_Object prop;
+compute_char_face (struct frame *f, int ch, Lisp_Object prop)
 {
   int face_id;
 
@@ -6239,7 +6074,7 @@
     {
       Lisp_Object attrs[LFACE_VECTOR_SIZE];
       struct face *default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
-      bcopy (default_face->lface, attrs, sizeof attrs);
+      memcpy (attrs, default_face->lface, sizeof attrs);
       merge_face_ref (f, prop, attrs, 1, 0);
       face_id = lookup_face (f, attrs);
     }
@@ -6328,7 +6163,7 @@
     return default_face->id;
 
   /* Begin with attributes from the default face.  */
-  bcopy (default_face->lface, attrs, sizeof attrs);
+  memcpy (attrs, default_face->lface, sizeof attrs);
 
   /* Merge in attributes specified via text properties.  */
   if (!NILP (prop))
@@ -6422,7 +6257,7 @@
     return DEFAULT_FACE_ID;
 
   /* Begin with attributes from the default face.  */
-  bcopy (default_face->lface, attrs, sizeof attrs);
+  memcpy (attrs, default_face->lface, sizeof attrs);
 
   /* Merge in attributes specified via text properties.  */
   if (!NILP (prop))
@@ -6523,7 +6358,7 @@
     return base_face->id;
 
   /* Begin with attributes from the base face.  */
-  bcopy (base_face->lface, attrs, sizeof attrs);
+  memcpy (attrs, base_face->lface, sizeof attrs);
 
   /* Merge in attributes specified via text properties.  */
   if (!NILP (prop))
@@ -6557,10 +6392,7 @@
 */
 
 int
-merge_faces (f, face_name, face_id, base_face_id)
-     struct frame *f;
-     Lisp_Object face_name;
-     int face_id, base_face_id;
+merge_faces (struct frame *f, Lisp_Object face_name, int face_id, int base_face_id)
 {
   Lisp_Object attrs[LFACE_VECTOR_SIZE];
   struct face *base_face;
@@ -6581,7 +6413,7 @@
     }
 
   /* Begin with attributes from the base face.  */
-  bcopy (base_face->lface, attrs, sizeof attrs);
+  memcpy (attrs, base_face->lface, sizeof attrs);
 
   if (!NILP (face_name))
     {
@@ -6749,7 +6581,7 @@
  ***********************************************************************/
 
 void
-syms_of_xfaces ()
+syms_of_xfaces (void)
 {
   Qface = intern_c_string ("face");
   staticpro (&Qface);
--- a/src/xfns.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xfns.c	Thu Jul 08 17:09:35 2010 +0900
@@ -218,7 +218,7 @@
 /* Error if we are not connected to X.  */
 
 void
-check_x ()
+check_x (void)
 {
   if (! x_in_use)
     error ("X windows are not in use or not initialized");
@@ -228,7 +228,7 @@
    You should not call this unless HAVE_MENUS is defined.  */
 
 int
-have_menus_p ()
+have_menus_p (void)
 {
   return x_in_use;
 }
@@ -237,8 +237,7 @@
    and checking validity for X.  */
 
 FRAME_PTR
-check_x_frame (frame)
-     Lisp_Object frame;
+check_x_frame (Lisp_Object frame)
 {
   FRAME_PTR f;
 
@@ -257,8 +256,7 @@
    the first X display on the list.  */
 
 struct x_display_info *
-check_x_display_info (object)
-     Lisp_Object object;
+check_x_display_info (Lisp_Object object)
 {
   struct x_display_info *dpyinfo = NULL;
 
@@ -300,9 +298,7 @@
 /* This function can be called during GC, so use GC_xxx type test macros.  */
 
 struct frame *
-x_window_to_frame (dpyinfo, wdesc)
-     struct x_display_info *dpyinfo;
-     int wdesc;
+x_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
 {
   Lisp_Object tail, frame;
   struct frame *f;
@@ -350,9 +346,7 @@
    windows.  */
 
 struct frame *
-x_any_window_to_frame (dpyinfo, wdesc)
-     struct x_display_info *dpyinfo;
-     int wdesc;
+x_any_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
 {
   Lisp_Object tail, frame;
   struct frame *f, *found;
@@ -403,9 +397,7 @@
 /* Likewise, but consider only the menu bar widget.  */
 
 struct frame *
-x_menubar_window_to_frame (dpyinfo, wdesc)
-     struct x_display_info *dpyinfo;
-     int wdesc;
+x_menubar_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
 {
   Lisp_Object tail, frame;
   struct frame *f;
@@ -449,9 +441,7 @@
    If WDESC is some other (smaller) window, we return 0.  */
 
 struct frame *
-x_top_window_to_frame (dpyinfo, wdesc)
-     struct x_display_info *dpyinfo;
-     int wdesc;
+x_top_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
 {
   Lisp_Object tail, frame;
   struct frame *f;
@@ -499,33 +489,33 @@
 
 
 
-static void x_default_font_parameter P_ ((struct frame *, Lisp_Object));
-
-static Lisp_Object unwind_create_frame P_ ((Lisp_Object));
-static Lisp_Object unwind_create_tip_frame P_ ((Lisp_Object));
-
-void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
-static void x_set_wait_for_wm P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_mouse_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_cursor_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_border_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_explicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_title P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
-void x_set_scroll_bar_foreground P_ ((struct frame *, Lisp_Object,
-				      Lisp_Object));
-void x_set_scroll_bar_background P_ ((struct frame *, Lisp_Object,
-				      Lisp_Object));
-static Lisp_Object x_default_scroll_bar_color_parameter P_ ((struct frame *,
-							     Lisp_Object,
-							     Lisp_Object,
-							     char *, char *,
-							     int));
+static void x_default_font_parameter (struct frame *, Lisp_Object);
+
+static Lisp_Object unwind_create_frame (Lisp_Object);
+static Lisp_Object unwind_create_tip_frame (Lisp_Object);
+
+void x_set_foreground_color (struct frame *, Lisp_Object, Lisp_Object);
+static void x_set_wait_for_wm (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_background_color (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_mouse_color (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_cursor_color (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_border_color (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_cursor_type (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_icon_type (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_icon_name (struct frame *, Lisp_Object, Lisp_Object);
+void x_explicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_title (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
+void x_set_scroll_bar_foreground (struct frame *, Lisp_Object,
+                                  Lisp_Object);
+void x_set_scroll_bar_background (struct frame *, Lisp_Object,
+                                  Lisp_Object);
+static Lisp_Object x_default_scroll_bar_color_parameter (struct frame *,
+                                                         Lisp_Object,
+                                                         Lisp_Object,
+                                                         char *, char *,
+                                                         int);
 
 
 /* Store the screen positions of frame F into XPTR and YPTR.
@@ -533,9 +523,7 @@
    not Emacs's own window.  */
 
 void
-x_real_positions (f, xptr, yptr)
-     FRAME_PTR f;
-     int *xptr, *yptr;
+x_real_positions (FRAME_PTR f, int *xptr, int *yptr)
 {
   int win_x, win_y, outer_x, outer_y;
   int real_x = 0, real_y = 0;
@@ -653,9 +641,7 @@
 /* Gamma-correct COLOR on frame F.  */
 
 void
-gamma_correct (f, color)
-     struct frame *f;
-     XColor *color;
+gamma_correct (struct frame *f, XColor *color)
 {
   if (f->gamma)
     {
@@ -672,11 +658,7 @@
    no color could be allocated.  */
 
 int
-x_defined_color (f, color_name, color, alloc_p)
-     struct frame *f;
-     char *color_name;
-     XColor *color;
-     int alloc_p;
+x_defined_color (struct frame *f, char *color_name, XColor *color, int alloc_p)
 {
   int success_p;
   Display *dpy = FRAME_X_DISPLAY (f);
@@ -697,10 +679,7 @@
    Signal an error if color can't be allocated.  */
 
 int
-x_decode_color (f, color_name, mono_color)
-     FRAME_PTR f;
-     Lisp_Object color_name;
-     int mono_color;
+x_decode_color (FRAME_PTR f, Lisp_Object color_name, int mono_color)
 {
   XColor cdef;
 
@@ -734,9 +713,7 @@
    See also the comment of wait_for_wm in struct x_output.  */
 
 static void
-x_set_wait_for_wm (f, new_value, old_value)
-     struct frame *f;
-     Lisp_Object new_value, old_value;
+x_set_wait_for_wm (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
 {
   f->output_data.x->wait_for_wm = !NILP (new_value);
 }
@@ -747,9 +724,7 @@
    may be any format that GdkPixbuf knows about, i.e. not just bitmaps.  */
 
 int
-xg_set_icon (f, file)
-    FRAME_PTR f;
-    Lisp_Object file;
+xg_set_icon (FRAME_PTR f, Lisp_Object file)
 {
   int result = 0;
   Lisp_Object found;
@@ -783,9 +758,7 @@
 }
 
 int
-xg_set_icon_from_xpm_data (f, data)
-    FRAME_PTR f;
-    char **data;
+xg_set_icon_from_xpm_data (FRAME_PTR f, char **data)
 {
   int result = 0;
   GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) data);
@@ -809,9 +782,7 @@
    in the standard place; do not attempt to change the window.  */
 
 void
-x_set_foreground_color (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   struct x_output *x = f->output_data.x;
   unsigned long fg, old_fg;
@@ -847,9 +818,7 @@
 }
 
 void
-x_set_background_color (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   struct x_output *x = f->output_data.x;
   unsigned long bg;
@@ -895,8 +864,7 @@
 }
 
 static Cursor
-make_invisible_cursor (f)
-     struct frame *f;
+make_invisible_cursor (struct frame *f)
 {
   Display *dpy = FRAME_X_DISPLAY (f);
   static char const no_data[] = { 0 };
@@ -924,9 +892,7 @@
 }
 
 void
-x_set_mouse_color (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   struct x_output *x = f->output_data.x;
   Display *dpy = FRAME_X_DISPLAY (f);
@@ -1071,9 +1037,7 @@
 }
 
 void
-x_set_cursor_color (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   unsigned long fore_pixel, pixel;
   int fore_pixel_allocated_p = 0, pixel_allocated_p = 0;
@@ -1144,9 +1108,7 @@
    F has an x-window.  */
 
 void
-x_set_border_pixel (f, pix)
-     struct frame *f;
-     int pix;
+x_set_border_pixel (struct frame *f, int pix)
 {
   unload_color (f, f->output_data.x->border_pixel);
   f->output_data.x->border_pixel = pix;
@@ -1175,9 +1137,7 @@
    and so emacs' border colors may be overridden.  */
 
 void
-x_set_border_color (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   int pix;
 
@@ -1189,9 +1149,7 @@
 
 
 void
-x_set_cursor_type (f, arg, oldval)
-     FRAME_PTR f;
-     Lisp_Object arg, oldval;
+x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
 {
   set_frame_cursor_types (f, arg);
 
@@ -1200,9 +1158,7 @@
 }
 
 void
-x_set_icon_type (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   int result;
 
@@ -1234,9 +1190,7 @@
 }
 
 void
-x_set_icon_name (f, arg, oldval)
-     struct frame *f;
-     Lisp_Object arg, oldval;
+x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   int result;
 
@@ -1274,9 +1228,7 @@
 
 
 void
-x_set_menu_bar_lines (f, value, oldval)
-     struct frame *f;
-     Lisp_Object value, oldval;
+x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   int nlines;
 #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
@@ -1366,9 +1318,7 @@
    The frame's height doesn't change.  */
 
 void
-x_set_tool_bar_lines (f, value, oldval)
-     struct frame *f;
-     Lisp_Object value, oldval;
+x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   int delta, nlines, root_height;
   Lisp_Object root_window;
@@ -1463,9 +1413,7 @@
    the frame parameter.  */
 
 void
-x_set_scroll_bar_foreground (f, value, oldval)
-     struct frame *f;
-     Lisp_Object value, oldval;
+x_set_scroll_bar_foreground (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   unsigned long pixel;
 
@@ -1498,9 +1446,7 @@
    parameter.  */
 
 void
-x_set_scroll_bar_background (f, value, oldval)
-     struct frame *f;
-     Lisp_Object value, oldval;
+x_set_scroll_bar_background (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   unsigned long pixel;
 
@@ -1563,11 +1509,7 @@
    the result should be `COMPOUND_TEXT'.  */
 
 static unsigned char *
-x_encode_text (string, coding_system, selectionp, text_bytes, stringp, freep)
-     Lisp_Object string, coding_system;
-     int *text_bytes, *stringp;
-     int selectionp;
-     int *freep;
+x_encode_text (Lisp_Object string, Lisp_Object coding_system, int selectionp, int *text_bytes, int *stringp, int *freep)
 {
   int result = string_xstring_p (string);
   struct coding_system coding;
@@ -1601,9 +1543,7 @@
    icon name to NAME.  */
 
 static void
-x_set_name_internal (f, name)
-     FRAME_PTR f;
-     Lisp_Object name;
+x_set_name_internal (FRAME_PTR f, Lisp_Object name)
 {
   if (FRAME_X_WINDOW (f))
     {
@@ -1613,8 +1553,8 @@
 	int bytes, stringp;
         int do_free_icon_value = 0, do_free_text_value = 0;
 	Lisp_Object coding_system;
-#ifdef USE_GTK
 	Lisp_Object encoded_name;
+	Lisp_Object encoded_icon_name;
 	struct gcpro gcpro1;
 
 	/* As ENCODE_UTF_8 may cause GC and relocation of string data,
@@ -1622,7 +1562,6 @@
 	GCPRO1 (name);
 	encoded_name = ENCODE_UTF_8 (name);
 	UNGCPRO;
-#endif
 
 	coding_system = Qcompound_text;
 	/* Note: Encoding strategy
@@ -1638,7 +1577,12 @@
 	   We may also be able to use "UTF8_STRING" in text.encoding
 	   in the future which can encode all Unicode characters.
 	   But, for the moment, there's no way to know that the
-	   current window manager supports it or not.  */
+	   current window manager supports it or not.
+
+	   Either way, we also set the _NET_WM_NAME and _NET_WM_ICON_NAME
+	   properties.  Per the EWMH specification, those two properties
+	   are always UTF8_STRING.  This matches what gtk_window_set_title()
+	   does in the USE_GTK case. */
 	text.value = x_encode_text (name, coding_system, 0, &bytes, &stringp,
 				    &do_free_text_value);
 	text.encoding = (stringp ? XA_STRING
@@ -1649,6 +1593,7 @@
 	if (!STRINGP (f->icon_name))
 	  {
 	    icon = text;
+	    encoded_icon_name = encoded_name;
 	  }
 	else
 	  {
@@ -1659,6 +1604,8 @@
 			     : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
 	    icon.format = 8;
 	    icon.nitems = bytes;
+
+	    encoded_icon_name = ENCODE_UTF_8 (f->icon_name);
 	  }
 
 #ifdef USE_GTK
@@ -1666,9 +1613,21 @@
                               (char *) SDATA (encoded_name));
 #else /* not USE_GTK */
 	XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
+	XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
+			 FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name,
+			 FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
+			 8, PropModeReplace,
+			 (char *) SDATA (encoded_name),
+			 SBYTES (encoded_name));
 #endif /* not USE_GTK */
 
 	XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &icon);
+	XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
+			 FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name,
+			 FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
+			 8, PropModeReplace,
+			 (char *) SDATA (encoded_icon_name),
+			 SBYTES (encoded_icon_name));
 
 	if (do_free_icon_value)
 	  xfree (icon.value);
@@ -1691,10 +1650,7 @@
        F->explicit_name is set, ignore the new name; otherwise, set it.  */
 
 void
-x_set_name (f, name, explicit)
-     struct frame *f;
-     Lisp_Object name;
-     int explicit;
+x_set_name (struct frame *f, Lisp_Object name, int explicit)
 {
   /* Make sure that requests from lisp code override requests from
      Emacs redisplay code.  */
@@ -1741,9 +1697,7 @@
    specified a name for the frame; the name will override any set by the
    redisplay code.  */
 void
-x_explicitly_set_name (f, arg, oldval)
-     FRAME_PTR f;
-     Lisp_Object arg, oldval;
+x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
 {
   x_set_name (f, arg, 1);
 }
@@ -1752,9 +1706,7 @@
    name; names set this way will never override names set by the user's
    lisp code.  */
 void
-x_implicitly_set_name (f, arg, oldval)
-     FRAME_PTR f;
-     Lisp_Object arg, oldval;
+x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
 {
   x_set_name (f, arg, 0);
 }
@@ -1763,9 +1715,7 @@
    If NAME is nil, use the frame name as the title.  */
 
 void
-x_set_title (f, name, old_name)
-     struct frame *f;
-     Lisp_Object name, old_name;
+x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
 {
   /* Don't change the title if it's already NAME.  */
   if (EQ (name, f->title))
@@ -1784,8 +1734,7 @@
 }
 
 void
-x_set_scroll_bar_default_width (f)
-     struct frame *f;
+x_set_scroll_bar_default_width (struct frame *f)
 {
   int wid = FRAME_COLUMN_WIDTH (f);
 
@@ -1938,8 +1887,8 @@
 
 #ifdef HAVE_X_I18N
 
-static XFontSet xic_create_xfontset P_ ((struct frame *));
-static XIMStyle best_xim_style P_ ((XIMStyles *, XIMStyles *));
+static XFontSet xic_create_xfontset (struct frame *);
+static XIMStyle best_xim_style (XIMStyles *, XIMStyles *);
 
 
 /* Supported XIM styles, ordered by preference.  */
@@ -1966,9 +1915,7 @@
 /* Create an Xt fontset spec from the name of a base font.
    If `motif' is True use the Motif syntax.  */
 char *
-xic_create_fontsetname (base_fontname, motif)
-     char *base_fontname;
-     Bool motif;
+xic_create_fontsetname (char *base_fontname, int motif)
 {
   const char *sep = motif ? ";" : ",";
   char *fontsetname;
@@ -1978,7 +1925,7 @@
     { /* There is no base font name, use the default.  */
       int len = strlen (base_fontname) + 2;
       fontsetname = xmalloc (len);
-      bzero (fontsetname, len);
+      memset (fontsetname, 0, len);
       strcpy (fontsetname, base_fontname);
     }
   else
@@ -1999,7 +1946,7 @@
 	     Use the specified font plus the default.  */
 	  int len = strlen (base_fontname) + strlen (xic_defaut_fontset) + 3;
 	  fontsetname = xmalloc (len);
-	  bzero (fontsetname, len);
+	  memset (fontsetname, 0, len);
 	  strcpy (fontsetname, base_fontname);
 	  strcat (fontsetname, sep);
 	  strcat (fontsetname, xic_defaut_fontset);
@@ -2036,7 +1983,7 @@
 	      int diff = (p2 - p3) - 2;
 
 	      base = alloca (strlen (base_fontname) + 1);
-	      bcopy (base_fontname, base, p3 - base_fontname);
+	      memcpy (base, base_fontname, p3 - base_fontname);
 	      base[p3 - base_fontname] = '*';
 	      base[(p3 - base_fontname) + 1] = '-';
 	      strcpy (base + (p3 - base_fontname) + 2, p2);
@@ -2049,33 +1996,33 @@
 	  /* Build the font spec that matches all charsets.  */
 	  len = p - base_fontname + strlen (allcs) + 1;
 	  font_allcs = (char *) alloca (len);
-	  bzero (font_allcs, len);
-	  bcopy (base_fontname, font_allcs, p - base_fontname);
+	  memset (font_allcs, 0, len);
+	  memcpy (font_allcs, base_fontname, p - base_fontname);
 	  strcat (font_allcs, allcs);
 
 	  /* Build the font spec that matches all families and
 	     add-styles.  */
 	  len = p - p1 + strlen (allcs) + strlen (allfamilies) + 1;
 	  font_allfamilies = (char *) alloca (len);
-	  bzero (font_allfamilies, len);
+	  memset (font_allfamilies, 0, len);
 	  strcpy (font_allfamilies, allfamilies);
-	  bcopy (p1, font_allfamilies + strlen (allfamilies), p - p1);
+	  memcpy (font_allfamilies + strlen (allfamilies), p1, p - p1);
 	  strcat (font_allfamilies, allcs);
 
 	  /* Build the font spec that matches all.  */
 	  len = p - p2 + strlen (allcs) + strlen (all) + strlen (allfamilies) + 1;
 	  font_all = (char *) alloca (len);
-	  bzero (font_all, len);
+	  memset (font_all, 0, len);
 	  strcpy (font_all, allfamilies);
 	  strcat (font_all, all);
-	  bcopy (p2, font_all + strlen (all) + strlen (allfamilies), p - p2);
+	  memcpy (font_all + strlen (all) + strlen (allfamilies), p2, p - p2);
 	  strcat (font_all, allcs);
 
 	  /* Build the actual font set name.  */
 	  len = strlen (base_fontname) + strlen (font_allcs)
 	    + strlen (font_allfamilies) + strlen (font_all) + 5;
 	  fontsetname = xmalloc (len);
-	  bzero (fontsetname, len);
+	  memset (fontsetname, 0, len);
 	  strcpy (fontsetname, base_fontname);
 	  strcat (fontsetname, sep);
 	  strcat (fontsetname, font_allcs);
@@ -2114,8 +2061,7 @@
 #endif
 
 static XFontSet
-xic_create_xfontset (f)
-     struct frame *f;
+xic_create_xfontset (struct frame *f)
 {
   XFontSet xfs = NULL;
   struct font *font = FRAME_FONT (f);
@@ -2214,8 +2160,7 @@
 /* Free the X fontset of frame F if it is the last frame using it.  */
 
 void
-xic_free_xfontset (f)
-     struct frame *f;
+xic_free_xfontset (struct frame *f)
 {
   Lisp_Object rest, frame;
   int shared_p = 0;
@@ -2252,9 +2197,7 @@
    input method XIM.  */
 
 static XIMStyle
-best_xim_style (user, xim)
-     XIMStyles *user;
-     XIMStyles *xim;
+best_xim_style (XIMStyles *user, XIMStyles *xim)
 {
   int i, j;
 
@@ -2272,8 +2215,7 @@
 static XIMStyle xic_style;
 
 void
-create_frame_xic (f)
-     struct frame *f;
+create_frame_xic (struct frame *f)
 {
   XIM xim;
   XIC xic = NULL;
@@ -2348,8 +2290,7 @@
 /* Destroy XIC and free XIC fontset of frame F, if any. */
 
 void
-free_frame_xic (f)
-     struct frame *f;
+free_frame_xic (struct frame *f)
 {
   if (FRAME_XIC (f) == NULL)
     return;
@@ -2365,9 +2306,7 @@
    pixel position X/Y.  X and Y are relative to window W.  */
 
 void
-xic_set_preeditarea (w, x, y)
-     struct window *w;
-     int x, y;
+xic_set_preeditarea (struct window *w, int x, int y)
 {
   struct frame *f = XFRAME (w->frame);
   XVaNestedList attr;
@@ -2384,8 +2323,7 @@
 /* Place status area for XIC in bottom right corner of frame F.. */
 
 void
-xic_set_statusarea (f)
-     struct frame *f;
+xic_set_statusarea (struct frame *f)
 {
   XIC xic = FRAME_XIC (f);
   XVaNestedList attr;
@@ -2429,9 +2367,7 @@
    BASE_FONTNAME.  Called when a new Emacs fontset is chosen.  */
 
 void
-xic_set_xfontset (f, base_fontname)
-     struct frame *f;
-     char *base_fontname;
+xic_set_xfontset (struct frame *f, char *base_fontname)
 {
   XVaNestedList attr;
   XFontSet xfs;
@@ -2706,8 +2642,7 @@
 #else /* not USE_X_TOOLKIT */
 #ifdef USE_GTK
 void
-x_window (f)
-     FRAME_PTR f;
+x_window (FRAME_PTR f)
 {
   if (! xg_create_frame_widgets (f))
     error ("Unable to create window");
@@ -2854,9 +2789,7 @@
 /* Verify that the icon position args for this window are valid.  */
 
 static void
-x_icon_verify (f, parms)
-     struct frame *f;
-     Lisp_Object parms;
+x_icon_verify (struct frame *f, Lisp_Object parms)
 {
   Lisp_Object icon_x, icon_y;
 
@@ -2878,9 +2811,7 @@
    well.  */
 
 static void
-x_icon (f, parms)
-     struct frame *f;
-     Lisp_Object parms;
+x_icon (struct frame *f, Lisp_Object parms)
 {
   Lisp_Object icon_x, icon_y;
 #if 0
@@ -2926,8 +2857,7 @@
    mouse cursor and the gray border tile.  */
 
 static void
-x_make_gc (f)
-     struct frame *f;
+x_make_gc (struct frame *f)
 {
   XGCValues gc_values;
 
@@ -2986,8 +2916,7 @@
 /* Free what was allocated in x_make_gc.  */
 
 void
-x_free_gcs (f)
-     struct frame *f;
+x_free_gcs (struct frame *f)
 {
   Display *dpy = FRAME_X_DISPLAY (f);
 
@@ -3026,8 +2955,7 @@
    constructed.  */
 
 static Lisp_Object
-unwind_create_frame (frame)
-     Lisp_Object frame;
+unwind_create_frame (Lisp_Object frame)
 {
   struct frame *f = XFRAME (frame);
 
@@ -3059,9 +2987,7 @@
 
 
 static void
-x_default_font_parameter (f, parms)
-     struct frame *f;
-     Lisp_Object parms;
+x_default_font_parameter (struct frame *f, Lisp_Object parms)
 {
   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
@@ -3268,7 +3194,7 @@
 
   f->output_method = output_x_window;
   f->output_data.x = (struct x_output *) xmalloc (sizeof (struct x_output));
-  bzero (f->output_data.x, sizeof (struct x_output));
+  memset (f->output_data.x, 0, sizeof (struct x_output));
   f->output_data.x->icon_bitmap = -1;
   FRAME_FONTSET (f) = -1;
   f->output_data.x->scroll_bar_foreground_pixel = -1;
@@ -3611,8 +3537,7 @@
    know about that structure.  */
 
 Lisp_Object
-x_get_focus_frame (frame)
-     struct frame *frame;
+x_get_focus_frame (struct frame *frame)
 {
   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (frame);
   Lisp_Object xfocus;
@@ -3994,36 +3919,31 @@
 }
 
 int
-x_pixel_width (f)
-     register struct frame *f;
+x_pixel_width (register struct frame *f)
 {
   return FRAME_PIXEL_WIDTH (f);
 }
 
 int
-x_pixel_height (f)
-     register struct frame *f;
+x_pixel_height (register struct frame *f)
 {
   return FRAME_PIXEL_HEIGHT (f);
 }
 
 int
-x_char_width (f)
-     register struct frame *f;
+x_char_width (register struct frame *f)
 {
   return FRAME_COLUMN_WIDTH (f);
 }
 
 int
-x_char_height (f)
-     register struct frame *f;
+x_char_height (register struct frame *f)
 {
   return FRAME_LINE_HEIGHT (f);
 }
 
 int
-x_screen_planes (f)
-     register struct frame *f;
+x_screen_planes (register struct frame *f)
 {
   return FRAME_X_DISPLAY_INFO (f)->n_planes;
 }
@@ -4080,8 +4000,7 @@
    members of DPYINFO appropriately.  Called from x_term_init.  */
 
 void
-select_visual (dpyinfo)
-     struct x_display_info *dpyinfo;
+select_visual (struct x_display_info *dpyinfo)
 {
   Display *dpy = dpyinfo->display;
   Screen *screen = dpyinfo->screen;
@@ -4154,8 +4073,7 @@
    Open a new connection if necessary.  */
 
 struct x_display_info *
-x_display_info_for_name (name)
-     Lisp_Object name;
+x_display_info_for_name (Lisp_Object name)
 {
   Lisp_Object names;
   struct x_display_info *dpyinfo;
@@ -4302,8 +4220,7 @@
 /* Wait for responses to all X commands issued so far for frame F.  */
 
 void
-x_sync (f)
-     FRAME_PTR f;
+x_sync (FRAME_PTR f)
 {
   BLOCK_INPUT;
   XSync (FRAME_X_DISPLAY (f), False);
@@ -4514,7 +4431,7 @@
              elements."
              This applies even if long is more than 32 bits, the X library
              converts from 32 bit elements received from the X server to long
-             and passes the long array to us.  Thus, for that case bcopy can not
+             and passes the long array to us.  Thus, for that case memcpy can not
              be used.  We convert to a 32 bit type here, because so much code
              assume on that.
 
@@ -4565,8 +4482,7 @@
    shown on the frames.  */
 
 void
-show_hourglass (timer)
-     struct atimer *timer;
+show_hourglass (struct atimer *timer)
 {
   /* The timer implementation will cancel this timer automatically
      after this function has run.  Set hourglass_atimer to null
@@ -4630,7 +4546,7 @@
    shown.  */
 
 void
-hide_hourglass ()
+hide_hourglass (void)
 {
   if (hourglass_shown_p)
     {
@@ -4665,10 +4581,10 @@
 				Tool tips
  ***********************************************************************/
 
-static Lisp_Object x_create_tip_frame P_ ((struct x_display_info *,
-					   Lisp_Object, Lisp_Object));
-static void compute_tip_xy P_ ((struct frame *, Lisp_Object, Lisp_Object,
-				Lisp_Object, int, int, int *, int *));
+static Lisp_Object x_create_tip_frame (struct x_display_info *,
+                                       Lisp_Object, Lisp_Object);
+static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object,
+                            Lisp_Object, int, int, int *, int *);
 
 /* The frame of a currently visible tooltip.  */
 
@@ -4691,8 +4607,7 @@
 
 
 static Lisp_Object
-unwind_create_tip_frame (frame)
-     Lisp_Object frame;
+unwind_create_tip_frame (Lisp_Object frame)
 {
   Lisp_Object deleted;
 
@@ -4717,9 +4632,7 @@
    when this happens.  */
 
 static Lisp_Object
-x_create_tip_frame (dpyinfo, parms, text)
-     struct x_display_info *dpyinfo;
-     Lisp_Object parms, text;
+x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms, Lisp_Object text)
 {
   struct frame *f;
   Lisp_Object frame, tem;
@@ -4774,7 +4687,7 @@
      counts etc.  */
   f->output_method = output_x_window;
   f->output_data.x = (struct x_output *) xmalloc (sizeof (struct x_output));
-  bzero (f->output_data.x, sizeof (struct x_output));
+  memset (f->output_data.x, 0, sizeof (struct x_output));
   f->output_data.x->icon_bitmap = -1;
   FRAME_FONTSET (f) = -1;
   f->output_data.x->scroll_bar_foreground_pixel = -1;
@@ -5034,11 +4947,7 @@
    the display in *ROOT_X, and *ROOT_Y.  */
 
 static void
-compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
-     struct frame *f;
-     Lisp_Object parms, dx, dy;
-     int width, height;
-     int *root_x, *root_y;
+compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object dy, int width, int height, int *root_x, int *root_y)
 {
   Lisp_Object left, top;
   int win_x, win_y;
@@ -5341,7 +5250,7 @@
       {
 	struct frame *f = SELECTED_FRAME ();
 	Widget w = f->output_data.x->menubar_widget;
-	extern void xlwmenu_redisplay P_ ((Widget));
+        extern void xlwmenu_redisplay (Widget);
 
 	if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen)
 	    && w != NULL)
@@ -5594,8 +5503,7 @@
 #ifdef USE_GTK
 
 static Lisp_Object
-clean_up_dialog (arg)
-     Lisp_Object arg;
+clean_up_dialog (Lisp_Object arg)
 {
   x_menu_set_in_use (0);
 
@@ -5821,9 +5729,9 @@
 	      /* The XKB symbolic key names can be seen most easily in
 		 the PS file generated by `xkbprint -label name
 		 $DISPLAY'.  */
-	      if (bcmp ("DELE", kb->names->keys[i].name, 4) == 0)
+	      if (memcmp ("DELE", kb->names->keys[i].name, 4) == 0)
 		delete_keycode = i;
-	      else if (bcmp ("BKSP", kb->names->keys[i].name, 4) == 0)
+	      else if (memcmp ("BKSP", kb->names->keys[i].name, 4) == 0)
 		backspace_keycode = i;
 	    }
 
@@ -5891,7 +5799,7 @@
 };
 
 void
-syms_of_xfns ()
+syms_of_xfns (void)
 {
   /* This is zero if not using X windows.  */
   x_in_use = 0;
--- a/src/xfont.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xfont.c	Thu Jul 08 17:09:35 2010 +0900
@@ -47,17 +47,15 @@
 };
 
 /* Prototypes of support functions.  */
-extern void x_clear_errors P_ ((Display *));
+extern void x_clear_errors (Display *);
 
-static XCharStruct *xfont_get_pcm P_ ((XFontStruct *, XChar2b *));
+static XCharStruct *xfont_get_pcm (XFontStruct *, XChar2b *);
 
 /* Get metrics of character CHAR2B in XFONT.  Value is null if CHAR2B
    is not contained in the font.  */
 
 static XCharStruct *
-xfont_get_pcm (xfont, char2b)
-     XFontStruct *xfont;
-     XChar2b *char2b;
+xfont_get_pcm (XFontStruct *xfont, XChar2b *char2b)
 {
   /* The result metric information.  */
   XCharStruct *pcm = NULL;
@@ -119,19 +117,19 @@
 	  ? NULL : pcm);
 }
 
-static Lisp_Object xfont_get_cache P_ ((FRAME_PTR));
-static Lisp_Object xfont_list P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object xfont_match P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object xfont_list_family P_ ((Lisp_Object));
-static Lisp_Object xfont_open P_ ((FRAME_PTR, Lisp_Object, int));
-static void xfont_close P_ ((FRAME_PTR, struct font *));
-static int xfont_prepare_face P_ ((FRAME_PTR, struct face *));
-static int xfont_has_char P_ ((Lisp_Object, int));
-static unsigned xfont_encode_char P_ ((struct font *, int));
-static int xfont_text_extents P_ ((struct font *, unsigned *, int,
-				   struct font_metrics *));
-static int xfont_draw P_ ((struct glyph_string *, int, int, int, int, int));
-static int xfont_check P_ ((FRAME_PTR, struct font *));
+static Lisp_Object xfont_get_cache (FRAME_PTR);
+static Lisp_Object xfont_list (Lisp_Object, Lisp_Object);
+static Lisp_Object xfont_match (Lisp_Object, Lisp_Object);
+static Lisp_Object xfont_list_family (Lisp_Object);
+static Lisp_Object xfont_open (FRAME_PTR, Lisp_Object, int);
+static void xfont_close (FRAME_PTR, struct font *);
+static int xfont_prepare_face (FRAME_PTR, struct face *);
+static int xfont_has_char (Lisp_Object, int);
+static unsigned xfont_encode_char (struct font *, int);
+static int xfont_text_extents (struct font *, unsigned *, int,
+                               struct font_metrics *);
+static int xfont_draw (struct glyph_string *, int, int, int, int, int);
+static int xfont_check (FRAME_PTR, struct font *);
 
 struct font_driver xfont_driver =
   {
@@ -159,8 +157,7 @@
 extern Lisp_Object QCname;
 
 static Lisp_Object
-xfont_get_cache (f)
-     FRAME_PTR f;
+xfont_get_cache (FRAME_PTR f)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 
@@ -497,8 +494,7 @@
 }
 
 static Lisp_Object
-xfont_list (frame, spec)
-     Lisp_Object frame, spec;
+xfont_list (Lisp_Object frame, Lisp_Object spec)
 {
   FRAME_PTR f = XFRAME (frame);
   Display *display = FRAME_X_DISPLAY_INFO (f)->display;
@@ -566,7 +562,7 @@
       val = assq_no_quit (QCname, AREF (spec, FONT_EXTRA_INDEX));
       if (CONSP (val) && STRINGP (XCDR (val)) && SBYTES (XCDR (val)) < 512)
 	{
-	  bcopy (SDATA (XCDR (val)), name, SBYTES (XCDR (val)) + 1);
+	  memcpy (name, SDATA (XCDR (val)), SBYTES (XCDR (val)) + 1);
 	  if (xfont_encode_coding_xlfd (name) < 0)
 	    return Qnil;
 	  list = xfont_list_pattern (display, name, registry, script);
@@ -577,8 +573,7 @@
 }
 
 static Lisp_Object
-xfont_match (frame, spec)
-     Lisp_Object frame, spec;
+xfont_match (Lisp_Object frame, Lisp_Object spec)
 {
   FRAME_PTR f = XFRAME (frame);
   Display *display = FRAME_X_DISPLAY_INFO (f)->display;
@@ -595,7 +590,7 @@
 	return Qnil;
     }
   else if (SBYTES (XCDR (val)) < 512)
-    bcopy (SDATA (XCDR (val)), name, SBYTES (XCDR (val)) + 1);
+    memcpy (name, SDATA (XCDR (val)), SBYTES (XCDR (val)) + 1);
   else
     return Qnil;
   if (xfont_encode_coding_xlfd (name) < 0)
@@ -636,8 +631,7 @@
 }
 
 static Lisp_Object
-xfont_list_family (frame)
-     Lisp_Object frame;
+xfont_list_family (Lisp_Object frame)
 {
   FRAME_PTR f = XFRAME (frame);
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
@@ -675,7 +669,7 @@
       if (! *p1 || p1 == p0)
 	continue;
       if (last_len == p1 - p0
-	  && bcmp (last_family, p0, last_len) == 0)
+	  && memcmp (last_family, p0, last_len) == 0)
 	continue;
       last_len = p1 - p0;
       last_family = p0;
@@ -696,10 +690,7 @@
 extern Lisp_Object QCavgwidth;
 
 static Lisp_Object
-xfont_open (f, entity, pixel_size)
-     FRAME_PTR f;
-     Lisp_Object entity;
-     int pixel_size;
+xfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
 {
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   Display *display = dpyinfo->display;
@@ -911,9 +902,7 @@
 }
 
 static void
-xfont_close (f, font)
-     FRAME_PTR f;
-     struct font *font;
+xfont_close (FRAME_PTR f, struct font *font)
 {
   BLOCK_INPUT;
   XFreeFont (FRAME_X_DISPLAY (f), ((struct xfont_info *) font)->xfont);
@@ -921,9 +910,7 @@
 }
 
 static int
-xfont_prepare_face (f, face)
-     FRAME_PTR f;
-     struct face *face;
+xfont_prepare_face (FRAME_PTR f, struct face *face)
 {
   BLOCK_INPUT;
   XSetFont (FRAME_X_DISPLAY (f), face->gc,
@@ -934,9 +921,7 @@
 }
 
 static int
-xfont_has_char (font, c)
-     Lisp_Object font;
-     int c;
+xfont_has_char (Lisp_Object font, int c)
 {
   Lisp_Object registry = AREF (font, FONT_REGISTRY_INDEX);
   struct charset *encoding;
@@ -965,9 +950,7 @@
 }
 
 static unsigned
-xfont_encode_char (font, c)
-     struct font *font;
-     int c;
+xfont_encode_char (struct font *font, int c)
 {
   XFontStruct *xfont = ((struct xfont_info *) font)->xfont;
   struct charset *charset;
@@ -990,18 +973,14 @@
 }
 
 static int
-xfont_text_extents (font, code, nglyphs, metrics)
-     struct font *font;
-     unsigned *code;
-     int nglyphs;
-     struct font_metrics *metrics;
+xfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics)
 {
   XFontStruct *xfont = ((struct xfont_info *) font)->xfont;
   int width = 0;
   int i, first, x;
 
   if (metrics)
-    bzero (metrics, sizeof (struct font_metrics));
+    memset (metrics, 0, sizeof (struct font_metrics));
   for (i = 0, x = 0, first = 1; i < nglyphs; i++)
     {
       XChar2b char2b;
@@ -1046,9 +1025,7 @@
 }
 
 static int
-xfont_draw (s, from, to, x, y, with_background)
-     struct glyph_string *s;
-     int from, to, x, y, with_background;
+xfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background)
 {
   XFontStruct *xfont = ((struct xfont_info *) s->font)->xfont;
   int len = to - from;
@@ -1123,9 +1100,7 @@
 }
 
 static int
-xfont_check (f, font)
-     FRAME_PTR f;
-     struct font *font;
+xfont_check (FRAME_PTR f, struct font *font)
 {
   struct xfont_info *xfont = (struct xfont_info *) font;
 
@@ -1134,7 +1109,7 @@
 
 
 void
-syms_of_xfont ()
+syms_of_xfont (void)
 {
   staticpro (&xfont_scripts_cache);
   { /* Here we rely on the fact that syms_of_xfont (via syms_of_font)
--- a/src/xftfont.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xftfont.c	Thu Jul 08 17:09:35 2010 +0900
@@ -70,9 +70,9 @@
   XftColor xft_bg;		/* color for face->background */
 };
 
-static void xftfont_get_colors P_ ((FRAME_PTR, struct face *, GC gc,
-				    struct xftface_info *,
-				    XftColor *fg, XftColor *bg));
+static void xftfont_get_colors (FRAME_PTR, struct face *, GC gc,
+                                struct xftface_info *,
+                                XftColor *fg, XftColor *bg);
 
 
 /* Setup foreground and background colors of GC into FG and BG.  If
@@ -80,12 +80,7 @@
    may be NULL.  */
 
 static void
-xftfont_get_colors (f, face, gc, xftface_info, fg, bg)
-     FRAME_PTR f;
-     struct face *face;
-     GC gc;
-     struct xftface_info *xftface_info;
-     XftColor *fg, *bg;
+xftfont_get_colors (FRAME_PTR f, struct face *face, GC gc, struct xftface_info *xftface_info, XftColor *fg, XftColor *bg)
 {
   if (xftface_info && face->gc == gc)
     {
@@ -141,25 +136,23 @@
 }
 
 
-static Lisp_Object xftfont_list P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object xftfont_match P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object xftfont_open P_ ((FRAME_PTR, Lisp_Object, int));
-static void xftfont_close P_ ((FRAME_PTR, struct font *));
-static int xftfont_prepare_face P_ ((FRAME_PTR, struct face *));
-static void xftfont_done_face P_ ((FRAME_PTR, struct face *));
-static int xftfont_has_char P_ ((Lisp_Object, int));
-static unsigned xftfont_encode_char P_ ((struct font *, int));
-static int xftfont_text_extents P_ ((struct font *, unsigned *, int,
-				     struct font_metrics *));
-static int xftfont_draw P_ ((struct glyph_string *, int, int, int, int, int));
-static int xftfont_end_for_frame P_ ((FRAME_PTR f));
+static Lisp_Object xftfont_list (Lisp_Object, Lisp_Object);
+static Lisp_Object xftfont_match (Lisp_Object, Lisp_Object);
+static Lisp_Object xftfont_open (FRAME_PTR, Lisp_Object, int);
+static void xftfont_close (FRAME_PTR, struct font *);
+static int xftfont_prepare_face (FRAME_PTR, struct face *);
+static void xftfont_done_face (FRAME_PTR, struct face *);
+static int xftfont_has_char (Lisp_Object, int);
+static unsigned xftfont_encode_char (struct font *, int);
+static int xftfont_text_extents (struct font *, unsigned *, int,
+                                 struct font_metrics *);
+static int xftfont_draw (struct glyph_string *, int, int, int, int, int);
+static int xftfont_end_for_frame (FRAME_PTR f);
 
 struct font_driver xftfont_driver;
 
 static Lisp_Object
-xftfont_list (frame, spec)
-     Lisp_Object frame;
-     Lisp_Object spec;
+xftfont_list (Lisp_Object frame, Lisp_Object spec)
 {
   Lisp_Object list = ftfont_driver.list (frame, spec), tail;
 
@@ -169,9 +162,7 @@
 }
 
 static Lisp_Object
-xftfont_match (frame, spec)
-     Lisp_Object frame;
-     Lisp_Object spec;
+xftfont_match (Lisp_Object frame, Lisp_Object spec)
 {
   Lisp_Object entity = ftfont_driver.match (frame, spec);
 
@@ -180,15 +171,14 @@
   return entity;
 }
 
-extern Lisp_Object ftfont_font_format P_ ((FcPattern *, Lisp_Object));
-extern FcCharSet *ftfont_get_fc_charset P_ ((Lisp_Object));
+extern Lisp_Object ftfont_font_format (FcPattern *, Lisp_Object);
+extern FcCharSet *ftfont_get_fc_charset (Lisp_Object);
 extern Lisp_Object QCantialias;
 
 static FcChar8 ascii_printable[95];
 
 static void
-xftfont_fix_match (pat, match)
-     FcPattern *pat, *match;
+xftfont_fix_match (FcPattern *pat, FcPattern *match)
 {
   /*  These values are not used for matching (except antialias), but for
       rendering, so make sure they are carried over to the match.
@@ -238,9 +228,7 @@
 }
 
 static void
-xftfont_add_rendering_parameters (pat, entity)
-     FcPattern *pat;
-     Lisp_Object entity;
+xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
 {
   Lisp_Object tail;
   int ival;
@@ -288,10 +276,7 @@
 }
 
 static Lisp_Object
-xftfont_open (f, entity, pixel_size)
-     FRAME_PTR f;
-     Lisp_Object entity;
-     int pixel_size;
+xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
 {
   FcResult result;
   Display *display = FRAME_X_DISPLAY (f);
@@ -510,9 +495,7 @@
 }
 
 static void
-xftfont_close (f, font)
-     FRAME_PTR f;
-     struct font *font;
+xftfont_close (FRAME_PTR f, struct font *font)
 {
   struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
 
@@ -527,9 +510,7 @@
 }
 
 static int
-xftfont_prepare_face (f, face)
-     FRAME_PTR f;
-     struct face *face;
+xftfont_prepare_face (FRAME_PTR f, struct face *face)
 {
   struct xftface_info *xftface_info;
 
@@ -552,9 +533,7 @@
 }
 
 static void
-xftfont_done_face (f, face)
-     FRAME_PTR f;
-     struct face *face;
+xftfont_done_face (FRAME_PTR f, struct face *face)
 {
   struct xftface_info *xftface_info;
 
@@ -576,9 +555,7 @@
 extern Lisp_Object Qja, Qko;
 
 static int
-xftfont_has_char (font, c)
-     Lisp_Object font;
-     int c;
+xftfont_has_char (Lisp_Object font, int c)
 {
   struct xftfont_info *xftfont_info;
   struct charset *cs = NULL;
@@ -600,9 +577,7 @@
 }
 
 static unsigned
-xftfont_encode_char (font, c)
-     struct font *font;
-     int c;
+xftfont_encode_char (struct font *font, int c)
 {
   struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
   unsigned code = XftCharIndex (xftfont_info->display, xftfont_info->xftfont,
@@ -612,11 +587,7 @@
 }
 
 static int
-xftfont_text_extents (font, code, nglyphs, metrics)
-     struct font *font;
-     unsigned *code;
-     int nglyphs;
-     struct font_metrics *metrics;
+xftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics)
 {
   struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
   XGlyphInfo extents;
@@ -637,8 +608,7 @@
 }
 
 static XftDraw *
-xftfont_get_xft_draw (f)
-     FRAME_PTR f;
+xftfont_get_xft_draw (FRAME_PTR f)
 {
   XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver);
 
@@ -658,9 +628,7 @@
 }
 
 static int
-xftfont_draw (s, from, to, x, y, with_background)
-     struct glyph_string *s;
-     int from, to, x, y, with_background;
+xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background)
 {
   FRAME_PTR f = s->f;
   struct face *face = s->face;
@@ -703,8 +671,7 @@
 }
 
 static int
-xftfont_end_for_frame (f)
-     FRAME_PTR f;
+xftfont_end_for_frame (FRAME_PTR f)
 {
   XftDraw *xft_draw;
 
@@ -724,11 +691,7 @@
 }
 
 static int
-xftfont_cached_font_ok (f, font_object, entity)
-     struct frame *f;
-     Lisp_Object font_object;
-     Lisp_Object entity;
-
+xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object, Lisp_Object entity)
 {
   struct xftfont_info *info = (struct xftfont_info *) XFONT_OBJECT (font_object);
   FcPattern *oldpat = info->xftfont->pattern;
@@ -771,7 +734,7 @@
 }
 
 void
-syms_of_xftfont ()
+syms_of_xftfont (void)
 {
   DEFSYM (Qxft, "xft");
   DEFSYM (QChinting, ":hinting");
--- a/src/xgselect.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xgselect.c	Thu Jul 08 17:09:35 2010 +0900
@@ -29,12 +29,8 @@
 static int gfds_size;
 
 int
-xg_select (max_fds, rfds, wfds, efds, timeout)
-     int max_fds;
-     SELECT_TYPE *rfds;
-     SELECT_TYPE *wfds;
-     SELECT_TYPE *efds;
-     EMACS_TIME *timeout;
+xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
+	   EMACS_TIME *timeout)
 {
   SELECT_TYPE all_rfds, all_wfds;
   EMACS_TIME tmo, *tmop = timeout;
@@ -147,7 +143,7 @@
 #endif /* defined (USE_GTK) || defined (HAVE_GCONF) */
 
 void
-xgselect_initialize ()
+xgselect_initialize (void)
 {
 #if defined (USE_GTK) || defined (HAVE_GCONF)
   gfds_size = 128;
--- a/src/xgselect.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xgselect.h	Thu Jul 08 17:09:35 2010 +0900
@@ -24,13 +24,13 @@
 #include "systime.h"
 #include "sysselect.h"
 
-extern int xg_select P_ ((int max_fds,
-                          SELECT_TYPE *rfds,
-                          SELECT_TYPE *wfds,
-                          SELECT_TYPE *efds,
-                          EMACS_TIME *timeout));
+extern int xg_select (int max_fds,
+                      SELECT_TYPE *rfds,
+                      SELECT_TYPE *wfds,
+                      SELECT_TYPE *efds,
+                      EMACS_TIME *timeout);
 
-extern void xgselect_initialize P_ ((void));
+extern void xgselect_initialize (void);
 
 #endif /* XGSELECT_H */
 
--- a/src/xmenu.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xmenu.c	Thu Jul 08 17:09:35 2010 +0900
@@ -122,22 +122,22 @@
 extern Lisp_Object Qmenu_bar_update_hook;
 
 #ifdef USE_X_TOOLKIT
-extern void set_frame_menubar P_ ((FRAME_PTR, int, int));
+extern void set_frame_menubar (FRAME_PTR, int, int);
 extern XtAppContext Xt_app_con;
 
-static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, Lisp_Object,
-				     char **));
-static void popup_get_selection P_ ((XEvent *, struct x_display_info *,
-                                     LWLIB_ID, int));
+static Lisp_Object xdialog_show (FRAME_PTR, int, Lisp_Object, Lisp_Object,
+                                 char **);
+static void popup_get_selection (XEvent *, struct x_display_info *,
+                                 LWLIB_ID, int);
 #endif /* USE_X_TOOLKIT */
 
 #ifdef USE_GTK
-extern void set_frame_menubar P_ ((FRAME_PTR, int, int));
-static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, Lisp_Object,
-				     char **));
+extern void set_frame_menubar (FRAME_PTR, int, int);
+static Lisp_Object xdialog_show (FRAME_PTR, int, Lisp_Object, Lisp_Object,
+                                 char **);
 #endif
 
-static int update_frame_menubar P_ ((struct frame *));
+static int update_frame_menubar (struct frame *);
 
 /* Flag which when set indicates a dialog or menu has been posted by
    Xt on behalf of one of the widget sets.  */
@@ -147,8 +147,8 @@
 
 /* For NS and NTGUI, these prototypes are defined in keyboard.h.  */
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
-extern widget_value *xmalloc_widget_value P_ ((void));
-extern widget_value *digest_single_submenu P_ ((int, int, int));
+extern widget_value *xmalloc_widget_value (void);
+extern widget_value *digest_single_submenu (int, int, int);
 #endif
 
 /* This is set nonzero after the user activates the menu bar, and set
@@ -196,10 +196,7 @@
    the scroll bar or the edit window.  Fx_popup_menu needs to be
    sure it is the edit window.  */
 void
-mouse_position_for_popup (f, x, y)
-     FRAME_PTR f;
-     int *x;
-     int *y;
+mouse_position_for_popup (FRAME_PTR f, int *x, int *y)
 {
   Window root, dummy_window;
   int dummy;
@@ -391,8 +388,7 @@
 /* Set menu_items_inuse so no other popup menu or dialog is created.  */
 
 void
-x_menu_set_in_use (in_use)
-     int in_use;
+x_menu_set_in_use (int in_use)
 {
   menu_items_inuse = in_use ? Qt : Qnil;
   popup_activated_flag = in_use;
@@ -638,9 +634,7 @@
    Used for popup menus and dialogs. */
 
 static void
-popup_widget_loop (do_timers, widget)
-     int do_timers;
-     GtkWidget *widget;
+popup_widget_loop (int do_timers, GtkWidget *widget)
 {
   ++popup_activated_flag;
 
@@ -668,8 +662,7 @@
    execute Lisp code.  */
 
 void
-x_activate_menubar (f)
-     FRAME_PTR f;
+x_activate_menubar (FRAME_PTR f)
 {
   if (! FRAME_X_P (f))
     abort ();
@@ -724,9 +717,7 @@
 
 #ifdef USE_GTK
 static void
-popup_deactivate_callback (widget, client_data)
-     GtkWidget *widget;
-     gpointer client_data;
+popup_deactivate_callback (GtkWidget *widget, gpointer client_data)
 {
   popup_activated_flag = 0;
 }
@@ -746,10 +737,7 @@
    for that widget.
    F is the frame if known, or NULL if not known.  */
 static void
-show_help_event (f, widget, help)
-     FRAME_PTR f;
-     xt_or_gtk_widget widget;
-     Lisp_Object help;
+show_help_event (FRAME_PTR f, xt_or_gtk_widget widget, Lisp_Object help)
 {
   Lisp_Object frame;
 
@@ -787,9 +775,7 @@
 
 #ifdef USE_GTK
 void
-menu_highlight_callback (widget, call_data)
-     GtkWidget *widget;
-     gpointer call_data;
+menu_highlight_callback (GtkWidget *widget, gpointer call_data)
 {
   xg_menu_item_cb_data *cb_data;
   Lisp_Object help;
@@ -839,9 +825,7 @@
    Figure out what the user chose
    and put the appropriate events into the keyboard buffer.  */
 static void
-menubar_selection_callback (widget, client_data)
-     GtkWidget *widget;
-     gpointer client_data;
+menubar_selection_callback (GtkWidget *widget, gpointer client_data)
 {
   xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data;
 
@@ -903,8 +887,7 @@
    changed.  Value is non-zero if widgets were updated.  */
 
 static int
-update_frame_menubar (f)
-     FRAME_PTR f;
+update_frame_menubar (FRAME_PTR f)
 {
 #ifdef USE_GTK
   return xg_update_frame_menubar (f);
@@ -995,10 +978,7 @@
    it is set the first time this is called, from initialize_frame_menubar.  */
 
 void
-set_frame_menubar (f, first_time, deep_p)
-     FRAME_PTR f;
-     int first_time;
-     int deep_p;
+set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
 {
   xt_or_gtk_widget menubar_widget;
 #ifdef USE_X_TOOLKIT
@@ -1087,8 +1067,8 @@
 
       /* Save the frame's previous menu bar contents data.  */
       if (previous_menu_items_used)
-	bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items,
-	       previous_menu_items_used * sizeof (Lisp_Object));
+	memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
+		previous_menu_items_used * sizeof (Lisp_Object));
 
       /* Fill in menu_items with the current menu bar contents.
 	 This can evaluate Lisp code.  */
@@ -1347,8 +1327,7 @@
    is visible.  */
 
 void
-initialize_frame_menubar (f)
-     FRAME_PTR f;
+initialize_frame_menubar (FRAME_PTR f)
 {
   /* This function is called before the first chance to redisplay
      the frame.  It has to be, so the frame will have the right size.  */
@@ -1458,12 +1437,7 @@
 
    Here only X and Y are used.  */
 static void
-menu_position_func (menu, x, y, push_in, user_data)
-     GtkMenu *menu;
-     gint *x;
-     gint *y;
-     gboolean *push_in;
-     gpointer user_data;
+menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data)
 {
   struct next_popup_x_y* data = (struct next_popup_x_y*)user_data;
   GtkRequisition req;
@@ -1484,9 +1458,7 @@
 }
 
 static void
-popup_selection_callback (widget, client_data)
-     GtkWidget *widget;
-     gpointer client_data;
+popup_selection_callback (GtkWidget *widget, gpointer client_data)
 {
   xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data;
 
@@ -1495,8 +1467,7 @@
 }
 
 static Lisp_Object
-pop_down_menu (arg)
-     Lisp_Object arg;
+pop_down_menu (Lisp_Object arg)
 {
   struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
 
@@ -1511,13 +1482,7 @@
    menu pops down.
    menu_item_selection will be set to the selection.  */
 static void
-create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp)
-     FRAME_PTR f;
-     widget_value *first_wv;
-     int x;
-     int y;
-     int for_click;
-     EMACS_UINT timestamp;
+create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, int for_click, EMACS_UINT timestamp)
 {
   int i;
   GtkWidget *menu;
@@ -1977,9 +1942,7 @@
 
 #ifdef USE_GTK
 static void
-dialog_selection_callback (widget, client_data)
-     GtkWidget *widget;
-     gpointer client_data;
+dialog_selection_callback (GtkWidget *widget, gpointer client_data)
 {
   /* The EMACS_INT cast avoids a warning.  There's no problem
      as long as pointers have enough bits to hold small integers.  */
@@ -1993,9 +1956,7 @@
    dialog pops down.
    menu_item_selection will be set to the selection.  */
 static void
-create_and_show_dialog (f, first_wv)
-     FRAME_PTR f;
-     widget_value *first_wv;
+create_and_show_dialog (FRAME_PTR f, widget_value *first_wv)
 {
   GtkWidget *menu;
 
@@ -2092,11 +2053,7 @@
   "button6", "button7", "button8", "button9", "button10" };
 
 static Lisp_Object
-xdialog_show (f, keymaps, title, header, error_name)
-     FRAME_PTR f;
-     int keymaps;
-     Lisp_Object title, header;
-     char **error_name;
+xdialog_show (FRAME_PTR f, int keymaps, Lisp_Object title, Lisp_Object header, char **error_name)
 {
   int i, nb_buttons=0;
   char dialog_name[6];
@@ -2495,12 +2452,10 @@
 	      item_data
 		= (unsigned char *) alloca (maxwidth
 					    + SBYTES (descrip) + 1);
-	      bcopy (SDATA (item_name), item_data,
-		     SBYTES (item_name));
+	      memcpy (item_data, SDATA (item_name), SBYTES (item_name));
 	      for (j = SCHARS (item_name); j < maxwidth; j++)
 		item_data[j] = ' ';
-	      bcopy (SDATA (descrip), item_data + j,
-		     SBYTES (descrip));
+	      memcpy (item_data + j, SDATA (descrip), SBYTES (descrip));
 	      item_data[j + SBYTES (descrip)] = 0;
 	    }
 	  else
@@ -2658,7 +2613,7 @@
 /* Detect if a dialog or menu has been posted.  */
 
 int
-popup_activated ()
+popup_activated (void)
 {
   return popup_activated_flag;
 }
@@ -2677,7 +2632,7 @@
 }
 
 void
-syms_of_xmenu ()
+syms_of_xmenu (void)
 {
   Qdebug_on_next_call = intern_c_string ("debug-on-next-call");
   staticpro (&Qdebug_on_next_call);
--- a/src/xrdb.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xrdb.c	Thu Jul 08 17:09:35 2010 +0900
@@ -50,7 +50,7 @@
 
 #include "lisp.h"
 
-extern char *getenv ();
+extern char *getenv (const char *);
 
 /* This does cause trouble on AIX.  I'm going to take the comment at
    face value.  */
@@ -64,11 +64,11 @@
 extern struct passwd *getpwuid (uid_t);
 extern struct passwd *getpwnam (const char *);
 #else
-extern struct passwd *getpwuid ();
-extern struct passwd *getpwnam ();
+extern struct passwd *getpwuid (uid_t);
+extern struct passwd *getpwnam (const char *);
 #endif
 
-extern char *get_system_name ();
+extern char *get_system_name (void);
 
 /* Make sure not to #include anything after these definitions.  Let's
    not step on anyone's prototypes.  */
@@ -82,8 +82,8 @@
 #define free xfree
 #endif
 
-char *x_get_string_resource ();
-static int file_p ();
+char *x_get_string_resource (XrmDatabase rdb, char *name, char *class);
+static int file_p (char *filename);
 
 
 /* X file search path processing.  */
@@ -98,9 +98,7 @@
    resource, for later use in search path decoding.  If we find no
    such resource, return zero.  */
 char *
-x_get_customization_string (db, name, class)
-     XrmDatabase db;
-     char *name, *class;
+x_get_customization_string (XrmDatabase db, char *name, char *class)
 {
   char *full_name
     = (char *) alloca (strlen (name) + sizeof ("customization") + 3);
@@ -155,10 +153,7 @@
    Return NULL otherwise.  */
 
 static char *
-magic_file_p (string, string_len, class, escaped_suffix, suffix)
-     char *string;
-     int string_len;
-     char *class, *escaped_suffix, *suffix;
+magic_file_p (char *string, int string_len, char *class, char *escaped_suffix, char *suffix)
 {
   char *lang = getenv ("LANG");
 
@@ -238,7 +233,7 @@
 	  path = (char *) realloc (path, path_size);
 	}
 
-      bcopy (next, path + path_len, next_len);
+      memcpy (path + path_len, next, next_len);
       path_len += next_len;
 
       p++;
@@ -264,7 +259,7 @@
 	  path = (char *) realloc (path, path_size);
 	}
 
-      bcopy (suffix, path + path_len, suffix_len);
+      memcpy (path + path_len, suffix, suffix_len);
       path_len += suffix_len;
     }
 
@@ -281,7 +276,7 @@
 
 
 static char *
-gethomedir ()
+gethomedir (void)
 {
   struct passwd *pw;
   char *ptr;
@@ -311,8 +306,7 @@
 
 
 static int
-file_p (filename)
-     char *filename;
+file_p (char *filename)
 {
   struct stat status;
 
@@ -327,8 +321,7 @@
    the path name of the one we found otherwise.  */
 
 static char *
-search_magic_path (search_path, class, escaped_suffix, suffix)
-     char *search_path, *class, *escaped_suffix, *suffix;
+search_magic_path (char *search_path, char *class, char *escaped_suffix, char *suffix)
 {
   register char *s, *p;
 
@@ -363,8 +356,7 @@
 /* Producing databases for individual sources.  */
 
 static XrmDatabase
-get_system_app (class)
-     char *class;
+get_system_app (char *class)
 {
   XrmDatabase db = NULL;
   char *path;
@@ -384,16 +376,14 @@
 
 
 static XrmDatabase
-get_fallback (display)
-     Display *display;
+get_fallback (Display *display)
 {
   return NULL;
 }
 
 
 static XrmDatabase
-get_user_app (class)
-     char *class;
+get_user_app (char *class)
 {
   char *path;
   char *file = 0;
@@ -428,8 +418,7 @@
 
 
 static XrmDatabase
-get_user_db (display)
-     Display *display;
+get_user_db (Display *display)
 {
   XrmDatabase db;
   char *xdefs;
@@ -470,7 +459,7 @@
 }
 
 static XrmDatabase
-get_environ_db ()
+get_environ_db (void)
 {
   XrmDatabase db;
   char *p;
@@ -505,9 +494,7 @@
 /* Load X resources based on the display and a possible -xrm option. */
 
 XrmDatabase
-x_load_resources (display, xrm_string, myname, myclass)
-     Display *display;
-     char *xrm_string, *myname, *myclass;
+x_load_resources (Display *display, char *xrm_string, char *myname, char *myclass)
 {
   XrmDatabase user_database;
   XrmDatabase rdb;
@@ -641,11 +628,7 @@
    and of type TYPE from database RDB.  The value is returned in RET_VALUE. */
 
 int
-x_get_resource (rdb, name, class, expected_type, ret_value)
-     XrmDatabase rdb;
-     char *name, *class;
-     XrmRepresentation expected_type;
-     XrmValue *ret_value;
+x_get_resource (XrmDatabase rdb, char *name, char *class, XrmRepresentation expected_type, XrmValue *ret_value)
 {
   XrmValue value;
   XrmName namelist[100];
@@ -661,7 +644,7 @@
       if (type == x_rm_string)
 	ret_value->addr = (char *) value.addr;
       else
-	bcopy (value.addr, ret_value->addr, ret_value->size);
+	memcpy (ret_value->addr, value.addr, ret_value->size);
 
       return value.size;
     }
@@ -673,9 +656,7 @@
    database RDB. */
 
 char *
-x_get_string_resource (rdb, name, class)
-     XrmDatabase rdb;
-     char *name, *class;
+x_get_string_resource (XrmDatabase rdb, char *name, char *class)
 {
   XrmValue value;
 
--- a/src/xselect.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xselect.c	Thu Jul 08 17:09:35 2010 +0900
@@ -45,44 +45,44 @@
 
 struct prop_location;
 
-static Lisp_Object x_atom_to_symbol P_ ((Display *dpy, Atom atom));
-static Atom symbol_to_x_atom P_ ((struct x_display_info *, Display *,
-				  Lisp_Object));
-static void x_own_selection P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object x_get_local_selection P_ ((Lisp_Object, Lisp_Object, int));
-static void x_decline_selection_request P_ ((struct input_event *));
-static Lisp_Object x_selection_request_lisp_error P_ ((Lisp_Object));
-static Lisp_Object queue_selection_requests_unwind P_ ((Lisp_Object));
-static Lisp_Object some_frame_on_display P_ ((struct x_display_info *));
-static Lisp_Object x_catch_errors_unwind P_ ((Lisp_Object));
-static void x_reply_selection_request P_ ((struct input_event *, int,
-					   unsigned char *, int, Atom));
-static int waiting_for_other_props_on_window P_ ((Display *, Window));
-static struct prop_location *expect_property_change P_ ((Display *, Window,
-							 Atom, int));
-static void unexpect_property_change P_ ((struct prop_location *));
-static Lisp_Object wait_for_property_change_unwind P_ ((Lisp_Object));
-static void wait_for_property_change P_ ((struct prop_location *));
-static Lisp_Object x_get_foreign_selection P_ ((Lisp_Object,
-                                                Lisp_Object,
-                                                Lisp_Object));
-static void x_get_window_property P_ ((Display *, Window, Atom,
-				       unsigned char **, int *,
-				       Atom *, int *, unsigned long *, int));
-static void receive_incremental_selection P_ ((Display *, Window, Atom,
-					       Lisp_Object, unsigned,
-					       unsigned char **, int *,
-					       Atom *, int *, unsigned long *));
-static Lisp_Object x_get_window_property_as_lisp_data P_ ((Display *,
-							   Window, Atom,
-							   Lisp_Object, Atom));
-static Lisp_Object selection_data_to_lisp_data P_ ((Display *, unsigned char *,
-						    int, Atom, int));
-static void lisp_data_to_selection_data P_ ((Display *, Lisp_Object,
-					     unsigned char **, Atom *,
-					     unsigned *, int *, int *));
-static Lisp_Object clean_local_selection_data P_ ((Lisp_Object));
-static void initialize_cut_buffers P_ ((Display *, Window));
+static Lisp_Object x_atom_to_symbol (Display *dpy, Atom atom);
+static Atom symbol_to_x_atom (struct x_display_info *, Display *,
+                              Lisp_Object);
+static void x_own_selection (Lisp_Object, Lisp_Object);
+static Lisp_Object x_get_local_selection (Lisp_Object, Lisp_Object, int);
+static void x_decline_selection_request (struct input_event *);
+static Lisp_Object x_selection_request_lisp_error (Lisp_Object);
+static Lisp_Object queue_selection_requests_unwind (Lisp_Object);
+static Lisp_Object some_frame_on_display (struct x_display_info *);
+static Lisp_Object x_catch_errors_unwind (Lisp_Object);
+static void x_reply_selection_request (struct input_event *, int,
+                                       unsigned char *, int, Atom);
+static int waiting_for_other_props_on_window (Display *, Window);
+static struct prop_location *expect_property_change (Display *, Window,
+                                                     Atom, int);
+static void unexpect_property_change (struct prop_location *);
+static Lisp_Object wait_for_property_change_unwind (Lisp_Object);
+static void wait_for_property_change (struct prop_location *);
+static Lisp_Object x_get_foreign_selection (Lisp_Object,
+                                            Lisp_Object,
+                                            Lisp_Object);
+static void x_get_window_property (Display *, Window, Atom,
+                                   unsigned char **, int *,
+                                   Atom *, int *, unsigned long *, int);
+static void receive_incremental_selection (Display *, Window, Atom,
+                                           Lisp_Object, unsigned,
+                                           unsigned char **, int *,
+                                           Atom *, int *, unsigned long *);
+static Lisp_Object x_get_window_property_as_lisp_data (Display *,
+                                                       Window, Atom,
+                                                       Lisp_Object, Atom);
+static Lisp_Object selection_data_to_lisp_data (Display *, unsigned char *,
+                                                int, Atom, int);
+static void lisp_data_to_selection_data (Display *, Lisp_Object,
+                                         unsigned char **, Atom *,
+                                         unsigned *, int *, int *);
+static Lisp_Object clean_local_selection_data (Lisp_Object);
+static void initialize_cut_buffers (Display *, Window);
 
 
 /* Printing traces to stderr.  */
@@ -183,8 +183,7 @@
 /* Queue up an SELECTION_REQUEST_EVENT *EVENT, to be processed later.  */
 
 static void
-x_queue_event (event)
-     struct input_event *event;
+x_queue_event (struct input_event *event)
 {
   struct selection_event_queue *queue_tmp;
 
@@ -192,7 +191,7 @@
      This only happens for large requests which uses the incremental protocol.  */
   for (queue_tmp = selection_queue; queue_tmp; queue_tmp = queue_tmp->next)
     {
-      if (!bcmp (&queue_tmp->event, event, sizeof (*event)))
+      if (!memcmp (&queue_tmp->event, event, sizeof (*event)))
 	{
 	  TRACE1 ("DECLINE DUP SELECTION EVENT %08lx", (unsigned long)queue_tmp);
 	  x_decline_selection_request (event);
@@ -215,7 +214,7 @@
 /* Start queuing SELECTION_REQUEST_EVENT events.  */
 
 static void
-x_start_queuing_selection_requests ()
+x_start_queuing_selection_requests (void)
 {
   if (x_queue_selection_requests)
     abort ();
@@ -227,7 +226,7 @@
 /* Stop queuing SELECTION_REQUEST_EVENT events.  */
 
 static void
-x_stop_queuing_selection_requests ()
+x_stop_queuing_selection_requests (void)
 {
   TRACE1 ("x_stop_queuing_selection_requests %d", x_queue_selection_requests);
   --x_queue_selection_requests;
@@ -250,10 +249,7 @@
    roundtrip whenever possible.  */
 
 static Atom
-symbol_to_x_atom (dpyinfo, display, sym)
-     struct x_display_info *dpyinfo;
-     Display *display;
-     Lisp_Object sym;
+symbol_to_x_atom (struct x_display_info *dpyinfo, Display *display, Lisp_Object sym)
 {
   Atom val;
   if (NILP (sym))	    return 0;
@@ -297,9 +293,7 @@
    and calls to intern whenever possible.  */
 
 static Lisp_Object
-x_atom_to_symbol (dpy, atom)
-     Display *dpy;
-     Atom atom;
+x_atom_to_symbol (Display *dpy, Atom atom)
 {
   struct x_display_info *dpyinfo;
   char *str;
@@ -382,8 +376,7 @@
    our selection.  */
 
 static void
-x_own_selection (selection_name, selection_value)
-     Lisp_Object selection_name, selection_value;
+x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value)
 {
   struct frame *sf = SELECTED_FRAME ();
   Window selecting_window;
@@ -449,9 +442,7 @@
    This calls random Lisp code, and may signal or gc.  */
 
 static Lisp_Object
-x_get_local_selection (selection_symbol, target_type, local_request)
-     Lisp_Object selection_symbol, target_type;
-     int local_request;
+x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type, int local_request)
 {
   Lisp_Object local_value;
   Lisp_Object handler_fn, value, type, check;
@@ -561,8 +552,7 @@
    meaning we were unable to do what they wanted.  */
 
 static void
-x_decline_selection_request (event)
-     struct input_event *event;
+x_decline_selection_request (struct input_event *event)
 {
   XSelectionEvent reply;
 
@@ -597,8 +587,7 @@
    before we throw to top-level or go into the debugger or whatever.  */
 
 static Lisp_Object
-x_selection_request_lisp_error (ignore)
-     Lisp_Object ignore;
+x_selection_request_lisp_error (Lisp_Object ignore)
 {
   if (x_selection_current_request != 0
       && selection_request_dpyinfo->display)
@@ -607,8 +596,7 @@
 }
 
 static Lisp_Object
-x_catch_errors_unwind (dummy)
-     Lisp_Object dummy;
+x_catch_errors_unwind (Lisp_Object dummy)
 {
   BLOCK_INPUT;
   x_uncatch_errors ();
@@ -634,10 +622,10 @@
   struct prop_location *next;
 };
 
-static struct prop_location *expect_property_change ();
-static void wait_for_property_change ();
-static void unexpect_property_change ();
-static int waiting_for_other_props_on_window ();
+static struct prop_location *expect_property_change (Display *display, Window window, Atom property, int state);
+static void wait_for_property_change (struct prop_location *location);
+static void unexpect_property_change (struct prop_location *location);
+static int waiting_for_other_props_on_window (Display *display, Window window);
 
 static int prop_location_identifier;
 
@@ -648,8 +636,7 @@
 static struct prop_location *property_change_wait_list;
 
 static Lisp_Object
-queue_selection_requests_unwind (tem)
-     Lisp_Object tem;
+queue_selection_requests_unwind (Lisp_Object tem)
 {
   x_stop_queuing_selection_requests ();
   return Qnil;
@@ -659,8 +646,7 @@
    Return nil if there is none.  */
 
 static Lisp_Object
-some_frame_on_display (dpyinfo)
-     struct x_display_info *dpyinfo;
+some_frame_on_display (struct x_display_info *dpyinfo)
 {
   Lisp_Object list, frame;
 
@@ -684,11 +670,7 @@
 #endif  /* TRACE_SELECTION */
 
 static void
-x_reply_selection_request (event, format, data, size, type)
-     struct input_event *event;
-     int format, size;
-     unsigned char *data;
-     Atom type;
+x_reply_selection_request (struct input_event *event, int format, unsigned char *data, int size, Atom type)
 {
   XSelectionEvent reply;
   Display *display = SELECTION_EVENT_DISPLAY (event);
@@ -881,8 +863,7 @@
    This is called from keyboard.c when such an event is found in the queue.  */
 
 static void
-x_handle_selection_request (event)
-     struct input_event *event;
+x_handle_selection_request (struct input_event *event)
 {
   struct gcpro gcpro1, gcpro2, gcpro3;
   Lisp_Object local_selection_data;
@@ -1002,8 +983,7 @@
    This is called from keyboard.c when such an event is found in the queue.  */
 
 static void
-x_handle_selection_clear (event)
-     struct input_event *event;
+x_handle_selection_clear (struct input_event *event)
 {
   Display *display = SELECTION_EVENT_DISPLAY (event);
   Atom selection = SELECTION_EVENT_SELECTION (event);
@@ -1085,8 +1065,7 @@
 }
 
 void
-x_handle_selection_event (event)
-     struct input_event *event;
+x_handle_selection_event (struct input_event *event)
 {
   TRACE0 ("x_handle_selection_event");
 
@@ -1106,8 +1085,7 @@
    We do this when about to delete a frame.  */
 
 void
-x_clear_frame_selections (f)
-     FRAME_PTR f;
+x_clear_frame_selections (FRAME_PTR f)
 {
   Lisp_Object frame;
   Lisp_Object rest;
@@ -1168,9 +1146,7 @@
    are on the list of what we are waiting for.  */
 
 static int
-waiting_for_other_props_on_window (display, window)
-     Display *display;
-     Window window;
+waiting_for_other_props_on_window (Display *display, Window window)
 {
   struct prop_location *rest = property_change_wait_list;
   while (rest)
@@ -1187,11 +1163,7 @@
    this awaited property change.  */
 
 static struct prop_location *
-expect_property_change (display, window, property, state)
-     Display *display;
-     Window window;
-     Atom property;
-     int state;
+expect_property_change (Display *display, Window window, Atom property, int state)
 {
   struct prop_location *pl = (struct prop_location *) xmalloc (sizeof *pl);
   pl->identifier = ++prop_location_identifier;
@@ -1209,8 +1181,7 @@
    IDENTIFIER is the number that uniquely identifies the entry.  */
 
 static void
-unexpect_property_change (location)
-     struct prop_location *location;
+unexpect_property_change (struct prop_location *location)
 {
   struct prop_location *prev = 0, *rest = property_change_wait_list;
   while (rest)
@@ -1232,8 +1203,7 @@
 /* Remove the property change expectation element for IDENTIFIER.  */
 
 static Lisp_Object
-wait_for_property_change_unwind (loc)
-     Lisp_Object loc;
+wait_for_property_change_unwind (Lisp_Object loc)
 {
   struct prop_location *location = XSAVE_VALUE (loc)->pointer;
 
@@ -1247,8 +1217,7 @@
    IDENTIFIER should be the value that expect_property_change returned.  */
 
 static void
-wait_for_property_change (location)
-     struct prop_location *location;
+wait_for_property_change (struct prop_location *location)
 {
   int secs, usecs;
   int count = SPECPDL_INDEX ();
@@ -1286,8 +1255,7 @@
 /* Called from XTread_socket in response to a PropertyNotify event.  */
 
 void
-x_handle_property_notify (event)
-     XPropertyEvent *event;
+x_handle_property_notify (XPropertyEvent *event)
 {
   struct prop_location *prev = 0, *rest = property_change_wait_list;
 
@@ -1378,8 +1346,7 @@
    Converts this to Lisp data and returns it.  */
 
 static Lisp_Object
-x_get_foreign_selection (selection_symbol, target_type, time_stamp)
-     Lisp_Object selection_symbol, target_type, time_stamp;
+x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type, Lisp_Object time_stamp)
 {
   struct frame *sf = SELECTED_FRAME ();
   Window requestor_window;
@@ -1567,7 +1534,7 @@
           elements."
          This applies even if long is more than 32 bits, the X library
          converts from 32 bit elements received from the X server to long
-         and passes the long array to us.  Thus, for that case bcopy can not
+         and passes the long array to us.  Thus, for that case memcpy can not
          be used.  We convert to a 32 bit type here, because so much code
          assume on that.
 
@@ -1589,7 +1556,7 @@
       else
         {
           *actual_size_ret *= *actual_format_ret / 8;
-          bcopy (tmp_data, (*data_ret) + offset, *actual_size_ret);
+          memcpy ((*data_ret) + offset, tmp_data, *actual_size_ret);
           offset += *actual_size_ret;
         }
 
@@ -1691,7 +1658,7 @@
 	  *data_ret = (unsigned char *) xrealloc (*data_ret, *size_bytes_ret);
 	}
 
-      bcopy (tmp_data, (*data_ret) + offset, tmp_size_bytes);
+      memcpy ((*data_ret) + offset, tmp_data, tmp_size_bytes);
       offset += tmp_size_bytes;
 
       /* Use xfree, not XFree, because x_get_window_property
@@ -1809,11 +1776,7 @@
 
 
 static Lisp_Object
-selection_data_to_lisp_data (display, data, size, type, format)
-     Display *display;
-     unsigned char *data;
-     Atom type;
-     int size, format;
+selection_data_to_lisp_data (Display *display, unsigned char *data, int size, Atom type, int format)
 {
   struct x_display_info *dpyinfo = x_display_info_for_display (display);
 
@@ -2071,8 +2034,7 @@
 }
 
 static Lisp_Object
-clean_local_selection_data (obj)
-     Lisp_Object obj;
+clean_local_selection_data (Lisp_Object obj)
 {
   if (CONSP (obj)
       && INTEGERP (XCAR (obj))
@@ -2112,8 +2074,7 @@
    We store t there if the reply is successful, lambda if not.  */
 
 void
-x_handle_selection_notify (event)
-     XSelectionEvent *event;
+x_handle_selection_notify (XSelectionEvent *event)
 {
   if (event->requestor != reading_selection_window)
     return;
@@ -2254,8 +2215,7 @@
    This is used when we kill a buffer.  */
 
 void
-x_disown_buffer_selections (buffer)
-     Lisp_Object buffer;
+x_disown_buffer_selections (Lisp_Object buffer)
 {
   Lisp_Object tail;
   struct buffer *buf = XBUFFER (buffer);
@@ -2332,9 +2292,7 @@
 
 /* Ensure that all 8 cut buffers exist.  ICCCM says we gotta...  */
 static void
-initialize_cut_buffers (display, window)
-     Display *display;
-     Window window;
+initialize_cut_buffers (Display *display, Window window)
 {
   unsigned char *data = (unsigned char *) "";
   BLOCK_INPUT;
@@ -2530,8 +2488,7 @@
    bit parts of a 32 bit number).  */
 
 int
-x_check_property_data (data)
-     Lisp_Object data;
+x_check_property_data (Lisp_Object data)
 {
   Lisp_Object iter;
   int size = 0;
@@ -2564,11 +2521,7 @@
    XClientMessageEvent).  */
 
 void
-x_fill_property_data (dpy, data, ret, format)
-     Display *dpy;
-     Lisp_Object data;
-     void *ret;
-     int format;
+x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format)
 {
   long val;
   long  *d32 = (long  *) ret;
@@ -2620,12 +2573,7 @@
    Also see comment for selection_data_to_lisp_data above.  */
 
 Lisp_Object
-x_property_data_to_lisp (f, data, type, format, size)
-     struct frame *f;
-     unsigned char *data;
-     Atom type;
-     int format;
-     unsigned long size;
+x_property_data_to_lisp (struct frame *f, unsigned char *data, Atom type, int format, long unsigned int size)
 {
   return selection_data_to_lisp_data (FRAME_X_DISPLAY (f),
                                       data, size*format/8, type, format);
@@ -2634,10 +2582,7 @@
 /* Get the mouse position in frame relative coordinates.  */
 
 static void
-mouse_position_for_drop (f, x, y)
-     FRAME_PTR f;
-     int *x;
-     int *y;
+mouse_position_for_drop (FRAME_PTR f, int *x, int *y)
 {
   Window root, dummy_window;
   int dummy;
@@ -2759,11 +2704,7 @@
 /* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT.  */
 
 int
-x_handle_dnd_message (f, event, dpyinfo, bufp)
-     struct frame *f;
-     XClientMessageEvent *event;
-     struct x_display_info *dpyinfo;
-     struct input_event *bufp;
+x_handle_dnd_message (struct frame *f, XClientMessageEvent *event, struct x_display_info *dpyinfo, struct input_event *bufp)
 {
   Lisp_Object vec;
   Lisp_Object frame;
@@ -2935,7 +2876,7 @@
 
 
 void
-syms_of_xselect ()
+syms_of_xselect (void)
 {
   defsubr (&Sx_get_selection_internal);
   defsubr (&Sx_own_selection_internal);
--- a/src/xsettings.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xsettings.c	Thu Jul 08 17:09:35 2010 +0900
@@ -54,9 +54,7 @@
 
 
 static void
-store_config_changed_event (arg, display_name)
-     Lisp_Object arg;
-     Lisp_Object display_name;
+store_config_changed_event (Lisp_Object arg, Lisp_Object display_name)
 {
   struct input_event event;
   EVENT_INIT (event);
@@ -102,11 +100,10 @@
    that is SYSTEM_MONO_FONT.  */
 
 static void
-something_changedCB (client, cnxn_id, entry, user_data)
-     GConfClient *client;
-     guint cnxn_id;
-     GConfEntry *entry;
-     gpointer user_data;
+something_changedCB (GConfClient *client,
+                     guint cnxn_id,
+                     GConfEntry *entry,
+                     gpointer user_data)
 {
   GConfValue *v = gconf_entry_get_value (entry);
   
@@ -114,7 +111,6 @@
   if (v->type == GCONF_VALUE_STRING)
     {
       const char *value = gconf_value_get_string (v);
-      int i;
       if (current_mono_font != NULL && strcmp (value, current_mono_font) == 0)
         return; /* No change. */
 
@@ -156,8 +152,7 @@
 /* Find the window that contains the XSETTINGS property values.  */
 
 static void
-get_prop_window (dpyinfo)
-     struct x_display_info *dpyinfo;
+get_prop_window (struct x_display_info *dpyinfo)
 {
   Display *dpy = dpyinfo->display;
 
@@ -229,10 +224,9 @@
 */
 
 static int
-parse_settings (prop, bytes, settings)
-     unsigned char *prop;
-     unsigned long bytes;
-     struct xsettings *settings;
+parse_settings (unsigned char *prop,
+                long unsigned int bytes,
+                struct xsettings *settings)
 {
   Lisp_Object byteorder = Fbyteorder ();
   int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst;
@@ -402,11 +396,8 @@
 }
 
 static int
-read_settings (dpyinfo, settings)
-     struct x_display_info *dpyinfo;
-     struct xsettings *settings;
+read_settings (struct x_display_info *dpyinfo, struct xsettings *settings)
 {
-  long long_len;
   Atom act_type;
   int act_form;
   unsigned long nitems, bytes_after;
@@ -435,10 +426,9 @@
 
 
 static void
-apply_xft_settings (dpyinfo, send_event_p, settings)
-     struct x_display_info *dpyinfo;
-     int send_event_p;
-     struct xsettings *settings;
+apply_xft_settings (struct x_display_info *dpyinfo,
+                    int send_event_p,
+                    struct xsettings *settings)
 {
 #ifdef HAVE_XFT
   FcPattern *pat;
@@ -546,9 +536,7 @@
 }
 
 static void
-read_and_apply_settings (dpyinfo, send_event_p)
-     struct x_display_info *dpyinfo;
-     int send_event_p;
+read_and_apply_settings (struct x_display_info *dpyinfo, int send_event_p)
 {
   struct xsettings settings;
   Lisp_Object dpyname = XCAR (dpyinfo->name_list_element);
@@ -592,9 +580,7 @@
 }
 
 void
-xft_settings_event (dpyinfo, event)
-     struct x_display_info *dpyinfo;
-     XEvent *event;
+xft_settings_event (struct x_display_info *dpyinfo, XEvent *event)
 {
   int check_window_p = 0;
   int apply_settings = 0;
@@ -636,10 +622,9 @@
 
 
 static void
-init_gconf ()
+init_gconf (void)
 {
 #if defined (HAVE_GCONF) && defined (HAVE_XFT)
-  int i;
   char *s;
 
   g_type_init ();
@@ -669,8 +654,7 @@
 }
 
 static void
-init_xsettings (dpyinfo)
-     struct x_display_info *dpyinfo;
+init_xsettings (struct x_display_info *dpyinfo)
 {
   char sel[64];
   Display *dpy = dpyinfo->display;
@@ -696,8 +680,7 @@
 }
 
 void
-xsettings_initialize (dpyinfo)
-     struct x_display_info *dpyinfo;
+xsettings_initialize (struct x_display_info *dpyinfo)
 {
   if (first_dpyinfo == NULL) first_dpyinfo = dpyinfo;
   init_gconf ();
@@ -705,13 +688,13 @@
 }
 
 const char *
-xsettings_get_system_font ()
+xsettings_get_system_font (void)
 {
   return current_mono_font;
 }
 
 const char *
-xsettings_get_system_normal_font ()
+xsettings_get_system_normal_font (void)
 {
   return current_font;
 }
@@ -755,7 +738,7 @@
 }
 
 void
-syms_of_xsettings ()
+syms_of_xsettings (void)
 {
   current_mono_font = NULL;
   current_font = NULL;
--- a/src/xsettings.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xsettings.h	Thu Jul 08 17:09:35 2010 +0900
@@ -24,11 +24,11 @@
 EXFUN (Ffont_get_system_normal_font, 0);
 EXFUN (Ftool_bar_get_system_style, 0);
 
-extern void xsettings_initialize P_ ((struct x_display_info *dpyinfo));
-extern void xft_settings_event P_ ((struct x_display_info *dpyinfo,
-                                    XEvent *));
-extern const char *xsettings_get_system_font P_ ((void));
-extern const char *xsettings_get_system_normal_font P_ ((void));
+extern void xsettings_initialize (struct x_display_info *dpyinfo);
+extern void xft_settings_event (struct x_display_info *dpyinfo,
+                                XEvent *);
+extern const char *xsettings_get_system_font (void);
+extern const char *xsettings_get_system_normal_font (void);
 
 
 #endif /* XSETTINGS_H */
--- a/src/xsmfns.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xsmfns.c	Thu Jul 08 17:09:35 2010 +0900
@@ -42,6 +42,9 @@
 #include "termopts.h"
 #include "xterm.h"
 
+/* Avoid "differ in sign" warnings */
+#define SSDATA(x)  ((char *) SDATA (x))
+
 /* The user login name.  */
 
 extern Lisp_Object Vuser_login_name;
@@ -95,7 +98,7 @@
 #define CHDIR_OPT "--chdir="
 
 static void
-ice_connection_closed ()
+ice_connection_closed (void)
 {
   if (ice_fd >= 0)
     delete_keyboard_wait_descriptor (ice_fd);
@@ -108,8 +111,7 @@
    Otherwise returns 1 if SAVE_SESSION_EVENT is stored in buffer BUFP.  */
 
 int
-x_session_check_input (bufp)
-     struct input_event *bufp;
+x_session_check_input (struct input_event *bufp)
 {
   SELECT_TYPE read_fds;
   EMACS_TIME tmout;
@@ -152,7 +154,7 @@
   /* Check if smc_interact_CB was called and we shall generate a
      SAVE_SESSION_EVENT.  */
   if (emacs_event.kind != NO_EVENT)
-    bcopy (&emacs_event, bufp, sizeof (struct input_event));
+    memcpy (bufp, &emacs_event, sizeof (struct input_event));
 
   return emacs_event.kind != NO_EVENT ? 1 : 0;
 }
@@ -160,7 +162,7 @@
 /* Return non-zero if we have a connection to a session manager.  */
 
 int
-x_session_have_connection ()
+x_session_have_connection (void)
 {
   return ice_fd != -1;
 }
@@ -170,9 +172,7 @@
    Then lisp code can interact with the user.  */
 
 static void
-smc_interact_CB (smcConn, clientData)
-     SmcConn smcConn;
-     SmPointer clientData;
+smc_interact_CB (SmcConn smcConn, SmPointer clientData)
 {
   doing_interact = True;
   emacs_event.kind = SAVE_SESSION_EVENT;
@@ -187,18 +187,12 @@
    we do so, because we don't know what the lisp code might do.  */
 
 static void
-smc_save_yourself_CB (smcConn,
-                      clientData,
-                      saveType,
-                      shutdown,
-                      interactStyle,
-                      fast)
-     SmcConn smcConn;
-     SmPointer clientData;
-     int saveType;
-     Bool shutdown;
-     int interactStyle;
-     Bool fast;
+smc_save_yourself_CB (SmcConn smcConn,
+		      SmPointer clientData,
+		      int saveType,
+		      Bool shutdown,
+		      int interactStyle,
+		      Bool fast)
 {
 #define NR_PROPS 5
 
@@ -228,7 +222,7 @@
   props[props_idx]->type = SmARRAY8;
   props[props_idx]->num_vals = 1;
   props[props_idx]->vals = &values[val_idx++];
-  props[props_idx]->vals[0].length = strlen (SDATA (Vinvocation_name));
+  props[props_idx]->vals[0].length = strlen (SSDATA (Vinvocation_name));
   props[props_idx]->vals[0].value = SDATA (Vinvocation_name);
   ++props_idx;
 
@@ -272,7 +266,7 @@
   props[props_idx]->type = SmARRAY8;
   props[props_idx]->num_vals = 1;
   props[props_idx]->vals = &values[val_idx++];
-  props[props_idx]->vals[0].length = strlen (SDATA (Vuser_login_name));
+  props[props_idx]->vals[0].length = strlen (SSDATA (Vuser_login_name));
   props[props_idx]->vals[0].value = SDATA (Vuser_login_name);
   ++props_idx;
 
@@ -311,9 +305,7 @@
 /* According to the SM specification, this shall close the connection.  */
 
 static void
-smc_die_CB (smcConn, clientData)
-     SmcConn smcConn;
-     SmPointer clientData;
+smc_die_CB (SmcConn smcConn, SmPointer clientData)
 {
   SmcCloseConnection (smcConn, 0, 0);
   ice_connection_closed ();
@@ -326,17 +318,13 @@
    even seem necessary.  */
 
 static void
-smc_save_complete_CB (smcConn, clientData)
-     SmcConn smcConn;
-     SmPointer clientData;
+smc_save_complete_CB (SmcConn smcConn, SmPointer clientData)
 {
   /* Empty */
 }
 
 static void
-smc_shutdown_cancelled_CB (smcConn, clientData)
-     SmcConn smcConn;
-     SmPointer clientData;
+smc_shutdown_cancelled_CB (SmcConn smcConn, SmPointer clientData)
 {
   /* Empty */
 }
@@ -345,47 +333,32 @@
    because there is some error in the session management.  */
 
 static void
-smc_error_handler (smcConn,
-                   swap,
-                   offendingMinorOpcode,
-                   offendingSequence,
-                   errorClass,
-                   severity,
-                   values)
-     SmcConn smcConn;
-     Bool swap;
-     int offendingMinorOpcode;
-     unsigned long offendingSequence;
-     int errorClass;
-     int severity;
-     SmPointer values;
+smc_error_handler (SmcConn smcConn,
+		   Bool swap,
+		   int offendingMinorOpcode,
+		   unsigned long offendingSequence,
+		   int errorClass,
+		   int severity,
+		   SmPointer values)
 {
   /* Empty  */
 }
 
 static void
-ice_error_handler (iceConn,
-                   swap,
-                   offendingMinorOpcode,
-                   offendingSequence,
-                   errorClass,
-                   severity,
-                   values)
-     IceConn iceConn;
-     Bool swap;
-     int offendingMinorOpcode;
-     unsigned long offendingSequence;
-     int errorClass;
-     int severity;
-     IcePointer values;
+ice_error_handler (IceConn iceConn,
+		   Bool swap,
+		   int offendingMinorOpcode,
+		   unsigned long offendingSequence,
+		   int errorClass,
+		   int severity,
+		   IcePointer values)
 {
   /* Empty  */
 }
 
 
 static void
-ice_io_error_handler (iceConn)
-     IceConn iceConn;
+ice_io_error_handler (IceConn iceConn)
 {
   /* Connection probably gone.  */
   ice_connection_closed ();
@@ -395,11 +368,7 @@
    uses ICE as it transport protocol.  */
 
 static void
-ice_conn_watch_CB (iceConn, clientData, opening, watchData)
-     IceConn iceConn;
-     IcePointer clientData;
-     Bool opening;
-     IcePointer *watchData;
+ice_conn_watch_CB (IceConn iceConn, IcePointer clientData, int opening, IcePointer *watchData)
 {
   if (! opening)
     {
@@ -422,10 +391,9 @@
 
 /* Create the client leader window.  */
 
+#ifndef USE_GTK
 static void
-create_client_leader_window (dpyinfo, client_id)
-     struct x_display_info *dpyinfo;
-     char *client_id;
+create_client_leader_window (struct x_display_info *dpyinfo, char *client_id)
 {
   Window w;
   XClassHint class_hints;
@@ -443,16 +411,17 @@
 
   sm_id = XInternAtom (dpyinfo->display, "SM_CLIENT_ID", False);
   XChangeProperty (dpyinfo->display, w, sm_id, XA_STRING, 8, PropModeReplace,
-                   client_id, strlen (client_id));
+                   (unsigned char *)client_id, strlen (client_id));
 
   dpyinfo->client_leader_window = w;
 }
+#endif /* ! USE_GTK */
+
 
 /* Try to open a connection to the session manager.  */
 
 void
-x_session_initialize (dpyinfo)
-     struct x_display_info *dpyinfo;
+x_session_initialize (struct x_display_info *dpyinfo)
 {
 #define SM_ERRORSTRING_LEN 512
   char errorstring[SM_ERRORSTRING_LEN];
@@ -466,12 +435,12 @@
   /* Check if we where started by the session manager.  If so, we will
      have a previous id.  */
   if (! EQ (Vx_session_previous_id, Qnil) && STRINGP (Vx_session_previous_id))
-    previous_id = SDATA (Vx_session_previous_id);
+    previous_id = SSDATA (Vx_session_previous_id);
 
   /* Construct the path to the Emacs program.  */
   if (! EQ (Vinvocation_directory, Qnil))
-    name_len += strlen (SDATA (Vinvocation_directory));
-  name_len += strlen (SDATA (Vinvocation_name));
+    name_len += strlen (SSDATA (Vinvocation_directory));
+  name_len += strlen (SSDATA (Vinvocation_name));
 
   /* This malloc will not be freed, but it is only done once, and hopefully
      not very large   */
@@ -479,8 +448,8 @@
   emacs_program[0] = '\0';
 
   if (! EQ (Vinvocation_directory, Qnil))
-    strcpy (emacs_program, SDATA (Vinvocation_directory));
-  strcat (emacs_program, SDATA (Vinvocation_name));
+    strcpy (emacs_program, SSDATA (Vinvocation_directory));
+  strcat (emacs_program, SSDATA (Vinvocation_name));
 
   /* The SM protocol says all callbacks are mandatory, so set up all
      here and in the mask passed to SmcOpenConnection.  */
@@ -532,7 +501,7 @@
 /* Ensure that the session manager is not contacted again. */
 
 void
-x_session_close ()
+x_session_close (void)
 {
   ice_connection_closed ();
 }
@@ -575,7 +544,7 @@
 			    Initialization
  ***********************************************************************/
 void
-syms_of_xsmfns ()
+syms_of_xsmfns (void)
 {
   DEFVAR_LISP ("x-session-id", &Vx_session_id,
     doc: /* The session id Emacs got from the session manager for this session.
--- a/src/xterm.c	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xterm.c	Thu Jul 08 17:09:35 2010 +0900
@@ -104,13 +104,13 @@
 #endif
 
 #ifdef USE_LUCID
-extern int xlwmenu_window_p P_ ((Widget w, Window window));
-extern void xlwmenu_redisplay P_ ((Widget));
+extern int xlwmenu_window_p (Widget w, Window window);
+extern void xlwmenu_redisplay (Widget);
 #endif
 
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
 
-extern void free_frame_menubar P_ ((struct frame *));
+extern void free_frame_menubar (struct frame *);
 #endif
 
 #ifdef USE_X_TOOLKIT
@@ -332,61 +332,60 @@
 
 extern Lisp_Object Vinhibit_redisplay;
 
-extern XrmDatabase x_load_resources P_ ((Display *, char *, char *, char *));
-extern int x_bitmap_mask P_ ((FRAME_PTR, int));
-
-static int x_alloc_nearest_color_1 P_ ((Display *, Colormap, XColor *));
-static void x_set_window_size_1 P_ ((struct frame *, int, int, int));
-static const XColor *x_color_cells P_ ((Display *, int *));
-static void x_update_window_end P_ ((struct window *, int, int));
-
-static int x_io_error_quitter P_ ((Display *));
-static struct terminal *x_create_terminal P_ ((struct x_display_info *));
-void x_delete_terminal P_ ((struct terminal *));
-static void x_update_end P_ ((struct frame *));
-static void XTframe_up_to_date P_ ((struct frame *));
-static void XTset_terminal_modes P_ ((struct terminal *));
-static void XTreset_terminal_modes P_ ((struct terminal *));
-static void x_clear_frame P_ ((struct frame *));
-static void frame_highlight P_ ((struct frame *));
-static void frame_unhighlight P_ ((struct frame *));
-static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *));
-static void  x_focus_changed P_ ((int, int, struct x_display_info *,
-				  struct frame *, struct input_event *));
-static void x_detect_focus_change P_ ((struct x_display_info *,
-                                       XEvent *, struct input_event *));
-static void XTframe_rehighlight P_ ((struct frame *));
-static void x_frame_rehighlight P_ ((struct x_display_info *));
-static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
-static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int,
-				   enum text_cursor_kinds));
-
-static void x_clip_to_row P_ ((struct window *, struct glyph_row *, int, GC));
-static void x_flush P_ ((struct frame *f));
-static void x_update_begin P_ ((struct frame *));
-static void x_update_window_begin P_ ((struct window *));
-static void x_after_update_window_line P_ ((struct glyph_row *));
-static struct scroll_bar *x_window_to_scroll_bar P_ ((Display *, Window));
-static void x_scroll_bar_report_motion P_ ((struct frame **, Lisp_Object *,
-					    enum scroll_bar_part *,
-					    Lisp_Object *, Lisp_Object *,
-					    unsigned long *));
-static void x_handle_net_wm_state P_ ((struct frame *, XPropertyEvent *));
-static void x_check_fullscreen P_ ((struct frame *));
-static void x_check_expected_move P_ ((struct frame *, int, int));
-static void x_sync_with_move P_ ((struct frame *, int, int, int));
-static int handle_one_xevent P_ ((struct x_display_info *, XEvent *,
-				  int *, struct input_event *));
+extern XrmDatabase x_load_resources (Display *, char *, char *, char *);
+extern int x_bitmap_mask (FRAME_PTR, int);
+
+static int x_alloc_nearest_color_1 (Display *, Colormap, XColor *);
+static void x_set_window_size_1 (struct frame *, int, int, int);
+static const XColor *x_color_cells (Display *, int *);
+static void x_update_window_end (struct window *, int, int);
+
+static int x_io_error_quitter (Display *);
+static struct terminal *x_create_terminal (struct x_display_info *);
+void x_delete_terminal (struct terminal *);
+static void x_update_end (struct frame *);
+static void XTframe_up_to_date (struct frame *);
+static void XTset_terminal_modes (struct terminal *);
+static void XTreset_terminal_modes (struct terminal *);
+static void x_clear_frame (struct frame *);
+static void frame_highlight (struct frame *);
+static void frame_unhighlight (struct frame *);
+static void x_new_focus_frame (struct x_display_info *, struct frame *);
+static void  x_focus_changed (int, int, struct x_display_info *,
+                              struct frame *, struct input_event *);
+static void x_detect_focus_change (struct x_display_info *,
+                                   XEvent *, struct input_event *);
+static void XTframe_rehighlight (struct frame *);
+static void x_frame_rehighlight (struct x_display_info *);
+static void x_draw_hollow_cursor (struct window *, struct glyph_row *);
+static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
+                               enum text_cursor_kinds);
+
+static void x_clip_to_row (struct window *, struct glyph_row *, int, GC);
+static void x_flush (struct frame *f);
+static void x_update_begin (struct frame *);
+static void x_update_window_begin (struct window *);
+static void x_after_update_window_line (struct glyph_row *);
+static struct scroll_bar *x_window_to_scroll_bar (Display *, Window);
+static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *,
+                                        enum scroll_bar_part *,
+                                        Lisp_Object *, Lisp_Object *,
+                                        unsigned long *);
+static void x_handle_net_wm_state (struct frame *, XPropertyEvent *);
+static void x_check_fullscreen (struct frame *);
+static void x_check_expected_move (struct frame *, int, int);
+static void x_sync_with_move (struct frame *, int, int, int);
+static int handle_one_xevent (struct x_display_info *, XEvent *,
+                              int *, struct input_event *);
 /* Don't declare this NO_RETURN because we want no
    interference with debugging failing X calls.  */
-static SIGTYPE x_connection_closed P_ ((Display *, char *));
+static SIGTYPE x_connection_closed (Display *, char *);
 
 
 /* Flush display of frame F, or of all frames if F is null.  */
 
 static void
-x_flush (f)
-     struct frame *f;
+x_flush (struct frame *f)
 {
   /* Don't call XFlush when it is not safe to redisplay; the X
      connection may be broken.  */
@@ -455,8 +454,7 @@
 /* Return the struct x_display_info corresponding to DPY.  */
 
 struct x_display_info *
-x_display_info_for_display (dpy)
-     Display *dpy;
+x_display_info_for_display (Display *dpy)
 {
   struct x_display_info *dpyinfo;
 
@@ -471,8 +469,7 @@
 #define OPACITY "_NET_WM_WINDOW_OPACITY"
 
 void
-x_set_frame_alpha (f)
-     struct frame *f;
+x_set_frame_alpha (struct frame *f)
 {
   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   Display *dpy = FRAME_X_DISPLAY (f);
@@ -484,7 +481,7 @@
   if (FRAME_X_DISPLAY_INFO (f)->root_window != FRAME_X_OUTPUT (f)->parent_desc)
     /* Since the WM decoration lies under the FRAME_OUTER_WINDOW,
        we must treat the former instead of the latter. */
-    win = FRAME_X_OUTPUT(f)->parent_desc;
+    win = FRAME_X_OUTPUT (f)->parent_desc;
 
   if (dpyinfo->x_highlight_frame == f)
     alpha = f->alpha[0];
@@ -513,10 +510,10 @@
     unsigned long n, left;
 
     x_catch_errors (dpy);
-    rc = XGetWindowProperty(dpy, win, XInternAtom(dpy, OPACITY, False),
-			    0L, 1L, False, XA_CARDINAL,
-			    &actual, &format, &n, &left,
-			    &data);
+    rc = XGetWindowProperty (dpy, win, XInternAtom(dpy, OPACITY, False),
+			     0L, 1L, False, XA_CARDINAL,
+			     &actual, &format, &n, &left,
+			     &data);
 
     if (rc == Success && actual != None)
       if (*(unsigned long *)data == opac)
@@ -538,15 +535,13 @@
 }
 
 int
-x_display_pixel_height (dpyinfo)
-     struct x_display_info *dpyinfo;
+x_display_pixel_height (struct x_display_info *dpyinfo)
 {
   return HeightOfScreen (dpyinfo->screen);
 }
 
 int
-x_display_pixel_width (dpyinfo)
-     struct x_display_info *dpyinfo;
+x_display_pixel_width (struct x_display_info *dpyinfo)
 {
   return WidthOfScreen (dpyinfo->screen);
 }
@@ -563,8 +558,7 @@
    because all interesting stuff is done on a window basis.  */
 
 static void
-x_update_begin (f)
-     struct frame *f;
+x_update_begin (struct frame *f)
 {
   /* Nothing to do.  */
 }
@@ -575,8 +569,7 @@
    position of W.  */
 
 static void
-x_update_window_begin (w)
-     struct window *w;
+x_update_window_begin (struct window *w)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   struct x_display_info *display_info = FRAME_X_DISPLAY_INFO (f);
@@ -604,9 +597,7 @@
 /* Draw a vertical window border from (x,y0) to (x,y1)  */
 
 static void
-x_draw_vertical_window_border (w, x, y0, y1)
-     struct window *w;
-     int x, y0, y1;
+x_draw_vertical_window_border (struct window *w, int x, int y0, int y1)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   struct face *face;
@@ -634,9 +625,7 @@
    here.  */
 
 static void
-x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
-     struct window *w;
-     int cursor_on_p, mouse_face_overwritten_p;
+x_update_window_end (struct window *w, int cursor_on_p, int mouse_face_overwritten_p)
 {
   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
 
@@ -672,8 +661,7 @@
    update_end.  */
 
 static void
-x_update_end (f)
-     struct frame *f;
+x_update_end (struct frame *f)
 {
   /* Mouse highlight may be displayed again.  */
   FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0;
@@ -691,8 +679,7 @@
    updated_window is not available here.  */
 
 static void
-XTframe_up_to_date (f)
-     struct frame *f;
+XTframe_up_to_date (struct frame *f)
 {
   if (FRAME_X_P (f))
     {
@@ -721,8 +708,7 @@
    between bitmaps to be drawn between current row and DESIRED_ROW.  */
 
 static void
-x_after_update_window_line (desired_row)
-     struct glyph_row *desired_row;
+x_after_update_window_line (struct glyph_row *desired_row)
 {
   struct window *w = updated_window;
   struct frame *f;
@@ -760,10 +746,7 @@
 }
 
 static void
-x_draw_fringe_bitmap (w, row, p)
-     struct window *w;
-     struct glyph_row *row;
-     struct draw_fringe_bitmap_params *p;
+x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fringe_bitmap_params *p)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   Display *display = FRAME_X_DISPLAY (f);
@@ -931,37 +914,37 @@
 
 
 
-static void x_set_glyph_string_clipping P_ ((struct glyph_string *));
-static void x_set_glyph_string_gc P_ ((struct glyph_string *));
-static void x_draw_glyph_string_background P_ ((struct glyph_string *,
-						int));
-static void x_draw_glyph_string_foreground P_ ((struct glyph_string *));
-static void x_draw_composite_glyph_string_foreground P_ ((struct glyph_string *));
-static void x_draw_glyph_string_box P_ ((struct glyph_string *));
-static void x_draw_glyph_string  P_ ((struct glyph_string *));
-static void x_compute_glyph_string_overhangs P_ ((struct glyph_string *));
-static void x_set_cursor_gc P_ ((struct glyph_string *));
-static void x_set_mode_line_face_gc P_ ((struct glyph_string *));
-static void x_set_mouse_face_gc P_ ((struct glyph_string *));
-static int x_alloc_lighter_color P_ ((struct frame *, Display *, Colormap,
-				      unsigned long *, double, int));
-static void x_setup_relief_color P_ ((struct frame *, struct relief *,
-				      double, int, unsigned long));
-static void x_setup_relief_colors P_ ((struct glyph_string *));
-static void x_draw_image_glyph_string P_ ((struct glyph_string *));
-static void x_draw_image_relief P_ ((struct glyph_string *));
-static void x_draw_image_foreground P_ ((struct glyph_string *));
-static void x_draw_image_foreground_1 P_ ((struct glyph_string *, Pixmap));
-static void x_clear_glyph_string_rect P_ ((struct glyph_string *, int,
-					   int, int, int));
-static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int,
-				    int, int, int, int, int, int,
-				    XRectangle *));
-static void x_draw_box_rect P_ ((struct glyph_string *, int, int, int, int,
-				 int, int, int, XRectangle *));
+static void x_set_glyph_string_clipping (struct glyph_string *);
+static void x_set_glyph_string_gc (struct glyph_string *);
+static void x_draw_glyph_string_background (struct glyph_string *,
+                                            int);
+static void x_draw_glyph_string_foreground (struct glyph_string *);
+static void x_draw_composite_glyph_string_foreground (struct glyph_string *);
+static void x_draw_glyph_string_box (struct glyph_string *);
+static void x_draw_glyph_string  (struct glyph_string *);
+static void x_compute_glyph_string_overhangs (struct glyph_string *);
+static void x_set_cursor_gc (struct glyph_string *);
+static void x_set_mode_line_face_gc (struct glyph_string *);
+static void x_set_mouse_face_gc (struct glyph_string *);
+static int x_alloc_lighter_color (struct frame *, Display *, Colormap,
+                                  unsigned long *, double, int);
+static void x_setup_relief_color (struct frame *, struct relief *,
+                                  double, int, unsigned long);
+static void x_setup_relief_colors (struct glyph_string *);
+static void x_draw_image_glyph_string (struct glyph_string *);
+static void x_draw_image_relief (struct glyph_string *);
+static void x_draw_image_foreground (struct glyph_string *);
+static void x_draw_image_foreground_1 (struct glyph_string *, Pixmap);
+static void x_clear_glyph_string_rect (struct glyph_string *, int,
+                                       int, int, int);
+static void x_draw_relief_rect (struct frame *, int, int, int, int,
+                                int, int, int, int, int, int,
+                                XRectangle *);
+static void x_draw_box_rect (struct glyph_string *, int, int, int, int,
+                             int, int, int, XRectangle *);
 
 #if GLYPH_DEBUG
-static void x_check_font P_ ((struct frame *, struct font *));
+static void x_check_font (struct frame *, struct font *);
 #endif
 
 
@@ -969,8 +952,7 @@
    face.  */
 
 static void
-x_set_cursor_gc (s)
-     struct glyph_string *s;
+x_set_cursor_gc (struct glyph_string *s)
 {
   if (s->font == FRAME_FONT (s->f)
       && s->face->background == FRAME_BACKGROUND_PIXEL (s->f)
@@ -1021,8 +1003,7 @@
 /* Set up S->gc of glyph string S for drawing text in mouse face.  */
 
 static void
-x_set_mouse_face_gc (s)
-     struct glyph_string *s;
+x_set_mouse_face_gc (struct glyph_string *s)
 {
   int face_id;
   struct face *face;
@@ -1073,8 +1054,7 @@
    matrix was built, so there isn't much to do, here.  */
 
 static INLINE void
-x_set_mode_line_face_gc (s)
-     struct glyph_string *s;
+x_set_mode_line_face_gc (struct glyph_string *s)
 {
   s->gc = s->face->gc;
 }
@@ -1085,8 +1065,7 @@
    pattern.  */
 
 static INLINE void
-x_set_glyph_string_gc (s)
-     struct glyph_string *s;
+x_set_glyph_string_gc (struct glyph_string *s)
 {
   PREPARE_FACE_FOR_DISPLAY (s->f, s->face);
 
@@ -1131,8 +1110,7 @@
    line or menu if we don't have X toolkit support.  */
 
 static INLINE void
-x_set_glyph_string_clipping (s)
-     struct glyph_string *s;
+x_set_glyph_string_clipping (struct glyph_string *s)
 {
   XRectangle *r = s->clip;
   int n = get_glyph_string_clip_rects (s, r, 2);
@@ -1148,8 +1126,7 @@
    the area of SRC.  */
 
 static void
-x_set_glyph_string_clipping_exactly (src, dst)
-     struct glyph_string *src, *dst;
+x_set_glyph_string_clipping_exactly (struct glyph_string *src, struct glyph_string *dst)
 {
   XRectangle r;
 
@@ -1167,8 +1144,7 @@
    Compute left and right overhang of glyph string S.  */
 
 static void
-x_compute_glyph_string_overhangs (s)
-     struct glyph_string *s;
+x_compute_glyph_string_overhangs (struct glyph_string *s)
 {
   if (s->cmp == NULL
       && (s->first_glyph->type == CHAR_GLYPH
@@ -1207,9 +1183,7 @@
 /* Fill rectangle X, Y, W, H with background color of glyph string S.  */
 
 static INLINE void
-x_clear_glyph_string_rect (s, x, y, w, h)
-     struct glyph_string *s;
-     int x, y, w, h;
+x_clear_glyph_string_rect (struct glyph_string *s, int x, int y, int w, int h)
 {
   XGCValues xgcv;
   XGetGCValues (s->display, s->gc, GCForeground | GCBackground, &xgcv);
@@ -1226,9 +1200,7 @@
    contains the first component of a composition.  */
 
 static void
-x_draw_glyph_string_background (s, force_p)
-     struct glyph_string *s;
-     int force_p;
+x_draw_glyph_string_background (struct glyph_string *s, int force_p)
 {
   /* Nothing to do if background has already been drawn or if it
      shouldn't be drawn in the first place.  */
@@ -1264,8 +1236,7 @@
 /* Draw the foreground of glyph string S.  */
 
 static void
-x_draw_glyph_string_foreground (s)
-     struct glyph_string *s;
+x_draw_glyph_string_foreground (struct glyph_string *s)
 {
   int i, x;
 
@@ -1313,8 +1284,7 @@
 /* Draw the foreground of composite glyph string S.  */
 
 static void
-x_draw_composite_glyph_string_foreground (s)
-     struct glyph_string *s;
+x_draw_composite_glyph_string_foreground (struct glyph_string *s)
 {
   int i, j, x;
   struct font *font = s->font;
@@ -1401,11 +1371,11 @@
 
 #ifdef USE_X_TOOLKIT
 
-static struct frame *x_frame_of_widget P_ ((Widget));
-static Boolean cvt_string_to_pixel P_ ((Display *, XrmValue *, Cardinal *,
-					XrmValue *, XrmValue *, XtPointer *));
-static void cvt_pixel_dtor P_ ((XtAppContext, XrmValue *, XtPointer,
-				XrmValue *, Cardinal *));
+static struct frame *x_frame_of_widget (Widget);
+static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *,
+                                    XrmValue *, XrmValue *, XtPointer *);
+static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer,
+                            XrmValue *, Cardinal *);
 
 
 /* Return the frame on which widget WIDGET is used.. Abort if frame
@@ -1639,9 +1609,7 @@
    say a 24-bit TrueColor map.  */
 
 static const XColor *
-x_color_cells (dpy, ncells)
-     Display *dpy;
-     int *ncells;
+x_color_cells (Display *dpy, int *ncells)
 {
   struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
 
@@ -1672,10 +1640,7 @@
    colors in COLORS.  Use cached information, if available.  */
 
 void
-x_query_colors (f, colors, ncolors)
-     struct frame *f;
-     XColor *colors;
-     int ncolors;
+x_query_colors (struct frame *f, XColor *colors, int ncolors)
 {
   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 
@@ -1699,9 +1664,7 @@
    COLOR.  Use cached information, if available.  */
 
 void
-x_query_color (f, color)
-     struct frame *f;
-     XColor *color;
+x_query_color (struct frame *f, XColor *color)
 {
   x_query_colors (f, color, 1);
 }
@@ -1713,10 +1676,7 @@
    allocated.  */
 
 static int
-x_alloc_nearest_color_1 (dpy, cmap, color)
-     Display *dpy;
-     Colormap cmap;
-     XColor *color;
+x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color)
 {
   int rc;
 
@@ -1786,10 +1746,7 @@
    allocated.  */
 
 int
-x_alloc_nearest_color (f, cmap, color)
-     struct frame *f;
-     Colormap cmap;
-     XColor *color;
+x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color)
 {
   gamma_correct (f, color);
   return x_alloc_nearest_color_1 (FRAME_X_DISPLAY (f), cmap, color);
@@ -1801,9 +1758,7 @@
    get color reference counts right.  */
 
 unsigned long
-x_copy_color (f, pixel)
-     struct frame *f;
-     unsigned long pixel;
+x_copy_color (struct frame *f, long unsigned int pixel)
 {
   XColor color;
 
@@ -1824,10 +1779,7 @@
    get color reference counts right.  */
 
 unsigned long
-x_copy_dpy_color (dpy, cmap, pixel)
-     Display *dpy;
-     Colormap cmap;
-     unsigned long pixel;
+x_copy_dpy_color (Display *dpy, Colormap cmap, long unsigned int pixel)
 {
   XColor color;
 
@@ -1865,13 +1817,7 @@
    Value is non-zero if successful.  */
 
 static int
-x_alloc_lighter_color (f, display, cmap, pixel, factor, delta)
-     struct frame *f;
-     Display *display;
-     Colormap cmap;
-     unsigned long *pixel;
-     double factor;
-     int delta;
+x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long unsigned int *pixel, double factor, int delta)
 {
   XColor color, new;
   long bright;
@@ -1947,12 +1893,7 @@
    be allocated, use DEFAULT_PIXEL, instead.  */
 
 static void
-x_setup_relief_color (f, relief, factor, delta, default_pixel)
-     struct frame *f;
-     struct relief *relief;
-     double factor;
-     int delta;
-     unsigned long default_pixel;
+x_setup_relief_color (struct frame *f, struct relief *relief, double factor, int delta, long unsigned int default_pixel)
 {
   XGCValues xgcv;
   struct x_output *di = f->output_data.x;
@@ -2000,8 +1941,7 @@
 /* Set up colors for the relief lines around glyph string S.  */
 
 static void
-x_setup_relief_colors (s)
-     struct glyph_string *s;
+x_setup_relief_colors (struct glyph_string *s)
 {
   struct x_output *di = s->f->output_data.x;
   unsigned long color;
@@ -2143,8 +2083,7 @@
 /* Draw a box around glyph string S.  */
 
 static void
-x_draw_glyph_string_box (s)
-     struct glyph_string *s;
+x_draw_glyph_string_box (struct glyph_string *s)
 {
   int width, left_x, right_x, top_y, bottom_y, last_x, raised_p;
   int left_p, right_p;
@@ -2195,8 +2134,7 @@
 /* Draw foreground of image glyph string S.  */
 
 static void
-x_draw_image_foreground (s)
-     struct glyph_string *s;
+x_draw_image_foreground (struct glyph_string *s)
 {
   int x = s->x;
   int y = s->ybase - image_ascent (s->img, s->face, &s->slice);
@@ -2286,8 +2224,7 @@
 /* Draw a relief around the image glyph string S.  */
 
 static void
-x_draw_image_relief (s)
-     struct glyph_string *s;
+x_draw_image_relief (struct glyph_string *s)
 {
   int x0, y0, x1, y1, thick, raised_p, extra;
   XRectangle r;
@@ -2322,7 +2259,7 @@
 
   extra = s->face->id == TOOL_BAR_FACE_ID
     ? XINT (Vtool_bar_button_margin) : 0;
-  
+
   x0 = x - thick - extra;
   y0 = y - thick - extra;
   x1 = x + s->slice.width + thick - 1 + extra;
@@ -2342,9 +2279,7 @@
 /* Draw the foreground of image glyph string S to PIXMAP.  */
 
 static void
-x_draw_image_foreground_1 (s, pixmap)
-     struct glyph_string *s;
-     Pixmap pixmap;
+x_draw_image_foreground_1 (struct glyph_string *s, Pixmap pixmap)
 {
   int x = 0;
   int y = s->ybase - s->y - image_ascent (s->img, s->face, &s->slice);
@@ -2420,9 +2355,7 @@
    give the rectangle to draw.  */
 
 static void
-x_draw_glyph_string_bg_rect (s, x, y, w, h)
-     struct glyph_string *s;
-     int x, y, w, h;
+x_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h)
 {
   if (s->stippled_p)
     {
@@ -2451,8 +2384,7 @@
  */
 
 static void
-x_draw_image_glyph_string (s)
-     struct glyph_string *s;
+x_draw_image_glyph_string (struct glyph_string *s)
 {
   int box_line_hwidth = eabs (s->face->box_line_width);
   int box_line_vwidth = max (s->face->box_line_width, 0);
@@ -2556,8 +2488,7 @@
 /* Draw stretch glyph string S.  */
 
 static void
-x_draw_stretch_glyph_string (s)
-     struct glyph_string *s;
+x_draw_stretch_glyph_string (struct glyph_string *s)
 {
   xassert (s->first_glyph->type == STRETCH_GLYPH);
 
@@ -2640,8 +2571,7 @@
 /* Draw glyph string S.  */
 
 static void
-x_draw_glyph_string (s)
-     struct glyph_string *s;
+x_draw_glyph_string (struct glyph_string *s)
 {
   int relief_drawn_p = 0;
 
@@ -2895,9 +2825,7 @@
 /* Shift display to make room for inserted glyphs.   */
 
 void
-x_shift_glyphs_for_insert (f, x, y, width, height, shift_by)
-     struct frame *f;
-     int x, y, width, height, shift_by;
+x_shift_glyphs_for_insert (struct frame *f, int x, int y, int width, int height, int shift_by)
 {
   XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), FRAME_X_WINDOW (f),
 	     f->output_data.x->normal_gc,
@@ -2909,9 +2837,7 @@
    for X frames.  */
 
 static void
-x_delete_glyphs (f, n)
-     struct frame *f;
-     register int n;
+x_delete_glyphs (struct frame *f, register int n)
 {
   abort ();
 }
@@ -2921,12 +2847,7 @@
    If they are <= 0, this is probably an error.  */
 
 void
-x_clear_area (dpy, window, x, y, width, height, exposures)
-     Display *dpy;
-     Window window;
-     int x, y;
-     int width, height;
-     int exposures;
+x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures)
 {
   xassert (width > 0 && height > 0);
   XClearArea (dpy, window, x, y, width, height, exposures);
@@ -2958,7 +2879,7 @@
      redisplay, do it here.  */
   gtk_widget_queue_draw (FRAME_GTK_WIDGET (f));
 #endif
-  
+
   XFlush (FRAME_X_DISPLAY (f));
 
   UNBLOCK_INPUT;
@@ -2978,8 +2899,7 @@
    *RESULT.  Return 1 if the difference is negative, otherwise 0.  */
 
 static int
-timeval_subtract (result, x, y)
-     struct timeval *result, x, y;
+timeval_subtract (struct timeval *result, struct timeval x, struct timeval y)
 {
   /* Perform the carry for the later subtraction by updating y.  This
      is safer because on some systems the tv_sec member is unsigned.  */
@@ -3008,8 +2928,7 @@
 }
 
 void
-XTflash (f)
-     struct frame *f;
+XTflash (struct frame *f)
 {
   BLOCK_INPUT;
 
@@ -3164,12 +3083,10 @@
 
 
 static void
-XTtoggle_invisible_pointer (f, invisible)
-     FRAME_PTR f;
-     int invisible;
+XTtoggle_invisible_pointer (FRAME_PTR f, int invisible)
 {
   BLOCK_INPUT;
-  if (invisible) 
+  if (invisible)
     {
       if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor != 0)
         XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
@@ -3186,10 +3103,8 @@
 /* Make audible bell.  */
 
 void
-XTring_bell ()
-{
-  struct frame *f = SELECTED_FRAME ();
-
+XTring_bell (struct frame *f)
+{
   if (FRAME_X_DISPLAY (f))
     {
 #if defined (HAVE_TIMEVAL) && defined (HAVE_SELECT)
@@ -3213,8 +3128,7 @@
    that is bounded by calls to x_update_begin and x_update_end.  */
 
 static void
-XTset_terminal_window (n)
-     register int n;
+XTset_terminal_window (struct frame *f, int n)
 {
   /* This function intentionally left blank.  */
 }
@@ -3229,9 +3143,7 @@
    lines or deleting -N lines at vertical position VPOS.  */
 
 static void
-x_ins_del_lines (f, vpos, n)
-     struct frame *f;
-     int vpos, n;
+x_ins_del_lines (struct frame *f, int vpos, int n)
 {
   abort ();
 }
@@ -3240,9 +3152,7 @@
 /* Scroll part of the display as described by RUN.  */
 
 static void
-x_scroll_run (w, run)
-     struct window *w;
-     struct run *run;
+x_scroll_run (struct window *w, struct run *run)
 {
   struct frame *f = XFRAME (w->frame);
   int x, y, width, height, from_y, to_y, bottom_y;
@@ -3299,8 +3209,7 @@
 
 
 static void
-frame_highlight (f)
-     struct frame *f;
+frame_highlight (struct frame *f)
 {
   /* We used to only do this if Vx_no_window_manager was non-nil, but
      the ICCCM (section 4.1.6) says that the window's border pixmap
@@ -3315,8 +3224,7 @@
 }
 
 static void
-frame_unhighlight (f)
-     struct frame *f;
+frame_unhighlight (struct frame *f)
 {
   /* We used to only do this if Vx_no_window_manager was non-nil, but
      the ICCCM (section 4.1.6) says that the window's border pixmap
@@ -3337,9 +3245,7 @@
    Lisp code can tell when the switch took place by examining the events.  */
 
 static void
-x_new_focus_frame (dpyinfo, frame)
-     struct x_display_info *dpyinfo;
-     struct frame *frame;
+x_new_focus_frame (struct x_display_info *dpyinfo, struct frame *frame)
 {
   struct frame *old_focus = dpyinfo->x_focus_frame;
 
@@ -3366,12 +3272,7 @@
    a FOCUS_IN_EVENT into *BUFP.  */
 
 static void
-x_focus_changed (type, state, dpyinfo, frame, bufp)
-     int type;
-     int state;
-     struct x_display_info *dpyinfo;
-     struct frame *frame;
-     struct input_event *bufp;
+x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct frame *frame, struct input_event *bufp)
 {
   if (type == FocusIn)
     {
@@ -3423,10 +3324,7 @@
    Returns FOCUS_IN_EVENT event in *BUFP. */
 
 static void
-x_detect_focus_change (dpyinfo, event, bufp)
-     struct x_display_info *dpyinfo;
-     XEvent *event;
-     struct input_event *bufp;
+x_detect_focus_change (struct x_display_info *dpyinfo, XEvent *event, struct input_event *bufp)
 {
   struct frame *frame;
 
@@ -3475,8 +3373,7 @@
 /* Handle an event saying the mouse has moved out of an Emacs frame.  */
 
 void
-x_mouse_leave (dpyinfo)
-     struct x_display_info *dpyinfo;
+x_mouse_leave (struct x_display_info *dpyinfo)
 {
   x_new_focus_frame (dpyinfo, dpyinfo->x_focus_event_frame);
 }
@@ -3490,15 +3387,13 @@
    the appropriate X display info.  */
 
 static void
-XTframe_rehighlight (frame)
-     struct frame *frame;
+XTframe_rehighlight (struct frame *frame)
 {
   x_frame_rehighlight (FRAME_X_DISPLAY_INFO (frame));
 }
 
 static void
-x_frame_rehighlight (dpyinfo)
-     struct x_display_info *dpyinfo;
+x_frame_rehighlight (struct x_display_info *dpyinfo)
 {
   struct frame *old_highlight = dpyinfo->x_highlight_frame;
 
@@ -3532,8 +3427,7 @@
 
 /* Initialize mode_switch_bit and modifier_meaning.  */
 static void
-x_find_modifier_meanings (dpyinfo)
-     struct x_display_info *dpyinfo;
+x_find_modifier_meanings (struct x_display_info *dpyinfo)
 {
   int min_code, max_code;
   KeySym *syms;
@@ -3644,9 +3538,7 @@
    Emacs uses.  */
 
 unsigned int
-x_x_to_emacs_modifiers (dpyinfo, state)
-     struct x_display_info *dpyinfo;
-     unsigned int state;
+x_x_to_emacs_modifiers (struct x_display_info *dpyinfo, unsigned int state)
 {
   EMACS_UINT mod_meta = meta_modifier;
   EMACS_UINT mod_alt  = alt_modifier;
@@ -3673,9 +3565,7 @@
 }
 
 static unsigned int
-x_emacs_to_x_modifiers (dpyinfo, state)
-     struct x_display_info *dpyinfo;
-     unsigned int state;
+x_emacs_to_x_modifiers (struct x_display_info *dpyinfo, unsigned int state)
 {
   EMACS_UINT mod_meta = meta_modifier;
   EMACS_UINT mod_alt  = alt_modifier;
@@ -3705,8 +3595,7 @@
 /* Convert a keysym to its name.  */
 
 char *
-x_get_keysym_name (keysym)
-     KeySym keysym;
+x_get_keysym_name (int keysym)
 {
   char *value;
 
@@ -3727,10 +3616,7 @@
    the mouse.  */
 
 static Lisp_Object
-construct_mouse_click (result, event, f)
-     struct input_event *result;
-     XButtonEvent *event;
-     struct frame *f;
+construct_mouse_click (struct input_event *result, XButtonEvent *event, struct frame *f)
 {
   /* Make the event type NO_EVENT; we'll change that when we decide
      otherwise.  */
@@ -3763,9 +3649,7 @@
 static Lisp_Object last_mouse_motion_frame;
 
 static int
-note_mouse_movement (frame, event)
-     FRAME_PTR frame;
-     XMotionEvent *event;
+note_mouse_movement (FRAME_PTR frame, XMotionEvent *event)
 {
   last_mouse_movement_time = event->time;
   last_mouse_motion_event = *event;
@@ -3809,7 +3693,7 @@
  ************************************************************************/
 
 static void
-redo_mouse_highlight ()
+redo_mouse_highlight (void)
 {
   if (!NILP (last_mouse_motion_frame)
       && FRAME_LIVE_P (XFRAME (last_mouse_motion_frame)))
@@ -3841,13 +3725,7 @@
    movement.  */
 
 static void
-XTmouse_position (fp, insist, bar_window, part, x, y, time)
-     FRAME_PTR *fp;
-     int insist;
-     Lisp_Object *bar_window;
-     enum scroll_bar_part *part;
-     Lisp_Object *x, *y;
-     unsigned long *time;
+XTmouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, long unsigned int *time)
 {
   FRAME_PTR f1;
 
@@ -4049,9 +3927,7 @@
    bits.  */
 
 static struct scroll_bar *
-x_window_to_scroll_bar (display, window_id)
-     Display *display;
-     Window window_id;
+x_window_to_scroll_bar (Display *display, Window window_id)
 {
   Lisp_Object tail;
 
@@ -4125,12 +4001,12 @@
 
 #ifdef USE_TOOLKIT_SCROLL_BARS
 
-static void x_scroll_bar_to_input_event P_ ((XEvent *, struct input_event *));
-static void x_send_scroll_bar_event P_ ((Lisp_Object, int, int, int));
-static void x_create_toolkit_scroll_bar P_ ((struct frame *,
-					     struct scroll_bar *));
-static void x_set_toolkit_scroll_bar_thumb P_ ((struct scroll_bar *,
-						int, int, int));
+static void x_scroll_bar_to_input_event (XEvent *, struct input_event *);
+static void x_send_scroll_bar_event (Lisp_Object, int, int, int);
+static void x_create_toolkit_scroll_bar (struct frame *,
+                                         struct scroll_bar *);
+static void x_set_toolkit_scroll_bar_thumb (struct scroll_bar *,
+                                            int, int, int);
 
 
 /* Lisp window being scrolled.  Set when starting to interact with
@@ -4222,9 +4098,7 @@
    amount to scroll of a whole of WHOLE.  */
 
 static void
-x_send_scroll_bar_event (window, part, portion, whole)
-     Lisp_Object window;
-     int part, portion, whole;
+x_send_scroll_bar_event (Lisp_Object window, int part, int portion, int whole)
 {
   XEvent event;
   XClientMessageEvent *ev = (XClientMessageEvent *) &event;
@@ -4257,7 +4131,7 @@
 
       scroll_bar_windows = (struct window **) xrealloc (scroll_bar_windows,
 							nbytes);
-      bzero (&scroll_bar_windows[i], nbytes - old_nbytes);
+      memset (&scroll_bar_windows[i], 0, nbytes - old_nbytes);
       scroll_bar_windows_size = new_size;
     }
 
@@ -4286,9 +4160,7 @@
    in *IEVENT.  */
 
 static void
-x_scroll_bar_to_input_event (event, ievent)
-     XEvent *event;
-     struct input_event *ievent;
+x_scroll_bar_to_input_event (XEvent *event, struct input_event *ievent)
 {
   XClientMessageEvent *ev = (XClientMessageEvent *) event;
   Lisp_Object window;
@@ -4572,9 +4444,7 @@
 
 #ifdef USE_GTK
 static void
-x_create_toolkit_scroll_bar (f, bar)
-     struct frame *f;
-     struct scroll_bar *bar;
+x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
 {
   char *scroll_bar_name = SCROLL_BAR_NAME;
 
@@ -4683,7 +4553,7 @@
   if (f->output_data.x->scroll_bar_top_shadow_pixel == -1)
     {
       pixel = f->output_data.x->scroll_bar_background_pixel;
-      if (pixel != -1) 
+      if (pixel != -1)
         {
           if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
                                       FRAME_X_COLORMAP (f),
@@ -4695,7 +4565,7 @@
   if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
     {
       pixel = f->output_data.x->scroll_bar_background_pixel;
-      if (pixel != -1) 
+      if (pixel != -1)
         {
           if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
                                       FRAME_X_COLORMAP (f),
@@ -4790,9 +4660,7 @@
 
 #ifdef USE_GTK
 static void
-x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
-     struct scroll_bar *bar;
-     int portion, position, whole;
+x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position, int whole)
 {
   xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole);
 }
@@ -4916,9 +4784,7 @@
    scroll bar. */
 
 static struct scroll_bar *
-x_scroll_bar_create (w, top, left, width, height)
-     struct window *w;
-     int top, left, width, height;
+x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
 {
   struct frame *f = XFRAME (w->frame);
   struct scroll_bar *bar
@@ -5133,8 +4999,7 @@
    nil.  */
 
 static void
-x_scroll_bar_remove (bar)
-     struct scroll_bar *bar;
+x_scroll_bar_remove (struct scroll_bar *bar)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
   BLOCK_INPUT;
@@ -5162,9 +5027,7 @@
    create one.  */
 
 static void
-XTset_vertical_scroll_bar (w, portion, whole, position)
-     struct window *w;
-     int portion, whole, position;
+XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int position)
 {
   struct frame *f = XFRAME (w->frame);
   struct scroll_bar *bar;
@@ -5381,8 +5244,7 @@
    `*redeem_scroll_bar_hook' is applied to its window before the judgment.  */
 
 static void
-XTcondemn_scroll_bars (frame)
-     FRAME_PTR frame;
+XTcondemn_scroll_bars (FRAME_PTR frame)
 {
   /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS.  */
   while (! NILP (FRAME_SCROLL_BARS (frame)))
@@ -5403,8 +5265,7 @@
    Note that WINDOW isn't necessarily condemned at all.  */
 
 static void
-XTredeem_scroll_bar (window)
-     struct window *window;
+XTredeem_scroll_bar (struct window *window)
 {
   struct scroll_bar *bar;
   struct frame *f;
@@ -5449,8 +5310,7 @@
    last call to `*condemn_scroll_bars_hook'.  */
 
 static void
-XTjudge_scroll_bars (f)
-     FRAME_PTR f;
+XTjudge_scroll_bars (FRAME_PTR f)
 {
   Lisp_Object bar, next;
 
@@ -5527,10 +5387,7 @@
 
 
 static void
-x_scroll_bar_handle_click (bar, event, emacs_event)
-     struct scroll_bar *bar;
-     XEvent *event;
-     struct input_event *emacs_event;
+x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_event *emacs_event)
 {
   if (! WINDOWP (bar->window))
     abort ();
@@ -5620,12 +5477,7 @@
    on the scroll bar.  */
 
 static void
-x_scroll_bar_report_motion (fp, bar_window, part, x, y, time)
-     FRAME_PTR *fp;
-     Lisp_Object *bar_window;
-     enum scroll_bar_part *part;
-     Lisp_Object *x, *y;
-     unsigned long *time;
+x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, long unsigned int *time)
 {
   struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar);
   Window w = bar->x_window;
@@ -5697,8 +5549,7 @@
    redraw them.  */
 
 void
-x_scroll_bar_clear (f)
-     FRAME_PTR f;
+x_scroll_bar_clear (FRAME_PTR f)
 {
 #ifndef USE_TOOLKIT_SCROLL_BARS
   Lisp_Object bar;
@@ -5757,7 +5608,7 @@
 	 if (f->output_data.x->saved_menu_event == 0)			\
            f->output_data.x->saved_menu_event				\
 	     = (XEvent *) xmalloc (sizeof (XEvent));			\
-         bcopy (&event, f->output_data.x->saved_menu_event, size);	\
+         memcpy (f->output_data.x->saved_menu_event, &event, size);	\
 	 inev.ie.kind = MENU_BAR_ACTIVATE_EVENT;			\
 	 XSETFRAME (inev.ie.frame_or_window, f);			\
        }								\
@@ -5784,9 +5635,7 @@
 
 #ifdef HAVE_X_I18N
 static int
-x_filter_event (dpyinfo, event)
-     struct x_display_info *dpyinfo;
-     XEvent *event;
+x_filter_event (struct x_display_info *dpyinfo, XEvent *event)
 {
   /* XFilterEvent returns non-zero if the input method has
    consumed the event.  We pass the frame's X window to
@@ -5809,10 +5658,7 @@
    It is invoked before the XEvent is translated to a GdkEvent,
    so we have a chance to act on the event before GTK. */
 static GdkFilterReturn
-event_handler_gdk (gxev, ev, data)
-     GdkXEvent *gxev;
-     GdkEvent *ev;
-     gpointer data;
+event_handler_gdk (GdkXEvent *gxev, GdkEvent *ev, gpointer data)
 {
   XEvent *xev = (XEvent *) gxev;
 
@@ -5865,11 +5711,7 @@
    We return the number of characters stored into the buffer. */
 
 static int
-handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
-     struct x_display_info *dpyinfo;
-     XEvent *eventp;
-     int *finish;
-     struct input_event *hold_quit;
+handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, struct input_event *hold_quit)
 {
   union {
     struct input_event ie;
@@ -5887,10 +5729,10 @@
   EVENT_INIT (inev.ie);
   inev.ie.kind = NO_EVENT;
   inev.ie.arg = Qnil;
-  
+
   if (pending_event_wait.eventtype == event.type)
     pending_event_wait.eventtype = 0; /* Indicates we got it.  */
-  
+
   switch (event.type)
     {
     case ClientMessage:
@@ -6403,7 +6245,7 @@
              this enables ComposeCharacter to work whether or
              not it is combined with Meta.  */
           if (modifiers & dpyinfo->meta_mod_mask)
-            bzero (&compose_status, sizeof (compose_status));
+            memset (&compose_status, 0, sizeof (compose_status));
 
 #ifdef HAVE_X_I18N
           if (FRAME_XIC (f))
@@ -6451,7 +6293,7 @@
           if (compose_status.chars_matched > 0 && nbytes == 0)
             break;
 
-          bzero (&compose_status, sizeof (compose_status));
+          memset (&compose_status, 0, sizeof (compose_status));
           orig_keysym = keysym;
 
  	  /* Common for all keysym input events.  */
@@ -6810,7 +6652,7 @@
                             event.xconfigure.height);
           f = 0;
         }
-#endif  
+#endif
       if (f)
         {
 #ifndef USE_X_TOOLKIT
@@ -6865,7 +6707,7 @@
            by the rest of Emacs, we put it here.  */
         int tool_bar_p = 0;
 
-        bzero (&compose_status, sizeof (compose_status));
+        memset (&compose_status, 0, sizeof (compose_status));
 	last_mouse_glyph_frame = 0;
         last_user_time = event.xbutton.time;
 
@@ -7096,9 +6938,7 @@
 
    Returns the value handle_one_xevent sets in the finish argument.  */
 int
-x_dispatch_event (event, display)
-     XEvent *event;
-     Display *display;
+x_dispatch_event (XEvent *event, Display *display)
 {
   struct x_display_info *dpyinfo;
   int finish = X_EVENT_NORMAL;
@@ -7124,10 +6964,7 @@
    EXPECTED is nonzero if the caller knows input is available.  */
 
 static int
-XTread_socket (terminal, expected, hold_quit)
-     struct terminal *terminal;
-     int expected;
-     struct input_event *hold_quit;
+XTread_socket (struct terminal *terminal, int expected, struct input_event *hold_quit)
 {
   int count = 0;
   XEvent event;
@@ -7278,11 +7115,7 @@
    mode lines must be clipped to the whole window.  */
 
 static void
-x_clip_to_row (w, row, area, gc)
-     struct window *w;
-     struct glyph_row *row;
-     int area;
-     GC gc;
+x_clip_to_row (struct window *w, struct glyph_row *row, int area, GC gc)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   XRectangle clip_rect;
@@ -7303,9 +7136,7 @@
 /* Draw a hollow box cursor on window W in glyph row ROW.  */
 
 static void
-x_draw_hollow_cursor (w, row)
-     struct window *w;
-     struct glyph_row *row;
+x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
@@ -7350,11 +7181,7 @@
    --gerd.  */
 
 static void
-x_draw_bar_cursor (w, row, width, kind)
-     struct window *w;
-     struct glyph_row *row;
-     int width;
-     enum text_cursor_kinds kind;
+x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text_cursor_kinds kind)
 {
   struct frame *f = XFRAME (w->frame);
   struct glyph *cursor_glyph;
@@ -7445,9 +7272,7 @@
 /* RIF: Define cursor CURSOR on frame F.  */
 
 static void
-x_define_frame_cursor (f, cursor)
-     struct frame *f;
-     Cursor cursor;
+x_define_frame_cursor (struct frame *f, Cursor cursor)
 {
   if (!f->pointer_invisible
       && f->output_data.x->current_cursor != cursor)
@@ -7459,9 +7284,7 @@
 /* RIF: Clear area on frame F.  */
 
 static void
-x_clear_frame_area (f, x, y, width, height)
-     struct frame *f;
-     int x, y, width, height;
+x_clear_frame_area (struct frame *f, int x, int y, int width, int height)
 {
   x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
 		x, y, width, height, False);
@@ -7476,12 +7299,7 @@
 /* RIF: Draw cursor on window W.  */
 
 static void
-x_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, active_p)
-     struct window *w;
-     struct glyph_row *glyph_row;
-     int x, y;
-     int cursor_type, cursor_width;
-     int on_p, active_p;
+x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int y, int cursor_type, int cursor_width, int on_p, int active_p)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
 
@@ -7545,9 +7363,7 @@
 /* Make the x-window of frame F use the gnu icon bitmap.  */
 
 int
-x_bitmap_icon (f, file)
-     struct frame *f;
-     Lisp_Object file;
+x_bitmap_icon (struct frame *f, Lisp_Object file)
 {
   int bitmap_id;
 
@@ -7624,9 +7440,7 @@
    Use ICON_NAME as the text.  */
 
 int
-x_text_icon (f, icon_name)
-     struct frame *f;
-     char *icon_name;
+x_text_icon (struct frame *f, char *icon_name)
 {
   if (FRAME_X_WINDOW (f) == 0)
     return 1;
@@ -7669,9 +7483,7 @@
    x_catch_errors is in effect.  */
 
 static void
-x_error_catcher (display, error)
-     Display *display;
-     XErrorEvent *error;
+x_error_catcher (Display *display, XErrorEvent *error)
 {
   XGetErrorText (display, error->error_code,
 		 x_error_message->string,
@@ -7691,11 +7503,10 @@
 
    Calling x_uncatch_errors resumes the normal error handling.  */
 
-void x_check_errors ();
+void x_check_errors (Display *dpy, char *format);
 
 void
-x_catch_errors (dpy)
-     Display *dpy;
+x_catch_errors (Display *dpy)
 {
   struct x_error_message_stack *data = xmalloc (sizeof (*data));
 
@@ -7712,7 +7523,7 @@
    DPY should be the display that was passed to x_catch_errors.  */
 
 void
-x_uncatch_errors ()
+x_uncatch_errors (void)
 {
   struct x_error_message_stack *tmp;
 
@@ -7734,9 +7545,7 @@
    sprintf (a buffer, FORMAT, the x error message text) as the text.  */
 
 void
-x_check_errors (dpy, format)
-     Display *dpy;
-     char *format;
+x_check_errors (Display *dpy, char *format)
 {
   /* Make sure to catch any errors incurred so far.  */
   XSync (dpy, False);
@@ -7744,7 +7553,7 @@
   if (x_error_message->string[0])
     {
       char string[X_ERROR_MESSAGE_SIZE];
-      bcopy (x_error_message->string, string, X_ERROR_MESSAGE_SIZE);
+      memcpy (string, x_error_message->string, X_ERROR_MESSAGE_SIZE);
       x_uncatch_errors ();
       error (format, string);
     }
@@ -7754,8 +7563,7 @@
    since we did x_catch_errors on DPY.  */
 
 int
-x_had_errors_p (dpy)
-     Display *dpy;
+x_had_errors_p (Display *dpy)
 {
   /* Make sure to catch any errors incurred so far.  */
   XSync (dpy, False);
@@ -7766,8 +7574,7 @@
 /* Forget about any errors we have had, since we did x_catch_errors on DPY.  */
 
 void
-x_clear_errors (dpy)
-     Display *dpy;
+x_clear_errors (Display *dpy)
 {
   x_error_message->string[0] = 0;
 }
@@ -7787,7 +7594,7 @@
 /* Nonzero if x_catch_errors has been done and not yet canceled.  */
 
 int
-x_catching_errors ()
+x_catching_errors (void)
 {
   return x_error_message != 0;
 }
@@ -7808,8 +7615,8 @@
    which will do the appropriate cleanup for us.  */
 
 static SIGTYPE
-x_connection_signal (signalnum)	/* If we don't have an argument, */
-     int signalnum;		/* some compilers complain in signal calls.  */
+x_connection_signal (int signalnum)	/* If we don't have an argument, */
+                   		/* some compilers complain in signal calls.  */
 {
 #ifdef USG
   /* USG systems forget handlers when they are used;
@@ -7832,7 +7639,7 @@
    instead of dumping core when XtCloseDisplay fails.  */
 
 static void
-x_fatal_error_signal ()
+x_fatal_error_signal (void)
 {
   fprintf (stderr, "%s\n", error_msg);
   exit (70);
@@ -7842,9 +7649,7 @@
    the text of an error message that lead to the connection loss.  */
 
 static SIGTYPE
-x_connection_closed (dpy, error_message)
-     Display *dpy;
-     char *error_message;
+x_connection_closed (Display *dpy, char *error_message)
 {
   struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
   Lisp_Object frame, tail;
@@ -7919,7 +7724,7 @@
       /* If DPYINFO is null, this means we didn't open the display
 	 in the first place, so don't try to close it.  */
       {
-	extern void (*fatal_error_signal_hook) P_ ((void));
+        extern void (*fatal_error_signal_hook) (void);
 	fatal_error_signal_hook = x_fatal_error_signal;
 	XtCloseDisplay (dpy);
 	fatal_error_signal_hook = NULL;
@@ -7980,15 +7785,13 @@
 
 /* We specifically use it before defining it, so that gcc doesn't inline it,
    otherwise gdb doesn't know how to properly put a breakpoint on it.  */
-static void x_error_quitter P_ ((Display *, XErrorEvent *));
+static void x_error_quitter (Display *, XErrorEvent *);
 
 /* This is the first-level handler for X protocol errors.
    It calls x_error_quitter or x_error_catcher.  */
 
 static int
-x_error_handler (display, error)
-     Display *display;
-     XErrorEvent *error;
+x_error_handler (Display *display, XErrorEvent *error)
 {
   if (x_error_message)
     x_error_catcher (display, error);
@@ -8019,9 +7822,7 @@
    after x_error_handler prevents inlining into the former.  */
 
 static void NO_INLINE
-x_error_quitter (display, error)
-     Display *display;
-     XErrorEvent *error;
+x_error_quitter (Display *display, XErrorEvent *error)
 {
   char buf[256], buf1[356];
 
@@ -8046,8 +7847,7 @@
    If that was the only one, it prints an error message and kills Emacs.  */
 
 static int
-x_io_error_quitter (display)
-     Display *display;
+x_io_error_quitter (Display *display)
 {
   char buf[256];
 
@@ -8064,10 +7864,7 @@
    FONT-OBJECT.  */
 
 Lisp_Object
-x_new_font (f, font_object, fontset)
-     struct frame *f;
-     Lisp_Object font_object;
-     int fontset;
+x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
 {
   struct font *font = XFONT_OBJECT (font_object);
 
@@ -8136,10 +7933,7 @@
    pointer to the x_display_info structure corresponding to XIM.  */
 
 static void
-xim_destroy_callback (xim, client_data, call_data)
-     XIM xim;
-     XPointer client_data;
-     XPointer call_data;
+xim_destroy_callback (XIM xim, XPointer client_data, XPointer call_data)
 {
   struct x_display_info *dpyinfo = (struct x_display_info *) client_data;
   Lisp_Object frame, tail;
@@ -8167,16 +7961,14 @@
 
 #ifdef HAVE_X11R6
 /* This isn't prototyped in OSF 5.0 or 5.1a.  */
-extern char *XSetIMValues P_ ((XIM, ...));
+extern char *XSetIMValues (XIM, ...);
 #endif
 
 /* Open the connection to the XIM server on display DPYINFO.
    RESOURCE_NAME is the resource name Emacs uses.  */
 
 static void
-xim_open_dpy (dpyinfo, resource_name)
-     struct x_display_info *dpyinfo;
-     char *resource_name;
+xim_open_dpy (struct x_display_info *dpyinfo, char *resource_name)
 {
   XIM xim;
 
@@ -8220,10 +8012,7 @@
    when the callback was registered.  */
 
 static void
-xim_instantiate_callback (display, client_data, call_data)
-     Display *display;
-     XPointer client_data;
-     XPointer call_data;
+xim_instantiate_callback (Display *display, XPointer client_data, XPointer call_data)
 {
   struct xim_inst_t *xim_inst = (struct xim_inst_t *) client_data;
   struct x_display_info *dpyinfo = xim_inst->dpyinfo;
@@ -8273,9 +8062,7 @@
    in the XIM instantiate callback function.  */
 
 static void
-xim_initialize (dpyinfo, resource_name)
-     struct x_display_info *dpyinfo;
-     char *resource_name;
+xim_initialize (struct x_display_info *dpyinfo, char *resource_name)
 {
   dpyinfo->xim = NULL;
 #ifdef HAVE_XIM
@@ -8290,7 +8077,7 @@
       xim_inst->dpyinfo = dpyinfo;
       len = strlen (resource_name);
       xim_inst->resource_name = (char *) xmalloc (len + 1);
-      bcopy (resource_name, xim_inst->resource_name, len + 1);
+      memcpy (xim_inst->resource_name, resource_name, len + 1);
       XRegisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
 				      resource_name, EMACS_CLASS,
 				      xim_instantiate_callback,
@@ -8309,8 +8096,7 @@
 /* Close the connection to the XIM server on display DPYINFO. */
 
 static void
-xim_close_dpy (dpyinfo)
-     struct x_display_info *dpyinfo;
+xim_close_dpy (struct x_display_info *dpyinfo)
 {
 #ifdef HAVE_XIM
   if (use_xim)
@@ -8339,8 +8125,7 @@
    from its current recorded position values and gravity.  */
 
 void
-x_calc_absolute_position (f)
-     struct frame *f;
+x_calc_absolute_position (struct frame *f)
 {
   int flags = f->size_hint_flags;
 
@@ -8392,10 +8177,7 @@
    which means, do adjust for borders but don't change the gravity.  */
 
 void
-x_set_offset (f, xoff, yoff, change_gravity)
-     struct frame *f;
-     register int xoff, yoff;
-     int change_gravity;
+x_set_offset (struct frame *f, register int xoff, register int yoff, int change_gravity)
 {
   int modified_top, modified_left;
 
@@ -8464,9 +8246,7 @@
    http://freedesktop.org/wiki/Specifications/wm-spec.  */
 
 static int
-wm_supports (f, atomname)
-     struct frame *f;
-     const char *atomname;
+wm_supports (struct frame *f, const char *atomname)
 {
   Atom actual_type;
   unsigned long actual_size, bytes_remaining;
@@ -8555,11 +8335,7 @@
 }
 
 static void
-set_wm_state (frame, add, what, what2)
-     Lisp_Object frame;
-     int add;
-     const char *what;
-     const char *what2;
+set_wm_state (Lisp_Object frame, int add, const char *what, const char *what2)
 {
   const char *atom = "_NET_WM_STATE";
   Fx_send_client_event (frame, make_number (0), frame,
@@ -8577,9 +8353,7 @@
 }
 
 void
-x_set_sticky (f, new_value, old_value)
-     struct frame *f;
-     Lisp_Object new_value, old_value;
+x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
 {
   Lisp_Object frame;
 
@@ -8591,8 +8365,7 @@
 /* Do fullscreen as specified in extended window manager hints */
 
 static int
-do_ewmh_fullscreen (f)
-     struct frame *f;
+do_ewmh_fullscreen (struct frame *f)
 {
   int have_net_atom = wm_supports (f, "_NET_WM_STATE");
 
@@ -8613,7 +8386,7 @@
       set_wm_state (frame, 0, fs, NULL);
       set_wm_state (frame, 0, fh, NULL);
       set_wm_state (frame, 0, fw, NULL);
-      
+
       /* If there are _NET_ atoms we assume we have extended window manager
          hints.  */
       switch (f->want_fullscreen)
@@ -8640,8 +8413,7 @@
 }
 
 static void
-XTfullscreen_hook (f)
-     FRAME_PTR f;
+XTfullscreen_hook (FRAME_PTR f)
 {
   if (f->async_visible)
     {
@@ -8654,9 +8426,7 @@
 
 
 static void
-x_handle_net_wm_state (f, event)
-     struct frame *f;
-     XPropertyEvent *event;
+x_handle_net_wm_state (struct frame *f, XPropertyEvent *event)
 {
   Atom actual_type;
   unsigned long actual_size, bytes_remaining;
@@ -8689,7 +8459,7 @@
   for (i = 0; i < actual_size; ++i)
     {
       Atom a = ((Atom*)tmp_data)[i];
-      if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) 
+      if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
         {
           if (value == FULLSCREEN_HEIGHT)
             value = FULLSCREEN_MAXIMIZED;
@@ -8710,7 +8480,7 @@
     }
 
   lval = Qnil;
-  switch (value) 
+  switch (value)
     {
     case FULLSCREEN_WIDTH:
       lval = Qfullwidth;
@@ -8725,7 +8495,7 @@
       lval = Qmaximized;
       break;
     }
-      
+
   store_frame_param (f, Qfullscreen, lval);
   store_frame_param (f, Qsticky, sticky ? Qt : Qnil);
 
@@ -8736,8 +8506,7 @@
 /* Check if we need to resize the frame due to a fullscreen request.
    If so needed, resize the frame. */
 static void
-x_check_fullscreen (f)
-     struct frame *f;
+x_check_fullscreen (struct frame *f)
 {
   if (do_ewmh_fullscreen (f))
     return;
@@ -8764,7 +8533,7 @@
         case FULLSCREEN_HEIGHT:
           height = x_display_pixel_height (dpyinfo);
         }
-      
+
       if (FRAME_COLS (f) != width || FRAME_LINES (f) != height)
         {
           change_frame_size (f, height, width, 0, 1, 0);
@@ -8783,10 +8552,7 @@
    compensate by moving the window right and down by the proper amount.  */
 
 static void
-x_check_expected_move (f, expected_left, expected_top)
-     struct frame *f;
-     int expected_left;
-     int expected_top;
+x_check_expected_move (struct frame *f, int expected_left, int expected_top)
 {
   int current_left = 0, current_top = 0;
 
@@ -8831,9 +8597,7 @@
    of an exact comparison.  */
 
 static void
-x_sync_with_move (f, left, top, fuzzy)
-    struct frame *f;
-    int left, top, fuzzy;
+x_sync_with_move (struct frame *f, int left, int top, int fuzzy)
 {
   int count = 0;
 
@@ -8870,9 +8634,7 @@
 
 /* Wait for an event on frame F matching EVENTTYPE.  */
 void
-x_wait_for_event (f, eventtype)
-     struct frame *f;
-     int eventtype;
+x_wait_for_event (struct frame *f, int eventtype)
 {
   int level = interrupt_input_blocked;
 
@@ -8899,7 +8661,7 @@
 
       FD_ZERO (&fds);
       FD_SET (fd, &fds);
-      
+
       EMACS_GET_TIME (time_now);
       EMACS_SUB_TIME (tmo, tmo_at, time_now);
 
@@ -8917,10 +8679,7 @@
    size changes.  Otherwise we leave the window gravity unchanged.  */
 
 static void
-x_set_window_size_1 (f, change_gravity, cols, rows)
-     struct frame *f;
-     int change_gravity;
-     int cols, rows;
+x_set_window_size_1 (struct frame *f, int change_gravity, int cols, int rows)
 {
   int pixelwidth, pixelheight;
 
@@ -8985,17 +8744,14 @@
    Otherwise we leave the window gravity unchanged.  */
 
 void
-x_set_window_size (f, change_gravity, cols, rows)
-     struct frame *f;
-     int change_gravity;
-     int cols, rows;
+x_set_window_size (struct frame *f, int change_gravity, int cols, int rows)
 {
   BLOCK_INPUT;
 
   if (NILP (tip_frame) || XFRAME (tip_frame) != f)
     {
       int r, c;
-	  
+
       /* When the frame is maximized/fullscreen or running under for
          example Xmonad, x_set_window_size_1 will be a no-op.
          In that case, the right thing to do is extend rows/cols to
@@ -9044,9 +8800,7 @@
 /* Mouse warping.  */
 
 void
-x_set_mouse_position (f, x, y)
-     struct frame *f;
-     int x, y;
+x_set_mouse_position (struct frame *f, int x, int y)
 {
   int pix_x, pix_y;
 
@@ -9069,9 +8823,7 @@
 /* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F.  */
 
 void
-x_set_mouse_pixel_position (f, pix_x, pix_y)
-     struct frame *f;
-     int pix_x, pix_y;
+x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
 {
   BLOCK_INPUT;
 
@@ -9083,8 +8835,7 @@
 /* focus shifting, raising and lowering.  */
 
 void
-x_focus_on_frame (f)
-     struct frame *f;
+x_focus_on_frame (struct frame *f)
 {
 #if 0
   /* I don't think that the ICCCM allows programs to do things like this
@@ -9096,8 +8847,7 @@
 }
 
 void
-x_unfocus_frame (f)
-     struct frame *f;
+x_unfocus_frame (struct frame *f)
 {
 #if 0
   /* Look at the remarks in x_focus_on_frame.  */
@@ -9110,8 +8860,7 @@
 /* Raise frame F.  */
 
 void
-x_raise_frame (f)
-     struct frame *f;
+x_raise_frame (struct frame *f)
 {
   BLOCK_INPUT;
   if (f->async_visible)
@@ -9124,8 +8873,7 @@
 /* Lower frame F.  */
 
 void
-x_lower_frame (f)
-     struct frame *f;
+x_lower_frame (struct frame *f)
 {
   if (f->async_visible)
     {
@@ -9139,8 +8887,7 @@
 /* Activate frame with Extended Window Manager Hints */
 
 void
-x_ewmh_activate_frame (f)
-     FRAME_PTR f;
+x_ewmh_activate_frame (FRAME_PTR f)
 {
   /* See Window Manager Specification/Extended Window Manager Hints at
      http://freedesktop.org/wiki/Specifications/wm-spec  */
@@ -9160,9 +8907,7 @@
 }
 
 static void
-XTframe_raise_lower (f, raise_flag)
-     FRAME_PTR f;
-     int raise_flag;
+XTframe_raise_lower (FRAME_PTR f, int raise_flag)
 {
   if (raise_flag)
     x_raise_frame (f);
@@ -9173,9 +8918,7 @@
 /* XEmbed implementation.  */
 
 void
-xembed_set_info (f, flags)
-     struct frame *f;
-     enum xembed_info flags;
+xembed_set_info (struct frame *f, enum xembed_info flags)
 {
   Atom atom;
   unsigned long data[2];
@@ -9190,13 +8933,7 @@
 }
 
 void
-xembed_send_message (f, time, message, detail, data1, data2)
-     struct frame *f;
-     Time time;
-     enum xembed_message message;
-     long detail;
-     long data1;
-     long data2;
+xembed_send_message (struct frame *f, Time time, enum xembed_message message, long int detail, long int data1, long int data2)
 {
   XEvent event;
 
@@ -9225,8 +8962,7 @@
    finishes with it.  */
 
 void
-x_make_frame_visible (f)
-     struct frame *f;
+x_make_frame_visible (struct frame *f)
 {
   Lisp_Object type;
   int original_top, original_left;
@@ -9357,7 +9093,7 @@
 	    /* It could be confusing if a real alarm arrives while
 	       processing the fake one.  Turn it off and let the
 	       handler reset it.  */
-	    extern void poll_for_input_1 P_ ((void));
+            extern void poll_for_input_1 (void);
 	    int old_poll_suppress_count = poll_suppress_count;
 	    poll_suppress_count = 1;
 	    poll_for_input_1 ();
@@ -9389,8 +9125,7 @@
 /* Make the frame visible (mapped and not iconified).  */
 
 void
-x_make_frame_invisible (f)
-     struct frame *f;
+x_make_frame_invisible (struct frame *f)
 {
   Window window;
 
@@ -9447,8 +9182,7 @@
 /* Change window state from mapped to iconified.  */
 
 void
-x_iconify_frame (f)
-     struct frame *f;
+x_iconify_frame (struct frame *f)
 {
   int result;
   Lisp_Object type;
@@ -9574,8 +9308,7 @@
 /* Free X resources of frame F.  */
 
 void
-x_free_frame_resources (f)
-     struct frame *f;
+x_free_frame_resources (struct frame *f)
 {
   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   Lisp_Object bar;
@@ -9698,8 +9431,7 @@
 /* Destroy the X window of frame F.  */
 
 void
-x_destroy_window (f)
-     struct frame *f;
+x_destroy_window (struct frame *f)
 {
   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 
@@ -9826,9 +9558,7 @@
 /* Used for IconicState or NormalState */
 
 void
-x_wm_set_window_state (f, state)
-     struct frame *f;
-     int state;
+x_wm_set_window_state (struct frame *f, int state)
 {
 #ifdef USE_X_TOOLKIT
   Arg al[1];
@@ -9846,9 +9576,7 @@
 }
 
 void
-x_wm_set_icon_pixmap (f, pixmap_id)
-     struct frame *f;
-     int pixmap_id;
+x_wm_set_icon_pixmap (struct frame *f, int pixmap_id)
 {
   Pixmap icon_pixmap, icon_mask;
 
@@ -9896,9 +9624,7 @@
 }
 
 void
-x_wm_set_icon_position (f, icon_x, icon_y)
-     struct frame *f;
-     int icon_x, icon_y;
+x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
 {
   Window window = FRAME_OUTER_WINDOW (f);
 
@@ -9971,8 +9697,7 @@
 /* Test whether two display-name strings agree up to the dot that separates
    the screen number from the server number.  */
 static int
-same_x_server (name1, name2)
-     const char *name1, *name2;
+same_x_server (const char *name1, const char *name2)
 {
   int seen_colon = 0;
   const unsigned char *system_name = SDATA (Vsystem_name);
@@ -10019,10 +9744,7 @@
    get to the first bit.  With MASK 0x7e0, *BITS is set to 6, and *OFFSET
    to 5.  */
 static void
-get_bits_and_offset (mask, bits, offset)
-     unsigned long mask;
-     int *bits;
-     int *offset;
+get_bits_and_offset (long unsigned int mask, int *bits, int *offset)
 {
   int nr = 0;
   int off = 0;
@@ -10047,8 +9769,7 @@
    But don't permanently open it, just test its availability.  */
 
 int
-x_display_ok (display)
-    const char *display;
+x_display_ok (const char *display)
 {
     int dpy_ok = 1;
     Display *dpy;
@@ -10063,26 +9784,19 @@
 
 #ifdef USE_GTK
 static void
-my_log_handler (log_domain, log_level, message, user_data)
-     const gchar *log_domain;
-     GLogLevelFlags log_level;
-     const gchar *message;
-     gpointer user_data;
+my_log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
 {
   if (!strstr (message, "g_set_prgname"))
       fprintf (stderr, "%s-WARNING **: %s\n", log_domain, message);
 }
 #endif
-  
+
 /* Open a connection to X display DISPLAY_NAME, and return
    the structure that describes the open display.
    If we cannot contact the display, return null.  */
 
 struct x_display_info *
-x_term_init (display_name, xrm_option, resource_name)
-     Lisp_Object display_name;
-     char *xrm_option;
-     char *resource_name;
+x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 {
   int connection;
   Display *dpy;
@@ -10215,7 +9929,7 @@
   /* We have definitely succeeded.  Record the new connection.  */
 
   dpyinfo = (struct x_display_info *) xmalloc (sizeof (struct x_display_info));
-  bzero (dpyinfo, sizeof *dpyinfo);
+  memset (dpyinfo, 0, sizeof *dpyinfo);
 
   terminal = x_create_terminal (dpyinfo);
 
@@ -10493,7 +10207,11 @@
     = XInternAtom (dpyinfo->display, "_NET_WM_WINDOW_TYPE", False);
   dpyinfo->Xatom_net_window_type_tooltip
     = XInternAtom (dpyinfo->display, "_NET_WM_WINDOW_TYPE_TOOLTIP", False);
-  
+  dpyinfo->Xatom_net_wm_icon_name
+    = XInternAtom (dpyinfo->display, "_NET_WM_ICON_NAME", False);
+  dpyinfo->Xatom_net_wm_name
+    = XInternAtom (dpyinfo->display, "_NET_WM_NAME", False);
+
   dpyinfo->cut_buffers_initialized = 0;
 
   dpyinfo->x_dnd_atoms_size = 8;
@@ -10610,8 +10328,7 @@
    and without sending any more commands to the X server.  */
 
 void
-x_delete_display (dpyinfo)
-     struct x_display_info *dpyinfo;
+x_delete_display (struct x_display_info *dpyinfo)
 {
   struct terminal *t;
 
@@ -10623,7 +10340,7 @@
 #ifdef HAVE_X_SM
         /* Close X session management when we close its display.  */
         if (t->id == 1 && x_session_have_connection ())
-          x_session_close();
+          x_session_close ();
 #endif
         delete_terminal (t);
         break;
@@ -10880,7 +10597,7 @@
 }
 
 void
-x_initialize ()
+x_initialize (void)
 {
   baud_rate = 19200;
 
@@ -10938,7 +10655,7 @@
 
 
 void
-syms_of_xterm ()
+syms_of_xterm (void)
 {
   x_error_message = NULL;
 
--- a/src/xterm.h	Thu Jul 08 16:56:21 2010 +0900
+++ b/src/xterm.h	Thu Jul 08 17:09:35 2010 +0900
@@ -370,6 +370,9 @@
   /* XSettings atoms and windows.  */
   Atom Xatom_xsettings_sel, Xatom_xsettings_prop, Xatom_xsettings_mgr;
   Window xsettings_window;
+
+  /* Frame name and icon name */
+  Atom Xatom_net_wm_name, Xatom_net_wm_icon_name;
 };
 
 #ifdef HAVE_X_I18N
@@ -378,13 +381,13 @@
 #endif
 
 /* This checks to make sure we have a display.  */
-extern void check_x P_ ((void));
+extern void check_x (void);
 
-extern struct frame *x_window_to_frame P_ ((struct x_display_info *, int));
+extern struct frame *x_window_to_frame (struct x_display_info *, int);
 
-extern struct frame *x_any_window_to_frame P_ ((struct x_display_info *, int));
-extern struct frame *x_menubar_window_to_frame P_ ((struct x_display_info *, int));
-extern struct frame *x_top_window_to_frame P_ ((struct x_display_info *, int));
+extern struct frame *x_any_window_to_frame (struct x_display_info *, int);
+extern struct frame *x_menubar_window_to_frame (struct x_display_info *, int);
+extern struct frame *x_top_window_to_frame (struct x_display_info *, int);
 
 #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
 #define x_any_window_to_frame x_window_to_frame
@@ -403,14 +406,14 @@
 /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'.  */
 extern Lisp_Object Vx_pixel_size_width_font_regexp;
 
-extern struct x_display_info *x_display_info_for_display P_ ((Display *));
-extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
-extern void x_set_frame_alpha P_ ((struct frame *));
+extern struct x_display_info *x_display_info_for_display (Display *);
+extern struct x_display_info *x_display_info_for_name (Lisp_Object);
+extern void x_set_frame_alpha (struct frame *);
 
-extern struct x_display_info *x_term_init P_ ((Lisp_Object, char *, char *));
-extern int x_display_ok  P_ ((const char *));
+extern struct x_display_info *x_term_init (Lisp_Object, char *, char *);
+extern int x_display_ok  (const char *);
 
-extern void select_visual P_ ((struct x_display_info *));
+extern void select_visual (struct x_display_info *);
 
 
 struct font;
@@ -915,168 +918,168 @@
 
 /* From xselect.c.  */
 
-void x_handle_selection_notify P_ ((XSelectionEvent *));
-void x_handle_property_notify P_ ((XPropertyEvent *));
+void x_handle_selection_notify (XSelectionEvent *);
+void x_handle_property_notify (XPropertyEvent *);
 
 /* From xfns.c.  */
 
-Lisp_Object display_x_get_resource P_ ((struct x_display_info *,
-					Lisp_Object, Lisp_Object,
-					Lisp_Object, Lisp_Object));
-struct frame *check_x_frame P_ ((Lisp_Object));
+Lisp_Object display_x_get_resource (struct x_display_info *,
+                                    Lisp_Object, Lisp_Object,
+                                    Lisp_Object, Lisp_Object);
+struct frame *check_x_frame (Lisp_Object);
 EXFUN (Fx_display_color_p, 1);
 EXFUN (Fx_display_grayscale_p, 1);
-extern void x_free_gcs P_ ((struct frame *));
+extern void x_free_gcs (struct frame *);
 
 /* From xrdb.c.  */
 
-char *x_get_customization_string P_ ((XrmDatabase, char *, char *));
-XrmDatabase x_load_resources P_ ((Display *, char *, char *, char *));
-int x_get_resource P_ ((XrmDatabase, char *, char *,
-			XrmRepresentation, XrmValue *));
-void x_delete_display P_ ((struct x_display_info *));
-void x_make_frame_visible P_ ((struct frame *));
-void x_iconify_frame P_ ((struct frame *));
-void x_wm_set_size_hint P_ ((struct frame *, long, int));
-int x_text_icon P_ ((struct frame *, char *));
-int x_bitmap_icon P_ ((struct frame *, Lisp_Object));
-void x_set_window_size P_ ((struct frame *, int, int, int));
-void x_wm_set_window_state P_ ((struct frame *, int));
-int x_alloc_nearest_color P_ ((struct frame *, Colormap, XColor *));
+char *x_get_customization_string (XrmDatabase, char *, char *);
+XrmDatabase x_load_resources (Display *, char *, char *, char *);
+int x_get_resource (XrmDatabase, char *, char *,
+                    XrmRepresentation, XrmValue *);
+void x_delete_display (struct x_display_info *);
+void x_make_frame_visible (struct frame *);
+void x_iconify_frame (struct frame *);
+void x_wm_set_size_hint (struct frame *, long, int);
+int x_text_icon (struct frame *, char *);
+int x_bitmap_icon (struct frame *, Lisp_Object);
+void x_set_window_size (struct frame *, int, int, int);
+void x_wm_set_window_state (struct frame *, int);
+int x_alloc_nearest_color (struct frame *, Colormap, XColor *);
 
 /* Defined in xterm.c */
 
-extern void cancel_mouse_face P_ ((struct frame *));
-extern void x_scroll_bar_clear P_ ((struct frame *));
-extern int x_text_icon P_ ((struct frame *, char *));
-extern int x_bitmap_icon P_ ((struct frame *, Lisp_Object));
-extern void x_catch_errors P_ ((Display *));
-extern void x_check_errors P_ ((Display *, char *));
-extern int x_had_errors_p P_ ((Display *));
-extern int x_catching_errors P_ ((void));
-extern void x_uncatch_errors P_ ((void));
-extern void x_clear_errors P_ ((Display *));
-extern void x_set_window_size P_ ((struct frame *, int, int, int));
-extern void x_set_mouse_position P_ ((struct frame *, int, int));
-extern void x_set_mouse_pixel_position P_ ((struct frame *, int, int));
-extern void x_ewmh_activate_frame P_ ((struct frame *));
-extern void x_raise_frame P_ ((struct frame *));
-extern void x_lower_frame P_ ((struct frame *));
-extern void x_make_frame_visible P_ ((struct frame *));
-extern void x_make_frame_invisible P_ ((struct frame *));
-extern void x_iconify_frame P_ ((struct frame *));
-extern void x_free_frame_resources P_ ((struct frame *));
-extern void x_destroy_window P_ ((struct frame *));
-extern void x_wm_set_size_hint P_ ((struct frame *, long, int));
-extern void x_wm_set_window_state P_ ((struct frame *, int));
-extern void x_wm_set_icon_pixmap P_ ((struct frame *, int));
-extern void x_delete_display P_ ((struct x_display_info *));
-extern void x_delete_terminal P_ ((struct terminal *terminal));
-extern void x_initialize P_ ((void));
-extern unsigned long x_copy_color P_ ((struct frame *, unsigned long));
+extern void cancel_mouse_face (struct frame *);
+extern void x_scroll_bar_clear (struct frame *);
+extern int x_text_icon (struct frame *, char *);
+extern int x_bitmap_icon (struct frame *, Lisp_Object);
+extern void x_catch_errors (Display *);
+extern void x_check_errors (Display *, char *);
+extern int x_had_errors_p (Display *);
+extern int x_catching_errors (void);
+extern void x_uncatch_errors (void);
+extern void x_clear_errors (Display *);
+extern void x_set_window_size (struct frame *, int, int, int);
+extern void x_set_mouse_position (struct frame *, int, int);
+extern void x_set_mouse_pixel_position (struct frame *, int, int);
+extern void x_ewmh_activate_frame (struct frame *);
+extern void x_raise_frame (struct frame *);
+extern void x_lower_frame (struct frame *);
+extern void x_make_frame_visible (struct frame *);
+extern void x_make_frame_invisible (struct frame *);
+extern void x_iconify_frame (struct frame *);
+extern void x_free_frame_resources (struct frame *);
+extern void x_destroy_window (struct frame *);
+extern void x_wm_set_size_hint (struct frame *, long, int);
+extern void x_wm_set_window_state (struct frame *, int);
+extern void x_wm_set_icon_pixmap (struct frame *, int);
+extern void x_delete_display (struct x_display_info *);
+extern void x_delete_terminal (struct terminal *terminal);
+extern void x_initialize (void);
+extern unsigned long x_copy_color (struct frame *, unsigned long);
 #ifdef USE_X_TOOLKIT
 extern XtAppContext Xt_app_con;
-extern int x_alloc_lighter_color_for_widget __P ((Widget, Display*, Colormap,
-						  unsigned long *,
-						  double, int));
-extern void x_activate_timeout_atimer P_ ((void));
+extern int x_alloc_lighter_color_for_widget (Widget, Display*, Colormap,
+                                             unsigned long *,
+                                             double, int);
+extern void x_activate_timeout_atimer (void);
 #endif
-extern void x_query_colors P_ ((struct frame *f, XColor *, int));
-extern void x_query_color P_ ((struct frame *f, XColor *));
-extern void x_clear_area P_ ((Display *, Window, int, int, int, int, int));
-extern void set_vertical_scroll_bar P_ ((struct window *));
+extern void x_query_colors (struct frame *f, XColor *, int);
+extern void x_query_color (struct frame *f, XColor *);
+extern void x_clear_area (Display *, Window, int, int, int, int, int);
+extern void set_vertical_scroll_bar (struct window *);
 
-extern int x_dispatch_event P_ ((XEvent *, Display *));
-extern unsigned int x_x_to_emacs_modifiers P_ ((struct x_display_info *,
-						unsigned));
-extern int x_display_pixel_height P_ ((struct x_display_info *));
-extern int x_display_pixel_width P_ ((struct x_display_info *));
+extern int x_dispatch_event (XEvent *, Display *);
+extern unsigned int x_x_to_emacs_modifiers (struct x_display_info *,
+                                            unsigned);
+extern int x_display_pixel_height (struct x_display_info *);
+extern int x_display_pixel_width (struct x_display_info *);
 
-extern void x_set_sticky P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_wait_for_event P_ ((struct frame *, int));
+extern void x_set_sticky (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_wait_for_event (struct frame *, int);
 
 /* Defined in xselect.c */
 
-extern void x_handle_property_notify P_ ((XPropertyEvent *));
-extern void x_handle_selection_notify P_ ((XSelectionEvent *));
-extern void x_handle_selection_event P_ ((struct input_event *));
-extern void x_clear_frame_selections P_ ((struct frame *));
+extern void x_handle_property_notify (XPropertyEvent *);
+extern void x_handle_selection_notify (XSelectionEvent *);
+extern void x_handle_selection_event (struct input_event *);
+extern void x_clear_frame_selections (struct frame *);
 
-extern int x_handle_dnd_message P_ ((struct frame *,
-                                     XClientMessageEvent *,
-                                     struct x_display_info *,
-                                     struct input_event *bufp));
-extern int x_check_property_data P_ ((Lisp_Object));
-extern void x_fill_property_data P_ ((Display *,
-                                      Lisp_Object,
-                                      void *,
-                                      int));
-extern Lisp_Object x_property_data_to_lisp P_ ((struct frame *,
-                                                unsigned char *,
-                                                Atom,
-                                                int,
-                                                unsigned long));
+extern int x_handle_dnd_message (struct frame *,
+                                 XClientMessageEvent *,
+                                 struct x_display_info *,
+                                 struct input_event *bufp);
+extern int x_check_property_data (Lisp_Object);
+extern void x_fill_property_data (Display *,
+                                  Lisp_Object,
+                                  void *,
+                                  int);
+extern Lisp_Object x_property_data_to_lisp (struct frame *,
+                                            unsigned char *,
+                                            Atom,
+                                            int,
+                                            unsigned long);
 
 /* Defined in xfns.c */
 
-extern struct x_display_info * check_x_display_info P_ ((Lisp_Object frame));
+extern struct x_display_info * check_x_display_info (Lisp_Object frame);
 
 #ifdef USE_GTK
-extern int xg_set_icon P_ ((struct frame *, Lisp_Object));
-extern int xg_set_icon_from_xpm_data P_ ((struct frame *, char**));
+extern int xg_set_icon (struct frame *, Lisp_Object);
+extern int xg_set_icon_from_xpm_data (struct frame *, char**);
 #endif /* USE_GTK */
 
-extern void x_real_positions P_ ((struct frame *, int *, int *));
-extern int defined_color P_ ((struct frame *, char *, XColor *, int));
-extern void x_set_border_pixel P_ ((struct frame *, int));
-extern void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void x_implicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
-extern void xic_free_xfontset P_ ((struct frame *));
-extern void create_frame_xic P_ ((struct frame *));
-extern void destroy_frame_xic P_ ((struct frame *));
-extern void xic_set_preeditarea P_ ((struct window *, int, int));
-extern void xic_set_statusarea P_ ((struct frame *));
-extern void xic_set_xfontset P_ ((struct frame *, char *));
-extern int x_pixel_width P_ ((struct frame *));
-extern int x_pixel_height P_ ((struct frame *));
-extern int x_char_width P_ ((struct frame *));
-extern int x_char_height P_ ((struct frame *));
-extern int x_screen_planes P_ ((struct frame *));
-extern void x_sync P_ ((struct frame *));
-extern int x_defined_color P_ ((struct frame *, char *, XColor *, int));
+extern void x_real_positions (struct frame *, int *, int *);
+extern int defined_color (struct frame *, char *, XColor *, int);
+extern void x_set_border_pixel (struct frame *, int);
+extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
+extern void xic_free_xfontset (struct frame *);
+extern void create_frame_xic (struct frame *);
+extern void destroy_frame_xic (struct frame *);
+extern void xic_set_preeditarea (struct window *, int, int);
+extern void xic_set_statusarea (struct frame *);
+extern void xic_set_xfontset (struct frame *, char *);
+extern int x_pixel_width (struct frame *);
+extern int x_pixel_height (struct frame *);
+extern int x_char_width (struct frame *);
+extern int x_char_height (struct frame *);
+extern int x_screen_planes (struct frame *);
+extern void x_sync (struct frame *);
+extern int x_defined_color (struct frame *, char *, XColor *, int);
 #ifdef HAVE_X_I18N
-extern void free_frame_xic P_ ((struct frame *));
+extern void free_frame_xic (struct frame *);
 #endif
-extern void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
+extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 
 /* Defined in xfaces.c */
 
-extern int compute_glyph_face P_ ((struct frame *, int, int));
-extern int compute_glyph_face_1 P_ ((struct frame *, Lisp_Object, int));
-extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap,
-				   unsigned long *, int));
+extern int compute_glyph_face (struct frame *, int, int);
+extern int compute_glyph_face_1 (struct frame *, Lisp_Object, int);
+extern void x_free_dpy_colors (Display *, Screen *, Colormap,
+                               unsigned long *, int);
 
 /* Defined in xmenu.c */
 
-extern void x_menu_set_in_use P_ ((int));
-extern void x_menu_wait_for_event P_ ((void *data));
-extern void x_activate_menubar P_ ((struct frame *));
-extern int popup_activated P_ ((void));
-extern void initialize_frame_menubar P_ ((struct frame *));
-extern void free_frame_menubar P_ ((struct frame *));
+extern void x_menu_set_in_use (int);
+extern void x_menu_wait_for_event (void *data);
+extern void x_activate_menubar (struct frame *);
+extern int popup_activated (void);
+extern void initialize_frame_menubar (struct frame *);
+extern void free_frame_menubar (struct frame *);
 
 /* Defined in widget.c */
 
 #ifdef USE_X_TOOLKIT
-extern void widget_store_internal_border P_ ((Widget));
+extern void widget_store_internal_border (Widget);
 #endif
 
 /* Defined in xsmfns.c */
 #ifdef HAVE_X_SM
-extern void x_session_initialize P_ ((struct x_display_info *dpyinfo));
-extern int x_session_check_input P_ ((struct input_event *bufp));
-extern int x_session_have_connection P_ ((void));
-extern void x_session_close P_ ((void));
+extern void x_session_initialize (struct x_display_info *dpyinfo);
+extern int x_session_check_input (struct input_event *bufp);
+extern int x_session_have_connection (void);
+extern void x_session_close (void);
 #endif
 
 /* XEmbed implementation.  */
@@ -1129,10 +1132,10 @@
 
 /* Defined in xterm.c */
 
-extern void xembed_set_info P_ ((struct frame *f, enum xembed_info flags));
-extern void xembed_send_message P_ ((struct frame *f, Time time,
-				     enum xembed_message message,
-				     long detail, long data1, long data2));
+extern void xembed_set_info (struct frame *f, enum xembed_info flags);
+extern void xembed_send_message (struct frame *f, Time time,
+                                 enum xembed_message message,
+                                 long detail, long data1, long data2);
 
 /* Is the frame embedded into another application? */