Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl27 (2.7.1-9) unstable; urgency=medium
 .
   * Version_2_7_2pre8
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2026-02-19

--- gcl27-2.7.1.orig/INSTALL
+++ gcl27-2.7.1/INSTALL
@@ -13,7 +13,10 @@ Basic Installation
 
 should configure, build, and install this package.  The first line,
 which bootstraps, is intended for developers; when building from
-distribution tarballs it does nothing and can be skipped.
+distribution tarballs it does nothing and can be skipped.  A package
+might name the bootstrapping script differently; if the name is
+‘autogen.sh’, for example, the first line should say ‘./autogen.sh’
+instead of ‘./bootstrap’.
 
    The following more-detailed instructions are generic; see the
 ‘README’ file for instructions specific to this package.  Some packages
@@ -25,23 +28,22 @@ found in the GNU Coding Standards.
    Many packages have scripts meant for developers instead of ordinary
 builders, as they may use developer tools that are less commonly
 installed, or they may access the network, which has privacy
-implications.  If the ‘bootstrap’ shell script exists, it attempts to
-build the ‘configure’ shell script and related files, possibly using
-developer tools or the network.  Because the output of ‘bootstrap’ is
-system-independent, it is normally run by a package developer so that
-its output can be put into the distribution tarball and ordinary
-builders and users need not run ‘bootstrap’.  Some packages have
-commands like ‘./autopull.sh’ and ‘./autogen.sh’ that you can run
-instead of ‘./bootstrap’, for more fine-grained control over
-bootstrapping.
-
-   The ‘configure’ shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a ‘Makefile’ in each directory of the package.
-It may also create one or more ‘.h’ files containing system-dependent
-definitions.  Finally, it creates a shell script ‘config.status’ that
-you can run in the future to recreate the current configuration, and a
-file ‘config.log’ containing output useful for debugging ‘configure’.
+implications.  These scripts attempt to bootstrap by building the
+‘configure’ script and related files, possibly using developer tools or
+the network.  Because the output of bootstrapping is system-independent,
+it is normally run by a package developer so that its output can be put
+into the distribution tarball and ordinary builders and users need not
+bootstrap.  Some packages have commands like ‘./autopull.sh’ and
+‘./autogen.sh’ that you can run instead of ‘./bootstrap’, for more
+fine-grained control over bootstrapping.
+
+   The ‘configure’ script attempts to guess correct values for various
+system-dependent variables used during compilation.  It uses those
+values to create a ‘Makefile’ in each directory of the package.  It may
+also create one or more ‘.h’ files containing system-dependent
+definitions.  Finally, it creates a script ‘config.status’ that you can
+run in the future to recreate the current configuration, and a file
+‘config.log’ containing output useful for debugging ‘configure’.
 
    It can also use an optional file (typically called ‘config.cache’ and
 enabled with ‘--cache-file=config.cache’ or simply ‘-C’) that saves the
@@ -64,9 +66,10 @@ editing ‘configure’ directly.
   1. ‘cd’ to the directory containing the package’s source code.
 
   2. If this is a developer checkout and file ‘configure’ does not yet
-     exist, type ‘./bootstrap’ to create it.  You may need special
-     developer tools and network access to bootstrap, and the network
-     access may have privacy implications.
+     exist, run the bootstrapping script (typically ‘./bootstrap’ or
+     ‘./autogen.sh’) to bootstrap and create the file.  You may need
+     special developer tools and network access to bootstrap, and the
+     network access may have privacy implications.
 
   3. Type ‘./configure’ to configure the package for your system.  This
      might take a while.  While running, ‘configure’ prints messages
@@ -101,6 +104,18 @@ editing ‘configure’ directly.
   9. If the package follows the GNU Coding Standards, you can type ‘make
      uninstall’ to remove the installed files.
 
+Installation Prerequisites
+==========================
+
+   Installation requires a POSIX-like environment with a shell and at
+least the following standard utilities:
+
+     awk cat cp diff echo expr false ls mkdir mv printf pwd rm rmdir sed
+     sort test tr
+
+This package’s installation may need other standard utilities such as
+‘grep’, ‘make’, ‘sleep’ and ‘touch’, along with compilers like ‘gcc’.
+
 Compilers and Options
 =====================
 
@@ -356,7 +371,7 @@ more details.
 Copyright notice
 ================
 
-   Copyright © 1994–1996, 1999–2002, 2004–2017, 2020–2024 Free Software
+   Copyright © 1994–1996, 1999–2002, 2004–2017, 2020–2025 Free Software
 Foundation, Inc.
 
    Copying and distribution of this file, with or without modification,
--- gcl27-2.7.1.orig/Makefile.am
+++ gcl27-2.7.1/Makefile.am
@@ -129,7 +129,7 @@ BASE_H= h/compbas2.h h/compbas.h h/compp
 	h/funlink.h h/globals.h h/gmp_wrappers.h h/immnum.h h/include.h h/lex.h h/linux.h h/lu.h h/make-init.h \
 	h/mp.h h/notcomp.h h/num_include.h h/object.h h/options.h h/page.h h/pageinfo.h h/pbits.h h/pool.h \
 	h/prelink.h h/protoize.h h/ptable.h h/rgbc.h h/sfun_argd.h h/stacks.h h/type.h h/usig.h h/vs.h \
-        h/writable.h o/regexp.h h/arth.h h/bsd.h h/bds.h h/att_ext.h h/bfdef.h h/compat.h h/apply_n.h \
+        h/writable.h o/regexp.h h/arth.h h/bsd.h h/bds.h h/att_ext.h h/bfdef.h h/compat.h \
 	gcl-tk/sheader.h h/make-decl.h h/defun.h o/ntheap.h
 CMPI_H=	h/compdefs.h h/cmpincl1.h h/mgmp.h h/compprotos.h h/compbas2.h h/cmponly_last.h
 ARCHT_H=h/elf32_armhf_reloc.h h/elf32_armhf_reloc_special.h h/elf32_arm_reloc.h h/elf32_arm_reloc_special.h \
@@ -161,7 +161,7 @@ C_SRC=o/typespec.c o/alloc.c o/gbc.c o/b
 D_SRC=o/character.d o/file.d o/gcl_readline.d o/hash.d o/list.d o/package.d o/pathname.d o/print.d\
       o/read.d o/sequence.d o/string.d o/symbol.d
 BUILT_C=o/character.c o/file.c o/gcl_readline.c o/hash.c o/list.c o/package.c o/pathname.c o/print.c\
-        o/read.c o/sequence.c o/string.c o/symbol.c o/new_init.c
+        o/read.c o/sequence.c o/string.c o/symbol.c o/new_init.c o/qfv.c
 
 INI_FILES=$(patsubst %.c,%.ini,$(C_SRC)) $(patsubst %.d,%.ini,$(D_SRC))
 if AMM_GPROF
@@ -352,6 +352,7 @@ unixport/ansi_gcl: clcs/package.lisp clc
 $(addprefix gcl0/,$(LL_OBJS)): gcl0/%.o : lsp/%.lsp
 $(addprefix gcl0/,$(LC_OBJS)): gcl0/%.o : cmpnew/%.lsp
 gcl0/%.o: | unixport/gcl0
+	rm -f $(@D)/$*.done
 	$| -eval "(mapc 'load (directory \"$(@D)/*.done\"))" -compile $< -o $@
 	[ "$*" = "gcl_c" ] || [ "$*" = "gcl_listlib" ] || \
 		ln -f $@ $$(echo $@ |sed 's,\.o,\.done,g') #FIXME directory link
@@ -359,6 +360,7 @@ gcl0/%.o: | unixport/gcl0
 $(addprefix gcl1/,$(LL_OBJS)): gcl1/%.o : lsp/%.lsp
 $(addprefix gcl1/,$(LC_OBJS)): gcl1/%.o : cmpnew/%.lsp
 gcl1/%.o: | unixport/gcl1
+	rm -f $(@D)/$*.done
 	$| -eval "(mapc 'load (directory \"$(@D)/*.done\"))" \
 	   -eval "(setq compiler::*dump-inl-hash* t)" \
 	   -compile $< -o $@
@@ -456,6 +458,9 @@ h/cmpincludea.h: $(filter-out gclincl.h,
 		$(CPP) $(AM_CPPFLAGS) -P $(CPPFLAGS) - | \
 		$(AWK) '/^# |^$$|^#pragma/ {next}{print}' > $@
 
+o/qfv.c: o/pre_qfv.c h/new_decl.h bin/c23.awk
+	$(CPP) $(AM_CPPFLAGS) -P $(CPPFLAGS) $< | bin/c23.awk >$@
+
 h/cmpinclude.h: h/mcompdefs.h h/cmpincludea.h h/cmponly_last.h
 	@cat $^ >new_$(@F)
 	@([ -e $@ ] && cmp new_$(@F) $@) || mv -v new_$(@F) $@
--- gcl27-2.7.1.orig/Makefile.in
+++ gcl27-2.7.1/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.17 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994-2025 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -197,13 +197,12 @@ am__lib_libbase_gcl_a_SOURCES_DIST = o/t
 	h/pool.h h/prelink.h h/protoize.h h/ptable.h h/rgbc.h \
 	h/sfun_argd.h h/stacks.h h/type.h h/usig.h h/vs.h h/writable.h \
 	o/regexp.h h/arth.h h/bsd.h h/bds.h h/att_ext.h h/bfdef.h \
-	h/compat.h h/apply_n.h gcl-tk/sheader.h h/make-decl.h \
-	h/defun.h o/ntheap.h h/compdefs.h h/cmpincl1.h h/mgmp.h \
-	h/cmponly_last.h h/elf32_armhf_reloc.h \
-	h/elf32_armhf_reloc_special.h h/elf32_arm_reloc.h \
-	h/elf32_arm_reloc_special.h h/elf32_hppa_reloc.h \
-	h/elf32_hppa_reloc_special.h h/elf32_i386_reloc.h \
-	h/elf32_m68k_reloc.h h/elf32_mips_reloc.h \
+	h/compat.h gcl-tk/sheader.h h/make-decl.h h/defun.h o/ntheap.h \
+	h/compdefs.h h/cmpincl1.h h/mgmp.h h/cmponly_last.h \
+	h/elf32_armhf_reloc.h h/elf32_armhf_reloc_special.h \
+	h/elf32_arm_reloc.h h/elf32_arm_reloc_special.h \
+	h/elf32_hppa_reloc.h h/elf32_hppa_reloc_special.h \
+	h/elf32_i386_reloc.h h/elf32_m68k_reloc.h h/elf32_mips_reloc.h \
 	h/elf32_mips_reloc_special.h h/elf32_ppc_reloc.h \
 	h/elf32_s390_reloc.h h/elf32_sh4_reloc.h h/elf32_sparc_reloc.h \
 	h/elf64_aarch64_reloc.h h/elf64_aarch64_reloc_special.h \
@@ -258,7 +257,7 @@ am__objects_4 = o/character.$(OBJEXT) o/
 	o/gcl_readline.$(OBJEXT) o/hash.$(OBJEXT) o/list.$(OBJEXT) \
 	o/package.$(OBJEXT) o/pathname.$(OBJEXT) o/print.$(OBJEXT) \
 	o/read.$(OBJEXT) o/sequence.$(OBJEXT) o/string.$(OBJEXT) \
-	o/symbol.$(OBJEXT) o/new_init.$(OBJEXT)
+	o/symbol.$(OBJEXT) o/new_init.$(OBJEXT) o/qfv.$(OBJEXT)
 nodist_lib_libbase_gcl_a_OBJECTS = $(am__objects_4)
 lib_libbase_gcl_a_OBJECTS = $(am_lib_libbase_gcl_a_OBJECTS) \
 	$(nodist_lib_libbase_gcl_a_OBJECTS)
@@ -287,13 +286,12 @@ am__lib_libbase_gcl_gprof_a_SOURCES_DIST
 	h/pool.h h/prelink.h h/protoize.h h/ptable.h h/rgbc.h \
 	h/sfun_argd.h h/stacks.h h/type.h h/usig.h h/vs.h h/writable.h \
 	o/regexp.h h/arth.h h/bsd.h h/bds.h h/att_ext.h h/bfdef.h \
-	h/compat.h h/apply_n.h gcl-tk/sheader.h h/make-decl.h \
-	h/defun.h o/ntheap.h h/compdefs.h h/cmpincl1.h h/mgmp.h \
-	h/cmponly_last.h h/elf32_armhf_reloc.h \
-	h/elf32_armhf_reloc_special.h h/elf32_arm_reloc.h \
-	h/elf32_arm_reloc_special.h h/elf32_hppa_reloc.h \
-	h/elf32_hppa_reloc_special.h h/elf32_i386_reloc.h \
-	h/elf32_m68k_reloc.h h/elf32_mips_reloc.h \
+	h/compat.h gcl-tk/sheader.h h/make-decl.h h/defun.h o/ntheap.h \
+	h/compdefs.h h/cmpincl1.h h/mgmp.h h/cmponly_last.h \
+	h/elf32_armhf_reloc.h h/elf32_armhf_reloc_special.h \
+	h/elf32_arm_reloc.h h/elf32_arm_reloc_special.h \
+	h/elf32_hppa_reloc.h h/elf32_hppa_reloc_special.h \
+	h/elf32_i386_reloc.h h/elf32_m68k_reloc.h h/elf32_mips_reloc.h \
 	h/elf32_mips_reloc_special.h h/elf32_ppc_reloc.h \
 	h/elf32_s390_reloc.h h/elf32_sh4_reloc.h h/elf32_sparc_reloc.h \
 	h/elf64_aarch64_reloc.h h/elf64_aarch64_reloc_special.h \
@@ -399,7 +397,8 @@ am__objects_8 = o/lib_libbase_gcl_gprof_
 	o/lib_libbase_gcl_gprof_a-sequence.$(OBJEXT) \
 	o/lib_libbase_gcl_gprof_a-string.$(OBJEXT) \
 	o/lib_libbase_gcl_gprof_a-symbol.$(OBJEXT) \
-	o/lib_libbase_gcl_gprof_a-new_init.$(OBJEXT)
+	o/lib_libbase_gcl_gprof_a-new_init.$(OBJEXT) \
+	o/lib_libbase_gcl_gprof_a-qfv.$(OBJEXT)
 am__objects_9 = $(am__objects_8)
 nodist_lib_libbase_gcl_gprof_a_OBJECTS = $(am__objects_9)
 lib_libbase_gcl_gprof_a_OBJECTS =  \
@@ -572,6 +571,7 @@ am__depfiles_remade = bin/$(DEPDIR)/dpp.
 	o/$(DEPDIR)/lib_libbase_gcl_gprof_a-prelink.Po \
 	o/$(DEPDIR)/lib_libbase_gcl_gprof_a-print.Po \
 	o/$(DEPDIR)/lib_libbase_gcl_gprof_a-prog.Po \
+	o/$(DEPDIR)/lib_libbase_gcl_gprof_a-qfv.Po \
 	o/$(DEPDIR)/lib_libbase_gcl_gprof_a-read.Po \
 	o/$(DEPDIR)/lib_libbase_gcl_gprof_a-reference.Po \
 	o/$(DEPDIR)/lib_libbase_gcl_gprof_a-regexpr.Po \
@@ -606,7 +606,7 @@ am__depfiles_remade = bin/$(DEPDIR)/dpp.
 	o/$(DEPDIR)/number.Po o/$(DEPDIR)/package.Po \
 	o/$(DEPDIR)/pathname.Po o/$(DEPDIR)/predicate.Po \
 	o/$(DEPDIR)/prelink.Po o/$(DEPDIR)/print.Po \
-	o/$(DEPDIR)/prog.Po o/$(DEPDIR)/read.Po \
+	o/$(DEPDIR)/prog.Po o/$(DEPDIR)/qfv.Po o/$(DEPDIR)/read.Po \
 	o/$(DEPDIR)/reference.Po o/$(DEPDIR)/regexpr.Po \
 	o/$(DEPDIR)/run_process.Po o/$(DEPDIR)/sequence.Po \
 	o/$(DEPDIR)/sfasl.Po o/$(DEPDIR)/sockets.Po \
@@ -1037,7 +1037,7 @@ BASE_H = h/compbas2.h h/compbas.h h/comp
 	h/funlink.h h/globals.h h/gmp_wrappers.h h/immnum.h h/include.h h/lex.h h/linux.h h/lu.h h/make-init.h \
 	h/mp.h h/notcomp.h h/num_include.h h/object.h h/options.h h/page.h h/pageinfo.h h/pbits.h h/pool.h \
 	h/prelink.h h/protoize.h h/ptable.h h/rgbc.h h/sfun_argd.h h/stacks.h h/type.h h/usig.h h/vs.h \
-        h/writable.h o/regexp.h h/arth.h h/bsd.h h/bds.h h/att_ext.h h/bfdef.h h/compat.h h/apply_n.h \
+        h/writable.h o/regexp.h h/arth.h h/bsd.h h/bds.h h/att_ext.h h/bfdef.h h/compat.h \
 	gcl-tk/sheader.h h/make-decl.h h/defun.h o/ntheap.h
 
 CMPI_H = h/compdefs.h h/cmpincl1.h h/mgmp.h h/compprotos.h h/compbas2.h h/cmponly_last.h
@@ -1071,7 +1071,7 @@ D_SRC = o/character.d o/file.d o/gcl_rea
       o/read.d o/sequence.d o/string.d o/symbol.d
 
 BUILT_C = o/character.c o/file.c o/gcl_readline.c o/hash.c o/list.c o/package.c o/pathname.c o/print.c\
-        o/read.c o/sequence.c o/string.c o/symbol.c o/new_init.c
+        o/read.c o/sequence.c o/string.c o/symbol.c o/new_init.c o/qfv.c
 
 INI_FILES = $(patsubst %.c,%.ini,$(C_SRC)) $(patsubst \
 	%.d,%.ini,$(D_SRC)) $(am__append_10)
@@ -1418,6 +1418,7 @@ o/sequence.$(OBJEXT): o/$(am__dirstamp)
 o/string.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
 o/symbol.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
 o/new_init.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
+o/qfv.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
 lib/$(am__dirstamp):
 	@$(MKDIR_P) lib
 	@: >>lib/$(am__dirstamp)
@@ -1588,6 +1589,8 @@ o/lib_libbase_gcl_gprof_a-symbol.$(OBJEX
 	o/$(DEPDIR)/$(am__dirstamp)
 o/lib_libbase_gcl_gprof_a-new_init.$(OBJEXT): o/$(am__dirstamp) \
 	o/$(DEPDIR)/$(am__dirstamp)
+o/lib_libbase_gcl_gprof_a-qfv.$(OBJEXT): o/$(am__dirstamp) \
+	o/$(DEPDIR)/$(am__dirstamp)
 
 lib/libbase_gcl_gprof.a: $(lib_libbase_gcl_gprof_a_OBJECTS) $(lib_libbase_gcl_gprof_a_DEPENDENCIES) $(EXTRA_lib_libbase_gcl_gprof_a_DEPENDENCIES) lib/$(am__dirstamp)
 	$(AM_V_at)-rm -f lib/libbase_gcl_gprof.a
@@ -1850,6 +1853,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-prelink.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-print.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-prog.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-qfv.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-read.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-reference.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-regexpr.Po@am__quote@ # am--include-marker
@@ -1897,6 +1901,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/prelink.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/print.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/prog.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/qfv.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/read.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/reference.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/regexpr.Po@am__quote@ # am--include-marker
@@ -3086,6 +3091,20 @@ o/lib_libbase_gcl_gprof_a-new_init.obj:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -c -o o/lib_libbase_gcl_gprof_a-new_init.obj `if test -f 'o/new_init.c'; then $(CYGPATH_W) 'o/new_init.c'; else $(CYGPATH_W) '$(srcdir)/o/new_init.c'; fi`
 
+o/lib_libbase_gcl_gprof_a-qfv.o: o/qfv.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -MT o/lib_libbase_gcl_gprof_a-qfv.o -MD -MP -MF o/$(DEPDIR)/lib_libbase_gcl_gprof_a-qfv.Tpo -c -o o/lib_libbase_gcl_gprof_a-qfv.o `test -f 'o/qfv.c' || echo '$(srcdir)/'`o/qfv.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) o/$(DEPDIR)/lib_libbase_gcl_gprof_a-qfv.Tpo o/$(DEPDIR)/lib_libbase_gcl_gprof_a-qfv.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='o/qfv.c' object='o/lib_libbase_gcl_gprof_a-qfv.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -c -o o/lib_libbase_gcl_gprof_a-qfv.o `test -f 'o/qfv.c' || echo '$(srcdir)/'`o/qfv.c
+
+o/lib_libbase_gcl_gprof_a-qfv.obj: o/qfv.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -MT o/lib_libbase_gcl_gprof_a-qfv.obj -MD -MP -MF o/$(DEPDIR)/lib_libbase_gcl_gprof_a-qfv.Tpo -c -o o/lib_libbase_gcl_gprof_a-qfv.obj `if test -f 'o/qfv.c'; then $(CYGPATH_W) 'o/qfv.c'; else $(CYGPATH_W) '$(srcdir)/o/qfv.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) o/$(DEPDIR)/lib_libbase_gcl_gprof_a-qfv.Tpo o/$(DEPDIR)/lib_libbase_gcl_gprof_a-qfv.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='o/qfv.c' object='o/lib_libbase_gcl_gprof_a-qfv.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -c -o o/lib_libbase_gcl_gprof_a-qfv.obj `if test -f 'o/qfv.c'; then $(CYGPATH_W) 'o/qfv.c'; else $(CYGPATH_W) '$(srcdir)/o/qfv.c'; fi`
+
 o/lib_libgprof_a-gprof.o: o/gprof.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libgprof_a_CFLAGS) $(CFLAGS) -MT o/lib_libgprof_a-gprof.o -MD -MP -MF o/$(DEPDIR)/lib_libgprof_a-gprof.Tpo -c -o o/lib_libgprof_a-gprof.o `test -f 'o/gprof.c' || echo '$(srcdir)/'`o/gprof.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) o/$(DEPDIR)/lib_libgprof_a-gprof.Tpo o/$(DEPDIR)/lib_libgprof_a-gprof.Po
@@ -3849,6 +3868,7 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
 distdir: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -3902,6 +3922,10 @@ dist-bzip2: distdir
 	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
 	$(am__post_remove_distdir)
 
+dist-bzip3: distdir
+	tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3
+	$(am__post_remove_distdir)
+
 dist-lzip: distdir
 	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
 	$(am__post_remove_distdir)
@@ -3946,6 +3970,8 @@ distcheck: dist
 	  eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.bz3*) \
+	  bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\
 	*.tar.lz*) \
 	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
@@ -4186,6 +4212,7 @@ distclean: distclean-am
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-prelink.Po
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-print.Po
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-prog.Po
+	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-qfv.Po
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-read.Po
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-reference.Po
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-regexpr.Po
@@ -4233,6 +4260,7 @@ distclean: distclean-am
 	-rm -f o/$(DEPDIR)/prelink.Po
 	-rm -f o/$(DEPDIR)/print.Po
 	-rm -f o/$(DEPDIR)/prog.Po
+	-rm -f o/$(DEPDIR)/qfv.Po
 	-rm -f o/$(DEPDIR)/read.Po
 	-rm -f o/$(DEPDIR)/reference.Po
 	-rm -f o/$(DEPDIR)/regexpr.Po
@@ -4508,6 +4536,7 @@ maintainer-clean: maintainer-clean-am
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-prelink.Po
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-print.Po
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-prog.Po
+	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-qfv.Po
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-read.Po
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-reference.Po
 	-rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-regexpr.Po
@@ -4555,6 +4584,7 @@ maintainer-clean: maintainer-clean-am
 	-rm -f o/$(DEPDIR)/prelink.Po
 	-rm -f o/$(DEPDIR)/print.Po
 	-rm -f o/$(DEPDIR)/prog.Po
+	-rm -f o/$(DEPDIR)/qfv.Po
 	-rm -f o/$(DEPDIR)/read.Po
 	-rm -f o/$(DEPDIR)/reference.Po
 	-rm -f o/$(DEPDIR)/regexpr.Po
@@ -4625,9 +4655,9 @@ uninstall-man: uninstall-man1
 	clean-local clean-my_gcltkPROGRAMS clean-my_unixportLIBRARIES \
 	clean-my_unixportPROGRAMS clean-noinstLIBRARIES \
 	clean-noinstPROGRAMS cscope cscopelist-am ctags ctags-am dist \
-	dist-all dist-bzip2 dist-gzip dist-info dist-lzip dist-shar \
-	dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \
-	distclean-compile distclean-generic distclean-hdr \
+	dist-all dist-bzip2 dist-bzip3 dist-gzip dist-info dist-lzip \
+	dist-shar dist-tarZ dist-xz dist-zip dist-zstd distcheck \
+	distclean distclean-compile distclean-generic distclean-hdr \
 	distclean-local distclean-tags distcleancheck distdir \
 	distuninstallcheck dvi dvi-am html html-am info info-am \
 	install install-am install-binSCRIPTS install-data \
@@ -4778,6 +4808,7 @@ unixport/ansi_gcl: clcs/package.lisp clc
 $(addprefix gcl0/,$(LL_OBJS)): gcl0/%.o : lsp/%.lsp
 $(addprefix gcl0/,$(LC_OBJS)): gcl0/%.o : cmpnew/%.lsp
 gcl0/%.o: | unixport/gcl0
+	rm -f $(@D)/$*.done
 	$| -eval "(mapc 'load (directory \"$(@D)/*.done\"))" -compile $< -o $@
 	[ "$*" = "gcl_c" ] || [ "$*" = "gcl_listlib" ] || \
 		ln -f $@ $$(echo $@ |sed 's,\.o,\.done,g') #FIXME directory link
@@ -4785,6 +4816,7 @@ gcl0/%.o: | unixport/gcl0
 $(addprefix gcl1/,$(LL_OBJS)): gcl1/%.o : lsp/%.lsp
 $(addprefix gcl1/,$(LC_OBJS)): gcl1/%.o : cmpnew/%.lsp
 gcl1/%.o: | unixport/gcl1
+	rm -f $(@D)/$*.done
 	$| -eval "(mapc 'load (directory \"$(@D)/*.done\"))" \
 	   -eval "(setq compiler::*dump-inl-hash* t)" \
 	   -compile $< -o $@
@@ -4874,6 +4906,9 @@ h/cmpincludea.h: $(filter-out gclincl.h,
 		$(CPP) $(AM_CPPFLAGS) -P $(CPPFLAGS) - | \
 		$(AWK) '/^# |^$$|^#pragma/ {next}{print}' > $@
 
+o/qfv.c: o/pre_qfv.c h/new_decl.h bin/c23.awk
+	$(CPP) $(AM_CPPFLAGS) -P $(CPPFLAGS) $< | bin/c23.awk >$@
+
 h/cmpinclude.h: h/mcompdefs.h h/cmpincludea.h h/cmponly_last.h
 	@cat $^ >new_$(@F)
 	@([ -e $@ ] && cmp new_$(@F) $@) || mv -v new_$(@F) $@
--- gcl27-2.7.1.orig/aclocal.m4
+++ gcl27-2.7.1/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.17 -*- Autoconf -*-
+# generated automatically by aclocal 1.18.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf.  I
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002-2024 Free Software Foundation, Inc.
+# Copyright (C) 2002-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@ To do so, use the procedure documented b
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.17'
+[am__api_version='1.18'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.17], [],
+m4_if([$1], [1.18.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.17])dnl
+[AM_AUTOMAKE_VERSION([1.18.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2024 Free Software Foundation, Inc.
+# Copyright (C) 1997-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2024 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2024 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -400,7 +400,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS]
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -500,8 +500,9 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-			     [_AM_PROG_TAR([v7])])])
+  [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+    [_AM_IF_OPTION([tar-v7], [_AM_PROG_TAR([v7])],
+      [_AM_PROG_TAR([ustar])])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
 		  [_AM_DEPENDENCIES([CC])],
@@ -577,7 +578,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -598,7 +599,7 @@ if test x"${install_sh+set}" != xset; th
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2024 Free Software Foundation, Inc.
+# Copyright (C) 2003-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -617,7 +618,7 @@ fi
 rmdir .tst 2>/dev/null
 AC_SUBST([am__leading_dot])])
 
-# Copyright (C) 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -666,7 +667,7 @@ AC_SUBST([lispdir])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -709,7 +710,7 @@ AC_SUBST([am__quote])])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2024 Free Software Foundation, Inc.
+# Copyright (C) 1997-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -743,7 +744,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -772,7 +773,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2024 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -804,7 +805,10 @@ AC_CACHE_CHECK(
       break
     fi
   done
-  rm -f core conftest*
+  # aligned with autoconf, so not including core; see bug#72225.
+  rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \
+    conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \
+    conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM
   unset am_i])
 if test "$am_cv_prog_cc_c_o" != yes; then
    # Losing compiler, so override with the script.
@@ -819,7 +823,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2022-2024 Free Software Foundation, Inc.
+# Copyright (C) 2022-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -835,7 +839,7 @@ AS_IF([(rm -f && rm -fr && rm -rf) 2>/de
 AC_SUBST(am__rm_f_notfound)
 ])
 
-# Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -854,7 +858,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1023,10 +1027,12 @@ am_lf='
 '
 case `pwd` in
   *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_RESULT([no])
     AC_MSG_ERROR([unsafe absolute working directory name]);;
 esac
 case $srcdir in
   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_RESULT([no])
     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 esac
 
@@ -1079,7 +1085,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2024 Free Software Foundation, Inc.
+# Copyright (C) 2009-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1148,9 +1154,13 @@ fi
 # empty being verbose).
 AC_DEFUN([AM_SILENT_RULES],
 [AC_REQUIRE([_AM_SILENT_RULES])
-AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])])
+AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])m4_newline
+dnl We intentionally force a newline after the assignment, since a) nothing
+dnl good can come of more text following, and b) that was the behavior
+dnl before 1.17. See https://bugs.gnu.org/72267.
+])
 
-# Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1178,7 +1188,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2024 Free Software Foundation, Inc.
+# Copyright (C) 2006-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1197,7 +1207,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2024 Free Software Foundation, Inc.
+# Copyright (C) 2004-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1332,7 +1342,7 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-# Copyright (C) 2022-2024 Free Software Foundation, Inc.
+# Copyright (C) 2022-2025 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
--- gcl27-2.7.1.orig/ansi-tests/stable-sort.lsp
+++ gcl27-2.7.1/ansi-tests/stable-sort.lsp
@@ -174,6 +174,9 @@
      i x y z))
   (7 3 2 1) 3 1 2 3)
 
+(deftest stable-sort.order.3
+    (stable-sort "A1A2A3A4A5A6a1a2a3a4a5a6" 'char-lessp)
+  "112233445566AAAAAAaaaaaa")
 
 ;;; Error cases
 
--- /dev/null
+++ gcl27-2.7.1/bin/c23.awk
@@ -0,0 +1,38 @@
+#!/usr/bin/awk -f
+
+/^ *ufixnum *maxargs_for_awk *=/ {gsub("="," ");gsub(";"," ");maxargs=$NF+0;next}
+
+/^ *awk_generated_vc_apply_n_lines;$/ {
+
+    if (!maxargs) {printf("error: maxargs unset\n");exit(-1);}
+   
+    for (n=1;n<=maxargs;n++) {
+	for (m=n;m;m--) {
+	    printf("\n\tcase %d*%d+%d: return ((object(*)(",n,maxargs+1,m);
+            for (i=0;i<m;i++) printf("%sobject",i ? "," : "");
+	    printf(",...))f)(");
+            for (i=0;i<n;i++) printf("%sx[%d]",i ? "," : "",i);
+            printf(");");
+	}
+    }
+    printf("\n");
+    
+    next;
+    
+}
+
+/^ *awk_generated_rc_apply_n_lines;$/ {
+    
+    for (n=0;n<=maxargs;n++) {
+	printf("\n\tcase %d: return ((object(*)(",n);
+	for (i=0;i<n;i++) printf("%sobject",i ? "," : "");
+	printf("))f)(");
+	for (i=0;i<n;i++) printf("%sx[%d]",i ? "," : "",i);
+	printf(");");
+    }
+    printf("\n");
+
+    next;
+}
+
+{print}
--- gcl27-2.7.1.orig/bin/dpp.c
+++ gcl27-2.7.1/bin/dpp.c
@@ -62,6 +62,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#include <stdbool.h>
 
 #include "gclincl.h"
 #include "config.h"
@@ -81,8 +82,6 @@
 #define	TRUE		1
 #define	FALSE		0
 
-typedef int bool;
-
 FILE *in, *out;
 
 char filename[BUFSIZ];
@@ -128,9 +127,8 @@ char *result[MAXRES];
 int nres;
 
 void
-error(s)
-char *s;
-{
+error(char *s) {
+
 	printf("Error in line %d: %s.\n", line, s);
 	exit(0);
 }
@@ -165,9 +163,8 @@ nextc()
 }
 
 void
-unreadc(c)
-int c;
-{
+unreadc(int c) {
+
 	if (c == '\n')
 		--line;
 	else if (c == '\t')
@@ -176,9 +173,8 @@ int c;
 }
 
 void
-put_tabs(n)
-int n;
-{
+put_tabs(int n) {
+
 	int i;
 
 	for (i = 0;  i < n;  i++)
@@ -186,9 +182,8 @@ int n;
 }
 
 void
-pushc(c)
-int c;
-{
+pushc(int c) {
+
 	if (poolp >= &pool[POOLSIZE])
 		error("buffer bool overflow");
 	*poolp++ = c;
--- gcl27-2.7.1.orig/cmpnew/gcl_cmpcall.lsp
+++ gcl27-2.7.1/cmpnew/gcl_cmpcall.lsp
@@ -52,6 +52,75 @@
 (defvar  *use-sfuncall* t)
 (defvar *super-funcall* nil)
 
+;; (defun c2funcall (funob args &optional loc)
+
+;;   (unless (listp args)
+;;     (if *compiler-push-events*
+;; 	(wt-nl "super_funcall(" loc ");")
+;;       (if *super-funcall*
+;; 	  (funcall *super-funcall* loc)
+;; 	(wt-nl "super_funcall_no_event(" loc ");")))
+;;     (unwind-exit 'fun-val)
+;;     (return-from c2funcall nil))
+
+;;   (unless (eq 'ordinary (car funob)) (baboon))
+
+;;   (let* ((fn (caddr funob))
+;; 	 (all (cons fn args))
+;; 	 (*inline-blocks* 0))
+;;     (setq *sup-used* t)
+;;     (unwind-exit 
+;;      (get-inline-loc
+;;       (list (make-list (length all) :initial-element t)
+;; 	    '* #.(flags ans set svt) 
+;; 	    (concatenate 'string
+;; 	    "({object _z,_f=#0;fixnum _v=(fixnum)#v;
+;;         fcall.fun=_f;fcall.valp=_v;fcall.argd=#n-1;
+;;         _z=Rset && !(_f)->fun.fun_argd &&
+;;         fcall.argd>=(_f)->fun.fun_minarg && fcall.argd<=((_f)->fun.fun_maxarg) ?
+;;         "
+;; 	    (if args
+;; 		"(_f)->fun.fun_self(#*)"
+;; 	      "((_f)->fun.fun_maxarg ? (_f)->fun.fun_self(#?) : (_f)->fun.fun_self(#*))")
+;; 	    " : call_proc_cs2(#?);
+;;            if (!(_f)->fun.fun_neval && !(_f)->fun.fun_vv) vs_top=_v ? (object *)_v : sup;
+;;            _z;})")) all))
+;;     (close-inline-blocks)))
+
+;; (defun c2funcall (funob args &optional loc)
+
+;;   (unless (listp args)
+;;     (if *compiler-push-events*
+;; 	(wt-nl "super_funcall(" loc ");")
+;;       (if *super-funcall*
+;; 	  (funcall *super-funcall* loc)
+;; 	(wt-nl "super_funcall_no_event(" loc ");")))
+;;     (unwind-exit 'fun-val)
+;;     (return-from c2funcall nil))
+
+;;   (unless (eq 'ordinary (car funob)) (baboon))
+
+;;   (let* ((fn (caddr funob))
+;; 	 (all (cons fn args))
+;; 	 (*inline-blocks* 0))
+;;     (setq *sup-used* t)
+;;     (unwind-exit 
+;;      (get-inline-loc
+;;       (list (make-list (length all) :initial-element t)
+;; 	    '* #.(flags ans set svt) 
+;; 	    (concatenate 'string
+;; 	    "({object _z,_f=#0;fixnum _v=(fixnum)#v;
+;;         fcall.fun=_f;fcall.valp=_v;fcall.argd=#n-1;
+;;         _z=Rset && !(_f)->fun.fun_argd &&
+;;         fcall.argd>=(_f)->fun.fun_minarg && fcall.argd<=((_f)->fun.fun_maxarg) ?
+;;         ({object _b[]={#*};
+;;           quick_call_function_vec(_f,sizeof(_b)/sizeof(*_b),_b);}) :
+;;         call_proc_cs2(#?);
+;;         if (!(_f)->fun.fun_neval && !(_f)->fun.fun_vv) vs_top=_v ? (object *)_v : sup;
+;;         _z;})")) all))
+;;     (close-inline-blocks)))
+
+
 (defun c2funcall (funob args &optional loc)
 
   (unless (listp args)
@@ -67,24 +136,35 @@
 
   (let* ((fn (caddr funob))
 	 (all (cons fn args))
+	 (la1 (1- (length all)))
 	 (*inline-blocks* 0))
     (setq *sup-used* t)
     (unwind-exit 
      (get-inline-loc
       (list (make-list (length all) :initial-element t)
 	    '* #.(flags ans set svt) 
-	    (concatenate 'string
-	    "({object _z,_f=#0;fixnum _v=(fixnum)#v;
-        fcall.fun=_f;fcall.valp=_v;fcall.argd=#n-1;
-        _z=Rset && !(_f)->fun.fun_argd &&
-        fcall.argd>=(_f)->fun.fun_minarg && fcall.argd<=((_f)->fun.fun_maxarg) ?
-        "
-	    (if args
-		"(_f)->fun.fun_self(#*)"
-	      "((_f)->fun.fun_maxarg ? (_f)->fun.fun_self(#?) : (_f)->fun.fun_self(#*))")
-	    " : call_proc_cs2(#?);
-           if (!(_f)->fun.fun_neval && !(_f)->fun.fun_vv) vs_top=_v ? (object *)_v : sup;
-           _z;})")) all))
+	    (ms
+	    "({object _z,_f=fcall.fun=#0;fixnum _v=fcall.valp=(fixnum)#v;char _n=fcall.argd=#n-1;
+        _n=Rset &&
+            !_f->fun.fun_argd &&
+            _n>=_f->fun.fun_minarg &&
+            _n<=(_f->fun.fun_maxarg) ?
+            _f->fun.fun_minarg-_n : -(MAX_ARGS+1);
+        switch (_n) {
+            case 0: _z=_f->fun.fun_minarg==_f->fun.fun_maxarg ?
+                       (" (gcst la1) "_f->fun.fun_self)(#*) :
+                       (" (gcst (max 1 la1) t) "_f->fun.fun_self)(#?);break;
+            "
+	    (let ((i 0))
+	      (mapcan (lambda (x &aux (j (decf i)))
+			(declare (ignore x))
+			(list "case " (write-to-string j) ": _z=(" (gcst (max 1 (+ j la1)) t) "_f->fun.fun_self)(#?);break;
+            "))
+		      (make-list (max 0 la1))))
+	    "default: _z=call_proc_cs2(#?);break;
+        }
+        if (!_f->fun.fun_neval && !_f->fun.fun_vv) vs_top=_v ? (object *)_v : sup;
+        _z;})")) all))
     (close-inline-blocks)))
 
 
@@ -391,6 +471,63 @@
 
 ;;make a function which will be called hopefully only once,
 ;;and will establish the link.
+
+(defun stub-decl (name args d &optional vp
+		  &aux (i 0))
+  (concatenate
+   'string
+   "static " d " " name ;" LnkT" num
+   "("
+   (apply 'concatenate 'string
+	  (mapcan (lambda (x)
+		    (if (eq x '*)
+			(list ",...")
+			(list (if (plusp i) ","  "")
+			      (rep-type x)
+			      (progn (incf i) (if vp (concatenate 'string "x" (write-to-string i)) "")))))
+		  (if (eq (car args) '*) (cons t args) args)))
+   ")"))
+
+
+(defun stub (num name args type clp
+	     &aux (va (eq '* (car (last args)))) (n (if va 1 0))(i (max n (- (length args) n)));FIXME
+	       (d (declaration-type (rep-type (if (link-arg-p type) type t)))))
+  (concatenate
+   'string
+   (stub-decl (concatenate 'string "LnkT" num) args d t)
+   "{
+      int nargs=" (if va "fcall.argd<0 ? -fcall.argd : fcall.argd" (write-to-string i)) ";
+      object *FOO=alloca(nargs*sizeof(*FOO));
+      "
+
+   (let ((j 0))
+     (apply 'concatenate 'string
+	    (mapcan (lambda (x &aux (sj (write-to-string (incf j))))
+		      (declare (ignore x))
+		      (list "FOO[" sj "-1]=(object)x" sj ";"))
+		    (make-list i))))
+   (when va
+     (concatenate
+      'string
+      "
+      {
+          va_list ap;
+          va_start(ap,x" (write-to-string i) ");
+          int i;
+          for (i=" (write-to-string i) ";i<nargs;i++) FOO[i]=va_arg(ap,object);
+          va_end(ap);
+      }"))
+
+   "
+      return (" d ")call_proc_new23("
+   (vv-str name) ","
+   (if clp "1" "0") ","
+   (write-to-string (argsizes args type 0)) ","
+   "(void **)(void *)&Lnk" num ","
+   (write-to-string (new-proclaimed-argd args type)) ","
+   "FOO);
+}"))
+
 (defun wt-function-link (x)
   (let* ((name (pop x))
 	 (num (pop x))
@@ -400,27 +537,11 @@
 	 (args (pop x))
 	 (clp (pop x)))
     (declare (ignore n))
-    (cond
-      (t
-       ;;change later to include above.
-       ;;(setq type (cdr (assoc type '((t . "object")(:btpr . "bptr")))))
-       (wt-nl1 "static " (declaration-type (rep-type type)) " LnkT" num)
-       (let ((d (declaration-type (rep-type (if (link-arg-p type) type t)))));FIXME
-	 (if (or args (not (eq t type)))
-	     (wt "(object first,...){" d "V1;va_list ap;va_start(ap,first);V1=(" d ")"
-		 "call_proc_new(" (vv-str name) "," (if clp "1" "0") ","
-		 (write-to-string (argsizes args type 0));FIXME
-		 ",(void **)(void *)&Lnk" num "," (new-proclaimed-argd args type)
-		 ",first,ap);va_end(ap);return V1;}")
-	   (wt "(){" d "V1=(" d ")call_proc_new_nval(" (vv-str name) "," (if clp "1" "0") ","
-	       (write-to-string (argsizes args type 0));FIXME
-	       ",(void **)(void *)&Lnk" num "," (new-proclaimed-argd args type)
-	       ",0);return V1;}")))))
+    (wt-nl1)
+    (wt (stub num name args type clp))
     (setq name (function-string name))
     (if (find #\/ name) (setq name (remove #\/ name)))
     (wt " /* " name " */")))
-      
-
 
 ;;For funcalling when the argument is guaranteed to be a compiled-function.
 ;;For (funcall-c he 3 4), he being a compiled function. (not a symbol)!
--- gcl27-2.7.1.orig/cmpnew/gcl_cmpflet.lsp
+++ gcl27-2.7.1/cmpnew/gcl_cmpflet.lsp
@@ -493,7 +493,8 @@
 	 (nm (c-function-name "L" (fun-cfun fun) (fun-name fun)))
 	 (nm (concatenate 'string "(" (rep-type (coerce-to-one-value (cadr sig))) ")" nm))
 	 (clp (when clp (ccb-vs-str (fun-ref-ccb fun))))
-	 (nm (if clp (ms clp "->fun.fun_self") nm))
+	 (als (cdr (mapcan (lambda (x) (list "," (if (eq x '*) "..." "object"))) (car sig))))
+	 (nm (if clp (ms "((object(*)(" als "))" clp "->fun.fun_self)") nm))
 	 (inl (g1 clp nm sig ap clp (if clp -1 (fun-level fun)))))
     `(,(adj-call-tps-max (car sig)) ,(cadr sig)
       ,(if mv (flags rfa svt) (flags rfa))
--- gcl27-2.7.1.orig/cmpnew/gcl_cmpfun.lsp
+++ gcl27-2.7.1/cmpnew/gcl_cmpfun.lsp
@@ -111,23 +111,25 @@
 ;;             stream)
 ;;       (list 'call-global info 'terpri (list stream))))
 
+(defun gcst (n &optional e)
+  (ms "(object(*)(" (cdr (mapcan (lambda (x) (declare (ignore x)) (list "," "object")) (make-list n))) (when e ",...") "))"))
 
 (defun c2apply (funob args)
   (unless (eq 'ordinary (car funob)) (baboon))
   (let* ((fn (caddr funob))
 	 (all (cons fn args))
+	 (la2 (- (length all) 2))
 	 (*inline-blocks* 0))
     (setq *sup-used* t)
     (unwind-exit
      (get-inline-loc
       (list (make-list (length all) :initial-element t)
 	    '* #.(flags ans set svt)
-	    (concatenate
-	     'string
+	    (ms
 	     "({fixnum _v=(fixnum)#v;object _z,_f=(#0),_l=(#1),_ll=_l;
         object _x4=Cnil,_x3=Cnil,_x2=Cnil,_x1=Cnil,_x0=Cnil;
-        char _m=(#n-2),_q=_f->fun.fun_minarg>_m ? _f->fun.fun_minarg-_m : 0;
-        char _n=Rset && !_f->fun.fun_argd ? _q : -1;
+        char _m=(#n-2),_n=Rset && !_f->fun.fun_argd ? _f->fun.fun_minarg-_m : -(MAX_ARGS+1);
+        char _reg=_f->fun.fun_minarg==_f->fun.fun_maxarg;
         fcall.fun=_f;fcall.valp=_v;fcall.argd=-(#n-1);
         switch (_n) {
           case 5: if (_l==Cnil) {_n=-1;break;} _x4=_l->c.c_car;_l=_l->c.c_cdr;
@@ -135,21 +137,30 @@
           case 3: if (_l==Cnil) {_n=-1;break;} _x2=_l->c.c_car;_l=_l->c.c_cdr;
           case 2: if (_l==Cnil) {_n=-1;break;} _x1=_l->c.c_car;_l=_l->c.c_cdr;
           case 1: if (_l==Cnil) {_n=-1;break;} _x0=_l->c.c_car;_l=_l->c.c_cdr;
-          case 0: if (_n+_m+(_l==Cnil ? 0 : 1)>_f->fun.fun_maxarg) _n=-1; else fcall.argd-=_n;
-          default: break;
+          case 0: if (_n+_m+(_l==Cnil ? 0 : 1)>_f->fun.fun_maxarg) _n=-(MAX_ARGS+1); else fcall.argd-=_n;
+          default: if (_m+(_l==Cnil ? 0 : 1)>_f->fun.fun_maxarg) _n=-(MAX_ARGS+1);break;
         }
         switch (_n) {
-          case 5:  _z=_f->fun.fun_self(#*_x4,_x3,_x2,_x1,_x0,_l);break;
-          case 4:  _z=_f->fun.fun_self(#*_x3,_x2,_x1,_x0,_l);break;
-          case 3:  _z=_f->fun.fun_self(#*_x2,_x1,_x0,_l);break;
-          case 2:  _z=_f->fun.fun_self(#*_x1,_x0,_l);break;
-          case 1:  _z=_f->fun.fun_self(#*_x0,_l);break;
-          case 0:  _z="
-	     (if (cdr args)
-		 "_f->fun.fun_self(#*_l)"
-	       "(_f->fun.fun_maxarg ? _f->fun.fun_self(#*_l) : _f->fun.fun_self())")
-	     ";break;
-          default: _z=call_proc_cs2(#*_ll);break;
+          case 5:  _z=_reg ? (" (gcst (+ 5 la2)) "_f->fun.fun_self)(#*_x4,_x3,_x2,_x1,_x0) :
+                             (" (gcst (+ 5 la2) t) "_f->fun.fun_self)(#*_x4,_x3,_x2,_x1,_x0,_l);break;
+          case 4:  _z=_reg ? (" (gcst (+ 4 la2)) "_f->fun.fun_self)(#*_x3,_x2,_x1,_x0) :
+                             (" (gcst (+ 4 la2) t) "_f->fun.fun_self)(#*_x3,_x2,_x1,_x0,_l);break;
+          case 3:  _z=_reg ? (" (gcst (+ 3 la2)) "_f->fun.fun_self)(#*_x2,_x1,_x0) :
+                             (" (gcst (+ 3 la2) t) "_f->fun.fun_self)(#*_x2,_x1,_x0,_l);break;
+          case 2:  _z=_reg ? (" (gcst (+ 2 la2)) "_f->fun.fun_self)(#*_x1,_x0) :
+                             (" (gcst (+ 2 la2) t) "_f->fun.fun_self)(#*_x1,_x0,_l);break;
+          case 1:  _z=_reg ? (" (gcst (+ 1 la2)) "_f->fun.fun_self)(#*_x0) :
+                             (" (gcst (+ 1 la2) t) "_f->fun.fun_self)(#*_x0,_l);break;
+          case 0:  _z=_reg ? (" (gcst (+ 0 la2)) "_f->fun.fun_self)(#*) :
+                             (" (gcst (max 1 (+ 0 la2)) t) "_f->fun.fun_self)(#*_l);break;
+          "
+				 (let ((i 0))
+				   (mapcan (lambda (x)
+					     (declare (ignore x))
+					     (list "case " (write-to-string (decf i)) ": _z=(" (gcst (max 1 (+ i la2)) t) "_f->fun.fun_self)(#*_l);break;
+          "))
+					   (make-list (max 0 la2))))
+          "default: _z=call_proc_cs2(#*_ll);break;
         }
         if (!(_f)->fun.fun_neval && !(_f)->fun.fun_vv) vs_top=_v ? (object *)_v : sup;
         _z;})"))
--- gcl27-2.7.1.orig/cmpnew/gcl_cmpinline.lsp
+++ gcl27-2.7.1/cmpnew/gcl_cmpinline.lsp
@@ -946,8 +946,8 @@
 			   ((eql ch #\n)
 			    (wt (length locs)))
 			   ((or (eql ch #\*) (eql ch #\?))
-			    (let* ((f (char= (char fun (1- i)) #\())
-				   (e (char= (char fun (+ 2 i)) #\)))
+			    (let* ((f (member (char fun (1- i))  '(#\( #\{)))
+				   (e (member (char fun (+ 2 i)) '(#\) #\})))
 				   (locs (nthcdr max locs))
 				   (locs (or locs (when (eql ch #\?) `((fixnum-value nil 0))))))
 			      (dolist (v locs (unless (or f e) (wt ",")))
--- gcl27-2.7.1.orig/cmpnew/gcl_cmpmain.lsp
+++ gcl27-2.7.1/cmpnew/gcl_cmpmain.lsp
@@ -180,12 +180,23 @@
 		(when tem (truename tem))))))
 	 ((setf (car *split-files*) (+ (third *split-files*) section-length))))))
 
+(defun pathname-type-prefix (tp)
+  (if (stringp tp) (subseq tp 0 (1+ (string-match #v"\\.[^\\.]*$" tp))) ""))
+
+(defun compile-file-pathname (pathname &key output-file &allow-other-keys)
+  (declare (optimize (safety 1)))
+  (check-type pathname pathname-designator)
+  (check-type output-file (or null pathname-designator))
+  (or output-file
+      (make-pathname :defaults pathname
+		     :type (strcat (pathname-type-prefix (pathname-type pathname)) "o"))))
+
 (defvar *init-name* nil)
 (defvar *function-filename* nil)
 (defvar *c-debug* nil)
 (defvar *dump-inl-hash* nil)
 (defun compile-file1 (input-pathname
-                      &key (output-file (merge-pathnames ".o" (truename input-pathname)))
+                      &key (output-file (compile-file-pathname (truename input-pathname)))
                            (o-file t)
                            (c-file *default-c-file*)
                            (h-file *default-h-file*)
@@ -242,12 +253,9 @@ Cannot compile ~a.~%" (namestring (merge
    (when (consp *split-files*)
      (file-position *compiler-input* (third *split-files*))
      (setq output-file
-	   (make-pathname :device (pathname-device output-file)
-			  :directory (pathname-directory output-file)
-			  :name (format nil "~a~a"
-					(pathname-name output-file)
-					(length (second *split-files*)))
-			  :type "o")))
+	   (merge-pathnames
+	    (format nil "~a~a" (pathname-name output-file) (length (second *split-files*)))
+	    output-file)))
    
    (with-open-file (s output-file :if-does-not-exist :create))
    (setq *init-name* (init-name output-file t))
@@ -256,16 +264,15 @@ Cannot compile ~a.~%" (namestring (merge
 			       (namestring (truename (pathname *compiler-input*)))))
 
    (let* ((eof (cons nil nil))
-	  (dir    (or (unless (null output-file) (pathname-directory output-file)) (pathname-directory input-pathname)))
-	  (name   (or (unless (null output-file) (pathname-name output-file)) (pathname-name input-pathname)))
-	  (tp     (or (unless (null output-file) (pathname-type output-file)) "o"))
-	  (device (or (unless (null output-file) (pathname-device output-file)) (pathname-device input-pathname)))
-	  (o-pathname (get-output-pathname o-file tp name dir device))
-	  (c-pathname (get-output-pathname c-file "c" name dir device))
-	  (h-pathname (get-output-pathname h-file "h" name dir device))
-	  (data-pathname (get-output-pathname data-file "data" name dir device)))
-
-    (declare (special dir name));FIXME
+	  (device (pathname-device output-file))
+	  (dir (pathname-directory output-file))
+	  (name (pathname-name output-file))
+	  (typ (pathname-type output-file))
+	  (tp (pathname-type-prefix typ))
+	  (o-pathname (get-output-pathname o-file typ name dir device))
+	  (c-pathname (get-output-pathname c-file (strcat tp "c") name dir device))
+	  (h-pathname (get-output-pathname h-file (strcat tp "h") name dir device))
+	  (data-pathname (get-output-pathname data-file (strcat tp "data") name dir device)))
 
     (init-env)
 
--- gcl27-2.7.1.orig/cmpnew/gcl_cmpopt.lsp
+++ gcl27-2.7.1/cmpnew/gcl_cmpopt.lsp
@@ -1162,7 +1162,8 @@
     (setf (get s 'lisp-type) l)))
 
 (dolist (l '((object t)(plist proper-list)(float short-float)(double long-float)
-	     (pack (or null package)) (direl (or keyword null string))))
+	     (pack (or null package)) (direl (or keyword null string))
+	     (dirdir (or (eql :unspecific) proper-list))))
   (let ((s (intern (symbol-name (car l)) 'keyword)))
     (setf (get s 'lisp-type) (cadr l))))
 
--- gcl27-2.7.1.orig/cmpnew/gcl_cmptop.lsp
+++ gcl27-2.7.1/cmpnew/gcl_cmptop.lsp
@@ -179,7 +179,7 @@
 (defun init-name (p &optional sp)
 
   (if sp
-      (let* ((p (truename (merge-pathnames p #p".lsp")))
+      (let* ((p (truename p))
 	     (pn (pathname-name p))
 	     (g (zerop (si::string-match #v"^gcl_" pn))))
 	(dash-to-underscore
@@ -338,19 +338,8 @@
 
       (when (eq type 'proclaimed-closure)
 	(wt-h "static object *Lclptr"num";"))
-      
-      (if (and (not (null type))
-	       (not (eq type 'proclaimed-closure))
-	       (or args (not (eq t type))))
-	  (progn
-	    (wt-h "static " d " LnkT" num "(object,...);")
-	    #-sgi3d (wt-h "static "  d " (*Lnk" num ")() = ("
-			  d "(*)()) LnkT" num ";")
-	    #+sgi3d (wt-h "static "  d " (*Lnk" num ")();"))
-	(progn 
-	  (wt-h "static " d " LnkT" num "();")
-	  #-sgi3d (wt-h "static "  d " (*Lnk" num ")() = LnkT" num ";")
-	  #+sgi3d (wt-h "static "  d " (*Lnk" num ")();"))))))
+      (wt-h (stub-decl (concatenate 'string "LnkT" num) args d) ";")
+      (wt-h (stub-decl (concatenate 'string "(*Lnk" num ")") args d) "=LnkT" num ";"))))
 
 
 ;; this default will be as close to the the decision of the x3j13 committee
@@ -1127,19 +1116,34 @@
     (let ((x (position x +c-global-arg-types+ :test 'type<=)))
       (if x (1+ x) 0))))
 
-(defconstant +max-typed-args+
-  (let ((x (cdr (tp-bnds (cadr (si::sig 'c-function-argd))))))
-    (if (typep x 'fixnum) (1- (truncate (integer-length x) 2)) 0)))
+(defun argd-sz nil
+  (labels ((ff (x) (when (consp x) (if (eq (car x) 'the) (cdr (tp-bnds (cmp-norm-tp (cadr x)))) (or (ff (car x)) (ff (cdr x)))))))
+    (ff (fle 'c-function-argd))))
+
+(defconstant +real-max-typed-args+
+  (labels ((ret-max (x)
+	     (when (consp x)
+	       (if (eq (car x) 'the)
+		   (1- (truncate (integer-length (cdr (tp-bnds (cmp-norm-tp (cadr x))))) 2))
+		   (or (ret-max (car x)) (ret-max (cdr x)))))))
+    (ret-max (fle 'c-function-argd))))
+    
+(defconstant +max-typed-args+ #+pre-gcl 0 #-pre-gcl +real-max-typed-args+)
 
 (defun adj-call-tps-max (tps &aux (i -1))
   (mapcar (lambda (x) (type-or1 (>= (incf i) +max-typed-args+) x)) tps))
 
-(defun new-proclaimed-argd (args return)
-  (do* ((type (f-type return) (f-type (pop args)))
-	(i 0 (+ 2 i))
-	(ans type (logior ans (ash type i))))
-       ((or (>= i #.(ash +max-typed-args+ 1)) (null args))
-	(the (unsigned-byte #.(1+ (ash +max-typed-args+ 1))) ans))))
+(defun new-proclaimed-argd (args return &aux (i 0))
+  (reduce (lambda (y x &aux (j (incf i)))
+	    (if (> j +max-typed-args+) y (logior y (ash (f-type x) (ash j 1)))));FIXME fragile wrt pre-gcl
+	  args :initial-value (f-type return)))
+
+;; (defun new-proclaimed-argd (args return)
+;;   (do* ((type (f-type return) (f-type (pop args)))
+;; 	(i 0 (+ 2 i))
+;; 	(ans type (logior ans (ash type i))))
+;;        ((or (>= i #.(ash +max-typed-args+ 1)) (null args))
+;; 	(the (unsigned-byte #.(ash (1+ +real-max-typed-args+) 1)) ans))))
 
 (defun type-f (x)
   (declare (fixnum x))
--- gcl27-2.7.1.orig/compile
+++ gcl27-2.7.1/compile
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2024-06-19.01; # UTC
+scriptversion=2025-06-18.21; # UTC
 
-# Copyright (C) 1999-2024 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -37,11 +37,11 @@ IFS=" ""	$nl"
 
 file_conv=
 
-# func_file_conv build_file lazy
+# func_file_conv build_file unneeded_conversions
 # Convert a $build file to $host form and store it in $file
 # Currently only supports Windows hosts. If the determined conversion
-# type is listed in (the comma separated) LAZY, no conversion will
-# take place.
+# type is listed in (the comma separated) UNNEEDED_CONVERSIONS, no
+# conversion will take place.
 func_file_conv ()
 {
   file=$1
@@ -51,9 +51,20 @@ func_file_conv ()
 	# lazily determine how to convert abs files
 	case `uname -s` in
 	  MINGW*)
-	    file_conv=mingw
+	    if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
+	      # MSYS2 environment.
+	      file_conv=cygwin
+	    else
+	      # Original MinGW environment.
+	      file_conv=mingw
+	    fi
 	    ;;
-	  CYGWIN* | MSYS*)
+	  MSYS*)
+	    # Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
+	    file_conv=cygwin
+	    ;;
+	  CYGWIN*)
+	    # Cygwin environment.
 	    file_conv=cygwin
 	    ;;
 	  *)
@@ -63,12 +74,14 @@ func_file_conv ()
       fi
       case $file_conv/,$2, in
 	*,$file_conv,*)
+	  # This is the optimization mentioned above:
+	  # If UNNEEDED_CONVERSIONS contains $file_conv, don't convert.
 	  ;;
 	mingw/*)
 	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
 	  ;;
-	cygwin/* | msys/*)
-	  file=`cygpath -m "$file" || echo "$file"`
+	cygwin/*)
+	  file=`cygpath -w "$file" || echo "$file"`
 	  ;;
 	wine/*)
 	  file=`winepath -w "$file" || echo "$file"`
@@ -343,9 +356,9 @@ exit $ret
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp nil t)
 # time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-format: "%Y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
--- gcl27-2.7.1.orig/configure
+++ gcl27-2.7.1/configure
@@ -2996,7 +2996,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 ac_config_headers="$ac_config_headers h/gclincl.h"
 
-am__api_version='1.17'
+am__api_version='1.18'
 
 
 
@@ -3266,10 +3266,14 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
 esac
 
@@ -5476,7 +5480,10 @@ _ACEOF
       break
     fi
   done
-  rm -f core conftest*
+  # aligned with autoconf, so not including core; see bug#72225.
+  rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \
+    conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \
+    conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM
   unset am_i ;;
 esac
 fi
@@ -6703,7 +6710,10 @@ _ACEOF
       break
     fi
   done
-  rm -f core conftest*
+  # aligned with autoconf, so not including core; see bug#72225.
+  rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \
+    conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \
+    conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM
   unset am_i ;;
 esac
 fi
@@ -7182,12 +7192,9 @@ printf "%s\n" "removing $1 from LDFLAGS"
 
 }
 
-add_args_to_cppflags -std=gnu17
-
 add_args_to_cflags  -fsigned-char -pipe -fcommon \
                     -fno-builtin-malloc -fno-builtin-free \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
-	            -std=gnu17 \
 	            -Wall \
 	            -Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
 	            -Wno-unused-but-set-variable -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 \
--- gcl27-2.7.1.orig/configure.ac
+++ gcl27-2.7.1/configure.ac
@@ -270,12 +270,9 @@ remove_arg_from_ldflags() {
 
 }
 
-add_args_to_cppflags -std=gnu17
-
 add_args_to_cflags  -fsigned-char -pipe -fcommon \
                     -fno-builtin-malloc -fno-builtin-free \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
-	            -std=gnu17 \
 	            -Wall \
 	            -Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \
 	            -Wno-unused-but-set-variable -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 \
--- gcl27-2.7.1.orig/depcomp
+++ gcl27-2.7.1/depcomp
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2024-06-19.01; # UTC
+scriptversion=2025-06-18.21; # UTC
 
-# Copyright (C) 1999-2024 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -784,9 +784,9 @@ exit 0
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp nil t)
 # time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-format: "%Y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
--- gcl27-2.7.1.orig/gcl-tk/comm.c
+++ gcl27-2.7.1/gcl-tk/comm.c
@@ -79,8 +79,7 @@ setup_connection_state(int fd)
 
 /* P is supposed to start with a hdr  and run N bytes. */
 static void
-scan_headers(sfd)
-     struct connection_state *sfd;
+scan_headers(struct connection_state *sfd)
 { struct our_header *hdr;
   char *p = sfd->valid_data + sfd->next_packet_offset;
   int n = sfd->valid_data_size - sfd->next_packet_offset;
@@ -118,11 +117,7 @@ send_confirmation(struct connection_stat
 */   
 
 static int
-read1(sfd,p,m,timeout)
-struct connection_state* sfd;     
-char *p;
-int timeout;
-int m;
+read1(struct connection_state* sfd,char *p,int m,int timeout)
 { int nread=0;
   int wanted = m;
   int length;
@@ -217,10 +212,7 @@ static void
 connection_failure(char *);
 
 int
-write1(sfd,p,bytes)
-     struct connection_state *sfd;
-     const char *p;
-     int bytes;
+write1(struct connection_state *sfd,const char *p,int bytes)
 { 
   int bs;
   int to_send = bytes;
--- gcl27-2.7.1.orig/gcl-tk/guis.c
+++ gcl27-2.7.1/gcl-tk/guis.c
@@ -93,7 +93,7 @@ int fDebugSockets;
 
 int hdl = -1;
 
-void TkX_Wish ();
+void TkX_Wish (int,char *[]);
 
 pid_t parent;
  
@@ -335,11 +335,7 @@ char *envp[];
 }
 
 struct connection_state *
-sock_connect_to_name(host_id,  name, async)
-     char *host_id;
-     int name;
-     int async;
-     
+sock_connect_to_name(char *host_id,int  name,int async)
 {
   struct sockaddr_in addr;
   int fd, n, rc;
@@ -360,8 +356,7 @@ sock_connect_to_name(host_id,  name, asy
 }
 
 void
-sock_close_connection(sfd)
-struct connection_state *sfd;     
+sock_close_connection(struct connection_state *sfd)
 {
   close( sfd->fd );
   free(sfd->read_buffer);
@@ -387,16 +382,8 @@ struct connection_state *sfd;
 static int message_id;
 
 int
-sock_write_str2( sfd, type, hdr,
-		hdrsize,text, length )
-
-struct connection_state *sfd;
-enum mtype type;
- char *hdr;
-int hdrsize;
-const char *text;
-int length;
-     
+sock_write_str2(struct connection_state *sfd,enum mtype type,char *hdr,
+		int hdrsize,const char *text,int length )
 {
   char buf[0x1000];
   char *p = buf;
@@ -447,10 +434,7 @@ int length;
 
 
 struct message_header *
-guiParseMsg1(sfd,buf,bufleng)
-  char *buf;
-int bufleng;
-struct connection_state *sfd;
+guiParseMsg1(struct connection_state *sfd,char *buf,int bufleng)
 { int m;
   int body_length;
   int tot;
@@ -489,12 +473,10 @@ error(s)
 }
 
 void
-write_timeout_error(s)
-     char *s;
+write_timeout_error(char *s)
 { fprintf(stderr,"write timeout: %s",s); abort();
 }
 void
-connection_failure(s)
-     char *s;
+connection_failure(char *s)
 { fprintf(stderr,"connection_failure:%s",s); abort();
 }
--- gcl27-2.7.1.orig/gcl-tk/guis.h
+++ gcl27-2.7.1/gcl-tk/guis.h
@@ -70,14 +70,14 @@ typedef struct _guiMsg {
 */
 
 #include "sheader.h"
-struct message_header * guiParseMsg1();
+struct message_header *guiParseMsg1(struct connection_state *,char *,int);
 
 
 extern pid_t parent;
 
-struct connection_state *
-sock_connect_to_name();
-void sock_close_connection( );
+struct connection_state *sock_connect_to_name(char *,int,int);
+void sock_close_connection(struct connection_state *);
+
 int sock_read_str();
 
 guiMsg *guiParseMsg();
--- gcl27-2.7.1.orig/gcl-tk/sheader.h
+++ gcl27-2.7.1/gcl-tk/sheader.h
@@ -109,4 +109,4 @@ extern struct connection_state *dsfd;
 #define OBJ_TO_CONNECTION_STATE(x) \
   ((struct connection_state *)(void *)((x)->ust.ust_self))
 
-struct connection_state * setup_connection_state();
+struct connection_state * setup_connection_state(int);
--- gcl27-2.7.1.orig/gcl-tk/tkAppInit.c
+++ gcl27-2.7.1/gcl-tk/tkAppInit.c
@@ -61,8 +61,7 @@ int *tclDummyMainPtr = (int *) main;
  */
 
 int
-Tcl_AppInit(interp)
-    Tcl_Interp *interp;		/* Interpreter for application. */
+Tcl_AppInit(Tcl_Interp *interp)/* Interpreter for application. */
 {
     Tk_Window mmain;
 /*
--- gcl27-2.7.1.orig/gcl-tk/tkMain.c
+++ gcl27-2.7.1/gcl-tk/tkMain.c
@@ -57,8 +57,9 @@
 #include <sys/types.h>
 #include <signal.h>
 #include <errno.h>
+#include <stdbool.h>
 
-int writable_malloc=0; /*FIXME, don't wrap fopen here, exclude notcomp.h or equivalent */
+bool writable_malloc=0; /*FIXME, don't wrap fopen here, exclude notcomp.h or equivalent */
 
 #include "guis.h"
 struct connection_state *dsfd;
@@ -128,8 +129,7 @@ dfprintf(FILE *fp,char *s,...) {
 #define SIGNAL_ERROR TCL_signal_error
 
 static void
-TCL_signal_error(x)
-     char *x;
+TCL_signal_error(char *x)
 {char buf[300] ;
   snprintf(buf,sizeof(buf),"error %s",x);
  Tcl_Eval(interp,buf);
@@ -196,9 +196,7 @@ EXTERN Tk_Window	TkCreateMainWindow _ANS
 				char * screenName, char * baseName));
 
 void
-TkX_Wish (argc, argv)
-    int argc;				/* Number of arguments. */
-    char **argv;			/* Array of argument strings. */
+TkX_Wish (int argc,char **argv)
 {
     char *args, *p;
     const char *msg;
@@ -402,18 +400,11 @@ static char *being_set_by_lisp;
 
 static char *
 tell_lisp_var_changed(
-                clientData,
-               interp,
-               name1,
-               name2,
-                flags)
-
-          ClientData clientData;
-               Tcl_Interp *interp;
-               char *name1;
-               char *name2;
-               int flags;     
-     
+                ClientData clientData,
+               Tcl_Interp *interp,
+               const char *name1,
+               const char *name2,
+                int flags)
 {
 
   if (being_set_by_lisp == 0)
@@ -459,9 +450,7 @@ tell_lisp_var_changed(
 
     /* ARGSUSED */
 static void
-StdinProc(clientData, mask)
-     ClientData clientData;		/* Not used. */
-     int mask;				/* Not used. */
+StdinProc(ClientData clientData,int mask)
 {
   int fNotDone;
   char *cmd;
@@ -606,13 +595,9 @@ typedef struct _ClientDataLispObject {
 } ClientDataLispObject;
 
 static int
-TclGenericCommandProcedure( clientData,
-			   pinterp,
-			    argc, argv)
-     ClientData clientData;
-     Tcl_Interp *pinterp;
-     int argc;
-     char *argv[];
+TclGenericCommandProcedure(ClientData clientData,
+			   Tcl_Interp *pinterp,
+			    int argc,const char **argv)
 {
   char szCmd[CMD_SIZE];
   ClientDataLispObject *pcdlo = (ClientDataLispObject *)clientData;
@@ -623,7 +608,7 @@ TclGenericCommandProcedure( clientData,
   STORE_3BYTES(q,(pcdlo->iSlot));
   q += 3;
   if (p == 0)
-    { char *arg = (argc > 1 ? argv[1] : "");
+    { const char *arg = (argc > 1 ? argv[1] : "");
       int m = strlen(arg);
       if (m > CMD_SIZE -50)
 	SIGNAL_ERROR("too big command");
@@ -663,8 +648,7 @@ TclGenericCommandProcedure( clientData,
 
 
 static void
-guiCreateCommand( idLispObject,  iSlot , arglist)
-     int idLispObject; int iSlot ; char *arglist;
+guiCreateCommand(int idLispObject,int iSlot,char *arglist)
 {
   char szNameCmdProc[2000],*c;
   ClientDataLispObject *pcdlo;
--- gcl27-2.7.1.orig/git.tag
+++ gcl27-2.7.1/git.tag
@@ -1,2 +1,2 @@
-"Version_2_7_2pre7"
+"Version_2_7_2pre8"
 
--- gcl27-2.7.1.orig/git_touch
+++ gcl27-2.7.1/git_touch
@@ -1,7 +1,15 @@
 #!/bin/bash
 
-touch aclocal.m4 \
-      configure.ac gcl-tk/gcltksrv.in bin/gcl.in unixport/init_raw.lsp.in h/gclincl.h.in \
+SLEEP=$1
+
+for i in  \
+      configure.ac aclocal.m4 gcl-tk/gcltksrv.in bin/gcl.in unixport/init_raw.lsp.in h/gclincl.h.in \
       configure \
       Makefile.am Makefile.in \
-      info/gcl.info info/gcl-si.info info/gcl-tk.info info/gcl-dwdoc.info
+      info/gcl.info info/gcl-si.info info/gcl-tk.info info/gcl-dwdoc.info ; do
+    touch $i
+    if [ "$SLEEP" != "" ] ; then
+	echo $i
+	sleep $SLEEP
+    fi
+done
--- gcl27-2.7.1.orig/h/att_ext.h
+++ gcl27-2.7.1/h/att_ext.h
@@ -144,7 +144,6 @@ EXTER object FASL_string;
 /*  frame.c  */
 
 /*  gbc.c  */
-EXTER bool GBC_enable;
 
 #ifdef CAN_UNRANDOMIZE_SBRK
 EXTER bool gcl_unrandomized;
@@ -418,4 +417,4 @@ EXTER object sSPmemory;
 EXTER object sSPinit;
 
 /* string.d */
-int  (*casefun)();
+int  (*casefun)(int,int *);
--- gcl27-2.7.1.orig/h/cmponly_last.h
+++ gcl27-2.7.1/h/cmponly_last.h
@@ -5,3 +5,6 @@
 /* #undef _setjmp */
 /* #define _setjmp ((int(*)(void *))dlsetjmp) */
 /* #endif */
+
+int setjmp(void *);
+int _setjmp(void *);
--- gcl27-2.7.1.orig/h/compdefs.h
+++ gcl27-2.7.1/h/compdefs.h
@@ -93,3 +93,5 @@ aref1
 OBJ_ALIGNED_STACK_ALLOC(x)
 NO_RETURN
 CHAR_SIZE
+MAX_ARGS
+bool
--- gcl27-2.7.1.orig/h/compprotos.h
+++ gcl27-2.7.1/h/compprotos.h
@@ -16,9 +16,8 @@ int number_zerop(object);
 long int fixint(object);
 object alloc_object(enum type);
 object call_proc_cs2(object,...);
-object call_proc_new(object,ufixnum,ufixnum,void **,ufixnum,object,va_list);
-object call_proc_new_nval(object,ufixnum,ufixnum,void **,ufixnum,object,...);
-object coerce_to_string();
+object call_proc_new23(object,ufixnum,ufixnum,void **,ufixnum,object *);
+object coerce_to_string(object);
 object fixnum_big_shift(fixnum,fixnum);
 object fixnum_times(fixnum,fixnum);
 object fSgensym0(void);
@@ -102,6 +101,4 @@ object file_stream(object);
 fixnum fixnum_expt(fixnum, fixnum);
 char *gcl_gets(char *,int);
 int gcl_puts(const char *);
-int setjmp();
-int _setjmp();
 char *object_to_string(object);
--- gcl27-2.7.1.orig/h/error.h
+++ gcl27-2.7.1/h/error.h
@@ -99,7 +99,7 @@ object ihs_top_function_name(ihs_ptr h);
                                                  sKformat_control,make_simple_string(a_),sKformat_arguments,list(1,(b_)))
 #define FEtoo_few_arguments(a_,b_) \
   Icall_error_handler(sLprogram_error,null_string,4,\
-                      sKformat_control,make_simple_string("~S [or a callee] requires more than ~R argument~:p."),\
+                      sKformat_control,make_simple_string("~S [or a callee] requires less than ~R argument~:p."),\
                       sKformat_arguments,list(2,ihs_top_function_name(ihs_top),make_fixnum((b_)-(a_))))
 #define FEwrong_no_args(a_,b_) \
   Icall_error_handler(sLprogram_error,null_string,4,\
@@ -112,7 +112,7 @@ object ihs_top_function_name(ihs_ptr h);
 
 #define FEtoo_many_arguments(a_,b_) \
   Icall_error_handler(sLprogram_error,null_string,4,\
-                      sKformat_control,make_simple_string("~S [or a callee] requires less than ~R argument~:p."),\
+                      sKformat_control,make_simple_string("~S [or a callee] requires more than ~R argument~:p."),\
                       sKformat_arguments,list(2,ihs_top_function_name(ihs_top),make_fixnum((b_)-(a_))))
 #define FEtoo_many_argumentsF(a_) \
   Icall_error_handler(sLprogram_error,null_string,4,\
--- gcl27-2.7.1.orig/h/linux.h
+++ gcl27-2.7.1/h/linux.h
@@ -165,7 +165,7 @@ do { int c = 0; \
 #else
 
 #define FPE_TCODE(x_) \
-  {ufixnum _x=(x_),_y=0;			\
+  ({ufixnum _x=(x_),_y=0;			\
    switch(_x) {					\
    case FPE_FLTINV: _y=FE_INVALID;break;	\
    case FPE_FLTDIV: _y=FE_DIVBYZERO;break;	\
@@ -174,7 +174,7 @@ do { int c = 0; \
    case FPE_FLTRES: _y=FE_INEXACT;break;	\
    }						\
    _y;						\
-  }
+  })
 #define FPE_CODE(i_,v_) make_fixnum(FPE_TCODE((fixnum)SF(i_)->si_code))
 #define FPE_ADDR(i_,v_) make_fixnum((fixnum)SF(i_)->si_addr)
 #define FPE_CTXT(v_) Cnil
--- gcl27-2.7.1.orig/h/lu.h
+++ gcl27-2.7.1/h/lu.h
@@ -47,6 +47,7 @@ typedef void   (*vfunc)();
 typedef object integer;
 typedef object keyword;
 typedef object direl;
+typedef object dirdir;
 typedef object plist;
 typedef object pack;
 typedef object real;
@@ -57,8 +58,7 @@ typedef float  shortfloat;
 typedef double longfloat;
 typedef float  complex fcomplex;
 typedef double complex dcomplex;
-#undef bool
-typedef int bool;
+#include <stdbool.h>
 typedef unsigned short int ushort;
 typedef unsigned int uint;
 
@@ -462,7 +462,7 @@ struct pathname {
 
   direl  pn_host;      /*  host  */
   direl  pn_device;    /*  device  */
-  plist  pn_directory; /*  directory  */
+  dirdir pn_directory; /*  directory  */
   direl  pn_name;      /*  name  */
   direl  pn_type;      /*  type  */
   direl  pn_version;   /*  version  */
--- gcl27-2.7.1.orig/h/notcomp.h
+++ gcl27-2.7.1/h/notcomp.h
@@ -10,7 +10,7 @@
 
 
 EXTER int *cs_org;     
-EXTER int GBC_enable;
+EXTER bool GBC_enable;
 
 #define CHAR_SIZE 8
 EXTER object sSAnotify_gbcA;
@@ -20,7 +20,7 @@ EXTER int interrupt_flag,interrupt_enabl
 /* void sigint(),sigalrm(); */
 
 
-EXTER int gc_enabled, saving_system;
+EXTER bool gc_enabled, saving_system;
 
 EXTER object lisp_package,user_package;
 EXTER char *core_end;
--- gcl27-2.7.1.orig/h/protoize.h
+++ gcl27-2.7.1/h/protoize.h
@@ -366,7 +366,7 @@ object funcall_vec(object,fixnum,object
 /* unixtime.c:173:OF */ extern void gcl_init_unixtime (void); /* () */
 /* user_init.c:2:OF */ extern object user_init (void); /* () */
 /* user_init.c:2:OF */ extern int user_match (const char *,int n); /* () */
-/* usig.c:49:OF */ extern void gcl_signal (int signo, void (*handler) (/* ??? */)); /* (signo, handler) int signo; void (*handler)(); */
+/* usig.c:49:OF */ extern void gcl_signal (int signo, void (*handler)(int,long,void *,char *)); /* (signo, handler) int signo; void (*handler)(); */
 /* usig.c:92:OF */ extern int unblock_signals (int n, int m); /* (n, m) int n; int m; */
 /* usig.c:119:OF */ extern void unblock_sigusr_sigio (void); /* () */
 /* usig.c:182:OF */ extern void install_default_signals (void); /* () */
@@ -1674,3 +1674,6 @@ void stack_list(void);
 void *msbrk(intptr_t);
 int msbrk_init(void);
 int msbrk_end(void);
+
+object
+quick_call_function_vec(object,ufixnum,object *);
--- gcl27-2.7.1.orig/h/usig.h
+++ gcl27-2.7.1/h/usig.h
@@ -1,4 +1,4 @@
-typedef void (*handler_function_type)(int,siginfo_t *,void *);
+typedef void (*handler_function_type)(int,long,void *,char *);
 
 EXTER handler_function_type our_signal_handler[32];
 
--- gcl27-2.7.1.orig/install-sh
+++ gcl27-2.7.1/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2024-06-19.01; # UTC
+scriptversion=2025-06-18.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -533,9 +533,9 @@ do
 done
 
 # Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp nil t)
 # time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-format: "%Y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
--- gcl27-2.7.1.orig/lsp/gcl_deftype.lsp
+++ gcl27-2.7.1/lsp/gcl_deftype.lsp
@@ -6,7 +6,7 @@
 	  non-negative-short-float negative-long-float positive-long-float
 	  non-positive-long-float non-negative-long-float negative-float
 	  positive-float non-positive-float non-negative-float negative-real
-	  positive-real non-positive-real non-negative-real complex*
+	  positive-real non-positive-real non-negative-real complex* pathname-designator
 	  complex-integer complex-integer-ratio complex-ratio-integer seqind seqbnd
 	  complex-ratio complex-short-float complex-long-float make-complex unordered));FIXME
 
--- gcl27-2.7.1.orig/lsp/gcl_directory.lsp
+++ gcl27-2.7.1/lsp/gcl_directory.lsp
@@ -49,11 +49,16 @@
 			       (expand-wild-directory d (cons :relative (cdr x)) f q e)) :directory));FIXME
 	    ((funcall f z y))))))
 
-(defun directory (p &key &aux (p (translate-logical-pathname p))(d (pathname-directory p))
-		    (c (unless (eq (car d) :absolute) (make-frame (namestring *current-directory*))))
-		    (lc (when c (length c)))
-		    (filesp (or (pathname-name p) (pathname-type p)))
-		    (v (compile-regexp (to-regexp p)))(*up-key* :back) r)
+(defun directory (p &key &aux (p (merge-pathnames (translate-logical-pathname p)
+						  #.`(load-time-value
+						      (make-pathname
+						       ,@(mapcan (lambda (x) (list x (if (eq x :directory) `'(:relative) :unspecific)))
+								 +pathname-keys+)))))
+			   (d (pathname-directory p))
+			   (c (unless (eq (car d) :absolute) (make-frame (namestring *current-directory*))))
+			   (lc (when c (length c)))
+			   (filesp (or (pathname-name p) (pathname-type p)))
+			   (v (compile-regexp (to-regexp p)))(*up-key* :back) r)
   (expand-wild-directory (pathname-device p) d
    (lambda (dir exp &aux (pexp (pathname (if c (vector-push-string c exp 0 lc) exp))))
      (if filesp
--- gcl27-2.7.1.orig/lsp/gcl_logical_pathname_translations.lsp
+++ gcl27-2.7.1/lsp/gcl_logical_pathname_translations.lsp
@@ -24,5 +24,5 @@
     (error "No translations found for ~s" k)))
 
 (defun logical-pathname-host-p (host)
-  (when host
+  (when (stringp host)
     (logical-pathname-translations host)))
--- gcl27-2.7.1.orig/lsp/gcl_make_pathname.lsp
+++ gcl27-2.7.1/lsp/gcl_make_pathname.lsp
@@ -47,7 +47,8 @@
 
 (defconstant +physical-pathname-defaults+ '(("" "" "" "")
 					    ("" "" "" "")
-					    ("" "(/?([^/]+/)*)" "" "" "" "([^/]+/)" "/" "/")
+					    ("" "(/?([^/]*/)*)" "" "" "" "([^/]*/)" "/" "/")
+;					    ("" "(/?([^/]+/)*)" "" "" "" "([^/]+/)" "/" "/")
 					    ("" "([^/.]*)" "" ".")
 					    ("." "(\\.[^/]*)?" "" "")
 					    ("" "" "" "")))
@@ -88,7 +89,8 @@
       ((eql :wild) (if rp (list dflt) (elsub "*" x rp lp)))
       ((eql :newest) (elsub (if rp "(newest|NEWEST)" "NEWEST") x rp lp))
       ((member :up :back) (elsub ".." x rp lp))
-      ((member nil :unspecific) (when rp (list dflt)))
+      (null (when rp (list dflt)))
+      ((eql :unspecific) nil)
       (cons (cons
 	     (if (eq (car el) :absolute) (if lp "" "/") (if lp ";" ""))
 	     (mapcan (lambda (z) (elsub z y rp lp)) (cdr el)))))
@@ -103,15 +105,17 @@
 		 x (if lp +logical-pathname-defaults+ +physical-pathname-defaults+))))
 
 (defun directory-list-check (l)
-  (when (listp l)
-    (when (member (car l) '(:absolute :relative))
-      (mapl (lambda (x &aux (c (car x))(d (cadr x)))
-	      (when (and (member d '(:up :back)) (member c '(:absolute :wild-inferiors)))
-		(return-from directory-list-check nil))) l))))
+  (if (atom l) l
+      (when (member (car l) '(:absolute :relative))
+	(mapl (lambda (x &aux (c (car x))(d (cadr x)))
+		(when (and (member d '(:up :back)) (member c '(:absolute :wild-inferiors)))
+		  (return-from directory-list-check nil)))
+	      l))))
     
 (defun canonicalize-pathname-directory (l)
   (cond ((eq l :wild) (canonicalize-pathname-directory '(:absolute :wild-inferiors)))
 	((stringp l) (canonicalize-pathname-directory (list :absolute l)))
+	((eq l :unspecific) l)
 	((mapl (lambda (x &aux (c (car x))
 			    (skip (cond ((equal c ".") (cdr x))
 					((when (or (stringp c) (eq c :wild)) (eq (cadr x) :back)) (cddr x)))))
--- gcl27-2.7.1.orig/lsp/gcl_merge_pathnames.lsp
+++ gcl27-2.7.1/lsp/gcl_merge_pathnames.lsp
@@ -11,7 +11,7 @@
      :host (or (pathname-host pn) (def (pathname-host def-pn)))
      :device (or (pathname-device pn) (def (pathname-device def-pn)))
      :directory (let ((d (pathname-directory pn))(defd (pathname-directory def-pn)))
-		  (or (def (when (and defd (eq (car d) :relative)) (append defd (cdr d)))) d (def defd)))
+		  (or (def (when (and defd (listp d) (listp defd) (eq (car d) :relative)) (append defd (cdr d)))) d (def defd)))
      :name (or (pathname-name pn) (def (pathname-name def-pn)))
      :type (or (pathname-type pn) (def (pathname-type def-pn)))
      :version (or (pathname-version pn) (def (unless (pathname-name pn) (pathname-version def-pn))) (def def-v))
--- gcl27-2.7.1.orig/lsp/gcl_mislib.lsp
+++ gcl27-2.7.1/lsp/gcl_mislib.lsp
@@ -104,9 +104,6 @@
   (decode-universal-time (get-universal-time)))
 
 ;Courtesy Paul Dietz
-(defun compile-file-pathname (pathname)
-  (declare (optimize (safety 2)))
-  (make-pathname :defaults pathname :type "o"))
 
 (defun constantly (x)
   (declare (optimize (safety 2)))
--- gcl27-2.7.1.orig/lsp/gcl_seqlib.lsp
+++ gcl27-2.7.1/lsp/gcl_seqlib.lsp
@@ -384,17 +384,17 @@
 		  (push ns ii) (push ns1 ii))
 		(setq ls nls fi nfi))))))))
 
-
 (defun stable-sort (sequence predicate &key key)
   (declare (optimize (safety 1)))
   (check-type sequence proper-sequence)
-  (typecase 
-   sequence
-   (list (list-merge-sort sequence predicate key))
-   (string (sort sequence predicate :key key))
-   (bit-vector (sort sequence predicate :key key))
-   (otherwise 
-    (replace sequence (list-merge-sort (coerce sequence 'list) predicate key)))))
+  (if (listp sequence)
+      (list-merge-sort sequence predicate key)
+      (let (r rp)
+	(dotimes (i (length sequence))
+	  (let ((tmp (cons (aref sequence i) nil)))
+	    (declare (dynamic-extent tmp))
+	    (setq rp (if rp (cdr (rplacd rp tmp)) (setq r tmp)))))
+	(replace sequence (list-merge-sort r predicate key)))))
 
 (eval-when (compile eval)
   (defmacro f+ (x y) `(the fixnum (+ (the fixnum ,x) (the fixnum ,y))))
--- gcl27-2.7.1.orig/missing
+++ gcl27-2.7.1/missing
@@ -1,11 +1,11 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU and other programs.
 
-scriptversion=2024-06-07.14; # UTC
+scriptversion=2025-06-18.21; # UTC
 
 # shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells
 
-# Copyright (C) 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -228,9 +228,9 @@ give_advice "$1" | sed -e '1s/^/WARNING:
 exit $st
 
 # Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp nil t)
 # time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-format: "%Y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
--- gcl27-2.7.1.orig/o/character.d
+++ gcl27-2.7.1/o/character.d
@@ -108,9 +108,8 @@ Foundation, 675 Mass Ave, Cambridge, MA
 	If r > 36 or i is not a digit, -1 is returned.
 */
 int
-digitp(i, r)
-int i, r;
-{
+digitp(int i,int r) {
+
 	if ('0' <= i && i <= '9' && 1 < r && i < '0' + r)
 		return(i - '0');
 	if ('A' <= i && 10 < r && r <= 36 && i < 'A' + (r - 10))
@@ -149,9 +148,8 @@ int i, r;
 @)
 
 bool
-char_eq(x, y)
-object x, y;
-{
+char_eq(object x,object y) {
+
 	return(char_code(x) == char_code(y)
 	    && char_bits(x) == char_bits(y)
 	    && char_font(x) == char_font(y));
@@ -186,9 +184,8 @@ object x, y;
 
 
 static int
-char_cmp(x, y)
-object x, y;
-{
+char_cmp(object x,object y) {
+
 	if (char_font(x) < char_font(y))
 		return(-1);
 	if (char_font(x) > char_font(y))
@@ -205,9 +202,8 @@ object x, y;
 }
 
 static void
-Lchar_cmp(s, t)
-int s, t;
-{
+Lchar_cmp(int s,int t) {
+
 	int narg, i;
 
 	narg = vs_top - vs_base;
@@ -232,9 +228,8 @@ LFD(Lchar_ge)() { Lchar_cmp(-1, 0); }
 
 
 bool
-char_equal(x, y)
-object x, y;
-{
+char_equal(object x,object y) {
+
 	int i, j;
 
 	i = char_code(x);
@@ -273,9 +268,8 @@ object x, y;
 
 
 static int
-char_compare(x, y)
-object x, y;
-{
+char_compare(object x,object y) {
+
 	int i, j;
 
 	i = char_code(x);
@@ -293,9 +287,8 @@ object x, y;
 }
 
 static void
-Lchar_compare(s, t)
-int s, t;
-{
+Lchar_compare(int s,int t) {
+
 	int narg, i;
 
 	narg = vs_top - vs_base;
@@ -320,9 +313,8 @@ LFD(Lchar_not_lessp)()    { Lchar_compar
 
 
 object
-coerce_to_character(x)
-object x;
-{
+coerce_to_character(object x) {
+
 BEGIN:
 	switch (type_of(x)) {
 	case t_fixnum:
@@ -408,9 +400,8 @@ BEGIN:
 @)
 
 int
-digit_weight(w, r)
-int w, r;
-{
+digit_weight(int w,int r) {
+
 	if (r < 2 || r > 36 || w < 0 || w >= r)
 		return(-1);
 	if (w < 10)
--- gcl27-2.7.1.orig/o/cmac.c
+++ gcl27-2.7.1/o/cmac.c
@@ -55,9 +55,9 @@ dblrem(int a, int b, int mod)
 #else
 
 static int
-dblrem(a,b,mod)
-int a,b,mod;
-{int h,sign;
+dblrem(int a,int b,int mod) {
+
+ int h,sign;
  if (a<0) 
    {a= -a; sign= (b<0)? (b= -b,1) :-1;}
  else { sign= (b<0) ? (b= -b,-1) : 1;}
--- gcl27-2.7.1.orig/o/eval.c
+++ gcl27-2.7.1/o/eval.c
@@ -66,15 +66,6 @@ object sSAbreak_stepA;
   ({enum ftype _t=type;\
      _t==f_object ? a : (_t==f_fixnum ? make_fixnum((fixnum)a) : make_integer((GEN)a));})
 
-#include "apply_n.h"
-
-static object
-quick_call_function_vec(object fun,ufixnum n,object *b) {
-
-  return c_apply_n_fun(fun,n,b);
-
-}
-
 static object
 quick_call_function_vec_coerce(object fun,ufixnum n,object *b) {
 
@@ -704,7 +695,7 @@ APPLICATION:
 		ihs_check;
 		ihs_push(form);
 		ihs_top->ihs_base = lex_env;
-		((void (*)())fun->s.s_sfdef)(MMcdr(form));
+		((void (*)(object))fun->s.s_sfdef)(MMcdr(form));
 		CHECK_AVMA;
 		ihs_pop();
 		return;
--- gcl27-2.7.1.orig/o/fasdump.c
+++ gcl27-2.7.1/o/fasdump.c
@@ -29,7 +29,7 @@ static void
 clrhash(object);
 
 
-object coerce_stream();
+object coerce_stream(object,int);
 static object fasd_patch_sharp(object x, int depth);
 object make_pathname ();
 
--- gcl27-2.7.1.orig/o/file.d
+++ gcl27-2.7.1/o/file.d
@@ -106,9 +106,7 @@ object LSP_string;
 object sSAignore_eof_on_terminal_ioA;
 
 static bool
-feof1(fp)
-FILE *fp;
-{
+feof1(FILE *fp) {
 
 #ifdef USE_READLINE
   if (readline_on && fp==rl_instream && rl_line_buffer && *rl_line_buffer==EOF)
@@ -199,9 +197,8 @@ DEFUN("TERMINAL-INPUT-STREAM-P",object,f
 	but only checks the mode of the stream (sm_mode).
 */
 static bool
-input_stream_p(strm)
-object strm;
-{
+input_stream_p(object strm) {
+
 BEGIN:
 	switch (strm->sm.sm_mode) {
 	case smm_input:
@@ -256,9 +253,8 @@ BEGIN:
 	but only checks the mode of the stream (sm_mode).
 */
 static bool
-output_stream_p(strm)
-object strm;
-{
+output_stream_p(object strm) {
+
 BEGIN:
 	switch (strm->sm.sm_mode) {
 	case smm_input:
@@ -306,9 +302,8 @@ BEGIN:
 }
 
 static object
-stream_element_type(strm)
-object strm;
-{
+stream_element_type(object strm) {
+
 	object x;
 
 BEGIN:
@@ -656,9 +651,8 @@ fLinteractive_stream_p(object x) {
 #endif
 
 object
-make_two_way_stream(istrm, ostrm)
-object istrm, ostrm;
-{
+make_two_way_stream(object istrm,object ostrm) {
+
 	object strm;
 
 	strm = alloc_object(t_stream);
@@ -673,9 +667,8 @@ object istrm, ostrm;
 }
 
 static object
-make_echo_stream(istrm, ostrm)
-object istrm, ostrm;
-{
+make_echo_stream(object istrm,object ostrm) {
+
 	object strm;
 
 	strm = make_two_way_stream(istrm, ostrm);
@@ -764,9 +757,8 @@ DEFUN("STRING-OUTPUT-STREAM-P",object,fS
 }
 
 object
-make_string_output_stream(line_length)
-int line_length;
-{
+make_string_output_stream(int line_length) {
+
 	object strng, strm;
 	vs_mark;
 
@@ -786,9 +778,8 @@ int line_length;
 }
 
 static object
-get_output_stream_string(strm)
-object strm;
-{
+get_output_stream_string(object strm) {
+
 	object strng;
 
 	strng = copy_simple_string(STRING_STREAM_STRING(strm));
@@ -803,9 +794,8 @@ cannot_read(object);
 static void
 closed_stream(object);
 int
-readc_stream(strm)
-object strm;
-{
+readc_stream(object strm) {
+
 	int c;
 
 BEGIN:
@@ -1515,9 +1505,8 @@ BEGIN:
 }
 
 int
-file_position(strm)
-object strm;
-{
+file_position(object strm) {
+
 BEGIN:
 	switch (strm->sm.sm_mode) {
 	case smm_input:
@@ -1564,10 +1553,8 @@ BEGIN:
 }
 
 int
-file_position_set(strm, disp)
-object strm;
-int disp;
-{
+file_position_set(object strm,int disp) {
+
 BEGIN:
 	switch (strm->sm.sm_mode) {
 	case smm_socket:
@@ -1615,9 +1602,8 @@ BEGIN:
 }
 
 static int
-file_length(strm)
-object strm;
-{
+file_length(object strm) {
+
  BEGIN:
 	switch (strm->sm.sm_mode) {
 	case smm_input:
@@ -2243,30 +2229,22 @@ LFD(siLcopy_stream)()
 }
 
 static void
-cannot_open(fn)
-object fn;
-{
+cannot_open(object fn) {
 	FILE_ERROR(fn,"Cannot open");
 }
 
 static void
-cannot_create(fn)
-object fn;
-{
+cannot_create(object fn) {
 	FILE_ERROR(fn,"Cannot create");
 }
 
 static void
-cannot_read(strm)
-object strm;
-{
+cannot_read(object strm) {
 	FEerror("Cannot read the stream ~S.", 1, strm);
 }
 
 static void
-cannot_write(strm)
-object strm;
-{
+cannot_write(object strm) {
 	FEerror("Cannot write to the stream ~S.", 1, strm);
 }
 
@@ -2285,9 +2263,8 @@ FFN(siLuser_stream_state)()
 #endif
 
 static void
-closed_stream(strm)
-object strm;
-{
+closed_stream(object strm) {
+
   if (!GET_STREAM_FLAG(strm,gcl_sm_had_error))
     {
         SET_STREAM_FLAG(strm,gcl_sm_had_error,1);
@@ -2308,10 +2285,8 @@ object strm;
    */
 
 object
-coerce_stream(strm,out)
-object strm;
-int out;
-{
+coerce_stream(object strm,int out) {
+
  BEGIN:
  if (type_of(strm) != t_stream)
    FEwrong_type_argument(sLstream, strm);
@@ -2416,10 +2391,8 @@ DEFUN("FREAD",object,fSfread,SI,4,4,NONE
   of the buffer may be changed.
  */
 static void
-putCharGclSocket(strm,ch)
-  object strm;
-  int ch;
-{
+putCharGclSocket(object strm,int ch) {
+
   object bufp = SOCKET_STREAM_BUFFER(strm);
 
  AGAIN:
@@ -2435,10 +2408,8 @@ putCharGclSocket(strm,ch)
 }
 
 static void
-gclFlushSocket(strm)
-     object strm;
+gclFlushSocket(object strm) {
 
-{
     int fd = SOCKET_STREAM_FD(strm);
     object bufp = SOCKET_STREAM_BUFFER(strm);
     int i=0;
@@ -2470,14 +2441,8 @@ gclFlushSocket(strm)
 
 static
 object
-make_socket_stream(fd,mode,server,host,port,async)
-int fd;
-enum gcl_sm_flags mode;
-object server;
-object host;
-object port;
-object async;
-{
+make_socket_stream(int fd,enum gcl_sm_flags mode,object server,object host,object port,object async) {
+
   object x;
   if (fd < 0 )
    {
--- gcl27-2.7.1.orig/o/format.c
+++ gcl27-2.7.1/o/format.c
@@ -52,7 +52,7 @@ static void
 fmt_semicolon(bool,bool);
 
 static void
-fmt_up_and_out(bool,bool);
+fmt_up_and_out(int,bool);
 
 static void
 fmt_justification(volatile bool,bool);
@@ -347,7 +347,8 @@ format(object fmt_stream0, int ctl_origi
 {
 	int c, n;
 	fixnum i,j,sn;
-	bool colon, atsign;
+	int colon;
+	bool atsign;
 	object x;
 	fmt_paramp = fmt_param;
 
@@ -2640,7 +2641,7 @@ fmt_justification(volatile bool colon, b
 
 
 static void
-fmt_up_and_out(bool colon, bool atsign)
+fmt_up_and_out(int colon, bool atsign)
 {
   fixnum j,n;
   object x[3];
@@ -2720,7 +2721,8 @@ DEFUN("FORMAT",object,fLformat,LISP,2,F_
   va_list ap; 
   VOL object x = OBJNULL;
   jmp_buf fmt_jmp_buf0;
-  bool colon, e;
+  int colon;
+  bool e;
   VOL fixnum nargs=INIT_NARGS(2);
   
   fmt_old;
--- gcl27-2.7.1.orig/o/funlink.c
+++ gcl27-2.7.1/o/funlink.c
@@ -225,8 +225,6 @@ clean_link_array(object *ar, object *ar_
   return(i*sizeof(object *));
 }
 
-#include "apply_n.h"    
-
 DEFVAR("*FAST-LINK-WARNINGS*",sSAfast_link_warningsA,SI,Cnil,"");
 
 #include "pbits.h"
@@ -242,15 +240,14 @@ typedef union {
   fw f;
 } fu;
 
+
 object
-call_proc_new(object sym,ufixnum clp,ufixnum vld,void **link,ufixnum argd,object first,va_list ll) {
+call_proc_new23(object sym,ufixnum clp,ufixnum vld,void **link,ufixnum argd,object *x) {
 
   object fun;
   enum type tp;
   ufixnum margs,nargs,fas,do_link,varg,pushed=0,nfargs;
   fixnum vald;
-  object *tmp,*x/* ,*p */;
-  int i;
   fu u;
 
   if (type_of(sym)==t_symbol) {
@@ -262,7 +259,7 @@ call_proc_new(object sym,ufixnum clp,ufi
   tp=type_of(fun);
 
   u.i=vld;
-  
+
   /* p=0; */
   if (u.f.pu) {
     u.f.ma=vs_top-vs_base;
@@ -270,22 +267,12 @@ call_proc_new(object sym,ufixnum clp,ufi
     /* p=vs_base; */
     pushed=1;
   }
-  
+
   margs=u.f.ma;
   varg=u.f.va;
   nargs=u.f.va ? abs(VFUN_NARGS) : margs;
   nfargs=u.f.va && VFUN_NARGS<0 ? nargs-1 : nargs;
   vald=!u.f.vv ? -(fixnum)u.f.nv : u.f.nv;
-  
-  x=tmp=(u.f.pu && !fun->fun.fun_argd && VFUN_NARGS>=fun->fun.fun_minarg) ? 
-    vs_base : ZALLOCA(nargs*sizeof(object));
-  
-  if (tmp!=vs_base) {
-    if (u.f.pu) 
-      memcpy(tmp,vs_base,nargs*sizeof(*tmp));
-    else for (i=0;i<nargs;i++)
-	   *x++=(i || u.f.nf) ? va_arg(ll,object) : first;
-  }
 
   /*FIXME: Problem here relying on VFUN_NARGS or fcall.fun or FUN_VALP might foil sharing these links in different contexts*/
   /*links currently shared by rt at clp apnarg, so VFUN_NARGS<0 is safe*/
@@ -341,7 +328,7 @@ call_proc_new(object sym,ufixnum clp,ufi
   }
 
   if (sSAprofilingA->s.s_dbind!=Cnil)
-    sSin_call->s.s_gfdef->fun.fun_self(sym);
+    ((object (*)(object))sSin_call->s.s_gfdef->fun.fun_self)(sym);
 
   if (fas) {
 
@@ -352,12 +339,12 @@ call_proc_new(object sym,ufixnum clp,ufi
     }
 
     if (sSAprofilingA->s.s_dbind!=Cnil)
-      sSout_call->s.s_gfdef->fun.fun_self(fSgettimeofday());
-    
-    return(c_apply_n_fun(fun,x-tmp,tmp));
+      ((object (*)(object))sSout_call->s.s_gfdef->fun.fun_self)(fSgettimeofday());
+
+    return(quick_call_function_vec(fun,nargs,x));
 
   } else {
-    
+
     object res;
     register object *base,*old_top;
     enum ftype result_type;
@@ -370,17 +357,17 @@ call_proc_new(object sym,ufixnum clp,ufi
     if (vald || u.f.vv) larg=(fixnum)fcall.valp;
 
     if (!pushed) {
-      
+
       object y;
-      
+
       vs_base=vs_top; /*???*/
 
       for (i=0;i<nargs;i++) {
-	
+
 	enum ftype typ;
 
-	y=tmp[i];
-	
+	y=x[i];
+
 	switch((typ=POP_BITS(argd,2))) {
 	case f_fixnum:
 	  y=make_fixnum((fixnum)y);
@@ -388,15 +375,15 @@ call_proc_new(object sym,ufixnum clp,ufi
 	default:
 	  break;
 	}
-	
+
 	vs_push(y);
-	
+
       }
 
       if (u.f.va && VFUN_NARGS<0)
 	for (y=*--vs_top;y!=Cnil;y=y->c.c_cdr)
 	  vs_push(y->c.c_car);
-      
+
       vs_check;
 
     }
@@ -404,7 +391,7 @@ call_proc_new(object sym,ufixnum clp,ufi
     base=vs_base;
     old_top=vs_top;
     funcall(fun);
-    
+
     res=vs_base[0];
     if (larg) {
       object *tmp=vs_base+1,*tl=(void *)larg,*tle=tl+labs(vald);/*FIXME avoid if pushed*/
@@ -418,7 +405,7 @@ call_proc_new(object sym,ufixnum clp,ufi
       vs_top=base;
 
     for (;--old_top>=vs_top && vs_top>=vs_org;) *old_top=Cnil;
-    
+
     switch(result_type) {
     case f_fixnum:
       res=(object)fix(res);
@@ -426,49 +413,29 @@ call_proc_new(object sym,ufixnum clp,ufi
     default:
       break;
     }
-    
+
     if (sSAprofilingA->s.s_dbind!=Cnil)
-      sSout_call->s.s_gfdef->fun.fun_self(fSgettimeofday());
+      ((object (*)(object))sSout_call->s.s_gfdef->fun.fun_self)(fSgettimeofday());
 
     return res;
-    
+
   }
 
 }
-object
-call_proc_new_nval(object sym,ufixnum clp,ufixnum vld,void **link,ufixnum argd,object first,...) {
-  object x;
-  va_list b;
-  va_start(b,first);
-  x=call_proc_new(sym,clp,vld,link,argd,first,b);
-  va_end(b);
-  return x;
-}
-
-object
-call_proc_cs1(object fun,...) {
-  register object res;
-  ufixnum vald;
-  va_list ap;
-  va_start(ap,fun);
-  vald=((31<<12)|(1<<17)|(1<<18)|(1<<20));
-  res=call_proc_new(fun,1,vald,0,0,0,ap);
-  va_end(ap);
-  return res;
-}
-
 
 object
 call_proc_cs2(object first,...) {
-  register object res;
-  ufixnum vald;
+
+  int i,nargs=abs(VFUN_NARGS);
+  object *x=alloca(nargs*sizeof(*x));
   va_list ap;
-  object fun=fcall.fun;
+
   va_start(ap,first);
-  vald=((31<<12)|(1<<17)|(1<<18));
-  res=call_proc_new(fun,1,vald,0,0,first,ap);
+  for (i=0;i<nargs;i++) x[i]=i ? va_arg(ap,object) : first;
   va_end(ap);
-  return res;
+
+  return call_proc_new23(fcall.fun,1,((31<<12)|(1<<17)|(1<<18)),0,0,x);
+
 }
 
 
--- gcl27-2.7.1.orig/o/gmp_big.c
+++ gcl27-2.7.1/o/gmp_big.c
@@ -526,16 +526,16 @@ integer_quotient_remainder_1(object x, o
 
     if (qp) {
       if (rp) {
-	void (*f)()=d<0 ? mpz_fdiv_qr : (d>0 ? mpz_cdiv_qr : mpz_tdiv_qr);
+	void (*f)(__mpz_struct *,__mpz_struct *,__mpz_struct *,__mpz_struct *)=d<0 ? mpz_fdiv_qr : (d>0 ? mpz_cdiv_qr : mpz_tdiv_qr);
 	f(MP(big_fixnum3),MP(big_fixnum4),b1,b2);
 	*rp=maybe_replace_big(big_fixnum4);
       } else {
-	void (*f)()=d<0 ? mpz_fdiv_q : (d>0 ? mpz_cdiv_q : mpz_tdiv_q);
+	void (*f)(__mpz_struct *,__mpz_struct *,__mpz_struct *)=d<0 ? mpz_fdiv_q : (d>0 ? mpz_cdiv_q : mpz_tdiv_q);
 	f(MP(big_fixnum3),b1,b2);
       }
       *qp=maybe_replace_big(big_fixnum3);
     } else if (rp) {
-      void (*f)()=d<0 ? mpz_fdiv_r : (d>0 ? mpz_cdiv_r : mpz_tdiv_r);
+      void (*f)(__mpz_struct *,__mpz_struct *,__mpz_struct *)=d<0 ? mpz_fdiv_r : (d>0 ? mpz_cdiv_r : mpz_tdiv_r);
       f(MP(big_fixnum4),b1,b2);
       *rp=maybe_replace_big(big_fixnum4);
     }
--- gcl27-2.7.1.orig/o/list.d
+++ gcl27-2.7.1/o/list.d
@@ -32,9 +32,8 @@ Foundation, 675 Mass Ave, Cambridge, MA
 
 
 object
-car(x)
-object x;
-{
+car(object x) {
+
 	if (x == Cnil)
 		return(x);
 	if (consp(x))
@@ -44,9 +43,8 @@ object x;
 }
 
 object
-cdr(x)
-object x;
-{
+cdr(object x) {
+
 	if (x == Cnil)
 		return(x);
 	if (consp(x))
@@ -192,9 +190,8 @@ append(object x, object y) {
 }
 
 object
-copy_list(x)
-object x;
-{
+copy_list(object x) {
+
 	object y;
 
 	if (!consp(x))
@@ -277,10 +274,10 @@ stack_list(void) {
 
 }
  
-object on_stack_make_list(n)
-int n;
-{ object res=(object) alloca_val;
- struct cons *p = (struct cons *)res;
+object on_stack_make_list(int n) {
+
+  object res=(object) alloca_val;
+  struct cons *p = (struct cons *)res;
  if (n<=0) return Cnil;
   TOP:
 #ifdef WIDE_CONS
@@ -315,9 +312,8 @@ DEFUN("RPLACD",object,fLrplacd,LISP,2,2,
 
  
 void
-check_proper_list(alist)
-object alist;
-{
+check_proper_list(object alist) {
+
     object v;
     /*
     if (alist == Cnil)
@@ -336,9 +332,7 @@ DEFUN("PROPER-LISTP",object,fSproper_lis
 
 
 bool
-member_eq(x, l)
-object x, l;
-{
+member_eq(object x,object l) {
 
 	for (;  consp(l);  l = l->c.c_cdr)
 		if (x == l->c.c_car)
@@ -347,9 +341,8 @@ object x, l;
 }
 
 void
-delete_eq(x, lp)
-object x, *lp;
-{
+delete_eq(object x,object *lp) {
+
 	for (;  consp(*lp);  lp = &(*lp)->c.c_cdr)
 		if ((*lp)->c.c_car == x) {
 			*lp = (*lp)->c.c_cdr;
--- gcl27-2.7.1.orig/o/main.c
+++ gcl27-2.7.1/o/main.c
@@ -76,7 +76,7 @@ char stderr_buf[BUFSIZ + EXTRA_BUFSIZE];
 #include "stacks.h"
 
 int debug;			/* debug switch */
-int raw_image = TRUE;		/* raw or saved image -- CYGWIN will only place this in .data and not in .bss if initialized to non-zero */
+bool raw_image = TRUE;		/* raw or saved image -- CYGWIN will only place this in .data and not in .bss if initialized to non-zero */
 bool GBC_enable=FALSE;
 
 long real_maxpage;
@@ -1434,7 +1434,7 @@ my_fprintf(void *v,const char *f,...) {
 
 #ifdef HAVE_FPRINTF_STYLED_FTYPE
 static int
-my_fprintf_styled(void *v,enum disassembler_style,const char *f,...) {
+my_fprintf_styled(void *v,enum disassembler_style s,const char *f,...) {
   va_list va;
   int r;
   va_start(va,f);
@@ -1463,25 +1463,24 @@ DEFUN("DISASSEMBLE-INSTRUCTION",object,f
 #if defined(HAVE_DIS_ASM_H) && defined(OUTPUT_ARCH)
 
   static disassemble_info i;
-  void *v;
-  void * (*s)();
+  void *v,*s;
   fixnum j,j1,k;
   object x;
 
   if ((v=dlopen("libopcodes.so",RTLD_NOW))) {
     if ((s=dlsym(v,"init_disassemble_info"))) {
-      s(&i, stdout,(fprintf_ftype)my_fprintf
 #ifdef HAVE_FPRINTF_STYLED_FTYPE
-	,my_fprintf_styled
+	((void * (*)(disassemble_info *,FILE *,fprintf_ftype,fprintf_styled_ftype))s)(&i,stdout,my_fprintf,my_fprintf_styled);
+#else
+	((void * (*)(disassemble_info *,FILE *,fprintf_ftype))s)(&i,stdout,my_fprintf);
 #endif
-	);
       i.read_memory_func=my_read;
       i.print_address_func=my_pa;
 #if defined(OUTPUT_MACH)
       i.mach=OUTPUT_MACH;
 #endif
       if ((s=dlsym(v,"disassembler"))) {
-	disassembler_ftype disasm=(disassembler_ftype)(ufixnum)s(OUTPUT_ARCH,0,0,NULL);
+	disassembler_ftype disasm=((disassembler_ftype (*)(int,int,int,void *))s)(OUTPUT_ARCH,0,0,NULL);
 	bp=b;
 	disasm(addr,&i);
 	my_fprintf(NULL," ;");
--- gcl27-2.7.1.orig/o/package.d
+++ gcl27-2.7.1/o/package.d
@@ -39,9 +39,8 @@ void check_type_or_symbol_string_package
 
 
 static bool
-member_string_eq(x, l)
-object x, l;
-{
+member_string_eq(object x,object l) {
+
 	for (;  consp(l);  l = l->c.c_cdr)
 		if (string_eq(x, l->c.c_car))
 			return(TRUE);
@@ -126,10 +125,7 @@ suitable_package_size(ufixnum n)
 	or package names i.e. strings or symbols.
 */
 static object
-make_package(n, ns, ul,isize,esize)
-object n, ns, ul;
-int isize,esize;
-{
+make_package(object n,object ns,object ul,int isize,int esize) {
 
 	object x, y;
 	int i;
@@ -199,10 +195,7 @@ static void
 use_package(object,object);
 
 static object
-in_package(n, ns, ul,isize,esize)
-object n, ns, ul;
-int isize,esize;
-{
+in_package(object n,object ns,object ul,int isize,int esize) {
 
 	object x, y;
 	vs_mark;
@@ -237,9 +230,7 @@ L:
 }
 
 static object
-rename_package(x, n, ns)
-object x, n, ns;
-{
+rename_package(object x,object n,object ns) {
 
 	object y;
 	vs_mark;
@@ -278,9 +269,8 @@ object x, n, ns;
 	If not so, an error is signaled.
 */
 object
-find_package(n)
-object n;
-{
+find_package(object n) {
+
 	struct package *p;
 
 	check_package_designator(n);
@@ -291,9 +281,8 @@ object n;
 }
 
 static object
-coerce_to_package(p)
-object p;
-{
+coerce_to_package(object p) {
+
 	object pp;
 
 	if (type_of(p) == t_package)
@@ -327,9 +316,9 @@ current_package()
 */
 
 int
-pack_hash(x)
-object x;
-{unsigned int h=0;
+pack_hash(object x) {
+
+  unsigned int h=0;
   x=coerce_to_string(x);
   {int len=VLEN(x);
   char *s;
@@ -393,9 +382,8 @@ DEFUN("PACKAGE-EXTERNAL_SIZE",object,fSp
 	Intern(st, p) interns string st in package p.
 */
 object
-intern(st, p)
-object st, p;
-{
+intern(object st,object p) {
+
 	int j;
 	object x, *ip, *ep, l, ul;
 	vs_mark;
@@ -450,9 +438,8 @@ object st, p;
 	Find_symbol(st, p) searches for string st in package p.
 */
 object
-find_symbol(st, p)
-object st, p;
-{
+find_symbol(object st,object p) {
+
 	int j;
 	object *ip, *ep, l, ul;
 	{BEGIN_NO_INTERRUPT;
@@ -483,9 +470,8 @@ object st, p;
 }}
 
 static bool
-unintern(s, p)
-object s, p;
-{
+unintern(object s,object p) {
+
 	object x, y, l, *lp;
 	int j;
 	{BEGIN_NO_INTERRUPT;
@@ -533,9 +519,8 @@ UNINTERN:
 }}
 
 void
-export(s, p)
-object s, p;
-{
+export(object s,object p) {
+
 	object x;
 	int j;
 	object *ep, *ip, l;
@@ -578,9 +563,8 @@ BEGIN:
 }
 
 static void
-unexport(s, p)
-object s, p;
-{
+unexport(object s,object p) {
+
 	object x, *ep, *ip;
 	int j;
 
@@ -609,9 +593,8 @@ object s, p;
 }
 
 void
-import(s, p)
-object s, p;
-{
+import(object s,object p) {
+
 	object x;
 	int j;
 	object *ip;
@@ -635,9 +618,8 @@ object s, p;
 }
 
 static void
-shadowing_import(s, p)
-object s, p;
-{
+shadowing_import(object s,object p) {
+
 	object x, *ip;
 
 	x=find_symbol(s, p);
@@ -668,9 +650,8 @@ object s, p;
 }
 
 static void
-shadow(s, p)
-object s, p;
-{
+shadow(object s,object p) {
+
 	int j;
 	object *ip,x;
 
@@ -692,9 +673,8 @@ object s, p;
 }
 
 static void
-use_package(x0, p)
-object x0, p;
-{
+use_package(object x0,object p) {
+
 	object x = x0;
 	int i;
 	object y, l;
@@ -735,9 +715,8 @@ object x0, p;
 }
 
 static void
-unuse_package(x0, p)
-object x0, p;
-{
+unuse_package(object x0,object p) {
+
 	object x = x0;
 
  BEGIN:
--- /dev/null
+++ gcl27-2.7.1/o/pre_qfv.c
@@ -0,0 +1,98 @@
+#include "include.h"
+#include "arth.h"
+
+#define EMPTY()
+#define DEFER(id) id EMPTY()
+
+#define EVAL(...)     EVAL64(__VA_ARGS__)
+#define EVAL64(...)   EVAL32(EVAL32(__VA_ARGS__))
+#define EVAL32(...)   EVAL16(EVAL16(__VA_ARGS__))
+#define EVAL16(...)   EVAL8(EVAL8(__VA_ARGS__))
+#define EVAL8(...)    EVAL4(EVAL4(__VA_ARGS__))
+#define EVAL4(...)    EVAL2(EVAL2(__VA_ARGS__))
+#define EVAL2(...)    EVAL1(EVAL1(__VA_ARGS__))
+#define EVAL1(...)    __VA_ARGS__
+
+#define minus(a,b) M_ ## a ## _ ## b
+#define MINUS(a,b) minus(a,b)
+#define DEC(n) MINUS(n,1)
+
+#define SECOND(a, b, ...) b
+#define IS_ONE_PROXY(...) SECOND(__VA_ARGS__)
+#define IS_ONE_1 ~, 1
+#define IS_ONE_CHECK(n) IS_ONE_PROXY(Mjoin(IS_ONE_, n), 0)
+
+#define GCNT_0(P,n,m) , DEFER(GCNT_ID)()(P,n,m)
+#define GCNT_1(P,n,m) 
+#define GCNT_ID() GCNT
+
+#define GCNT(P,n,m) P(n,m) Mjoin(GCNT_,IS_ONE_CHECK(n))(P,DEC(n),m)
+#define PPP1(n,m) object
+#define PPP2(n,m) x[MINUS(m,n)]
+#define CSTCL(m,n) case n*(MAX_ARGS+1)+m: return ((object (*)(GCNT(PPP1,m,m),...))f)(GCNT(PPP2,n,n));
+
+#define OGCNT_0(P,n,m) DEFER(OGCNT_ID)()(P,n,m)
+#define OGCNT_1(P,n,m) 
+#define OGCNT_ID() OGCNT
+
+#define OGCNT(P,n,m) P(n,m) Mjoin(OGCNT_,IS_ONE_CHECK(n))(P,DEC(n),m)
+#define OWLK(m,n) OGCNT(CSTCL,m,m)
+
+#define PGCNT_0(P,n,m) DEFER(PGCNT_ID)()(P,n,m)
+#define PGCNT_1(P,n,m) 
+#define PGCNT_ID() PGCNT
+
+#define PGCNT(P,n,m) P(n,m) Mjoin(PGCNT_,IS_ONE_CHECK(n))(P,DEC(n),m)
+#define IPGCNT(P,n) PGCNT(P,n,n)
+
+ufixnum maxargs_for_awk=MAX_ARGS;
+
+static inline object
+vc_apply_n(void *f, int n, object *x) {
+
+
+  switch (n) {
+
+    case 0*(MAX_ARGS+1)+1: return ((object (*)(object ,...))f)(OBJNULL);
+
+    /*    EVAL(IPGCNT(OWLK,MAX_ARGS)) Too much memory on 32bit systems*/
+    awk_generated_vc_apply_n_lines;
+
+    default: FEerror("vc bar ~s",1,make_fixnum(n));
+
+  }
+
+}
+
+#define RCSTCL(m,n) case m: return ((object (*)(GCNT(PPP1,m,m)))f)(GCNT(PPP2,m,m));
+#define PWLK(m,n) RCSTCL(m,m)
+
+static inline object
+rc_apply_n(void *f, int n, object *x) {
+
+  switch (n) {
+
+    /* EVAL(IPGCNT(PWLK,MAX_ARGS)) Too much memory on 32bit systems*/
+    awk_generated_rc_apply_n_lines;
+
+    default: FEerror("rc bar ~s",1,make_fixnum(n));
+
+  }
+
+}
+
+static inline object
+c_apply_n_fun(object fun,int n,object *b) {
+
+  return fun->fun.fun_minarg<fun->fun.fun_maxarg ?
+    vc_apply_n(fun->fun.fun_self,n*(MAX_ARGS+1)+(fun->fun.fun_minarg ? fun->fun.fun_minarg : 1),b) :
+    rc_apply_n(fun->fun.fun_self,n,b);
+
+}
+
+object
+quick_call_function_vec(object fun,ufixnum n,object *b) {
+
+  return c_apply_n_fun(fun,n,b);
+
+}
--- gcl27-2.7.1.orig/o/print.d
+++ gcl27-2.7.1/o/print.d
@@ -156,9 +156,8 @@ static void
 write_decimal1(int);
 
 static void
-write_decimal(i)
-int i;
-{
+write_decimal(int i) {
+
 	if (i == 0) {
 		write_ch('0');
 		return;
@@ -623,17 +622,15 @@ writec_queue(int c,void *v) {
 
 
 void
-write_str(s)
-char *s;
-{
+write_str(char *s) {
+
 	while (*s != '\0')
 		write_ch(*s++);
 }
 
 static void
-write_decimal1(i)
-int i;
-{
+write_decimal1(int i) {
+
 	if (i == 0)
 		return;
 	write_decimal1(i/10);
@@ -641,9 +638,8 @@ int i;
 }
 
 static void
-write_addr(x)
-object x;
-{
+write_addr(object x) {
+
 	long i;
 	int j, k;
 
@@ -799,11 +795,8 @@ write_unreadable_str(object x,char *str)
 }
 
 static void
-write_double(d, e, shortp)
-double d;
-int e;
-bool shortp;
-{
+write_double(double d,int e,bool shortp) {
+
 	int sign;
 	char buff[FPRC+5];
 	int exp;
@@ -1847,10 +1840,8 @@ travel_find_sharing(object x,object tabl
 }
 
 static bool
-potential_number_p(strng, base)
-object strng;
-int base;
-{
+potential_number_p(object strng,int base) {
+
 	int i, l, c, dc;
 	char *s;
 
--- gcl27-2.7.1.orig/o/read.d
+++ gcl27-2.7.1/o/read.d
@@ -261,9 +261,8 @@ setup_READ()
 }
 
 object
-read_char(in)
-object in;
-{
+read_char(object in) {
+
 	return(code_char(readc_stream(in)));
 }
 
@@ -286,9 +285,8 @@ read_char_no_echo(object in) {
 #define	read_char(in)	code_char(readc_stream(in))
 
 static void
-unread_char(c, in)
-object c, in;
-{
+unread_char(object c,object in) {
+
 	if (type_of(c) != t_character)
 		FEwrong_type_argument(sLcharacter, c);
 	unreadc_stream(char_code(c), in);
@@ -299,10 +297,8 @@ object c, in;
 	When pt is TRUE, preceeding whitespaces are ignored.
 */
 object
-peek_char(pt, in)
-bool pt;
-object in;
-{
+peek_char(bool pt,object in) {
+
 	object c;
 
 	if (pt) {
@@ -320,9 +316,8 @@ object in;
 		
 
 static object
-read_object_recursive(in)
-object in;
-{
+read_object_recursive(object in) {
+
 	VOL object x;
 	bool e;
 
@@ -388,9 +383,8 @@ L:
 
 
 object
-read_object_non_recursive(in)
-object in;
-{
+read_object_non_recursive(object in) {
+
 	VOL object x;
 	bool e;
 	object old_READtable;
@@ -509,9 +503,8 @@ L:
 */
 
 object
-read_object(in)
-object in;
-{
+read_object(object in) {
+
 	object x;
 	object c=Cnil;
 	enum chattrib a;
@@ -801,10 +794,8 @@ ENDUP:
 	Delim is not included in the string but discarded.
 */
 static void
-read_string(delim, in)
-int delim;
-object in;
-{
+read_string(int delim,object in) {
+
 	int i;
 	object c;
 
@@ -828,9 +819,8 @@ object in;
 	and places it in token_buffer.
 */
 static void
-read_constituent(in)
-object in;
-{
+read_constituent(object in) {
+
 	int i, j;
 	object c;
 
@@ -2159,9 +2149,8 @@ DEFUNM("PARSE-INTEGER-INT",object,fSpars
 /* } */
 
 object
-read_char1(strm,eof)
-object strm,eof;
-{
+read_char1(object strm,object eof) {
+
   if (strm == Cnil)
     strm = symbol_value(sLAstandard_inputA);
   else if (strm == Ct)
@@ -2340,9 +2329,8 @@ DEFUN("SET-READTABLE-CASE",object,fSset_
 @)
 
 static object
-string_to_object(x)
-object x;
-{
+string_to_object(object x) {
+
 	object in;
 	vs_mark;
 
--- gcl27-2.7.1.orig/o/run_process.c
+++ gcl27-2.7.1/o/run_process.c
@@ -374,10 +374,8 @@ static char *lisp_to_string(object strin
  * for a service on the same host as the clinet.
  *
  */
-static int open_connection(host,server)
-char	*host;
-int	server;
-{
+static int open_connection(char *host,int server) {
+
 	int res;
 	int pid;
 	int	sock;
@@ -430,11 +428,8 @@ int	server;
 	return(sock);
 }
 
-object make_stream(host_l,socket,smm)
-object	host_l;
-int socket;
-enum smmode smm;
-{
+object make_stream(object host_l,int socket,enum smmode smm) {
+
 	char	*mode=NULL;
 	object	stream;
 	FILE	*fp;
@@ -470,10 +465,8 @@ enum smmode smm;
 }
 
 object
-make_socket_stream(host_l,port)
-object	host_l;
-object	port;
-{
+make_socket_stream(object host_l,object port) {
+
 	char	*host = lisp_to_string(host_l);
 	object	stream_in;
 	object	stream_out;
@@ -574,8 +567,6 @@ spawn_process_with_streams(object istrea
     close(fileno(istream->sm.sm_fp));
     close(fileno(ostream->sm.sm_fp));
 
-    emsg("\n***** Spawning process %s ", pname);
-
     errno=0;
     execvp(pname,argv);
     _exit(128|(errno&0x7f));
--- gcl27-2.7.1.orig/o/sequence.d
+++ gcl27-2.7.1/o/sequence.d
@@ -269,9 +269,8 @@ LFD(Lcopy_seq)()
 }
 
 int
-length(x)
-object x;
-{
+length(object x) {
+
 	int i;
 
 	switch (type_of(x)) {
@@ -317,9 +316,8 @@ LFD(Lreverse)()
 }
 
 object
-reverse(seq)
-object seq;
-{
+reverse(object seq) {
+
 	object x, y, *v;
 	int i, j, k;
 
@@ -430,9 +428,8 @@ LFD(Lnreverse)()
 }
 
 object /*FIXME boot*/
-nreverse(seq)
-object seq;
-{
+nreverse(object seq) {
+
 	object x, y, z;
 	int i, j, k;
 
--- gcl27-2.7.1.orig/o/sockets.c
+++ gcl27-2.7.1/o/sockets.c
@@ -53,9 +53,6 @@ Foundation, 675 Mass Ave, Cambridge, MA
 
 #include <errno.h> 
 
-static void write_timeout_error();
-static void connection_failure();
-
 #ifdef __MINGW32__
 /* Keep track of socket initialisations */
 int w32_socket_initialisations = 0;
@@ -554,15 +551,13 @@ DEFUN("CLEAR-CONNECTION-STATE",object,fS
 #endif
 
 static void
-write_timeout_error(s)
-     char *s;
-{FEerror("Write timeout: ~s",1,make_simple_string(s));
+write_timeout_error(char *s) {
+  FEerror("Write timeout: ~s",1,make_simple_string(s));
 }
 
 static void
-connection_failure(s)
-     char *s;
-{FEerror("Connect failure: ~s",1,make_simple_string(s));
+connection_failure(char *s) {
+  FEerror("Connect failure: ~s",1,make_simple_string(s));
 }
 
 
--- gcl27-2.7.1.orig/o/string.d
+++ gcl27-2.7.1/o/string.d
@@ -82,9 +82,8 @@ alloc_simple_string(fixnum l) {
 	Make_simple_string(s) makes a simple string from C string s.
 */
 object
-make_simple_string(s)
-const char *s;
-{
+make_simple_string(const char *s) {
+
 	int l, i;
 	char *p;
 	object x;
@@ -103,9 +102,8 @@ const char *s;
 }
 
 object
-make_string(s)
-char *s;
-{
+make_string(char *s) {
+
 	int l, i;
 	char *p;
 	object x;
@@ -128,9 +126,8 @@ char *s;
 	This correponds to string= (just the string equality).
 */
 bool
-string_eq(x, y)
-object x, y;
-{
+string_eq(object x,object y) {
+
 	int i, j;
 
 
@@ -151,9 +148,8 @@ object x, y;
 	(string equality ignoring the case).
 */
 bool
-string_equal(x, y)
-object x, y;
-{
+string_equal(object x,object y) {
+
 	int i, j;
 	char *p, *q;
 
@@ -178,9 +174,8 @@ object x, y;
 	Copy_simple_string(x) copies string x to a simple string.
 */
 object
-copy_simple_string(x)
-object x;
-{
+copy_simple_string(object x) {
+
 	object y;
 	int i;
 	vs_mark;
@@ -205,9 +200,8 @@ object x;
 }
 
 object
-copy_string(x)
-object x;
-{
+copy_string(object x) {
+
 	object y;
 	int i;
 	vs_mark;
@@ -238,9 +232,8 @@ object x;
 }
 
 object
-coerce_to_string(x)
-object x;
-{
+coerce_to_string(object x) {
+
 	object y;
 	vs_mark;
 
@@ -276,10 +269,8 @@ object x;
 
 
 void
-get_string_start_end(str, start, end, ps, pe)
-object str, start, end;
-int *ps, *pe;
-{
+get_string_start_end(object str,object start,object end,int *ps,int *pe) {
+
 	if (start == Cnil)
 		*ps = 0;
 	else if (type_of(start) != t_fixnum)
@@ -458,10 +449,7 @@ LFD(Lstring_not_equal)()   { string_sign
 @)
 
 static bool
-member_char(c, char_bag)
-int c;
-object char_bag;
-{
+member_char(int c,object char_bag) {
 
 	int i, f;
 
@@ -533,27 +521,24 @@ LFD(Lstring_trim)() { left_trim = right_
 LFD(Lstring_left_trim)() { left_trim = TRUE; right_trim = FALSE; FFN(Lstring_trim0)(); }
 LFD(Lstring_right_trim)() { left_trim = FALSE; right_trim = TRUE; FFN(Lstring_trim0)();}
 
-static int char_upcase(c, bp)
-int c, *bp;
-{
+static int char_upcase(int c,int *bp) {
+
 	if (isLower(c))
 		return(c - ('a' - 'A'));
 	else
 		return(c);
 }
 
-static int char_downcase(c, bp)
-int c, *bp;
-{
+static int char_downcase(int c,int *bp) {
+
 	if (isUpper(c))
 		return(c + ('a' - 'A'));
 	else
 		return(c);
 }
 
-static int char_capitalize(c, bp)
-int c, *bp;
-{
+static int char_capitalize(int c,int *bp) {
+
 	if (isLower(c)) {
 		if (*bp)
 			c -= 'a' - 'A';
@@ -571,7 +556,7 @@ int c, *bp;
 
 @(static defun string_case (strng &key start end &aux conv)
 	int s=0, e=0, i;
-	bool b;
+	int b;
 @
 	strng = coerce_to_string(strng);
 	get_string_start_end(strng, start, end, &s, &e);
@@ -590,7 +575,7 @@ LFD(Lstring_capitalize)() { casefun = ch
 
 @(static defun nstring_case (strng &key start end)
 	int s=0, e=0, i;
-	bool b;
+	int b;
 @
 	check_type_string(&strng);
 	get_string_start_end(strng, start, end, &s, &e);
--- gcl27-2.7.1.orig/o/symbol.d
+++ gcl27-2.7.1/o/symbol.d
@@ -40,9 +40,8 @@ odd_plist(object);
 object siSpname;
 
 object
-make_symbol(st)
-object st;
-{
+make_symbol(object st) {
+
 	object x;
 
 	{BEGIN_NO_INTERRUPT;	
@@ -70,9 +69,8 @@ object st;
 
 
 object
-make_ordinary(s)
-char *s;
-{
+make_ordinary(char *s) {
+
 	int j;
 	object x, l, *ep;
 	vs_mark;
@@ -96,10 +94,8 @@ char *s;
 	with initial value v in lisp package.
 */
 object
-make_special(s, v)
-char *s;
-object v;
-{
+make_special(char *s,object v) {
+
 	object x;
 
 	x = make_ordinary(s);
@@ -113,10 +109,8 @@ object v;
 	with constant value v in lisp package.
 */
 object
-make_constant(s, v)
-char *s;
-object v;
-{
+make_constant(char *s,object v) {
+
 	object x;
 
 	x = make_ordinary(s);
@@ -134,9 +128,8 @@ object v;
 
 
 object
-make_si_ordinary(s)
-char *s;
-{
+make_si_ordinary(char *s) {
+
 	int j;
 	object x, l, *ep;
 	vs_mark;
@@ -161,9 +154,8 @@ char *s;
 }
 
 object
-make_gmp_ordinary(s)
-char *s;
-{
+make_gmp_ordinary(char *s) {
+
         int i,j;
 	object x, l, *ep;
 	vs_mark;
@@ -196,10 +188,8 @@ char *s;
 	with initial value v in system package.
 */
 object
-make_si_special(s, v)
-char *s;
-object v;
-{
+make_si_special(char *s,object v) {
+
 	object x;
 
 	x = make_si_ordinary(s);
@@ -213,25 +203,23 @@ object v;
 	with constant value v in system package.
 */
 object
-make_si_constant(s, v)
-char *s;
-object v;
-{
+make_si_constant(char *s,object v) {
+
 	object x;
 
 	x = make_si_ordinary(s);
 	x->s.s_stype = (short)stp_constant;
 	x->s.s_dbind = v;
 	return(x);
+
 }
 
 /*
 	Make_keyword(s) makes a keyword from C string s.
 */
 object
-make_keyword(s)
-char *s;
-{
+make_keyword(char *s) {
+
 	int j;
 	object x, l, *ep;
 	vs_mark;
@@ -254,9 +242,8 @@ char *s;
 }
 
 object
-symbol_value(s)
-object s;
-{
+symbol_value(object s) {
+
 /*
 	if (type_of(s) != t_symbol)
 		FEinvalid_variable("~S is not a symbol.", s);
@@ -267,9 +254,7 @@ object s;
 }
 
 object
-getf(place, indicator, deflt)
-object place, indicator, deflt;
-{
+getf(object place,object indicator,object deflt) {
 
 	object l;
 #define cendp(obj) ((!consp(obj)))
@@ -285,9 +270,8 @@ object place, indicator, deflt;
 }
 
 object
-get(s, p, d)
-object s, p, d;
-{
+get(object s,object p,object d) {
+
 	if (type_of(s) != t_symbol)
 		not_a_symbol(s);
 	return(getf(s->s.s_plist, p, d));
@@ -298,9 +282,8 @@ object s, p, d;
 	and returns the resulting property list.
 */
 object
-putf(p, v, i)
-object p, v, i;
-{
+putf(object p,object v,object i) {
+
 	object l;
 
 	for (l = p;  !cendp(l);  l = l->c.c_cdr->c.c_cdr) {
@@ -316,9 +299,8 @@ object p, v, i;
 }
 
 object
-putprop(s, v, p)
-object s, v, p;
-{
+putprop(object s,object v,object p) {
+
 	if (type_of(s) != t_symbol)
 		not_a_symbol(s);
 	s->s.s_plist = putf(s->s.s_plist, v, p);
@@ -350,9 +332,8 @@ fSsputprop(object x,object y,object z) {
 		FALSE	otherwise.
 */
 bool
-remf(p, i)
-object *p, i;
-{
+remf(object *p,object i) {
+
 	object l0 = *p;
 
 	for(;  !endp(*p);  p = &(*p)->c.c_cdr->c.c_cdr) {
@@ -367,9 +348,8 @@ object *p, i;
 }
 
 object
-remprop(s, p)
-object s, p;
-{
+remprop(object s,object p) {
+
 	if (type_of(s) != t_symbol)
 		not_a_symbol(s);
 	if (remf(&s->s.s_plist, p))
@@ -379,9 +359,8 @@ object s, p;
 }
 
 bool
-keywordp(s)
-object s;
-{
+keywordp(object s) {
+
 	return(type_of(s) == t_symbol && s->s.s_hpack == keyword_package);
 /*
 	if (type_of(s) != t_symbol) {
@@ -445,11 +424,11 @@ DEFUN("SYMBOL-STRING",object,fSsymbol_st
 
 
 object
-symbol_name(x)
-object x;
-{
+symbol_name(object x) {
+
  if (type_of(x)!=t_symbol) FEwrong_type_argument(sLsymbol,x);
  return(x->s.s_name);
+
 }
 
 DEFUN("SYMBOL-NAME",object,fLsymbol_name,LISP,1,1,NONE,OO,OO,OO,OO,(object sym),"") {
@@ -674,9 +653,7 @@ LFD(siLputprop)()
 
 
 static void
-odd_plist(place)
-object place;
-{
+odd_plist(object place) {
 	FEerror("The length of the property-list ~S is odd.", 1, place);
 }
 
--- gcl27-2.7.1.orig/o/toplevel.c
+++ gcl27-2.7.1/o/toplevel.c
@@ -188,8 +188,7 @@ FFN(Fload_time_value)(object arg)
 
 }
 
-static void
-FFN(Fdeclare)(object arg)
+LFD(Fdeclare)(void)
 {
 	FEerror("DECLARE appeared in an invalid position.", 0);
 }
--- gcl27-2.7.1.orig/o/unexelf.c
+++ gcl27-2.7.1/o/unexelf.c
@@ -583,9 +583,8 @@ typedef unsigned char byte;
 /* Round X up to a multiple of Y.  */
 
 static ElfW(Addr)
-round_up (x, y)
-     ElfW(Addr) x, y;
-{
+round_up (ElfW(Addr) x,ElfW(Addr) y) {
+
   int rem = x % y;
   if (rem == 0)
     return x;
--- gcl27-2.7.1.orig/o/usig.c
+++ gcl27-2.7.1/o/usig.c
@@ -47,11 +47,10 @@ Foundation, 675 Mass Ave, Cambridge, MA
 
 extern char signals_handled[];
 
-void
-main_signal_handler(int,siginfo_t,void *);
+extern handler_function_type main_signal_handler;
 
 void
-gcl_signal(int signo, void (*handler) (/* ??? */))
+gcl_signal(int signo, void (*handler)(int,long,void *,char *))
 {
   char *p = signals_handled;
   while (*p)
@@ -66,7 +65,7 @@ gcl_signal(int signo, void (*handler) (/
   
 #ifdef HAVE_SIGACTION
     struct sigaction action;
-    action.sa_sigaction = handler;
+    action.sa_sigaction = (void *)handler;
 /*    action.sa_flags =  SA_RESTART | ((signo == SIGSEGV || signo == SIGBUS) ? SV_ONSTACK : 0) */
    action.sa_flags = SA_RESTART | ((signo == SIGSEGV || signo == SIGBUS) ? SA_ONSTACK : 0)  
 #ifdef SA_SIGINFO
@@ -178,7 +177,7 @@ DEFUN("FEENABLEEXCEPT",object,fSfeenable
 
 DEFUN("FEDISABLEEXCEPT",object,fSfedisableexcept,SI,0,0,NONE,IO,OO,OO,OO,(void),"") {
 
-  fixnum x;
+  fixnum x=0;
 
 #ifdef HAVE_FEENABLEEXCEPT
 
@@ -228,8 +227,9 @@ DEFUN("STMXCSR",object,fSstmxcsr,SI,0,0,
 
 
 static void
-sigfpe3(int sig,siginfo_t *i,void *v) {
+sigfpe3(int sig,long li,void *v,char *c) {
 
+  siginfo_t *i=(void *)li;
   unblock_signals(SIGFPE,SIGFPE);
 #ifdef __MINGW32__
   gcl_signal(SIGFPE,sigfpe3);
@@ -255,7 +255,7 @@ DEFCONST("+FE-LIST+",sSPfe_listP,SI,list
 DEF_ORDINARY("FLOATING-POINT-ERROR",sSfloating_point_error,SI,"");
 
 static void
-sigpipe(int s,siginfo_t *a,void *b)
+sigpipe(int s,long la,void *b,char *c)
 {
   unblock_signals(SIGPIPE,SIGPIPE);
   perror("");
@@ -263,14 +263,14 @@ sigpipe(int s,siginfo_t *a,void *b)
 }
 
 void
-sigint(int s,siginfo_t *a,void *b)
+sigint(int s,long la,void *b,char *c)
 {
   unblock_signals(SIGINT,SIGINT);
   terminal_interrupt(1);
 }
 
 static void
-sigalrm(int s,siginfo_t *a,void *b)
+sigalrm(int s,long a,void *b,char *c)
 {
   unblock_signals(SIGALRM,SIGALRM);
   raise_pending_signals(sig_try_to_delay);
@@ -282,7 +282,7 @@ DEF_ORDINARY("SIGUSR1-INTERRUPT",sSsigus
 DEF_ORDINARY("SIGIO-INTERRUPT",sSsigio_interrupt,SI,"");
 
 static void
-sigusr1(int s,siginfo_t *a,void *b) {
+sigusr1(int s,long a,void *b,char *c) {
 
   unblock_signals(SIGUSR1,SIGUSR1);
   ifuncall1(sSsigusr1_interrupt,Cnil);
@@ -290,12 +290,12 @@ sigusr1(int s,siginfo_t *a,void *b) {
 }
 
 static void
-sigio(int s,siginfo_t *a,void *b)
+sigio(int s,long a,void *b,char *c)
 {ifuncall1(sSsigio_interrupt,Cnil);}
 
 
 static void
-sigterm(int s,siginfo_t *a,void *b)
+sigterm(int s,long la,void *b,char *c)
 {do_gcl_abort();}
 
 
--- gcl27-2.7.1.orig/o/usig2.c
+++ gcl27-2.7.1/o/usig2.c
@@ -167,7 +167,7 @@ only in very SAFE places.")
      
 
 void
-main_signal_handler(int signo,siginfo_t *a,void *b)
+main_signal_handler(int signo,long a,void *b,char *c)
 {  int allowed = signals_allowed;
 #ifdef NEED_TO_REINSTALL_SIGNALS
        signal(signo,main_signal_handler);
@@ -201,7 +201,7 @@ invoke_handler(int signo, int allowed)
  {int prev_in_handler = in_signal_handler;
   in_signal_handler |= (allowed <= sig_normal ? 1 : 0);
   signals_allowed = allowed;
-  our_signal_handler[signo](signo,0,0);
+  our_signal_handler[signo](signo,0,0,0);
   signals_allowed = 0;
   in_signal_handler = prev_in_handler;
   after_interrupt(&buf,allowed); 
--- gcl27-2.7.1.orig/texinfo.tex
+++ gcl27-2.7.1/texinfo.tex
@@ -1,11 +1,11 @@
 % texinfo.tex -- TeX macros to handle Texinfo files.
-%
+% 
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2024-02-10.22}
+\def\texinfoversion{2025-10-25.20}
 %
-% Copyright 1985, 1986, 1988, 1990-2024 Free Software Foundation, Inc.
+% Copyright 1985, 1986, 1988, 1990-2025 Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software: you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
@@ -156,8 +156,9 @@
 % Give the space character the catcode for a space.
 \def\spaceisspace{\catcode`\ =10\relax}
 
-% Likewise for ^^M, the end of line character.
-\def\endlineisspace{\catcode13=10\relax}
+% Used to ignore an active newline that may appear immediately after
+% a macro name.
+{\catcode13=\active \gdef\ignoreactivenewline{\let^^M\empty}}
 
 \chardef\dashChar  = `\-
 \chardef\slashChar = `\/
@@ -212,7 +213,7 @@
 % @errormsg{MSG}.  Do the index-like expansions on MSG, but if things
 % aren't perfect, it's not the end of the world, being an error message,
 % after all.
-%
+% 
 \def\errormsg{\begingroup \indexnofonts \doerrormsg}
 \def\doerrormsg#1{\errmessage{#1}}
 
@@ -286,7 +287,6 @@
 % Avoid "undefined control sequence" errors.
 \def\currentchapterdefs{}
 \def\currentsectiondefs{}
-\def\currentsection{}
 \def\prevchapterdefs{}
 \def\prevsectiondefs{}
 \def\currentcolordefs{}
@@ -425,7 +425,7 @@
   }%
 }
 
-% First remove any @comment, then any @c comment.  Pass the result on to
+% First remove any @comment, then any @c comment.  Pass the result on to 
 % \argremovespace.
 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
 \def\argremovec#1\c#2\ArgTerm{\argremovespace#1$ $\ArgTerm}
@@ -483,8 +483,8 @@
 %   \envdef\foo{...}
 %   \def\Efoo{...}
 %
-% It's the responsibility of \envdef to insert \begingroup before the
-% actual body; @end closes the group after calling \Efoo.  \envdef also
+% \envdef inserts \begingroup before the actual body; @end calls
+% \Efoo then closes the group with \endgroup.  \envdef also
 % defines \thisenv, so the current environment is known; @end checks
 % whether the environment name matches.  The \checkenv macro can also be
 % used to check whether the current environment is the one expected.
@@ -951,8 +951,16 @@ where each line of input produces a line
 \let\setfilename=\comment
 
 % @bye.
-\outer\def\bye{\chappager\pagelabels\tracingstats=1\ptexend}
-
+\outer\def\bye{%
+  \chappager\pagelabels
+  % possibly set in \printindex
+  \ifx\byeerror\relax\else\errmessage{\byeerror}\fi
+  \tracingstats=1\ptexend}
+
+% set in \donoderef below, but we need to define this here so that
+% conditionals balance inside the large \ifpdf ... \fi blocks below.
+\newif\ifnodeseen
+\nodeseenfalse
 
 \message{pdf,}
 % adobe `portable' document format
@@ -971,15 +979,52 @@ where each line of input produces a line
 \newif\ifpdf
 \newif\ifpdfmakepagedest
 
+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
+% can be set).  So we test for \relax and 0 as well as being undefined.
+\ifx\pdfoutput\thisisundefined
+\else
+  \ifx\pdfoutput\relax
+  \else
+    \ifcase\pdfoutput
+    \else
+      \pdftrue
+    \fi
+  \fi
+\fi
+
+\newif\ifxetex
+\ifx\XeTeXrevision\thisisundefined\else
+  \xetextrue
+\fi
+
+\newif\ifluatex
+\ifx\luatexversion\thisisundefined\else
+  \luatextrue
+  \ifnum\luatexversion>84
+    \pdftrue
+  \fi
+\fi
+
+\newif\ifpdforxetex
+\ifpdf
+  \pdforxetextrue
+\fi
+\ifxetex
+  \pdforxetextrue
+\fi
+
+
+
+% Whether to use non-ASCII bytes in internal link targets.  Presently this
+% is almost always on.
+\newif\iftxiuseunicodedestname
+\txiuseunicodedestnametrue
+
 %
 % For LuaTeX
 %
 
-\newif\iftxiuseunicodedestname
-\txiuseunicodedestnamefalse % For pdfTeX etc.
-
-\ifx\luatexversion\thisisundefined
-\else
+\ifluatex
   % Use Unicode destination names
   \txiuseunicodedestnametrue
   % Escape PDF strings with converting UTF-16 from UTF-8
@@ -1026,13 +1071,13 @@ where each line of input produces a line
         end
       end
     }
-    % The -2 in the arguments here gives all the input to TeX catcode 12
-    % (other) or 10 (space), preventing undefined control sequence errors. See
+    % The -2 in the arguments here gives all the input to TeX catcode 12 
+    % (other) or 10 (space), preventing undefined control sequence errors. See 
     % https://lists.gnu.org/archive/html/bug-texinfo/2019-08/msg00031.html
     %
   \endgroup
   \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
-  \ifnum\luatexversion>84
+  \ifpdf
     % For LuaTeX >= 0.85
     \def\pdfdest{\pdfextension dest}
     \let\pdfoutput\outputmode
@@ -1055,28 +1100,6 @@ where each line of input produces a line
   \fi
 \fi
 
-% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
-% can be set).  So we test for \relax and 0 as well as being undefined.
-\ifx\pdfoutput\thisisundefined
-\else
-  \ifx\pdfoutput\relax
-  \else
-    \ifcase\pdfoutput
-    \else
-      \pdftrue
-    \fi
-  \fi
-\fi
-
-\newif\ifpdforxetex
-\pdforxetexfalse
-\ifpdf
-  \pdforxetextrue
-\fi
-\ifx\XeTeXrevision\thisisundefined\else
-  \pdforxetextrue
-\fi
-
 
 % Output page labels information.
 % See PDF reference v.1.7 p.594, section 8.3.1.
@@ -1129,7 +1152,7 @@ where each line of input produces a line
 % for display in the outlines, and in other places.  Thus, we have to
 % double any backslashes.  Otherwise, a name like "\node" will be
 % interpreted as a newline (\n), followed by o, d, e.  Not good.
-%
+% 
 % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
 % related messages.  The final outcome is that it is up to the TeX user
 % to double the backslashes and otherwise make the string valid, so
@@ -1163,58 +1186,90 @@ with PDF output, and none of those forma
 be supported due to the design of the PDF format; use regular TeX (DVI
 output) for that.)}
 
+% definitions for pdftex or luatex with pdf output
 \ifpdf
+  % Strings in PDF outlines can either be ASCII, or encoded in UTF-16BE
+  % with BOM.  Unfortunately there is no simple way with pdftex to output
+  % UTF-16, so we have to do some quite convoluted expansion games if we
+  % find the string contains a non-ASCII codepoint if we want these to
+  % display correctly.  We generated the UTF-16 sequences in
+  % \DeclareUnicodeCharacter and we access them here.
   %
-  % Color manipulation macros using ideas from pdfcolor.tex,
-  % except using rgb instead of cmyk; the latter is said to render as a
-  % very dark gray on-screen and a very dark halftone in print, instead
-  % of actual black. The dark red here is dark enough to print on paper as
-  % nearly black, but still distinguishable for online viewing.  We use
-  % black by default, though.
-  \def\rgbDarkRed{0.50 0.09 0.12}
-  \def\rgbBlack{0 0 0}
+  \def\defpdfoutlinetextunicode#1{%
+    \def\pdfoutlinetext{#1}%
+    %
+    % Make UTF-8 sequences expand to UTF-16 definitions.
+    \passthroughcharsfalse \utfbytespdftrue
+    \utfviiidefinedwarningfalse
+    %
+    % Completely expand, eliminating any control sequences such as \code,
+    % leaving only possibly \utfbytes.
+    \let\utfbytes\relax
+    \pdfaccentliterals
+    \xdef\pdfoutlinetextchecked{#1}%
+    \checkutfbytes
+  }%
+  % Check if \utfbytes occurs in expansion.
+  \def\checkutfbytes{%
+    \expandafter\checkutfbytesz\pdfoutlinetextchecked\utfbytes\finish
+  }%
+  \def\checkutfbytesz#1\utfbytes#2\finish{%
+    \def\after{#2}%
+    \ifx\after\empty
+      % No further action needed.  Output ASCII string as-is, as converting
+      % to UTF-16 is somewhat slow (and uses more space).
+      \global\let\pdfoutlinetext\pdfoutlinetextchecked
+    \else
+      \passthroughcharstrue % pass UTF-8 sequences unaltered
+      \xdef\pdfoutlinetext{\pdfoutlinetext}%
+      \expandafter\expandutfsixteen\expandafter{\pdfoutlinetext}\pdfoutlinetext
+    \fi
+  }%
   %
-  % rg sets the color for filling (usual text, etc.);
-  % RG sets the color for stroking (thin rules, e.g., normal _'s).
-  \def\pdfsetcolor#1{\pdfliteral{#1 rg  #1 RG}}
+  \catcode2=1 % begin-group character
+  \catcode3=2 % end-group character
   %
-  % Set color, and create a mark which defines \thiscolor accordingly,
-  % so that \makeheadline knows which color to restore.
-  \def\curcolor{0 0 0}%
-  \def\setcolor#1{%
-    \ifx#1\curcolor\else
-      \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
-      \domark
-      \pdfsetcolor{#1}%
-      \xdef\curcolor{#1}%
-    \fi
-  }
+  % argument should be pure UTF-8 with no control sequences.  convert to
+  % UTF-16BE by inserting null bytes before bytes < 128 and expanding
+  % UTF-8 multibyte sequences to saved UTF-16BE sequences.
+  \def\expandutfsixteen#1#2{%
+    \bgroup \asciitounicode
+    \passthroughcharsfalse
+    \let\utfbytes\asis
+    %
+    % for Byte Order Mark (BOM)
+    \catcode"FE=12
+    \catcode"FF=12
+    %
+    % we want to treat { and } in #1 as any other ASCII bytes.  however,
+    % we need grouping characters for \scantokens and definitions/assignments,
+    % so define alternative grouping characters using control characters
+    % that are unlikely to occur.
+    % this does not affect 0x02 or 0x03 bytes arising from expansion as
+    % these are tokens with different catcodes.
+    \catcode"02=1 % begin-group character
+    \catcode"03=2 % end-group character
+    %
+    \expandafter\xdef\expandafter#2\scantokens{%
+      ^^02^^fe^^ff#1^^03}%
+    % NB we need \scantokens to provide both the open and close group tokens
+    % for \xdef otherwise there is an e-TeX error "File ended while
+    % scanning definition of..."
+    % NB \scantokens is a e-TeX command which is assumed to be provided by
+    % pdfTeX.
+    %
+    \egroup
+  }%
   %
-  \let\maincolor\rgbBlack
-  \pdfsetcolor{\maincolor}
-  \edef\thiscolor{\maincolor}
-  \def\currentcolordefs{}
+  \catcode2=12 \catcode3=12 % defaults
   %
-  \def\makefootline{%
-    \baselineskip24pt
-    \line{\pdfsetcolor{\maincolor}\the\footline}%
-  }
+  % Color support
   %
-  \def\makeheadline{%
-    \vbox to 0pt{%
-      \vskip-22.5pt
-      \line{%
-        \vbox to8.5pt{}%
-        % Extract \thiscolor definition from the marks.
-        \getcolormarks
-        % Typeset the headline with \maincolor, then restore the color.
-        \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
-      }%
-      \vss
-    }%
-    \nointerlineskip
-  }
+  % rg sets the color for filling (usual text, etc.);
+  % RG sets the color for stroking (thin rules, e.g., normal _'s).
+  \def\pdfsetcolor#1{\pdfliteral{#1 rg  #1 RG}}
   %
+  % PDF outline support
   %
   \pdfcatalog{/PageMode /UseOutlines}
   %
@@ -1311,18 +1366,15 @@ output) for that.)}
       \def\pdfoutlinetext{#1}%
     \else
       \ifx \declaredencoding \utfeight
-        \ifx\luatexversion\thisisundefined
-          % For pdfTeX  with UTF-8.
-          % TODO: the PDF format can use UTF-16 in bookmark strings,
-          % but the code for this isn't done yet.
-          % Use ASCII approximations.
-          \passthroughcharsfalse
-          \def\pdfoutlinetext{#1}%
-        \else
+        \ifluatex
           % For LuaTeX with UTF-8.
           % Pass through Unicode characters for title texts.
           \passthroughcharstrue
-          \def\pdfoutlinetext{#1}%
+          \pdfaccentliterals
+          \xdef\pdfoutlinetext{#1}%
+        \else
+          % For pdfTeX with UTF-8.
+          \defpdfoutlinetextunicode{#1}%
         \fi
       \else
         % For non-Latin-1 or non-UTF-8 encodings.
@@ -1341,14 +1393,6 @@ output) for that.)}
     \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
   }
   %
-  % used to mark target names; must be expandable.
-  \def\pdfmkpgn#1{#1}
-  %
-  % by default, use black for everything.
-  \def\urlcolor{\rgbBlack}
-  \let\linkcolor\rgbBlack
-  \def\endlink{\setcolor{\maincolor}\pdfendlink}
-  %
   % Adding outlines to PDF; macros for calculating structure of outlines
   % come from Petr Olsak
   \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
@@ -1374,7 +1418,7 @@ output) for that.)}
       \def\pdfdestname{#4}%
     \fi
     %
-    \pdfoutline goto name{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}%
+    \pdfoutline goto name{\pdfdestname}#2{\pdfoutlinetext}%
   }
   %
   \def\pdfmakeoutlines{%
@@ -1385,15 +1429,18 @@ output) for that.)}
 	\def\thischapnum{##2}%
 	\def\thissecnum{0}%
 	\def\thissubsecnum{0}%
+	\def\indexlastsec{chap\thischapnum}%
       }%
       \def\numsecentry##1##2##3##4{%
 	\advancenumber{chap\thischapnum}%
 	\def\thissecnum{##2}%
 	\def\thissubsecnum{0}%
+	\def\indexlastsec{sec\thissecnum}%
       }%
       \def\numsubsecentry##1##2##3##4{%
 	\advancenumber{sec\thissecnum}%
 	\def\thissubsecnum{##2}%
+	\def\indexlastsec{subsec\thissecnum}%
       }%
       \def\numsubsubsecentry##1##2##3##4{%
 	\advancenumber{subsec\thissubsecnum}%
@@ -1401,7 +1448,13 @@ output) for that.)}
       \def\thischapnum{0}%
       \def\thissecnum{0}%
       \def\thissubsecnum{0}%
+      \let\indexlastsec\empty
       %
+      % Index initials are subsidiary to whatever sectioning command just
+      % occurred, usually @appendix or @chapter but occasionally a lower level.
+      \def\idxinitialentry##1##2##3##4{%
+        \expandafter\advancenumber\expandafter{\indexlastsec}%
+      }%
       % use \def rather than \let here because we redefine \chapentry et
       % al. a second time, below.
       \def\appentry{\numchapentry}%
@@ -1412,6 +1465,7 @@ output) for that.)}
       \def\unnsecentry{\numsecentry}%
       \def\unnsubsecentry{\numsubsecentry}%
       \def\unnsubsubsecentry{\numsubsubsecentry}%
+      %
       \readdatafile{toc}%
       %
       % Read toc second time, this time actually producing the outlines.
@@ -1421,7 +1475,7 @@ output) for that.)}
       % We use the node names as the destinations.
       %
       % Currently we prefix the section name with the section number
-      % for chapter and appendix headings only in order to avoid too much
+      % for chapter and appendix headings only in order to avoid too much 
       % horizontal space being required in the PDF viewer.
       \def\numchapentry##1##2##3##4{%
         \dopdfoutline{##2 ##1}{count-\expnumber{chap##2}}{##3}{##4}}%
@@ -1433,28 +1487,23 @@ output) for that.)}
         \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
       \def\numsubsubsecentry##1##2##3##4{% count is always zero
         \dopdfoutline{##1}{}{##3}{##4}}%
-      %
-      % PDF outlines are displayed using system fonts, instead of
-      % document fonts.  Therefore we cannot use special characters,
-      % since the encoding is unknown.  For example, the eogonek from
-      % Latin 2 (0xea) gets translated to a | character.  Info from
-      % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
-      %
-      % TODO this right, we have to translate 8-bit characters to
-      % their "best" equivalent, based on the @documentencoding.  Too
-      % much work for too little return.  Just use the ASCII equivalents
-      % we use for the index sort strings.
-      %
-      \indexnofonts
+      \def\idxinitialentry##1##2##3##4{%
+        \dopdfoutline{##1}{}{idx.##1.##2}{##4}}%
+      % 
+      \ifnodeseen\else \dopdfoutlinecontents \fi % for @contents at beginning
       \setupdatafile
       % We can have normal brace characters in the PDF outlines, unlike
       % Texinfo index files.  So set that up.
       \def\{{\lbracecharliteral}%
       \def\}{\rbracecharliteral}%
       \catcode`\\=\active \otherbackslash
-      \input \tocreadfilename
+      \input \tocreadfilename\relax
+      \ifnodeseen \dopdfoutlinecontents \fi % for @contents at end
     \endgroup
   }
+  \def\dopdfoutlinecontents{%
+    \expandafter\dopdfoutline\expandafter{\putwordTOC}{}{txi.CONTENTS}{}%
+  }
   {\catcode`[=1 \catcode`]=2
    \catcode`{=\other \catcode`}=\other
    \gdef\lbracecharliteral[{]%
@@ -1480,55 +1529,16 @@ output) for that.)}
   \else
     \let \startlink \pdfstartlink
   \fi
-  % make a live url in pdf output.
-  \def\pdfurl#1{%
-    \begingroup
-      % it seems we really need yet another set of dummies; have not
-      % tried to figure out what each command should do in the context
-      % of @url.  for now, just make @/ a no-op, that's the only one
-      % people have actually reported a problem with.
-      %
-      \normalturnoffactive
-      \def\@{@}%
-      \let\/=\empty
-      \makevalueexpandable
-      % do we want to go so far as to use \indexnofonts instead of just
-      % special-casing \var here?
-      \def\var##1{##1}%
-      %
-      \leavevmode\setcolor{\urlcolor}%
-      \startlink attr{/Border [0 0 0]}%
-        user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
-    \endgroup}
-  % \pdfgettoks - Surround page numbers in #1 with @pdflink.  #1 may
-  % be a simple number, or a list of numbers in the case of an index
-  % entry.
-  \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
-  \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
-  \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
-  \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
-  \def\maketoks{%
-    \expandafter\poptoks\the\toksA|ENDTOKS|\relax
-    \ifx\first0\adn0
-    \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
-    \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
-    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
-    \else
-      \ifnum0=\countA\else\makelink\fi
-      \ifx\first.\let\next=\done\else
-        \let\next=\maketoks
-        \addtokens{\toksB}{\the\toksD}
-        \ifx\first,\addtokens{\toksB}{\space}\fi
-      \fi
-    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-    \next}
-  \def\makelink{\addtokens{\toksB}%
-    {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+  \def\pdfmakeurl#1{%
+    \startlink attr{/Border [0 0 0]}%
+      user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
+  }%
+  \def\endlink{\setcolor{\maincolor}\pdfendlink}
+  %
   \def\pdflink#1{\pdflinkpage{#1}{#1}}%
   \def\pdflinkpage#1#2{%
-    \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
+    \startlink attr{/Border [0 0 0]} goto name{#1}
     \setcolor{\linkcolor}#2\endlink}
-  \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
 \else
   % non-pdf mode
   \let\pdfmkdest = \gobble
@@ -1537,13 +1547,12 @@ output) for that.)}
   \let\setcolor = \gobble
   \let\pdfsetcolor = \gobble
   \let\pdfmakeoutlines = \relax
-\fi  % \ifx\pdfoutput
+\fi
 
 %
 % For XeTeX
 %
-\ifx\XeTeXrevision\thisisundefined
-\else
+\ifxetex
   %
   % XeTeX version check
   %
@@ -1569,45 +1578,8 @@ output) for that.)}
   \fi
   %
   % Color support
-  %
-  \def\rgbDarkRed{0.50 0.09 0.12}
-  \def\rgbBlack{0 0 0}
-  %
   \def\pdfsetcolor#1{\special{pdf:scolor [#1]}}
   %
-  % Set color, and create a mark which defines \thiscolor accordingly,
-  % so that \makeheadline knows which color to restore.
-  \def\setcolor#1{%
-    \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
-    \domark
-    \pdfsetcolor{#1}%
-  }
-  %
-  \def\maincolor{\rgbBlack}
-  \pdfsetcolor{\maincolor}
-  \edef\thiscolor{\maincolor}
-  \def\currentcolordefs{}
-  %
-  \def\makefootline{%
-    \baselineskip24pt
-    \line{\pdfsetcolor{\maincolor}\the\footline}%
-  }
-  %
-  \def\makeheadline{%
-    \vbox to 0pt{%
-      \vskip-22.5pt
-      \line{%
-        \vbox to8.5pt{}%
-        % Extract \thiscolor definition from the marks.
-        \getcolormarks
-        % Typeset the headline with \maincolor, then restore the color.
-        \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
-      }%
-      \vss
-    }%
-    \nointerlineskip
-  }
-  %
   % PDF outline support
   %
   % Emulate pdfTeX primitive
@@ -1645,11 +1617,6 @@ output) for that.)}
     \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
   }
   %
-  % by default, use black for everything.
-  \def\urlcolor{\rgbBlack}
-  \def\linkcolor{\rgbBlack}
-  \def\endlink{\setcolor{\maincolor}\pdfendlink}
-  %
   \def\dopdfoutline#1#2#3#4{%
     \setpdfoutlinetext{#1}
     \setpdfdestname{#3}
@@ -1663,24 +1630,30 @@ output) for that.)}
   %
   \def\pdfmakeoutlines{%
     \begingroup
-      %
       % For XeTeX, counts of subentries are not necessary.
       % Therefore, we read toc only once.
       %
       % We use node names as destinations.
       %
       % Currently we prefix the section name with the section number
-      % for chapter and appendix headings only in order to avoid too much
+      % for chapter and appendix headings only in order to avoid too much 
       % horizontal space being required in the PDF viewer.
       \def\partentry##1##2##3##4{}% ignore parts in the outlines
       \def\numchapentry##1##2##3##4{%
-        \dopdfoutline{##2 ##1}{1}{##3}{##4}}%
+        \dopdfoutline{##2 ##1}{1}{##3}{##4}%
+        \def\indexseclevel{2}}%
       \def\numsecentry##1##2##3##4{%
-        \dopdfoutline{##1}{2}{##3}{##4}}%
+        \dopdfoutline{##1}{2}{##3}{##4}%
+        \def\indexseclevel{3}}%
       \def\numsubsecentry##1##2##3##4{%
-        \dopdfoutline{##1}{3}{##3}{##4}}%
+        \dopdfoutline{##1}{3}{##3}{##4}%
+        \def\indexseclevel{4}}%
       \def\numsubsubsecentry##1##2##3##4{%
-        \dopdfoutline{##1}{4}{##3}{##4}}%
+        \dopdfoutline{##1}{4}{##3}{##4}%
+        \def\indexseclevel{5}}%
+      %
+      \def\idxinitialentry##1##2##3##4{%
+         \dopdfoutline{##1}{\indexseclevel}{idx.##1.##2}{##4}}%
       %
       \let\appentry\numchapentry%
       \let\appsecentry\numsecentry%
@@ -1696,15 +1669,25 @@ output) for that.)}
       % Therefore, the encoding and the language may not be considered.
       %
       \indexnofonts
+      \pdfaccentliterals
+      \ifnodeseen\else \dopdfoutlinecontents \fi % for @contents at beginning
+      %
       \setupdatafile
       % We can have normal brace characters in the PDF outlines, unlike
       % Texinfo index files.  So set that up.
       \def\{{\lbracecharliteral}%
       \def\}{\rbracecharliteral}%
       \catcode`\\=\active \otherbackslash
-      \input \tocreadfilename
+      \xetexpreauxfile
+      \input \tocreadfilename\relax
+      \xetexpostauxfile
+      \ifnodeseen \dopdfoutlinecontents \fi % for @contents at end
     \endgroup
   }
+  \def\dopdfoutlinecontents{%
+    \expandafter\dopdfoutline\expandafter
+      {\putwordTOC}{1}{txi.CONTENTS}{txi.CONTENTS}%
+  }
   {\catcode`[=1 \catcode`]=2
    \catcode`{=\other \catcode`}=\other
    \gdef\lbracecharliteral[{]%
@@ -1717,7 +1700,7 @@ output) for that.)}
   % However, due to a UTF-16 conversion issue of xdvipdfmx 20150315,
   % ``\special{pdf:dest ...}'' cannot handle non-ASCII strings.
   % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
-%
+  %
   \def\skipspaces#1{\def\PP{#1}\def\D{|}%
     \ifx\PP\D\let\nextsp\relax
     \else\let\nextsp\skipspaces
@@ -1732,55 +1715,17 @@ output) for that.)}
     \edef\temp{#1}%
     \expandafter\skipspaces\temp|\relax
   }
-  % make a live url in pdf output.
-  \def\pdfurl#1{%
-    \begingroup
-      % it seems we really need yet another set of dummies; have not
-      % tried to figure out what each command should do in the context
-      % of @url.  for now, just make @/ a no-op, that's the only one
-      % people have actually reported a problem with.
-      %
-      \normalturnoffactive
-      \def\@{@}%
-      \let\/=\empty
-      \makevalueexpandable
-      % do we want to go so far as to use \indexnofonts instead of just
-      % special-casing \var here?
-      \def\var##1{##1}%
-      %
-      \leavevmode\setcolor{\urlcolor}%
-      \special{pdf:bann << /Border [0 0 0]
-        /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
-    \endgroup}
+  \def\pdfmakeurl#1{%
+    \special{pdf:bann << /Border [0 0 0]
+      /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
+  }
   \def\endlink{\setcolor{\maincolor}\special{pdf:eann}}
-  \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
-  \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
-  \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
-  \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
-  \def\maketoks{%
-    \expandafter\poptoks\the\toksA|ENDTOKS|\relax
-    \ifx\first0\adn0
-    \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
-    \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
-    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
-    \else
-      \ifnum0=\countA\else\makelink\fi
-      \ifx\first.\let\next=\done\else
-        \let\next=\maketoks
-        \addtokens{\toksB}{\the\toksD}
-        \ifx\first,\addtokens{\toksB}{\space}\fi
-      \fi
-    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-    \next}
-  \def\makelink{\addtokens{\toksB}%
-    {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
   \def\pdflink#1{\pdflinkpage{#1}{#1}}%
   \def\pdflinkpage#1#2{%
     \special{pdf:bann << /Border [0 0 0]
       /Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}%
     \setcolor{\linkcolor}#2\endlink}
-  \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
-%
+  %
   %
   % @image support
   %
@@ -1837,6 +1782,164 @@ output) for that.)}
   }
 \fi
 
+% common definitions and code for pdftex, luatex and xetex
+\ifpdforxetex
+  % The dark red here is dark enough to print on paper as
+  % nearly black, but still distinguishable for online viewing.  We use
+  % black by default, though.
+  \def\rgbDarkRed{0.50 0.09 0.12}
+  \def\rgbBlack{0 0 0}
+  %
+  % Set color, and create a mark which defines \thiscolor accordingly,
+  % so that \makeheadline knows which color to restore.
+  \def\curcolor{0 0 0}%
+  \def\setcolor#1{%
+    \ifx#1\curcolor\else
+      \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
+      \domark
+      \pdfsetcolor{#1}%
+      \xdef\curcolor{#1}%
+    \fi
+  }
+  %
+  \let\maincolor\rgbBlack
+  \pdfsetcolor{\maincolor}
+  \edef\thiscolor{\maincolor}
+  \def\currentcolordefs{}
+  %
+  \def\makefootline{%
+    \baselineskip24pt
+    \line{\pdfsetcolor{\maincolor}\the\footline}%
+  }
+  %
+  \def\makeheadline{%
+    \vbox to 0pt{%
+      \vskip-22.5pt
+      \line{%
+        \vbox to8.5pt{}%
+        % Extract \thiscolor definition from the marks.
+        \getcolormarks
+        % Typeset the headline with \maincolor, then restore the color.
+        \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+      }%
+      \vss
+    }%
+    \nointerlineskip
+  }
+  %
+  % by default, use black for everything.
+  \def\urlcolor{\rgbBlack}
+  \let\linkcolor\rgbBlack
+  %
+  % make a live url in pdf output.
+  \def\pdfurl#1{%
+    \begingroup
+      % it seems we really need yet another set of dummies; have not
+      % tried to figure out what each command should do in the context
+      % of @url.  for now, just make @/ a no-op, that's the only one
+      % people have actually reported a problem with.
+      %
+      \normalturnoffactive
+      \def\@{@}%
+      \let\/=\empty
+      \makevalueexpandable
+      % do we want to go so far as to use \indexnofonts instead of just
+      % special-casing \var here?
+      \def\var##1{##1}%
+      %
+      \leavevmode\setcolor{\urlcolor}%
+      \pdfmakeurl{#1}%
+    \endgroup}
+  %
+  % \pdfgettoks - Surround page numbers in #1 with @pdflink.  #1 may
+  % be a simple number, or a list of numbers in the case of an index
+  % entry.
+  \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+  \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+  \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+  \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+  \def\maketoks{%
+    \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+    \ifx\first0\adn0
+    \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+    \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+    \else
+      \ifnum0=\countA\else\makelink\fi
+      \ifx\first.\let\next=\done\else
+        \let\next=\maketoks
+        \addtokens{\toksB}{\the\toksD}
+        \ifx\first,\addtokens{\toksB}{\space}\fi
+      \fi
+    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+    \next}
+  \def\makelink{\addtokens{\toksB}%
+    {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+  \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+\fi
+
+\ifpdforxetex
+  % for pdftex.
+  {\catcode`^^cc=13
+  \gdef\pdfaccentliteralsutfviii{%
+    % For PDF outline only.  Unicode combining accents follow the
+    % character they modify.  Note we need at least the first byte
+    % of the UTF-8 sequences to have an active catcode to allow the
+    % definitions to do their magic.
+    \def\"##1{##1^^cc^^88}%           U+0308
+    \def\'##1{##1^^cc^^81}%           U+0301
+    \def\,##1{##1^^cc^^a7}%           U+0327
+    \def\=##1{##1^^cc^^85}%           U+0305
+    \def\^##1{##1^^cc^^82}%           U+0302
+    \def\`##1{##1^^cc^^80}%           U+0300
+    \def\~##1{##1^^cc^^83}%           U+0303
+    \def\dotaccent##1{##1^^cc^^87}%   U+0307
+    \def\H##1{##1^^cc^^8b}%           U+030B
+    \def\ogonek##1{##1^^cc^^a8}%      U+0328
+    \def\ringaccent##1{##1^^cc^^8a}%  U+030A
+    \def\u##1{##1^^cc^^8c}%           U+0306
+    \def\ubaraccent##1{##1^^cc^^b1}%  U+0331
+    \def\udotaccent##1{##1^^cc^^a3}%  U+0323
+    \def\v##1{##1^^cc^^8c}%           U+030C
+    % this definition of @tieaccent will only work with exactly two characters
+    % in argument as we need to insert the combining character between them.
+    \def\tieaccent##1{\tieaccentz##1}%
+    \def\tieaccentz##1##2{##1^^cd^^a1##2} % U+0361
+  }}%
+  %
+  % for xetex and luatex, which both support extended ^^^^ escapes and
+  % process the Unicode codepoint as a single token.
+  \gdef\pdfaccentliteralsnative{%
+    \def\"##1{##1^^^^0308}%
+    \def\'##1{##1^^^^0301}%
+    \def\,##1{##1^^^^0327}%
+    \def\=##1{##1^^^^0305}%
+    \def\^##1{##1^^^^0302}%
+    \def\`##1{##1^^^^0300}%
+    \def\~##1{##1^^^^0303}%
+    \def\dotaccent##1{##1^^^^0307}%
+    \def\H##1{##1^^^^030b}%
+    \def\ogonek##1{##1^^^^0328}%
+    \def\ringaccent##1{##1^^^^030a}%
+    \def\u##1{##1^^^^0306}%
+    \def\ubaraccent##1{##1^^^^0331}%
+    \def\udotaccent##1{##1^^^^0323}%
+    \def\v##1{##1^^^^030c}%
+    \def\tieaccent##1{\tieaccentz##1}%
+    \def\tieaccentz##1##2{##1^^^^0361##2} % U+0361
+  }%
+  %
+  % use the appropriate definition
+  \ifluatex
+    \let\pdfaccentliterals\pdfaccentliteralsnative
+  \else
+    \ifxetex
+      \let\pdfaccentliterals\pdfaccentliteralsnative
+    \else
+      \let\pdfaccentliterals\pdfaccentliteralsutfviii
+    \fi
+  \fi
+\fi
 
 %
 \message{fonts,}
@@ -2697,7 +2800,7 @@ end
 }
 
 % Commands to set the quote options.
-%
+% 
 \parseargdef\codequoteundirected{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -2743,7 +2846,7 @@ end
 % If we are in a monospaced environment, however, 1) always use \ttsl,
 % and 2) do not add an italic correction.
 \def\dosmartslant#1#2{%
-  \ifusingtt
+  \ifusingtt 
     {{\ttsl #2}\let\next=\relax}%
     {\def\next{{#1#2}\smartitaliccorrection}}%
   \next
@@ -2768,15 +2871,15 @@ end
 % @cite unconditionally uses \sl with \smartitaliccorrection.
 \def\cite#1{{\sl #1}\smartitaliccorrection}
 
-% @var unconditionally uses \sl.  This gives consistency for
-% parameter names whether they are in @def, @table @code or a
-% regular paragraph.
-%  To get ttsl font for @var when used in code context, @set txicodevaristt.
-% The \null is to reset \spacefactor.
+% By default, use ttsl font for @var when used in code context.
+% To unconditionally use \sl for @var, @clear txicodevaristt.  This
+% gives consistency for parameter names whether they are in @def,
+% @table @code or a regular paragraph.
 \def\aftersmartic{}
 \def\var#1{%
   \let\saveaftersmartic = \aftersmartic
   \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
+  % The \null is to reset \spacefactor.
   %
   \ifflagclear{txicodevaristt}%
     {\def\varnext{{{\sl #1}}\smartitaliccorrection}}%
@@ -2784,7 +2887,6 @@ end
   \varnext
 }
 
-% To be removed after next release
 \def\SETtxicodevaristt{}% @set txicodevaristt
 
 \let\i=\smartitalic
@@ -2804,7 +2906,7 @@ end
 \def\ii#1{{\it #1}}             % italic font
 
 % @b, explicit bold.  Also @strong.
-\def\b#1{{\bf #1}}
+\def\b#1{{\bf \defcharsdefault #1}}
 \let\strong=\b
 
 % @sansserif, explicit sans.
@@ -2922,7 +3024,7 @@ end
   \gdef\codedash{\futurelet\next\codedashfinish}
   \gdef\codedashfinish{%
     \normaldash % always output the dash character itself.
-    %
+    % 
     % Now, output a discretionary to allow a line break, unless
     % (a) the next character is a -, or
     % (b) the preceding character is a -, or
@@ -3028,25 +3130,25 @@ end
         % For pdfTeX and LuaTeX
         \ifurefurlonlylink
           % PDF plus option to not display url, show just arg
-          \unhbox0
+          \unhbox0             
         \else
           % PDF, normally display both arg and url for consistency,
           % visibility, if the pdf is eventually used to print, etc.
           \unhbox0\ (\urefcode{#1})%
         \fi
       \else
-        \ifx\XeTeXrevision\thisisundefined
-          \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
-        \else
+        \ifxetex
           % For XeTeX
           \ifurefurlonlylink
             % PDF plus option to not display url, show just arg
-            \unhbox0
+            \unhbox0             
           \else
             % PDF, normally display both arg and url for consistency,
             % visibility, if the pdf is eventually used to print, etc.
             \unhbox0\ (\urefcode{#1})%
           \fi
+        \else
+          \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
         \fi
       \fi
     \else
@@ -3099,10 +3201,10 @@ end
   }
 }
 
-% By default we'll break after the special characters, but some people like to
-% break before the special chars, so allow that.  Also allow no breaking at
+% By default we'll break after the special characters, but some people like to 
+% break before the special chars, so allow that.  Also allow no breaking at 
 % all, for manual control.
-%
+% 
 \parseargdef\urefbreakstyle{%
   \def\txiarg{#1}%
   \ifx\txiarg\wordnone
@@ -3121,16 +3223,17 @@ end
 \def\wordnone{none}
 
 % Allow a ragged right output to aid breaking long URL's.  There can
-% be a break at the \allowbreak with no extra glue (if the existing stretch in
+% be a break at the \allowbreak with no extra glue (if the existing stretch in 
 % the line is sufficient), a break at the \penalty with extra glue added
 % at the end of the line, or no break at all here.
-%   Changing the value of the penalty and/or the amount of stretch affects how
+%   Changing the value of the penalty and/or the amount of stretch affects how 
 % preferable one choice is over the other.
+%   Check test cases in doc/texinfo-tex-test.texi before making any changes.
 \def\urefallowbreak{%
   \penalty0\relax
-  \hskip 0pt plus 2 em\relax
+  \hskip 0pt plus 3 em\relax
   \penalty1000\relax
-  \hskip 0pt plus -2 em\relax
+  \hskip 0pt plus -3 em\relax
 }
 
 \urefbreakstyle after
@@ -3339,7 +3442,7 @@ $$%
 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
 % except specified as a normal braced arg, so no newlines to worry about.
-%
+% 
 \def\outfmtnametex{tex}
 %
 \long\def\inlinefmt#1{\doinlinefmt #1,\finish}
@@ -3347,7 +3450,7 @@ $$%
   \def\inlinefmtname{#1}%
   \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
 }
-%
+% 
 % @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
 % FMTNAME is tex, else ELSE-TEXT.
 \long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish}
@@ -3363,7 +3466,7 @@ $$%
 % *right* brace they would have to use a command anyway, so they may as
 % well use a command to get a left brace too.  We could re-use the
 % delimiter character idea from \verb, but it seems like overkill.
-%
+% 
 \long\def\inlineraw{\tex \doinlineraw}
 \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
 \def\doinlinerawtwo#1,#2,\finish{%
@@ -3649,7 +3752,7 @@ $$%
 % for non-CM glyphs.  That is ec* for regular text and tc* for the text
 % companion symbols (LaTeX TS1 encoding).  Both are part of the ec
 % package and follow the same conventions.
-%
+% 
 \def\ecfont{\etcfont{e}}
 \def\tcfont{\etcfont{t}}
 %
@@ -3665,15 +3768,24 @@ $$%
      {\font\thisecfont = #1ctt\ecsize \space at \nominalsize}%
   % else
      {\ifx\curfontstyle\bfstylename
-        % bold:
-        \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+        \etcfontbold{#1}%
       \else
-        % regular:
-        \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+        \ifrmisbold
+          \etcfontbold{#1}%
+        \else
+          % regular:
+          \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space
+            at \nominalsize
+        \fi
       \fi}%
   \thisecfont
 }
 
+\def\etcfontbold#1{%
+  % bold:
+  \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+}
+
 % @registeredsymbol - R in a circle.  The font for the R should really
 % be smaller yet, but lllsize is the best we can do for now.
 % Adapted from the plain.tex definition of \copyright.
@@ -3731,7 +3843,7 @@ $$%
               after the title page.}}%
 \def\setshortcontentsaftertitlepage{%
   \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
-              command; move your @shortcontents and @contents commands if you
+              command; move your @shortcontents and @contents commands if you 
               want the contents after the title page.}}%
 
 \parseargdef\shorttitlepage{%
@@ -3776,7 +3888,8 @@ $$%
 }
 
 \def\finishtitlepage{%
-  \vskip4pt \hrule height 2pt width \hsize
+  \ifseenauthor \vskip4pt \else \vskip 0pt plus 1filll \fi
+  \hrule height 2pt width \hsize
   \vskip\titlepagebottomglue
   \finishedtitlepagetrue
 }
@@ -3785,7 +3898,7 @@ $$%
 % don't worry much about spacing, ragged right.  This should be used
 % inside a \vbox, and fonts need to be set appropriately first. \par should
 % be specified before the end of the \vbox, since a vbox is a group.
-%
+% 
 \def\raggedtitlesettings{%
   \rm
   \hyphenpenalty=10000
@@ -3799,33 +3912,105 @@ $$%
 \let\subtitlerm=\rmfont
 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
 
+\let\savedtitle\empty
+\let\savedsubtitlegroup\empty
+\let\savedauthorgroup\empty
+
 \parseargdef\title{%
-  \checkenv\titlepage
-  \vbox{\titlefonts \raggedtitlesettings #1\par}%
-  % print a rule at the page bottom also.
-  \finishedtitlepagefalse
-  \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+  \expandafter\ifx\thisenv\documentinfo
+    \gdef\savedtitle{#1}%
+  \else
+    \checkenv\titlepage
+    \vbox{\titlefonts \raggedtitlesettings #1\par}%
+    % print a rule at the page bottom also.
+    \finishedtitlepagefalse
+    \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+  \fi
 }
 
 \parseargdef\subtitle{%
-  \checkenv\titlepage
-  {\subtitlefont \rightline{#1}}%
+  \expandafter\ifx\thisenv\documentinfo
+    \ifx\savedsubtitlegroup\empty
+      \gdef\savedsubtitlegroup{\savedsubtitle{#1}}%
+    \else
+      \expandafter\gdef\expandafter\savedsubtitlegroup\expandafter{%
+        \savedsubtitlegroup\savedsubtitle{#1}}%
+    \fi
+  \else
+    \checkenv\titlepage
+    {\subtitlefont \rightline{#1}}%
+  \fi
 }
 
 % @author should come last, but may come many times.
 % It can also be used inside @quotation.
 %
 \parseargdef\author{%
-  \def\temp{\quotation}%
-  \ifx\thisenv\temp
-    \def\quotationauthor{#1}% printed in \Equotation.
+  \expandafter\ifx\thisenv\documentinfo
+    \ifx\savedauthorgroup\empty
+      \gdef\savedauthorgroup{\savedauthor{#1}}%
+    \else
+      \expandafter\gdef\expandafter\savedauthorgroup\expandafter{%
+        \savedauthorgroup\savedauthor{#1}}%
+    \fi
   \else
-    \checkenv\titlepage
-    \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
-    {\secfonts\rm \leftline{#1}}%
+    \def\temp{\quotation}%
+    \ifx\thisenv\temp
+      \def\quotationauthor{#1}% printed in \Equotation.
+    \else
+      \checkenv\titlepage
+      \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
+      {\secfonts\rm \leftline{#1}}%
+    \fi
   \fi
 }
 
+% @maketitle
+{\obeylines
+\gdef\maketitle{%
+\titlepage
+\ifx\savedtitle\empty\else
+  \title \savedtitle
+  \ifx\savedsubtitlegroup\empty\else
+    \savedsubtitlegroup
+\fi\fi
+\ifx\savedauthorgroup\empty\else
+  \savedauthorgroup
+\fi
+% start verso page if either copying or publication text is given
+\ifx\copyingtext\relax
+  \ifx\publicationtext\relax\else
+    \page \vskip 0pt plus 1filll
+  \fi
+\else
+  \page \vskip 0pt plus 1filll
+\fi
+\ifx\publicationtext\relax\else
+  \insertpublication
+  \sp 1
+\fi
+\ifx\copyingtext\relax\else
+  \insertcopying
+\fi
+\end titlepage
+}
+
+% \savedauthor{#1}, called with braces.  output an @author line.
+\gdef\savedauthor#1{%
+\author#1
+}
+
+% \savedsubtitle{#1}, called with braces.  output a @subtitle line.
+\gdef\savedsubtitle#1{%
+\subtitle#1
+}
+} % \obeylines
+
+% @documentinfo block
+\envdef\documentinfo{%
+}
+\def\Edocumentinfo{}%
+
 
 % Set up page headings and footings.
 
@@ -4611,7 +4796,7 @@ $$%
 % Like \expandablevalue, but completely expandable (the \message in the
 % definition above operates at the execution level of TeX).  Used when
 % writing to auxiliary files, due to the expansion that \write does.
-% If flag is undefined, pass through an unexpanded @value command: maybe it
+% If flag is undefined, pass through an unexpanded @value command: maybe it 
 % will be set by the time it is read back in.
 %
 % NB flag names containing - or _ may not work here.
@@ -4635,7 +4820,7 @@ $$%
 
 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
 % with @set.
-%
+% 
 % To get the special treatment we need for `@end ifset,' we call
 % \makecond and then redefine.
 %
@@ -4668,7 +4853,7 @@ $$%
 % without the @) is in fact defined.  We can only feasibly check at the
 % TeX level, so something like `mathcode' is going to considered
 % defined even though it is not a Texinfo command.
-%
+% 
 \makecond{ifcommanddefined}
 \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
 %
@@ -4774,7 +4959,7 @@ $$%
 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
 \def\docodeindexxxx #1{\docind{\indexname}{#1}}
 
-
+
 % \definedummyword defines \#1 as \string\#1\space, thus effectively
 % preventing its expansion.  This is used only for control words,
 % not control letters, because the \space would be incorrect for
@@ -4791,7 +4976,7 @@ $$%
 \def\definedummyword  #1{\def#1{\string#1\space}}%
 \def\definedummyletter#1{\def#1{\string#1}}%
 
-% Used for the aux, toc and index files to prevent expansion of Texinfo
+% Used for the aux, toc and index files to prevent expansion of Texinfo 
 % commands.  Most of the commands are controlled through the
 % \ifdummies conditional.
 %
@@ -5065,8 +5250,8 @@ $$%
   %
   \uccode`\1=`\{ \uppercase{\def\{{1}}%
   \uccode`\1=`\} \uppercase{\def\}{1}}%
-  \let\lbracechar\{%
-  \let\rbracechar\}%
+  \def\lbracechar##1{\{}%
+  \def\rbracechar##1{\}}%
   %
   %
   % We need to get rid of all macros, leaving only the arguments (if present).
@@ -5081,7 +5266,7 @@ $$%
   \let\value\indexnofontsvalue
 }
 
-
+
 
 
 % #1 is the index name, #2 is the entry text.
@@ -5122,7 +5307,7 @@ $$%
   \ifx\suffix\indexisfl\def\suffix{f1}\fi
   % Open the file
   \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
-  % Using \immediate above here prevents an object entering into the current
+  % Using \immediate above here prevents an object entering into the current 
   % box, which could confound checks such as those in \safewhatsit for
   % preceding skips.
   \typeout{Writing index file \jobname.\suffix}%
@@ -5174,7 +5359,7 @@ $$%
   \ifx\segment\isfinish
   \else
     %
-    % Fully expand the segment, throwing away any @sortas directives, and
+    % Fully expand the segment, throwing away any @sortas directives, and 
     % trim spaces.
     \edef\trimmed{\segment}%
     \edef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
@@ -5266,7 +5451,7 @@ $$%
   \def\}{\rbracechar{}}%
   \uccode`\~=`\\ \uppercase{\def~{\backslashchar{}}}%
   %
-  % Split the entry into primary entry and any subentries, and get the index
+  % Split the entry into primary entry and any subentries, and get the index 
   % sort key.
   \splitindexentry\indextext
   %
@@ -5411,6 +5596,8 @@ $$%
   \tolerance = 9500
   \plainfrenchspacing
   \everypar = {}% don't want the \kern\-parindent from indentation suppression.
+  \let\entry\indexentry
+  \ifxetex\xetexpreauxfile\fi
   %
   % See comment in \requireopenindexfile.
   \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
@@ -5436,8 +5623,12 @@ $$%
     \fi
   \fi
   \closein 1
+  \ifxetex\xetexpostauxfile\fi
 \endgroup}
 
+% Checked in @bye
+\let\byeerror\relax
+
 % If the index file starts with a backslash, forgo reading the index
 % file altogether.  If somebody upgrades texinfo.tex they may still have
 % old index files using \ as the escape character.  Reading this would
@@ -5446,19 +5637,21 @@ $$%
   \ifflagclear{txiindexescapeisbackslash}{%
     \uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1
       \ifflagclear{txiskipindexfileswithbackslash}{%
-\errmessage{%
-ERROR: A sorted index file in an obsolete format was skipped.
+        % Delay the error message until the very end to give a chance
+        % for the whole index to be output as input for texindex.
+        \global\def\byeerror{%
+ERROR: A sorted index file in an obsolete format was skipped.  
 To fix this problem, please upgrade your version of 'texi2dvi'
 or 'texi2pdf' to that at <https://ftp.gnu.org/gnu/texinfo>.
-If you are using an old version of 'texindex' (part of the Texinfo
+If you are using an old version of 'texindex' (part of the Texinfo 
 distribution), you may also need to upgrade to a newer version (at least 6.0).
 You may be able to typeset the index if you run
 'texindex \jobname.\indexname' yourself.
-You could also try setting the 'txiindexescapeisbackslash' flag by
+You could also try setting the 'txiindexescapeisbackslash' flag by 
 running a command like
-'texi2dvi -t "@set txiindexescapeisbackslash" \jobname.texi'.  If you do
+'texi2dvi -t "@set txiindexescapeisbackslash" \jobname.texi'.  If you do 
 this, Texinfo will try to use index files in the old format.
-If you continue to have problems, deleting the index files and starting again
+If you continue to have problems, deleting the index files and starting again 
 might help (with 'rm \jobname.?? \jobname.??s')%
 }%
       }{%
@@ -5466,7 +5659,9 @@ might help (with 'rm \jobname.?? \jobnam
       }%
     \else
       \begindoublecolumns
+      \ifxetex\xetexpreauxfile\fi
       \input \jobname.\indexname s
+      \ifxetex\xetexpostauxfile\fi
       \enddoublecolumns
     \fi
   }{%
@@ -5477,11 +5672,39 @@ might help (with 'rm \jobname.?? \jobnam
     % should work because we (hopefully) don't otherwise use @ in index files.
     %\catcode`\@=12\relax
     \catcode`\@=0\relax
+    \ifxetex\xetexpreauxfile\fi
     \input \jobname.\indexname s
+    \ifxetex\xetexpostauxfile\fi
     \enddoublecolumns
   }%
 }
 
+\def\indexentry#1#2{%
+  \let\entrypagetarget\empty
+  \ifpdforxetex
+    % only link the index text to the page if no comma appears in the
+    % list of pages, i.e. there is only one page
+    \checkpagelistcomma{#2}\pagelistcomma
+    \expandafter\ifcase\pagelistcomma
+      \def\entrypagetarget{#2}%
+    \fi
+  \fi%
+  \entryinternal{#1}{#2}%
+}
+
+\def\checkpagelistcomma#1#2{%
+  \checkpagelistcommaxx#2#1,\finish
+}
+\def\checkpagelistcommaxx#1#2,#3\finish{%
+  \def\tmp{#3}%
+  \ifx\tmp\empty
+    \def#1{0\relax}
+  \else
+    \def#1{1\relax}
+  \fi
+}
+
+
 % These macros are used by the sorted index file itself.
 % Change them to control the appearance of the index.
 
@@ -5518,7 +5741,6 @@ might help (with 'rm \jobname.?? \jobnam
 
 \def\initial{%
   \bgroup
-  \initialglyphs
   \initialx
 }
 
@@ -5531,7 +5753,7 @@ might help (with 'rm \jobname.?? \jobnam
   % bottom of a column to reduce an increase in inter-line spacing.
   \nobreak
   \vskip 0pt plus 5\baselineskip
-  \penalty -300
+  \penalty -300 
   \vskip 0pt plus -5\baselineskip
   %
   % Typeset the initial.  Making this add up to a whole number of
@@ -5541,7 +5763,10 @@ might help (with 'rm \jobname.?? \jobnam
   %
   % No shrink because it confuses \balancecolumns.
   \vskip 1.67\baselineskip plus 1\baselineskip
-  \leftline{\secfonts \kern-0.05em \secbf #1}%
+  \doindexinitialentry{#1}%
+  \initialglyphs
+  \leftline{%
+    \secfonts \kern-0.05em \secbf #1}%
   % \secfonts is inside the argument of \leftline so that the change of
   % \baselineskip will not affect any glue inserted before the vbox that
   % \leftline creates.
@@ -5551,6 +5776,28 @@ might help (with 'rm \jobname.?? \jobnam
   \egroup % \initialglyphs
 }
 
+\def\doindexinitialentry#1{%
+  \ifpdforxetex
+    \global\advance\idxinitialno by 1
+    \def\indexlbrace{\{}%
+    \def\indexrbrace{\}}%
+    \def\indexbackslash{\realbackslash}%
+    \def\indexatchar{\@}%
+    \writetocentry{idxinitial}{\asis #1}{IDX\the\idxinitialno}%
+    % The @asis removes a pair of braces around e.g. {@indexatchar} that
+    % are output by texindex.
+    %
+    \pdfmkdest{idx.\asis #1.IDX\the\idxinitialno}%
+  \fi
+}
+
+% No listing in TOC
+\def\idxinitialentry#1#2#3#4{}
+
+% For index initials.
+\newcount\idxinitialno \idxinitialno=1
+
+
 \newdimen\entryrightmargin
 \entryrightmargin=0pt
 
@@ -5559,16 +5806,18 @@ might help (with 'rm \jobname.?? \jobnam
 \newdimen\entrycontskip
 \entrycontskip=1em
 
-% for PDF output, whether to make the text of the entry a link to the page
-% number.  set for @contents and @shortcontents where there is only one
-% page number.
+% for PDF output, whether to make the text of the entry a link to the section.
+% set for @contents and @shortcontents.
 \newif\iflinkentrytext
 
-% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
-% then page number (#2) flushed to the right margin.  It is used for index
-% and table of contents entries.  The paragraph is indented by \leftskip.
-%
-\def\entry{%
+% \entryinternal typesets a paragraph consisting of the text (#1), dot
+% leaders, and then page number (#2) flushed to the right margin.  It is
+% used for index and table of contents entries.  The paragraph is indented
+% by \leftskip.
+% For PDF output, if \linkentrytexttrue and \tocnodetarget is set, link text
+% to the referenced node.  Else if \entrypagetarget is set, link text to the
+% page.
+\def\entryinternal{%
   \begingroup
     %
     % Start a new paragraph if necessary, so our assignments below can't
@@ -5608,9 +5857,19 @@ might help (with 'rm \jobname.?? \jobnam
     \global\setbox\boxA=\hbox\bgroup
       \ifpdforxetex
         \iflinkentrytext
-          \pdflinkpage{#1}{\unhbox\boxA}%
+          \ifx\tocnodetarget\empty
+            \unhbox\boxA
+          \else
+            \startxreflink{\tocnodetarget}{}%
+            \unhbox\boxA
+            \endlink
+          \fi
         \else
-          \unhbox\boxA
+          \ifx\entrypagetarget\empty
+            \unhbox\boxA
+          \else
+            \pdflinkpage{\entrypagetarget}{\unhbox\boxA}%
+          \fi
         \fi
       \else
         \unhbox\boxA
@@ -5625,11 +5884,18 @@ might help (with 'rm \jobname.?? \jobnam
         %
         \null\nobreak\indexdotfill % Have leaders before the page number.
         %
+        \hskip\skip\thinshrinkable
         \ifpdforxetex
-          \pdfgettoks#1.%
-          \hskip\skip\thinshrinkable\the\toksA
+          \ifx\tocnodetarget\empty
+            \pdfgettoks#1.%
+            \the\toksA
+          \else
+            % Should just be a single page number in toc
+            \startxreflink{\tocnodetarget}{}%
+            #1\endlink
+          \fi
         \else
-          \hskip\skip\thinshrinkable #1%
+          #1%
         \fi
       \fi
     \egroup % end \boxA
@@ -5851,7 +6117,7 @@ might help (with 'rm \jobname.?? \jobnam
 \newbox\balancedcolumns
 \setbox\balancedcolumns=\vbox{shouldnt see this}%
 %
-% Only called for the last of the double column material.  \doublecolumnout
+% Only called for the last of the double column material.  \doublecolumnout 
 % does the others.
 \def\balancecolumns{%
   \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120.
@@ -5879,7 +6145,7 @@ might help (with 'rm \jobname.?? \jobnam
     }%
     % Now the left column is in box 1, and the right column in box 3.
     %
-    % Check whether the left column has come out higher than the page itself.
+    % Check whether the left column has come out higher than the page itself.  
     % (Note that we have doubled \vsize for the double columns, so
     % the actual height of the page is 0.5\vsize).
     \ifdim2\ht1>\vsize
@@ -6175,7 +6441,7 @@ might help (with 'rm \jobname.?? \jobnam
 \let\top\unnumbered
 
 % Sections.
-%
+% 
 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
 \def\seczzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
@@ -6198,7 +6464,7 @@ might help (with 'rm \jobname.?? \jobnam
 }
 
 % Subsections.
-%
+% 
 % normally calls numberedsubseczzz:
 \outer\parseargdef\numberedsubsec{\numhead2{#1}}
 \def\numberedsubseczzz#1{%
@@ -6222,7 +6488,7 @@ might help (with 'rm \jobname.?? \jobnam
 }
 
 % Subsubsections.
-%
+% 
 % normally numberedsubsubseczzz:
 \outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
 \def\numberedsubsubseczzz#1{%
@@ -6275,6 +6541,10 @@ might help (with 'rm \jobname.?? \jobnam
 \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
   \suppressfirstparagraphindent}
 
+% @xrefname - give text with printed name for linking to node and allow
+% referencing node, but do not print any heading.
+\parseargdef\xrefname{\donoderef{Yomitfromtoc}{#1}}%
+
 % These macros generate a chapter, section, etc. heading only
 % (including whitespace, linebreaking, etc. around it),
 % given all the information in convenient, parsed form.
@@ -6396,11 +6666,6 @@ might help (with 'rm \jobname.?? \jobnam
     \chapfonts \rm
     \let\footnote=\errfootnoteheading % give better error message
     %
-    % Have to define \currentsection before calling \donoderef, because the
-    % xref code eventually uses it.  On the other hand, it has to be called
-    % after \pchapsepmacro, or the headline will change too soon.
-    \gdef\currentsection{#1}%
-    %
     % Only insert the separating space if we have a chapter/appendix
     % number, and don't print the unnumbered ``number''.
     \ifx\temptype\Ynothingkeyword
@@ -6427,7 +6692,7 @@ might help (with 'rm \jobname.?? \jobnam
     % been typeset.  If the destination for the pdf outline is after the
     % text, then jumping from the outline may wind up with the text not
     % being visible, for instance under high magnification.
-    \donoderef{#2}%
+    \donoderef{#2}{#1}%
     %
     % Typeset the actual heading.
     \nobreak % Avoid page breaks at the interline glue.
@@ -6543,21 +6808,17 @@ might help (with 'rm \jobname.?? \jobnam
     \ifx\temptype\Ynothingkeyword
       \setbox0 = \hbox{}%
       \def\toctype{unn}%
-      \gdef\currentsection{#1}%
     \else\ifx\temptype\Yomitfromtockeyword
-      % for @headings -- no section number, don't include in toc,
-      % and don't redefine \currentsection.
+      % for @headings -- no section number, don't include in toc.
       \setbox0 = \hbox{}%
       \def\toctype{omit}%
       \let\sectionlevel=\empty
     \else\ifx\temptype\Yappendixkeyword
       \setbox0 = \hbox{#4\enspace}%
       \def\toctype{app}%
-      \gdef\currentsection{#1}%
     \else
       \setbox0 = \hbox{#4\enspace}%
       \def\toctype{num}%
-      \gdef\currentsection{#1}%
     \fi\fi\fi
     %
     % Write the toc entry (before \donoderef).  See comments in \chapmacro.
@@ -6565,7 +6826,7 @@ might help (with 'rm \jobname.?? \jobnam
     %
     % Write the node reference (= pdf destination for pdftex).
     % Again, see comments in \chapmacro.
-    \donoderef{#3}%
+    \donoderef{#3}{#1}%
     %
     % Interline glue will be inserted when the vbox is completed.
     % That glue will be a valid breakpoint for the page, since it'll be
@@ -6759,12 +7020,13 @@ might help (with 'rm \jobname.?? \jobnam
 
 % Prepare to read what we've written to \tocfile.
 %
-\def\startcontents#1{%
+\def\startcontents#1#2{%
   % If @setchapternewpage on, and @headings double, the contents should
   % start on an odd page, unlike chapters.
   \contentsalignmacro
   \immediate\closeout\tocfile
   %
+  #2%
   % Don't need to put `Contents' or `Short Contents' in the headline.
   % It is abundantly clear what they are.
   \chapmacro{#1}{Yomitfromtoc}{}%
@@ -6784,7 +7046,7 @@ might help (with 'rm \jobname.?? \jobnam
 
 % \raggedbottom in plain.tex hardcodes \topskip so override it
 \catcode`\@=11
-\def\raggedbottom{\advance\topskip by 0pt plus60pt \r@ggedbottomtrue}
+\def\raggedbottom{\advance\topskip by 0pt plus30pt \r@ggedbottomtrue}
 \catcode`\@=\other
 
 % redefined for the two-volume lispref.  We always output on
@@ -6795,7 +7057,9 @@ might help (with 'rm \jobname.?? \jobnam
 % Normal (long) toc.
 %
 \def\contents{%
-  \startcontents{\putwordTOC}%
+  \startcontents{\putwordTOC}{\contentsmkdest}%
+    \ifxetex\xetexpreauxfile\fi
+    \penalty2 % mark beginning of contents
     \openin 1 \tocreadfilename\space
     \ifeof 1 \else
       \findsecnowidths
@@ -6807,13 +7071,18 @@ might help (with 'rm \jobname.?? \jobnam
       \pdfmakeoutlines
     \fi
     \closein 1
+    \ifxetex\xetexpostauxfile\fi
   \endgroup
   \contentsendroman
 }
 
+\def\contentsmkdest{%
+  \pdfmkdest{txi.CONTENTS}%
+}
+
 % And just the chapters.
 \def\summarycontents{%
-  \startcontents{\putwordShortTOC}%
+  \startcontents{\putwordShortTOC}{}%
     %
     \let\partentry = \shortpartentry
     \let\numchapentry = \shortchapentry
@@ -6836,11 +7105,13 @@ might help (with 'rm \jobname.?? \jobnam
     \let\numsubsubsecentry = \numsecentry
     \let\appsubsubsecentry = \numsecentry
     \let\unnsubsubsecentry = \numsecentry
+    \ifxetex\xetexpreauxfile\fi
     \openin 1 \tocreadfilename\space
     \ifeof 1 \else
       \readtocfile
     \fi
     \closein 1
+    \ifxetex\xetexpostauxfile\fi
     \vfill \eject
     \contentsalignmacro % in case @setchapternewpage odd is in effect
   \endgroup
@@ -6881,36 +7152,45 @@ might help (with 'rm \jobname.?? \jobnam
 %   #3 - level of section (e.g "chap", "sec")
 %   #4 - page number
 
-% Parts, in the main contents.  Replace the part number, which doesn't
-% exist, with an empty box.  Let's hope all the numbers have the same width.
-% Also ignore the page number, which is conventionally not printed.
-\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
+% Parts, in the main contents.  Ignore the page number, which is
+% conventionally not printed.
 \def\partentry#1#2#3#4{%
+  \ifnum\lastpenalty = 2
+    % use less space if at very first entry of contents
+    \vskip 1\baselineskip plus .33\baselineskip minus .25\baselineskip
+  \else
+    \vskip 2\baselineskip plus .66\baselineskip minus .5\baselineskip
+  \fi
   % Add stretch and a bonus for breaking the page before the part heading.
   % This reduces the chance of the page being broken immediately after the
   % part heading, before a following chapter heading.
-  \vskip 0pt plus 5\baselineskip
+  \vskip 0pt plus 3\baselineskip
   \penalty-300
-  \vskip 0pt plus -5\baselineskip
-  \dochapentry{#1}{\numeralbox}{}%
+  \vskip 0pt plus -3\baselineskip
+  \begingroup
+    \secfonts \rm
+    \entryinternal{#1}{}%
+  \endgroup
+  \afterpartentrytrue
 }
+\newif\ifafterpartentry
 %
 % Parts, in the short toc.
 \def\shortpartentry#1#2#3#4{%
   \penalty-300
   \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
-  \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
+  \tocentry{{\bf #1}}{}{}{}%
 }
 
 % Chapters, in the main contents.
 \def\numchapentry#1#2#3#4{%
   \retrievesecnowidth\secnowidthchap{#2}%
-  \dochapentry{#1}{#2}{#4}%
+  \dochapentry{#1}{#2}{#3}{#4}%
 }
 
 % Chapters, in the short toc.
 \def\shortchapentry#1#2#3#4{%
-  \tocentry{#1}{\shortchaplabel{#2}}{#4}%
+  \tocentry{#1}{\shortchaplabel{#2}}{#3}{#4}%
 }
 
 % Appendices, in the main contents.
@@ -6923,79 +7203,83 @@ might help (with 'rm \jobname.?? \jobnam
 %
 \def\appentry#1#2#3#4{%
   \retrievesecnowidth\secnowidthchap{#2}%
-  \dochapentry{\appendixbox{#2}\hskip.7em#1}{}{#4}%
+  \dochapentry{\appendixbox{#2}\hskip.7em#1}{}{#3}{#4}%
 }
 
 % Unnumbered chapters.
-\def\unnchapentry#1#2#3#4{\dochapentry{#1}{}{#4}}
-\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{}{#4}}
+\def\unnchapentry#1#2#3#4{\dochapentry{#1}{}{#3}{#4}}
+\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{}{#3}{#4}}
 
 % Sections.
-\def\numsecentry#1#2#3#4{\dosecentry{#1}{#2}{#4}}
-
 \def\numsecentry#1#2#3#4{%
   \retrievesecnowidth\secnowidthsec{#2}%
-  \dosecentry{#1}{#2}{#4}%
+  \dosecentry{#1}{#2}{#3}{#4}%
 }
 \let\appsecentry=\numsecentry
 \def\unnsecentry#1#2#3#4{%
   \retrievesecnowidth\secnowidthsec{#2}%
-  \dosecentry{#1}{}{#4}%
+  \dosecentry{#1}{}{#3}{#4}%
 }
 
 % Subsections.
 \def\numsubsecentry#1#2#3#4{%
   \retrievesecnowidth\secnowidthssec{#2}%
-  \dosubsecentry{#1}{#2}{#4}%
+  \dosubsecentry{#1}{#2}{#3}{#4}%
 }
 \let\appsubsecentry=\numsubsecentry
 \def\unnsubsecentry#1#2#3#4{%
   \retrievesecnowidth\secnowidthssec{#2}%
-  \dosubsecentry{#1}{}{#4}%
+  \dosubsecentry{#1}{}{#3}{#4}%
 }
 
 % And subsubsections.
-\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#2}{#4}}
+\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#2}{#3}{#4}}
 \let\appsubsubsecentry=\numsubsubsecentry
-\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{}{#4}}
+\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{}{#3}{#4}}
 
 % This parameter controls the indentation of the various levels.
 % Same as \defaultparindent.
 \newdimen\tocindent \tocindent = 15pt
 
 % Now for the actual typesetting. In all these, #1 is the text, #2 is
-% a section number if present, and #3 is the page number.
+% a section number if present, #3 is the node, and #4 is the page number.
 %
 % If the toc has to be broken over pages, we want it to be at chapters
 % if at all possible; hence the \penalty.
-\def\dochapentry#1#2#3{%
-   \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
+\def\dochapentry#1#2#3#4{%
+   \ifafterpartentry
+     \afterpartentryfalse
+     \penalty5000
+   \else
+     \penalty-300
+   \fi
+   \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
    \begingroup
      % Move the page numbers slightly to the right
      \advance\entryrightmargin by -0.05em
      \chapentryfonts
      \extrasecnoskip=0.4em % separate chapter number more
-     \tocentry{#1}{#2}{#3}%
+     \tocentry{#1}{#2}{#3}{#4}%
    \endgroup
    \nobreak\vskip .25\baselineskip plus.1\baselineskip
 }
 
-\def\dosecentry#1#2#3{\begingroup
+\def\dosecentry#1#2#3#4{\begingroup
   \secnowidth=\secnowidthchap
   \secentryfonts \leftskip=\tocindent
-  \tocentry{#1}{#2}{#3}%
+  \tocentry{#1}{#2}{#3}{#4}%
 \endgroup}
 
-\def\dosubsecentry#1#2#3{\begingroup
+\def\dosubsecentry#1#2#3#4{\begingroup
   \secnowidth=\secnowidthsec
   \subsecentryfonts \leftskip=2\tocindent
-  \tocentry{#1}{#2}{#3}%
+  \tocentry{#1}{#2}{#3}{#4}%
 \endgroup}
 
-\def\dosubsubsecentry#1#2#3{\begingroup
+\def\dosubsubsecentry#1#2#3#4{\begingroup
   \secnowidth=\secnowidthssec
   \subsubsecentryfonts \leftskip=3\tocindent
-  \tocentry{#1}{#2}{#3}%
+  \tocentry{#1}{#2}{#3}{#4}%
 \endgroup}
 
 % Used for the maximum width of a section number so we can align
@@ -7005,12 +7289,16 @@ might help (with 'rm \jobname.?? \jobnam
 \newdimen\extrasecnoskip
 \extrasecnoskip=0pt
 
-% \tocentry{TITLE}{SEC NO}{PAGE}
+\let\tocnodetarget\empty
+\let\entrypagetarget\empty
+
+% \tocentry{TITLE}{SEC NO}{NODE}{PAGE}
 %
-\def\tocentry#1#2#3{%
+\def\tocentry#1#2#3#4{%
+  \def\tocnodetarget{#3}%
   \def\secno{#2}%
   \ifx\empty\secno
-    \entry{#1}{#3}%
+    \entryinternal{#1}{#4}%
   \else
     \ifdim 0pt=\secnowidth
       \setbox0=\hbox{#2\hskip\labelspace\hskip\extrasecnoskip}%
@@ -7021,7 +7309,7 @@ might help (with 'rm \jobname.?? \jobnam
         #2\hskip\labelspace\hskip\extrasecnoskip\hfill}%
     \fi
     \entrycontskip=\wd0
-    \entry{\box0 #1}{#3}%
+    \entryinternal{\box0 #1}{#4}%
   \fi
 }
 \newdimen\labelspace
@@ -7406,7 +7694,7 @@ might help (with 'rm \jobname.?? \jobnam
 
 % @indentedblock is like @quotation, but indents only on the left and
 % has no optional argument.
-%
+% 
 \makedispenvdef{indentedblock}{\indentedblockstart}
 %
 \def\indentedblockstart{%
@@ -7594,6 +7882,7 @@ might help (with 'rm \jobname.?? \jobnam
 {\catcode`\ =\other
 \gdef\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
 }
+\let\copyingtext\relax
 
 \def\insertcopying{%
   \begingroup
@@ -7602,6 +7891,18 @@ might help (with 'rm \jobname.?? \jobnam
   \endgroup
 }
 
+\def\publication{\checkenv{}\begingroup\macrobodyctxt\dopublication}
+{\catcode`\ =\other
+\gdef\dopublication#1@end publication{\endgroup\def\publicationtext{#1}}
+}
+\let\publicationtext\relax
+
+\def\insertpublication{%
+  \begingroup
+    \parindent = 0pt  % paragraph indentation looks wrong on title page
+    \scanexp\publicationtext
+  \endgroup
+}
 
 \message{defuns,}
 % @defun etc.
@@ -7720,7 +8021,7 @@ might help (with 'rm \jobname.?? \jobnam
 % @deftypefnnewline on|off says whether the return type of typed functions
 % are printed on their own line.  This affects @deftypefn, @deftypefun,
 % @deftypeop, and @deftypemethod.
-%
+% 
 \parseargdef\deftypefnnewline{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -7890,7 +8191,7 @@ might help (with 'rm \jobname.?? \jobnam
       \tclose{\temp}% typeset the return type
       \ifrettypeownline
         % put return type on its own line; prohibit line break following:
-        \hfil\vadjust{\nobreak}\break
+        \hfil\vadjust{\nobreak}\break  
       \else
         \space  % type on same line, so just followed by a space
       \fi
@@ -7901,7 +8202,7 @@ might help (with 'rm \jobname.?? \jobnam
     {\rm\enskip}% hskip 0.5 em of \rmfont
   }{}%
   %
-  \boldbrax
+  \parenbrackglyphs
   % arguments will be output next, if any.
 }
 
@@ -7911,7 +8212,10 @@ might help (with 'rm \jobname.?? \jobnam
     \def\^^M{}% for line continuation
     \df \ifdoingtypefn \tt \else \sl \fi
     \ifflagclear{txicodevaristt}{}%
-       {\def\var##1{{\setregularquotes \ttsl ##1}}}%
+       % use \ttsl for @var in both @def* and @deftype*.
+       % the kern prevents an italic correction at end, which appears
+       % too much for ttsl.
+       {\def\var##1{{\setregularquotes \ttsl ##1\kern 0pt }}}%
     #1%
   \egroup
 }
@@ -7928,8 +8232,9 @@ might help (with 'rm \jobname.?? \jobnam
 \let\lparen = ( \let\rparen = )
 
 % Be sure that we always have a definition for `(', etc.  For example,
-% if the fn name has parens in it, \boldbrax will not be in effect yet,
-% so TeX would otherwise complain about undefined control sequence.
+% if the fn name has parens in it, \parenbrackglyphs will not be in
+% effect yet, so TeX would otherwise complain about undefined control
+% sequence.
 {
   \activeparens
   \gdef\defcharsdefault{%
@@ -7939,49 +8244,28 @@ might help (with 'rm \jobname.?? \jobnam
   }
   \globaldefs=1 \defcharsdefault
 
-  \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+  \gdef\parenbrackglyphs{\let(=\opnr\let)=\cpnr\let[=\lbrb\let]=\rbrb}
   \gdef\magicamp{\let&=\amprm}
 }
 \let\ampchar\&
 
-\newcount\parencount
-
-% If we encounter &foo, then turn on ()-hacking afterwards
-\newif\ifampseen
-\def\amprm#1 {\ampseentrue{\rm\&#1 }}
-
-\def\parenfont{%
-  \ifampseen
-    % At the first level, print parens in roman,
-    % otherwise use the default font.
-    \ifnum \parencount=1 \rm \fi
-  \else
-    % The \sf parens (in \boldbrax) actually are a little bolder than
-    % the contained text.  This is especially needed for [ and ] .
-    \sf
-  \fi
-}
-\def\infirstlevel#1{%
-  \ifampseen
-    \ifnum\parencount=1
-      #1%
-    \fi
-  \fi
-}
-\def\bfafterword#1 {#1 \bf}
+\def\amprm#1 {{\rm\&#1 }}
 
+\newcount\parencount
+% opening and closing parentheses in roman font
 \def\opnr{%
+  \ptexslash % italic correction
   \global\advance\parencount by 1
-  {\parenfont(}%
-  \infirstlevel \bfafterword
+  {\sf(}%
 }
-\def\clnr{%
-  {\parenfont)}%
-  \infirstlevel \sl
+\def\cpnr{%
+  \ptexslash % italic correction
+  {\sf)}%
   \global\advance\parencount by -1
 }
 
 \newcount\brackcount
+% left and right square brackets in bold font
 \def\lbrb{%
   \global\advance\brackcount by 1
   {\bf[}%
@@ -8023,24 +8307,17 @@ might help (with 'rm \jobname.?? \jobnam
   }
 \fi
 
-\let\E=\expandafter
-
 % Used at the time of macro expansion.
 % Argument is macro body with arguments substituted
 \def\scanmacro#1{%
   \newlinechar`\^^M
-  % expand the expansion of \eatleadingcr twice to maybe remove a leading
-  % newline (and \else and \fi tokens), then call \eatspaces on the result.
-  \def\xeatspaces##1{%
-    \E\E\E\E\E\E\E\eatspaces\E\E\E\E\E\E\E{\eatleadingcr##1%
-  }}%
-  \def\xempty##1{}%
+  \def\xeatspaces##1{\eatleadingcrthen\eatspaces{##1}}%
   %
   % Process the macro body under the current catcode regime.
   \scantokens{#1@comment}%
   %
   % The \comment is to remove the \newlinechar added by \scantokens, and
-  % can be noticed by \parsearg.  Note \c isn't used because this means cedilla
+  % can be noticed by \parsearg.  Note \c isn't used because this means cedilla 
   % in math mode.
 }
 
@@ -8087,10 +8364,12 @@ might help (with 'rm \jobname.?? \jobnam
 \unbrace{\gdef\trim@@@ #1 } #2@{#1}
 }
 
-{\catcode`\^^M=\other%
-\gdef\eatleadingcr#1{\if\noexpand#1\noexpand^^M\else\E#1\fi}}%
-% Warning: this won't work for a delimited argument
-% or for an empty argument
+% Trim a single leading ^^M off a string, then call #1
+{\catcode`\^^M=\active \catcode`\Q=3%
+\gdef\eatleadingcrthen #1#2{\eatlcra #1Q#2Q^^MQ}%
+\gdef\eatlcra #1#2Q^^M{\eatlcrb #1#2Q}%
+\gdef\eatlcrb #1Q#2Q#3Q{#1{#2}}%
+}
 
 % Trim a single trailing ^^M off a string.
 {\catcode`\^^M=\other \catcode`\Q=3%
@@ -8226,6 +8505,10 @@ might help (with 'rm \jobname.?? \jobnam
 % <parameter list> is #, then the preceding argument is delimited by
 % an opening brace, and that opening brace is not consumed.
 
+% Make @ a letter, so that we can make private-to-Texinfo macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
 % Parse the optional {params} list to @macro or @rmacro.
 % Set \paramno to the number of arguments,
 % and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
@@ -8233,19 +8516,18 @@ might help (with 'rm \jobname.?? \jobnam
 % list to some hook where the argument is to be expanded.  If there are
 % less than 10 arguments that hook is to be replaced by ##N where N
 % is the position in that list, that is to say the macro arguments are to be
-% defined `a la TeX in the macro body.
+% defined `a la TeX in the macro body.  
 %
 % That gets used by \mbodybackslash (above).
 %
 % If there are 10 or more arguments, a different technique is used: see
-% \parsemmanyargdef.
+% \parsemmanyargdef@@.
 %
 \def\parsemargdef#1;{%
   \paramno=0\def\paramlist{}%
   \let\hash\relax
   % \hash is redefined to `#' later to get it into definitions
   \let\xeatspaces\relax
-  \let\xempty\relax
   \parsemargdefxxx#1,;,%
   \ifnum\paramno<10\relax\else
     \paramno0\relax
@@ -8257,29 +8539,25 @@ might help (with 'rm \jobname.?? \jobnam
   \else \let\next=\parsemargdefxxx
     \advance\paramno by 1
     \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
-        {\xeatspaces{\hash\the\paramno\noexpand\xempty{}}}%
+        {\xeatspaces{\hash\the\paramno}}%
     \edef\paramlist{\paramlist\hash\the\paramno,}%
   \fi\next}
-% the \xempty{} is to give \eatleadingcr an argument in the case of an
-% empty macro argument.
 
 % \parsemacbody, \parsermacbody
 %
 % Read recursive and nonrecursive macro bodies. (They're different since
 % rec and nonrec macros end differently.)
-%
+% 
 % We are in \macrobodyctxt, and the \xdef causes backslashes in the macro
 % body to be transformed.
 % Set \macrobody to the body of the macro, and call \macrodef.
 %
+\catcode `\@\texiatcatcode
 {\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
 \xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
 {\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
 \xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
-
-% Make @ a letter, so that we can make private-to-Texinfo macro names.
-\edef\texiatcatcode{\the\catcode`\@}
-\catcode `@=11\relax
+\catcode `\@=11\relax
 
 %%%%%%%%%%%%%% Code for > 10 arguments only   %%%%%%%%%%%%%%%%%%
 
@@ -8302,7 +8580,7 @@ might help (with 'rm \jobname.?? \jobnam
 % twice the \macarg.BLAH macros does not cost too much processing power.
 \def\parsemmanyargdef@@#1,{%
   \if#1;\let\next=\relax
-  \else
+  \else 
     \let\next=\parsemmanyargdef@@
     \edef\tempb{\eatspaces{#1}}%
     \expandafter\def\expandafter\tempa
@@ -8387,7 +8665,7 @@ might help (with 'rm \jobname.?? \jobnam
 
 % Replace arguments by their values in the macro body, and place the result
 % in macro \@tempa.
-%
+% 
 \def\macvalstoargs@{%
   %  To do this we use the property that token registers that are \the'ed
   % within an \edef  expand only once. So we are going to place all argument
@@ -8411,9 +8689,9 @@ might help (with 'rm \jobname.?? \jobnam
   \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
   }
 
-% Define the named-macro outside of this group and then close this group.
-%
-\def\macargexpandinbody@{%
+% Define the named-macro outside of this group and then close this group. 
+% 
+\def\macargexpandinbody@{% 
   \expandafter
   \endgroup
   \macargdeflist@
@@ -8451,7 +8729,7 @@ might help (with 'rm \jobname.?? \jobnam
 }
 
 % Trailing missing arguments are set to empty.
-%
+% 
 \def\setemptyargvalues@{%
   \ifx\paramlist\nilm@
     \let\next\macargexpandinbody@
@@ -8511,7 +8789,7 @@ might help (with 'rm \jobname.?? \jobnam
     \expandafter\xdef\csname\the\macname\endcsname{%
       \begingroup
         \noexpand\spaceisspace
-        \noexpand\endlineisspace
+        \noexpand\ignoreactivenewline
         \noexpand\expandafter % skip any whitespace after the macro name.
         \expandafter\noexpand\csname\the\macname @@@\endcsname}%
     \expandafter\xdef\csname\the\macname @@@\endcsname{%
@@ -8529,7 +8807,7 @@ might help (with 'rm \jobname.?? \jobnam
   \else % at most 9
     \ifnum\paramno<10\relax
       % @MACNAME sets the context for reading the macro argument
-      % @MACNAME@@ gets the argument, processes backslashes and appends a
+      % @MACNAME@@ gets the argument, processes backslashes and appends a 
       % comma.
       % @MACNAME@@@ removes braces surrounding the argument list.
       % @MACNAME@@@@ scans the macro body with arguments substituted.
@@ -8540,15 +8818,13 @@ might help (with 'rm \jobname.?? \jobnam
         \noexpand\expandafter
         \expandafter\noexpand\csname\the\macname @@\endcsname}%
       \expandafter\xdef\csname\the\macname @@\endcsname##1{%
-          \noexpand\passargtomacro
-          \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
+        \noexpand\passargtomacro
+        \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
       \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
-          \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
-      \expandafter\expandafter
-      \expandafter\xdef
-      \expandafter\expandafter
-        \csname\the\macname @@@@\endcsname\paramlist{%
-          \endgroup\noexpand\scanmacro{\macrobody}}%
+        \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
+      \expandaftergroup{\expandafter\xdef\csname\the\macname @@@@\endcsname}%
+                       \paramlist{%
+        \endgroup\noexpand\scanmacro{\macrobody}}%
     \else % 10 or more:
       \expandafter\xdef\csname\the\macname\endcsname{%
         \noexpand\getargvals@{\the\macname}{\argl}%
@@ -8560,6 +8836,16 @@ might help (with 'rm \jobname.?? \jobnam
 
 \catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes
 
+% utility definition to avoid excessive use of \expandafter.  call
+% as \expandaftergroup{CONTENT}\WORD to expand \WORD exactly once and remove
+% braces around CONTENT.
+\def\expandaftergroup#1#2{%
+  \expandafter\expandaftergroupx\expandafter{#2}{#1}%
+}
+\def\expandaftergroupx#1#2{%
+  #2#1%
+}
+
 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
 
 
@@ -8573,11 +8859,11 @@ might help (with 'rm \jobname.?? \jobnam
 % Call #1 with a list of tokens #2, with any doubled backslashes in #2
 % compressed to one.
 %
-% This implementation works by expansion, and not execution (so we cannot use
-% \def or similar).  This reduces the risk of this failing in contexts where
-% complete expansion is done with no execution (for example, in writing out to
+% This implementation works by expansion, and not execution (so we cannot use 
+% \def or similar).  This reduces the risk of this failing in contexts where 
+% complete expansion is done with no execution (for example, in writing out to 
 % an auxiliary file for an index entry).
-%
+% 
 % State is kept in the input stream: the argument passed to
 % @look_ahead, @gobble_and_check_finish and @add_segment is
 %
@@ -8599,11 +8885,11 @@ might help (with 'rm \jobname.?? \jobnam
 % #3 - NEXT_TOKEN
 % #4 used to look ahead
 %
-% If the next token is not a backslash, process the rest of the argument;
+% If the next token is not a backslash, process the rest of the argument; 
 % otherwise, remove the next token.
 @gdef@look_ahead#1!#2#3#4{%
   @ifx#4\%
-   @expandafter@gobble_and_check_finish
+   @expandafter@gobble_and_check_finish 
   @else
    @expandafter@add_segment
   @fi#1!{#2}#4#4%
@@ -8627,9 +8913,9 @@ might help (with 'rm \jobname.?? \jobnam
 % #3 - NEXT_TOKEN
 % #4 is input stream until next backslash
 %
-% Input stream is either at the start of the argument, or just after a
-% backslash sequence, either a lone backslash, or a doubled backslash.
-% NEXT_TOKEN contains the first token in the input stream: if it is \finish,
+% Input stream is either at the start of the argument, or just after a 
+% backslash sequence, either a lone backslash, or a doubled backslash.  
+% NEXT_TOKEN contains the first token in the input stream: if it is \finish, 
 % finish; otherwise, append to ARG_RESULT the segment of the argument up until
 % the next backslash.  PENDING_BACKSLASH contains a backslash to represent
 % a backslash just before the start of the input stream that has not been
@@ -8641,13 +8927,13 @@ might help (with 'rm \jobname.?? \jobnam
   % append the pending backslash to the result, followed by the next segment
   @expandafter@is_fi@look_ahead#1#2#4!{\}@fi
   % this @fi is discarded by @look_ahead.
-  % we can't get rid of it with \expandafter because we don't know how
+  % we can't get rid of it with \expandafter because we don't know how 
   % long #4 is.
 }
 
 % #1 - THE_MACRO
 % #2 - ARG_RESULT
-% #3 discards the res of the conditional in @add_segment, and @is_fi ends the
+% #3 discards the res of the conditional in @add_segment, and @is_fi ends the 
 % conditional.
 @gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}}
 
@@ -8659,7 +8945,7 @@ might help (with 'rm \jobname.?? \jobnam
 % for reading the argument (slightly different in the two cases).  Then,
 % to read the argument, in the whole-line case, it then calls the regular
 % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
-%
+% 
 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
 \def\braceorlinexxx{%
   \ifx\nchar\bgroup
@@ -8729,9 +9015,8 @@ might help (with 'rm \jobname.?? \jobnam
     \expandafter\noexpand
     \csname\the\macname @@@\endcsname##1\noexpand\endlinemacro
   }
-  \expandafter\expandafter
-  \expandafter\xdef
-  \expandafter\expandafter\csname\the\macname @@@\endcsname\paramlist{%
+  \expandaftergroup{\expandafter\xdef\csname\the\macname @@@\endcsname}%
+                     \paramlist{%
     \newlinechar=13 % split \macrobody into lines
     \noexpand\scantokens{\macrobody}%
   }
@@ -8782,7 +9067,7 @@ might help (with 'rm \jobname.?? \jobnam
 
 % Used so that the @top node doesn't have to be wrapped in an @ifnottex
 % conditional.
-% \doignore goes to more effort to skip nested conditionals but we don't need
+% \doignore goes to more effort to skip nested conditionals but we don't need 
 % that here.
 \def\omittopnode{%
    \ifx\lastnode\wordTop
@@ -8806,14 +9091,19 @@ might help (with 'rm \jobname.?? \jobnam
 \let\lastnode=\empty
 
 % Write a cross-reference definition for the current node.  #1 is the
-% type (Ynumbered, Yappendix, Ynothing).
+% type (Ynumbered, Yappendix, Ynothing).  #2 is the section title.
 %
-\def\donoderef#1{%
+\def\donoderef#1#2{%
   \ifx\lastnode\empty\else
-    \setref{\lastnode}{#1}%
+    \setref{\lastnode}{#1}{#2}%
     \global\let\lastnode=\empty
+    \setnodeseenonce
   \fi
 }
+\def\setnodeseenonce{
+  \global\nodeseentrue
+  \let\setnodeseenonce\relax
+}
 
 % @nodedescription, @nodedescriptionblock - do nothing for TeX
 \parseargdef\nodedescription{}
@@ -8826,21 +9116,28 @@ might help (with 'rm \jobname.?? \jobnam
 %
 \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
 \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
-\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
+\def\anchor#1{%
+  \savesf \setref{#1}{Yanchor}{#1}\restoresf \ignorespaces
+}
+
+% @namedanchor{NAME, XREFNAME} -- define xref target at arbitrary point
+% with label text for cross-references to it.
+\def\namedanchor#1{\donamedanchor#1\finish}%
+\def\donamedanchor#1,#2\finish{%
+  \savesf \setref{#1}{Yanchor}{\ignorespaces #2\unskip}\restoresf \ignorespaces
+}
 
-% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
-% anchor), which consists of three parts:
-% 1) NAME-title - the current sectioning name taken from \currentsection,
-%                 or the anchor name.
-% 2) NAME-snt   - section number and type, passed as the SNT arg, or
-%                 empty for anchors.
+% \setref{NAME}{SNT}{TITLE} defines a cross-reference point NAME (a node
+% or an anchor), which consists of three parts:
+% 1) NAME-title - the current sectioning name
+% 2) NAME-snt   - section number and type, passed as the SNT arg.
 % 3) NAME-pg    - the page number.
 %
 % This is called from \donoderef, \anchor, and \dofloat.  In the case of
 % floats, there is an additional part, which is not written here:
 % 4) NAME-lof   - the text as it should appear in a @listoffloats.
 %
-\def\setref#1#2{%
+\def\setref#1#2#3{%
   \pdfmkdest{#1}%
   \iflinks
     {%
@@ -8852,7 +9149,7 @@ might help (with 'rm \jobname.?? \jobnam
 	\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
 	  ##1}{##2}}% these are parameters of \writexrdef
       }%
-      \toks0 = \expandafter{\currentsection}%
+      \toks0 = {#3}%
       \immediate \writexrdef{title}{\the\toks0 }%
       \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
       \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
@@ -8864,7 +9161,7 @@ might help (with 'rm \jobname.?? \jobnam
 % automatically in xrefs, if the third arg is not explicitly specified.
 % This was provided as a "secret" @set xref-automatic-section-title
 % variable, now it's official.
-%
+% 
 \parseargdef\xrefautomaticsectiontitle{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -8880,7 +9177,7 @@ might help (with 'rm \jobname.?? \jobnam
   \fi\fi
 }
 
-%
+% 
 % @xref, @pxref, and @ref generate cross-references.  For \xrefX, #1 is
 % the node name, #2 the name of the Info cross-reference, #3 the printed
 % node name, #4 the name of the Info file, #5 the name of the printed
@@ -8906,15 +9203,7 @@ might help (with 'rm \jobname.?? \jobnam
   \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
   %
   \startxreflink{#1}{#4}%
-  {%
-    % Have to otherify everything special to allow the \csname to
-    % include an _ in the xref name, etc.
-    \indexnofonts
-    \turnoffactive
-    \def\value##1{##1}%
-    \expandafter\global\expandafter\let\expandafter\Xthisreftitle
-      \csname XR#1-title\endcsname
-  }%
+  \getrefx{#1-title}\Xthisreftitle
   %
   % Float references are printed completely differently: "Figure 1.2"
   % instead of "[somenode], p.3".  \iffloat distinguishes them by
@@ -8947,21 +9236,23 @@ might help (with 'rm \jobname.?? \jobnam
       % Cross-manual reference with a printed manual name.
       %
       \crossmanualxref{\cite{\printedmanual\unskip}}%
-    %
     \else\ifdim \wd\infofilenamebox > 0pt
       % Cross-manual reference with only an info filename (arg 4), no
       % printed manual name (arg 5).  This is essentially the same as
       % the case above; we output the filename, since we have nothing else.
       %
       \crossmanualxref{\code{\infofilename\unskip}}%
-    %
     \else
       % Reference within this manual.
       %
-      % Only output a following space if the -snt ref is nonempty, as the ref
-      % will be empty for @unnumbered and @anchor.
-      \setbox2 = \hbox{\ignorespaces \refx{#1-snt}}%
-      \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
+      % Only output a following space if the -snt ref is nonempty, as is
+      % the case for @unnumbered and @anchor.
+      \getrefx{#1-snt}\tmp
+      \ifx\tmp\empty\else
+        \ifx\tmp\Yanchor\else
+          \tmp\space
+        \fi
+      \fi
       %
       % output the `[mynode]' via the macro below so it can be overridden.
       \xrefprintnodename\printedrefname
@@ -9017,7 +9308,7 @@ might help (with 'rm \jobname.?? \jobnam
         \else
           % Otherwise just copy the Info node name.
           \def\printedrefname{\ignorespaces #1}%
-        \fi%
+        \fi
       \fi
     \fi
   \fi
@@ -9049,7 +9340,7 @@ might help (with 'rm \jobname.?? \jobnam
        \ifnum\filenamelength>0
          goto file{\the\filename.pdf} name{\pdfdestname}%
        \else
-         goto name{\pdfmkpgn{\pdfdestname}}%
+         goto name{\pdfdestname}%
        \fi
      \else % XeTeX
        \ifnum\filenamelength>0
@@ -9078,20 +9369,20 @@ might help (with 'rm \jobname.?? \jobnam
   \space\putwordpage\tie\refx{#1-pg}}
 
 % Output a cross-manual xref to #1.  Used just above (twice).
-%
+% 
 % Only include the text "Section ``foo'' in" if the foo is neither
 % missing or Top.  Thus, @xref{,,,foo,The Foo Manual} outputs simply
 % "see The Foo Manual", the idea being to refer to the whole manual.
-%
+% 
 % But, this being TeX, we can't easily compare our node name against the
 % string "Top" while ignoring the possible spaces before and after in
 % the input.  By adding the arbitrary 7sp below, we make it much less
 % likely that a real node name would have the same width as "Top" (e.g.,
 % in a monospaced font).  Hopefully it will never happen in practice.
-%
+% 
 % For the same basic reason, we retypeset the "Top" at every
 % reference, since the current font is indeterminate.
-%
+% 
 \def\crossmanualxref#1{%
   \setbox\toprefbox = \hbox{Top\kern7sp}%
   \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
@@ -9129,6 +9420,7 @@ might help (with 'rm \jobname.?? \jobnam
 %
 \def\Ynothing{}
 \def\Yomitfromtoc{}
+\def\Yanchor{\isanchor} \let\isanchor\relax
 \def\Ynumbered{%
   \ifnum\secno=0
     \putwordChapter@tie \the\chapno
@@ -9155,14 +9447,7 @@ might help (with 'rm \jobname.?? \jobnam
 
 % \refx{NAME} - reference a cross-reference string named NAME.
 \def\refx#1{%
-  \requireauxfile
-  {%
-    \indexnofonts
-    \turnoffactive
-    \def\value##1{##1}%
-    \expandafter\global\expandafter\let\expandafter\thisrefX
-      \csname XR#1\endcsname
-  }%
+  \getrefx{#1}\thisrefX
   \ifx\thisrefX\relax
     % If not defined, say something at least.
     \angleleft un\-de\-fined\angleright
@@ -9183,9 +9468,20 @@ might help (with 'rm \jobname.?? \jobnam
   \fi
 }
 
-% This is the macro invoked by entries in the aux file.  Define a control
-% sequence for a cross-reference target (we prepend XR to the control sequence
-% name to avoid collisions).  The value is the page number.  If this is a float
+% Set #2 to xref string #1
+\def\getrefx#1#2{%
+  \requireauxfile
+  {%
+    \indexnofonts
+    \turnoffactive
+    \def\value##1{##1}%
+    \expandafter\global\expandafter\let\expandafter#2\csname XR#1\endcsname
+  }%
+}
+
+% This is the macro invoked by entries in the aux file.  Define a control 
+% sequence for a cross-reference target (we prepend XR to the control sequence 
+% name to avoid collisions).  The value is the page number.  If this is a float 
 % type, we have more work to do.
 %
 \def\xrdef#1#2{%
@@ -9201,10 +9497,10 @@ might help (with 'rm \jobname.?? \jobnam
   \bgroup
     \expandafter\gdef\csname XR\safexrefname\endcsname{#2}%
   \egroup
-  % We put the \gdef inside a group to avoid the definitions building up on
-  % TeX's save stack, which can cause it to run out of space for aux files with
+  % We put the \gdef inside a group to avoid the definitions building up on 
+  % TeX's save stack, which can cause it to run out of space for aux files with 
   % thousands of lines.  \gdef doesn't use the save stack, but \csname does
-  % when it defines an unknown control sequence as \relax.
+  % when it defines an unknown control sequence as \relax. 
   %
   % Was that xref control sequence that we just defined for a float?
   \expandafter\iffloat\csname XR\safexrefname\endcsname
@@ -9225,6 +9521,7 @@ might help (with 'rm \jobname.?? \jobnam
     \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
       {\safexrefname}}%
   \fi
+  \ignorespaces % ignore ends of line in aux file
 }
 
 % If working on a large document in chapters, it is convenient to
@@ -9247,12 +9544,14 @@ might help (with 'rm \jobname.?? \jobnam
 % Read the last existing aux file, if any.  No error if none exists.
 %
 \def\tryauxfile{%
+  \ifxetex\xetexpreauxfile\fi
   \openin 1 \jobname.aux
   \ifeof 1 \else
     \readdatafile{aux}%
     \global\havexrefstrue
   \fi
   \closein 1
+  \ifxetex\xetexpostauxfile\fi
 }
 
 \def\setupdatafile{%
@@ -9335,7 +9634,10 @@ might help (with 'rm \jobname.?? \jobnam
 % Auto-number footnotes.  Otherwise like plain.
 \gdef\footnote{%
   \global\advance\footnoteno by \@ne
-  \edef\thisfootno{$^{\the\footnoteno}$}%
+  %
+  % Output for the footnote marker.  If we are immediately after another
+  % footnote, output a comma and small space first.
+  \edef\thisfootno{$^{\ifnum\lastpenalty=3 ,\mskip 1mu \fi\the\footnoteno}$}%
   %
   % In case the footnote comes at the end of a sentence, preserve the
   % extra spacing after we do the footnote number.
@@ -9344,19 +9646,25 @@ might help (with 'rm \jobname.?? \jobnam
   %
   % Remove inadvertent blank space before typesetting the footnote number.
   \unskip
-  \thisfootno\@sf
+  %
+  % \scriptspace is 0.5pt by default and gives excessive space before the
+  % comma if we have multiple footnote markers in a row.
+  \bgroup\scriptspace=0pt
+    \thisfootno\@sf
+  \egroup
   \dofootnote
 }%
 
-% Don't bother with the trickery in plain.tex to not require the
-% footnote text as a parameter.  Our footnotes don't need to be so general.
-%
-% Oh yes, they do; otherwise, @ifset (and anything else that uses
-% \parseargline) fails inside footnotes because the tokens are fixed when
-% the footnote is read.  --karl, 16nov96.
+% marker for immediately after a footnote marker
+\gdef\footnoteendmarker{\penalty3 }
+
+% Do not require the footnote text as a parameter; otherwise, @ifset
+% (and anything else that uses \parseargline) fails inside footnotes
+% because the tokens are fixed when the footnote is read.
 %
 \gdef\dofootnote{%
   \insert\footins\bgroup
+  \aftergroup\footnoteendmarker
   %
   % Nested footnotes are not supported in TeX, that would take a lot
   % more work.  (\startsavinginserts does not suffice.)
@@ -9387,14 +9695,14 @@ might help (with 'rm \jobname.?? \jobnam
   % Hang the footnote text off the number.  Use \everypar in case the
   % footnote extends for more than one paragraph.
   \everypar = {\hang}%
-  \textindent{\thisfootno}%
+  \textindent{$^{\the\footnoteno}$}%
   %
   % Don't crash into the line above the footnote text.  Since this
   % expands into a box, it must come within the paragraph, lest it
   % provide a place where TeX can split the footnote.
   \footstrut
   %
-  % Invoke rest of plain TeX footnote routine.
+  % Eat opening brace and invoke rest of plain TeX footnote routine.
   \futurelet\next\fo@t
 }
 }%end \catcode `\@=11
@@ -9551,7 +9859,9 @@ might help (with 'rm \jobname.?? \jobnam
     % For pdfTeX and LuaTeX <= 0.80
     \dopdfimage{#1}{#2}{#3}%
   \else
-    \ifx\XeTeXrevision\thisisundefined
+    \ifxetex
+      \doxeteximage{#1}{#2}{#3}%
+    \else
       % For epsf.tex
       % \epsfbox itself resets \epsf?size at each figure.
       \setbox0 = \hbox{\ignorespaces #2}%
@@ -9559,9 +9869,6 @@ might help (with 'rm \jobname.?? \jobnam
       \setbox0 = \hbox{\ignorespaces #3}%
         \ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
       \epsfbox{#1.eps}%
-    \else
-      % For XeTeX
-      \doxeteximage{#1}{#2}{#3}%
     \fi
   \fi
   %
@@ -9639,14 +9946,15 @@ might help (with 'rm \jobname.?? \jobnam
       \global\advance\floatno by 1
       %
       {%
-        % This magic value for \currentsection is output by \setref as the
-        % XREFLABEL-title value.  \xrefX uses it to distinguish float
+        % This magic value for the third argument of \setref is output as
+        % the XREFLABEL-title value.  \xrefX uses it to distinguish float
         % labels (which have a completely different output format) from
         % node and anchor labels.  And \xrdef uses it to construct the
         % lists of floats.
         %
-        \edef\currentsection{\floatmagic=\safefloattype}%
-        \setref{\floatlabel}{Yfloat}%
+        \edef\tmp{\noexpand\setref{\noexpand\floatlabel}{Yfloat}%
+                  {\floatmagic=\safefloattype}}%
+        \tmp
       }%
     \fi
     %
@@ -9768,7 +10076,7 @@ might help (with 'rm \jobname.?? \jobnam
 
 % #1 is the control sequence we are passed; we expand into a conditional
 % which is true if #1 represents a float ref.  That is, the magic
-% \currentsection value which we \setref above.
+% value which we passed to \setref above.
 %
 \def\iffloat#1{\expandafter\doiffloat#1==\finish}
 %
@@ -9825,6 +10133,7 @@ might help (with 'rm \jobname.?? \jobnam
   \toksA = \expandafter{\csname XR#1-lof\endcsname}%
   %
   % use the same \entry macro we use to generate the TOC and index.
+  \let\entry\entryinternal
   \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
   \writeentry
 }}
@@ -9860,8 +10169,18 @@ might help (with 'rm \jobname.?? \jobnam
 \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
   \openin 1 txi-#1.tex
   \ifeof 1
-    \errhelp = \nolanghelp
-    \errmessage{Cannot read language file txi-#1.tex}%
+    \def\lang{#1}%
+    \def\enword{en}%
+    \ifx\lang\enword
+      % for English only, keep on going rather than issuing a fatal error
+      % message, as txi-en.tex likely doesn't contain any changes from the
+      % defaults.  note that this is a problem if we already loaded another
+      % language file and want to switch back to English.
+      \message{Cannot read language file txi-#1.tex}%
+    \else
+      \errhelp = \nolanghelp
+      \errmessage{Cannot read language file txi-#1.tex}%
+    \fi
   \else
     \globaldefs = 1  % everything in the txi-LL files needs to persist
     \input txi-#1.tex
@@ -9907,35 +10226,40 @@ directory should work if nowhere else do
 \newif\iftxinativeunicodecapable
 \newif\iftxiusebytewiseio
 
-\ifx\XeTeXrevision\thisisundefined
-  \ifx\luatexversion\thisisundefined
-    \txinativeunicodecapablefalse
-    \txiusebytewiseiotrue
-  \else
+\ifxetex
+  \txinativeunicodecapabletrue
+  \txiusebytewiseiofalse
+\else
+  \ifluatex
     \txinativeunicodecapabletrue
     \txiusebytewiseiofalse
+  \else
+    \txinativeunicodecapablefalse
+    \txiusebytewiseiotrue
   \fi
-\else
-  \txinativeunicodecapabletrue
-  \txiusebytewiseiofalse
 \fi
 
+\let\xetexpreauxfile\relax
+\let\xetexpostauxfile\relax
+
 % Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
 % for non-UTF-8 (byte-wise) encodings.
 %
 \def\setbytewiseio{%
-  \ifx\XeTeXrevision\thisisundefined
-  \else
-    \XeTeXdefaultencoding "bytes"  % For subsequent files to be read
-    \XeTeXinputencoding "bytes"  % For document root file
-    % Unfortunately, there seems to be no corresponding XeTeX command for
-    % output encoding.  This is a problem for auxiliary index and TOC files.
-    % The only solution would be perhaps to write out @U{...} sequences in
-    % place of non-ASCII characters.
+  \ifxetex
+    % For document root file
+    \XeTeXinputencoding "bytes"
+    %
+    % Setting for subsequent files to be read with @include.
+    \XeTeXdefaultencoding "bytes"
+    %
+    % Use UTF-8 for reading auxiliary index and TOC files, which are
+    % always output in UTF-8 with XeTeX.
+    \def\xetexpreauxfile{\XeTeXdefaultencoding "UTF-8"}%
+    \def\xetexpostauxfile{\XeTeXdefaultencoding "bytes"}%
   \fi
 
-  \ifx\luatexversion\thisisundefined
-  \else
+  \ifluatex
     \directlua{
     local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub
     local function convert_char (char)
@@ -10044,8 +10368,7 @@ directory should work if nowhere else do
   \fi % lattwo
   \fi % ascii
   %
-  \ifx\XeTeXrevision\thisisundefined
-  \else
+  \ifxetex
     \ifx \declaredencoding \utfeight
     \else
       \ifx \declaredencoding \ascii
@@ -10328,11 +10651,15 @@ directory should work if nowhere else do
 
 \gdef\UTFviiiDefined#1{%
   \ifx #1\relax
-    \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+    \ifutfviiidefinedwarning
+      \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+    \fi
   \else
     \expandafter #1%
   \fi
 }
+\newif\ifutfviiidefinedwarning
+\utfviiidefinedwarningtrue
 
 % Give non-ASCII bytes the active definitions for processing UTF-8 sequences
 \begingroup
@@ -10342,8 +10669,8 @@ directory should work if nowhere else do
 
   % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
   % substituting ~ and $ with a character token of that value.
-  \def\UTFviiiLoop{%
-    \global\catcode\countUTFx\active
+  \gdef\UTFviiiLoop{%
+    \catcode\countUTFx\active
     \uccode`\~\countUTFx
     \uccode`\$\countUTFx
     \uppercase\expandafter{\UTFviiiTmp}%
@@ -10351,7 +10678,7 @@ directory should work if nowhere else do
     \ifnum\countUTFx < \countUTFy
       \expandafter\UTFviiiLoop
     \fi}
-
+  %
   % For bytes other than the first in a UTF-8 sequence.  Not expected to
   % be expanded except when writing to auxiliary files.
   \countUTFx = "80
@@ -10385,6 +10712,16 @@ directory should work if nowhere else do
         \else\expandafter\UTFviiiFourOctets\expandafter$\fi
         }}%
   \UTFviiiLoop
+  %
+  % for pdftex only, used to expand ASCII to UTF-16BE.
+  \gdef\asciitounicode{%
+    \countUTFx = "20
+    \countUTFy = "80
+    \def\UTFviiiTmp{%
+      \def~{\nullbyte $}}%
+    \UTFviiiLoop
+  }
+  {\catcode0=11 \gdef\nullbyte{^^00}}%
 \endgroup
 
 \def\globallet{\global\let} % save some \expandafter's below
@@ -10401,7 +10738,7 @@ directory should work if nowhere else do
         \uppercase{.}
       \endgroup
     \else
-      \errhelp = \EMsimple
+      \errhelp = \EMsimple	
       \errmessage{Unicode character U+#1 not supported, sorry}%
     \fi
   \else
@@ -10409,8 +10746,8 @@ directory should work if nowhere else do
   \fi
 }
 
-% These macros are used here to construct the name of a control
-% sequence to be defined.
+% These macros are used here to construct the names of macros
+% that expand to the definitions for UTF-8 sequences.
 \def\UTFviiiTwoOctetsName#1#2{%
   \csname u8:#1\string #2\endcsname}%
 \def\UTFviiiThreeOctetsName#1#2#3{%
@@ -10418,6 +10755,35 @@ directory should work if nowhere else do
 \def\UTFviiiFourOctetsName#1#2#3#4{%
   \csname u8:#1\string #2\string #3\string #4\endcsname}%
 
+% generate UTF-16 from codepoint
+\def\utfsixteentotoks#1#2{%
+  \countUTFz = "#2\relax
+  \ifnum \countUTFz > 65535
+    % doesn't work for codepoints > U+FFFF
+    % we don't define glyphs for any of these anyway, so it doesn't matter
+    #1={U+#2}%
+  \else
+    \countUTFx = \countUTFz
+    \divide\countUTFx by 256
+    \countUTFy = \countUTFx
+    \multiply\countUTFx by 256
+    \advance\countUTFz by -\countUTFx
+    \uccode`,=\countUTFy
+    \uccode`;=\countUTFz
+    \ifnum\countUTFy = 0
+      \uppercase{#1={\nullbyte\string;}}%
+    \else\ifnum\countUTFz = 0
+      \uppercase{#1={\string,\nullbyte}}%
+    \else
+      \uppercase{#1={\string,\string;}}%
+    \fi\fi
+    % NB \uppercase cannot insert a null byte
+  \fi
+}
+
+\newif\ifutfbytespdf
+\utfbytespdffalse
+
 % For UTF-8 byte sequences (TeX, e-TeX and pdfTeX),
 % provide a definition macro to replace a Unicode character;
 % this gets used by the @U command
@@ -10434,19 +10800,23 @@ directory should work if nowhere else do
     \countUTFz = "#1\relax
     \begingroup
       \parseXMLCharref
-
-      % Give \u8:... its definition.  The sequence of seven \expandafter's
-      % expands after the \gdef three times, e.g.
       %
+      % Completely expand \UTFviiiTmp, which looks like:
       % 1.  \UTFviiTwoOctetsName B1 B2
       % 2.  \csname u8:B1 \string B2 \endcsname
       % 3.  \u8: B1 B2  (a single control sequence token)
+      \xdef\UTFviiiTmp{\UTFviiiTmp}%
       %
-      \expandafter\expandafter
-      \expandafter\expandafter
-      \expandafter\expandafter
-      \expandafter\gdef       \UTFviiiTmp{#2}%
-      %
+      \ifpdf
+        \toksA={#2}%
+        \utfsixteentotoks\toksB{#1}%
+        \expandafter\xdef\UTFviiiTmp{%
+          \noexpand\ifutfbytespdf\noexpand\utfbytes{\the\toksB}%
+          \noexpand\else\the\toksA\noexpand\fi}%
+      \else
+        \expandafter\gdef\UTFviiiTmp{#2}%
+      \fi
+      % 
       \expandafter\ifx\csname uni:#1\endcsname \relax \else
        \message{Internal error, already defined: #1}%
       \fi
@@ -10455,8 +10825,9 @@ directory should work if nowhere else do
       \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp
     \endgroup}
   %
-  % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
-  % to the corresponding UTF-8 sequence.
+  % Given the value in \countUTFz as a Unicode code point, set
+  % \UTFviiiTmp to one of the \UTVviii*OctetsName macros followed by
+  % the corresponding UTF-8 sequence.
   \gdef\parseXMLCharref{%
     \ifnum\countUTFz < "20\relax
       \errhelp = \EMsimple
@@ -10485,7 +10856,7 @@ directory should work if nowhere else do
     \divide\countUTFz by 64
     \countUTFy = \countUTFz  % Save to be the future value of \countUTFz.
     \multiply\countUTFz by 64
-
+    
     % \countUTFz is now \countUTFx with the last 5 bits cleared.  Subtract
     % in order to get the last five bits.
     \advance\countUTFx by -\countUTFz
@@ -10515,12 +10886,22 @@ directory should work if nowhere else do
   \catcode"#1=\other
 }
 
+% Suppress ligature creation from adjacent characters.
+\ifluatex
+  % Braces do not suppress ligature creation in LuaTeX, e.g. in of{}fice
+  % to suppress the "ff" ligature.  Using a kern appears to be the only
+  % workaround.
+  \def\nolig{\kern0pt{}}
+\else
+  \def\nolig{{}}
+\fi
+
 % https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
 % U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
 % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
 % U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
 % U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
-%
+% 
 % Many of our renditions are less than wonderful, and all the missing
 % characters are available somewhere.  Loading the necessary fonts
 % awaits user request.  We can't truly support Unicode without
@@ -11132,8 +11513,8 @@ directory should work if nowhere else do
   % Punctuation
   \DeclareUnicodeCharacter{2013}{--}%
   \DeclareUnicodeCharacter{2014}{---}%
-  \DeclareUnicodeCharacter{2018}{\quoteleft{}}%
-  \DeclareUnicodeCharacter{2019}{\quoteright{}}%
+  \DeclareUnicodeCharacter{2018}{\quoteleft\nolig}%
+  \DeclareUnicodeCharacter{2019}{\quoteright\nolig}%
   \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}%
   \DeclareUnicodeCharacter{201C}{\quotedblleft{}}%
   \DeclareUnicodeCharacter{201D}{\quotedblright{}}%
@@ -11168,7 +11549,7 @@ directory should work if nowhere else do
   \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
   %
   \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
-  \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
+  \DeclareUnicodeCharacter{2032}{\ensuremath{^\prime}}%
   \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}%
   \DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
   \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
@@ -11291,6 +11672,25 @@ directory should work if nowhere else do
   %
   \global\mathchardef\checkmark="1370% actually the square root sign
   \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
+  %
+  % These are all the combining accents.  We need these empty definitions
+  % at present for the sake of PDF outlines.
+  \DeclareUnicodeCharacter{0300}{}%
+  \DeclareUnicodeCharacter{0301}{}%
+  \DeclareUnicodeCharacter{0302}{}%
+  \DeclareUnicodeCharacter{0303}{}%
+  \DeclareUnicodeCharacter{0305}{}%
+  \DeclareUnicodeCharacter{0306}{}%
+  \DeclareUnicodeCharacter{0307}{}%
+  \DeclareUnicodeCharacter{0308}{}%
+  \DeclareUnicodeCharacter{030A}{}%
+  \DeclareUnicodeCharacter{030B}{}%
+  \DeclareUnicodeCharacter{030C}{}%
+  \DeclareUnicodeCharacter{0323}{}%
+  \DeclareUnicodeCharacter{0327}{}%
+  \DeclareUnicodeCharacter{0328}{}%
+  \DeclareUnicodeCharacter{0331}{}%
+  \DeclareUnicodeCharacter{0361}{}%
 }% end of \unicodechardefs
 
 % UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
@@ -11429,12 +11829,12 @@ directory should work if nowhere else do
     \pdfhorigin = 1 true in
     \pdfvorigin = 1 true in
   \else
-    \ifx\XeTeXrevision\thisisundefined
-      \special{papersize=#8,#7}%
-    \else
+    \ifxetex
       \pdfpageheight #7\relax
       \pdfpagewidth #8\relax
       % XeTeX does not have \pdfhorigin and \pdfvorigin.
+    \else
+      \special{papersize=#8,#7}%
     \fi
   \fi
   %
@@ -11634,21 +12034,21 @@ directory should work if nowhere else do
   #1#2#3=\countB\relax
 }
 
-\ifx\XeTeXrevision\thisisundefined
-  \ifx\luatexversion\thisisundefined
+\ifxetex % XeTeX
+  \mtsetprotcode\textrm
+  \def\mtfontexpand#1{}
+\else
+  \ifluatex % LuaTeX
+    \mtsetprotcode\textrm
+    \def\mtfontexpand#1{\expandglyphsinfont#1 20 20 1\relax}
+  \else
     \ifpdf % pdfTeX
       \mtsetprotcode\textrm
       \def\mtfontexpand#1{\pdffontexpand#1 20 20 1 autoexpand\relax}
     \else % TeX
       \def\mtfontexpand#1{}
     \fi
-  \else % LuaTeX
-    \mtsetprotcode\textrm
-    \def\mtfontexpand#1{\expandglyphsinfont#1 20 20 1\relax}
   \fi
-\else % XeTeX
-  \mtsetprotcode\textrm
-  \def\mtfontexpand#1{}
 \fi
 
 
@@ -11657,18 +12057,18 @@ directory should work if nowhere else do
 \def\microtypeON{%
   \microtypetrue
   %
-  \ifx\XeTeXrevision\thisisundefined
-    \ifx\luatexversion\thisisundefined
+  \ifxetex % XeTeX
+    \XeTeXprotrudechars=2
+  \else
+    \ifluatex % LuaTeX
+      \adjustspacing=2
+      \protrudechars=2
+    \else
       \ifpdf % pdfTeX
         \pdfadjustspacing=2
         \pdfprotrudechars=2
       \fi
-    \else % LuaTeX
-      \adjustspacing=2
-      \protrudechars=2
     \fi
-  \else % XeTeX
-    \XeTeXprotrudechars=2
   \fi
   %
   \mtfontexpand\textrm
@@ -11679,18 +12079,18 @@ directory should work if nowhere else do
 \def\microtypeOFF{%
   \microtypefalse
   %
-  \ifx\XeTeXrevision\thisisundefined
-    \ifx\luatexversion\thisisundefined
+  \ifxetex % XeTeX
+    \XeTeXprotrudechars=0
+  \else
+    \ifluatex % LuaTeX
+      \adjustspacing=0
+      \protrudechars=0
+    \else
       \ifpdf % pdfTeX
         \pdfadjustspacing=0
         \pdfprotrudechars=0
       \fi
-    \else % LuaTeX
-      \adjustspacing=0
-      \protrudechars=0
     \fi
-  \else % XeTeX
-    \XeTeXprotrudechars=0
   \fi
 }
 
@@ -11765,7 +12165,7 @@ directory should work if nowhere else do
 \def\texinfochars{%
   \let< = \activeless
   \let> = \activegtr
-  \let~ = \activetilde
+  \let~ = \activetilde 
   \let^ = \activehat
   \setregularquotes
   \let\b = \strong
--- gcl27-2.7.1.orig/xgcl-2/Events.c
+++ gcl27-2.7.1/xgcl-2/Events.c
@@ -26,202 +26,187 @@
 #include <X11/Xlib.h>
 
 /********* XKeyEvent functions *****/
-
-long  make_XKeyEvent (){
+long 
+make_XKeyEvent (void){
           return ((long) calloc(1, sizeof(XKeyEvent)));
 }
 
-int  XKeyEvent_same_screen(i)
-XKeyEvent* i;
+int 
+XKeyEvent_same_screen (XKeyEvent* i)
 {
           return(i->same_screen);
 }
 
-void set_XKeyEvent_same_screen(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_same_screen (XKeyEvent *i, int j)
 {
           i->same_screen = j;
 }
 
-int  XKeyEvent_keycode(i)
-XKeyEvent* i;
+int 
+XKeyEvent_keycode (XKeyEvent *i)
 {
           return(i->keycode);
 }
 
-void set_XKeyEvent_keycode(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_keycode (XKeyEvent *i, int j)
 {
           i->keycode = j;
 }
 
-int  XKeyEvent_state(i)
-XKeyEvent* i;
+int 
+XKeyEvent_state (XKeyEvent *i)
 {
           return(i->state);
 }
 
-void set_XKeyEvent_state(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_state (XKeyEvent *i, int j)
 {
           i->state = j;
 }
 
-int  XKeyEvent_y_root(i)
-XKeyEvent* i;
+int 
+XKeyEvent_y_root (XKeyEvent *i)
 {
           return(i->y_root);
 }
 
-void set_XKeyEvent_y_root(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_y_root (XKeyEvent *i, int j)
 {
           i->y_root = j;
 }
 
-int  XKeyEvent_x_root(i)
-XKeyEvent* i;
+int 
+XKeyEvent_x_root (XKeyEvent *i)
 {
           return(i->x_root);
 }
 
-void set_XKeyEvent_x_root(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_x_root (XKeyEvent *i, int j)
 {
           i->x_root = j;
 }
 
-int  XKeyEvent_y(i)
-XKeyEvent* i;
+int 
+XKeyEvent_y (XKeyEvent *i)
 {
           return(i->y);
 }
 
-void set_XKeyEvent_y(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_y (XKeyEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XKeyEvent_x(i)
-XKeyEvent* i;
+int 
+XKeyEvent_x (XKeyEvent *i)
 {
           return(i->x);
 }
 
-void set_XKeyEvent_x(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_x (XKeyEvent *i, int j)
 {
           i->x = j;
 }
 
-int  XKeyEvent_time(i)
-XKeyEvent* i;
+int 
+XKeyEvent_time (XKeyEvent *i)
 {
           return(i->time);
 }
 
-void set_XKeyEvent_time(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_time (XKeyEvent *i, int j)
 {
           i->time = j;
 }
 
-int  XKeyEvent_subwindow(i)
-XKeyEvent* i;
+int 
+XKeyEvent_subwindow (XKeyEvent *i)
 {
           return(i->subwindow);
 }
 
-void set_XKeyEvent_subwindow(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_subwindow (XKeyEvent *i, int j)
 {
           i->subwindow = j;
 }
 
-int  XKeyEvent_root(i)
-XKeyEvent* i;
+int 
+XKeyEvent_root (XKeyEvent *i)
 {
           return(i->root);
 }
 
-void set_XKeyEvent_root(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_root (XKeyEvent *i, int j)
 {
           i->root = j;
 }
 
-int  XKeyEvent_window(i)
-XKeyEvent* i;
+int 
+XKeyEvent_window (XKeyEvent *i)
 {
           return(i->window);
 }
 
-void set_XKeyEvent_window(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_window (XKeyEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XKeyEvent_display(i)
-XKeyEvent* i;
+long 
+XKeyEvent_display (XKeyEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XKeyEvent_display(i, j)
-XKeyEvent* i;
-long j;
+void 
+set_XKeyEvent_display (XKeyEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XKeyEvent_send_event(i)
-XKeyEvent* i;
+int 
+XKeyEvent_send_event (XKeyEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XKeyEvent_send_event(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_send_event (XKeyEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XKeyEvent_serial(i)
-XKeyEvent* i;
+int 
+XKeyEvent_serial (XKeyEvent *i)
 {
           return(i->serial);
 }
 
-void set_XKeyEvent_serial(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_serial (XKeyEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XKeyEvent_type(i)
-XKeyEvent* i;
+int 
+XKeyEvent_type (XKeyEvent *i)
 {
           return(i->type);
 }
 
-void set_XKeyEvent_type(i, j)
-XKeyEvent* i;
-int j;
+void 
+set_XKeyEvent_type (XKeyEvent *i, int j)
 {
           i->type = j;
 }
@@ -229,201 +214,187 @@ int j;
 
 /********* XButtonEvent functions *****/
 
-long  make_XButtonEvent (){
+long 
+make_XButtonEvent (void){
           return ((long) calloc(1, sizeof(XButtonEvent)));
 }
 
-int  XButtonEvent_same_screen(i)
-XButtonEvent* i;
+int 
+XButtonEvent_same_screen (XButtonEvent *i)
 {
           return(i->same_screen);
 }
 
-void set_XButtonEvent_same_screen(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_same_screen (XButtonEvent *i, int j)
 {
           i->same_screen = j;
 }
 
-int  XButtonEvent_button(i)
-XButtonEvent* i;
+int 
+XButtonEvent_button (XButtonEvent *i)
 {
           return(i->button);
 }
 
-void set_XButtonEvent_button(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_button (XButtonEvent *i, int j)
 {
           i->button = j;
 }
 
-int  XButtonEvent_state(i)
-XButtonEvent* i;
+int 
+XButtonEvent_state (XButtonEvent *i)
 {
           return(i->state);
 }
 
-void set_XButtonEvent_state(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_state (XButtonEvent *i, int j)
 {
           i->state = j;
 }
 
-int  XButtonEvent_y_root(i)
-XButtonEvent* i;
+int 
+XButtonEvent_y_root (XButtonEvent *i)
 {
           return(i->y_root);
 }
 
-void set_XButtonEvent_y_root(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_y_root (XButtonEvent *i, int j)
 {
           i->y_root = j;
 }
 
-int  XButtonEvent_x_root(i)
-XButtonEvent* i;
+int 
+XButtonEvent_x_root (XButtonEvent *i)
 {
           return(i->x_root);
 }
 
-void set_XButtonEvent_x_root(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_x_root (XButtonEvent *i, int j)
 {
           i->x_root = j;
 }
 
-int  XButtonEvent_y(i)
-XButtonEvent* i;
+int 
+XButtonEvent_y (XButtonEvent *i)
 {
           return(i->y);
 }
 
-void set_XButtonEvent_y(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_y (XButtonEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XButtonEvent_x(i)
-XButtonEvent* i;
+int 
+XButtonEvent_x (XButtonEvent *i)
 {
           return(i->x);
 }
 
-void set_XButtonEvent_x(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_x (XButtonEvent *i, int j)
 {
           i->x = j;
 }
 
-int  XButtonEvent_time(i)
-XButtonEvent* i;
+int 
+XButtonEvent_time (XButtonEvent *i)
 {
           return(i->time);
 }
 
-void set_XButtonEvent_time(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_time (XButtonEvent *i, int j)
 {
           i->time = j;
 }
 
-int  XButtonEvent_subwindow(i)
-XButtonEvent* i;
+int 
+XButtonEvent_subwindow (XButtonEvent *i)
 {
           return(i->subwindow);
 }
 
-void set_XButtonEvent_subwindow(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_subwindow (XButtonEvent *i, int j)
 {
           i->subwindow = j;
 }
 
-int  XButtonEvent_root(i)
-XButtonEvent* i;
+int 
+XButtonEvent_root (XButtonEvent *i)
 {
           return(i->root);
 }
 
-void set_XButtonEvent_root(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_root (XButtonEvent *i, int j)
 {
           i->root = j;
 }
 
-int  XButtonEvent_window(i)
-XButtonEvent* i;
+int 
+XButtonEvent_window (XButtonEvent *i)
 {
           return(i->window);
 }
 
-void set_XButtonEvent_window(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_window (XButtonEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XButtonEvent_display(i)
-XButtonEvent* i;
+long 
+XButtonEvent_display (XButtonEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XButtonEvent_display(i, j)
-XButtonEvent* i;
-long j;
+void 
+set_XButtonEvent_display (XButtonEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XButtonEvent_send_event(i)
-XButtonEvent* i;
+int 
+XButtonEvent_send_event (XButtonEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XButtonEvent_send_event(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_send_event (XButtonEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XButtonEvent_serial(i)
-XButtonEvent* i;
+int 
+XButtonEvent_serial (XButtonEvent *i)
 {
           return(i->serial);
 }
 
-void set_XButtonEvent_serial(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_serial (XButtonEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XButtonEvent_type(i)
-XButtonEvent* i;
+int 
+XButtonEvent_type (XButtonEvent *i)
 {
           return(i->type);
 }
 
-void set_XButtonEvent_type(i, j)
-XButtonEvent* i;
-int j;
+void 
+set_XButtonEvent_type (XButtonEvent *i, int j)
 {
           i->type = j;
 }
@@ -431,201 +402,187 @@ int j;
 
 /********* XMotionEvent functions *****/
 
-long  make_XMotionEvent (){
+long 
+make_XMotionEvent (void){
           return ((long) calloc(1, sizeof(XMotionEvent)));
 }
 
-int  XMotionEvent_same_screen(i)
-XMotionEvent* i;
+int 
+XMotionEvent_same_screen (XMotionEvent *i)
 {
           return(i->same_screen);
 }
 
-void set_XMotionEvent_same_screen(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_same_screen (XMotionEvent *i, int j)
 {
           i->same_screen = j;
 }
 
-char XMotionEvent_is_hint(i)
-XMotionEvent* i;
+char 
+XMotionEvent_is_hint (XMotionEvent *i)
 {
           return(i->is_hint);
 }
 
-void set_XMotionEvent_is_hint(i, j)
-XMotionEvent* i;
-char j;
+void 
+set_XMotionEvent_is_hint (XMotionEvent *i, int j)
 {
           i->is_hint = j;
 }
 
-int  XMotionEvent_state(i)
-XMotionEvent* i;
+int 
+XMotionEvent_state (XMotionEvent *i)
 {
           return(i->state);
 }
 
-void set_XMotionEvent_state(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_state (XMotionEvent *i, int j)
 {
           i->state = j;
 }
 
-int  XMotionEvent_y_root(i)
-XMotionEvent* i;
+int 
+XMotionEvent_y_root (XMotionEvent *i)
 {
           return(i->y_root);
 }
 
-void set_XMotionEvent_y_root(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_y_root (XMotionEvent *i, int j)
 {
           i->y_root = j;
 }
 
-int  XMotionEvent_x_root(i)
-XMotionEvent* i;
+int 
+XMotionEvent_x_root (XMotionEvent *i)
 {
           return(i->x_root);
 }
 
-void set_XMotionEvent_x_root(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_x_root (XMotionEvent *i, int j)
 {
           i->x_root = j;
 }
 
-int  XMotionEvent_y(i)
-XMotionEvent* i;
+int 
+XMotionEvent_y (XMotionEvent *i)
 {
           return(i->y);
 }
 
-void set_XMotionEvent_y(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_y (XMotionEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XMotionEvent_x(i)
-XMotionEvent* i;
+int 
+XMotionEvent_x (XMotionEvent *i)
 {
           return(i->x);
 }
 
-void set_XMotionEvent_x(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_x (XMotionEvent *i, int j)
 {
           i->x = j;
 }
 
-int  XMotionEvent_time(i)
-XMotionEvent* i;
+int 
+XMotionEvent_time (XMotionEvent *i)
 {
           return(i->time);
 }
 
-void set_XMotionEvent_time(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_time (XMotionEvent *i, int j)
 {
           i->time = j;
 }
 
-int  XMotionEvent_subwindow(i)
-XMotionEvent* i;
+int 
+XMotionEvent_subwindow (XMotionEvent *i)
 {
           return(i->subwindow);
 }
 
-void set_XMotionEvent_subwindow(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_subwindow (XMotionEvent *i, int j)
 {
           i->subwindow = j;
 }
 
-int  XMotionEvent_root(i)
-XMotionEvent* i;
+int 
+XMotionEvent_root (XMotionEvent *i)
 {
           return(i->root);
 }
 
-void set_XMotionEvent_root(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_root (XMotionEvent *i, int j)
 {
           i->root = j;
 }
 
-int  XMotionEvent_window(i)
-XMotionEvent* i;
+int 
+XMotionEvent_window (XMotionEvent *i)
 {
           return(i->window);
 }
 
-void set_XMotionEvent_window(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_window (XMotionEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XMotionEvent_display(i)
-XMotionEvent* i;
+long 
+XMotionEvent_display (XMotionEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XMotionEvent_display(i, j)
-XMotionEvent* i;
-long j;
+void 
+set_XMotionEvent_display (XMotionEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XMotionEvent_send_event(i)
-XMotionEvent* i;
+int 
+XMotionEvent_send_event (XMotionEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XMotionEvent_send_event(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_send_event (XMotionEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XMotionEvent_serial(i)
-XMotionEvent* i;
+int 
+XMotionEvent_serial (XMotionEvent *i)
 {
           return(i->serial);
 }
 
-void set_XMotionEvent_serial(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_serial (XMotionEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XMotionEvent_type(i)
-XMotionEvent* i;
+int 
+XMotionEvent_type (XMotionEvent *i)
 {
           return(i->type);
 }
 
-void set_XMotionEvent_type(i, j)
-XMotionEvent* i;
-int j;
+void 
+set_XMotionEvent_type (XMotionEvent *i, int j)
 {
           i->type = j;
 }
@@ -633,227 +590,211 @@ int j;
 
 /********* XCrossingEvent functions *****/
 
-long  make_XCrossingEvent (){
+long 
+make_XCrossingEvent (void){
           return ((long) calloc(1, sizeof(XCrossingEvent)));
 }
 
-int  XCrossingEvent_state(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_state (XCrossingEvent *i)
 {
           return(i->state);
 }
 
-void set_XCrossingEvent_state(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_state (XCrossingEvent *i, int j)
 {
           i->state = j;
 }
 
-int  XCrossingEvent_focus(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_focus (XCrossingEvent *i)
 {
           return(i->focus);
 }
 
-void set_XCrossingEvent_focus(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_focus (XCrossingEvent *i, int j)
 {
           i->focus = j;
 }
 
-int  XCrossingEvent_same_screen(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_same_screen (XCrossingEvent *i)
 {
           return(i->same_screen);
 }
 
-void set_XCrossingEvent_same_screen(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_same_screen (XCrossingEvent *i, int j)
 {
           i->same_screen = j;
 }
 
-int  XCrossingEvent_detail(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_detail (XCrossingEvent *i)
 {
           return(i->detail);
 }
 
-void set_XCrossingEvent_detail(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_detail (XCrossingEvent *i, int j)
 {
           i->detail = j;
 }
 
-int  XCrossingEvent_mode(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_mode (XCrossingEvent *i)
 {
           return(i->mode);
 }
 
-void set_XCrossingEvent_mode(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_mode (XCrossingEvent *i, int j)
 {
           i->mode = j;
 }
 
-int  XCrossingEvent_y_root(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_y_root (XCrossingEvent *i)
 {
           return(i->y_root);
 }
 
-void set_XCrossingEvent_y_root(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_y_root (XCrossingEvent *i, int j)
 {
           i->y_root = j;
 }
 
-int  XCrossingEvent_x_root(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_x_root (XCrossingEvent *i)
 {
           return(i->x_root);
 }
 
-void set_XCrossingEvent_x_root(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_x_root (XCrossingEvent *i, int j)
 {
           i->x_root = j;
 }
 
-int  XCrossingEvent_y(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_y (XCrossingEvent *i)
 {
           return(i->y);
 }
 
-void set_XCrossingEvent_y(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_y (XCrossingEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XCrossingEvent_x(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_x (XCrossingEvent *i)
 {
           return(i->x);
 }
 
-void set_XCrossingEvent_x(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_x (XCrossingEvent *i, int j)
 {
           i->x = j;
 }
 
-int  XCrossingEvent_time(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_time (XCrossingEvent *i)
 {
           return(i->time);
 }
 
-void set_XCrossingEvent_time(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_time (XCrossingEvent *i, int j)
 {
           i->time = j;
 }
 
-int  XCrossingEvent_subwindow(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_subwindow (XCrossingEvent *i)
 {
           return(i->subwindow);
 }
 
-void set_XCrossingEvent_subwindow(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_subwindow (XCrossingEvent *i, int j)
 {
           i->subwindow = j;
 }
 
-int  XCrossingEvent_root(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_root (XCrossingEvent *i)
 {
           return(i->root);
 }
 
-void set_XCrossingEvent_root(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_root (XCrossingEvent *i, int j)
 {
           i->root = j;
 }
 
-int  XCrossingEvent_window(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_window (XCrossingEvent *i)
 {
           return(i->window);
 }
 
-void set_XCrossingEvent_window(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_window (XCrossingEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XCrossingEvent_display(i)
-XCrossingEvent* i;
+long 
+XCrossingEvent_display (XCrossingEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XCrossingEvent_display(i, j)
-XCrossingEvent* i;
-long j;
+void 
+set_XCrossingEvent_display (XCrossingEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XCrossingEvent_send_event(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_send_event (XCrossingEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XCrossingEvent_send_event(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_send_event (XCrossingEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XCrossingEvent_serial(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_serial (XCrossingEvent *i)
 {
           return(i->serial);
 }
 
-void set_XCrossingEvent_serial(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_serial (XCrossingEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XCrossingEvent_type(i)
-XCrossingEvent* i;
+int 
+XCrossingEvent_type (XCrossingEvent *i)
 {
           return(i->type);
 }
 
-void set_XCrossingEvent_type(i, j)
-XCrossingEvent* i;
-int j;
+void 
+set_XCrossingEvent_type (XCrossingEvent *i, int j)
 {
           i->type = j;
 }
@@ -861,97 +802,91 @@ int j;
 
 /********* XFocusChangeEvent functions *****/
 
-long  make_XFocusChangeEvent (){
+long 
+make_XFocusChangeEvent (void){
           return ((long) calloc(1, sizeof(XFocusChangeEvent)));
 }
 
-int  XFocusChangeEvent_detail(i)
-XFocusChangeEvent* i;
+int 
+XFocusChangeEvent_detail (XFocusChangeEvent *i)
 {
           return(i->detail);
 }
 
-void set_XFocusChangeEvent_detail(i, j)
-XFocusChangeEvent* i;
-int j;
+void 
+set_XFocusChangeEvent_detail (XFocusChangeEvent *i, int j)
 {
           i->detail = j;
 }
 
-int  XFocusChangeEvent_mode(i)
-XFocusChangeEvent* i;
+int 
+XFocusChangeEvent_mode (XFocusChangeEvent *i)
 {
           return(i->mode);
 }
 
-void set_XFocusChangeEvent_mode(i, j)
-XFocusChangeEvent* i;
-int j;
+void 
+set_XFocusChangeEvent_mode (XFocusChangeEvent *i, int j)
 {
           i->mode = j;
 }
 
-int  XFocusChangeEvent_window(i)
-XFocusChangeEvent* i;
+int 
+XFocusChangeEvent_window (XFocusChangeEvent *i)
 {
           return(i->window);
 }
 
-void set_XFocusChangeEvent_window(i, j)
-XFocusChangeEvent* i;
-int j;
+void 
+set_XFocusChangeEvent_window (XFocusChangeEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XFocusChangeEvent_display(i)
-XFocusChangeEvent* i;
+long 
+XFocusChangeEvent_display (XFocusChangeEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XFocusChangeEvent_display(i, j)
-XFocusChangeEvent* i;
-long j;
+void 
+set_XFocusChangeEvent_display (XFocusChangeEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XFocusChangeEvent_send_event(i)
-XFocusChangeEvent* i;
+int 
+XFocusChangeEvent_send_event (XFocusChangeEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XFocusChangeEvent_send_event(i, j)
-XFocusChangeEvent* i;
-int j;
+void 
+set_XFocusChangeEvent_send_event (XFocusChangeEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XFocusChangeEvent_serial(i)
-XFocusChangeEvent* i;
+int 
+XFocusChangeEvent_serial (XFocusChangeEvent *i)
 {
           return(i->serial);
 }
 
-void set_XFocusChangeEvent_serial(i, j)
-XFocusChangeEvent* i;
-int j;
+void 
+set_XFocusChangeEvent_serial (XFocusChangeEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XFocusChangeEvent_type(i)
-XFocusChangeEvent* i;
+int 
+XFocusChangeEvent_type (XFocusChangeEvent *i)
 {
           return(i->type);
 }
 
-void set_XFocusChangeEvent_type(i, j)
-XFocusChangeEvent* i;
-int j;
+void 
+set_XFocusChangeEvent_type (XFocusChangeEvent *i, int j)
 {
           i->type = j;
 }
@@ -959,76 +894,72 @@ int j;
 
 /********* XKeymapEvent functions *****/
 
-long  make_XKeymapEvent (){
+long 
+make_XKeymapEvent (void){
           return ((long) calloc(1, sizeof(XKeymapEvent)));
 }
 
-char* XKeymapEvent_key_vector(i)
-XKeymapEvent* i;
+char *
+XKeymapEvent_key_vector (XKeymapEvent *i)
 {
           return(i->key_vector);
 }
-int  XKeymapEvent_window(i)
-XKeymapEvent* i;
+int 
+XKeymapEvent_window (XKeymapEvent *i)
 {
           return(i->window);
 }
 
-void set_XKeymapEvent_window(i, j)
-XKeymapEvent* i;
-int j;
+void 
+set_XKeymapEvent_window (XKeymapEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XKeymapEvent_display(i)
-XKeymapEvent* i;
+long 
+XKeymapEvent_display (XKeymapEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XKeymapEvent_display(i, j)
-XKeymapEvent* i;
-long j;
+void 
+set_XKeymapEvent_display (XKeymapEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XKeymapEvent_send_event(i)
-XKeymapEvent* i;
+int 
+XKeymapEvent_send_event (XKeymapEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XKeymapEvent_send_event(i, j)
-XKeymapEvent* i;
-int j;
+void 
+set_XKeymapEvent_send_event (XKeymapEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XKeymapEvent_serial(i)
-XKeymapEvent* i;
+int 
+XKeymapEvent_serial (XKeymapEvent *i)
 {
           return(i->serial);
 }
 
-void set_XKeymapEvent_serial(i, j)
-XKeymapEvent* i;
-int j;
+void 
+set_XKeymapEvent_serial (XKeymapEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XKeymapEvent_type(i)
-XKeymapEvent* i;
+int 
+XKeymapEvent_type (XKeymapEvent *i)
 {
           return(i->type);
 }
 
-void set_XKeymapEvent_type(i, j)
-XKeymapEvent* i;
-int j;
+void 
+set_XKeymapEvent_type (XKeymapEvent *i, int j)
 {
           i->type = j;
 }
@@ -1036,136 +967,127 @@ int j;
 
 /********* XExposeEvent functions *****/
 
-long  make_XExposeEvent (){
+long 
+make_XExposeEvent (void){
           return ((long) calloc(1, sizeof(XExposeEvent)));
 }
 
-int  XExposeEvent_count(i)
-XExposeEvent* i;
+int 
+XExposeEvent_count (XExposeEvent *i)
 {
           return(i->count);
 }
 
-void set_XExposeEvent_count(i, j)
-XExposeEvent* i;
-int j;
+void 
+set_XExposeEvent_count (XExposeEvent *i, int j)
 {
           i->count = j;
 }
 
-int  XExposeEvent_height(i)
-XExposeEvent* i;
+int 
+XExposeEvent_height (XExposeEvent *i)
 {
           return(i->height);
 }
 
-void set_XExposeEvent_height(i, j)
-XExposeEvent* i;
-int j;
+void 
+set_XExposeEvent_height (XExposeEvent *i, int j)
 {
           i->height = j;
 }
 
-int  XExposeEvent_width(i)
-XExposeEvent* i;
+int 
+XExposeEvent_width (XExposeEvent *i)
 {
           return(i->width);
 }
 
-void set_XExposeEvent_width(i, j)
-XExposeEvent* i;
-int j;
+void 
+set_XExposeEvent_width (XExposeEvent *i, int j)
 {
           i->width = j;
 }
 
-int  XExposeEvent_y(i)
-XExposeEvent* i;
+int 
+XExposeEvent_y (XExposeEvent *i)
 {
           return(i->y);
 }
 
-void set_XExposeEvent_y(i, j)
-XExposeEvent* i;
-int j;
+void 
+set_XExposeEvent_y (XExposeEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XExposeEvent_x(i)
-XExposeEvent* i;
+int 
+XExposeEvent_x (XExposeEvent *i)
 {
           return(i->x);
 }
 
-void set_XExposeEvent_x(i, j)
-XExposeEvent* i;
-int j;
+void 
+set_XExposeEvent_x (XExposeEvent *i, int j)
 {
           i->x = j;
 }
 
-int  XExposeEvent_window(i)
-XExposeEvent* i;
+int 
+XExposeEvent_window (XExposeEvent *i)
 {
           return(i->window);
 }
 
-void set_XExposeEvent_window(i, j)
-XExposeEvent* i;
-int j;
+void 
+set_XExposeEvent_window (XExposeEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XExposeEvent_display(i)
-XExposeEvent* i;
+long 
+XExposeEvent_display (XExposeEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XExposeEvent_display(i, j)
-XExposeEvent* i;
-long j;
+void 
+set_XExposeEvent_display (XExposeEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XExposeEvent_send_event(i)
-XExposeEvent* i;
+int 
+XExposeEvent_send_event (XExposeEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XExposeEvent_send_event(i, j)
-XExposeEvent* i;
-int j;
+void 
+set_XExposeEvent_send_event (XExposeEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XExposeEvent_serial(i)
-XExposeEvent* i;
+int 
+XExposeEvent_serial (XExposeEvent *i)
 {
           return(i->serial);
 }
 
-void set_XExposeEvent_serial(i, j)
-XExposeEvent* i;
-int j;
+void 
+set_XExposeEvent_serial (XExposeEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XExposeEvent_type(i)
-XExposeEvent* i;
+int 
+XExposeEvent_type (XExposeEvent *i)
 {
           return(i->type);
 }
 
-void set_XExposeEvent_type(i, j)
-XExposeEvent* i;
-int j;
+void 
+set_XExposeEvent_type (XExposeEvent *i, int j)
 {
           i->type = j;
 }
@@ -1173,162 +1095,151 @@ int j;
 
 /********* XGraphicsExposeEvent functions *****/
 
-long  make_XGraphicsExposeEvent (){
+long 
+make_XGraphicsExposeEvent (void){
           return ((long) calloc(1, sizeof(XGraphicsExposeEvent)));
 }
 
-int  XGraphicsExposeEvent_minor_code(i)
-XGraphicsExposeEvent* i;
+int 
+XGraphicsExposeEvent_minor_code (XGraphicsExposeEvent *i)
 {
           return(i->minor_code);
 }
 
-void set_XGraphicsExposeEvent_minor_code(i, j)
-XGraphicsExposeEvent* i;
-int j;
+void 
+set_XGraphicsExposeEvent_minor_code (XGraphicsExposeEvent *i, int j)
 {
           i->minor_code = j;
 }
 
-int  XGraphicsExposeEvent_major_code(i)
-XGraphicsExposeEvent* i;
+int 
+XGraphicsExposeEvent_major_code (XGraphicsExposeEvent *i)
 {
           return(i->major_code);
 }
 
-void set_XGraphicsExposeEvent_major_code(i, j)
-XGraphicsExposeEvent* i;
-int j;
+void 
+set_XGraphicsExposeEvent_major_code (XGraphicsExposeEvent *i, int j)
 {
           i->major_code = j;
 }
 
-int  XGraphicsExposeEvent_count(i)
-XGraphicsExposeEvent* i;
+int 
+XGraphicsExposeEvent_count (XGraphicsExposeEvent *i)
 {
           return(i->count);
 }
 
-void set_XGraphicsExposeEvent_count(i, j)
-XGraphicsExposeEvent* i;
-int j;
+void 
+set_XGraphicsExposeEvent_count (XGraphicsExposeEvent *i, int j)
 {
           i->count = j;
 }
 
-int  XGraphicsExposeEvent_height(i)
-XGraphicsExposeEvent* i;
+int 
+XGraphicsExposeEvent_height (XGraphicsExposeEvent *i)
 {
           return(i->height);
 }
 
-void set_XGraphicsExposeEvent_height(i, j)
-XGraphicsExposeEvent* i;
-int j;
+void 
+set_XGraphicsExposeEvent_height (XGraphicsExposeEvent *i, int j)
 {
           i->height = j;
 }
 
-int  XGraphicsExposeEvent_width(i)
-XGraphicsExposeEvent* i;
+int 
+XGraphicsExposeEvent_width (XGraphicsExposeEvent *i)
 {
           return(i->width);
 }
 
-void set_XGraphicsExposeEvent_width(i, j)
-XGraphicsExposeEvent* i;
-int j;
+void 
+set_XGraphicsExposeEvent_width (XGraphicsExposeEvent *i, int j)
 {
           i->width = j;
 }
 
-int  XGraphicsExposeEvent_y(i)
-XGraphicsExposeEvent* i;
+int 
+XGraphicsExposeEvent_y (XGraphicsExposeEvent *i)
 {
           return(i->y);
 }
 
-void set_XGraphicsExposeEvent_y(i, j)
-XGraphicsExposeEvent* i;
-int j;
+void 
+set_XGraphicsExposeEvent_y (XGraphicsExposeEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XGraphicsExposeEvent_x(i)
-XGraphicsExposeEvent* i;
+int 
+XGraphicsExposeEvent_x (XGraphicsExposeEvent *i)
 {
           return(i->x);
 }
 
-void set_XGraphicsExposeEvent_x(i, j)
-XGraphicsExposeEvent* i;
-int j;
+void 
+set_XGraphicsExposeEvent_x (XGraphicsExposeEvent *i, int j)
 {
           i->x = j;
 }
 
-Drawable XGraphicsExposeEvent_drawable(i)
-XGraphicsExposeEvent* i;
+Drawable 
+XGraphicsExposeEvent_drawable (XGraphicsExposeEvent *i)
 {
           return(i->drawable);
 }
 
-void set_XGraphicsExposeEvent_drawable(i, j)
-XGraphicsExposeEvent* i;
-Drawable j;
+void 
+set_XGraphicsExposeEvent_drawable (XGraphicsExposeEvent *i, Drawable j)
 {
           i->drawable = j;
 }
 
-long  XGraphicsExposeEvent_display(i)
-XGraphicsExposeEvent* i;
+long 
+XGraphicsExposeEvent_display (XGraphicsExposeEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XGraphicsExposeEvent_display(i, j)
-XGraphicsExposeEvent* i;
-long j;
+void 
+set_XGraphicsExposeEvent_display (XGraphicsExposeEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XGraphicsExposeEvent_send_event(i)
-XGraphicsExposeEvent* i;
+int 
+XGraphicsExposeEvent_send_event (XGraphicsExposeEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XGraphicsExposeEvent_send_event(i, j)
-XGraphicsExposeEvent* i;
-int j;
+void 
+set_XGraphicsExposeEvent_send_event (XGraphicsExposeEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XGraphicsExposeEvent_serial(i)
-XGraphicsExposeEvent* i;
+int 
+XGraphicsExposeEvent_serial (XGraphicsExposeEvent *i)
 {
           return(i->serial);
 }
 
-void set_XGraphicsExposeEvent_serial(i, j)
-XGraphicsExposeEvent* i;
-int j;
+void 
+set_XGraphicsExposeEvent_serial (XGraphicsExposeEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XGraphicsExposeEvent_type(i)
-XGraphicsExposeEvent* i;
+int 
+XGraphicsExposeEvent_type (XGraphicsExposeEvent *i)
 {
           return(i->type);
 }
 
-void set_XGraphicsExposeEvent_type(i, j)
-XGraphicsExposeEvent* i;
-int j;
+void 
+set_XGraphicsExposeEvent_type (XGraphicsExposeEvent *i, int j)
 {
           i->type = j;
 }
@@ -1336,97 +1247,91 @@ int j;
 
 /********* XNoExposeEvent functions *****/
 
-long  make_XNoExposeEvent (){
+long 
+make_XNoExposeEvent (void){
           return ((long) calloc(1, sizeof(XNoExposeEvent)));
 }
 
-int  XNoExposeEvent_minor_code(i)
-XNoExposeEvent* i;
+int 
+XNoExposeEvent_minor_code (XNoExposeEvent *i)
 {
           return(i->minor_code);
 }
 
-void set_XNoExposeEvent_minor_code(i, j)
-XNoExposeEvent* i;
-int j;
+void 
+set_XNoExposeEvent_minor_code (XNoExposeEvent *i, int j)
 {
           i->minor_code = j;
 }
 
-int  XNoExposeEvent_major_code(i)
-XNoExposeEvent* i;
+int 
+XNoExposeEvent_major_code (XNoExposeEvent *i)
 {
           return(i->major_code);
 }
 
-void set_XNoExposeEvent_major_code(i, j)
-XNoExposeEvent* i;
-int j;
+void 
+set_XNoExposeEvent_major_code (XNoExposeEvent *i, int j)
 {
           i->major_code = j;
 }
 
-Drawable XNoExposeEvent_drawable(i)
-XNoExposeEvent* i;
+Drawable 
+XNoExposeEvent_drawable (XNoExposeEvent *i)
 {
           return(i->drawable);
 }
 
-void set_XNoExposeEvent_drawable(i, j)
-XNoExposeEvent* i;
-Drawable j;
+void 
+set_XNoExposeEvent_drawable (XNoExposeEvent *i, Drawable j)
 {
           i->drawable = j;
 }
 
-long  XNoExposeEvent_display(i)
-XNoExposeEvent* i;
+long 
+XNoExposeEvent_display (XNoExposeEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XNoExposeEvent_display(i, j)
-XNoExposeEvent* i;
-long j;
+void 
+set_XNoExposeEvent_display (XNoExposeEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XNoExposeEvent_send_event(i)
-XNoExposeEvent* i;
+int 
+XNoExposeEvent_send_event (XNoExposeEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XNoExposeEvent_send_event(i, j)
-XNoExposeEvent* i;
-int j;
+void 
+set_XNoExposeEvent_send_event (XNoExposeEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XNoExposeEvent_serial(i)
-XNoExposeEvent* i;
+int 
+XNoExposeEvent_serial (XNoExposeEvent *i)
 {
           return(i->serial);
 }
 
-void set_XNoExposeEvent_serial(i, j)
-XNoExposeEvent* i;
-int j;
+void 
+set_XNoExposeEvent_serial (XNoExposeEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XNoExposeEvent_type(i)
-XNoExposeEvent* i;
+int 
+XNoExposeEvent_type (XNoExposeEvent *i)
 {
           return(i->type);
 }
 
-void set_XNoExposeEvent_type(i, j)
-XNoExposeEvent* i;
-int j;
+void 
+set_XNoExposeEvent_type (XNoExposeEvent *i, int j)
 {
           i->type = j;
 }
@@ -1434,84 +1339,79 @@ int j;
 
 /********* XVisibilityEvent functions *****/
 
-long  make_XVisibilityEvent (){
+long 
+make_XVisibilityEvent (void){
           return ((long) calloc(1, sizeof(XVisibilityEvent)));
 }
 
-int  XVisibilityEvent_state(i)
-XVisibilityEvent* i;
+int 
+XVisibilityEvent_state (XVisibilityEvent *i)
 {
           return(i->state);
 }
 
-void set_XVisibilityEvent_state(i, j)
-XVisibilityEvent* i;
-int j;
+void 
+set_XVisibilityEvent_state (XVisibilityEvent *i, int j)
 {
           i->state = j;
 }
 
-int  XVisibilityEvent_window(i)
-XVisibilityEvent* i;
+int 
+XVisibilityEvent_window (XVisibilityEvent *i)
 {
           return(i->window);
 }
 
-void set_XVisibilityEvent_window(i, j)
-XVisibilityEvent* i;
-int j;
+void 
+set_XVisibilityEvent_window (XVisibilityEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XVisibilityEvent_display(i)
-XVisibilityEvent* i;
+long 
+XVisibilityEvent_display (XVisibilityEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XVisibilityEvent_display(i, j)
-XVisibilityEvent* i;
-long j;
+void 
+set_XVisibilityEvent_display (XVisibilityEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XVisibilityEvent_send_event(i)
-XVisibilityEvent* i;
+int 
+XVisibilityEvent_send_event (XVisibilityEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XVisibilityEvent_send_event(i, j)
-XVisibilityEvent* i;
-int j;
+void 
+set_XVisibilityEvent_send_event (XVisibilityEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XVisibilityEvent_serial(i)
-XVisibilityEvent* i;
+int 
+XVisibilityEvent_serial (XVisibilityEvent *i)
 {
           return(i->serial);
 }
 
-void set_XVisibilityEvent_serial(i, j)
-XVisibilityEvent* i;
-int j;
+void 
+set_XVisibilityEvent_serial (XVisibilityEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XVisibilityEvent_type(i)
-XVisibilityEvent* i;
+int 
+XVisibilityEvent_type (XVisibilityEvent *i)
 {
           return(i->type);
 }
 
-void set_XVisibilityEvent_type(i, j)
-XVisibilityEvent* i;
-int j;
+void 
+set_XVisibilityEvent_type (XVisibilityEvent *i, int j)
 {
           i->type = j;
 }
@@ -1519,162 +1419,151 @@ int j;
 
 /********* XCreateWindowEvent functions *****/
 
-long  make_XCreateWindowEvent (){
+long 
+make_XCreateWindowEvent (void){
           return ((long) calloc(1, sizeof(XCreateWindowEvent)));
 }
 
-int  XCreateWindowEvent_override_redirect(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_override_redirect (XCreateWindowEvent *i)
 {
           return(i->override_redirect);
 }
 
-void set_XCreateWindowEvent_override_redirect(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_override_redirect (XCreateWindowEvent *i, int j)
 {
           i->override_redirect = j;
 }
 
-int  XCreateWindowEvent_border_width(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_border_width (XCreateWindowEvent *i)
 {
           return(i->border_width);
 }
 
-void set_XCreateWindowEvent_border_width(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_border_width (XCreateWindowEvent *i, int j)
 {
           i->border_width = j;
 }
 
-int  XCreateWindowEvent_height(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_height (XCreateWindowEvent *i)
 {
           return(i->height);
 }
 
-void set_XCreateWindowEvent_height(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_height (XCreateWindowEvent *i, int j)
 {
           i->height = j;
 }
 
-int  XCreateWindowEvent_width(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_width (XCreateWindowEvent *i)
 {
           return(i->width);
 }
 
-void set_XCreateWindowEvent_width(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_width (XCreateWindowEvent *i, int j)
 {
           i->width = j;
 }
 
-int  XCreateWindowEvent_y(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_y (XCreateWindowEvent *i)
 {
           return(i->y);
 }
 
-void set_XCreateWindowEvent_y(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_y (XCreateWindowEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XCreateWindowEvent_x(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_x (XCreateWindowEvent *i)
 {
           return(i->x);
 }
 
-void set_XCreateWindowEvent_x(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_x (XCreateWindowEvent *i, int j)
 {
           i->x = j;
 }
 
-int  XCreateWindowEvent_window(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_window (XCreateWindowEvent *i)
 {
           return(i->window);
 }
 
-void set_XCreateWindowEvent_window(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_window (XCreateWindowEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XCreateWindowEvent_parent(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_parent (XCreateWindowEvent *i)
 {
           return(i->parent);
 }
 
-void set_XCreateWindowEvent_parent(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_parent (XCreateWindowEvent *i, int j)
 {
           i->parent = j;
 }
 
-long  XCreateWindowEvent_display(i)
-XCreateWindowEvent* i;
+long 
+XCreateWindowEvent_display (XCreateWindowEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XCreateWindowEvent_display(i, j)
-XCreateWindowEvent* i;
-long j;
+void 
+set_XCreateWindowEvent_display (XCreateWindowEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XCreateWindowEvent_send_event(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_send_event (XCreateWindowEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XCreateWindowEvent_send_event(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_send_event (XCreateWindowEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XCreateWindowEvent_serial(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_serial (XCreateWindowEvent *i)
 {
           return(i->serial);
 }
 
-void set_XCreateWindowEvent_serial(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_serial (XCreateWindowEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XCreateWindowEvent_type(i)
-XCreateWindowEvent* i;
+int 
+XCreateWindowEvent_type (XCreateWindowEvent *i)
 {
           return(i->type);
 }
 
-void set_XCreateWindowEvent_type(i, j)
-XCreateWindowEvent* i;
-int j;
+void 
+set_XCreateWindowEvent_type (XCreateWindowEvent *i, int j)
 {
           i->type = j;
 }
@@ -1682,84 +1571,79 @@ int j;
 
 /********* XDestroyWindowEvent functions *****/
 
-long  make_XDestroyWindowEvent (){
+long 
+make_XDestroyWindowEvent (void){
           return ((long) calloc(1, sizeof(XDestroyWindowEvent)));
 }
 
-int  XDestroyWindowEvent_window(i)
-XDestroyWindowEvent* i;
+int 
+XDestroyWindowEvent_window (XDestroyWindowEvent *i)
 {
           return(i->window);
 }
 
-void set_XDestroyWindowEvent_window(i, j)
-XDestroyWindowEvent* i;
-int j;
+void 
+set_XDestroyWindowEvent_window (XDestroyWindowEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XDestroyWindowEvent_event(i)
-XDestroyWindowEvent* i;
+int 
+XDestroyWindowEvent_event (XDestroyWindowEvent *i)
 {
           return(i->event);
 }
 
-void set_XDestroyWindowEvent_event(i, j)
-XDestroyWindowEvent* i;
-int j;
+void 
+set_XDestroyWindowEvent_event (XDestroyWindowEvent *i, int j)
 {
           i->event = j;
 }
 
-long  XDestroyWindowEvent_display(i)
-XDestroyWindowEvent* i;
+long 
+XDestroyWindowEvent_display (XDestroyWindowEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XDestroyWindowEvent_display(i, j)
-XDestroyWindowEvent* i;
-long j;
+void 
+set_XDestroyWindowEvent_display (XDestroyWindowEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XDestroyWindowEvent_send_event(i)
-XDestroyWindowEvent* i;
+int 
+XDestroyWindowEvent_send_event (XDestroyWindowEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XDestroyWindowEvent_send_event(i, j)
-XDestroyWindowEvent* i;
-int j;
+void 
+set_XDestroyWindowEvent_send_event (XDestroyWindowEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XDestroyWindowEvent_serial(i)
-XDestroyWindowEvent* i;
+int 
+XDestroyWindowEvent_serial (XDestroyWindowEvent *i)
 {
           return(i->serial);
 }
 
-void set_XDestroyWindowEvent_serial(i, j)
-XDestroyWindowEvent* i;
-int j;
+void 
+set_XDestroyWindowEvent_serial (XDestroyWindowEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XDestroyWindowEvent_type(i)
-XDestroyWindowEvent* i;
+int 
+XDestroyWindowEvent_type (XDestroyWindowEvent *i)
 {
           return(i->type);
 }
 
-void set_XDestroyWindowEvent_type(i, j)
-XDestroyWindowEvent* i;
-int j;
+void 
+set_XDestroyWindowEvent_type (XDestroyWindowEvent *i, int j)
 {
           i->type = j;
 }
@@ -1767,97 +1651,91 @@ int j;
 
 /********* XUnmapEvent functions *****/
 
-long  make_XUnmapEvent (){
+long 
+make_XUnmapEvent (void){
           return ((long) calloc(1, sizeof(XUnmapEvent)));
 }
 
-int  XUnmapEvent_from_configure(i)
-XUnmapEvent* i;
+int 
+XUnmapEvent_from_configure (XUnmapEvent *i)
 {
           return(i->from_configure);
 }
 
-void set_XUnmapEvent_from_configure(i, j)
-XUnmapEvent* i;
-int j;
+void 
+set_XUnmapEvent_from_configure (XUnmapEvent *i, int j)
 {
           i->from_configure = j;
 }
 
-int  XUnmapEvent_window(i)
-XUnmapEvent* i;
+int 
+XUnmapEvent_window (XUnmapEvent *i)
 {
           return(i->window);
 }
 
-void set_XUnmapEvent_window(i, j)
-XUnmapEvent* i;
-int j;
+void 
+set_XUnmapEvent_window (XUnmapEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XUnmapEvent_event(i)
-XUnmapEvent* i;
+int 
+XUnmapEvent_event (XUnmapEvent *i)
 {
           return(i->event);
 }
 
-void set_XUnmapEvent_event(i, j)
-XUnmapEvent* i;
-int j;
+void 
+set_XUnmapEvent_event (XUnmapEvent *i, int j)
 {
           i->event = j;
 }
 
-long  XUnmapEvent_display(i)
-XUnmapEvent* i;
+long 
+XUnmapEvent_display (XUnmapEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XUnmapEvent_display(i, j)
-XUnmapEvent* i;
-long j;
+void 
+set_XUnmapEvent_display (XUnmapEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XUnmapEvent_send_event(i)
-XUnmapEvent* i;
+int 
+XUnmapEvent_send_event (XUnmapEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XUnmapEvent_send_event(i, j)
-XUnmapEvent* i;
-int j;
+void 
+set_XUnmapEvent_send_event (XUnmapEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XUnmapEvent_serial(i)
-XUnmapEvent* i;
+int 
+XUnmapEvent_serial (XUnmapEvent *i)
 {
           return(i->serial);
 }
 
-void set_XUnmapEvent_serial(i, j)
-XUnmapEvent* i;
-int j;
+void 
+set_XUnmapEvent_serial (XUnmapEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XUnmapEvent_type(i)
-XUnmapEvent* i;
+int 
+XUnmapEvent_type (XUnmapEvent *i)
 {
           return(i->type);
 }
 
-void set_XUnmapEvent_type(i, j)
-XUnmapEvent* i;
-int j;
+void 
+set_XUnmapEvent_type (XUnmapEvent *i, int j)
 {
           i->type = j;
 }
@@ -1865,97 +1743,91 @@ int j;
 
 /********* XMapEvent functions *****/
 
-long  make_XMapEvent (){
+long 
+make_XMapEvent (void){
           return ((long) calloc(1, sizeof(XMapEvent)));
 }
 
-int  XMapEvent_override_redirect(i)
-XMapEvent* i;
+int 
+XMapEvent_override_redirect (XMapEvent *i)
 {
           return(i->override_redirect);
 }
 
-void set_XMapEvent_override_redirect(i, j)
-XMapEvent* i;
-int j;
+void 
+set_XMapEvent_override_redirect (XMapEvent *i, int j)
 {
           i->override_redirect = j;
 }
 
-int  XMapEvent_window(i)
-XMapEvent* i;
+int 
+XMapEvent_window (XMapEvent *i)
 {
           return(i->window);
 }
 
-void set_XMapEvent_window(i, j)
-XMapEvent* i;
-int j;
+void 
+set_XMapEvent_window (XMapEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XMapEvent_event(i)
-XMapEvent* i;
+int 
+XMapEvent_event (XMapEvent *i)
 {
           return(i->event);
 }
 
-void set_XMapEvent_event(i, j)
-XMapEvent* i;
-int j;
+void 
+set_XMapEvent_event (XMapEvent *i, int j)
 {
           i->event = j;
 }
 
-long  XMapEvent_display(i)
-XMapEvent* i;
+long 
+XMapEvent_display (XMapEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XMapEvent_display(i, j)
-XMapEvent* i;
-long j;
+void 
+set_XMapEvent_display (XMapEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XMapEvent_send_event(i)
-XMapEvent* i;
+int 
+XMapEvent_send_event (XMapEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XMapEvent_send_event(i, j)
-XMapEvent* i;
-int j;
+void 
+set_XMapEvent_send_event (XMapEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XMapEvent_serial(i)
-XMapEvent* i;
+int 
+XMapEvent_serial (XMapEvent *i)
 {
           return(i->serial);
 }
 
-void set_XMapEvent_serial(i, j)
-XMapEvent* i;
-int j;
+void 
+set_XMapEvent_serial (XMapEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XMapEvent_type(i)
-XMapEvent* i;
+int 
+XMapEvent_type (XMapEvent *i)
 {
           return(i->type);
 }
 
-void set_XMapEvent_type(i, j)
-XMapEvent* i;
-int j;
+void 
+set_XMapEvent_type (XMapEvent *i, int j)
 {
           i->type = j;
 }
@@ -1963,84 +1835,79 @@ int j;
 
 /********* XMapRequestEvent functions *****/
 
-long  make_XMapRequestEvent (){
+long 
+make_XMapRequestEvent (void){
           return ((long) calloc(1, sizeof(XMapRequestEvent)));
 }
 
-int  XMapRequestEvent_window(i)
-XMapRequestEvent* i;
+int 
+XMapRequestEvent_window (XMapRequestEvent *i)
 {
           return(i->window);
 }
 
-void set_XMapRequestEvent_window(i, j)
-XMapRequestEvent* i;
-int j;
+void 
+set_XMapRequestEvent_window (XMapRequestEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XMapRequestEvent_parent(i)
-XMapRequestEvent* i;
+int 
+XMapRequestEvent_parent (XMapRequestEvent *i)
 {
           return(i->parent);
 }
 
-void set_XMapRequestEvent_parent(i, j)
-XMapRequestEvent* i;
-int j;
+void 
+set_XMapRequestEvent_parent (XMapRequestEvent *i, int j)
 {
           i->parent = j;
 }
 
-long  XMapRequestEvent_display(i)
-XMapRequestEvent* i;
+long 
+XMapRequestEvent_display (XMapRequestEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XMapRequestEvent_display(i, j)
-XMapRequestEvent* i;
-long j;
+void 
+set_XMapRequestEvent_display (XMapRequestEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XMapRequestEvent_send_event(i)
-XMapRequestEvent* i;
+int 
+XMapRequestEvent_send_event (XMapRequestEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XMapRequestEvent_send_event(i, j)
-XMapRequestEvent* i;
-int j;
+void 
+set_XMapRequestEvent_send_event (XMapRequestEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XMapRequestEvent_serial(i)
-XMapRequestEvent* i;
+int 
+XMapRequestEvent_serial (XMapRequestEvent *i)
 {
           return(i->serial);
 }
 
-void set_XMapRequestEvent_serial(i, j)
-XMapRequestEvent* i;
-int j;
+void 
+set_XMapRequestEvent_serial (XMapRequestEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XMapRequestEvent_type(i)
-XMapRequestEvent* i;
+int 
+XMapRequestEvent_type (XMapRequestEvent *i)
 {
           return(i->type);
 }
 
-void set_XMapRequestEvent_type(i, j)
-XMapRequestEvent* i;
-int j;
+void 
+set_XMapRequestEvent_type (XMapRequestEvent *i, int j)
 {
           i->type = j;
 }
@@ -2048,136 +1915,127 @@ int j;
 
 /********* XReparentEvent functions *****/
 
-long  make_XReparentEvent (){
+long 
+make_XReparentEvent (void){
           return ((long) calloc(1, sizeof(XReparentEvent)));
 }
 
-int  XReparentEvent_override_redirect(i)
-XReparentEvent* i;
+int 
+XReparentEvent_override_redirect (XReparentEvent *i)
 {
           return(i->override_redirect);
 }
 
-void set_XReparentEvent_override_redirect(i, j)
-XReparentEvent* i;
-int j;
+void 
+set_XReparentEvent_override_redirect (XReparentEvent *i, int j)
 {
           i->override_redirect = j;
 }
 
-int  XReparentEvent_y(i)
-XReparentEvent* i;
+int 
+XReparentEvent_y (XReparentEvent *i)
 {
           return(i->y);
 }
 
-void set_XReparentEvent_y(i, j)
-XReparentEvent* i;
-int j;
+void 
+set_XReparentEvent_y (XReparentEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XReparentEvent_x(i)
-XReparentEvent* i;
+int 
+XReparentEvent_x (XReparentEvent *i)
 {
           return(i->x);
 }
 
-void set_XReparentEvent_x(i, j)
-XReparentEvent* i;
-int j;
+void 
+set_XReparentEvent_x (XReparentEvent *i, int j)
 {
           i->x = j;
 }
 
-int  XReparentEvent_parent(i)
-XReparentEvent* i;
+int 
+XReparentEvent_parent (XReparentEvent *i)
 {
           return(i->parent);
 }
 
-void set_XReparentEvent_parent(i, j)
-XReparentEvent* i;
-int j;
+void 
+set_XReparentEvent_parent (XReparentEvent *i, int j)
 {
           i->parent = j;
 }
 
-int  XReparentEvent_window(i)
-XReparentEvent* i;
+int 
+XReparentEvent_window (XReparentEvent *i)
 {
           return(i->window);
 }
 
-void set_XReparentEvent_window(i, j)
-XReparentEvent* i;
-int j;
+void 
+set_XReparentEvent_window (XReparentEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XReparentEvent_event(i)
-XReparentEvent* i;
+int 
+XReparentEvent_event (XReparentEvent *i)
 {
           return(i->event);
 }
 
-void set_XReparentEvent_event(i, j)
-XReparentEvent* i;
-int j;
+void 
+set_XReparentEvent_event (XReparentEvent *i, int j)
 {
           i->event = j;
 }
 
-long  XReparentEvent_display(i)
-XReparentEvent* i;
+long 
+XReparentEvent_display (XReparentEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XReparentEvent_display(i, j)
-XReparentEvent* i;
-long j;
+void 
+set_XReparentEvent_display (XReparentEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XReparentEvent_send_event(i)
-XReparentEvent* i;
+int 
+XReparentEvent_send_event (XReparentEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XReparentEvent_send_event(i, j)
-XReparentEvent* i;
-int j;
+void 
+set_XReparentEvent_send_event (XReparentEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XReparentEvent_serial(i)
-XReparentEvent* i;
+int 
+XReparentEvent_serial (XReparentEvent *i)
 {
           return(i->serial);
 }
 
-void set_XReparentEvent_serial(i, j)
-XReparentEvent* i;
-int j;
+void 
+set_XReparentEvent_serial (XReparentEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XReparentEvent_type(i)
-XReparentEvent* i;
+int 
+XReparentEvent_type (XReparentEvent *i)
 {
           return(i->type);
 }
 
-void set_XReparentEvent_type(i, j)
-XReparentEvent* i;
-int j;
+void 
+set_XReparentEvent_type (XReparentEvent *i, int j)
 {
           i->type = j;
 }
@@ -2185,175 +2043,163 @@ int j;
 
 /********* XConfigureEvent functions *****/
 
-long  make_XConfigureEvent (){
+long 
+make_XConfigureEvent (void){
           return ((long) calloc(1, sizeof(XConfigureEvent)));
 }
 
-int  XConfigureEvent_override_redirect(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_override_redirect (XConfigureEvent *i)
 {
           return(i->override_redirect);
 }
 
-void set_XConfigureEvent_override_redirect(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_override_redirect (XConfigureEvent *i, int j)
 {
           i->override_redirect = j;
 }
 
-int  XConfigureEvent_above(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_above (XConfigureEvent *i)
 {
           return(i->above);
 }
 
-void set_XConfigureEvent_above(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_above (XConfigureEvent *i, int j)
 {
           i->above = j;
 }
 
-int  XConfigureEvent_border_width(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_border_width (XConfigureEvent *i)
 {
           return(i->border_width);
 }
 
-void set_XConfigureEvent_border_width(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_border_width (XConfigureEvent *i, int j)
 {
           i->border_width = j;
 }
 
-int  XConfigureEvent_height(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_height (XConfigureEvent *i)
 {
           return(i->height);
 }
 
-void set_XConfigureEvent_height(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_height (XConfigureEvent *i, int j)
 {
           i->height = j;
 }
 
-int  XConfigureEvent_width(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_width (XConfigureEvent *i)
 {
           return(i->width);
 }
 
-void set_XConfigureEvent_width(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_width (XConfigureEvent *i, int j)
 {
           i->width = j;
 }
 
-int  XConfigureEvent_y(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_y (XConfigureEvent *i)
 {
           return(i->y);
 }
 
-void set_XConfigureEvent_y(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_y (XConfigureEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XConfigureEvent_x(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_x (XConfigureEvent *i)
 {
           return(i->x);
 }
 
-void set_XConfigureEvent_x(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_x (XConfigureEvent *i, int j)
 {
           i->x = j;
 }
 
-int  XConfigureEvent_window(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_window (XConfigureEvent *i)
 {
           return(i->window);
 }
 
-void set_XConfigureEvent_window(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_window (XConfigureEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XConfigureEvent_event(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_event (XConfigureEvent *i)
 {
           return(i->event);
 }
 
-void set_XConfigureEvent_event(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_event (XConfigureEvent *i, int j)
 {
           i->event = j;
 }
 
-long  XConfigureEvent_display(i)
-XConfigureEvent* i;
+long 
+XConfigureEvent_display (XConfigureEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XConfigureEvent_display(i, j)
-XConfigureEvent* i;
-long j;
+void 
+set_XConfigureEvent_display (XConfigureEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XConfigureEvent_send_event(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_send_event (XConfigureEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XConfigureEvent_send_event(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_send_event (XConfigureEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XConfigureEvent_serial(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_serial (XConfigureEvent *i)
 {
           return(i->serial);
 }
 
-void set_XConfigureEvent_serial(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_serial (XConfigureEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XConfigureEvent_type(i)
-XConfigureEvent* i;
+int 
+XConfigureEvent_type (XConfigureEvent *i)
 {
           return(i->type);
 }
 
-void set_XConfigureEvent_type(i, j)
-XConfigureEvent* i;
-int j;
+void 
+set_XConfigureEvent_type (XConfigureEvent *i, int j)
 {
           i->type = j;
 }
@@ -2361,110 +2207,103 @@ int j;
 
 /********* XGravityEvent functions *****/
 
-long  make_XGravityEvent (){
+long 
+make_XGravityEvent (void){
           return ((long) calloc(1, sizeof(XGravityEvent)));
 }
 
-int  XGravityEvent_y(i)
-XGravityEvent* i;
+int 
+XGravityEvent_y (XGravityEvent *i)
 {
           return(i->y);
 }
 
-void set_XGravityEvent_y(i, j)
-XGravityEvent* i;
-int j;
+void 
+set_XGravityEvent_y (XGravityEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XGravityEvent_x(i)
-XGravityEvent* i;
+int 
+XGravityEvent_x (XGravityEvent *i)
 {
           return(i->x);
 }
 
-void set_XGravityEvent_x(i, j)
-XGravityEvent* i;
-int j;
+void 
+set_XGravityEvent_x (XGravityEvent *i, int j)
 {
           i->x = j;
 }
 
-int  XGravityEvent_window(i)
-XGravityEvent* i;
+int 
+XGravityEvent_window (XGravityEvent *i)
 {
           return(i->window);
 }
 
-void set_XGravityEvent_window(i, j)
-XGravityEvent* i;
-int j;
+void 
+set_XGravityEvent_window (XGravityEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XGravityEvent_event(i)
-XGravityEvent* i;
+int 
+XGravityEvent_event (XGravityEvent *i)
 {
           return(i->event);
 }
 
-void set_XGravityEvent_event(i, j)
-XGravityEvent* i;
-int j;
+void 
+set_XGravityEvent_event (XGravityEvent *i, int j)
 {
           i->event = j;
 }
 
-long  XGravityEvent_display(i)
-XGravityEvent* i;
+long 
+XGravityEvent_display (XGravityEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XGravityEvent_display(i, j)
-XGravityEvent* i;
-long j;
+void 
+set_XGravityEvent_display (XGravityEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XGravityEvent_send_event(i)
-XGravityEvent* i;
+int 
+XGravityEvent_send_event (XGravityEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XGravityEvent_send_event(i, j)
-XGravityEvent* i;
-int j;
+void 
+set_XGravityEvent_send_event (XGravityEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XGravityEvent_serial(i)
-XGravityEvent* i;
+int 
+XGravityEvent_serial (XGravityEvent *i)
 {
           return(i->serial);
 }
 
-void set_XGravityEvent_serial(i, j)
-XGravityEvent* i;
-int j;
+void 
+set_XGravityEvent_serial (XGravityEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XGravityEvent_type(i)
-XGravityEvent* i;
+int 
+XGravityEvent_type (XGravityEvent *i)
 {
           return(i->type);
 }
 
-void set_XGravityEvent_type(i, j)
-XGravityEvent* i;
-int j;
+void 
+set_XGravityEvent_type (XGravityEvent *i, int j)
 {
           i->type = j;
 }
@@ -2472,97 +2311,91 @@ int j;
 
 /********* XResizeRequestEvent functions *****/
 
-long  make_XResizeRequestEvent (){
+long 
+make_XResizeRequestEvent (void){
           return ((long) calloc(1, sizeof(XResizeRequestEvent)));
 }
 
-int  XResizeRequestEvent_height(i)
-XResizeRequestEvent* i;
+int 
+XResizeRequestEvent_height (XResizeRequestEvent *i)
 {
           return(i->height);
 }
 
-void set_XResizeRequestEvent_height(i, j)
-XResizeRequestEvent* i;
-int j;
+void 
+set_XResizeRequestEvent_height (XResizeRequestEvent *i, int j)
 {
           i->height = j;
 }
 
-int  XResizeRequestEvent_width(i)
-XResizeRequestEvent* i;
+int 
+XResizeRequestEvent_width (XResizeRequestEvent *i)
 {
           return(i->width);
 }
 
-void set_XResizeRequestEvent_width(i, j)
-XResizeRequestEvent* i;
-int j;
+void 
+set_XResizeRequestEvent_width (XResizeRequestEvent *i, int j)
 {
           i->width = j;
 }
 
-int  XResizeRequestEvent_window(i)
-XResizeRequestEvent* i;
+int 
+XResizeRequestEvent_window (XResizeRequestEvent *i)
 {
           return(i->window);
 }
 
-void set_XResizeRequestEvent_window(i, j)
-XResizeRequestEvent* i;
-int j;
+void 
+set_XResizeRequestEvent_window (XResizeRequestEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XResizeRequestEvent_display(i)
-XResizeRequestEvent* i;
+long 
+XResizeRequestEvent_display (XResizeRequestEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XResizeRequestEvent_display(i, j)
-XResizeRequestEvent* i;
-long j;
+void 
+set_XResizeRequestEvent_display (XResizeRequestEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XResizeRequestEvent_send_event(i)
-XResizeRequestEvent* i;
+int 
+XResizeRequestEvent_send_event (XResizeRequestEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XResizeRequestEvent_send_event(i, j)
-XResizeRequestEvent* i;
-int j;
+void 
+set_XResizeRequestEvent_send_event (XResizeRequestEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XResizeRequestEvent_serial(i)
-XResizeRequestEvent* i;
+int 
+XResizeRequestEvent_serial (XResizeRequestEvent *i)
 {
           return(i->serial);
 }
 
-void set_XResizeRequestEvent_serial(i, j)
-XResizeRequestEvent* i;
-int j;
+void 
+set_XResizeRequestEvent_serial (XResizeRequestEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XResizeRequestEvent_type(i)
-XResizeRequestEvent* i;
+int 
+XResizeRequestEvent_type (XResizeRequestEvent *i)
 {
           return(i->type);
 }
 
-void set_XResizeRequestEvent_type(i, j)
-XResizeRequestEvent* i;
-int j;
+void 
+set_XResizeRequestEvent_type (XResizeRequestEvent *i, int j)
 {
           i->type = j;
 }
@@ -2570,188 +2403,175 @@ int j;
 
 /********* XConfigureRequestEvent functions *****/
 
-long  make_XConfigureRequestEvent (){
+long 
+make_XConfigureRequestEvent (void){
           return ((long) calloc(1, sizeof(XConfigureRequestEvent)));
 }
 
-int  XConfigureRequestEvent_value_mask(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_value_mask (XConfigureRequestEvent *i)
 {
           return(i->value_mask);
 }
 
-void set_XConfigureRequestEvent_value_mask(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_value_mask (XConfigureRequestEvent *i, int j)
 {
           i->value_mask = j;
 }
 
-int  XConfigureRequestEvent_detail(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_detail (XConfigureRequestEvent *i)
 {
           return(i->detail);
 }
 
-void set_XConfigureRequestEvent_detail(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_detail (XConfigureRequestEvent *i, int j)
 {
           i->detail = j;
 }
 
-int  XConfigureRequestEvent_above(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_above (XConfigureRequestEvent *i)
 {
           return(i->above);
 }
 
-void set_XConfigureRequestEvent_above(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_above (XConfigureRequestEvent *i, int j)
 {
           i->above = j;
 }
 
-int  XConfigureRequestEvent_border_width(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_border_width (XConfigureRequestEvent *i)
 {
           return(i->border_width);
 }
 
-void set_XConfigureRequestEvent_border_width(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_border_width (XConfigureRequestEvent *i, int j)
 {
           i->border_width = j;
 }
 
-int  XConfigureRequestEvent_height(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_height (XConfigureRequestEvent *i)
 {
           return(i->height);
 }
 
-void set_XConfigureRequestEvent_height(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_height (XConfigureRequestEvent *i, int j)
 {
           i->height = j;
 }
 
-int  XConfigureRequestEvent_width(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_width (XConfigureRequestEvent *i)
 {
           return(i->width);
 }
 
-void set_XConfigureRequestEvent_width(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_width (XConfigureRequestEvent *i, int j)
 {
           i->width = j;
 }
 
-int  XConfigureRequestEvent_y(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_y (XConfigureRequestEvent *i)
 {
           return(i->y);
 }
 
-void set_XConfigureRequestEvent_y(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_y (XConfigureRequestEvent *i, int j)
 {
           i->y = j;
 }
 
-int  XConfigureRequestEvent_x(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_x (XConfigureRequestEvent *i)
 {
           return(i->x);
 }
 
-void set_XConfigureRequestEvent_x(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_x (XConfigureRequestEvent *i, int j)
 {
           i->x = j;
 }
 
-int  XConfigureRequestEvent_window(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_window (XConfigureRequestEvent *i)
 {
           return(i->window);
 }
 
-void set_XConfigureRequestEvent_window(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_window (XConfigureRequestEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XConfigureRequestEvent_parent(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_parent (XConfigureRequestEvent *i)
 {
           return(i->parent);
 }
 
-void set_XConfigureRequestEvent_parent(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_parent (XConfigureRequestEvent *i, int j)
 {
           i->parent = j;
 }
 
-long  XConfigureRequestEvent_display(i)
-XConfigureRequestEvent* i;
+long 
+XConfigureRequestEvent_display (XConfigureRequestEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XConfigureRequestEvent_display(i, j)
-XConfigureRequestEvent* i;
-long j;
+void 
+set_XConfigureRequestEvent_display (XConfigureRequestEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XConfigureRequestEvent_send_event(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_send_event (XConfigureRequestEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XConfigureRequestEvent_send_event(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_send_event (XConfigureRequestEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XConfigureRequestEvent_serial(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_serial (XConfigureRequestEvent *i)
 {
           return(i->serial);
 }
 
-void set_XConfigureRequestEvent_serial(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_serial (XConfigureRequestEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XConfigureRequestEvent_type(i)
-XConfigureRequestEvent* i;
+int 
+XConfigureRequestEvent_type (XConfigureRequestEvent *i)
 {
           return(i->type);
 }
 
-void set_XConfigureRequestEvent_type(i, j)
-XConfigureRequestEvent* i;
-int j;
+void 
+set_XConfigureRequestEvent_type (XConfigureRequestEvent *i, int j)
 {
           i->type = j;
 }
@@ -2759,97 +2579,91 @@ int j;
 
 /********* XCirculateEvent functions *****/
 
-long  make_XCirculateEvent (){
+long 
+make_XCirculateEvent (void){
           return ((long) calloc(1, sizeof(XCirculateEvent)));
 }
 
-int  XCirculateEvent_place(i)
-XCirculateEvent* i;
+int 
+XCirculateEvent_place (XCirculateEvent *i)
 {
           return(i->place);
 }
 
-void set_XCirculateEvent_place(i, j)
-XCirculateEvent* i;
-int j;
+void 
+set_XCirculateEvent_place (XCirculateEvent *i, int j)
 {
           i->place = j;
 }
 
-int  XCirculateEvent_window(i)
-XCirculateEvent* i;
+int 
+XCirculateEvent_window (XCirculateEvent *i)
 {
           return(i->window);
 }
 
-void set_XCirculateEvent_window(i, j)
-XCirculateEvent* i;
-int j;
+void 
+set_XCirculateEvent_window (XCirculateEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XCirculateEvent_event(i)
-XCirculateEvent* i;
+int 
+XCirculateEvent_event (XCirculateEvent *i)
 {
           return(i->event);
 }
 
-void set_XCirculateEvent_event(i, j)
-XCirculateEvent* i;
-int j;
+void 
+set_XCirculateEvent_event (XCirculateEvent *i, int j)
 {
           i->event = j;
 }
 
-long  XCirculateEvent_display(i)
-XCirculateEvent* i;
+long 
+XCirculateEvent_display (XCirculateEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XCirculateEvent_display(i, j)
-XCirculateEvent* i;
-long j;
+void 
+set_XCirculateEvent_display (XCirculateEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XCirculateEvent_send_event(i)
-XCirculateEvent* i;
+int 
+XCirculateEvent_send_event (XCirculateEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XCirculateEvent_send_event(i, j)
-XCirculateEvent* i;
-int j;
+void 
+set_XCirculateEvent_send_event (XCirculateEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XCirculateEvent_serial(i)
-XCirculateEvent* i;
+int 
+XCirculateEvent_serial (XCirculateEvent *i)
 {
           return(i->serial);
 }
 
-void set_XCirculateEvent_serial(i, j)
-XCirculateEvent* i;
-int j;
+void 
+set_XCirculateEvent_serial (XCirculateEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XCirculateEvent_type(i)
-XCirculateEvent* i;
+int 
+XCirculateEvent_type (XCirculateEvent *i)
 {
           return(i->type);
 }
 
-void set_XCirculateEvent_type(i, j)
-XCirculateEvent* i;
-int j;
+void 
+set_XCirculateEvent_type (XCirculateEvent *i, int j)
 {
           i->type = j;
 }
@@ -2857,97 +2671,91 @@ int j;
 
 /********* XCirculateRequestEvent functions *****/
 
-long  make_XCirculateRequestEvent (){
+long 
+make_XCirculateRequestEvent (void){
           return ((long) calloc(1, sizeof(XCirculateRequestEvent)));
 }
 
-int  XCirculateRequestEvent_place(i)
-XCirculateRequestEvent* i;
+int 
+XCirculateRequestEvent_place (XCirculateRequestEvent *i)
 {
           return(i->place);
 }
 
-void set_XCirculateRequestEvent_place(i, j)
-XCirculateRequestEvent* i;
-int j;
+void 
+set_XCirculateRequestEvent_place (XCirculateRequestEvent *i, int j)
 {
           i->place = j;
 }
 
-int  XCirculateRequestEvent_window(i)
-XCirculateRequestEvent* i;
+int 
+XCirculateRequestEvent_window (XCirculateRequestEvent *i)
 {
           return(i->window);
 }
 
-void set_XCirculateRequestEvent_window(i, j)
-XCirculateRequestEvent* i;
-int j;
+void 
+set_XCirculateRequestEvent_window (XCirculateRequestEvent *i, int j)
 {
           i->window = j;
 }
 
-int  XCirculateRequestEvent_parent(i)
-XCirculateRequestEvent* i;
+int 
+XCirculateRequestEvent_parent (XCirculateRequestEvent *i)
 {
           return(i->parent);
 }
 
-void set_XCirculateRequestEvent_parent(i, j)
-XCirculateRequestEvent* i;
-int j;
+void 
+set_XCirculateRequestEvent_parent (XCirculateRequestEvent *i, int j)
 {
           i->parent = j;
 }
 
-long  XCirculateRequestEvent_display(i)
-XCirculateRequestEvent* i;
+long 
+XCirculateRequestEvent_display (XCirculateRequestEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XCirculateRequestEvent_display(i, j)
-XCirculateRequestEvent* i;
-long j;
+void 
+set_XCirculateRequestEvent_display (XCirculateRequestEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XCirculateRequestEvent_send_event(i)
-XCirculateRequestEvent* i;
+int 
+XCirculateRequestEvent_send_event (XCirculateRequestEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XCirculateRequestEvent_send_event(i, j)
-XCirculateRequestEvent* i;
-int j;
+void 
+set_XCirculateRequestEvent_send_event (XCirculateRequestEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XCirculateRequestEvent_serial(i)
-XCirculateRequestEvent* i;
+int 
+XCirculateRequestEvent_serial (XCirculateRequestEvent *i)
 {
           return(i->serial);
 }
 
-void set_XCirculateRequestEvent_serial(i, j)
-XCirculateRequestEvent* i;
-int j;
+void 
+set_XCirculateRequestEvent_serial (XCirculateRequestEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XCirculateRequestEvent_type(i)
-XCirculateRequestEvent* i;
+int 
+XCirculateRequestEvent_type (XCirculateRequestEvent *i)
 {
           return(i->type);
 }
 
-void set_XCirculateRequestEvent_type(i, j)
-XCirculateRequestEvent* i;
-int j;
+void 
+set_XCirculateRequestEvent_type (XCirculateRequestEvent *i, int j)
 {
           i->type = j;
 }
@@ -2955,110 +2763,103 @@ int j;
 
 /********* XPropertyEvent functions *****/
 
-long  make_XPropertyEvent (){
+long 
+make_XPropertyEvent (void){
           return ((long) calloc(1, sizeof(XPropertyEvent)));
 }
 
-int  XPropertyEvent_state(i)
-XPropertyEvent* i;
+int 
+XPropertyEvent_state (XPropertyEvent *i)
 {
           return(i->state);
 }
 
-void set_XPropertyEvent_state(i, j)
-XPropertyEvent* i;
-int j;
+void 
+set_XPropertyEvent_state (XPropertyEvent *i, int j)
 {
           i->state = j;
 }
 
-int  XPropertyEvent_time(i)
-XPropertyEvent* i;
+int 
+XPropertyEvent_time (XPropertyEvent *i)
 {
           return(i->time);
 }
 
-void set_XPropertyEvent_time(i, j)
-XPropertyEvent* i;
-int j;
+void 
+set_XPropertyEvent_time (XPropertyEvent *i, int j)
 {
           i->time = j;
 }
 
-int  XPropertyEvent_atom(i)
-XPropertyEvent* i;
+int 
+XPropertyEvent_atom (XPropertyEvent *i)
 {
           return(i->atom);
 }
 
-void set_XPropertyEvent_atom(i, j)
-XPropertyEvent* i;
-int j;
+void 
+set_XPropertyEvent_atom (XPropertyEvent *i, int j)
 {
           i->atom = j;
 }
 
-int  XPropertyEvent_window(i)
-XPropertyEvent* i;
+int 
+XPropertyEvent_window (XPropertyEvent *i)
 {
           return(i->window);
 }
 
-void set_XPropertyEvent_window(i, j)
-XPropertyEvent* i;
-int j;
+void 
+set_XPropertyEvent_window (XPropertyEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XPropertyEvent_display(i)
-XPropertyEvent* i;
+long 
+XPropertyEvent_display (XPropertyEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XPropertyEvent_display(i, j)
-XPropertyEvent* i;
-long j;
+void 
+set_XPropertyEvent_display (XPropertyEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XPropertyEvent_send_event(i)
-XPropertyEvent* i;
+int 
+XPropertyEvent_send_event (XPropertyEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XPropertyEvent_send_event(i, j)
-XPropertyEvent* i;
-int j;
+void 
+set_XPropertyEvent_send_event (XPropertyEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XPropertyEvent_serial(i)
-XPropertyEvent* i;
+int 
+XPropertyEvent_serial (XPropertyEvent *i)
 {
           return(i->serial);
 }
 
-void set_XPropertyEvent_serial(i, j)
-XPropertyEvent* i;
-int j;
+void 
+set_XPropertyEvent_serial (XPropertyEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XPropertyEvent_type(i)
-XPropertyEvent* i;
+int 
+XPropertyEvent_type (XPropertyEvent *i)
 {
           return(i->type);
 }
 
-void set_XPropertyEvent_type(i, j)
-XPropertyEvent* i;
-int j;
+void 
+set_XPropertyEvent_type (XPropertyEvent *i, int j)
 {
           i->type = j;
 }
@@ -3066,97 +2867,91 @@ int j;
 
 /********* XSelectionClearEvent functions *****/
 
-long  make_XSelectionClearEvent (){
+long 
+make_XSelectionClearEvent (void){
           return ((long) calloc(1, sizeof(XSelectionClearEvent)));
 }
 
-int  XSelectionClearEvent_time(i)
-XSelectionClearEvent* i;
+int 
+XSelectionClearEvent_time (XSelectionClearEvent *i)
 {
           return(i->time);
 }
 
-void set_XSelectionClearEvent_time(i, j)
-XSelectionClearEvent* i;
-int j;
+void 
+set_XSelectionClearEvent_time (XSelectionClearEvent *i, int j)
 {
           i->time = j;
 }
 
-int  XSelectionClearEvent_selection(i)
-XSelectionClearEvent* i;
+int 
+XSelectionClearEvent_selection (XSelectionClearEvent *i)
 {
           return(i->selection);
 }
 
-void set_XSelectionClearEvent_selection(i, j)
-XSelectionClearEvent* i;
-int j;
+void 
+set_XSelectionClearEvent_selection (XSelectionClearEvent *i, int j)
 {
           i->selection = j;
 }
 
-int  XSelectionClearEvent_window(i)
-XSelectionClearEvent* i;
+int 
+XSelectionClearEvent_window (XSelectionClearEvent *i)
 {
           return(i->window);
 }
 
-void set_XSelectionClearEvent_window(i, j)
-XSelectionClearEvent* i;
-int j;
+void 
+set_XSelectionClearEvent_window (XSelectionClearEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XSelectionClearEvent_display(i)
-XSelectionClearEvent* i;
+long 
+XSelectionClearEvent_display (XSelectionClearEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XSelectionClearEvent_display(i, j)
-XSelectionClearEvent* i;
-long j;
+void 
+set_XSelectionClearEvent_display (XSelectionClearEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XSelectionClearEvent_send_event(i)
-XSelectionClearEvent* i;
+int 
+XSelectionClearEvent_send_event (XSelectionClearEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XSelectionClearEvent_send_event(i, j)
-XSelectionClearEvent* i;
-int j;
+void 
+set_XSelectionClearEvent_send_event (XSelectionClearEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XSelectionClearEvent_serial(i)
-XSelectionClearEvent* i;
+int 
+XSelectionClearEvent_serial (XSelectionClearEvent *i)
 {
           return(i->serial);
 }
 
-void set_XSelectionClearEvent_serial(i, j)
-XSelectionClearEvent* i;
-int j;
+void 
+set_XSelectionClearEvent_serial (XSelectionClearEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XSelectionClearEvent_type(i)
-XSelectionClearEvent* i;
+int 
+XSelectionClearEvent_type (XSelectionClearEvent *i)
 {
           return(i->type);
 }
 
-void set_XSelectionClearEvent_type(i, j)
-XSelectionClearEvent* i;
-int j;
+void 
+set_XSelectionClearEvent_type (XSelectionClearEvent *i, int j)
 {
           i->type = j;
 }
@@ -3164,136 +2959,127 @@ int j;
 
 /********* XSelectionRequestEvent functions *****/
 
-long  make_XSelectionRequestEvent (){
+long 
+make_XSelectionRequestEvent (void){
           return ((long) calloc(1, sizeof(XSelectionRequestEvent)));
 }
 
-int  XSelectionRequestEvent_time(i)
-XSelectionRequestEvent* i;
+int 
+XSelectionRequestEvent_time (XSelectionRequestEvent *i)
 {
           return(i->time);
 }
 
-void set_XSelectionRequestEvent_time(i, j)
-XSelectionRequestEvent* i;
-int j;
+void 
+set_XSelectionRequestEvent_time (XSelectionRequestEvent *i, int j)
 {
           i->time = j;
 }
 
-int  XSelectionRequestEvent_property(i)
-XSelectionRequestEvent* i;
+int 
+XSelectionRequestEvent_property (XSelectionRequestEvent *i)
 {
           return(i->property);
 }
 
-void set_XSelectionRequestEvent_property(i, j)
-XSelectionRequestEvent* i;
-int j;
+void 
+set_XSelectionRequestEvent_property (XSelectionRequestEvent *i, int j)
 {
           i->property = j;
 }
 
-int  XSelectionRequestEvent_target(i)
-XSelectionRequestEvent* i;
+int 
+XSelectionRequestEvent_target (XSelectionRequestEvent *i)
 {
           return(i->target);
 }
 
-void set_XSelectionRequestEvent_target(i, j)
-XSelectionRequestEvent* i;
-int j;
+void 
+set_XSelectionRequestEvent_target (XSelectionRequestEvent *i, int j)
 {
           i->target = j;
 }
 
-int  XSelectionRequestEvent_selection(i)
-XSelectionRequestEvent* i;
+int 
+XSelectionRequestEvent_selection (XSelectionRequestEvent *i)
 {
           return(i->selection);
 }
 
-void set_XSelectionRequestEvent_selection(i, j)
-XSelectionRequestEvent* i;
-int j;
+void 
+set_XSelectionRequestEvent_selection (XSelectionRequestEvent *i, int j)
 {
           i->selection = j;
 }
 
-int  XSelectionRequestEvent_requestor(i)
-XSelectionRequestEvent* i;
+int 
+XSelectionRequestEvent_requestor (XSelectionRequestEvent *i)
 {
           return(i->requestor);
 }
 
-void set_XSelectionRequestEvent_requestor(i, j)
-XSelectionRequestEvent* i;
-int j;
+void 
+set_XSelectionRequestEvent_requestor (XSelectionRequestEvent *i, int j)
 {
           i->requestor = j;
 }
 
-int  XSelectionRequestEvent_owner(i)
-XSelectionRequestEvent* i;
+int 
+XSelectionRequestEvent_owner (XSelectionRequestEvent *i)
 {
           return(i->owner);
 }
 
-void set_XSelectionRequestEvent_owner(i, j)
-XSelectionRequestEvent* i;
-int j;
+void 
+set_XSelectionRequestEvent_owner (XSelectionRequestEvent *i, int j)
 {
           i->owner = j;
 }
 
-long  XSelectionRequestEvent_display(i)
-XSelectionRequestEvent* i;
+long 
+XSelectionRequestEvent_display (XSelectionRequestEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XSelectionRequestEvent_display(i, j)
-XSelectionRequestEvent* i;
-long j;
+void 
+set_XSelectionRequestEvent_display (XSelectionRequestEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XSelectionRequestEvent_send_event(i)
-XSelectionRequestEvent* i;
+int 
+XSelectionRequestEvent_send_event (XSelectionRequestEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XSelectionRequestEvent_send_event(i, j)
-XSelectionRequestEvent* i;
-int j;
+void 
+set_XSelectionRequestEvent_send_event (XSelectionRequestEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XSelectionRequestEvent_serial(i)
-XSelectionRequestEvent* i;
+int 
+XSelectionRequestEvent_serial (XSelectionRequestEvent *i)
 {
           return(i->serial);
 }
 
-void set_XSelectionRequestEvent_serial(i, j)
-XSelectionRequestEvent* i;
-int j;
+void 
+set_XSelectionRequestEvent_serial (XSelectionRequestEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XSelectionRequestEvent_type(i)
-XSelectionRequestEvent* i;
+int 
+XSelectionRequestEvent_type (XSelectionRequestEvent *i)
 {
           return(i->type);
 }
 
-void set_XSelectionRequestEvent_type(i, j)
-XSelectionRequestEvent* i;
-int j;
+void 
+set_XSelectionRequestEvent_type (XSelectionRequestEvent *i, int j)
 {
           i->type = j;
 }
@@ -3301,123 +3087,115 @@ int j;
 
 /********* XSelectionEvent functions *****/
 
-long  make_XSelectionEvent (){
+long 
+make_XSelectionEvent (void){
           return ((long) calloc(1, sizeof(XSelectionEvent)));
 }
 
-int  XSelectionEvent_time(i)
-XSelectionEvent* i;
+int 
+XSelectionEvent_time (XSelectionEvent *i)
 {
           return(i->time);
 }
 
-void set_XSelectionEvent_time(i, j)
-XSelectionEvent* i;
-int j;
+void 
+set_XSelectionEvent_time (XSelectionEvent *i, int j)
 {
           i->time = j;
 }
 
-int  XSelectionEvent_property(i)
-XSelectionEvent* i;
+int 
+XSelectionEvent_property (XSelectionEvent *i)
 {
           return(i->property);
 }
 
-void set_XSelectionEvent_property(i, j)
-XSelectionEvent* i;
-int j;
+void 
+set_XSelectionEvent_property (XSelectionEvent *i, int j)
 {
           i->property = j;
 }
 
-int  XSelectionEvent_target(i)
-XSelectionEvent* i;
+int 
+XSelectionEvent_target (XSelectionEvent *i)
 {
           return(i->target);
 }
 
-void set_XSelectionEvent_target(i, j)
-XSelectionEvent* i;
-int j;
+void 
+set_XSelectionEvent_target (XSelectionEvent *i, int j)
 {
           i->target = j;
 }
 
-int  XSelectionEvent_selection(i)
-XSelectionEvent* i;
+int 
+XSelectionEvent_selection (XSelectionEvent *i)
 {
           return(i->selection);
 }
 
-void set_XSelectionEvent_selection(i, j)
-XSelectionEvent* i;
-int j;
+void 
+set_XSelectionEvent_selection (XSelectionEvent *i, int j)
 {
           i->selection = j;
 }
 
-int  XSelectionEvent_requestor(i)
-XSelectionEvent* i;
+int 
+XSelectionEvent_requestor (XSelectionEvent *i)
 {
           return(i->requestor);
 }
 
-void set_XSelectionEvent_requestor(i, j)
-XSelectionEvent* i;
-int j;
+void 
+set_XSelectionEvent_requestor (XSelectionEvent *i, int j)
 {
           i->requestor = j;
 }
 
-long  XSelectionEvent_display(i)
-XSelectionEvent* i;
+long 
+XSelectionEvent_display (XSelectionEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XSelectionEvent_display(i, j)
-XSelectionEvent* i;
-long j;
+void 
+set_XSelectionEvent_display (XSelectionEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XSelectionEvent_send_event(i)
-XSelectionEvent* i;
+int 
+XSelectionEvent_send_event (XSelectionEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XSelectionEvent_send_event(i, j)
-XSelectionEvent* i;
-int j;
+void 
+set_XSelectionEvent_send_event (XSelectionEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XSelectionEvent_serial(i)
-XSelectionEvent* i;
+int 
+XSelectionEvent_serial (XSelectionEvent *i)
 {
           return(i->serial);
 }
 
-void set_XSelectionEvent_serial(i, j)
-XSelectionEvent* i;
-int j;
+void 
+set_XSelectionEvent_serial (XSelectionEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XSelectionEvent_type(i)
-XSelectionEvent* i;
+int 
+XSelectionEvent_type (XSelectionEvent *i)
 {
           return(i->type);
 }
 
-void set_XSelectionEvent_type(i, j)
-XSelectionEvent* i;
-int j;
+void 
+set_XSelectionEvent_type (XSelectionEvent *i, int j)
 {
           i->type = j;
 }
@@ -3425,110 +3203,103 @@ int j;
 
 /********* XColormapEvent functions *****/
 
-long  make_XColormapEvent (){
+long 
+make_XColormapEvent (void){
           return ((long) calloc(1, sizeof(XColormapEvent)));
 }
 
-int  XColormapEvent_state(i)
-XColormapEvent* i;
+int 
+XColormapEvent_state (XColormapEvent *i)
 {
           return(i->state);
 }
 
-void set_XColormapEvent_state(i, j)
-XColormapEvent* i;
-int j;
+void 
+set_XColormapEvent_state (XColormapEvent *i, int j)
 {
           i->state = j;
 }
 
-int  XColormapEvent_new(i)
-XColormapEvent* i;
+int 
+XColormapEvent_new (XColormapEvent *i)
 {
           return(i->new);
 }
 
-void set_XColormapEvent_new(i, j)
-XColormapEvent* i;
-int j;
+void 
+set_XColormapEvent_new (XColormapEvent *i, int j)
 {
           i->new = j;
 }
 
-int  XColormapEvent_colormap(i)
-XColormapEvent* i;
+int 
+XColormapEvent_colormap (XColormapEvent *i)
 {
           return(i->colormap);
 }
 
-void set_XColormapEvent_colormap(i, j)
-XColormapEvent* i;
-int j;
+void 
+set_XColormapEvent_colormap (XColormapEvent *i, int j)
 {
           i->colormap = j;
 }
 
-int  XColormapEvent_window(i)
-XColormapEvent* i;
+int 
+XColormapEvent_window (XColormapEvent *i)
 {
           return(i->window);
 }
 
-void set_XColormapEvent_window(i, j)
-XColormapEvent* i;
-int j;
+void 
+set_XColormapEvent_window (XColormapEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XColormapEvent_display(i)
-XColormapEvent* i;
+long 
+XColormapEvent_display (XColormapEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XColormapEvent_display(i, j)
-XColormapEvent* i;
-long j;
+void 
+set_XColormapEvent_display (XColormapEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XColormapEvent_send_event(i)
-XColormapEvent* i;
+int 
+XColormapEvent_send_event (XColormapEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XColormapEvent_send_event(i, j)
-XColormapEvent* i;
-int j;
+void 
+set_XColormapEvent_send_event (XColormapEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XColormapEvent_serial(i)
-XColormapEvent* i;
+int 
+XColormapEvent_serial (XColormapEvent *i)
 {
           return(i->serial);
 }
 
-void set_XColormapEvent_serial(i, j)
-XColormapEvent* i;
-int j;
+void 
+set_XColormapEvent_serial (XColormapEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XColormapEvent_type(i)
-XColormapEvent* i;
+int 
+XColormapEvent_type (XColormapEvent *i)
 {
           return(i->type);
 }
 
-void set_XColormapEvent_type(i, j)
-XColormapEvent* i;
-int j;
+void 
+set_XColormapEvent_type (XColormapEvent *i, int j)
 {
           i->type = j;
 }
@@ -3536,98 +3307,92 @@ int j;
 
 /********* XClientMessageEvent functions *****/
 
-long  make_XClientMessageEvent (){
+long 
+make_XClientMessageEvent (void){
           return ((long) calloc(1, sizeof(XClientMessageEvent)));
 }
 
-int  XClientMessageEvent_format(i)
-XClientMessageEvent* i;
+int 
+XClientMessageEvent_format (XClientMessageEvent *i)
 {
           return(i->format);
 }
 
-void set_XClientMessageEvent_format(i, j)
-XClientMessageEvent* i;
-int j;
+void 
+set_XClientMessageEvent_format (XClientMessageEvent *i, int j)
 {
           i->format = j;
 }
 
-int  XClientMessageEvent_message_type(i)
-XClientMessageEvent* i;
+int 
+XClientMessageEvent_message_type (XClientMessageEvent *i)
 {
           return(i->message_type);
 }
 
-void set_XClientMessageEvent_message_type(i, j)
-XClientMessageEvent* i;
-int j;
+void 
+set_XClientMessageEvent_message_type (XClientMessageEvent *i, int j)
 {
           i->message_type = j;
 }
 
 
-int  XClientMessageEvent_window(i)
-XClientMessageEvent* i;
+int 
+XClientMessageEvent_window (XClientMessageEvent *i)
 {
           return(i->window);
 }
 
-void set_XClientMessageEvent_window(i, j)
-XClientMessageEvent* i;
-int j;
+void 
+set_XClientMessageEvent_window (XClientMessageEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XClientMessageEvent_display(i)
-XClientMessageEvent* i;
+long 
+XClientMessageEvent_display (XClientMessageEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XClientMessageEvent_display(i, j)
-XClientMessageEvent* i;
-long j;
+void 
+set_XClientMessageEvent_display (XClientMessageEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XClientMessageEvent_send_event(i)
-XClientMessageEvent* i;
+int 
+XClientMessageEvent_send_event (XClientMessageEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XClientMessageEvent_send_event(i, j)
-XClientMessageEvent* i;
-int j;
+void 
+set_XClientMessageEvent_send_event (XClientMessageEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XClientMessageEvent_serial(i)
-XClientMessageEvent* i;
+int 
+XClientMessageEvent_serial (XClientMessageEvent *i)
 {
           return(i->serial);
 }
 
-void set_XClientMessageEvent_serial(i, j)
-XClientMessageEvent* i;
-int j;
+void 
+set_XClientMessageEvent_serial (XClientMessageEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XClientMessageEvent_type(i)
-XClientMessageEvent* i;
+int 
+XClientMessageEvent_type (XClientMessageEvent *i)
 {
           return(i->type);
 }
 
-void set_XClientMessageEvent_type(i, j)
-XClientMessageEvent* i;
-int j;
+void 
+set_XClientMessageEvent_type (XClientMessageEvent *i, int j)
 {
           i->type = j;
 }
@@ -3635,110 +3400,103 @@ int j;
 
 /********* XMappingEvent functions *****/
 
-long  make_XMappingEvent (){
+long 
+make_XMappingEvent (void){
           return ((long) calloc(1, sizeof(XMappingEvent)));
 }
 
-int  XMappingEvent_count(i)
-XMappingEvent* i;
+int 
+XMappingEvent_count (XMappingEvent *i)
 {
           return(i->count);
 }
 
-void set_XMappingEvent_count(i, j)
-XMappingEvent* i;
-int j;
+void 
+set_XMappingEvent_count (XMappingEvent *i, int j)
 {
           i->count = j;
 }
 
-int XMappingEvent_first_keycode(i)
-XMappingEvent* i;
+int 
+XMappingEvent_first_keycode (XMappingEvent *i)
 {
           return(i->first_keycode);
 }
 
-void set_XMappingEvent_first_keycode(i, j)
-XMappingEvent* i;
-int j;
+void 
+set_XMappingEvent_first_keycode (XMappingEvent *i, int j)
 {
           i->first_keycode = j;
 }
 
-int  XMappingEvent_request(i)
-XMappingEvent* i;
+int 
+XMappingEvent_request (XMappingEvent *i)
 {
           return(i->request);
 }
 
-void set_XMappingEvent_request(i, j)
-XMappingEvent* i;
-int j;
+void 
+set_XMappingEvent_request (XMappingEvent *i, int j)
 {
           i->request = j;
 }
 
-int  XMappingEvent_window(i)
-XMappingEvent* i;
+int 
+XMappingEvent_window (XMappingEvent *i)
 {
           return(i->window);
 }
 
-void set_XMappingEvent_window(i, j)
-XMappingEvent* i;
-int j;
+void 
+set_XMappingEvent_window (XMappingEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XMappingEvent_display(i)
-XMappingEvent* i;
+long 
+XMappingEvent_display (XMappingEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XMappingEvent_display(i, j)
-XMappingEvent* i;
-long j;
+void 
+set_XMappingEvent_display (XMappingEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XMappingEvent_send_event(i)
-XMappingEvent* i;
+int 
+XMappingEvent_send_event (XMappingEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XMappingEvent_send_event(i, j)
-XMappingEvent* i;
-int j;
+void 
+set_XMappingEvent_send_event (XMappingEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XMappingEvent_serial(i)
-XMappingEvent* i;
+int 
+XMappingEvent_serial (XMappingEvent *i)
 {
           return(i->serial);
 }
 
-void set_XMappingEvent_serial(i, j)
-XMappingEvent* i;
-int j;
+void 
+set_XMappingEvent_serial (XMappingEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XMappingEvent_type(i)
-XMappingEvent* i;
+int 
+XMappingEvent_type (XMappingEvent *i)
 {
           return(i->type);
 }
 
-void set_XMappingEvent_type(i, j)
-XMappingEvent* i;
-int j;
+void 
+set_XMappingEvent_type (XMappingEvent *i, int j)
 {
           i->type = j;
 }
@@ -3746,97 +3504,91 @@ int j;
 
 /********* XErrorEvent functions *****/
 
-long  make_XErrorEvent (){
+long 
+make_XErrorEvent (void){
           return ((long) calloc(1, sizeof(XErrorEvent)));
 }
 
-char XErrorEvent_minor_code(i)
-XErrorEvent* i;
+char 
+XErrorEvent_minor_code (XErrorEvent *i)
 {
           return(i->minor_code);
 }
 
-void set_XErrorEvent_minor_code(i, j)
-XErrorEvent* i;
-char j;
+void 
+set_XErrorEvent_minor_code (XErrorEvent *i, int j)
 {
           i->minor_code = j;
 }
 
-char XErrorEvent_request_code(i)
-XErrorEvent* i;
+char 
+XErrorEvent_request_code (XErrorEvent *i)
 {
           return(i->request_code);
 }
 
-void set_XErrorEvent_request_code(i, j)
-XErrorEvent* i;
-char j;
+void 
+set_XErrorEvent_request_code (XErrorEvent *i, int j)
 {
           i->request_code = j;
 }
 
-char XErrorEvent_error_code(i)
-XErrorEvent* i;
+char 
+XErrorEvent_error_code (XErrorEvent *i)
 {
           return(i->error_code);
 }
 
-void set_XErrorEvent_error_code(i, j)
-XErrorEvent* i;
-char j;
+void 
+set_XErrorEvent_error_code (XErrorEvent *i, int j)
 {
           i->error_code = j;
 }
 
-int  XErrorEvent_serial(i)
-XErrorEvent* i;
+int 
+XErrorEvent_serial (XErrorEvent *i)
 {
           return(i->serial);
 }
 
-void set_XErrorEvent_serial(i, j)
-XErrorEvent* i;
-int j;
+void 
+set_XErrorEvent_serial (XErrorEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XErrorEvent_resourceid(i)
-XErrorEvent* i;
+int 
+XErrorEvent_resourceid (XErrorEvent *i)
 {
           return(i->resourceid);
 }
 
-void set_XErrorEvent_resourceid(i, j)
-XErrorEvent* i;
-int j;
+void 
+set_XErrorEvent_resourceid (XErrorEvent *i, int j)
 {
           i->resourceid = j;
 }
 
-long  XErrorEvent_display(i)
-XErrorEvent* i;
+long 
+XErrorEvent_display (XErrorEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XErrorEvent_display(i, j)
-XErrorEvent* i;
-long j;
+void 
+set_XErrorEvent_display (XErrorEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XErrorEvent_type(i)
-XErrorEvent* i;
+int 
+XErrorEvent_type (XErrorEvent *i)
 {
           return(i->type);
 }
 
-void set_XErrorEvent_type(i, j)
-XErrorEvent* i;
-int j;
+void 
+set_XErrorEvent_type (XErrorEvent *i, int j)
 {
           i->type = j;
 }
@@ -3844,71 +3596,67 @@ int j;
 
 /********* XAnyEvent functions *****/
 
-long  make_XAnyEvent (){
+long 
+make_XAnyEvent (void){
           return ((long) calloc(1, sizeof(XAnyEvent)));
 }
 
-int  XAnyEvent_window(i)
-XAnyEvent* i;
+int 
+XAnyEvent_window (XAnyEvent *i)
 {
           return(i->window);
 }
 
-void set_XAnyEvent_window(i, j)
-XAnyEvent* i;
-int j;
+void 
+set_XAnyEvent_window (XAnyEvent *i, int j)
 {
           i->window = j;
 }
 
-long  XAnyEvent_display(i)
-XAnyEvent* i;
+long 
+XAnyEvent_display (XAnyEvent *i)
 {
           return((long) i->display);
 }
 
-void set_XAnyEvent_display(i, j)
-XAnyEvent* i;
-long j;
+void 
+set_XAnyEvent_display (XAnyEvent *i, long j)
 {
           i->display = (Display *) j;
 }
 
-int  XAnyEvent_send_event(i)
-XAnyEvent* i;
+int 
+XAnyEvent_send_event (XAnyEvent *i)
 {
           return(i->send_event);
 }
 
-void set_XAnyEvent_send_event(i, j)
-XAnyEvent* i;
-int j;
+void 
+set_XAnyEvent_send_event (XAnyEvent *i, int j)
 {
           i->send_event = j;
 }
 
-int  XAnyEvent_serial(i)
-XAnyEvent* i;
+int 
+XAnyEvent_serial (XAnyEvent *i)
 {
           return(i->serial);
 }
 
-void set_XAnyEvent_serial(i, j)
-XAnyEvent* i;
-int j;
+void 
+set_XAnyEvent_serial (XAnyEvent *i, int j)
 {
           i->serial = j;
 }
 
-int  XAnyEvent_type(i)
-XAnyEvent* i;
+int 
+XAnyEvent_type (XAnyEvent *i)
 {
           return(i->type);
 }
 
-void set_XAnyEvent_type(i, j)
-XAnyEvent* i;
-int j;
+void 
+set_XAnyEvent_type (XAnyEvent *i, int j)
 {
           i->type = j;
 }
@@ -3916,6 +3664,7 @@ int j;
 
 /********* XEvent functions *****/
 
-long  make_XEvent (){
+long 
+make_XEvent (void){
           return ((long) calloc(1, sizeof(XEvent)));
 }
--- gcl27-2.7.1.orig/xgcl-2/XStruct-2.c
+++ gcl27-2.7.1/xgcl-2/XStruct-2.c
@@ -24,38 +24,37 @@
 
 
 /********* _XQEvent functions *****/
+
 #define NEED_EVENTS
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xlibint.h>
 
 
-long  make__XQEvent (){
+long make__XQEvent (void)
+{
           return ((long) calloc(1, sizeof(_XQEvent)));
 }
 
-XEvent _XQEvent_event(i)
-_XQEvent* i;
+XEvent _XQEvent_event (_XQEvent* i)
 {
           return(i->event);
 }
 
-void set__XQEvent_event(i, j)
-_XQEvent* i;
-XEvent j;
+void 
+set__XQEvent_event (_XQEvent *i, XEvent j)
 {
           i->event = j;
 }
 
-long _XQEvent_next(i)
-_XQEvent* i;
+long 
+_XQEvent_next (_XQEvent *i)
 {
           return((long) i->next);
 }
 
-void set__XQEvent_next(i, j)
-_XQEvent* i;
-long j;
+void 
+set__XQEvent_next (_XQEvent *i, long j)
 {
           i->next = (struct _XSQEvent *) j;
 }
@@ -63,84 +62,79 @@ long j;
 
 /********* XCharStruct functions *****/
 
-long  make_XCharStruct (){
+long 
+make_XCharStruct (void){
           return ((long) calloc(1, sizeof(XCharStruct)));
 }
 
-int  XCharStruct_attributes(i)
-XCharStruct* i;
+int 
+XCharStruct_attributes (XCharStruct *i)
 {
           return(i->attributes);
 }
 
-void set_XCharStruct_attributes(i, j)
-XCharStruct* i;
-int j;
+void 
+set_XCharStruct_attributes (XCharStruct *i, int j)
 {
           i->attributes = j;
 }
 
-int  XCharStruct_descent(i)
-XCharStruct* i;
+int 
+XCharStruct_descent (XCharStruct *i)
 {
           return(i->descent);
 }
 
-void set_XCharStruct_descent(i, j)
-XCharStruct* i;
-int j;
+void 
+set_XCharStruct_descent (XCharStruct *i, int j)
 {
           i->descent = j;
 }
 
-int  XCharStruct_ascent(i)
-XCharStruct* i;
+int 
+XCharStruct_ascent (XCharStruct *i)
 {
           return(i->ascent);
 }
 
-void set_XCharStruct_ascent(i, j)
-XCharStruct* i;
-int j;
+void 
+set_XCharStruct_ascent (XCharStruct *i, int j)
 {
           i->ascent = j;
 }
 
-int  XCharStruct_width(i)
-XCharStruct* i;
+int 
+XCharStruct_width (XCharStruct *i)
 {
           return(i->width);
 }
 
-void set_XCharStruct_width(i, j)
-XCharStruct* i;
-int j;
+void 
+set_XCharStruct_width (XCharStruct *i, int j)
 {
           i->width = j;
 }
 
-int  XCharStruct_rbearing(i)
-XCharStruct* i;
+int 
+XCharStruct_rbearing (XCharStruct *i)
 {
           return(i->rbearing);
 }
 
-void set_XCharStruct_rbearing(i, j)
-XCharStruct* i;
-int j;
+void 
+set_XCharStruct_rbearing (XCharStruct *i, int j)
 {
           i->rbearing = j;
 }
 
-int  XCharStruct_lbearing(i)
-XCharStruct* i;
+int 
+XCharStruct_lbearing (XCharStruct *i)
 {
           return(i->lbearing);
 }
 
-void set_XCharStruct_lbearing(i, j)
-XCharStruct* i;
-int j;
+void 
+set_XCharStruct_lbearing (XCharStruct *i, int j)
 {
           i->lbearing = j;
 }
@@ -148,32 +142,31 @@ int j;
 
 /********* XFontProp functions *****/
 
-long  make_XFontProp (){
+long 
+make_XFontProp (void){
           return ((long) calloc(1, sizeof(XFontProp)));
 }
 
-int  XFontProp_card32(i)
-XFontProp* i;
+int 
+XFontProp_card32 (XFontProp *i)
 {
           return(i->card32);
 }
 
-void set_XFontProp_card32(i, j)
-XFontProp* i;
-int j;
+void 
+set_XFontProp_card32 (XFontProp *i, int j)
 {
           i->card32 = j;
 }
 
-int  XFontProp_name(i)
-XFontProp* i;
+int 
+XFontProp_name (XFontProp *i)
 {
           return(i->name);
 }
 
-void set_XFontProp_name(i, j)
-XFontProp* i;
-int j;
+void 
+set_XFontProp_name (XFontProp *i, int j)
 {
           i->name = j;
 }
@@ -181,211 +174,196 @@ int j;
 
 /********* XFontStruct functions *****/
 
-long  make_XFontStruct (){
+long 
+make_XFontStruct (void){
           return ((long) calloc(1, sizeof(XFontStruct)));
 }
 
-int  XFontStruct_descent(i)
-XFontStruct* i;
+int 
+XFontStruct_descent (XFontStruct *i)
 {
           return(i->descent);
 }
 
-void set_XFontStruct_descent(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_descent (XFontStruct *i, int j)
 {
           i->descent = j;
 }
 
-int  XFontStruct_ascent(i)
-XFontStruct* i;
+int 
+XFontStruct_ascent (XFontStruct *i)
 {
           return(i->ascent);
 }
 
-void set_XFontStruct_ascent(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_ascent (XFontStruct *i, int j)
 {
           i->ascent = j;
 }
 
-long  XFontStruct_per_char(i)
-XFontStruct* i;
+long 
+XFontStruct_per_char (XFontStruct *i)
 {
           return((long) i->per_char);
 }
 
-void set_XFontStruct_per_char(i, j)
-XFontStruct* i;
-long j;
+void 
+set_XFontStruct_per_char (XFontStruct *i, long j)
 {
           i->per_char = (XCharStruct *) j;
 }
 
-long XFontStruct_max_bounds(i)
-XFontStruct* i;
+long 
+XFontStruct_max_bounds (XFontStruct *i)
 {
           return((long) &i->max_bounds);
 }
-long XFontStruct_min_bounds(i)
-XFontStruct* i;
+long 
+XFontStruct_min_bounds (XFontStruct *i)
 {
           return((long) &i->min_bounds);
 }
-void set_XFontStruct_max_bounds(i, j)
-XFontStruct* i;
-XCharStruct j;
+void 
+set_XFontStruct_max_bounds (XFontStruct *i, XCharStruct j)
 {
           i->max_bounds = j;
 }
-void set_XFontStruct_min_bounds(i, j)
-XFontStruct* i;
-XCharStruct j;
+void 
+set_XFontStruct_min_bounds (XFontStruct *i, XCharStruct j)
 {
           i->min_bounds = j;
 }
 
-long  XFontStruct_properties(i)
-XFontStruct* i;
+long 
+XFontStruct_properties (XFontStruct *i)
 {
           return((long) i->properties);
 }
 
-void set_XFontStruct_properties(i, j)
-XFontStruct* i;
-long j;
+void 
+set_XFontStruct_properties (XFontStruct *i, long j)
 {
           i->properties = (XFontProp *) j;
 }
 
-int  XFontStruct_n_properties(i)
-XFontStruct* i;
+int 
+XFontStruct_n_properties (XFontStruct *i)
 {
           return(i->n_properties);
 }
 
-void set_XFontStruct_n_properties(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_n_properties (XFontStruct *i, int j)
 {
           i->n_properties = j;
 }
 
-int  XFontStruct_default_char(i)
-XFontStruct* i;
+int 
+XFontStruct_default_char (XFontStruct *i)
 {
           return(i->default_char);
 }
 
-void set_XFontStruct_default_char(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_default_char (XFontStruct *i, int j)
 {
           i->default_char = j;
 }
 
-int  XFontStruct_all_chars_exist(i)
-XFontStruct* i;
+int 
+XFontStruct_all_chars_exist (XFontStruct *i)
 {
           return(i->all_chars_exist);
 }
 
-void set_XFontStruct_all_chars_exist(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_all_chars_exist (XFontStruct *i, int j)
 {
           i->all_chars_exist = j;
 }
 
-int  XFontStruct_max_byte1(i)
-XFontStruct* i;
+int 
+XFontStruct_max_byte1 (XFontStruct *i)
 {
           return(i->max_byte1);
 }
 
-void set_XFontStruct_max_byte1(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_max_byte1 (XFontStruct *i, int j)
 {
           i->max_byte1 = j;
 }
 
-int  XFontStruct_min_byte1(i)
-XFontStruct* i;
+int 
+XFontStruct_min_byte1 (XFontStruct *i)
 {
           return(i->min_byte1);
 }
 
-void set_XFontStruct_min_byte1(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_min_byte1 (XFontStruct *i, int j)
 {
           i->min_byte1 = j;
 }
 
-int  XFontStruct_max_char_or_byte2(i)
-XFontStruct* i;
+int 
+XFontStruct_max_char_or_byte2 (XFontStruct *i)
 {
           return(i->max_char_or_byte2);
 }
 
-void set_XFontStruct_max_char_or_byte2(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_max_char_or_byte2 (XFontStruct *i, int j)
 {
           i->max_char_or_byte2 = j;
 }
 
-int  XFontStruct_min_char_or_byte2(i)
-XFontStruct* i;
+int 
+XFontStruct_min_char_or_byte2 (XFontStruct *i)
 {
           return(i->min_char_or_byte2);
 }
 
-void set_XFontStruct_min_char_or_byte2(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_min_char_or_byte2 (XFontStruct *i, int j)
 {
           i->min_char_or_byte2 = j;
 }
 
-int  XFontStruct_direction(i)
-XFontStruct* i;
+int 
+XFontStruct_direction (XFontStruct *i)
 {
           return(i->direction);
 }
 
-void set_XFontStruct_direction(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_direction (XFontStruct *i, int j)
 {
           i->direction = j;
 }
 
-int  XFontStruct_fid(i)
-XFontStruct* i;
+int 
+XFontStruct_fid (XFontStruct *i)
 {
           return(i->fid);
 }
 
-void set_XFontStruct_fid(i, j)
-XFontStruct* i;
-int j;
+void 
+set_XFontStruct_fid (XFontStruct *i, int j)
 {
           i->fid = j;
 }
 
-long  XFontStruct_ext_data(i)
-XFontStruct* i;
+long 
+XFontStruct_ext_data (XFontStruct *i)
 {
           return((long) i->ext_data);
 }
 
-void set_XFontStruct_ext_data(i, j)
-XFontStruct* i;
-long j;
+void 
+set_XFontStruct_ext_data (XFontStruct *i, long j)
 {
           i->ext_data = (XExtData *) j;
 }
@@ -393,58 +371,55 @@ long j;
 
 /********* XTextItem functions *****/
 
-long  make_XTextItem (){
+long 
+make_XTextItem (void){
           return ((long) calloc(1, sizeof(XTextItem)));
 }
 
-int  XTextItem_font(i)
-XTextItem* i;
+int 
+XTextItem_font (XTextItem *i)
 {
           return(i->font);
 }
 
-void set_XTextItem_font(i, j)
-XTextItem* i;
-int j;
+void 
+set_XTextItem_font (XTextItem *i, int j)
 {
           i->font = j;
 }
 
-int  XTextItem_delta(i)
-XTextItem* i;
+int 
+XTextItem_delta (XTextItem *i)
 {
           return(i->delta);
 }
 
-void set_XTextItem_delta(i, j)
-XTextItem* i;
-int j;
+void 
+set_XTextItem_delta (XTextItem *i, int j)
 {
           i->delta = j;
 }
 
-int  XTextItem_nchars(i)
-XTextItem* i;
+int 
+XTextItem_nchars (XTextItem *i)
 {
           return(i->nchars);
 }
 
-void set_XTextItem_nchars(i, j)
-XTextItem* i;
-int j;
+void 
+set_XTextItem_nchars (XTextItem *i, int j)
 {
           i->nchars = j;
 }
 
-long  XTextItem_chars(i)
-XTextItem* i;
+long 
+XTextItem_chars (XTextItem *i)
 {
           return((long) i->chars);
 }
 
-void set_XTextItem_chars(i, j)
-XTextItem* i;
-long j;
+void 
+set_XTextItem_chars (XTextItem *i, long j)
 {
           i->chars = (char *) j;
 }
@@ -452,32 +427,31 @@ long j;
 
 /********* XChar2b functions *****/
 
-long  make_XChar2b (){
+long 
+make_XChar2b (void){
           return ((long) calloc(1, sizeof(XChar2b)));
 }
 
-char XChar2b_byte2(i)
-XChar2b* i;
+char 
+XChar2b_byte2 (XChar2b *i)
 {
           return(i->byte2);
 }
 
-void set_XChar2b_byte2(i, j)
-XChar2b* i;
-char j;
+void 
+set_XChar2b_byte2 (XChar2b *i, int j)
 {
           i->byte2 = j;
 }
 
-char XChar2b_byte1(i)
-XChar2b* i;
+char 
+XChar2b_byte1 (XChar2b *i)
 {
           return(i->byte1);
 }
 
-void set_XChar2b_byte1(i, j)
-XChar2b* i;
-char j;
+void 
+set_XChar2b_byte1 (XChar2b *i, int j)
 {
           i->byte1 = j;
 }
@@ -485,58 +459,55 @@ char j;
 
 /********* XTextItem16 functions *****/
 
-long  make_XTextItem16 (){
+long 
+make_XTextItem16 (void){
           return ((long) calloc(1, sizeof(XTextItem16)));
 }
 
-int  XTextItem16_font(i)
-XTextItem16* i;
+int 
+XTextItem16_font (XTextItem16 *i)
 {
           return(i->font);
 }
 
-void set_XTextItem16_font(i, j)
-XTextItem16* i;
-int j;
+void 
+set_XTextItem16_font (XTextItem16 *i, int j)
 {
           i->font = j;
 }
 
-int  XTextItem16_delta(i)
-XTextItem16* i;
+int 
+XTextItem16_delta (XTextItem16 *i)
 {
           return(i->delta);
 }
 
-void set_XTextItem16_delta(i, j)
-XTextItem16* i;
-int j;
+void 
+set_XTextItem16_delta (XTextItem16 *i, int j)
 {
           i->delta = j;
 }
 
-int  XTextItem16_nchars(i)
-XTextItem16* i;
+int 
+XTextItem16_nchars (XTextItem16 *i)
 {
           return(i->nchars);
 }
 
-void set_XTextItem16_nchars(i, j)
-XTextItem16* i;
-int j;
+void 
+set_XTextItem16_nchars (XTextItem16 *i, int j)
 {
           i->nchars = j;
 }
 
-long  XTextItem16_chars(i)
-XTextItem16* i;
+long 
+XTextItem16_chars (XTextItem16 *i)
 {
           return((long) i->chars);
 }
 
-void set_XTextItem16_chars(i, j)
-XTextItem16* i;
-long j;
+void 
+set_XTextItem16_chars (XTextItem16 *i, long j)
 {
           i->chars = (XChar2b *) j;
 }
@@ -544,71 +515,67 @@ long j;
 
 /********* XEDataObject functions *****/
 
-long  make_XEDataObject (){
+long 
+make_XEDataObject (void){
           return ((long) calloc(1, sizeof(XEDataObject)));
 }
 
-long  XEDataObject_font(i)
-XEDataObject* i;
+long 
+XEDataObject_font (XEDataObject *i)
 {
           return((long) i->font);
 }
 
-void set_XEDataObject_font(i, j)
-XEDataObject* i;
-long j;
+void 
+set_XEDataObject_font (XEDataObject *i, long j)
 {
           i->font = (XFontStruct *) j;
 }
 
-long  XEDataObject_pixmap_format(i)
-XEDataObject* i;
+long 
+XEDataObject_pixmap_format (XEDataObject *i)
 {
           return((long) i->pixmap_format);
 }
 
-void set_XEDataObject_pixmap_format(i, j)
-XEDataObject* i;
-long j;
+void 
+set_XEDataObject_pixmap_format (XEDataObject *i, long j)
 {
           i->pixmap_format = (ScreenFormat *) j;
 }
 
-long  XEDataObject_screen(i)
-XEDataObject* i;
+long 
+XEDataObject_screen (XEDataObject *i)
 {
           return((long) i->screen);
 }
 
-void set_XEDataObject_screen(i, j)
-XEDataObject* i;
-long j;
+void 
+set_XEDataObject_screen (XEDataObject *i, long j)
 {
           i->screen = (Screen *) j;
 }
 
-long  XEDataObject_visual(i)
-XEDataObject* i;
+long 
+XEDataObject_visual (XEDataObject *i)
 {
           return((long) i->visual);
 }
 
-void set_XEDataObject_visual(i, j)
-XEDataObject* i;
-long j;
+void 
+set_XEDataObject_visual (XEDataObject *i, long j)
 {
           i->visual = (Visual *) j;
 }
 
-GC   XEDataObject_gc(i)
-XEDataObject* i;
+GC 
+XEDataObject_gc (XEDataObject *i)
 {
           return(i->gc);
 }
 
-void set_XEDataObject_gc(i, j)
-XEDataObject* i;
-GC j;
+void 
+set_XEDataObject_gc (XEDataObject *i, GC j)
 {
           i->gc = j;
 }
@@ -616,242 +583,189 @@ GC j;
 
 /********* XSizeHints functions *****/
 
-long  make_XSizeHints (){
+long 
+make_XSizeHints (void){
           return ((long) calloc(1, sizeof(XSizeHints)));
 }
 
-int  XSizeHints_win_gravity(i)
-XSizeHints *i;
+int  XSizeHints_win_gravity(XSizeHints *i)
 {
           return(i->win_gravity);
 }
 
-void set_XSizeHints_win_gravity(i, j)
-XSizeHints *i;
-int j;
+void set_XSizeHints_win_gravity(XSizeHints *i,int j)
 {
           i->win_gravity = j;
 }
 
-int  XSizeHints_base_height(i)
-XSizeHints* i;
+int  XSizeHints_base_height(XSizeHints* i)
 {
           return(i->base_height);
 }
 
-void set_XSizeHints_base_height(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_base_height(XSizeHints* i,int j)
 {
           i->base_height = j;
 }
 
-int  XSizeHints_base_width(i)
-XSizeHints* i;
+int  XSizeHints_base_width(XSizeHints* i)
 {
           return(i->base_width);
 }
 
-void set_XSizeHints_base_width(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_base_width(XSizeHints* i,int j)
 {
           i->base_width = j;
 }
 
-int  XSizeHints_height_inc(i)
-XSizeHints* i;
+int  XSizeHints_height_inc(XSizeHints* i)
 {
           return(i->height_inc);
 }
 
-void set_XSizeHints_height_inc(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_height_inc(XSizeHints* i,int j)
 {
           i->height_inc = j;
 }
 
-int  XSizeHints_width_inc(i)
-XSizeHints* i;
+int  XSizeHints_width_inc(XSizeHints* i)
 {
           return(i->width_inc);
 }
 
-void set_XSizeHints_width_inc(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_width_inc(XSizeHints* i,int j)
 {
           i->width_inc = j;
 }
 
-int  XSizeHints_max_height(i)
-XSizeHints* i;
+int  XSizeHints_max_height(XSizeHints* i)
 {
           return(i->max_height);
 }
 
-void set_XSizeHints_max_height(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_max_height(XSizeHints* i,int j)
 {
           i->max_height = j;
 }
 
-int  XSizeHints_max_width(i)
-XSizeHints* i;
+int  XSizeHints_max_width(XSizeHints* i)
 {
           return(i->max_width);
 }
 
-void set_XSizeHints_max_width(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_max_width(XSizeHints* i,int j)
 {
           i->max_width = j;
 }
 
-int  XSizeHints_min_height(i)
-XSizeHints* i;
+int  XSizeHints_min_height(XSizeHints* i)
 {
           return(i->min_height);
 }
 
-void set_XSizeHints_min_height(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_min_height(XSizeHints* i,int j)
 {
           i->min_height = j;
 }
 
-int  XSizeHints_min_width(i)
-XSizeHints* i;
+int  XSizeHints_min_width(XSizeHints* i)
 {
           return(i->min_width);
 }
 
-void set_XSizeHints_min_width(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_min_width(XSizeHints* i,int j)
 {
           i->min_width = j;
 }
 
-int  XSizeHints_height(i)
-XSizeHints* i;
+int  XSizeHints_height(XSizeHints* i)
 {
           return(i->height);
 }
 
-void set_XSizeHints_height(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_height(XSizeHints* i,int j)
 {
           i->height = j;
 }
 
-int  XSizeHints_width(i)
-XSizeHints* i;
+int  XSizeHints_width(XSizeHints* i)
 {
           return(i->width);
 }
 
-void set_XSizeHints_width(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_width(XSizeHints* i,int j)
 {
           i->width = j;
 }
 
-int  XSizeHints_y(i)
-XSizeHints* i;
+int  XSizeHints_y(XSizeHints* i)
 {
           return(i->y);
 }
 
-void set_XSizeHints_y(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_y(XSizeHints* i,int j)
 {
           i->y = j;
 }
 
-int  XSizeHints_x(i)
-XSizeHints* i;
+int  XSizeHints_x(XSizeHints* i)
 {
           return(i->x);
 }
 
-void set_XSizeHints_x(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_x(XSizeHints* i,int j)
 {
           i->x = j;
 }
 
-int  XSizeHints_flags(i)
-XSizeHints* i;
+int  XSizeHints_flags(XSizeHints* i)
 {
           return(i->flags);
 }
 
-void set_XSizeHints_flags(i, j)
-XSizeHints* i;
-int j;
+void set_XSizeHints_flags(XSizeHints* i,int j)
 {
           i->flags = j;
 }
 
 
-int  XSizeHints_max_aspect_x(i)
-XSizeHints* i;
+int  XSizeHints_max_aspect_x(XSizeHints* i)
 {
           return(i->max_aspect.x);
 }
 
-void  set_XSizeHints_max_aspect_x(i, j)
-XSizeHints* i;
-int	j;
+void  set_XSizeHints_max_aspect_x(XSizeHints* i,int j)
 {
           i->max_aspect.x = j;
 }
 
-int  XSizeHints_max_aspect_y(i)
-XSizeHints* i;
+int  XSizeHints_max_aspect_y(XSizeHints* i)
 {
           return(i->max_aspect.y);
 }
 
-void  set_XSizeHints_max_aspect_y(i, j)
-XSizeHints* i;
-int	j;
+void  set_XSizeHints_max_aspect_y(XSizeHints* i,int j)
 {
           i->max_aspect.y = j;
 }
 
-int  XSizeHints_min_aspect_x(i)
-XSizeHints* i;
+int  XSizeHints_min_aspect_x(XSizeHints* i)
 {
           return(i->min_aspect.x);
 }
 
-void  set_XSizeHints_min_aspect_x(i, j)
-XSizeHints* i;
-int	j;
+void  set_XSizeHints_min_aspect_x(XSizeHints* i,int j)
 {
           i->min_aspect.x = j;
 }
 
 
-int  XSizeHints_min_aspect_y(i)
-XSizeHints* i;
+int  XSizeHints_min_aspect_y(XSizeHints* i)
 {
           return(i->min_aspect.y);
 }
 
-void  set_XSizeHints_min_aspect_y(i, j)
-XSizeHints* i;
-int	j;
+void  set_XSizeHints_min_aspect_y(XSizeHints* i,int j)
 {
           i->min_aspect.y = j;
 }
@@ -859,123 +773,115 @@ int	j;
 
 /********* XWMHints functions *****/
 
-long  make_XWMHints (){
+long 
+make_XWMHints (void){
           return ((long) calloc(1, sizeof(XWMHints)));
 }
 
-int  XWMHints_window_group(i)
-XWMHints* i;
+int 
+XWMHints_window_group (XWMHints *i)
 {
           return(i->window_group);
 }
 
-void set_XWMHints_window_group(i, j)
-XWMHints* i;
-int j;
+void 
+set_XWMHints_window_group (XWMHints *i, int j)
 {
           i->window_group = j;
 }
 
-int  XWMHints_icon_mask(i)
-XWMHints* i;
+int 
+XWMHints_icon_mask (XWMHints *i)
 {
           return(i->icon_mask);
 }
 
-void set_XWMHints_icon_mask(i, j)
-XWMHints* i;
-int j;
+void 
+set_XWMHints_icon_mask (XWMHints *i, int j)
 {
           i->icon_mask = j;
 }
 
-int  XWMHints_icon_y(i)
-XWMHints* i;
+int 
+XWMHints_icon_y (XWMHints *i)
 {
           return(i->icon_y);
 }
 
-void set_XWMHints_icon_y(i, j)
-XWMHints* i;
-int j;
+void 
+set_XWMHints_icon_y (XWMHints *i, int j)
 {
           i->icon_y = j;
 }
 
-int  XWMHints_icon_x(i)
-XWMHints* i;
+int 
+XWMHints_icon_x (XWMHints *i)
 {
           return(i->icon_x);
 }
 
-void set_XWMHints_icon_x(i, j)
-XWMHints* i;
-int j;
+void 
+set_XWMHints_icon_x (XWMHints *i, int j)
 {
           i->icon_x = j;
 }
 
-int  XWMHints_icon_window(i)
-XWMHints* i;
+int 
+XWMHints_icon_window (XWMHints *i)
 {
           return(i->icon_window);
 }
 
-void set_XWMHints_icon_window(i, j)
-XWMHints* i;
-int j;
+void 
+set_XWMHints_icon_window (XWMHints *i, int j)
 {
           i->icon_window = j;
 }
 
-int  XWMHints_icon_pixmap(i)
-XWMHints* i;
+int 
+XWMHints_icon_pixmap (XWMHints *i)
 {
           return(i->icon_pixmap);
 }
 
-void set_XWMHints_icon_pixmap(i, j)
-XWMHints* i;
-int j;
+void 
+set_XWMHints_icon_pixmap (XWMHints *i, int j)
 {
           i->icon_pixmap = j;
 }
 
-int  XWMHints_initial_state(i)
-XWMHints* i;
+int 
+XWMHints_initial_state (XWMHints *i)
 {
           return(i->initial_state);
 }
 
-void set_XWMHints_initial_state(i, j)
-XWMHints* i;
-int j;
+void 
+set_XWMHints_initial_state (XWMHints *i, int j)
 {
           i->initial_state = j;
 }
 
-int  XWMHints_input(i)
-XWMHints* i;
+int 
+XWMHints_input (XWMHints *i)
 {
           return(i->input);
 }
 
-void set_XWMHints_input(i, j)
-XWMHints* i;
-int j;
+void 
+set_XWMHints_input (XWMHints *i, int j)
 {
           i->input = j;
 }
 
-int  XWMHints_flags(i)
-XWMHints* i;
+int 
+XWMHints_flags (XWMHints *i)
 {
           return(i->flags);
 }
 
-void set_XWMHints_flags(i, j)
-XWMHints* i;
-int j;
+void 
+set_XWMHints_flags (XWMHints *i, int j)
 {
           i->flags = j;
 }
@@ -983,58 +889,55 @@ int j;
 
 /********* XTextProperty functions *****/
 
-long  make_XTextProperty (){
+long 
+make_XTextProperty (void){
           return ((long) calloc(1, sizeof(XTextProperty)));
 }
 
-int  XTextProperty_nitems(i)
-XTextProperty *i;
+int 
+XTextProperty_nitems (XTextProperty *i)
 {
           return(i->nitems);
 }
 
-void set_XTextProperty_nitems(i, j)
-XTextProperty* i;
-int j;
+void 
+set_XTextProperty_nitems (XTextProperty *i, int j)
 {
           i->nitems = j;
 }
 
-int  XTextProperty_format(i)
-XTextProperty* i;
+int 
+XTextProperty_format (XTextProperty *i)
 {
           return(i->format);
 }
 
-void set_XTextProperty_format(i, j)
-XTextProperty* i;
-int j;
+void 
+set_XTextProperty_format (XTextProperty *i, int j)
 {
           i->format = j;
 }
 
-int  XTextProperty_encoding(i)
-XTextProperty* i;
+int 
+XTextProperty_encoding (XTextProperty *i)
 {
           return(i->encoding);
 }
 
-void set_XTextProperty_encoding(i, j)
-XTextProperty* i;
-int j;
+void 
+set_XTextProperty_encoding (XTextProperty *i, int j)
 {
           i->encoding = j;
 }
 
-long  XTextProperty_value(i)
-XTextProperty* i;
+long 
+XTextProperty_value (XTextProperty *i)
 {
           return((long) i->value);
 }
 
-void set_XTextProperty_value(i, j)
-XTextProperty* i;
-long j;
+void 
+set_XTextProperty_value (XTextProperty *i, long j)
 {
           i->value = (unsigned char *) j;
 }
@@ -1042,84 +945,79 @@ long j;
 
 /********* XIconSize functions *****/
 
-long  make_XIconSize (){
+long 
+make_XIconSize (void){
           return ((long) calloc(1, sizeof(XIconSize)));
 }
 
-int  XIconSize_height_inc(i)
-XIconSize* i;
+int 
+XIconSize_height_inc (XIconSize *i)
 {
           return(i->height_inc);
 }
 
-void set_XIconSize_height_inc(i, j)
-XIconSize* i;
-int j;
+void 
+set_XIconSize_height_inc (XIconSize *i, int j)
 {
           i->height_inc = j;
 }
 
-int  XIconSize_width_inc(i)
-XIconSize* i;
+int 
+XIconSize_width_inc (XIconSize *i)
 {
           return(i->width_inc);
 }
 
-void set_XIconSize_width_inc(i, j)
-XIconSize* i;
-int j;
+void 
+set_XIconSize_width_inc (XIconSize *i, int j)
 {
           i->width_inc = j;
 }
 
-int  XIconSize_max_height(i)
-XIconSize* i;
+int 
+XIconSize_max_height (XIconSize *i)
 {
           return(i->max_height);
 }
 
-void set_XIconSize_max_height(i, j)
-XIconSize* i;
-int j;
+void 
+set_XIconSize_max_height (XIconSize *i, int j)
 {
           i->max_height = j;
 }
 
-int  XIconSize_max_width(i)
-XIconSize* i;
+int 
+XIconSize_max_width (XIconSize *i)
 {
           return(i->max_width);
 }
 
-void set_XIconSize_max_width(i, j)
-XIconSize* i;
-int j;
+void 
+set_XIconSize_max_width (XIconSize *i, int j)
 {
           i->max_width = j;
 }
 
-int  XIconSize_min_height(i)
-XIconSize* i;
+int 
+XIconSize_min_height (XIconSize *i)
 {
           return(i->min_height);
 }
 
-void set_XIconSize_min_height(i, j)
-XIconSize* i;
-int j;
+void 
+set_XIconSize_min_height (XIconSize *i, int j)
 {
           i->min_height = j;
 }
 
-int  XIconSize_min_width(i)
-XIconSize* i;
+int 
+XIconSize_min_width (XIconSize *i)
 {
           return(i->min_width);
 }
 
-void set_XIconSize_min_width(i, j)
-XIconSize* i;
-int j;
+void 
+set_XIconSize_min_width (XIconSize *i, int j)
 {
           i->min_width = j;
 }
@@ -1127,32 +1025,31 @@ int j;
 
 /********* XClassHint functions *****/
 
-long  make_XClassHint (){
+long 
+make_XClassHint (void){
           return ((long) calloc(1, sizeof(XClassHint)));
 }
 
-long  XClassHint_res_class(i)
-XClassHint* i;
+long 
+XClassHint_res_class (XClassHint *i)
 {
           return((long) i->res_class);
 }
 
-void set_XClassHint_res_class(i, j)
-XClassHint* i;
-long j;
+void 
+set_XClassHint_res_class (XClassHint *i, long j)
 {
           i->res_class = (char *) j;
 }
 
-long  XClassHint_res_name(i)
-XClassHint* i;
+long 
+XClassHint_res_name (XClassHint *i)
 {
           return((long) i->res_name);
 }
 
-void set_XClassHint_res_name(i, j)
-XClassHint* i;
-long j;
+void 
+set_XClassHint_res_name (XClassHint *i, long j)
 {
           i->res_name = (char *) j;
 }
@@ -1160,32 +1057,31 @@ long j;
 
 /********* XComposeStatus functions *****/
 
-long  make_XComposeStatus (){
+long 
+make_XComposeStatus (void){
           return ((long) calloc(1, sizeof(XComposeStatus)));
 }
 
-int  XComposeStatus_chars_matched(i)
-XComposeStatus* i;
+int 
+XComposeStatus_chars_matched (XComposeStatus *i)
 {
           return(i->chars_matched);
 }
 
-void set_XComposeStatus_chars_matched(i, j)
-XComposeStatus* i;
-int j;
+void 
+set_XComposeStatus_chars_matched (XComposeStatus *i, int j)
 {
           i->chars_matched = j;
 }
 
-long  XComposeStatus_compose_ptr(i)
-XComposeStatus* i;
+long 
+XComposeStatus_compose_ptr (XComposeStatus *i)
 {
           return((long) i->compose_ptr);
 }
 
-void set_XComposeStatus_compose_ptr(i, j)
-XComposeStatus* i;
-long j;
+void 
+set_XComposeStatus_compose_ptr (XComposeStatus *i, long j)
 {
           i->compose_ptr = (XPointer) j;
 }
@@ -1193,136 +1089,127 @@ long j;
 
 /********* XVisualInfo functions *****/
 
-long  make_XVisualInfo (){
+long 
+make_XVisualInfo (void){
           return ((long) calloc(1, sizeof(XVisualInfo)));
 }
 
-int  XVisualInfo_bits_per_rgb(i)
-XVisualInfo* i;
+int 
+XVisualInfo_bits_per_rgb (XVisualInfo *i)
 {
           return(i->bits_per_rgb);
 }
 
-void set_XVisualInfo_bits_per_rgb(i, j)
-XVisualInfo* i;
-int j;
+void 
+set_XVisualInfo_bits_per_rgb (XVisualInfo *i, int j)
 {
           i->bits_per_rgb = j;
 }
 
-int  XVisualInfo_colormap_size(i)
-XVisualInfo* i;
+int 
+XVisualInfo_colormap_size (XVisualInfo *i)
 {
           return(i->colormap_size);
 }
 
-void set_XVisualInfo_colormap_size(i, j)
-XVisualInfo* i;
-int j;
+void 
+set_XVisualInfo_colormap_size (XVisualInfo *i, int j)
 {
           i->colormap_size = j;
 }
 
-int  XVisualInfo_blue_mask(i)
-XVisualInfo* i;
+int 
+XVisualInfo_blue_mask (XVisualInfo *i)
 {
           return(i->blue_mask);
 }
 
-void set_XVisualInfo_blue_mask(i, j)
-XVisualInfo* i;
-int j;
+void 
+set_XVisualInfo_blue_mask (XVisualInfo *i, int j)
 {
           i->blue_mask = j;
 }
 
-int  XVisualInfo_green_mask(i)
-XVisualInfo* i;
+int 
+XVisualInfo_green_mask (XVisualInfo *i)
 {
           return(i->green_mask);
 }
 
-void set_XVisualInfo_green_mask(i, j)
-XVisualInfo* i;
-int j;
+void 
+set_XVisualInfo_green_mask (XVisualInfo *i, int j)
 {
           i->green_mask = j;
 }
 
-int  XVisualInfo_red_mask(i)
-XVisualInfo* i;
+int 
+XVisualInfo_red_mask (XVisualInfo *i)
 {
           return(i->red_mask);
 }
 
-void set_XVisualInfo_red_mask(i, j)
-XVisualInfo* i;
-int j;
+void 
+set_XVisualInfo_red_mask (XVisualInfo *i, int j)
 {
           i->red_mask = j;
 }
 
-int  XVisualInfo_class(i)
-XVisualInfo* i;
+int 
+XVisualInfo_class (XVisualInfo *i)
 {
           return(i->class);
 }
 
-void set_XVisualInfo_class(i, j)
-XVisualInfo* i;
-int j;
+void 
+set_XVisualInfo_class (XVisualInfo *i, int j)
 {
           i->class = j;
 }
 
-int  XVisualInfo_depth(i)
-XVisualInfo* i;
+int 
+XVisualInfo_depth (XVisualInfo *i)
 {
           return(i->depth);
 }
 
-void set_XVisualInfo_depth(i, j)
-XVisualInfo* i;
-int j;
+void 
+set_XVisualInfo_depth (XVisualInfo *i, int j)
 {
           i->depth = j;
 }
 
-int  XVisualInfo_screen(i)
-XVisualInfo* i;
+int 
+XVisualInfo_screen (XVisualInfo *i)
 {
           return(i->screen);
 }
 
-void set_XVisualInfo_screen(i, j)
-XVisualInfo* i;
-int j;
+void 
+set_XVisualInfo_screen (XVisualInfo *i, int j)
 {
           i->screen = j;
 }
 
-int  XVisualInfo_visualid(i)
-XVisualInfo* i;
+int 
+XVisualInfo_visualid (XVisualInfo *i)
 {
           return(i->visualid);
 }
 
-void set_XVisualInfo_visualid(i, j)
-XVisualInfo* i;
-int j;
+void 
+set_XVisualInfo_visualid (XVisualInfo *i, int j)
 {
           i->visualid = j;
 }
 
-long  XVisualInfo_visual(i)
-XVisualInfo* i;
+long 
+XVisualInfo_visual (XVisualInfo *i)
 {
           return((long) i->visual);
 }
 
-void set_XVisualInfo_visual(i, j)
-XVisualInfo* i;
-long j;
+void 
+set_XVisualInfo_visual (XVisualInfo *i, long j)
 {
           i->visual = (Visual *) j;
 }
@@ -1330,136 +1217,127 @@ long j;
 
 /********* XStandardColormap functions *****/
 
-long  make_XStandardColormap (){
+long 
+make_XStandardColormap (void){
           return ((long) calloc(1, sizeof(XStandardColormap)));
 }
 
-int  XStandardColormap_killid(i)
-XStandardColormap* i;
+int 
+XStandardColormap_killid (XStandardColormap *i)
 {
           return(i->killid);
 }
 
-void set_XStandardColormap_killid(i, j)
-XStandardColormap* i;
-int j;
+void 
+set_XStandardColormap_killid (XStandardColormap *i, int j)
 {
           i->killid = j;
 }
 
-int  XStandardColormap_visualid(i)
-XStandardColormap* i;
+int 
+XStandardColormap_visualid (XStandardColormap *i)
 {
           return(i->visualid);
 }
 
-void set_XStandardColormap_visualid(i, j)
-XStandardColormap* i;
-int j;
+void 
+set_XStandardColormap_visualid (XStandardColormap *i, int j)
 {
           i->visualid = j;
 }
 
-int  XStandardColormap_base_pixel(i)
-XStandardColormap* i;
+int 
+XStandardColormap_base_pixel (XStandardColormap *i)
 {
           return(i->base_pixel);
 }
 
-void set_XStandardColormap_base_pixel(i, j)
-XStandardColormap* i;
-int j;
+void 
+set_XStandardColormap_base_pixel (XStandardColormap *i, int j)
 {
           i->base_pixel = j;
 }
 
-int  XStandardColormap_blue_mult(i)
-XStandardColormap* i;
+int 
+XStandardColormap_blue_mult (XStandardColormap *i)
 {
           return(i->blue_mult);
 }
 
-void set_XStandardColormap_blue_mult(i, j)
-XStandardColormap* i;
-int j;
+void 
+set_XStandardColormap_blue_mult (XStandardColormap *i, int j)
 {
           i->blue_mult = j;
 }
 
-int  XStandardColormap_blue_max(i)
-XStandardColormap* i;
+int 
+XStandardColormap_blue_max (XStandardColormap *i)
 {
           return(i->blue_max);
 }
 
-void set_XStandardColormap_blue_max(i, j)
-XStandardColormap* i;
-int j;
+void 
+set_XStandardColormap_blue_max (XStandardColormap *i, int j)
 {
           i->blue_max = j;
 }
 
-int  XStandardColormap_green_mult(i)
-XStandardColormap* i;
+int 
+XStandardColormap_green_mult (XStandardColormap *i)
 {
           return(i->green_mult);
 }
 
-void set_XStandardColormap_green_mult(i, j)
-XStandardColormap* i;
-int j;
+void 
+set_XStandardColormap_green_mult (XStandardColormap *i, int j)
 {
           i->green_mult = j;
 }
 
-int  XStandardColormap_green_max(i)
-XStandardColormap* i;
+int 
+XStandardColormap_green_max (XStandardColormap *i)
 {
           return(i->green_max);
 }
 
-void set_XStandardColormap_green_max(i, j)
-XStandardColormap* i;
-int j;
+void 
+set_XStandardColormap_green_max (XStandardColormap *i, int j)
 {
           i->green_max = j;
 }
 
-int  XStandardColormap_red_mult(i)
-XStandardColormap* i;
+int 
+XStandardColormap_red_mult (XStandardColormap *i)
 {
           return(i->red_mult);
 }
 
-void set_XStandardColormap_red_mult(i, j)
-XStandardColormap* i;
-int j;
+void 
+set_XStandardColormap_red_mult (XStandardColormap *i, int j)
 {
           i->red_mult = j;
 }
 
-int  XStandardColormap_red_max(i)
-XStandardColormap* i;
+int 
+XStandardColormap_red_max (XStandardColormap *i)
 {
           return(i->red_max);
 }
 
-void set_XStandardColormap_red_max(i, j)
-XStandardColormap* i;
-int j;
+void 
+set_XStandardColormap_red_max (XStandardColormap *i, int j)
 {
           i->red_max = j;
 }
 
-int  XStandardColormap_colormap(i)
-XStandardColormap* i;
+int 
+XStandardColormap_colormap (XStandardColormap *i)
 {
           return(i->colormap);
 }
 
-void set_XStandardColormap_colormap(i, j)
-XStandardColormap* i;
-int j;
+void 
+set_XStandardColormap_colormap (XStandardColormap *i, int j)
 {
           i->colormap = j;
 }
--- gcl27-2.7.1.orig/xgcl-2/XStruct-4.c
+++ gcl27-2.7.1/xgcl-2/XStruct-4.c
@@ -30,58 +30,54 @@
 
 /********* XExtCodes functions *****/
 
-long  make_XExtCodes (){
+long make_XExtCodes (void)
+{
           return ((long) calloc(1, sizeof(XExtCodes)));
 }
 
-int  XExtCodes_first_error(i)
-XExtCodes* i;
+int XExtCodes_first_error (XExtCodes* i)
 {
           return(i->first_error);
 }
 
-void set_XExtCodes_first_error(i, j)
-XExtCodes* i;
-int j;
+void 
+set_XExtCodes_first_error (XExtCodes *i, int j)
 {
           i->first_error = j;
 }
 
-int  XExtCodes_first_event(i)
-XExtCodes* i;
+int 
+XExtCodes_first_event (XExtCodes *i)
 {
           return(i->first_event);
 }
 
-void set_XExtCodes_first_event(i, j)
-XExtCodes* i;
-int j;
+void 
+set_XExtCodes_first_event (XExtCodes *i, int j)
 {
           i->first_event = j;
 }
 
-int  XExtCodes_major_opcode(i)
-XExtCodes* i;
+int 
+XExtCodes_major_opcode (XExtCodes *i)
 {
           return(i->major_opcode);
 }
 
-void set_XExtCodes_major_opcode(i, j)
-XExtCodes* i;
-int j;
+void 
+set_XExtCodes_major_opcode (XExtCodes *i, int j)
 {
           i->major_opcode = j;
 }
 
-int  XExtCodes_extension(i)
-XExtCodes* i;
+int 
+XExtCodes_extension (XExtCodes *i)
 {
           return(i->extension);
 }
 
-void set_XExtCodes_extension(i, j)
-XExtCodes* i;
-int j;
+void 
+set_XExtCodes_extension (XExtCodes *i, int j)
 {
           i->extension = j;
 }
@@ -89,45 +85,43 @@ int j;
 
 /********* XPixmapFormatValues functions *****/
 
-long  make_XPixmapFormatValues (){
+long 
+make_XPixmapFormatValues (void){
           return ((long) calloc(1, sizeof(XPixmapFormatValues)));
 }
 
-int  XPixmapFormatValues_scanline_pad(i)
-XPixmapFormatValues* i;
+int 
+XPixmapFormatValues_scanline_pad (XPixmapFormatValues *i)
 {
           return(i->scanline_pad);
 }
 
-void set_XPixmapFormatValues_scanline_pad(i, j)
-XPixmapFormatValues* i;
-int j;
+void 
+set_XPixmapFormatValues_scanline_pad (XPixmapFormatValues *i, int j)
 {
           i->scanline_pad = j;
 }
 
-int  XPixmapFormatValues_bits_per_pixel(i)
-XPixmapFormatValues* i;
+int 
+XPixmapFormatValues_bits_per_pixel (XPixmapFormatValues *i)
 {
           return(i->bits_per_pixel);
 }
 
-void set_XPixmapFormatValues_bits_per_pixel(i, j)
-XPixmapFormatValues* i;
-int j;
+void 
+set_XPixmapFormatValues_bits_per_pixel (XPixmapFormatValues *i, int j)
 {
           i->bits_per_pixel = j;
 }
 
-int  XPixmapFormatValues_depth(i)
-XPixmapFormatValues* i;
+int 
+XPixmapFormatValues_depth (XPixmapFormatValues *i)
 {
           return(i->depth);
 }
 
-void set_XPixmapFormatValues_depth(i, j)
-XPixmapFormatValues* i;
-int j;
+void 
+set_XPixmapFormatValues_depth (XPixmapFormatValues *i, int j)
 {
           i->depth = j;
 }
@@ -135,305 +129,283 @@ int j;
 
 /********* XGCValues functions *****/
 
-long  make_XGCValues (){
+long 
+make_XGCValues (void){
           return ((long) calloc(1, sizeof(XGCValues)));
 }
 
-char XGCValues_dashes(i)
-XGCValues* i;
+char 
+XGCValues_dashes (XGCValues *i)
 {
           return(i->dashes);
 }
 
-void set_XGCValues_dashes(i, j)
-XGCValues* i;
-char j;
+void 
+set_XGCValues_dashes (XGCValues *i, int j)
 {
           i->dashes = j;
 }
 
-int  XGCValues_dash_offset(i)
-XGCValues* i;
+int 
+XGCValues_dash_offset (XGCValues *i)
 {
           return(i->dash_offset);
 }
 
-void set_XGCValues_dash_offset(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_dash_offset (XGCValues *i, int j)
 {
           i->dash_offset = j;
 }
 
-int  XGCValues_clip_mask(i)
-XGCValues* i;
+int 
+XGCValues_clip_mask (XGCValues *i)
 {
           return(i->clip_mask);
 }
 
-void set_XGCValues_clip_mask(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_clip_mask (XGCValues *i, int j)
 {
           i->clip_mask = j;
 }
 
-int  XGCValues_clip_y_origin(i)
-XGCValues* i;
+int 
+XGCValues_clip_y_origin (XGCValues *i)
 {
           return(i->clip_y_origin);
 }
 
-void set_XGCValues_clip_y_origin(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_clip_y_origin (XGCValues *i, int j)
 {
           i->clip_y_origin = j;
 }
 
-int  XGCValues_clip_x_origin(i)
-XGCValues* i;
+int 
+XGCValues_clip_x_origin (XGCValues *i)
 {
           return(i->clip_x_origin);
 }
 
-void set_XGCValues_clip_x_origin(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_clip_x_origin (XGCValues *i, int j)
 {
           i->clip_x_origin = j;
 }
 
-int  XGCValues_graphics_exposures(i)
-XGCValues* i;
+int 
+XGCValues_graphics_exposures (XGCValues *i)
 {
           return(i->graphics_exposures);
 }
 
-void set_XGCValues_graphics_exposures(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_graphics_exposures (XGCValues *i, int j)
 {
           i->graphics_exposures = j;
 }
 
-int  XGCValues_subwindow_mode(i)
-XGCValues* i;
+int 
+XGCValues_subwindow_mode (XGCValues *i)
 {
           return(i->subwindow_mode);
 }
 
-void set_XGCValues_subwindow_mode(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_subwindow_mode (XGCValues *i, int j)
 {
           i->subwindow_mode = j;
 }
 
-int  XGCValues_font(i)
-XGCValues* i;
+int 
+XGCValues_font (XGCValues *i)
 {
           return(i->font);
 }
 
-void set_XGCValues_font(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_font (XGCValues *i, int j)
 {
           i->font = j;
 }
 
-int  XGCValues_ts_y_origin(i)
-XGCValues* i;
+int 
+XGCValues_ts_y_origin (XGCValues *i)
 {
           return(i->ts_y_origin);
 }
 
-void set_XGCValues_ts_y_origin(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_ts_y_origin (XGCValues *i, int j)
 {
           i->ts_y_origin = j;
 }
 
-int  XGCValues_ts_x_origin(i)
-XGCValues* i;
+int 
+XGCValues_ts_x_origin (XGCValues *i)
 {
           return(i->ts_x_origin);
 }
 
-void set_XGCValues_ts_x_origin(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_ts_x_origin (XGCValues *i, int j)
 {
           i->ts_x_origin = j;
 }
 
-int  XGCValues_stipple(i)
-XGCValues* i;
+int 
+XGCValues_stipple (XGCValues *i)
 {
           return(i->stipple);
 }
 
-void set_XGCValues_stipple(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_stipple (XGCValues *i, int j)
 {
           i->stipple = j;
 }
 
-int  XGCValues_tile(i)
-XGCValues* i;
+int 
+XGCValues_tile (XGCValues *i)
 {
           return(i->tile);
 }
 
-void set_XGCValues_tile(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_tile (XGCValues *i, int j)
 {
           i->tile = j;
 }
 
-int  XGCValues_arc_mode(i)
-XGCValues* i;
+int 
+XGCValues_arc_mode (XGCValues *i)
 {
           return(i->arc_mode);
 }
 
-void set_XGCValues_arc_mode(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_arc_mode (XGCValues *i, int j)
 {
           i->arc_mode = j;
 }
 
-int  XGCValues_fill_rule(i)
-XGCValues* i;
+int 
+XGCValues_fill_rule (XGCValues *i)
 {
           return(i->fill_rule);
 }
 
-void set_XGCValues_fill_rule(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_fill_rule (XGCValues *i, int j)
 {
           i->fill_rule = j;
 }
 
-int  XGCValues_fill_style(i)
-XGCValues* i;
+int 
+XGCValues_fill_style (XGCValues *i)
 {
           return(i->fill_style);
 }
 
-void set_XGCValues_fill_style(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_fill_style (XGCValues *i, int j)
 {
           i->fill_style = j;
 }
 
-int  XGCValues_join_style(i)
-XGCValues* i;
+int 
+XGCValues_join_style (XGCValues *i)
 {
           return(i->join_style);
 }
 
-void set_XGCValues_join_style(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_join_style (XGCValues *i, int j)
 {
           i->join_style = j;
 }
 
-int  XGCValues_cap_style(i)
-XGCValues* i;
+int 
+XGCValues_cap_style (XGCValues *i)
 {
           return(i->cap_style);
 }
 
-void set_XGCValues_cap_style(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_cap_style (XGCValues *i, int j)
 {
           i->cap_style = j;
 }
 
-int  XGCValues_line_style(i)
-XGCValues* i;
+int 
+XGCValues_line_style (XGCValues *i)
 {
           return(i->line_style);
 }
 
-void set_XGCValues_line_style(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_line_style (XGCValues *i, int j)
 {
           i->line_style = j;
 }
 
-int  XGCValues_line_width(i)
-XGCValues* i;
+int 
+XGCValues_line_width (XGCValues *i)
 {
           return(i->line_width);
 }
 
-void set_XGCValues_line_width(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_line_width (XGCValues *i, int j)
 {
           i->line_width = j;
 }
 
-int  XGCValues_background(i)
-XGCValues* i;
+int 
+XGCValues_background (XGCValues *i)
 {
           return(i->background);
 }
 
-void set_XGCValues_background(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_background (XGCValues *i, int j)
 {
           i->background = j;
 }
 
-int  XGCValues_foreground(i)
-XGCValues* i;
+int 
+XGCValues_foreground (XGCValues *i)
 {
           return(i->foreground);
 }
 
-void set_XGCValues_foreground(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_foreground (XGCValues *i, int j)
 {
           i->foreground = j;
 }
 
-int  XGCValues_plane_mask(i)
-XGCValues* i;
+int 
+XGCValues_plane_mask (XGCValues *i)
 {
           return(i->plane_mask);
 }
 
-void set_XGCValues_plane_mask(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_plane_mask (XGCValues *i, int j)
 {
           i->plane_mask = j;
 }
 
-int  XGCValues_function(i)
-XGCValues* i;
+int 
+XGCValues_function (XGCValues *i)
 {
           return(i->function);
 }
 
-void set_XGCValues_function(i, j)
-XGCValues* i;
-int j;
+void 
+set_XGCValues_function (XGCValues *i, int j)
 {
           i->function = j;
 }
@@ -528,110 +500,103 @@ int j;
 
 /********* Visual functions *****/
 
-long  make_Visual (){
+long 
+make_Visual (void){
           return ((long) calloc(1, sizeof(Visual)));
 }
 
-int  Visual_map_entries(i)
-Visual* i;
+int 
+Visual_map_entries (Visual *i)
 {
           return(i->map_entries);
 }
 
-void set_Visual_map_entries(i, j)
-Visual* i;
-int j;
+void 
+set_Visual_map_entries (Visual *i, int j)
 {
           i->map_entries = j;
 }
 
-int  Visual_bits_per_rgb(i)
-Visual* i;
+int 
+Visual_bits_per_rgb (Visual *i)
 {
           return(i->bits_per_rgb);
 }
 
-void set_Visual_bits_per_rgb(i, j)
-Visual* i;
-int j;
+void 
+set_Visual_bits_per_rgb (Visual *i, int j)
 {
           i->bits_per_rgb = j;
 }
 
-int   Visual_blue_mask(i)
-Visual* i;
+int 
+Visual_blue_mask (Visual *i)
 {
           return(i->blue_mask);
 }
 
-void set_Visual_blue_mask(i, j)
-Visual* i;
-int j;
+void 
+set_Visual_blue_mask (Visual *i, int j)
 {
           i->blue_mask = j;
 }
 
-int  Visual_green_mask(i)
-Visual* i;
+int 
+Visual_green_mask (Visual *i)
 {
           return(i->green_mask);
 }
 
-void set_Visual_green_mask(i, j)
-Visual* i;
-int j;
+void 
+set_Visual_green_mask (Visual *i, int j)
 {
           i->green_mask = j;
 }
 
-int  Visual_red_mask(i)
-Visual* i;
+int 
+Visual_red_mask (Visual *i)
 {
           return(i->red_mask);
 }
 
-void set_Visual_red_mask(i, j)
-Visual* i;
-int j;
+void 
+set_Visual_red_mask (Visual *i, int j)
 {
           i->red_mask = j;
 }
 
-int  Visual_class(i)
-Visual* i;
+int 
+Visual_class (Visual *i)
 {
           return(i->class);
 }
 
-void set_Visual_class(i, j)
-Visual* i;
-int j;
+void 
+set_Visual_class (Visual *i, int j)
 {
           i->class = j;
 }
 
-int  Visual_visualid(i)
-Visual* i;
+int 
+Visual_visualid (Visual *i)
 {
           return(i->visualid);
 }
 
-void set_Visual_visualid(i, j)
-Visual* i;
-int j;
+void 
+set_Visual_visualid (Visual *i, int j)
 {
           i->visualid = j;
 }
 
-long  Visual_ext_data(i)
-Visual* i;
+long 
+Visual_ext_data (Visual *i)
 {
           return((long) i->ext_data);
 }
 
-void set_Visual_ext_data(i, j)
-Visual* i;
-long j;
+void 
+set_Visual_ext_data (Visual *i, long j)
 {
           i->ext_data = (XExtData *) j;
 }
@@ -639,45 +604,43 @@ long j;
 
 /********* Depth functions *****/
 
-long  make_Depth (){
+long 
+make_Depth (void){
           return ((long) calloc(1, sizeof(Depth)));
 }
 
-long  Depth_visuals(i)
-Depth* i;
+long 
+Depth_visuals (Depth *i)
 {
           return((long) i->visuals);
 }
 
-void set_Depth_visuals(i, j)
-Depth* i;
-long j;
+void 
+set_Depth_visuals (Depth *i, long j)
 {
           i->visuals = (Visual *) j;
 }
 
-int  Depth_nvisuals(i)
-Depth* i;
+int 
+Depth_nvisuals (Depth *i)
 {
           return(i->nvisuals);
 }
 
-void set_Depth_nvisuals(i, j)
-Depth* i;
-int j;
+void 
+set_Depth_nvisuals (Depth *i, int j)
 {
           i->nvisuals = j;
 }
 
-int  Depth_depth(i)
-Depth* i;
+int 
+Depth_depth (Depth *i)
 {
           return(i->depth);
 }
 
-void set_Depth_depth(i, j)
-Depth* i;
-int j;
+void 
+set_Depth_depth (Depth *i, int j)
 {
           i->depth = j;
 }
@@ -685,266 +648,247 @@ int j;
 
 /********* Screen functions *****/
 
-long  make_Screen (){
+long 
+make_Screen (void){
           return ((long) calloc(1, sizeof(Screen)));
 }
 
-int  Screen_root_input_mask(i)
-Screen* i;
+int 
+Screen_root_input_mask (Screen *i)
 {
           return(i->root_input_mask);
 }
 
-void set_Screen_root_input_mask(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_root_input_mask (Screen *i, int j)
 {
           i->root_input_mask = j;
 }
 
-int  Screen_save_unders(i)
-Screen* i;
+int 
+Screen_save_unders (Screen *i)
 {
           return(i->save_unders);
 }
 
-void set_Screen_save_unders(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_save_unders (Screen *i, int j)
 {
           i->save_unders = j;
 }
 
-int  Screen_backing_store(i)
-Screen* i;
+int 
+Screen_backing_store (Screen *i)
 {
           return(i->backing_store);
 }
 
-void set_Screen_backing_store(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_backing_store (Screen *i, int j)
 {
           i->backing_store = j;
 }
 
-int  Screen_min_maps(i)
-Screen* i;
+int 
+Screen_min_maps (Screen *i)
 {
           return(i->min_maps);
 }
 
-void set_Screen_min_maps(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_min_maps (Screen *i, int j)
 {
           i->min_maps = j;
 }
 
-int  Screen_max_maps(i)
-Screen* i;
+int 
+Screen_max_maps (Screen *i)
 {
           return(i->max_maps);
 }
 
-void set_Screen_max_maps(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_max_maps (Screen *i, int j)
 {
           i->max_maps = j;
 }
 
-int  Screen_black_pixel(i)
-Screen* i;
+int 
+Screen_black_pixel (Screen *i)
 {
           return(i->black_pixel);
 }
 
-void set_Screen_black_pixel(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_black_pixel (Screen *i, int j)
 {
           i->black_pixel = j;
 }
 
-int  Screen_white_pixel(i)
-Screen* i;
+int 
+Screen_white_pixel (Screen *i)
 {
           return(i->white_pixel);
 }
 
-void set_Screen_white_pixel(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_white_pixel (Screen *i, int j)
 {
           i->white_pixel = j;
 }
 
-int  Screen_cmap(i)
-Screen* i;
+int 
+Screen_cmap (Screen *i)
 {
           return(i->cmap);
 }
 
-void set_Screen_cmap(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_cmap (Screen *i, int j)
 {
           i->cmap = j;
 }
 
-long  Screen_default_gc(i)
-Screen* i;
+long 
+Screen_default_gc (Screen *i)
 {
           return((long) i->default_gc);
 }
 
-void set_Screen_default_gc(i, j)
-Screen* i;
-long j;
+void 
+set_Screen_default_gc (Screen *i, long j)
 {
           i->default_gc = (GC) j;
 }
 
-long  Screen_root_visual(i)
-Screen* i;
+long 
+Screen_root_visual (Screen *i)
 {
           return((long) i->root_visual);
 }
 
-void set_Screen_root_visual(i, j)
-Screen* i;
-long j;
+void 
+set_Screen_root_visual (Screen *i, long j)
 {
           i->root_visual = (Visual *) j;
 }
 
-int  Screen_root_depth(i)
-Screen* i;
+int 
+Screen_root_depth (Screen *i)
 {
           return(i->root_depth);
 }
 
-void set_Screen_root_depth(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_root_depth (Screen *i, int j)
 {
           i->root_depth = j;
 }
 
-long  Screen_depths(i)
-Screen* i;
+long 
+Screen_depths (Screen *i)
 {
           return((long) i->depths);
 }
 
-void set_Screen_depths(i, j)
-Screen* i;
-long j;
+void 
+set_Screen_depths (Screen *i, long j)
 {
           i->depths = (Depth *) j;
 }
 
-int  Screen_ndepths(i)
-Screen* i;
+int 
+Screen_ndepths (Screen *i)
 {
           return(i->ndepths);
 }
 
-void set_Screen_ndepths(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_ndepths (Screen *i, int j)
 {
           i->ndepths = j;
 }
 
-int  Screen_mheight(i)
-Screen* i;
+int 
+Screen_mheight (Screen *i)
 {
           return(i->mheight);
 }
 
-void set_Screen_mheight(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_mheight (Screen *i, int j)
 {
           i->mheight = j;
 }
 
-int  Screen_mwidth(i)
-Screen* i;
+int 
+Screen_mwidth (Screen *i)
 {
           return(i->mwidth);
 }
 
-void set_Screen_mwidth(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_mwidth (Screen *i, int j)
 {
           i->mwidth = j;
 }
 
-int  Screen_height(i)
-Screen* i;
+int 
+Screen_height (Screen *i)
 {
           return(i->height);
 }
 
-void set_Screen_height(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_height (Screen *i, int j)
 {
           i->height = j;
 }
 
-int  Screen_width(i)
-Screen* i;
+int 
+Screen_width (Screen *i)
 {
           return(i->width);
 }
 
-void set_Screen_width(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_width (Screen *i, int j)
 {
           i->width = j;
 }
 
-int  Screen_root(i)
-Screen* i;
+int 
+Screen_root (Screen *i)
 {
           return(i->root);
 }
 
-void set_Screen_root(i, j)
-Screen* i;
-int j;
+void 
+set_Screen_root (Screen *i, int j)
 {
           i->root = j;
 }
 
-long Screen_display(i)
-Screen* i;
+long 
+Screen_display (Screen *i)
 {
           return((long) i->display);
 }
 
-void set_Screen_display(i, j)
-Screen* i;
-long j;
+void 
+set_Screen_display (Screen *i, long j)
 {
            i->display = (struct _XDisplay *) j;
 }
 
-long  Screen_ext_data(i)
-Screen* i;
+long 
+Screen_ext_data (Screen *i)
 {
           return((long) i->ext_data);
 }
 
-void set_Screen_ext_data(i, j)
-Screen* i;
-long j;
+void 
+set_Screen_ext_data (Screen *i, long j)
 {
           i->ext_data = (XExtData *) j;
 }
@@ -952,58 +896,55 @@ long j;
 
 /********* ScreenFormat functions *****/
 
-long  make_ScreenFormat (){
+long 
+make_ScreenFormat (void){
           return ((long) calloc(1, sizeof(ScreenFormat)));
 }
 
-int  ScreenFormat_scanline_pad(i)
-ScreenFormat* i;
+int 
+ScreenFormat_scanline_pad (ScreenFormat *i)
 {
           return(i->scanline_pad);
 }
 
-void set_ScreenFormat_scanline_pad(i, j)
-ScreenFormat* i;
-int j;
+void 
+set_ScreenFormat_scanline_pad (ScreenFormat *i, int j)
 {
           i->scanline_pad = j;
 }
 
-int  ScreenFormat_bits_per_pixel(i)
-ScreenFormat* i;
+int 
+ScreenFormat_bits_per_pixel (ScreenFormat *i)
 {
           return(i->bits_per_pixel);
 }
 
-void set_ScreenFormat_bits_per_pixel(i, j)
-ScreenFormat* i;
-int j;
+void 
+set_ScreenFormat_bits_per_pixel (ScreenFormat *i, int j)
 {
           i->bits_per_pixel = j;
 }
 
-int  ScreenFormat_depth(i)
-ScreenFormat* i;
+int 
+ScreenFormat_depth (ScreenFormat *i)
 {
           return(i->depth);
 }
 
-void set_ScreenFormat_depth(i, j)
-ScreenFormat* i;
-int j;
+void 
+set_ScreenFormat_depth (ScreenFormat *i, int j)
 {
           i->depth = j;
 }
 
-long  ScreenFormat_ext_data(i)
-ScreenFormat* i;
+long 
+ScreenFormat_ext_data (ScreenFormat *i)
 {
           return((long) i->ext_data);
 }
 
-void set_ScreenFormat_ext_data(i, j)
-ScreenFormat* i;
-long j;
+void 
+set_ScreenFormat_ext_data (ScreenFormat *i, long j)
 {
           i->ext_data = (XExtData *) j;
 }
@@ -1011,201 +952,187 @@ long j;
 
 /********* XSetWindowAttributes functions *****/
 
-long  make_XSetWindowAttributes (){
+long 
+make_XSetWindowAttributes (void){
           return ((long) calloc(1, sizeof(XSetWindowAttributes)));
 }
 
-int  XSetWindowAttributes_cursor(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_cursor (XSetWindowAttributes *i)
 {
           return(i->cursor);
 }
 
-void set_XSetWindowAttributes_cursor(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_cursor (XSetWindowAttributes *i, int j)
 {
           i->cursor = j;
 }
 
-int  XSetWindowAttributes_colormap(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_colormap (XSetWindowAttributes *i)
 {
           return(i->colormap);
 }
 
-void set_XSetWindowAttributes_colormap(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_colormap (XSetWindowAttributes *i, int j)
 {
           i->colormap = j;
 }
 
-int  XSetWindowAttributes_override_redirect(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_override_redirect (XSetWindowAttributes *i)
 {
           return(i->override_redirect);
 }
 
-void set_XSetWindowAttributes_override_redirect(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_override_redirect (XSetWindowAttributes *i, int j)
 {
           i->override_redirect = j;
 }
 
-int  XSetWindowAttributes_do_not_propagate_mask(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_do_not_propagate_mask (XSetWindowAttributes *i)
 {
           return(i->do_not_propagate_mask);
 }
 
-void set_XSetWindowAttributes_do_not_propagate_mask(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_do_not_propagate_mask (XSetWindowAttributes *i, int j)
 {
           i->do_not_propagate_mask = j;
 }
 
-int  XSetWindowAttributes_event_mask(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_event_mask (XSetWindowAttributes *i)
 {
           return(i->event_mask);
 }
 
-void set_XSetWindowAttributes_event_mask(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_event_mask (XSetWindowAttributes *i, int j)
 {
           i->event_mask = j;
 }
 
-int  XSetWindowAttributes_save_under(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_save_under (XSetWindowAttributes *i)
 {
           return(i->save_under);
 }
 
-void set_XSetWindowAttributes_save_under(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_save_under (XSetWindowAttributes *i, int j)
 {
           i->save_under = j;
 }
 
-int  XSetWindowAttributes_backing_pixel(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_backing_pixel (XSetWindowAttributes *i)
 {
           return(i->backing_pixel);
 }
 
-void set_XSetWindowAttributes_backing_pixel(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_backing_pixel (XSetWindowAttributes *i, int j)
 {
           i->backing_pixel = j;
 }
 
-int  XSetWindowAttributes_backing_planes(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_backing_planes (XSetWindowAttributes *i)
 {
           return(i->backing_planes);
 }
 
-void set_XSetWindowAttributes_backing_planes(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_backing_planes (XSetWindowAttributes *i, int j)
 {
           i->backing_planes = j;
 }
 
-int  XSetWindowAttributes_backing_store(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_backing_store (XSetWindowAttributes *i)
 {
           return(i->backing_store);
 }
 
-void set_XSetWindowAttributes_backing_store(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_backing_store (XSetWindowAttributes *i, int j)
 {
           i->backing_store = j;
 }
 
-int  XSetWindowAttributes_win_gravity(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_win_gravity (XSetWindowAttributes *i)
 {
           return(i->win_gravity);
 }
 
-void set_XSetWindowAttributes_win_gravity(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_win_gravity (XSetWindowAttributes *i, int j)
 {
           i->win_gravity = j;
 }
 
-int  XSetWindowAttributes_bit_gravity(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_bit_gravity (XSetWindowAttributes *i)
 {
           return(i->bit_gravity);
 }
 
-void set_XSetWindowAttributes_bit_gravity(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_bit_gravity (XSetWindowAttributes *i, int j)
 {
           i->bit_gravity = j;
 }
 
-int  XSetWindowAttributes_border_pixel(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_border_pixel (XSetWindowAttributes *i)
 {
           return(i->border_pixel);
 }
 
-void set_XSetWindowAttributes_border_pixel(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_border_pixel (XSetWindowAttributes *i, int j)
 {
           i->border_pixel = j;
 }
 
-int  XSetWindowAttributes_border_pixmap(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_border_pixmap (XSetWindowAttributes *i)
 {
           return(i->border_pixmap);
 }
 
-void set_XSetWindowAttributes_border_pixmap(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_border_pixmap (XSetWindowAttributes *i, int j)
 {
           i->border_pixmap = j;
 }
 
-int  XSetWindowAttributes_background_pixel(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_background_pixel (XSetWindowAttributes *i)
 {
           return(i->background_pixel);
 }
 
-void set_XSetWindowAttributes_background_pixel(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_background_pixel (XSetWindowAttributes *i, int j)
 {
           i->background_pixel = j;
 }
 
-int  XSetWindowAttributes_background_pixmap(i)
-XSetWindowAttributes* i;
+int 
+XSetWindowAttributes_background_pixmap (XSetWindowAttributes *i)
 {
           return(i->background_pixmap);
 }
 
-void set_XSetWindowAttributes_background_pixmap(i, j)
-XSetWindowAttributes* i;
-int j;
+void 
+set_XSetWindowAttributes_background_pixmap (XSetWindowAttributes *i, int j)
 {
           i->background_pixmap = j;
 }
@@ -1213,305 +1140,283 @@ int j;
 
 /********* XWindowAttributes functions *****/
 
-long  make_XWindowAttributes (){
+long 
+make_XWindowAttributes (void){
           return ((long) calloc(1, sizeof(XWindowAttributes)));
 }
 
-long  XWindowAttributes_screen(i)
-XWindowAttributes* i;
+long 
+XWindowAttributes_screen (XWindowAttributes *i)
 {
           return((long) i->screen);
 }
 
-void set_XWindowAttributes_screen(i, j)
-XWindowAttributes* i;
-long j;
+void 
+set_XWindowAttributes_screen (XWindowAttributes *i, long j)
 {
           i->screen = (Screen *) j;
 }
 
-int  XWindowAttributes_override_redirect(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_override_redirect (XWindowAttributes *i)
 {
           return(i->override_redirect);
 }
 
-void set_XWindowAttributes_override_redirect(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_override_redirect (XWindowAttributes *i, int j)
 {
           i->override_redirect = j;
 }
 
-int  XWindowAttributes_do_not_propagate_mask(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_do_not_propagate_mask (XWindowAttributes *i)
 {
           return(i->do_not_propagate_mask);
 }
 
-void set_XWindowAttributes_do_not_propagate_mask(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_do_not_propagate_mask (XWindowAttributes *i, int j)
 {
           i->do_not_propagate_mask = j;
 }
 
-int  XWindowAttributes_your_event_mask(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_your_event_mask (XWindowAttributes *i)
 {
           return(i->your_event_mask);
 }
 
-void set_XWindowAttributes_your_event_mask(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_your_event_mask (XWindowAttributes *i, int j)
 {
           i->your_event_mask = j;
 }
 
-int  XWindowAttributes_all_event_masks(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_all_event_masks (XWindowAttributes *i)
 {
           return(i->all_event_masks);
 }
 
-void set_XWindowAttributes_all_event_masks(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_all_event_masks (XWindowAttributes *i, int j)
 {
           i->all_event_masks = j;
 }
 
-int  XWindowAttributes_map_state(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_map_state (XWindowAttributes *i)
 {
           return(i->map_state);
 }
 
-void set_XWindowAttributes_map_state(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_map_state (XWindowAttributes *i, int j)
 {
           i->map_state = j;
 }
 
-int  XWindowAttributes_map_installed(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_map_installed (XWindowAttributes *i)
 {
           return(i->map_installed);
 }
 
-void set_XWindowAttributes_map_installed(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_map_installed (XWindowAttributes *i, int j)
 {
           i->map_installed = j;
 }
 
-int  XWindowAttributes_colormap(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_colormap (XWindowAttributes *i)
 {
           return(i->colormap);
 }
 
-void set_XWindowAttributes_colormap(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_colormap (XWindowAttributes *i, int j)
 {
           i->colormap = j;
 }
 
-int  XWindowAttributes_save_under(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_save_under (XWindowAttributes *i)
 {
           return(i->save_under);
 }
 
-void set_XWindowAttributes_save_under(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_save_under (XWindowAttributes *i, int j)
 {
           i->save_under = j;
 }
 
-int  XWindowAttributes_backing_pixel(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_backing_pixel (XWindowAttributes *i)
 {
           return(i->backing_pixel);
 }
 
-void set_XWindowAttributes_backing_pixel(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_backing_pixel (XWindowAttributes *i, int j)
 {
           i->backing_pixel = j;
 }
 
-int  XWindowAttributes_backing_planes(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_backing_planes (XWindowAttributes *i)
 {
           return(i->backing_planes);
 }
 
-void set_XWindowAttributes_backing_planes(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_backing_planes (XWindowAttributes *i, int j)
 {
           i->backing_planes = j;
 }
 
-int  XWindowAttributes_backing_store(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_backing_store (XWindowAttributes *i)
 {
           return(i->backing_store);
 }
 
-void set_XWindowAttributes_backing_store(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_backing_store (XWindowAttributes *i, int j)
 {
           i->backing_store = j;
 }
 
-int  XWindowAttributes_win_gravity(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_win_gravity (XWindowAttributes *i)
 {
           return(i->win_gravity);
 }
 
-void set_XWindowAttributes_win_gravity(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_win_gravity (XWindowAttributes *i, int j)
 {
           i->win_gravity = j;
 }
 
-int  XWindowAttributes_bit_gravity(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_bit_gravity (XWindowAttributes *i)
 {
           return(i->bit_gravity);
 }
 
-void set_XWindowAttributes_bit_gravity(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_bit_gravity (XWindowAttributes *i, int j)
 {
           i->bit_gravity = j;
 }
 
-int  XWindowAttributes_class(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_class (XWindowAttributes *i)
 {
           return(i->class);
 }
 
-void set_XWindowAttributes_class(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_class (XWindowAttributes *i, int j)
 {
           i->class = j;
 }
 
-int  XWindowAttributes_root(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_root (XWindowAttributes *i)
 {
           return(i->root);
 }
 
-void set_XWindowAttributes_root(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_root (XWindowAttributes *i, int j)
 {
           i->root = j;
 }
 
-long  XWindowAttributes_visual(i)
-XWindowAttributes* i;
+long 
+XWindowAttributes_visual (XWindowAttributes *i)
 {
           return((long) i->visual);
 }
 
-void set_XWindowAttributes_visual(i, j)
-XWindowAttributes* i;
-long j;
+void 
+set_XWindowAttributes_visual (XWindowAttributes *i, long j)
 {
           i->visual = (Visual *) j;
 }
 
-int  XWindowAttributes_depth(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_depth (XWindowAttributes *i)
 {
           return(i->depth);
 }
 
-void set_XWindowAttributes_depth(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_depth (XWindowAttributes *i, int j)
 {
           i->depth = j;
 }
 
-int  XWindowAttributes_border_width(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_border_width (XWindowAttributes *i)
 {
           return(i->border_width);
 }
 
-void set_XWindowAttributes_border_width(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_border_width (XWindowAttributes *i, int j)
 {
           i->border_width = j;
 }
 
-int  XWindowAttributes_height(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_height (XWindowAttributes *i)
 {
           return(i->height);
 }
 
-void set_XWindowAttributes_height(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_height (XWindowAttributes *i, int j)
 {
           i->height = j;
 }
 
-int  XWindowAttributes_width(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_width (XWindowAttributes *i)
 {
           return(i->width);
 }
 
-void set_XWindowAttributes_width(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_width (XWindowAttributes *i, int j)
 {
           i->width = j;
 }
 
-int  XWindowAttributes_y(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_y (XWindowAttributes *i)
 {
           return(i->y);
 }
 
-void set_XWindowAttributes_y(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_y (XWindowAttributes *i, int j)
 {
           i->y = j;
 }
 
-int  XWindowAttributes_x(i)
-XWindowAttributes* i;
+int 
+XWindowAttributes_x (XWindowAttributes *i)
 {
           return(i->x);
 }
 
-void set_XWindowAttributes_x(i, j)
-XWindowAttributes* i;
-int j;
+void 
+set_XWindowAttributes_x (XWindowAttributes *i, int j)
 {
           i->x = j;
 }
@@ -1519,45 +1424,43 @@ int j;
 
 /********* XHostAddress functions *****/
 
-long  make_XHostAddress (){
+long 
+make_XHostAddress (void){
           return ((long) calloc(1, sizeof(XHostAddress)));
 }
 
-long  XHostAddress_address(i)
-XHostAddress* i;
+long 
+XHostAddress_address (XHostAddress *i)
 {
           return((long) i->address);
 }
 
-void set_XHostAddress_address(i, j)
-XHostAddress* i;
-long j;
+void 
+set_XHostAddress_address (XHostAddress *i, long j)
 {
           i->address = (char *) j;
 }
 
-int  XHostAddress_length(i)
-XHostAddress* i;
+int 
+XHostAddress_length (XHostAddress *i)
 {
           return(i->length);
 }
 
-void set_XHostAddress_length(i, j)
-XHostAddress* i;
-int j;
+void 
+set_XHostAddress_length (XHostAddress *i, int j)
 {
           i->length = j;
 }
 
-int  XHostAddress_family(i)
-XHostAddress* i;
+int 
+XHostAddress_family (XHostAddress *i)
 {
           return(i->family);
 }
 
-void set_XHostAddress_family(i, j)
-XHostAddress* i;
-int j;
+void 
+set_XHostAddress_family (XHostAddress *i, int j)
 {
           i->family = j;
 }
@@ -1565,214 +1468,199 @@ int j;
 
 /********* XImage functions *****/
 
-long  make_XImage (){
+long 
+make_XImage (void){
           return ((long) calloc(1, sizeof(XImage)));
 }
 
-long  XImage_obdata(i)
-XImage* i;
+long 
+XImage_obdata (XImage *i)
 {
           return((long) i->obdata);
 }
 
-void set_XImage_obdata(i, j)
-XImage* i;
-long j;
+void 
+set_XImage_obdata (XImage *i, long j)
 {
           i->obdata = (XPointer) j;
 }
 
-int  XImage_blue_mask(i)
-XImage* i;
+int 
+XImage_blue_mask (XImage *i)
 {
           return(i->blue_mask);
 }
 
-void set_XImage_blue_mask(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_blue_mask (XImage *i, int j)
 {
           i->blue_mask = j;
 }
 
-int  XImage_green_mask(i)
-XImage* i;
+int 
+XImage_green_mask (XImage *i)
 {
           return(i->green_mask);
 }
 
-void set_XImage_green_mask(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_green_mask (XImage *i, int j)
 {
           i->green_mask = j;
 }
 
-int  XImage_red_mask(i)
-XImage* i;
+int 
+XImage_red_mask (XImage *i)
 {
           return(i->red_mask);
 }
 
-void set_XImage_red_mask(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_red_mask (XImage *i, int j)
 {
           i->red_mask = j;
 }
 
-int  XImage_bits_per_pixel(i)
-XImage* i;
+int 
+XImage_bits_per_pixel (XImage *i)
 {
           return(i->bits_per_pixel);
 }
 
-void set_XImage_bits_per_pixel(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_bits_per_pixel (XImage *i, int j)
 {
           i->bits_per_pixel = j;
 }
 
-int  XImage_bytes_per_line(i)
-XImage* i;
+int 
+XImage_bytes_per_line (XImage *i)
 {
           return(i->bytes_per_line);
 }
 
-void set_XImage_bytes_per_line(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_bytes_per_line (XImage *i, int j)
 {
           i->bytes_per_line = j;
 }
 
-int  XImage_depth(i)
-XImage* i;
+int 
+XImage_depth (XImage *i)
 {
           return(i->depth);
 }
 
-void set_XImage_depth(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_depth (XImage *i, int j)
 {
           i->depth = j;
 }
 
-int  XImage_bitmap_pad(i)
-XImage* i;
+int 
+XImage_bitmap_pad (XImage *i)
 {
           return(i->bitmap_pad);
 }
 
-void set_XImage_bitmap_pad(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_bitmap_pad (XImage *i, int j)
 {
           i->bitmap_pad = j;
 }
 
-int  XImage_bitmap_bit_order(i)
-XImage* i;
+int 
+XImage_bitmap_bit_order (XImage *i)
 {
           return(i->bitmap_bit_order);
 }
 
-void set_XImage_bitmap_bit_order(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_bitmap_bit_order (XImage *i, int j)
 {
           i->bitmap_bit_order = j;
 }
 
-int  XImage_bitmap_unit(i)
-XImage* i;
+int 
+XImage_bitmap_unit (XImage *i)
 {
           return(i->bitmap_unit);
 }
 
-void set_XImage_bitmap_unit(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_bitmap_unit (XImage *i, int j)
 {
           i->bitmap_unit = j;
 }
 
-int  XImage_byte_order(i)
-XImage* i;
+int 
+XImage_byte_order (XImage *i)
 {
           return(i->byte_order);
 }
 
-void set_XImage_byte_order(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_byte_order (XImage *i, int j)
 {
           i->byte_order = j;
 }
 
-long  XImage_data(i)
-XImage* i;
+long 
+XImage_data (XImage *i)
 {
           return((long) i->data);
 }
 
-void set_XImage_data(i, j)
-XImage* i;
-long j;
+void 
+set_XImage_data (XImage *i, long j)
 {
           i->data = (char *) j;
 }
 
-int  XImage_format(i)
-XImage* i;
+int 
+XImage_format (XImage *i)
 {
           return(i->format);
 }
 
-void set_XImage_format(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_format (XImage *i, int j)
 {
           i->format = j;
 }
 
-int  XImage_xoffset(i)
-XImage* i;
+int 
+XImage_xoffset (XImage *i)
 {
           return(i->xoffset);
 }
 
-void set_XImage_xoffset(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_xoffset (XImage *i, int j)
 {
           i->xoffset = j;
 }
 
-int  XImage_height(i)
-XImage* i;
+int 
+XImage_height (XImage *i)
 {
           return(i->height);
 }
 
-void set_XImage_height(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_height (XImage *i, int j)
 {
           i->height = j;
 }
 
-int  XImage_width(i)
-XImage* i;
+int 
+XImage_width (XImage *i)
 {
           return(i->width);
 }
 
-void set_XImage_width(i, j)
-XImage* i;
-int j;
+void 
+set_XImage_width (XImage *i, int j)
 {
           i->width = j;
 }
@@ -1780,97 +1668,91 @@ int j;
 
 /********* XWindowChanges functions *****/
 
-long  make_XWindowChanges (){
+long 
+make_XWindowChanges (void){
           return ((long) calloc(1, sizeof(XWindowChanges)));
 }
 
-int  XWindowChanges_stack_mode(i)
-XWindowChanges* i;
+int 
+XWindowChanges_stack_mode (XWindowChanges *i)
 {
           return(i->stack_mode);
 }
 
-void set_XWindowChanges_stack_mode(i, j)
-XWindowChanges* i;
-int j;
+void 
+set_XWindowChanges_stack_mode (XWindowChanges *i, int j)
 {
           i->stack_mode = j;
 }
 
-int  XWindowChanges_sibling(i)
-XWindowChanges* i;
+int 
+XWindowChanges_sibling (XWindowChanges *i)
 {
           return(i->sibling);
 }
 
-void set_XWindowChanges_sibling(i, j)
-XWindowChanges* i;
-int j;
+void 
+set_XWindowChanges_sibling (XWindowChanges *i, int j)
 {
           i->sibling = j;
 }
 
-int  XWindowChanges_border_width(i)
-XWindowChanges* i;
+int 
+XWindowChanges_border_width (XWindowChanges *i)
 {
           return(i->border_width);
 }
 
-void set_XWindowChanges_border_width(i, j)
-XWindowChanges* i;
-int j;
+void 
+set_XWindowChanges_border_width (XWindowChanges *i, int j)
 {
           i->border_width = j;
 }
 
-int  XWindowChanges_height(i)
-XWindowChanges* i;
+int 
+XWindowChanges_height (XWindowChanges *i)
 {
           return(i->height);
 }
 
-void set_XWindowChanges_height(i, j)
-XWindowChanges* i;
-int j;
+void 
+set_XWindowChanges_height (XWindowChanges *i, int j)
 {
           i->height = j;
 }
 
-int  XWindowChanges_width(i)
-XWindowChanges* i;
+int 
+XWindowChanges_width (XWindowChanges *i)
 {
           return(i->width);
 }
 
-void set_XWindowChanges_width(i, j)
-XWindowChanges* i;
-int j;
+void 
+set_XWindowChanges_width (XWindowChanges *i, int j)
 {
           i->width = j;
 }
 
-int  XWindowChanges_y(i)
-XWindowChanges* i;
+int 
+XWindowChanges_y (XWindowChanges *i)
 {
           return(i->y);
 }
 
-void set_XWindowChanges_y(i, j)
-XWindowChanges* i;
-int j;
+void 
+set_XWindowChanges_y (XWindowChanges *i, int j)
 {
           i->y = j;
 }
 
-int  XWindowChanges_x(i)
-XWindowChanges* i;
+int 
+XWindowChanges_x (XWindowChanges *i)
 {
           return(i->x);
 }
 
-void set_XWindowChanges_x(i, j)
-XWindowChanges* i;
-int j;
+void 
+set_XWindowChanges_x (XWindowChanges *i, int j)
 {
           i->x = j;
 }
@@ -1878,84 +1760,79 @@ int j;
 
 /********* XColor functions *****/
 
-long  make_XColor (){
+long 
+make_XColor (void){
           return ((long) calloc(1, sizeof(XColor)));
 }
 
-char XColor_pad(i)
-XColor* i;
+char 
+XColor_pad (XColor *i)
 {
           return(i->pad);
 }
 
-void set_XColor_pad(i, j)
-XColor* i;
-char j;
+void 
+set_XColor_pad (XColor *i, int j)
 {
           i->pad = j;
 }
 
-char XColor_flags(i)
-XColor* i;
+char 
+XColor_flags (XColor *i)
 {
           return(i->flags);
 }
 
-void set_XColor_flags(i, j)
-XColor* i;
-char j;
+void 
+set_XColor_flags (XColor *i, int j)
 {
           i->flags = j;
 }
 
-int  XColor_blue(i)
-XColor* i;
+int 
+XColor_blue (XColor *i)
 {
           return(i->blue);
 }
 
-void set_XColor_blue(i, j)
-XColor* i;
-int j;
+void 
+set_XColor_blue (XColor *i, int j)
 {
           i->blue = j;
 }
 
-int  XColor_green(i)
-XColor* i;
+int 
+XColor_green (XColor *i)
 {
           return(i->green);
 }
 
-void set_XColor_green(i, j)
-XColor* i;
-int j;
+void 
+set_XColor_green (XColor *i, int j)
 {
           i->green = j;
 }
 
-int  XColor_red(i)
-XColor* i;
+int 
+XColor_red (XColor *i)
 {
           return(i->red);
 }
 
-void set_XColor_red(i, j)
-XColor* i;
-int j;
+void 
+set_XColor_red (XColor *i, int j)
 {
           i->red = j;
 }
 
-int  XColor_pixel(i)
-XColor* i;
+int 
+XColor_pixel (XColor *i)
 {
           return(i->pixel);
 }
 
-void set_XColor_pixel(i, j)
-XColor* i;
-int j;
+void 
+set_XColor_pixel (XColor *i, int j)
 {
           i->pixel = j;
 }
@@ -1963,58 +1840,55 @@ int j;
 
 /********* XSegment functions *****/
 
-long  make_XSegment (){
+long 
+make_XSegment (void){
           return ((long) calloc(1, sizeof(XSegment)));
 }
 
-int  XSegment_y2(i)
-XSegment* i;
+int 
+XSegment_y2 (XSegment *i)
 {
           return(i->y2);
 }
 
-void set_XSegment_y2(i, j)
-XSegment* i;
-int j;
+void 
+set_XSegment_y2 (XSegment *i, int j)
 {
           i->y2 = j;
 }
 
-int  XSegment_x2(i)
-XSegment* i;
+int 
+XSegment_x2 (XSegment *i)
 {
           return(i->x2);
 }
 
-void set_XSegment_x2(i, j)
-XSegment* i;
-int j;
+void 
+set_XSegment_x2 (XSegment *i, int j)
 {
           i->x2 = j;
 }
 
-int  XSegment_y1(i)
-XSegment* i;
+int 
+XSegment_y1 (XSegment *i)
 {
           return(i->y1);
 }
 
-void set_XSegment_y1(i, j)
-XSegment* i;
-int j;
+void 
+set_XSegment_y1 (XSegment *i, int j)
 {
           i->y1 = j;
 }
 
-int  XSegment_x1(i)
-XSegment* i;
+int 
+XSegment_x1 (XSegment *i)
 {
           return(i->x1);
 }
 
-void set_XSegment_x1(i, j)
-XSegment* i;
-int j;
+void 
+set_XSegment_x1 (XSegment *i, int j)
 {
           i->x1 = j;
 }
@@ -2022,32 +1896,31 @@ int j;
 
 /********* XPoint functions *****/
 
-long  make_XPoint (){
+long 
+make_XPoint (void){
           return ((long) calloc(1, sizeof(XPoint)));
 }
 
-int  XPoint_y(i)
-XPoint* i;
+int 
+XPoint_y (XPoint *i)
 {
           return(i->y);
 }
 
-void set_XPoint_y(i, j)
-XPoint* i;
-int j;
+void 
+set_XPoint_y (XPoint *i, int j)
 {
           i->y = j;
 }
 
-int  XPoint_x(i)
-XPoint* i;
+int 
+XPoint_x (XPoint *i)
 {
           return(i->x);
 }
 
-void set_XPoint_x(i, j)
-XPoint* i;
-int j;
+void 
+set_XPoint_x (XPoint *i, int j)
 {
           i->x = j;
 }
@@ -2055,58 +1928,55 @@ int j;
 
 /********* XRectangle functions *****/
 
-long  make_XRectangle (){
+long 
+make_XRectangle (void){
           return ((long) calloc(1, sizeof(XRectangle)));
 }
 
-int  XRectangle_height(i)
-XRectangle* i;
+int 
+XRectangle_height (XRectangle *i)
 {
           return(i->height);
 }
 
-void set_XRectangle_height(i, j)
-XRectangle* i;
-int j;
+void 
+set_XRectangle_height (XRectangle *i, int j)
 {
           i->height = j;
 }
 
-int  XRectangle_width(i)
-XRectangle* i;
+int 
+XRectangle_width (XRectangle *i)
 {
           return(i->width);
 }
 
-void set_XRectangle_width(i, j)
-XRectangle* i;
-int j;
+void 
+set_XRectangle_width (XRectangle *i, int j)
 {
           i->width = j;
 }
 
-int  XRectangle_y(i)
-XRectangle* i;
+int 
+XRectangle_y (XRectangle *i)
 {
           return(i->y);
 }
 
-void set_XRectangle_y(i, j)
-XRectangle* i;
-int j;
+void 
+set_XRectangle_y (XRectangle *i, int j)
 {
           i->y = j;
 }
 
-int  XRectangle_x(i)
-XRectangle* i;
+int 
+XRectangle_x (XRectangle *i)
 {
           return(i->x);
 }
 
-void set_XRectangle_x(i, j)
-XRectangle* i;
-int j;
+void 
+set_XRectangle_x (XRectangle *i, int j)
 {
           i->x = j;
 }
@@ -2114,84 +1984,79 @@ int j;
 
 /********* XArc functions *****/
 
-long  make_XArc (){
+long 
+make_XArc (void){
           return ((long) calloc(1, sizeof(XArc)));
 }
 
-int  XArc_angle2(i)
-XArc* i;
+int 
+XArc_angle2 (XArc *i)
 {
           return(i->angle2);
 }
 
-void set_XArc_angle2(i, j)
-XArc* i;
-int j;
+void 
+set_XArc_angle2 (XArc *i, int j)
 {
           i->angle2 = j;
 }
 
-int  XArc_angle1(i)
-XArc* i;
+int 
+XArc_angle1 (XArc *i)
 {
           return(i->angle1);
 }
 
-void set_XArc_angle1(i, j)
-XArc* i;
-int j;
+void 
+set_XArc_angle1 (XArc *i, int j)
 {
           i->angle1 = j;
 }
 
-int  XArc_height(i)
-XArc* i;
+int 
+XArc_height (XArc *i)
 {
           return(i->height);
 }
 
-void set_XArc_height(i, j)
-XArc* i;
-int j;
+void 
+set_XArc_height (XArc *i, int j)
 {
           i->height = j;
 }
 
-int  XArc_width(i)
-XArc* i;
+int 
+XArc_width (XArc *i)
 {
           return(i->width);
 }
 
-void set_XArc_width(i, j)
-XArc* i;
-int j;
+void 
+set_XArc_width (XArc *i, int j)
 {
           i->width = j;
 }
 
-int  XArc_y(i)
-XArc* i;
+int 
+XArc_y (XArc *i)
 {
           return(i->y);
 }
 
-void set_XArc_y(i, j)
-XArc* i;
-int j;
+void 
+set_XArc_y (XArc *i, int j)
 {
           i->y = j;
 }
 
-int  XArc_x(i)
-XArc* i;
+int 
+XArc_x (XArc *i)
 {
           return(i->x);
 }
 
-void set_XArc_x(i, j)
-XArc* i;
-int j;
+void 
+set_XArc_x (XArc *i, int j)
 {
           i->x = j;
 }
@@ -2199,110 +2064,103 @@ int j;
 
 /********* XKeyboardControl functions *****/
 
-long  make_XKeyboardControl (){
+long 
+make_XKeyboardControl (void){
           return ((long) calloc(1, sizeof(XKeyboardControl)));
 }
 
-int  XKeyboardControl_auto_repeat_mode(i)
-XKeyboardControl* i;
+int 
+XKeyboardControl_auto_repeat_mode (XKeyboardControl *i)
 {
           return(i->auto_repeat_mode);
 }
 
-void set_XKeyboardControl_auto_repeat_mode(i, j)
-XKeyboardControl* i;
-int j;
+void 
+set_XKeyboardControl_auto_repeat_mode (XKeyboardControl *i, int j)
 {
           i->auto_repeat_mode = j;
 }
 
-int  XKeyboardControl_key(i)
-XKeyboardControl* i;
+int 
+XKeyboardControl_key (XKeyboardControl *i)
 {
           return(i->key);
 }
 
-void set_XKeyboardControl_key(i, j)
-XKeyboardControl* i;
-int j;
+void 
+set_XKeyboardControl_key (XKeyboardControl *i, int j)
 {
           i->key = j;
 }
 
-int  XKeyboardControl_led_mode(i)
-XKeyboardControl* i;
+int 
+XKeyboardControl_led_mode (XKeyboardControl *i)
 {
           return(i->led_mode);
 }
 
-void set_XKeyboardControl_led_mode(i, j)
-XKeyboardControl* i;
-int j;
+void 
+set_XKeyboardControl_led_mode (XKeyboardControl *i, int j)
 {
           i->led_mode = j;
 }
 
-int  XKeyboardControl_led(i)
-XKeyboardControl* i;
+int 
+XKeyboardControl_led (XKeyboardControl *i)
 {
           return(i->led);
 }
 
-void set_XKeyboardControl_led(i, j)
-XKeyboardControl* i;
-int j;
+void 
+set_XKeyboardControl_led (XKeyboardControl *i, int j)
 {
           i->led = j;
 }
 
-int  XKeyboardControl_bell_duration(i)
-XKeyboardControl* i;
+int 
+XKeyboardControl_bell_duration (XKeyboardControl *i)
 {
           return(i->bell_duration);
 }
 
-void set_XKeyboardControl_bell_duration(i, j)
-XKeyboardControl* i;
-int j;
+void 
+set_XKeyboardControl_bell_duration (XKeyboardControl *i, int j)
 {
           i->bell_duration = j;
 }
 
-int  XKeyboardControl_bell_pitch(i)
-XKeyboardControl* i;
+int 
+XKeyboardControl_bell_pitch (XKeyboardControl *i)
 {
           return(i->bell_pitch);
 }
 
-void set_XKeyboardControl_bell_pitch(i, j)
-XKeyboardControl* i;
-int j;
+void 
+set_XKeyboardControl_bell_pitch (XKeyboardControl *i, int j)
 {
           i->bell_pitch = j;
 }
 
-int  XKeyboardControl_bell_percent(i)
-XKeyboardControl* i;
+int 
+XKeyboardControl_bell_percent (XKeyboardControl *i)
 {
           return(i->bell_percent);
 }
 
-void set_XKeyboardControl_bell_percent(i, j)
-XKeyboardControl* i;
-int j;
+void 
+set_XKeyboardControl_bell_percent (XKeyboardControl *i, int j)
 {
           i->bell_percent = j;
 }
 
-int  XKeyboardControl_key_click_percent(i)
-XKeyboardControl* i;
+int 
+XKeyboardControl_key_click_percent (XKeyboardControl *i)
 {
           return(i->key_click_percent);
 }
 
-void set_XKeyboardControl_key_click_percent(i, j)
-XKeyboardControl* i;
-int j;
+void 
+set_XKeyboardControl_key_click_percent (XKeyboardControl *i, int j)
 {
           i->key_click_percent = j;
 }
@@ -2310,97 +2168,91 @@ int j;
 
 /********* XKeyboardState functions *****/
 
-long  make_XKeyboardState (){
+long 
+make_XKeyboardState (void){
           return ((long) calloc(1, sizeof(XKeyboardState)));
 }
 
-char *XKeyboardState_auto_repeats(i)
-XKeyboardState* i;
+char *
+XKeyboardState_auto_repeats (XKeyboardState *i)
 {
           return(i->auto_repeats);
 }
 
-void set_XKeyboardState_auto_repeats(i, j)
-XKeyboardState* i;
-char	*j;
+void 
+set_XKeyboardState_auto_repeats (XKeyboardState *i, char *j)
 {
           strcpy(i->auto_repeats,  j);
 }
 
-int  XKeyboardState_global_auto_repeat(i)
-XKeyboardState* i;
+int 
+XKeyboardState_global_auto_repeat (XKeyboardState *i)
 {
           return(i->global_auto_repeat);
 }
 
-void set_XKeyboardState_global_auto_repeat(i, j)
-XKeyboardState* i;
-int j;
+void 
+set_XKeyboardState_global_auto_repeat (XKeyboardState *i, int j)
 {
           i->global_auto_repeat = j;
 }
 
-int  XKeyboardState_led_mask(i)
-XKeyboardState* i;
+int 
+XKeyboardState_led_mask (XKeyboardState *i)
 {
           return(i->led_mask);
 }
 
-void set_XKeyboardState_led_mask(i, j)
-XKeyboardState* i;
-int j;
+void 
+set_XKeyboardState_led_mask (XKeyboardState *i, int j)
 {
           i->led_mask = j;
 }
 
-int  XKeyboardState_bell_duration(i)
-XKeyboardState* i;
+int 
+XKeyboardState_bell_duration (XKeyboardState *i)
 {
           return(i->bell_duration);
 }
 
-void set_XKeyboardState_bell_duration(i, j)
-XKeyboardState* i;
-int j;
+void 
+set_XKeyboardState_bell_duration (XKeyboardState *i, int j)
 {
           i->bell_duration = j;
 }
 
-int  XKeyboardState_bell_pitch(i)
-XKeyboardState* i;
+int 
+XKeyboardState_bell_pitch (XKeyboardState *i)
 {
           return(i->bell_pitch);
 }
 
-void set_XKeyboardState_bell_pitch(i, j)
-XKeyboardState* i;
-int j;
+void 
+set_XKeyboardState_bell_pitch (XKeyboardState *i, int j)
 {
           i->bell_pitch = j;
 }
 
-int  XKeyboardState_bell_percent(i)
-XKeyboardState* i;
+int 
+XKeyboardState_bell_percent (XKeyboardState *i)
 {
           return(i->bell_percent);
 }
 
-void set_XKeyboardState_bell_percent(i, j)
-XKeyboardState* i;
-int j;
+void 
+set_XKeyboardState_bell_percent (XKeyboardState *i, int j)
 {
           i->bell_percent = j;
 }
 
-int  XKeyboardState_key_click_percent(i)
-XKeyboardState* i;
+int 
+XKeyboardState_key_click_percent (XKeyboardState *i)
 {
           return(i->key_click_percent);
 }
 
-void set_XKeyboardState_key_click_percent(i, j)
-XKeyboardState* i;
-int j;
+void 
+set_XKeyboardState_key_click_percent (XKeyboardState *i, int j)
 {
           i->key_click_percent = j;
 }
@@ -2408,45 +2260,43 @@ int j;
 
 /********* XTimeCoord functions *****/
 
-long  make_XTimeCoord (){
+long 
+make_XTimeCoord (void){
           return ((long) calloc(1, sizeof(XTimeCoord)));
 }
 
-int  XTimeCoord_y(i)
-XTimeCoord* i;
+int 
+XTimeCoord_y (XTimeCoord *i)
 {
           return(i->y);
 }
 
-void set_XTimeCoord_y(i, j)
-XTimeCoord* i;
-int j;
+void 
+set_XTimeCoord_y (XTimeCoord *i, int j)
 {
           i->y = j;
 }
 
-int  XTimeCoord_x(i)
-XTimeCoord* i;
+int 
+XTimeCoord_x (XTimeCoord *i)
 {
           return(i->x);
 }
 
-void set_XTimeCoord_x(i, j)
-XTimeCoord* i;
-int j;
+void 
+set_XTimeCoord_x (XTimeCoord *i, int j)
 {
           i->x = j;
 }
 
-int  XTimeCoord_time(i)
-XTimeCoord* i;
+int 
+XTimeCoord_time (XTimeCoord *i)
 {
           return(i->time);
 }
 
-void set_XTimeCoord_time(i, j)
-XTimeCoord* i;
-int j;
+void 
+set_XTimeCoord_time (XTimeCoord *i, int j)
 {
           i->time = j;
 }
@@ -2454,32 +2304,31 @@ int j;
 
 /********* XModifierKeymap functions *****/
 
-long  make_XModifierKeymap (){
+long 
+make_XModifierKeymap (void){
           return ((long) calloc(1, sizeof(XModifierKeymap)));
 }
 
-long  XModifierKeymap_modifiermap(i)
-XModifierKeymap* i;
+long 
+XModifierKeymap_modifiermap (XModifierKeymap *i)
 {
           return((long) i->modifiermap);
 }
 
-void set_XModifierKeymap_modifiermap(i, j)
-XModifierKeymap* i;
-long j;
+void 
+set_XModifierKeymap_modifiermap (XModifierKeymap *i, long j)
 {
           i->modifiermap = (KeyCode *) j;
 }
 
-int  XModifierKeymap_max_keypermod(i)
-XModifierKeymap* i;
+int 
+XModifierKeymap_max_keypermod (XModifierKeymap *i)
 {
           return(i->max_keypermod);
 }
 
-void set_XModifierKeymap_max_keypermod(i, j)
-XModifierKeymap* i;
-int j;
+void 
+set_XModifierKeymap_max_keypermod (XModifierKeymap *i, int j)
 {
           i->max_keypermod = j;
 }
--- gcl27-2.7.1.orig/xgcl-2/Xutil-2.c
+++ gcl27-2.7.1/xgcl-2/Xutil-2.c
@@ -25,31 +25,38 @@
 #include <X11/Xresource.h>
 #include <X11/keysym.h>
 
-int IsKeypadKey(keysym) int keysym; { 
+int IsKeypadKey (int keysym) { 
  return  (((unsigned)(keysym) >= XK_KP_Space) && ((unsigned)(keysym) <= XK_KP_Equal));}
 
-int IsCursorKey(keysym) int keysym; { 
+int 
+IsCursorKey (int keysym)
+{ 
   return (((unsigned)(keysym) >= XK_Home)     && ((unsigned)(keysym) <  XK_Select));}
 
-int IsPFKey(keysym) int keysym; { 
+int 
+IsPFKey (int keysym) { 
   return (((unsigned)(keysym) >= XK_KP_F1)     && ((unsigned)(keysym) <= XK_KP_F4));}
 
-int IsFunctionKey(keysym) int keysym; { 
+int 
+IsFunctionKey (int keysym) { 
   return (((unsigned)(keysym) >= XK_F1)       && ((unsigned)(keysym) <= XK_F35));}
 
-int IsMiscFunctionKey(keysym) int keysym; { 
+int 
+IsMiscFunctionKey (int keysym) { 
   return (((unsigned)(keysym) >= XK_Select)   && ((unsigned)(keysym) <  XK_KP_Space));}
 
-int IsModifierKey(keysym) int keysym; { 
+int 
+IsModifierKey (int keysym) { 
   return (((unsigned)(keysym) >= XK_Shift_L)  && ((unsigned)(keysym) <= XK_Hyper_R));}
 
-int XUniqueContext() 
+int 
+XUniqueContext (void) 
 {
       	return( ((int)XrmUniqueQuark()) );
 }
 
-int XStringToContext(string) 
-	char *string; 
+int 
+XStringToContext (char *string) 
 {
    	return( (int)XrmStringToQuark(string) );
 }
