changeset 109432:b3c31bb21485

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Mon, 12 Jul 2010 22:43:26 +0000
parents 799b50142743 (current diff) 88a5b905a895 (diff)
children f16404a62b75
files
diffstat 54 files changed, 878 insertions(+), 813 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jul 11 22:57:47 2010 +0000
+++ b/ChangeLog	Mon Jul 12 22:43:26 2010 +0000
@@ -1,3 +1,10 @@
+2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* configure.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
+	(PROFILING_LDFLAGS): Substitute, don't add them to CFLAGS/LDFLAGS.
+	(C_OPTIMIZE_SWITCH): Remove.
+	(TEMACS_LDFLAGS2): Add ${PROFILING_LDFLAGS}.
+
 2010-07-11  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* configure.in: Don't check for index and rindex, check for strchr
--- a/configure	Sun Jul 11 22:57:47 2010 +0000
+++ b/configure	Mon Jul 12 22:43:26 2010 +0000
@@ -724,6 +724,7 @@
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
+C_WARNINGS_SWITCH
 EGREP
 GREP
 CPP
@@ -742,6 +743,8 @@
 build_vendor
 build_cpu
 build
+PROFILING_LDFLAGS
+PROFILING_CFLAGS
 MAINT
 GZIP_INFO
 target_alias
@@ -3013,6 +3016,8 @@
    PROFILING_LDFLAGS=
 fi
 
+
+
 # Check whether --enable-autodepend was given.
 if test "${enable_autodepend+set}" = set; then :
   enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
@@ -4313,14 +4318,6 @@
   CC="$NON_GNU_CC"
 fi
 
-if test x$GCC = xyes; then
-  C_OPTIMIZE_SWITCH=-O2
-  test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
-else
-  C_OPTIMIZE_SWITCH=-O
-  test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
-fi
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4875,6 +4872,7 @@
 unset SAVE_CFLAGS
 
 
+
 #### Some other nice autoconf tests.
 
 ac_ext=c
@@ -5485,34 +5483,12 @@
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 
-LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
-
 
 # The value of CPP is a quoted variable reference, so we need to do this
 # to get its actual value...
 CPP=`eval "echo $CPP"`
 
 
-### First figure out CFLAGS (which we use for running the compiler here)
-### and REAL_CFLAGS (which we use for real compilation).
-### The two are the same except when using GCC where we might use
-### extra warning and profiling flags.
-
-### If the CFLAGS env var is specified, we use that value
-### instead of the default.
-
-if test "x$SPECIFIED_CFLAGS" = x; then
-  CFLAGS="-g $C_OPTIMIZE_SWITCH"
-  if test x$GCC = xyes; then
-    REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS"
-  else
-    REAL_CFLAGS="$CFLAGS"
-  fi
-else
-  REAL_CFLAGS="$CFLAGS"
-fi
-
-
 CANNOT_DUMP=no
 case "$opsys" in
   your-opsys-here)
@@ -7417,7 +7393,7 @@
 tmp_CFLAGS="$CFLAGS"
 CPPFLAGS="$CPPFLAGS -x objective-c"
 CFLAGS="$CFLAGS -x objective-c"
-TEMACS_LDFLAGS2="\${LDFLAGS}"
+TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
 if test "${with_ns}" != no; then
   if test "${opsys}" = darwin; then
      NS_IMPL_COCOA=yes
@@ -7441,7 +7417,6 @@
        GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
      CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
      CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
-     REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
      LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
      LIB_STANDARD=
      START_FILES=
@@ -8075,6 +8050,7 @@
 # used for the tests that follow.  We set them back to REAL_CFLAGS and
 # REAL_CPPFLAGS later on.
 
+REAL_CFLAGS="$CFLAGS"
 REAL_CPPFLAGS="$CPPFLAGS"
 
 if test "${HAVE_X11}" = "yes"; then
--- a/configure.in	Sun Jul 11 22:57:47 2010 +0000
+++ b/configure.in	Mon Jul 12 22:43:26 2010 +0000
@@ -327,6 +327,8 @@
    PROFILING_CFLAGS=
    PROFILING_LDFLAGS=
 fi
+AC_SUBST(PROFILING_CFLAGS)
+AC_SUBST(PROFILING_LDFLAGS)
 
 AC_ARG_ENABLE(autodepend,
 [AS_HELP_STRING([--enable-autodepend],
@@ -720,14 +722,6 @@
   CC="$NON_GNU_CC"
 fi
 
-if test x$GCC = xyes; then
-  C_OPTIMIZE_SWITCH=-O2
-  test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
-else
-  C_OPTIMIZE_SWITCH=-O
-  test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
-fi
-
 dnl checks for Unix variants
 AC_USE_SYSTEM_EXTENSIONS
 
@@ -770,6 +764,7 @@
 CFLAGS="$SAVE_CFLAGS"
 unset has_option
 unset SAVE_CFLAGS
+AC_SUBST(C_WARNINGS_SWITCH)
 
 
 #### Some other nice autoconf tests.
@@ -861,35 +856,12 @@
   LDFLAGS=$late_LDFLAGS
   [AC_MSG_RESULT(no)])
 
-LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
-
 
 # The value of CPP is a quoted variable reference, so we need to do this
 # to get its actual value...
 CPP=`eval "echo $CPP"`
 
 
-### First figure out CFLAGS (which we use for running the compiler here)
-### and REAL_CFLAGS (which we use for real compilation).
-### The two are the same except when using GCC where we might use
-### extra warning and profiling flags.
-
-### If the CFLAGS env var is specified, we use that value
-### instead of the default.
-
-dnl Note AC_PROG_CC sets CFLAGS to -g -O2 for gcc anyway.
-if test "x$SPECIFIED_CFLAGS" = x; then
-  CFLAGS="-g $C_OPTIMIZE_SWITCH"
-  if test x$GCC = xyes; then
-    REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS"
-  else
-    REAL_CFLAGS="$CFLAGS"
-  fi
-else
-  REAL_CFLAGS="$CFLAGS"
-fi
-
-
 dnl Not used by any currently supported platform.
 dnl The function dump-emacs will not be defined and temacs will do
 dnl (load "loadup") automatically unless told otherwise.
@@ -1497,7 +1469,7 @@
 tmp_CFLAGS="$CFLAGS"
 CPPFLAGS="$CPPFLAGS -x objective-c"
 CFLAGS="$CFLAGS -x objective-c"
-TEMACS_LDFLAGS2="\${LDFLAGS}"
+TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
 dnl I don't think it's especially important, but src/Makefile.in
 dnl (now the only user of ns_appdir) used to go to the trouble of adding a
 dnl trailing "/" to it, so now we do it here.
@@ -1526,7 +1498,6 @@
        GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
      CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
      CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
-     REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
      LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
      LIB_STANDARD=
      START_FILES=
@@ -1732,6 +1703,7 @@
 # used for the tests that follow.  We set them back to REAL_CFLAGS and
 # REAL_CPPFLAGS later on.
 
+REAL_CFLAGS="$CFLAGS"
 REAL_CPPFLAGS="$CPPFLAGS"
 
 if test "${HAVE_X11}" = "yes"; then
--- a/lib-src/ChangeLog	Sun Jul 11 22:57:47 2010 +0000
+++ b/lib-src/ChangeLog	Mon Jul 12 22:43:26 2010 +0000
@@ -1,3 +1,16 @@
+2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
+	(PROFILING_LDFLAGS): Set from substitution.
+	(BASE_CFLAGS): Add  ${C_WARNINGS_SWITCH}.
+	(ALL_CFLAGS, CPP_CFLAGS): Add ${PROFILING_CFLAGS}.
+	(LINK_CFLAGS): Add ${PROFILING_LDFLAGS}.
+
+2010-07-12  Eli Zaretskii  <eliz@gnu.org>
+
+	* makefile.w32-in (lisp2): Change hebrew.el to hebrew.elc (see
+	revno 100789).
+
 2010-07-11  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* emacsclient.c (set_local_socket): Use strchr, strrchr instead of
--- a/lib-src/Makefile.in	Sun Jul 11 22:57:47 2010 +0000
+++ b/lib-src/Makefile.in	Mon Jul 12 22:43:26 2010 +0000
@@ -36,6 +36,9 @@
 EXEEXT=@EXEEXT@
 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
+C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
+PROFILING_CFLAGS = @PROFILING_CFLAGS@
+PROFILING_LDFLAGS = @PROFILING_LDFLAGS@
 
 # Program name transformation.
 TRANSFORM = @program_transform_name@
@@ -165,12 +168,12 @@
 # Those files shared with other GNU utilities need HAVE_CONFIG_H
 # defined before they know they can take advantage of the information
 # in ../src/config.h.
-BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) -DHAVE_CONFIG_H \
-              -I. -I../src -I${srcdir} -I${srcdir}/../src
+BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) ${C_WARNINGS_SWITCH} \
+	      -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src
 
-ALL_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
-LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
-CPP_CFLAGS = ${BASE_CFLAGS} ${CPPFLAGS} ${CFLAGS}
+ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
+LINK_CFLAGS = ${BASE_CFLAGS} ${PROFILING_LDFLAGS} ${LDFLAGS} ${CFLAGS}
+CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
 
 LOADLIBES=$(LIBS_SYSTEM)
 
--- a/lib-src/makefile.w32-in	Sun Jul 11 22:57:47 2010 +0000
+++ b/lib-src/makefile.w32-in	Mon Jul 12 22:43:26 2010 +0000
@@ -247,7 +247,7 @@
 	$(lispsource)language/slovak.el \
 	$(lispsource)language/romanian.el \
 	$(lispsource)language/greek.el \
-	$(lispsource)language/hebrew.el \
+	$(lispsource)language/hebrew.elc \
 	$(lispsource)language/japanese.el \
 	$(lispsource)language/korean.el \
 	$(lispsource)language/lao.el \
--- a/lisp/ChangeLog	Sun Jul 11 22:57:47 2010 +0000
+++ b/lisp/ChangeLog	Mon Jul 12 22:43:26 2010 +0000
@@ -1,3 +1,18 @@
+2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* language/tai-viet.el ("TaiViet"): Try to fix re-encoding
+	bugs. (Bug#5806)
+
+	* language/tv-util.el (tai-viet-re): Remove format.
+
+2010-07-12  Kenichi Handa  <handa@m17n.org>
+
+	* language/hebrew.el: Remove no-byte-compile declaration.  Change
+	coding: tag to utf-8.  Register hebrew-shape-gstring in
+	composition-function-table for 3-character looking back.
+	(hebrew-font-get-precomposed): New function.
+	(hebrew-shape-gstring): Utilize precomposed glyphs if available.
+
 2010-07-11  Chong Yidong  <cyd@stupidchicken.com>
 
 	* mouse.el (mouse-drag-track): Handle select-active-regions
--- a/lisp/language/hebrew.el	Sun Jul 11 22:57:47 2010 +0000
+++ b/lisp/language/hebrew.el	Mon Jul 12 22:43:26 2010 +0000
@@ -1,4 +1,4 @@
-;;; hebrew.el --- support for Hebrew -*- coding: iso-2022-7bit; no-byte-compile: t -*-
+;;; hebrew.el --- support for Hebrew -*- coding: utf-8 -*-
 
 ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 ;;   Free Software Foundation, Inc.
@@ -59,7 +59,7 @@
 	    (nonascii-translation . iso-8859-8)
 	    (input-method . "hebrew")
 	    (unibyte-display . hebrew-iso-8bit)
-	    (sample-text . "Hebrew	,Hylem(B")
+	    (sample-text . "Hebrew	שלום")
 	    (documentation . "Bidirectional editing is supported.")))
 
 (set-language-info-alist
@@ -85,33 +85,167 @@
   :mime-charset 'cp862)
 (define-coding-system-alias 'ibm862 'cp862)
 
-;; Composition function for hebrew.
+;; Return a nested alist of Hebrew character sequences vs the
+;; corresponding glyph of FONT-OBJECT.
+(defun hebrew-font-get-precomposed (font-object)
+  (let ((precomposed (font-get font-object 'hebrew-precomposed))
+	;; Vector of Hebrew precomposed charaters.
+	(chars [#xFB2A #xFB2B #xFB2C #xFB2D #xFB2E #xFB2F #xFB30 #xFB31
+		#xFB32 #xFB33 #xFB34 #xFB35 #xFB36 #xFB38 #xFB39 #xFB3A
+		#xFB3B #xFB3C #xFB3E #xFB40 #xFB41 #xFB43 #xFB44 #xFB46
+		#xFB47 #xFB48 #xFB49 #xFB4A #xFB4B #xFB4C #xFB4D #xFB4E])
+	;; Vector of decomposition character sequences corresponding
+	;; to the above vector.
+	(decomposed 
+	 [[#x05E9 #x05C1]
+	  [#x05E9 #x05C2]
+	  [#x05E9 #x05BC #x05C1]
+	  [#x05E9 #x05BC #x05C2]
+	  [#x05D0 #x05B7]
+	  [#x05D0 #x05B8]
+	  [#x05D0 #x05BC]
+	  [#x05D1 #x05BC]
+	  [#x05D2 #x05BC]
+	  [#x05D3 #x05BC]
+	  [#x05D4 #x05BC]
+	  [#x05D5 #x05BC]
+	  [#x05D6 #x05BC]
+	  [#x05D8 #x05BC]
+	  [#x05D9 #x05BC]
+	  [#x05DA #x05BC]
+	  [#x05DB #x05BC]
+	  [#x05DC #x05BC]
+	  [#x05DE #x05BC]
+	  [#x05E0 #x05BC]
+	  [#x05E1 #x05BC]
+	  [#x05E3 #x05BC]
+	  [#x05E4 #x05BC]
+	  [#x05E6 #x05BC]
+	  [#x05E7 #x05BC]
+	  [#x05E8 #x05BC]
+	  [#x05E9 #x05BC]
+	  [#x05EA #x05BC]
+	  [#x05D5 #x05B9]
+	  [#x05D1 #x05BF]
+	  [#x05DB #x05BF]
+	  [#x05E4 #x05BF]]))
+    (unless precomposed
+      (setq precomposed (list t))
+      (let ((gvec (font-get-glyphs font-object 0 (length chars) chars)))
+	(dotimes (i (length chars))
+	  (if (aref gvec i)
+	      (set-nested-alist (aref decomposed i) (aref gvec i)
+				precomposed))))
+      ;; Cache the result in FONT-OBJECT's property.
+      (font-put font-object 'hebrew-precomposed precomposed))
+    precomposed))
+
+;; Composition function for hebrew.  GSTRING is made of a Hebrew base
+;; character followed by Hebrew diacritical marks, or is made of
+;; single Hebrew diacritical mark.  Adjust GSTRING to display that
+;; sequence properly.  The basic strategy is:
+;;
+;; (1) If there's single diacritical, add padding space to the left
+;; and right of the glyph.
+;;
+;; (2) If the font has OpenType features for Hebrew, ask the OTF
+;; driver the whole work.
+;;
+;; (3) If the font has precomposed glyphs, use them as far as
+;; possible.  Adjust the remaining glyphs artificially.
+
 (defun hebrew-shape-gstring (gstring)
-  (setq gstring (font-shape-gstring gstring))
-  (let ((header (lgstring-header gstring))
-	(nchars (lgstring-char-len gstring))
-	(nglyphs (lgstring-glyph-len gstring))
-	(base-width (lglyph-width (lgstring-glyph gstring 0))))
-    (while (and (> nglyphs 1)
-		(not (lgstring-glyph gstring (1- nglyphs))))
-      (setq nglyphs (1- nglyphs)))
-    (while (> nglyphs 1)
-      (setq nglyphs (1- nglyphs))
-      (let* ((glyph (lgstring-glyph gstring nglyphs))
-	     (adjust (and glyph (lglyph-adjustment glyph))))
-	(if adjust
-	    (setq nglyphs 0)
-	  (if (>= (lglyph-lbearing glyph) 0)
-	      (lglyph-set-adjustment glyph (- base-width) 0 0))))))
-  gstring)
+  (let* ((font (lgstring-font gstring))
+	 (otf (font-get font :otf))
+	 (nchars (lgstring-char-len gstring))
+	 header nglyphs base-width glyph precomposed val idx)
+    (cond
+     ((= nchars 1)
+      ;; Independent diacritical mark.  Add padding space to left or
+      ;; right so that the glyph doesn't overlap with the surrounding
+      ;; chars.
+      (setq glyph (lgstring-glyph gstring 0))
+      (let ((width (lglyph-width glyph))
+	    bearing)
+	(if (< (setq bearing (lglyph-lbearing glyph)) 0)
+	    (lglyph-set-adjustment glyph bearing 0 (- width bearing)))
+	(if (> (setq bearing (lglyph-rbearing glyph)) width)
+	    (lglyph-set-adjustment glyph 0 0 bearing))))
+
+     ((or (assq 'hebr (car otf)) (assq 'hebr (cdr otf)))
+      ;; FONT has OpenType features for Hebrew.
+      (font-shape-gstring gstring))
+
+     (t
+      ;; FONT doesn't have OpenType features for Hebrew.
+      ;; Try a precomposed glyph.
+      ;; Now GSTRING is in this form:
+      ;;   [[FONT CHAR1 CHAR2 ... CHARn] nil GLYPH1 GLYPH2 ... GLYPHn nil ...]
+      (setq precomposed (hebrew-font-get-precomposed font)
+	    header (lgstring-header gstring)
+	    val (lookup-nested-alist header precomposed nil 1))
+      (if (and (consp val) (vectorp (car val)))
+	  ;; All characters can be displayed by a single precomposed glyph.
+	  ;; Reform GSTRING to [HEADER nil PRECOMPOSED-GLYPH nil ...]
+	  (let ((glyph (copy-sequence (car val))))
+	    (lglyph-set-from-to glyph 0 (1- nchars))
+	    (lgstring-set-glyph gstring 0 glyph)
+	    (lgstring-set-glyph gstring 1 nil))
+	(if (and (integerp val) (> val 2)
+		 (setq glyph (lookup-nested-alist header precomposed val 1))
+		 (consp glyph) (vectorp (car glyph)))
+	    ;; The first (1- VAL) characters can be displayed by a
+	    ;; precomposed glyph.  Provided that VAL is 3, the first
+	    ;; two glyphs should be replaced by the precomposed glyph.
+	    ;; In that case, reform GSTRING to:
+	    ;;   [HEADER nil PRECOMPOSED-GLYPH GLYPH3 ... GLYPHn nil ...]
+	    (let* ((ncmp (1- val))	; number of composed glyphs
+		   (diff (1- ncmp)))	; number of reduced glyphs
+	      (setq glyph (copy-sequence (car glyph)))
+	      (lglyph-set-from-to glyph 0 (1- nchars))
+	      (lgstring-set-glyph gstring 0 glyph)
+	      (setq idx ncmp)
+	      (while (< idx nchars)
+		(setq glyph (lgstring-glyph gstring idx))
+		(lglyph-set-from-to glyph 0 (1- nchars))
+		(lgstring-set-glyph gstring (- idx diff) glyph)
+		(setq idx (1+ idx)))
+	      (lgstring-set-glyph gstring (- idx diff) nil)
+	      (setq idx (- ncmp diff)
+		    nglyphs (- nchars diff)))
+	  (setq glyph (lgstring-glyph gstring 0))
+	  (lglyph-set-from-to glyph 0 (1- nchars))
+	  (setq idx 1 nglyphs nchars))
+	;; Now IDX is an index to the first non-precomposed glyph.
+	;; Adjust positions of the remaining glyphs artificially.
+	(setq base-width (lglyph-width (lgstring-glyph gstring 0)))
+	(while (< idx nglyphs)
+	  (setq glyph (lgstring-glyph gstring idx))
+	  (lglyph-set-from-to glyph 0 (1- nchars))
+	  (if (>= (lglyph-lbearing glyph) (lglyph-width glyph))
+	      ;; It seems that this glyph is designed to be rendered
+	      ;; before the base glyph.
+	      (lglyph-set-adjustment glyph (- base-width) 0 0)
+	    (if (>= (lglyph-lbearing glyph) 0)
+		;; Align the horizontal center of this glyph to the
+		;; horizontal center of the base glyph.
+		(let ((width (- (lglyph-rbearing glyph)
+				(lglyph-lbearing glyph))))
+		  (lglyph-set-adjustment glyph
+					 (- (/ (- base-width width) 2)
+					    (lglyph-lbearing glyph)
+					    base-width) 0 0))))
+	  (setq idx (1+ idx))))))
+    gstring))
 
 (let ((pattern1 "[\u05D0-\u05F2][\u0591-\u05BF\u05C1-\u05C5\u05C7]+")
       (pattern2 "[\u05D0-\u05F2]\u200D[\u0591-\u05BF\u05C1-\u05C5\u05C7]+"))
   (set-char-table-range
    composition-function-table '(#x591 . #x5C7)
-   (list (vector pattern2 2 'hebrew-shape-gstring)
+   (list (vector pattern2 3 'hebrew-shape-gstring)
+	 (vector pattern2 2 'hebrew-shape-gstring)
 	 (vector pattern1 1 'hebrew-shape-gstring)
-	 ["[\u0591-\u05C7]" 0 font-shape-gstring]))
+	 [nil 0 hebrew-shape-gstring]))
   (set-char-table-range
    composition-function-table #x5C0 nil)
   (set-char-table-range
--- a/lisp/language/tai-viet.el	Sun Jul 11 22:57:47 2010 +0000
+++ b/lisp/language/tai-viet.el	Mon Jul 12 22:43:26 2010 +0000
@@ -37,7 +37,7 @@
 	      (coding-system utf-8)
 	      (coding-priority utf-8)
 	      (input-method . "tai-sonla")
-	      (sample-text . "TaiViet (ꪁꪫꪱꪣ ꪽꪕ)\t\tꪅꪰꪙ꫃ ꪨꪮ꫃ ꪁꪫꪱ / ꪅꪾ ꪨ� ꪁꪫꪱ")
+	      (sample-text . "TaiViet (ꪁꪫꪱꪣ ꪼꪕ)\t\tꪅꪰꪙꫂ ꪨꪮꫂ ꪁꪫꪱ / ꪅꪽ ꪨꪷ ꪁꪫꪱ")
 	      (documentation . "\
 TaiViet refers to the Tai language used by Tai people in
 Vietnam, and also refers to the script used for this language.
@@ -45,15 +45,15 @@
 language/script used in Thailand, but now they differ from each
 other in a significant way (especially the scripts are).
 
-The language name is spelled as \"ꪁꪫꪱꪣ ꪽꪕ\", and the script name is
-spelled as \"ꪎ� ꪽꪕ\" in the modern form, \"ꪎꪴ ꪽꪕ\" in the traditional
-from.
+The language name is spelled as \"ꪁꪫꪱꪣ ꪼꪕ\", and the script name is
+spelled as \"ꪎ ꪼꪕ\" in the modern form, \"ꪎꪳ ꪼꪕ\" in the traditional
+form.
 
 As the proposal for TaiViet script to the Unicode is still on
 the progress, we use the Private Use Area for TaiViet
 characters (U+F000..U+F07E).  A TaiViet font encoded accordingly
 is available at this web page:
-    http://www.m17n.org/TaiViet/
+    http://www.m17n.org/viettai/
 ")))
 
 (provide 'tai-viet)
--- a/lisp/language/tv-util.el	Sun Jul 11 22:57:47 2010 +0000
+++ b/lisp/language/tv-util.el	Mon Jul 12 22:43:26 2010 +0000
@@ -24,8 +24,7 @@
 ;;; Code
 
 ;; Regexp matching with a sequence of Tai Viet characters.
-(defconst tai-viet-re
-  (format "[\xaa80-\xaac2\xaadb-\xaadf-]+"))
+(defconst tai-viet-re "[\xaa80-\xaac2\xaadb-\xaadf]+")
 
 ;; Char-table of information about glyph type of Tai Viet characters.
 (defconst tai-viet-glyph-info
--- a/lwlib/ChangeLog	Sun Jul 11 22:57:47 2010 +0000
+++ b/lwlib/ChangeLog	Mon Jul 12 22:43:26 2010 +0000
@@ -1,3 +1,9 @@
+2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS): Set from
+	substitution.
+	(ALL_CFLAGS): Add ${C_WARNINGS_SWITCH} and ${PROFILING_CFLAGS}.
+
 2010-07-08  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* xlwmenu.c (size_menu_item): Change from K&R to prototype.
--- a/lwlib/Makefile.in	Sun Jul 11 22:57:47 2010 +0000
+++ b/lwlib/Makefile.in	Mon Jul 12 22:43:26 2010 +0000
@@ -29,6 +29,8 @@
 C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
+C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
+PROFILING_CFLAGS = @PROFILING_CFLAGS@
 
 CC=@CC@
 CFLAGS=@CFLAGS@
@@ -50,7 +52,8 @@
 
 # ../src is needed to find config.h.
 ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
-  $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) $(CFLAGS) \
+  $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \
+  ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} $(CFLAGS) \
   -DHAVE_CONFIG_H -Demacs -I. -I../src -I${srcdir} -I${srcdir}/../src
 
 .c.o:
--- a/msdos/ChangeLog	Sun Jul 11 22:57:47 2010 +0000
+++ b/msdos/ChangeLog	Mon Jul 12 22:43:26 2010 +0000
@@ -1,3 +1,11 @@
+2010-07-12  Eli Zaretskii  <eliz@gnu.org>
+
+	* sed1v2.inp (C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS):
+	Edit to empty.
+
+	* sed3v2.inp(C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS):
+	Edit to empty.
+
 2010-07-11  Eli Zaretskii  <eliz@gnu.org>
 
 	* sed2v2.inp (HAVE_STRCHR, HAVE_STRRCHR): Don't edit, already
--- a/msdos/sed1v2.inp	Sun Jul 11 22:57:47 2010 +0000
+++ b/msdos/sed1v2.inp	Mon Jul 12 22:43:26 2010 +0000
@@ -40,6 +40,9 @@
 /^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@//
 /^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@//
 /^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@//
+/^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@//
+/^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@//
+/^PROFILING_LDFLAGS *=/s/@PROFILING_LDFLAGS@//
 #/^LD_SWITCH_X_SITE *=/s/@LD_SWITCH_X_SITE@//
 /^LD_SWITCH_SYSTEM_TEMACS *=/s/@LD_SWITCH_SYSTEM_TEMACS@//
 /^LD_SWITCH_X_SITE_AUX *=/s/@LD_SWITCH_X_SITE_AUX@//
--- a/msdos/sed3v2.inp	Sun Jul 11 22:57:47 2010 +0000
+++ b/msdos/sed3v2.inp	Mon Jul 12 22:43:26 2010 +0000
@@ -39,6 +39,9 @@
 /^CFLAGS *=/s!=.*$!=-O2 -g!
 /^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS!
 /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
+/^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@//
+/^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@//
+/^PROFILING_LDFLAGS *=/s/@PROFILING_LDFLAGS@//
 /^LOADLIBES *=/s!=.*$!=!
 /^ALLOCA *=/s!@ALLOCA@!!
 /^EXEEXT *=/s!@EXEEXT@!!
--- a/nt/ChangeLog	Sun Jul 11 22:57:47 2010 +0000
+++ b/nt/ChangeLog	Mon Jul 12 22:43:26 2010 +0000
@@ -1,3 +1,7 @@
+2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* config.nt (volatile): Remove definition.
+
 2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
--- a/nt/config.nt	Sun Jul 11 22:57:47 2010 +0000
+++ b/nt/config.nt	Mon Jul 12 22:43:26 2010 +0000
@@ -349,13 +349,6 @@
 
 #define my_strftime nstrftime   /* for strftime.c */
 
-/* Non-ANSI C compilers usually don't have volatile.  */
-#ifndef HAVE_VOLATILE
-#ifndef __STDC__
-#define volatile
-#endif
-#endif
-
 #ifndef WINDOWSNT
 /* 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
--- a/oldXMenu/ChangeLog	Sun Jul 11 22:57:47 2010 +0000
+++ b/oldXMenu/ChangeLog	Mon Jul 12 22:43:26 2010 +0000
@@ -1,3 +1,13 @@
+2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* XMenu.h: Include <stdlib.h>.
+
+2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS): Set from
+	substitution.
+	(ALL_CFLAGS): Add ${C_WARNINGS_SWITCH} and ${PROFILING_CFLAGS}.
+
 2010-07-04  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* Activate.c: Convert function definitions to standard C.
--- a/oldXMenu/Makefile.in	Sun Jul 11 22:57:47 2010 +0000
+++ b/oldXMenu/Makefile.in	Mon Jul 12 22:43:26 2010 +0000
@@ -49,6 +49,8 @@
 C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
+C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
+PROFILING_CFLAGS = @PROFILING_CFLAGS@
 
 EXTRA=insque.o
 CC=@CC@
@@ -88,6 +90,7 @@
 
 ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
   $(C_SWITCH_X_SITE) $(C_SWITCH_X_SYSTEM) \
+  ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} \
   $(CPPFLAGS) $(CFLAGS) -DEMACS_BITMAP_FILES \
   -I../src -I${srcdir} -I${srcdir}/../src
 
--- a/oldXMenu/XMenu.h	Sun Jul 11 22:57:47 2010 +0000
+++ b/oldXMenu/XMenu.h	Mon Jul 12 22:43:26 2010 +0000
@@ -16,6 +16,7 @@
 #ifndef _XMenu_h_
 #define _XMenu_h_
 
+#include <stdlib.h>
 #include <X11/Xutil.h>
 #include "X10.h"
 
--- a/src/ChangeLog	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/ChangeLog	Mon Jul 12 22:43:26 2010 +0000
@@ -1,3 +1,134 @@
+2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* xterm.c (x_scroll_bar_set_handle, x_scroll_bar_expose)
+	(_scroll_bar_note_movement): Convert definitions to standard C.
+	* xmenu.c (menu_help_callback, pop_down_menu, xmenu_show):
+	* xfns.c (hack_wm_protocols, x_window, x_window): Likewise.
+
+2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* xterm.c (x_frame_of_widget, x_alloc_nearest_color_for_widget)
+	(x_alloc_lighter_color_for_widget, cvt_string_to_pixel)
+	(cvt_pixel_dtor, x_window_to_menu_bar, xt_action_hook)
+	(xaw_jump_callback, xaw_scroll_callback)
+	(x_create_toolkit_scroll_bar, x_set_toolkit_scroll_bar_thumb)
+	(x_wm_set_size_hint, x_activate_timeout_atimer): Convert
+	definitions to standard C.
+	* xmenu.c (menubar_id_to_frame, popup_get_selection)
+	(popup_activate_callback, popup_deactivate_callback)
+	(menu_highlight_callback, menubar_selection_callback)
+	(apply_systemfont_to_dialog, apply_systemfont_to_menu)
+	(free_frame_menubar, popup_selection_callback, as)
+	(create_and_show_popup_menu, dialog_selection_callback)
+	(create_and_show_dialog):
+	* xfns.c (hack_wm_protocols, x_window):
+	* xfaces.c (x_update_menu_appearance):
+	* widget.c (get_default_char_pixel_size, pixel_to_char_size)
+	(char_to_pixel_size, round_size_to_char, get_wm_shell)
+	(set_frame_size, update_wm_hints, setup_frame_gcs)
+	(update_various_frame_slots, update_from_various_frame_slots)
+	(EmacsFrameInitialize, EmacsFrameRealize, EmacsFrameResize)
+	(EmacsFrameSetValues, EmacsFrameQueryGeometry)
+	(EmacsFrameSetCharSize, widget_store_internal_border): Likewise.
+
+2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* dbusbind.c (xd_initialize): Don't compare boolean with a
+	constant.
+
+2010-07-12  Eli Zaretskii  <eliz@gnu.org>
+
+	* process.c (setup_process_coding_systems): Move to the part
+	shared by non-subprocesses systems, and make its body empty when
+	subprocesses is not defined.
+	(close_process_descs): Move to the part shared by non-subprocesses
+	systems.
+	(wait_reading_process_output) [!subprocesses]: Convert arg list to
+	ANSI C.
+
+2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* editfns.c (transpose_markers): Convert old-style definition.
+	* emacs.c (abort, shut_down_emacs, fixup_locale)
+	(synchronize_system_time_locale)
+	(synchronize_system_messages_locale, syms_of_emacs): Likewise.
+	* floatfns.c (extract_float, matherr, init_floatfns)
+	(syms_of_floatfns): Likewise.
+	* fns.c (make_hash_table): Likewise.
+	* ftfont.c (ftfont_get_otf, ftfont_otf_features)
+	(ftfont_otf_capability, ftfont_get_glyph_id, ftfont_get_metrics)
+	(ftfont_drive_otf, ftfont_shape_by_flt, ftfont_shape)
+	(ftfont_variation_glyphs): Likewise.
+	* gtkutil.c (xg_create_widget, xg_modify_menubar_widgets): Likewise.
+	* keymap.c (describe_map_tree, describe_map, describe_vector): Likewise.
+	* lread.c (read_filtered_event): Likewise.
+	* minibuf.c (read_minibuf_noninteractive, read_minibuf): Likewise.
+	* process.c (wait_reading_process_output): Likewise.
+	* scroll.c (do_line_insertion_deletion_costs): Likewise.
+	* search.c (search_buffer, boyer_moore): Likewise.
+	* syntax.c (scan_sexps_forward): Likewise.
+	* xdisp.c (try_scrolling): Likewise.
+	* xfaces.c (face_at_buffer_position, face_for_overlay_string)
+	(face_at_string_position): Likewise.
+	* xfns.c (x_default_scroll_bar_color_parameter): Likewise.
+	* xselect.c (x_get_window_property, receive_incremental_selection)
+	(x_get_window_property_as_lisp_data, lisp_data_to_selection_data):
+	Likewise.
+	* xterm.c (x_draw_relief_rect, x_draw_box_rect): Likewise.
+
+2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* callproc.c (child_setup): Remove subprocesses conditional.
+	Remove code dealing with SET_EMACS_PRIORITY, unused.
+
+	* buffer.c (Fset_buffer_multibyte): Remove subprocesses conditional.
+	* process.c (close_process_descs): Use DOS_NT instead of WINDOWSNT.
+
+	* emacs.c (__do_global_ctors, __do_global_ctors_aux)
+	(__do_global_dtors, __main): Use void in definition.
+	(main): Remove code dealing with SET_EMACS_PRIORITY, unused.
+	Remove SYMS_MACHINE code, unused.  Remove SYMS_SYSTEM, inline
+	the only users from ...
+	* s/ms-w32.h (SYMS_SYSTEM): ... here and ...
+	* s/msdos.h (SYMS_SYSTEM): ... here.  Remove.
+	(HAVE_VOLATILE): Remove, unused.
+
+	Convert more function definitions to standard C.
+	* xdisp.c (window_box_edges, handle_single_display_spec)
+	(display_string): Convert definition to standard C.
+	* scroll.c (do_direct_scrolling, scrolling_1):
+	* dispnew.c (allocate_matrices_for_frame_redisplay)
+	(mirrored_line_dance):
+	* coding.c (code_convert_string):
+	* charset.c (map_charset_chars):
+	* ccl.c (Fccl_program_p, Fccl_execute, Fccl_execute_on_string)
+	(Fregister_ccl_program, Fregister_code_conversion_map):
+	* keyboard.c (kbd_buffer_nr_stored): Likewise.
+	(head_table): Make static and const.
+
+2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
+	(PROFILING_LDFLAGS): Set from substitution.
+	(ALL_CFLAGS): Add C_WARNINGS_SWITCH and PROFILING_CFLAGS, put
+	CFLAGS last.
+
+2010-07-12  Kenichi Handa  <handa@m17n.org>
+
+	* Makefile.in (lisp): Change hebrew.el to hebrew.elc.
+	(shortlisp): Likewise.
+
+	* font.h (enum font_property_index): New member FONT_ENTITY_INDEX.
+
+	* font.c (font_open_entity): Record ENTITY in FONT_OBJECT's slot
+	of FONT_ENTITY_INDEX.
+	(Ffont_get): If KEY is :otf and the font-object doesn't have the
+	property, get the property value dynamically.
+	(Ffont_put): Accept font-entity and font-object too.
+	(Ffont_get_glyhphs): Renamed from Fget_font_glyphs.  Arguments and
+	return value changed.
+	(syms_of_font): Adjusted for the above change.
+
 2010-07-11  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* blockinput.h: Remove obsolete comment.
--- a/src/Makefile.in	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/Makefile.in	Mon Jul 12 22:43:26 2010 +0000
@@ -63,6 +63,13 @@
 
 CRT_DIR=@CRT_DIR@
 
+## Flags to pass for profiling builds
+PROFILING_CFLAGS = @PROFILING_CFLAGS@
+PROFILING_LDFLAGS = @PROFILING_LDFLAGS@
+
+## Flags to pass to the compiler to enable build warnings
+C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
+
 ## Machine-specific CFLAGS.
 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
 ## System-specific CFLAGS.
@@ -107,7 +114,7 @@
 ## Flags to pass to ld only for temacs.
 TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS)
 
-## $LDFLAGS, or empty if NS_IMPL_GNUSTEP (for some reason).
+## $LDFLAGS $PROFILING_LDFLAGS, or empty if NS_IMPL_GNUSTEP (for some reason).
 TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@
 
 ## Some systems define this to request special libraries.
@@ -309,8 +316,9 @@
 ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} \
   ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} ${C_SWITCH_X_SITE} \
   ${C_SWITCH_X_SYSTEM} ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} \
-  ${GCONF_CFLAGS} ${CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} \
-  ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS}
+  ${GCONF_CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} \
+  ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS} ${PROFILING_CFLAGS} \
+  ${C_WARNINGS_SWITCH} ${CFLAGS}
 ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
 
 .SUFFIXES: .m
@@ -426,7 +434,7 @@
 	${lispsource}language/slovak.el \
 	${lispsource}language/romanian.el \
 	${lispsource}language/greek.el \
-	${lispsource}language/hebrew.el \
+	${lispsource}language/hebrew.elc \
 	${lispsource}language/japanese.el \
 	${lispsource}language/korean.el \
 	${lispsource}language/lao.el \
@@ -517,7 +525,7 @@
 	../lisp/language/slovak.el \
 	../lisp/language/romanian.el \
 	../lisp/language/greek.el \
-	../lisp/language/hebrew.el \
+	../lisp/language/hebrew.elc \
 	../lisp/language/japanese.el \
 	../lisp/language/korean.el \
 	../lisp/language/lao.el \
--- a/src/buffer.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/buffer.c	Mon Jul 12 22:43:26 2010 +0000
@@ -2540,7 +2540,6 @@
   if (!modified_p && !NILP (Fbuffer_modified_p (Qnil)))
     Fset_buffer_modified_p (Qnil);
 
-#ifdef subprocesses
   /* Update coding systems of this buffer's process (if any).  */
   {
     Lisp_Object process;
@@ -2549,7 +2548,6 @@
     if (PROCESSP (process))
       setup_process_coding_systems (process);
   }
-#endif	/* subprocesses */
 
   return flag;
 }
--- a/src/callproc.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/callproc.c	Mon Jul 12 22:43:26 2010 +0000
@@ -1054,19 +1054,9 @@
 
   int pid = getpid ();
 
-#ifdef SET_EMACS_PRIORITY
-  {
-    extern EMACS_INT emacs_priority;
-
-    if (emacs_priority < 0)
-      nice (- emacs_priority);
-  }
-#endif
-
-#ifdef subprocesses
   /* Close Emacs's descriptors that this process should not have.  */
   close_process_descs ();
-#endif
+
   /* DOS_NT isn't in a vfork, so if we are in the middle of load-file,
      we will lose if we call close_load_descs here.  */
 #ifndef DOS_NT
--- a/src/ccl.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/ccl.c	Mon Jul 12 22:43:26 2010 +0000
@@ -1968,8 +1968,7 @@
 DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0,
        doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code.
 See the documentation of `define-ccl-program' for the detail of CCL program.  */)
-     (object)
-     Lisp_Object object;
+  (Lisp_Object object)
 {
   Lisp_Object val;
 
@@ -2003,8 +2002,7 @@
 
 See the documentation of `define-ccl-program' for a definition of CCL
 programs.  */)
-     (ccl_prog, reg)
-     Lisp_Object ccl_prog, reg;
+  (Lisp_Object ccl_prog, Lisp_Object reg)
 {
   struct ccl_program ccl;
   int i;
@@ -2058,8 +2056,7 @@
 
 See the documentation of `define-ccl-program' for the detail of CCL program.
 usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBYTE-P)  */)
-     (ccl_prog, status, str, contin, unibyte_p)
-     Lisp_Object ccl_prog, status, str, contin, unibyte_p;
+  (Lisp_Object ccl_prog, Lisp_Object status, Lisp_Object str, Lisp_Object contin, Lisp_Object unibyte_p)
 {
   Lisp_Object val;
   struct ccl_program ccl;
@@ -2189,8 +2186,7 @@
 CCL-PROG should be a compiled CCL program (vector), or nil.
 If it is nil, just reserve NAME as a CCL program name.
 Return index number of the registered CCL program.  */)
-     (name, ccl_prog)
-     Lisp_Object name, ccl_prog;
+     (Lisp_Object name, Lisp_Object ccl_prog)
 {
   int len = ASIZE (Vccl_program_table);
   int idx;
@@ -2265,8 +2261,7 @@
        2, 2, 0,
        doc: /* Register SYMBOL as code conversion map MAP.
 Return index number of the registered map.  */)
-     (symbol, map)
-     Lisp_Object symbol, map;
+  (Lisp_Object symbol, Lisp_Object map)
 {
   int len = ASIZE (Vcode_conversion_map_vector);
   int i;
--- a/src/charset.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/charset.c	Mon Jul 12 22:43:26 2010 +0000
@@ -730,12 +730,8 @@
 }
 
 void
-map_charset_chars (c_function, function, arg,
-		   charset, from, to)
-     void (*c_function) (Lisp_Object, Lisp_Object);
-     Lisp_Object function, arg;
-     struct charset *charset;
-     unsigned from, to;
+map_charset_chars (void (*c_function)(Lisp_Object, Lisp_Object), Lisp_Object function,
+		   Lisp_Object arg, struct charset *charset, unsigned from, unsigned to)
 {
   Lisp_Object range;
   int partial;
--- a/src/coding.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/coding.c	Mon Jul 12 22:43:26 2010 +0000
@@ -9017,10 +9017,8 @@
 }
 
 Lisp_Object
-code_convert_string (string, coding_system, dst_object,
-		     encodep, nocopy, norecord)
-     Lisp_Object string, coding_system, dst_object;
-     int encodep, nocopy, norecord;
+code_convert_string (Lisp_Object string, Lisp_Object coding_system,
+		     Lisp_Object dst_object, int encodep, int nocopy, int norecord)
 {
   struct coding_system coding;
   EMACS_INT chars, bytes;
--- a/src/dbusbind.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/dbusbind.c	Mon Jul 12 22:43:26 2010 +0000
@@ -714,9 +714,9 @@
 }
 
 /* Initialize D-Bus connection.  BUS is a Lisp symbol, either :system
-   or :session.  It tells which D-Bus to be initialized.  RAISE_ERROR
-   can be TRUE or FALSE, it controls whether an error is signalled in
-   case the connection cannot be initialized.  */
+   or :session.  It tells which D-Bus to initialize.  If RAISE_ERROR
+   is non-zero signal an error when the connection cannot be
+   initialized.  */
 static DBusConnection *
 xd_initialize (Lisp_Object bus, int raise_error)
 {
@@ -726,7 +726,7 @@
   /* Parameter check.  */
   CHECK_SYMBOL (bus);
   if (!(EQ (bus, QCdbus_system_bus) || EQ (bus, QCdbus_session_bus)))
-    if (raise_error == TRUE)
+    if (raise_error)
       XD_SIGNAL2 (build_string ("Wrong bus name"), bus);
     else
       return NULL;
@@ -734,7 +734,7 @@
   /* We do not want to have an autolaunch for the session bus.  */
   if (EQ (bus, QCdbus_session_bus)
       && getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL)
-    if (raise_error == TRUE)
+    if (raise_error)
       XD_SIGNAL2 (build_string ("No connection to bus"), bus);
     else
       return NULL;
@@ -748,12 +748,12 @@
     connection = dbus_bus_get (DBUS_BUS_SESSION, &derror);
 
   if (dbus_error_is_set (&derror))
-    if (raise_error == TRUE)
+    if (raise_error)
       XD_ERROR (derror);
     else
       connection = NULL;
 
-  if ((connection == NULL) && (raise_error == TRUE))
+  if (connection == NULL && raise_error)
     XD_SIGNAL2 (build_string ("No connection to bus"), bus);
 
   /* Cleanup.  */
--- a/src/dispnew.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/dispnew.c	Mon Jul 12 22:43:26 2010 +0000
@@ -1776,12 +1776,8 @@
 #define CHANGED_LEAF_MATRIX	(1 << 1)
 
 static struct dim
-allocate_matrices_for_frame_redisplay (window, x, y, dim_only_p,
-				       window_change_flags)
-     Lisp_Object window;
-     int x, y;
-     int dim_only_p;
-     int *window_change_flags;
+allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y,
+				       int dim_only_p, int *window_change_flags)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
   int x0 = x, y0 = y;
@@ -2915,12 +2911,8 @@
    This function is called from do_scrolling and do_direct_scrolling.  */
 
 void
-mirrored_line_dance (matrix, unchanged_at_top, nlines, copy_from,
-		     retained_p)
-     struct glyph_matrix *matrix;
-     int unchanged_at_top, nlines;
-     int *copy_from;
-     char *retained_p;
+mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlines,
+		     int *copy_from, char *retained_p)
 {
   /* A copy of original rows.  */
   struct glyph_row *old_rows;
--- a/src/editfns.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/editfns.c	Mon Jul 12 22:43:26 2010 +0000
@@ -4169,10 +4169,9 @@
    It's the caller's job to ensure that START1 <= END1 <= START2 <= END2.  */
 
 static void
-transpose_markers (start1, end1, start2, end2,
-		   start1_byte, end1_byte, start2_byte, end2_byte)
-     register int start1, end1, start2, end2;
-     register int start1_byte, end1_byte, start2_byte, end2_byte;
+transpose_markers (int start1, int end1, int start2, int end2,
+		   int start1_byte, int end1_byte,
+		   int start2_byte, int end2_byte)
 {
   register int amt1, amt1_byte, amt2, amt2_byte, diff, diff_byte, mpos;
   register struct Lisp_Marker *marker;
--- a/src/emacs.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/emacs.c	Mon Jul 12 22:43:26 2010 +0000
@@ -425,7 +425,7 @@
 #if ! defined (DOS_NT) && ! defined (NO_ABORT)
 
 void
-abort ()
+abort (void)
 {
   kill (getpid (), SIGABRT);
   /* This shouldn't be executed, but it prevents a warning.  */
@@ -606,11 +606,11 @@
    (We don't have any real constructors or destructors.)  */
 #ifdef __GNUC__
 #ifndef GCC_CTORS_IN_LIBC
-void __do_global_ctors ()
+void __do_global_ctors (void)
 {}
-void __do_global_ctors_aux ()
+void __do_global_ctors_aux (void)
 {}
-void __do_global_dtors ()
+void __do_global_dtors (void)
 {}
 /* GNU/Linux has a bug in its library; avoid an error.  */
 #ifndef GNU_LINUX
@@ -618,7 +618,7 @@
 #endif
 char * __DTOR_LIST__[2] = { (char *) (-1), 0 };
 #endif /* GCC_CTORS_IN_LIBC */
-void __main ()
+void __main (void)
 {}
 #endif /* __GNUC__ */
 #endif /* ORDINARY_LINK */
@@ -957,12 +957,6 @@
     }
 #endif /* MSDOS */
 
-#ifdef SET_EMACS_PRIORITY
-  if (emacs_priority)
-    nice (emacs_priority);
-  setuid (getuid ());
-#endif /* SET_EMACS_PRIORITY */
-
   /* Skip initial setlocale if LC_ALL is "C", as it's not needed in that case.
      The build procedure uses this while dumping, to ensure that the
      dumped Emacs does not have its system locale tables initialized,
@@ -1646,6 +1640,9 @@
 
 #ifdef MSDOS
       syms_of_xmenu ();
+      syms_of_dosfns();
+      syms_of_msdos();
+      syms_of_win16select();
 #endif	/* MSDOS */
 
 #ifdef HAVE_NS
@@ -1660,13 +1657,9 @@
       syms_of_dbusbind ();
 #endif /* HAVE_DBUS */
 
-#ifdef SYMS_SYSTEM
-      SYMS_SYSTEM;
-#endif
-
-#ifdef SYMS_MACHINE
-      SYMS_MACHINE;
-#endif
+#ifdef WINDOWSNT
+      syms_of_ntterm ();
+#endif /* WINDOWSNT */
 
       keys_of_casefiddle ();
       keys_of_cmds ();
@@ -2108,9 +2101,7 @@
    and Fkill_emacs.  */
 
 void
-shut_down_emacs (sig, no_x, stuff)
-     int sig, no_x;
-     Lisp_Object stuff;
+shut_down_emacs (int sig, int no_x, Lisp_Object stuff)
 {
   /* Prevent running of hooks from now on.  */
   Vrun_hooks = Qnil;
@@ -2292,7 +2283,7 @@
 #if HAVE_SETLOCALE
 /* Recover from setlocale (LC_ALL, "").  */
 void
-fixup_locale ()
+fixup_locale (void)
 {
   /* The Emacs Lisp reader needs LC_NUMERIC to be "C",
      so that numbers are read and printed properly for Emacs Lisp.  */
@@ -2315,7 +2306,7 @@
 
 /* Set system time locale to match Vsystem_time_locale, if possible.  */
 void
-synchronize_system_time_locale ()
+synchronize_system_time_locale (void)
 {
   synchronize_locale (LC_TIME, &Vprevious_system_time_locale,
 		      Vsystem_time_locale);
@@ -2324,7 +2315,7 @@
 /* Set system messages locale to match Vsystem_messages_locale, if
    possible.  */
 void
-synchronize_system_messages_locale ()
+synchronize_system_messages_locale (void)
 {
 #ifdef LC_MESSAGES
   synchronize_locale (LC_MESSAGES, &Vprevious_system_messages_locale,
@@ -2450,7 +2441,7 @@
 }
 
 void
-syms_of_emacs ()
+syms_of_emacs (void)
 {
   Qfile_name_handler_alist = intern_c_string ("file-name-handler-alist");
   staticpro (&Qfile_name_handler_alist);
--- a/src/floatfns.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/floatfns.c	Mon Jul 12 22:43:26 2010 +0000
@@ -192,8 +192,7 @@
 /* Extract a Lisp number as a `double', or signal an error.  */
 
 double
-extract_float (num)
-     Lisp_Object num;
+extract_float (Lisp_Object num)
 {
   CHECK_NUMBER_OR_FLOAT (num);
 
@@ -985,8 +984,7 @@
 
 #ifdef HAVE_MATHERR
 int
-matherr (x)
-     struct exception *x;
+matherr (struct exception *x)
 {
   Lisp_Object args;
   if (! in_float)
@@ -1014,7 +1012,7 @@
 #endif /* HAVE_MATHERR */
 
 void
-init_floatfns ()
+init_floatfns (void)
 {
 #ifdef FLOAT_CATCH_SIGILL
   signal (SIGILL, float_error);
@@ -1023,7 +1021,7 @@
 }
 
 void
-syms_of_floatfns ()
+syms_of_floatfns (void)
 {
   defsubr (&Sacos);
   defsubr (&Sasin);
--- a/src/fns.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/fns.c	Mon Jul 12 22:43:26 2010 +0000
@@ -3757,10 +3757,9 @@
    one of the symbols `key', `value', `key-or-value', or `key-and-value'.  */
 
 Lisp_Object
-make_hash_table (test, size, rehash_size, rehash_threshold, weak,
-		 user_test, user_hash)
-     Lisp_Object test, size, rehash_size, rehash_threshold, weak;
-     Lisp_Object user_test, user_hash;
+make_hash_table (Lisp_Object test, Lisp_Object size, Lisp_Object rehash_size,
+		 Lisp_Object rehash_threshold, Lisp_Object weak,
+		 Lisp_Object user_test, Lisp_Object user_hash)
 {
   struct Lisp_Hash_Table *h;
   Lisp_Object table;
--- a/src/font.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/font.c	Mon Jul 12 22:43:26 2010 +0000
@@ -3005,7 +3005,7 @@
     return Qnil;
   ASET (entity, FONT_OBJLIST_INDEX,
 	Fcons (font_object, AREF (entity, FONT_OBJLIST_INDEX)));
-  ASET (font_object, FONT_OBJLIST_INDEX, Qnil);
+  ASET (font_object, FONT_ENTITY_INDEX, entity);
   num_fonts++;
 
   font = XFONT_OBJECT (font_object);
@@ -4100,15 +4100,24 @@
 DEFUN ("font-get", Ffont_get, Sfont_get, 2, 2, 0,
        doc: /* Return the value of FONT's property KEY.
 FONT is a font-spec, a font-entity, or a font-object.
-KEY must be one of these symbols:
+KEY is any symbol, but these are reserved for specific meanings:
   :family, :weight, :slant, :width, :foundry, :adstyle, :registry,
-  :size, :name, :script
+  :size, :name, :script, :otf
 See the documentation of `font-spec' for their meanings.
-If FONT is a font-entity or font-object, the value of :script may be
-a list of scripts that are supported by the font.  */)
+In addition, if FONT is a font-entity or a font-object, values of
+:script and :otf are different from those of a font-spec as below:
+
+The value of :script may be a list of scripts that are supported by the font.
+
+The value of :otf is a cons (GSUB . GPOS) where GSUB and GPOS are lists
+representing the OpenType features supported by the font by this form:
+  ((SCRIPT (LANGSYS FEATURE ...) ...) ...)
+SCRIPT, LANGSYS, and FEATURE are all symbols representing OpenType
+Layout tags.  */)
   (Lisp_Object font, Lisp_Object key)
 {
   int idx;
+  Lisp_Object val;
 
   CHECK_FONT (font);
   CHECK_SYMBOL (key);
@@ -4118,7 +4127,28 @@
     return font_style_symbolic (font, idx, 0);
   if (idx >= 0 && idx < FONT_EXTRA_INDEX)
     return AREF (font, idx);
-  return Fcdr (Fassq (key, AREF (font, FONT_EXTRA_INDEX)));
+  val = Fassq (key, AREF (font, FONT_EXTRA_INDEX));
+  if (NILP (val) && EQ (key, QCotf) && FONT_OBJECT_P (font))
+    {
+      struct font *fontp = XFONT_OBJECT (font);
+      Lisp_Object entity = AREF (font, FONT_ENTITY_INDEX);
+
+      val = Fassq (key, AREF (entity, FONT_EXTRA_INDEX));
+      if (NILP (val))
+	{
+	  if (fontp->driver->otf_capability)
+	    val = fontp->driver->otf_capability (fontp);
+	  else
+	    val = Fcons (Qnil, Qnil);
+	  font_put_extra (font, QCotf, val);
+	  font_put_extra (entity, QCotf, val);
+	}
+      else
+	val = Fcdr (val);
+    }
+  else
+    val = Fcdr (val);
+  return val;
 }
 
 #ifdef HAVE_WINDOW_SYSTEM
@@ -4209,17 +4239,36 @@
 #endif
 
 DEFUN ("font-put", Ffont_put, Sfont_put, 3, 3, 0,
-       doc: /* Set one property of FONT-SPEC: give property PROP value VAL.  */)
-  (Lisp_Object font_spec, Lisp_Object prop, Lisp_Object val)
+       doc: /* Set one property of FONT: give property KEY value VAL.
+FONT is a font-spec, a font-entity, or a font-object.
+
+If FONT is a font-spec, KEY can be any symbol.  But if KEY is the one
+accepted by the function `font-spec' (which see), VAL must be what
+allowed in `font-spec'.
+
+If FONT is a font-entity or a font-object, KEY must not be the one
+accepted by `font-spec'.  */)
+  (Lisp_Object font, Lisp_Object prop, Lisp_Object val)
 {
   int idx;
 
-  CHECK_FONT_SPEC (font_spec);
   idx = get_font_prop_index (prop);
   if (idx >= 0 && idx < FONT_EXTRA_INDEX)
-    ASET (font_spec, idx, font_prop_validate (idx, Qnil, val));
+    {
+      CHECK_FONT_SPEC (font);
+      ASET (font, idx, font_prop_validate (idx, Qnil, val));
+    }
   else
-    font_put_extra (font_spec, prop, font_prop_validate (0, prop, val));
+    {
+      if (EQ (prop, QCname)
+	  || EQ (prop, QCscript)
+	  || EQ (prop, QClang)
+	  || EQ (prop, QCotf))
+	CHECK_FONT_SPEC (font);
+      else
+	CHECK_FONT (font);
+      font_put_extra (font, prop, font_prop_validate (0, prop, val));
+    }
   return val;
 }
 
@@ -4758,24 +4807,99 @@
   return val;
 }
 
-DEFUN ("get-font-glyphs", Fget_font_glyphs, Sget_font_glyphs, 2, 2, 0,
-       doc: /* Return a vector of glyphs of FONT-OBJECT for drawing STRING.
-Each element is a vector [GLYPH-CODE LBEARING RBEARING WIDTH ASCENT DESCENT].  */)
-  (Lisp_Object font_object, Lisp_Object string)
+DEFUN ("font-get-glyphs", Ffont_get_glyphs, Sfont_get_glyphs, 3, 4, 0,
+       doc:
+       /* Return a vector of FONT-OBJECT's glyphs for the specified characters.
+FROM and TO are positions (integers or markers) specifying a region
+of the current buffer.
+If the optional fourth arg OBJECT is not nil, it is a string or a
+vector containing the target characters.
+
+Each element is a vector containing information of a glyph in this format:
+  [FROM-IDX TO-IDX C CODE WIDTH LBEARING RBEARING ASCENT DESCENT ADJUSTMENT]
+where
+  FROM is an index numbers of a character the glyph corresponds to.
+  TO is the same as FROM.
+  C is the character of the glyph.
+  CODE is the glyph-code of C in FONT-OBJECT.
+  WIDTH thru DESCENT are the metrics (in pixels) of the glyph.
+  ADJUSTMENT is always nil.
+If FONT-OBJECT doesn't have a glyph for a character,
+the corresponding element is nil.  */)
+  (Lisp_Object font_object, Lisp_Object from, Lisp_Object to,
+   Lisp_Object object)
 {
   struct font *font;
-  int i, len;
-  Lisp_Object vec;
+  int i, len, c;
+  Lisp_Object *chars, vec;
+  USE_SAFE_ALLOCA;
 
   CHECK_FONT_GET_OBJECT (font_object, font);
-  CHECK_STRING (string);
-  len = SCHARS (string);
+  if (NILP (object))
+    {
+      EMACS_INT charpos, bytepos;
+
+      validate_region (&from, &to);
+      if (EQ (from, to))
+	return Qnil;
+      len = XFASTINT (to) - XFASTINT (from);
+      SAFE_ALLOCA_LISP (chars, len);
+      charpos = XFASTINT (from);
+      bytepos = CHAR_TO_BYTE (charpos);
+      for (i = 0; charpos < XFASTINT (to); i++)
+	{
+	  FETCH_CHAR_ADVANCE (c, charpos, bytepos);
+	  chars[i] = make_number (c);
+	}
+    }
+  else if (STRINGP (object))
+    {
+      const unsigned char *p;
+
+      CHECK_NUMBER (from);
+      CHECK_NUMBER (to);
+      if (XINT (from) < 0 || XINT (from) > XINT (to)
+	  || XINT (to) > SCHARS (object))
+	args_out_of_range_3 (object, from, to);
+      if (EQ (from, to))
+	return Qnil;
+      len = XFASTINT (to) - XFASTINT (from);
+      SAFE_ALLOCA_LISP (chars, len);
+      p = SDATA (object);
+      if (STRING_MULTIBYTE (object))
+	for (i = 0; i < len; i++)
+	  {
+	    c = STRING_CHAR_ADVANCE (p);
+	    chars[i] = make_number (c);
+	  }
+      else
+	for (i = 0; i < len; i++)
+	  chars[i] = make_number (p[i]);
+    }
+  else
+    {
+      CHECK_VECTOR (object);
+      CHECK_NUMBER (from);
+      CHECK_NUMBER (to);
+      if (XINT (from) < 0 || XINT (from) > XINT (to)
+	  || XINT (to) > ASIZE (object))
+	args_out_of_range_3 (object, from, to);
+      if (EQ (from, to))
+	return Qnil;
+      len = XFASTINT (to) - XFASTINT (from);
+      for (i = 0; i < len; i++)
+	{
+	  Lisp_Object elt = AREF (object, XFASTINT (from) + i);
+	  CHECK_CHARACTER (elt);
+	}
+      chars = &(AREF (object, XFASTINT (from)));
+    }
+
   vec = Fmake_vector (make_number (len), Qnil);
   for (i = 0; i < len; i++)
     {
-      Lisp_Object ch = Faref (string, make_number (i));
-      Lisp_Object val;
-      int c = XINT (ch);
+      Lisp_Object g;
+      int c = XFASTINT (chars[i]);
       unsigned code;
       EMACS_INT cod;
       struct font_metrics metrics;
@@ -4783,20 +4907,21 @@
       cod = code = font->driver->encode_char (font, c);
       if (code == FONT_INVALID_CODE)
 	continue;
-      val = Fmake_vector (make_number (6), Qnil);
-      if (cod <= MOST_POSITIVE_FIXNUM)
-	ASET (val, 0, make_number (code));
-      else
-	ASET (val, 0, Fcons (make_number (code >> 16),
-			     make_number (code & 0xFFFF)));
+      g = Fmake_vector (make_number (LGLYPH_SIZE), Qnil);
+      LGLYPH_SET_FROM (g, i);
+      LGLYPH_SET_TO (g, i);
+      LGLYPH_SET_CHAR (g, c);
+      LGLYPH_SET_CODE (g, code);
       font->driver->text_extents (font, &code, 1, &metrics);
-      ASET (val, 1, make_number (metrics.lbearing));
-      ASET (val, 2, make_number (metrics.rbearing));
-      ASET (val, 3, make_number (metrics.width));
-      ASET (val, 4, make_number (metrics.ascent));
-      ASET (val, 5, make_number (metrics.descent));
-      ASET (vec, i, val);
+      LGLYPH_SET_WIDTH (g, metrics.width);
+      LGLYPH_SET_LBEARING (g, metrics.lbearing);
+      LGLYPH_SET_RBEARING (g, metrics.rbearing);
+      LGLYPH_SET_ASCENT (g, metrics.ascent);
+      LGLYPH_SET_DESCENT (g, metrics.descent);
+      ASET (vec, i, g);
     }
+  if (! VECTORP (object))
+    SAFE_FREE ();
   return vec;
 }
 
@@ -5188,7 +5313,7 @@
   defsubr (&Sopen_font);
   defsubr (&Sclose_font);
   defsubr (&Squery_font);
-  defsubr (&Sget_font_glyphs);
+  defsubr (&Sfont_get_glyphs);
   defsubr (&Sfont_match_p);
   defsubr (&Sfont_at);
 #if 0
--- a/src/font.h	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/font.h	Mon Jul 12 22:43:26 2010 +0000
@@ -159,14 +159,19 @@
     /* This value is the length of font-spec vector.  */
     FONT_SPEC_MAX,
 
-    /* The followings are used only for a font-entity.  */
+    /* The followings are used only for a font-entity and a font-object.  */
 
     /* List of font-objects opened from the font-entity.  */
     FONT_OBJLIST_INDEX = FONT_SPEC_MAX,
 
+    /* Font-entity from which the font-object is opened.  */
+    FONT_ENTITY_INDEX = FONT_SPEC_MAX,
+
     /* This value is the length of font-entity vector.  */
     FONT_ENTITY_MAX,
 
+    /* The followings are used only for a font-object.  */
+
     /* XLFD name of the font (string). */
     FONT_NAME_INDEX = FONT_ENTITY_MAX,
 
--- a/src/ftfont.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/ftfont.c	Mon Jul 12 22:43:26 2010 +0000
@@ -457,8 +457,7 @@
 
 #ifdef HAVE_LIBOTF
 static OTF *
-ftfont_get_otf (ftfont_info)
-     struct ftfont_info *ftfont_info;
+ftfont_get_otf (struct ftfont_info *ftfont_info)
 {
   OTF *otf;
 
@@ -1475,8 +1474,7 @@
 #ifdef HAVE_LIBOTF
 
 static Lisp_Object
-ftfont_otf_features (gsub_gpos)
-     OTF_GSUB_GPOS *gsub_gpos;
+ftfont_otf_features (OTF_GSUB_GPOS *gsub_gpos)
 {
   Lisp_Object scripts, langsyses, features, sym;
   int i, j, k, l;
@@ -1520,8 +1518,7 @@
 
 
 static Lisp_Object
-ftfont_otf_capability (font)
-     struct font *font;
+ftfont_otf_capability (struct font *font)
 {
   struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
   OTF *otf = ftfont_get_otf (ftfont_info);
@@ -1559,10 +1556,8 @@
 };
 
 static int
-ftfont_get_glyph_id (font, gstring, from, to)
-     MFLTFont *font;
-     MFLTGlyphString *gstring;
-     int from, to;
+ftfont_get_glyph_id (MFLTFont *font, MFLTGlyphString *gstring,
+		     int from, int to)
 {
   struct MFLTFontFT *flt_font_ft = (struct MFLTFontFT *) font;
   FT_Face ft_face = flt_font_ft->ft_face;
@@ -1586,10 +1581,8 @@
 #define ROUND(x)    (((x)+32) & -64)
 
 static int
-ftfont_get_metrics (font, gstring, from, to)
-     MFLTFont *font;
-     MFLTGlyphString *gstring;
-     int from, to;
+ftfont_get_metrics (MFLTFont *font, MFLTGlyphString *gstring,
+		    int from, int to)
 {
   struct MFLTFontFT *flt_font_ft = (struct MFLTFontFT *) font;
   FT_Face ft_face = flt_font_ft->ft_face;
@@ -2086,13 +2079,9 @@
 #else  /* not M17N_FLT_USE_NEW_FEATURE */
 
 static int
-ftfont_drive_otf (font, spec, in, from, to, out, adjustment)
-     MFLTFont *font;
-     MFLTOtfSpec *spec;
-     MFLTGlyphString *in;
-     int from, to;
-     MFLTGlyphString *out;
-     MFLTGlyphAdjustment *adjustment;
+ftfont_drive_otf (MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in,
+		  int from, int to,
+		  MFLTGlyphString *out, MFLTGlyphAdjustment *adjustment)
 {
   struct MFLTFontFT *flt_font_ft = (struct MFLTFontFT *) font;
   FT_Face ft_face = flt_font_ft->ft_face;
@@ -2347,12 +2336,8 @@
 extern Lisp_Object QCfamily;
 
 static Lisp_Object
-ftfont_shape_by_flt (lgstring, font, ft_face, otf, matrix)
-     Lisp_Object lgstring;
-     struct font *font;
-     FT_Face ft_face;
-     OTF *otf;
-     FT_Matrix *matrix;
+ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font,
+		     FT_Face ft_face, OTF *otf, FT_Matrix *matrix)
 {
   EMACS_UINT len = LGSTRING_GLYPH_LEN (lgstring);
   EMACS_UINT i;
@@ -2518,8 +2503,7 @@
 }
 
 Lisp_Object
-ftfont_shape (lgstring)
-     Lisp_Object lgstring;
+ftfont_shape (Lisp_Object lgstring)
 {
   struct font *font;
   struct ftfont_info *ftfont_info;
@@ -2539,10 +2523,7 @@
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS
 
 static int
-ftfont_variation_glyphs (font, c, variations)
-     struct font *font;
-     int c;
-     unsigned variations[256];
+ftfont_variation_glyphs (struct font *font, int c, unsigned variations[256])
 {
   struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
   OTF *otf = ftfont_get_otf (ftfont_info);
--- a/src/gtkutil.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/gtkutil.c	Mon Jul 12 22:43:26 2010 +0000
@@ -2175,15 +2175,9 @@
    Returns the widget created.  */
 
 GtkWidget *
-xg_create_widget (type, name, f, val,
-                  select_cb, deactivate_cb, highlight_cb)
-     char *type;
-     char *name;
-     FRAME_PTR f;
-     widget_value *val;
-     GCallback select_cb;
-     GCallback deactivate_cb;
-     GCallback highlight_cb;
+xg_create_widget (char *type, char *name, FRAME_PTR f, widget_value *val,
+                  GCallback select_cb, GCallback deactivate_cb,
+		  GCallback highlight_cb)
 {
   GtkWidget *w = 0;
   int menu_bar_p = strcmp (type, "menubar") == 0;
@@ -2743,15 +2737,10 @@
    HIGHLIGHT_CB is the callback to call when entering/leaving menu items.  */
 
 void
-xg_modify_menubar_widgets (menubar, f, val, deep_p,
-                           select_cb, deactivate_cb, highlight_cb)
-     GtkWidget *menubar;
-     FRAME_PTR f;
-     widget_value *val;
-     int deep_p;
-     GCallback select_cb;
-     GCallback deactivate_cb;
-     GCallback highlight_cb;
+xg_modify_menubar_widgets (GtkWidget *menubar, FRAME_PTR f, widget_value *val,
+			   int deep_p,
+                           GCallback select_cb, GCallback deactivate_cb,
+			   GCallback highlight_cb)
 {
   xg_menu_cb_data *cl_data;
   GList *list = gtk_container_get_children (GTK_CONTAINER (menubar));
--- a/src/keyboard.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/keyboard.c	Mon Jul 12 22:43:26 2010 +0000
@@ -3593,7 +3593,7 @@
 /* Return the number of slots occupied in kbd_buffer.  */
 
 static int
-kbd_buffer_nr_stored ()
+kbd_buffer_nr_stored (void)
 {
   return kbd_fetch_ptr == kbd_store_ptr
     ? 0
@@ -11536,7 +11536,7 @@
   Lisp_Object *kind;
 };
 
-struct event_head head_table[] = {
+static const struct event_head head_table[] = {
   {&Qmouse_movement,      "mouse-movement",      &Qmouse_movement},
   {&Qscroll_bar_movement, "scroll-bar-movement", &Qmouse_movement},
   {&Qswitch_frame,        "switch-frame",        &Qswitch_frame},
@@ -11721,7 +11721,7 @@
   last_point_position_window = Qnil;
 
   {
-    struct event_head *p;
+    const struct event_head *p;
 
     for (p = head_table;
 	 p < head_table + (sizeof (head_table) / sizeof (head_table[0]));
--- a/src/keymap.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/keymap.c	Mon Jul 12 22:43:26 2010 +0000
@@ -3140,15 +3140,9 @@
    don't omit it; instead, mention it but say it is shadowed.  */
 
 void
-describe_map_tree (startmap, partial, shadow, prefix, title, nomenu, transl,
-		   always_title, mention_shadow)
-     Lisp_Object startmap, shadow, prefix;
-     int partial;
-     char *title;
-     int nomenu;
-     int transl;
-     int always_title;
-     int mention_shadow;
+describe_map_tree (Lisp_Object startmap, int partial, Lisp_Object shadow,
+		   Lisp_Object prefix, char *title, int nomenu, int transl,
+		   int always_title, int mention_shadow)
 {
   Lisp_Object maps, orig_maps, seen, sub_shadows;
   struct gcpro gcpro1, gcpro2, gcpro3;
@@ -3355,16 +3349,10 @@
    PARTIAL, SHADOW, NOMENU are as in `describe_map_tree' above.  */
 
 static void
-describe_map (map, prefix, elt_describer, partial, shadow,
-	      seen, nomenu, mention_shadow)
-     register Lisp_Object map;
-     Lisp_Object prefix;
-     void (*elt_describer) (Lisp_Object, Lisp_Object);
-     int partial;
-     Lisp_Object shadow;
-     Lisp_Object *seen;
-     int nomenu;
-     int mention_shadow;
+describe_map (Lisp_Object map, Lisp_Object prefix,
+	      void (*elt_describer) (Lisp_Object, Lisp_Object),
+	      int partial, Lisp_Object shadow,
+	      Lisp_Object *seen, int nomenu, int mention_shadow)
 {
   Lisp_Object tail, definition, event;
   Lisp_Object tem;
@@ -3603,20 +3591,11 @@
    ARGS is simply passed as the second argument to ELT_DESCRIBER.  */
 
 static void
-describe_vector (vector, prefix, args, elt_describer,
-		 partial, shadow, entire_map,
-		 indices, char_table_depth, keymap_p,
-		 mention_shadow)
-     register Lisp_Object vector;
-     Lisp_Object prefix, args;
-     void (*elt_describer) (Lisp_Object, Lisp_Object);
-     int partial;
-     Lisp_Object shadow;
-     Lisp_Object entire_map;
-     int *indices;
-     int char_table_depth;
-     int keymap_p;
-     int mention_shadow;
+describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
+		 void (*elt_describer) (Lisp_Object, Lisp_Object),
+		 int partial, Lisp_Object shadow, Lisp_Object entire_map,
+		 int *indices, int char_table_depth, int keymap_p,
+		 int mention_shadow)
 {
   Lisp_Object definition;
   Lisp_Object tem2;
--- a/src/lread.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/lread.c	Mon Jul 12 22:43:26 2010 +0000
@@ -661,10 +661,8 @@
    return Qnil if no input arrives within that time.  */
 
 Lisp_Object
-read_filtered_event (no_switch_frame, ascii_required, error_nonascii,
-		     input_method, seconds)
-     int no_switch_frame, ascii_required, error_nonascii, input_method;
-     Lisp_Object seconds;
+read_filtered_event (int no_switch_frame, int ascii_required,
+		     int error_nonascii, int input_method, Lisp_Object seconds)
 {
   Lisp_Object val, delayed_switch_frame;
   EMACS_TIME end_time;
--- a/src/minibuf.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/minibuf.c	Mon Jul 12 22:43:26 2010 +0000
@@ -278,19 +278,12 @@
    from read_minibuf to do the job if noninteractive.  */
 
 static Lisp_Object
-read_minibuf_noninteractive (map, initial, prompt, backup_n, expflag,
-			     histvar, histpos, defalt, allow_props,
-			     inherit_input_method)
-     Lisp_Object map;
-     Lisp_Object initial;
-     Lisp_Object prompt;
-     Lisp_Object backup_n;
-     int expflag;
-     Lisp_Object histvar;
-     Lisp_Object histpos;
-     Lisp_Object defalt;
-     int allow_props;
-     int inherit_input_method;
+read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
+			     Lisp_Object prompt, Lisp_Object backup_n,
+			     int expflag,
+			     Lisp_Object histvar, Lisp_Object histpos,
+			     Lisp_Object defalt,
+			     int allow_props, int inherit_input_method)
 {
   int size, len;
   char *line, *s;
@@ -434,18 +427,10 @@
    current input method.  */
 
 static Lisp_Object
-read_minibuf (map, initial, prompt, backup_n, expflag,
-	      histvar, histpos, defalt, allow_props, inherit_input_method)
-     Lisp_Object map;
-     Lisp_Object initial;
-     Lisp_Object prompt;
-     Lisp_Object backup_n;
-     int expflag;
-     Lisp_Object histvar;
-     Lisp_Object histpos;
-     Lisp_Object defalt;
-     int allow_props;
-     int inherit_input_method;
+read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
+	      Lisp_Object backup_n, int expflag,
+	      Lisp_Object histvar, Lisp_Object histpos, Lisp_Object defalt,
+	      int allow_props, int inherit_input_method)
 {
   Lisp_Object val;
   int count = SPECPDL_INDEX ();
--- a/src/process.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/process.c	Mon Jul 12 22:43:26 2010 +0000
@@ -642,38 +642,6 @@
   deactivate_process (proc);
 }
 
-/* Setup coding systems of PROCESS.  */
-
-void
-setup_process_coding_systems (Lisp_Object process)
-{
-  struct Lisp_Process *p = XPROCESS (process);
-  int inch = p->infd;
-  int outch = p->outfd;
-  Lisp_Object coding_system;
-
-  if (inch < 0 || outch < 0)
-    return;
-
-  if (!proc_decode_coding_system[inch])
-    proc_decode_coding_system[inch]
-      = (struct coding_system *) xmalloc (sizeof (struct coding_system));
-  coding_system = p->decode_coding_system;
-  if (! NILP (p->filter))
-    ;
-  else if (BUFFERP (p->buffer))
-    {
-      if (NILP (XBUFFER (p->buffer)->enable_multibyte_characters))
-	coding_system = raw_text_coding_system (coding_system);
-    }
-  setup_coding_system (coding_system, proc_decode_coding_system[inch]);
-
-  if (!proc_encode_coding_system[outch])
-    proc_encode_coding_system[outch]
-      = (struct coding_system *) xmalloc (sizeof (struct coding_system));
-  setup_coding_system (p->encode_coding_system,
-		       proc_encode_coding_system[outch]);
-}
 
 DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0,
        doc: /* Return t if OBJECT is a process.  */)
@@ -4113,31 +4081,6 @@
     }
 }
 
-/* Close all descriptors currently in use for communication
-   with subprocess.  This is used in a newly-forked subprocess
-   to get rid of irrelevant descriptors.  */
-
-void
-close_process_descs (void)
-{
-#ifndef WINDOWSNT
-  int i;
-  for (i = 0; i < MAXDESC; i++)
-    {
-      Lisp_Object process;
-      process = chan_process[i];
-      if (!NILP (process))
-	{
-	  int in  = XPROCESS (process)->infd;
-	  int out = XPROCESS (process)->outfd;
-	  if (in >= 0)
-	    emacs_close (in);
-	  if (out >= 0 && in != out)
-	    emacs_close (out);
-	}
-    }
-#endif
-}
 
 DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output,
        0, 4, 0,
@@ -4492,12 +4435,10 @@
    Otherwise, return true if we received input from any process.  */
 
 int
-wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
-			     wait_for_cell, wait_proc, just_wait_proc)
-     int time_limit, microsecs, read_kbd, do_display;
-     Lisp_Object wait_for_cell;
-     struct Lisp_Process *wait_proc;
-     int just_wait_proc;
+wait_reading_process_output (int time_limit, int microsecs, int read_kbd,
+			     int do_display,
+			     Lisp_Object wait_for_cell,
+			     struct Lisp_Process *wait_proc, int just_wait_proc)
 {
   register int channel, nfds;
   SELECT_TYPE Available;
@@ -7011,12 +6952,10 @@
    Return true if we received input from any process.  */
 
 int
-wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
-			     wait_for_cell, wait_proc, just_wait_proc)
-     int time_limit, microsecs, read_kbd, do_display;
-     Lisp_Object wait_for_cell;
-     struct Lisp_Process *wait_proc;
-     int just_wait_proc;
+wait_reading_process_output (int time_limit, int microsecs, int read_kbd,
+			     int do_display,
+			     Lisp_Object wait_for_cell,
+			     struct Lisp_Process *wait_proc, int just_wait_proc)
 {
   register int nfds;
   EMACS_TIME end_time, timeout;
@@ -7208,6 +7147,67 @@
 /* The following functions are needed even if async subprocesses are
    not supported.  Some of them are no-op stubs in that case.  */
 
+/* Setup coding systems of PROCESS.  */
+
+void
+setup_process_coding_systems (Lisp_Object process)
+{
+#ifdef subprocesses
+  struct Lisp_Process *p = XPROCESS (process);
+  int inch = p->infd;
+  int outch = p->outfd;
+  Lisp_Object coding_system;
+
+  if (inch < 0 || outch < 0)
+    return;
+
+  if (!proc_decode_coding_system[inch])
+    proc_decode_coding_system[inch]
+      = (struct coding_system *) xmalloc (sizeof (struct coding_system));
+  coding_system = p->decode_coding_system;
+  if (! NILP (p->filter))
+    ;
+  else if (BUFFERP (p->buffer))
+    {
+      if (NILP (XBUFFER (p->buffer)->enable_multibyte_characters))
+	coding_system = raw_text_coding_system (coding_system);
+    }
+  setup_coding_system (coding_system, proc_decode_coding_system[inch]);
+
+  if (!proc_encode_coding_system[outch])
+    proc_encode_coding_system[outch]
+      = (struct coding_system *) xmalloc (sizeof (struct coding_system));
+  setup_coding_system (p->encode_coding_system,
+		       proc_encode_coding_system[outch]);
+#endif
+}
+
+/* Close all descriptors currently in use for communication
+   with subprocess.  This is used in a newly-forked subprocess
+   to get rid of irrelevant descriptors.  */
+
+void
+close_process_descs (void)
+{
+#ifndef DOS_NT
+  int i;
+  for (i = 0; i < MAXDESC; i++)
+    {
+      Lisp_Object process;
+      process = chan_process[i];
+      if (!NILP (process))
+	{
+	  int in  = XPROCESS (process)->infd;
+	  int out = XPROCESS (process)->outfd;
+	  if (in >= 0)
+	    emacs_close (in);
+	  if (out >= 0 && in != out)
+	    emacs_close (out);
+	}
+    }
+#endif
+}
+
 DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0,
        doc: /* Return the (or a) process associated with BUFFER.
 BUFFER may be a buffer or the name of one.  */)
--- a/src/s/ms-w32.h	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/s/ms-w32.h	Mon Jul 12 22:43:26 2010 +0000
@@ -40,7 +40,6 @@
 /* SYSTEM_TYPE should indicate the kind of system you are using.
    It sets the Lisp variable system-type.  */
 #define SYSTEM_TYPE "windows-nt"
-#define SYMS_SYSTEM syms_of_ntterm ()
 
 #define NO_MATHERR 1
 
--- a/src/s/msdos.h	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/s/msdos.h	Mon Jul 12 22:43:26 2010 +0000
@@ -38,14 +38,8 @@
    It sets the Lisp variable system-type.  */
 #define SYSTEM_TYPE "ms-dos"
 
-#define SYMS_SYSTEM syms_of_dosfns();syms_of_msdos();syms_of_win16select()
-
 #define SYSV_SYSTEM_DIR
 
-/* Define this is the compiler understands `volatile'.  */
-#define HAVE_VOLATILE
-
-
 /* subprocesses should be defined if you want to have code for
    asynchronous subprocesses (as used in M-x compile and M-x shell).
    This is the only system that needs this.  */
--- a/src/scroll.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/scroll.c	Mon Jul 12 22:43:26 2010 +0000
@@ -640,13 +640,9 @@
    the cost matrix for this approach is constructed. */
 
 static void
-do_direct_scrolling (frame, current_matrix, cost_matrix,
-                     window_size, unchanged_at_top)
-     struct frame *frame;
-     struct glyph_matrix *current_matrix;
-     struct matrix_elt *cost_matrix;
-     int window_size;
-     int unchanged_at_top;
+do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
+		     struct matrix_elt *cost_matrix, int window_size,
+		     int unchanged_at_top)
 {
   struct matrix_elt *p;
   int i, j;
@@ -796,15 +792,9 @@
 
 
 void
-scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
-	     draw_cost, old_draw_cost, old_hash, new_hash, free_at_end)
-     FRAME_PTR frame;
-     int window_size, unchanged_at_top, unchanged_at_bottom;
-     int *draw_cost;
-     int *old_draw_cost;
-     int *old_hash;
-     int *new_hash;
-     int free_at_end;
+scrolling_1 (FRAME_PTR frame, int window_size, int unchanged_at_top,
+	     int unchanged_at_bottom, int *draw_cost, int *old_draw_cost,
+	     int *old_hash, int *new_hash, int free_at_end)
 {
   struct matrix_elt *matrix;
   matrix = ((struct matrix_elt *)
@@ -1002,15 +992,11 @@
  */
 
 void
-do_line_insertion_deletion_costs (frame,
-				  ins_line_string, multi_ins_string,
-				  del_line_string, multi_del_string,
-				  setup_string, cleanup_string, coefficient)
-     FRAME_PTR frame;
-     char *ins_line_string, *multi_ins_string;
-     char *del_line_string, *multi_del_string;
-     char *setup_string, *cleanup_string;
-     int coefficient;
+do_line_insertion_deletion_costs (FRAME_PTR frame,
+				  char *ins_line_string, char *multi_ins_string,
+				  char *del_line_string, char *multi_del_string,
+				  char *setup_string, char *cleanup_string,
+				  int coefficient)
 {
   if (FRAME_INSERT_COST (frame) != 0)
     {
--- a/src/search.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/search.c	Mon Jul 12 22:43:26 2010 +0000
@@ -1110,18 +1110,9 @@
 static struct re_registers search_regs_1;
 
 static EMACS_INT
-search_buffer (string, pos, pos_byte, lim, lim_byte, n,
-	       RE, trt, inverse_trt, posix)
-     Lisp_Object string;
-     EMACS_INT pos;
-     EMACS_INT pos_byte;
-     EMACS_INT lim;
-     EMACS_INT lim_byte;
-     int n;
-     int RE;
-     Lisp_Object trt;
-     Lisp_Object inverse_trt;
-     int posix;
+search_buffer (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte,
+	       EMACS_INT lim, EMACS_INT lim_byte, int n,
+	       int RE, Lisp_Object trt, Lisp_Object inverse_trt, int posix)
 {
   int len = SCHARS (string);
   int len_byte = SBYTES (string);
@@ -1668,16 +1659,10 @@
    If that criterion is not satisfied, do not call this function.  */
 
 static EMACS_INT
-boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt,
-	     pos, pos_byte, lim, lim_byte, char_base)
-     int n;
-     unsigned char *base_pat;
-     int len, len_byte;
-     Lisp_Object trt;
-     Lisp_Object inverse_trt;
-     EMACS_INT pos, pos_byte;
-     EMACS_INT lim, lim_byte;
-     int char_base;
+boyer_moore (int n, unsigned char *base_pat, int len, int len_byte,
+	     Lisp_Object trt, Lisp_Object inverse_trt,
+	     EMACS_INT pos, EMACS_INT pos_byte,
+	     EMACS_INT lim, EMACS_INT lim_byte, int char_base)
 {
   int direction = ((n > 0) ? 1 : -1);
   register int dirlen;
--- a/src/syntax.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/syntax.c	Mon Jul 12 22:43:26 2010 +0000
@@ -2861,14 +2861,10 @@
    after the beginning of a string, or after the end of a string.  */
 
 static void
-scan_sexps_forward (stateptr, from, from_byte, end, targetdepth,
-		    stopbefore, oldstate, commentstop)
-     struct lisp_parse_state *stateptr;
-     register EMACS_INT from;
-     EMACS_INT from_byte, end;
-     int targetdepth, stopbefore;
-     Lisp_Object oldstate;
-     int commentstop;
+scan_sexps_forward (struct lisp_parse_state *stateptr,
+		    EMACS_INT from, EMACS_INT from_byte, EMACS_INT end,
+		    int targetdepth, int stopbefore,
+		    Lisp_Object oldstate, int commentstop)
 {
   struct lisp_parse_state state;
 
--- a/src/widget.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/widget.c	Mon Jul 12 22:43:26 2010 +0000
@@ -76,14 +76,12 @@
 #define DEFAULT_FACE_FONT "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*"
 
 
-static void EmacsFrameInitialize (/*Widget, Widget, ArgList, Cardinal * */);
-static void EmacsFrameDestroy (/* Widget */);
-static void EmacsFrameRealize (/* Widget, XtValueMask*, XSetWindowAttributes* */);
-void EmacsFrameResize (/* Widget widget */);
-static Boolean EmacsFrameSetValues (/* Widget, Widget, Widget,
-				     ArgList, Cardinal * */);
-static XtGeometryResult EmacsFrameQueryGeometry (/* Widget, XtWidgetGeometry*,
-						  XtWidgetGeometry* */);
+static void EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2);
+static void EmacsFrameDestroy (Widget widget);
+static void EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs);
+void EmacsFrameResize (Widget widget);
+static Boolean EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2);
+static XtGeometryResult EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result);
 
 
 #undef XtOffset
@@ -180,10 +178,7 @@
 WidgetClass emacsFrameClass = (WidgetClass) &emacsFrameClassRec;
 
 static void
-get_default_char_pixel_size (ew, pixel_width, pixel_height)
-     EmacsFrame ew;
-     int* pixel_width;
-     int* pixel_height;
+get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height)
 {
   struct frame* f = ew->emacs_frame.frame;
   *pixel_width = FRAME_COLUMN_WIDTH (f);
@@ -191,12 +186,7 @@
 }
 
 static void
-pixel_to_char_size (ew, pixel_width, pixel_height, char_width, char_height)
-     EmacsFrame ew;
-     Dimension pixel_width;
-     Dimension pixel_height;
-     int* char_width;
-     int* char_height;
+pixel_to_char_size (EmacsFrame ew, Dimension pixel_width, Dimension pixel_height, int *char_width, int *char_height)
 {
   struct frame* f = ew->emacs_frame.frame;
   *char_width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, (int) pixel_width);
@@ -204,12 +194,7 @@
 }
 
 static void
-char_to_pixel_size (ew, char_width, char_height, pixel_width, pixel_height)
-     EmacsFrame ew;
-     int char_width;
-     int char_height;
-     Dimension* pixel_width;
-     Dimension* pixel_height;
+char_to_pixel_size (EmacsFrame ew, int char_width, int char_height, Dimension *pixel_width, Dimension *pixel_height)
 {
   struct frame* f = ew->emacs_frame.frame;
   *pixel_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, char_width);
@@ -217,12 +202,7 @@
 }
 
 static void
-round_size_to_char (ew, in_width, in_height, out_width, out_height)
-     EmacsFrame ew;
-     Dimension in_width;
-     Dimension in_height;
-     Dimension* out_width;
-     Dimension* out_height;
+round_size_to_char (EmacsFrame ew, Dimension in_width, Dimension in_height, Dimension *out_width, Dimension *out_height)
 {
   int char_width;
   int char_height;
@@ -231,8 +211,7 @@
 }
 
 static Widget
-get_wm_shell (w)
-     Widget w;
+get_wm_shell (Widget w)
 {
   Widget wmshell;
 
@@ -269,8 +248,7 @@
 #endif
 
 static void
-set_frame_size (ew)
-     EmacsFrame ew;
+set_frame_size (EmacsFrame ew)
 {
   /* The widget hierarchy is
 
@@ -491,8 +469,7 @@
 int update_hints_inhibit;
 
 static void
-update_wm_hints (ew)
-     EmacsFrame ew;
+update_wm_hints (EmacsFrame ew)
 {
   Widget wmshell = get_wm_shell ((Widget)ew);
   int cw;
@@ -570,8 +547,7 @@
 };
 
 static void
-setup_frame_gcs (ew)
-     EmacsFrame ew;
+setup_frame_gcs (EmacsFrame ew)
 {
   XGCValues gc_values;
   struct frame* s = ew->emacs_frame.frame;
@@ -649,8 +625,7 @@
 }
 
 static void
-update_various_frame_slots (ew)
-     EmacsFrame ew;
+update_various_frame_slots (EmacsFrame ew)
 {
   struct frame *f = ew->emacs_frame.frame;
   struct x_output *x = f->output_data.x;
@@ -661,8 +636,7 @@
 }
 
 static void
-update_from_various_frame_slots (ew)
-     EmacsFrame ew;
+update_from_various_frame_slots (EmacsFrame ew)
 {
   struct frame *f = ew->emacs_frame.frame;
   struct x_output *x = f->output_data.x;
@@ -677,11 +651,7 @@
 }
 
 static void
-EmacsFrameInitialize (request, new, dum1, dum2)
-     Widget request;
-     Widget new;
-     ArgList dum1;
-     Cardinal *dum2;
+EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2)
 {
   EmacsFrame ew = (EmacsFrame)new;
 
@@ -698,10 +668,7 @@
 
 
 static void
-EmacsFrameRealize (widget, mask, attrs)
-     Widget widget;
-     XtValueMask *mask;
-     XSetWindowAttributes *attrs;
+EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs)
 {
   EmacsFrame ew = (EmacsFrame)widget;
 
@@ -717,11 +684,10 @@
   update_wm_hints (ew);
 }
 
-extern void free_frame_faces (/* struct frame * */);
+extern void free_frame_faces (struct frame *);
 
 static void
-EmacsFrameDestroy (widget)
-     Widget widget;
+EmacsFrameDestroy (Widget widget)
 {
   EmacsFrame ew = (EmacsFrame) widget;
   struct frame* s = ew->emacs_frame.frame;
@@ -739,8 +705,7 @@
 }
 
 void
-EmacsFrameResize (widget)
-     Widget widget;
+EmacsFrameResize (Widget widget)
 {
   EmacsFrame ew = (EmacsFrame)widget;
   struct frame *f = ew->emacs_frame.frame;
@@ -756,12 +721,7 @@
 }
 
 static Boolean
-EmacsFrameSetValues (cur_widget, req_widget, new_widget, dum1, dum2)
-     Widget cur_widget;
-     Widget req_widget;
-     Widget new_widget;
-     ArgList dum1;
-     Cardinal *dum2;
+EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2)
 {
   EmacsFrame cur = (EmacsFrame)cur_widget;
   EmacsFrame new = (EmacsFrame)new_widget;
@@ -834,10 +794,7 @@
 }
 
 static XtGeometryResult
-EmacsFrameQueryGeometry (widget, request, result)
-     Widget widget;
-     XtWidgetGeometry* request;
-     XtWidgetGeometry* result;
+EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result)
 {
   EmacsFrame ew = (EmacsFrame)widget;
 
@@ -867,10 +824,7 @@
 
 /* Special entrypoints */
 void
-EmacsFrameSetCharSize (widget, columns, rows)
-     Widget widget;
-     int columns;
-     int rows;
+EmacsFrameSetCharSize (Widget widget, int columns, int rows)
 {
   EmacsFrame ew = (EmacsFrame) widget;
   struct frame *f = ew->emacs_frame.frame;
@@ -880,8 +834,7 @@
 
 
 void
-widget_store_internal_border (widget)
-     Widget widget;
+widget_store_internal_border (Widget widget)
 {
   EmacsFrame ew = (EmacsFrame) widget;
   FRAME_PTR f = ew->emacs_frame.frame;
--- a/src/xdisp.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/xdisp.c	Mon Jul 12 22:43:26 2010 +0000
@@ -1311,11 +1311,8 @@
    box.  */
 
 INLINE void
-window_box_edges (w, area, top_left_x, top_left_y,
-		  bottom_right_x, bottom_right_y)
-     struct window *w;
-     int area;
-     int *top_left_x, *top_left_y, *bottom_right_x, *bottom_right_y;
+window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y,
+		   int *bottom_right_x, int *bottom_right_y)
 {
   window_box (w, area, top_left_x, top_left_y, bottom_right_x,
 	      bottom_right_y);
@@ -4078,14 +4075,9 @@
    of buffer or string text.  */
 
 static int
-handle_single_display_spec (it, spec, object, overlay, position,
-			    display_replaced_before_p)
-     struct it *it;
-     Lisp_Object spec;
-     Lisp_Object object;
-     Lisp_Object overlay;
-     struct text_pos *position;
-     int display_replaced_before_p;
+handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
+			    Lisp_Object overlay, struct text_pos *position,
+			    int display_replaced_before_p)
 {
   Lisp_Object form;
   Lisp_Object location, value;
@@ -13090,13 +13082,9 @@
 };
 
 static int
-try_scrolling (window, just_this_one_p, scroll_conservatively,
-	       scroll_step, temp_scroll_step, last_line_misfit)
-     Lisp_Object window;
-     int just_this_one_p;
-     EMACS_INT scroll_conservatively, scroll_step;
-     int temp_scroll_step;
-     int last_line_misfit;
+try_scrolling (Lisp_Object window, int just_this_one_p,
+	       EMACS_INT scroll_conservatively, EMACS_INT scroll_step,
+	       int temp_scroll_step, int last_line_misfit)
 {
   struct window *w = XWINDOW (window);
   struct frame *f = XFRAME (w->frame);
@@ -19831,16 +19819,9 @@
    Value is the number of columns displayed.  */
 
 static int
-display_string (string, lisp_string, face_string, face_string_pos,
-		start, it, field_width, precision, max_x, multibyte)
-     unsigned char *string;
-     Lisp_Object lisp_string;
-     Lisp_Object face_string;
-     EMACS_INT face_string_pos;
-     EMACS_INT start;
-     struct it *it;
-     int field_width, precision, max_x;
-     int multibyte;
+display_string (unsigned char *string, Lisp_Object lisp_string, Lisp_Object face_string,
+		EMACS_INT face_string_pos, EMACS_INT start, struct it *it,
+		int field_width, int precision, int max_x, int multibyte)
 {
   int hpos_at_start = it->hpos;
   int saved_face_id = it->face_id;
--- a/src/xfaces.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/xfaces.c	Mon Jul 12 22:43:26 2010 +0000
@@ -3599,8 +3599,7 @@
 /* Make menus on frame F appear as specified by the `menu' face.  */
 
 static void
-x_update_menu_appearance (f)
-     struct frame *f;
+x_update_menu_appearance (struct frame *f)
 {
   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   XrmDatabase rdb;
@@ -6074,15 +6073,10 @@
    The face returned is suitable for displaying ASCII characters.  */
 
 int
-face_at_buffer_position (w, pos, region_beg, region_end,
-			 endptr, limit, mouse, base_face_id)
-     struct window *w;
-     EMACS_INT pos;
-     EMACS_INT region_beg, region_end;
-     EMACS_INT *endptr;
-     EMACS_INT limit;
-     int mouse;
-     int base_face_id;
+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)
 {
   struct frame *f = XFRAME (w->frame);
   Lisp_Object attrs[LFACE_VECTOR_SIZE];
@@ -6182,15 +6176,10 @@
    simply disregards the `face' properties of all overlays.  */
 
 int
-face_for_overlay_string (w, pos, region_beg, region_end,
-			 endptr, limit, mouse, overlay)
-     struct window *w;
-     EMACS_INT pos;
-     EMACS_INT region_beg, region_end;
-     EMACS_INT *endptr;
-     EMACS_INT limit;
-     int mouse;
-     Lisp_Object overlay;
+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)
 {
   struct frame *f = XFRAME (w->frame);
   Lisp_Object attrs[LFACE_VECTOR_SIZE];
@@ -6275,15 +6264,11 @@
    for displaying ASCII characters.  */
 
 int
-face_at_string_position (w, string, pos, bufpos, region_beg,
-			 region_end, endptr, base_face_id, mouse_p)
-     struct window *w;
-     Lisp_Object string;
-     EMACS_INT pos, bufpos;
-     EMACS_INT region_beg, region_end;
-     EMACS_INT *endptr;
-     enum face_id base_face_id;
-     int mouse_p;
+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 base_face_id,
+			 int mouse_p)
 {
   Lisp_Object prop, position, end, limit;
   struct frame *f = XFRAME (WINDOW_FRAME (w));
--- a/src/xfns.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/xfns.c	Mon Jul 12 22:43:26 2010 +0000
@@ -1762,14 +1762,10 @@
    named NAME.  If that is not found either, use the value DEFLT.  */
 
 static Lisp_Object
-x_default_scroll_bar_color_parameter (f, alist, prop, xprop, xclass,
-				      foreground_p)
-     struct frame *f;
-     Lisp_Object alist;
-     Lisp_Object prop;
-     char *xprop;
-     char *xclass;
-     int foreground_p;
+x_default_scroll_bar_color_parameter (struct frame *f,
+				      Lisp_Object alist, Lisp_Object prop,
+				      char *xprop, char *xclass,
+				      int foreground_p)
 {
   struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   Lisp_Object tem;
@@ -1820,9 +1816,7 @@
    for example, but Xt doesn't).  */
 
 static void
-hack_wm_protocols (f, widget)
-     FRAME_PTR f;
-     Widget widget;
+hack_wm_protocols (FRAME_PTR f, Widget widget)
 {
   Display *dpy = XtDisplay (widget);
   Window w = XtWindow (widget);
@@ -2396,10 +2390,7 @@
 /* Create and set up the X widget for frame F.  */
 
 static void
-x_window (f, window_prompting, minibuffer_only)
-     struct frame *f;
-     long window_prompting;
-     int minibuffer_only;
+x_window (struct frame *f, long window_prompting, int minibuffer_only)
 {
   XClassHint class_hints;
   XSetWindowAttributes attributes;
@@ -2685,9 +2676,7 @@
 /* Create and set up the X window for frame F.  */
 
 void
-x_window (f)
-     struct frame *f;
-
+x_window (struct frame *f)
 {
   XClassHint class_hints;
   XSetWindowAttributes attributes;
--- a/src/xmenu.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/xmenu.c	Mon Jul 12 22:43:26 2010 +0000
@@ -165,8 +165,7 @@
 /* Return the frame whose ->output_data.x->id equals ID, or 0 if none.  */
 
 static struct frame *
-menubar_id_to_frame (id)
-     LWLIB_ID id;
+menubar_id_to_frame (LWLIB_ID id)
 {
   Lisp_Object tail, frame;
   FRAME_PTR f;
@@ -456,11 +455,7 @@
    with BLOCK_INPUT, UNBLOCK_INPUT wrappers.  */
 
 static void
-popup_get_selection (initial_event, dpyinfo, id, do_timers)
-     XEvent *initial_event;
-     struct x_display_info *dpyinfo;
-     LWLIB_ID id;
-     int do_timers;
+popup_get_selection (XEvent *initial_event, struct x_display_info *dpyinfo, LWLIB_ID id, int do_timers)
 {
   XEvent event;
 
@@ -705,10 +700,7 @@
 
 #ifndef USE_GTK
 static void
-popup_activate_callback (widget, id, client_data)
-     Widget widget;
-     LWLIB_ID id;
-     XtPointer client_data;
+popup_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
 {
   popup_activated_flag = 1;
 #ifdef USE_X_TOOLKIT
@@ -728,10 +720,7 @@
 }
 #else
 static void
-popup_deactivate_callback (widget, id, client_data)
-     Widget widget;
-     LWLIB_ID id;
-     XtPointer client_data;
+popup_deactivate_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
 {
   popup_activated_flag = 0;
 }
@@ -799,10 +788,7 @@
 }
 #else
 void
-menu_highlight_callback (widget, id, call_data)
-     Widget widget;
-     LWLIB_ID id;
-     void *call_data;
+menu_highlight_callback (Widget widget, LWLIB_ID id, void *call_data)
 {
   struct frame *f;
   Lisp_Object help;
@@ -873,10 +859,7 @@
    Figure out what the user chose
    and put the appropriate events into the keyboard buffer.  */
 static void
-menubar_selection_callback (widget, id, client_data)
-     Widget widget;
-     LWLIB_ID id;
-     XtPointer client_data;
+menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
 {
   FRAME_PTR f;
 
@@ -942,8 +925,7 @@
 
 #ifdef USE_LUCID
 static void
-apply_systemfont_to_dialog (w)
-     Widget w;
+apply_systemfont_to_dialog (Widget w)
 {
   const char *fn = xsettings_get_system_normal_font ();
   if (fn) 
@@ -955,8 +937,7 @@
 }
 
 static void
-apply_systemfont_to_menu (w)
-     Widget w;
+apply_systemfont_to_menu (Widget w)
 {
   const char *fn = xsettings_get_system_normal_font ();
   int defflt;
@@ -1352,8 +1333,7 @@
 
 #ifndef USE_GTK
 void
-free_frame_menubar (f)
-     FRAME_PTR f;
+free_frame_menubar (FRAME_PTR f)
 {
   Widget menubar_widget;
 
@@ -1569,10 +1549,7 @@
 LWLIB_ID widget_id_tick;
 
 static void
-popup_selection_callback (widget, id, client_data)
-     Widget widget;
-     LWLIB_ID id;
-     XtPointer client_data;
+popup_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
 {
   menu_item_selection = (Lisp_Object *) client_data;
 }
@@ -1581,8 +1558,7 @@
    as a Lisp object as (HIGHPART . LOWPART).  */
 
 static Lisp_Object
-pop_down_menu (arg)
-     Lisp_Object arg;
+pop_down_menu (Lisp_Object arg)
 {
   LWLIB_ID id = (XINT (XCAR (arg)) << 4 * sizeof (LWLIB_ID)
                  | XINT (XCDR (arg)));
@@ -1599,13 +1575,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, unsigned int timestamp)
 {
   int i;
   Arg av[2];
@@ -1997,10 +1967,7 @@
 
 #else /* not USE_GTK */
 static void
-dialog_selection_callback (widget, id, client_data)
-     Widget widget;
-     LWLIB_ID id;
-     XtPointer client_data;
+dialog_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
 {
   /* The EMACS_INT cast avoids a warning.  There's no problem
      as long as pointers have enough bits to hold small integers.  */
@@ -2018,9 +1985,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)
 {
   LWLIB_ID dialog_id;
 
@@ -2263,9 +2228,7 @@
    keyboard events.  */
 
 static void
-menu_help_callback (help_string, pane, item)
-     char *help_string;
-     int pane, item;
+menu_help_callback (char *help_string, int pane, int item)
 {
   extern Lisp_Object Qmenu_item;
   Lisp_Object *first_item;
@@ -2290,8 +2253,7 @@
 }
 
 static Lisp_Object
-pop_down_menu (arg)
-     Lisp_Object arg;
+pop_down_menu (Lisp_Object arg)
 {
   struct Lisp_Save_Value *p1 = XSAVE_VALUE (Fcar (arg));
   struct Lisp_Save_Value *p2 = XSAVE_VALUE (Fcdr (arg));
@@ -2326,14 +2288,7 @@
 
 
 Lisp_Object
-xmenu_show (f, x, y, for_click, keymaps, title, error, timestamp)
-     FRAME_PTR f;
-     int x, y;
-     int for_click;
-     int keymaps;
-     Lisp_Object title;
-     char **error;
-     EMACS_UINT timestamp;
+xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, Lisp_Object title, char **error, unsigned int timestamp)
 {
   Window root;
   XMenu *menu;
--- a/src/xselect.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/xselect.c	Mon Jul 12 22:43:26 2010 +0000
@@ -1453,18 +1453,10 @@
 /* Use xfree, not XFree, to free the data obtained with this function.  */
 
 static void
-x_get_window_property (display, window, property, data_ret, bytes_ret,
-		       actual_type_ret, actual_format_ret, actual_size_ret,
-		       delete_p)
-     Display *display;
-     Window window;
-     Atom property;
-     unsigned char **data_ret;
-     int *bytes_ret;
-     Atom *actual_type_ret;
-     int *actual_format_ret;
-     unsigned long *actual_size_ret;
-     int delete_p;
+x_get_window_property (Display *display, Window window, Atom property,
+		       unsigned char **data_ret, int *bytes_ret,
+		       Atom *actual_type_ret, int *actual_format_ret,
+		       unsigned long *actual_size_ret, int delete_p)
 {
   int total_size;
   unsigned long bytes_remaining;
@@ -1572,19 +1564,12 @@
 /* Use xfree, not XFree, to free the data obtained with this function.  */
 
 static void
-receive_incremental_selection (display, window, property, target_type,
-			       min_size_bytes, data_ret, size_bytes_ret,
-			       type_ret, format_ret, size_ret)
-     Display *display;
-     Window window;
-     Atom property;
-     Lisp_Object target_type; /* for error messages only */
-     unsigned int min_size_bytes;
-     unsigned char **data_ret;
-     int *size_bytes_ret;
-     Atom *type_ret;
-     unsigned long *size_ret;
-     int *format_ret;
+receive_incremental_selection (Display *display, Window window, Atom property,
+			       Lisp_Object target_type,
+			       unsigned int min_size_bytes,
+			       unsigned char **data_ret, int *size_bytes_ret,
+			       Atom *type_ret, int *format_ret,
+			       unsigned long *size_ret)
 {
   int offset = 0;
   struct prop_location *wait_object;
@@ -1673,13 +1658,10 @@
    TARGET_TYPE and SELECTION_ATOM are used in error message if this fails.  */
 
 static Lisp_Object
-x_get_window_property_as_lisp_data (display, window, property, target_type,
-				    selection_atom)
-     Display *display;
-     Window window;
-     Atom property;
-     Lisp_Object target_type;	/* for error messages only */
-     Atom selection_atom;	/* for error messages only */
+x_get_window_property_as_lisp_data (Display *display, Window window,
+				    Atom property,
+				    Lisp_Object target_type,
+				    Atom selection_atom)
 {
   Atom actual_type;
   int actual_format;
@@ -1869,16 +1851,10 @@
 /* Use xfree, not XFree, to free the data obtained with this function.  */
 
 static void
-lisp_data_to_selection_data (display, obj,
-			     data_ret, type_ret, size_ret,
-			     format_ret, nofree_ret)
-     Display *display;
-     Lisp_Object obj;
-     unsigned char **data_ret;
-     Atom *type_ret;
-     unsigned int *size_ret;
-     int *format_ret;
-     int *nofree_ret;
+lisp_data_to_selection_data (Display *display, Lisp_Object obj,
+			     unsigned char **data_ret, Atom *type_ret,
+			     unsigned int *size_ret,
+			     int *format_ret, int *nofree_ret)
 {
   Lisp_Object type = Qnil;
   struct x_display_info *dpyinfo = x_display_info_for_display (display);
--- a/src/xterm.c	Sun Jul 11 22:57:47 2010 +0000
+++ b/src/xterm.c	Mon Jul 12 22:43:26 2010 +0000
@@ -1367,8 +1367,7 @@
    cannot be determined.  */
 
 static struct frame *
-x_frame_of_widget (widget)
-     Widget widget;
+x_frame_of_widget (Widget widget)
 {
   struct x_display_info *dpyinfo;
   Lisp_Object tail;
@@ -1404,10 +1403,7 @@
    if successful.  This is called from lwlib.  */
 
 int
-x_alloc_nearest_color_for_widget (widget, cmap, color)
-     Widget widget;
-     Colormap cmap;
-     XColor *color;
+x_alloc_nearest_color_for_widget (Widget widget, Colormap cmap, XColor *color)
 {
   struct frame *f = x_frame_of_widget (widget);
   return x_alloc_nearest_color (f, cmap, color);
@@ -1422,13 +1418,8 @@
    Value is non-zero if successful.  */
 
 int
-x_alloc_lighter_color_for_widget (widget, display, cmap, pixel, factor, delta)
-     Widget widget;
-     Display *display;
-     Colormap cmap;
-     unsigned long *pixel;
-     double factor;
-     int delta;
+x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap,
+				  unsigned long *pixel, double factor, int delta)
 {
   struct frame *f = x_frame_of_widget (widget);
   return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta);
@@ -1471,12 +1462,9 @@
    Value is True if successful, False otherwise.  */
 
 static Boolean
-cvt_string_to_pixel (dpy, args, nargs, from, to, closure_ret)
-     Display *dpy;
-     XrmValue *args;
-     Cardinal *nargs;
-     XrmValue *from, *to;
-     XtPointer *closure_ret;
+cvt_string_to_pixel (Display *dpy, XrmValue *args, Cardinal *nargs,
+		     XrmValue *from, XrmValue *to,
+		     XtPointer *closure_ret)
 {
   Screen *screen;
   Colormap cmap;
@@ -1560,12 +1548,8 @@
    ARGS and NARGS are like for cvt_string_to_pixel.  */
 
 static void
-cvt_pixel_dtor (app, to, closure, args, nargs)
-    XtAppContext app;
-    XrmValuePtr to;
-    XtPointer closure;
-    XrmValuePtr args;
-    Cardinal *nargs;
+cvt_pixel_dtor (XtAppContext app, XrmValuePtr to, XtPointer closure, XrmValuePtr args,
+		Cardinal *nargs)
 {
   if (*nargs != 2)
     {
@@ -1967,12 +1951,10 @@
    when drawing.  */
 
 static void
-x_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;
-     XRectangle *clip_rect;
+x_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,
+		    XRectangle *clip_rect)
 {
   Display *dpy = FRAME_X_DISPLAY (f);
   Window window = FRAME_X_WINDOW (f);
@@ -2030,11 +2012,9 @@
    rectangle to use when drawing.  */
 
 static void
-x_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;
-     XRectangle *clip_rect;
+x_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, XRectangle *clip_rect)
 {
   XGCValues xgcv;
 
@@ -3957,8 +3937,7 @@
    if WINDOW is not part of a menu bar.  */
 
 static Widget
-x_window_to_menu_bar (window)
-     Window window;
+x_window_to_menu_bar (Window window)
 {
   Lisp_Object tail;
 
@@ -4025,14 +4004,8 @@
    a `end-scroll' SCROLL_BAR_CLICK_EVENT' event if so.  */
 
 static void
-xt_action_hook (widget, client_data, action_name, event, params,
-		num_params)
-     Widget widget;
-     XtPointer client_data;
-     String action_name;
-     XEvent *event;
-     String *params;
-     Cardinal *num_params;
+xt_action_hook (Widget widget, XtPointer client_data, String action_name,
+		XEvent *event, String *params, Cardinal *num_params)
 {
   int scroll_bar_p;
   char *end_action;
@@ -4345,9 +4318,7 @@
    the thumb is.  */
 
 static void
-xaw_jump_callback (widget, client_data, call_data)
-     Widget widget;
-     XtPointer client_data, call_data;
+xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data)
 {
   struct scroll_bar *bar = (struct scroll_bar *) client_data;
   float top = *(float *) call_data;
@@ -4389,9 +4360,7 @@
    Values < height of scroll bar mean line-wise movement.  */
 
 static void
-xaw_scroll_callback (widget, client_data, call_data)
-     Widget widget;
-     XtPointer client_data, call_data;
+xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
 {
   struct scroll_bar *bar = (struct scroll_bar *) client_data;
   /* The position really is stored cast to a pointer.  */
@@ -4443,9 +4412,7 @@
 #else /* not 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)
 {
   Window xwindow;
   Widget widget;
@@ -4652,9 +4619,8 @@
 
 #else /* not 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)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
   Widget widget = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
@@ -4883,10 +4849,7 @@
    to move to the very end of the buffer.  */
 
 static void
-x_scroll_bar_set_handle (bar, start, end, rebuild)
-     struct scroll_bar *bar;
-     int start, end;
-     int rebuild;
+x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild)
 {
   int dragging = ! NILP (bar->dragging);
   Window w = bar->x_window;
@@ -5328,9 +5291,7 @@
    mark bits.  */
 
 static void
-x_scroll_bar_expose (bar, event)
-     struct scroll_bar *bar;
-     XEvent *event;
+x_scroll_bar_expose (struct scroll_bar *bar, XEvent *event)
 {
   Window w = bar->x_window;
   FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
@@ -5430,9 +5391,7 @@
    mark bits.  */
 
 static void
-x_scroll_bar_note_movement (bar, event)
-     struct scroll_bar *bar;
-     XEvent *event;
+x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event)
 {
   FRAME_PTR f = XFRAME (XWINDOW (bar->window)->frame);
 
@@ -9440,10 +9399,7 @@
 
 #ifndef USE_GTK
 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)
 {
   XSizeHints size_hints;
   Window window = FRAME_OUTER_WINDOW (f);
@@ -10406,7 +10362,7 @@
    processed, these widgets don't behave normally.  */
 
 void
-x_activate_timeout_atimer ()
+x_activate_timeout_atimer (void)
 {
   BLOCK_INPUT;
   if (!x_timeout_atimer_activated_flag)